summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-03-29 18:09:32 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-03-29 18:09:32 +0000
commit400e99c46f5fa56531015ba74096c3df72851d35 (patch)
tree0faef85a6b863396e8ea71feee002ee3a2782234 /sys/arch/i386/stand
parent3756224bec69e72815aea2adefb844c05c376b26 (diff)
It's been a quarter century: we can assume volatile is present with that name.
ok dlg@ mpi@ deraadt@
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r--sys/arch/i386/stand/libsa/apmprobe.c10
-rw-r--r--sys/arch/i386/stand/libsa/bioscons.c14
-rw-r--r--sys/arch/i386/stand/libsa/biosdev.c12
-rw-r--r--sys/arch/i386/stand/libsa/biosprobe.c6
-rw-r--r--sys/arch/i386/stand/libsa/cpuprobe.c6
-rw-r--r--sys/arch/i386/stand/libsa/memprobe.c12
-rw-r--r--sys/arch/i386/stand/libsa/pciprobe.c4
-rw-r--r--sys/arch/i386/stand/libsa/ps2probe.c4
-rw-r--r--sys/arch/i386/stand/libsa/time.c4
9 files changed, 36 insertions, 36 deletions
diff --git a/sys/arch/i386/stand/libsa/apmprobe.c b/sys/arch/i386/stand/libsa/apmprobe.c
index ed509886cfe..c222e12aea8 100644
--- a/sys/arch/i386/stand/libsa/apmprobe.c
+++ b/sys/arch/i386/stand/libsa/apmprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmprobe.c,v 1.16 2013/03/21 21:51:00 deraadt Exp $ */
+/* $OpenBSD: apmprobe.c,v 1.17 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 1997-2000 Michael Shalayeff
@@ -73,7 +73,7 @@ apm_check(void)
register u_int detail;
register u_int8_t f;
- __asm __volatile(DOINT(0x15) "\n\t"
+ __asm volatile(DOINT(0x15) "\n\t"
"setc %b1\n\t"
"movzwl %%ax, %0\n\t"
"shll $16, %%ecx\n\t"
@@ -98,7 +98,7 @@ apm_disconnect(void)
{
register u_int16_t rv;
- __asm __volatile(DOINT(0x15) "\n\t"
+ __asm volatile(DOINT(0x15) "\n\t"
"setc %b0"
: "=a" (rv)
: "0" (APM_DISCONNECT), "b" (APM_DEV_APM_BIOS)
@@ -112,7 +112,7 @@ apm_connect(bios_apminfo_t *ai)
{
register u_int16_t f;
- __asm __volatile (DOINT(0x15) "\n\t"
+ __asm volatile (DOINT(0x15) "\n\t"
"setc %b1\n\t"
"movb %%ah, %h1\n\t"
"movzwl %%ax, %%eax\n\tshll $4, %0\n\t"
@@ -149,7 +149,7 @@ apm_connect(bios_apminfo_t *ai)
ai->apm_data_base, ai->apm_data_len);
#endif
/* inform apm bios about our driver version */
- __asm __volatile (DOINT(0x15) "\n\t"
+ __asm volatile (DOINT(0x15) "\n\t"
"setc %b1\n\t"
"movb %%ah, %h1"
: "=b" (f)
diff --git a/sys/arch/i386/stand/libsa/bioscons.c b/sys/arch/i386/stand/libsa/bioscons.c
index ff057733b6c..028bef396d2 100644
--- a/sys/arch/i386/stand/libsa/bioscons.c
+++ b/sys/arch/i386/stand/libsa/bioscons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioscons.c,v 1.34 2012/10/30 14:06:29 jsing Exp $ */
+/* $OpenBSD: bioscons.c,v 1.35 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -75,7 +75,7 @@ pc_getc(dev_t dev)
register int rv;
if (dev & 0x80) {
- __asm __volatile(DOINT(0x16) "; setnz %b0" : "=a" (rv) :
+ __asm volatile(DOINT(0x16) "; setnz %b0" : "=a" (rv) :
"0" (0x100) : "%ecx", "%edx", "cc" );
return (rv & 0xff);
}
@@ -85,11 +85,11 @@ pc_getc(dev_t dev)
* be necessary on (at least) the Intel Mac Mini.
*/
do {
- __asm __volatile(DOINT(0x16) "; setnz %b0" : "=a" (rv) :
+ __asm volatile(DOINT(0x16) "; setnz %b0" : "=a" (rv) :
"0" (0x100) : "%ecx", "%edx", "cc" );
} while ((rv & 0xff) == 0);
- __asm __volatile(DOINT(0x16) : "=a" (rv) : "0" (0x000) :
+ __asm volatile(DOINT(0x16) : "=a" (rv) : "0" (0x000) :
"%ecx", "%edx", "cc" );
return (rv & 0xff);
@@ -100,7 +100,7 @@ pc_getshifts(dev_t dev)
{
register int rv;
- __asm __volatile(DOINT(0x16) : "=a" (rv) : "0" (0x200) :
+ __asm volatile(DOINT(0x16) : "=a" (rv) : "0" (0x200) :
"%ecx", "%edx", "cc" );
return (rv & 0xff);
@@ -109,7 +109,7 @@ pc_getshifts(dev_t dev)
void
pc_putc(dev_t dev, int c)
{
- __asm __volatile(DOINT(0x10) : : "a" (c | 0xe00), "b" (1) :
+ __asm volatile(DOINT(0x10) : : "a" (c | 0xe00), "b" (1) :
"%ecx", "%edx", "cc" );
}
@@ -121,7 +121,7 @@ com_probe(struct consdev *cn)
register int i, n;
/* get equip. (9-11 # of coms) */
- __asm __volatile(DOINT(0x11) : "=a" (n) : : "%ecx", "%edx", "cc");
+ __asm volatile(DOINT(0x11) : "=a" (n) : : "%ecx", "%edx", "cc");
n >>= 9;
n &= 7;
for (i = 0; i < n; i++)
diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c
index fcc2681c09f..2e2911378fa 100644
--- a/sys/arch/i386/stand/libsa/biosdev.c
+++ b/sys/arch/i386/stand/libsa/biosdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.c,v 1.88 2013/12/28 02:40:41 jsing Exp $ */
+/* $OpenBSD: biosdev.c,v 1.89 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -76,7 +76,7 @@ biosdreset(int dev)
{
int rv;
- __asm __volatile (DOINT(0x13) "; setc %b0" : "=a" (rv)
+ __asm volatile (DOINT(0x13) "; setc %b0" : "=a" (rv)
: "0" (0), "d" (dev) : "%ecx", "cc");
return ((rv & 0xff)? rv >> 8 : 0);
@@ -99,7 +99,7 @@ bios_getdiskinfo(int dev, bios_diskinfo_t *pdi)
if (debug)
printf("getinfo: try #8, 0x%x, %p\n", dev, pdi);
#endif
- __asm __volatile (DOINT(0x13) "\n\t"
+ __asm volatile (DOINT(0x13) "\n\t"
"setc %b0; movzbl %h1, %1\n\t"
"movzbl %%cl, %3; andb $0x3f, %b3\n\t"
"xchgb %%cl, %%ch; rolb $2, %%ch"
@@ -142,7 +142,7 @@ bios_getdiskinfo(int dev, bios_diskinfo_t *pdi)
printf("getinfo: try #41, 0x%x\n", dev);
#endif
/* EDD support check */
- __asm __volatile(DOINT(0x13) "; setc %b0"
+ __asm volatile(DOINT(0x13) "; setc %b0"
: "=a" (rv), "=c" (bm)
: "0" (0x4100), "b" (0x55aa), "d" (dev) : "cc");
if (!(rv & 0xff) && (BIOS_regs.biosr_bx & 0xffff) == 0xaa55)
@@ -190,7 +190,7 @@ CHS_rw(int rw, int dev, int cyl, int head, int sect, int nsect, void *buf)
rw = rw == F_READ ? 2 : 3;
BIOS_regs.biosr_es = (u_int32_t)buf >> 4;
- __asm __volatile ("movb %b7, %h1\n\t"
+ __asm volatile ("movb %b7, %h1\n\t"
"movb %b6, %%dh\n\t"
"andl $0xf, %4\n\t"
/* cylinder; the highest 2 bits of cyl is in %cl */
@@ -232,7 +232,7 @@ EDD_rw(int rw, int dev, u_int32_t daddr, u_int32_t nblk, void *buf)
/* Call extended read/write (with disk packet) */
BIOS_regs.biosr_ds = (u_int32_t)&cb >> 4;
- __asm __volatile (DOINT(0x13) "; setc %b0" : "=a" (rv)
+ __asm volatile (DOINT(0x13) "; setc %b0" : "=a" (rv)
: "0" ((rw == F_READ)? 0x4200: 0x4300),
"d" (dev), "S" ((int) (&cb) & 0xf) : "%ecx", "cc");
return ((rv & 0xff)? rv >> 8 : 0);
diff --git a/sys/arch/i386/stand/libsa/biosprobe.c b/sys/arch/i386/stand/libsa/biosprobe.c
index fddb84bb78d..d0ee5fdf7b1 100644
--- a/sys/arch/i386/stand/libsa/biosprobe.c
+++ b/sys/arch/i386/stand/libsa/biosprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosprobe.c,v 1.4 2004/03/09 19:12:12 tom Exp $ */
+/* $OpenBSD: biosprobe.c,v 1.5 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 2002 Tobias Weingartner
@@ -42,7 +42,7 @@ getSYSCONFaddr(void)
u_int32_t status;
u_int8_t *vers;
- __asm __volatile(DOINT(0x15) "\n\t"
+ __asm volatile(DOINT(0x15) "\n\t"
"setc %%al\n\t"
: "=a" (status)
: "0" (0xC000)
@@ -68,7 +68,7 @@ getEBDAaddr(void)
if (!info)
return NULL;
- __asm __volatile(DOINT(0x15) "\n\t"
+ __asm volatile(DOINT(0x15) "\n\t"
"setc %%al"
: "=a" (status)
: "0" (0xC100)
diff --git a/sys/arch/i386/stand/libsa/cpuprobe.c b/sys/arch/i386/stand/libsa/cpuprobe.c
index 286a72cc7d9..335b2f46dc8 100644
--- a/sys/arch/i386/stand/libsa/cpuprobe.c
+++ b/sys/arch/i386/stand/libsa/cpuprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpuprobe.c,v 1.1 2004/06/26 05:19:37 tom Exp $ */
+/* $OpenBSD: cpuprobe.c,v 1.2 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove <tom.cosgrove@arches-consulting.com>
@@ -35,7 +35,7 @@ static char cpu_vendor[13]; /* 12 chars plus NUL term */
u_int32_t
cpuid(u_int32_t eax, u_int32_t *regs)
{
- __asm __volatile(
+ __asm volatile(
"cpuid\n\t"
"movl %%eax, 0(%2)\n\t"
"movl %%ebx, 4(%2)\n\t"
@@ -71,7 +71,7 @@ cpuprobe(void)
* does not support cpuid but which does allow the PSL_ID bit
* in eflags to be toggled.
*/
- __asm __volatile(
+ __asm volatile(
"pushfl\n\t"
"popl %2\n\t"
"xorl %2, %0\n\t"
diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c
index 10645562b64..aab27dbe97f 100644
--- a/sys/arch/i386/stand/libsa/memprobe.c
+++ b/sys/arch/i386/stand/libsa/memprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: memprobe.c,v 1.52 2013/03/21 21:51:00 deraadt Exp $ */
+/* $OpenBSD: memprobe.c,v 1.53 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -73,7 +73,7 @@ bios_E820(bios_memmap_t *mp)
do {
BIOS_regs.biosr_es = ((u_int)(mp) >> 4);
- __asm __volatile(DOINT(0x15) "; setc %b1"
+ __asm volatile(DOINT(0x15) "; setc %b1"
: "=a" (sig), "=d" (rc), "=b" (off)
: "0" (0xE820), "1" (0x534d4150), "b" (off),
"c" (sizeof(*mp)), "D" (((u_int)mp) & 0xf)
@@ -125,7 +125,7 @@ bios_E801(bios_memmap_t *mp)
return NULL;
/* We might have this call */
- __asm __volatile(DOINT(0x15) "; mov %%ax, %%si; setc %b0"
+ __asm volatile(DOINT(0x15) "; mov %%ax, %%si; setc %b0"
: "=a" (rc), "=S" (m1), "=b" (m2), "=c" (m3), "=d" (m4)
: "0" (0xE801));
@@ -166,7 +166,7 @@ bios_8800(bios_memmap_t *mp)
{
int rc, mem;
- __asm __volatile(DOINT(0x15) "; setc %b0"
+ __asm volatile(DOINT(0x15) "; setc %b0"
: "=c" (rc), "=a" (mem) : "a" (0x8800));
if (rc & 0xff)
@@ -194,7 +194,7 @@ bios_int12(bios_memmap_t *mp)
#ifdef DEBUG
printf("0x12 ");
#endif
- __asm __volatile(DOINT(0x12) : "=a" (mem) :: "%ecx", "%edx", "cc");
+ __asm volatile(DOINT(0x12) : "=a" (mem) :: "%ecx", "%edx", "cc");
/* Fill out a bios_memmap_t */
mp->addr = 0;
@@ -227,7 +227,7 @@ const u_int addrprobe_pat[] = {
static int
addrprobe(u_int kloc)
{
- __volatile u_int *loc;
+ volatile u_int *loc;
register u_int i, ret = 0;
u_int save[nitems(addrprobe_pat)];
diff --git a/sys/arch/i386/stand/libsa/pciprobe.c b/sys/arch/i386/stand/libsa/pciprobe.c
index 15c25c5c0e8..9854aa4cb5b 100644
--- a/sys/arch/i386/stand/libsa/pciprobe.c
+++ b/sys/arch/i386/stand/libsa/pciprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciprobe.c,v 1.9 2008/10/04 23:08:22 deraadt Exp $ */
+/* $OpenBSD: pciprobe.c,v 1.10 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -42,7 +42,7 @@ pciprobe(void)
u_int32_t entry32;
/* PCI BIOS v2.0c+ - Installation Check */
- __asm __volatile(DOINT(0x1A) "; shll $8,%2; setc %b2"
+ __asm volatile(DOINT(0x1A) "; shll $8,%2; setc %b2"
: "=a" (hw_chars), "=b" (rev), "=c" (rc),
"=d" (sig), "=D" (entry32)
: "0" (0xB101), "4" (0x0)
diff --git a/sys/arch/i386/stand/libsa/ps2probe.c b/sys/arch/i386/stand/libsa/ps2probe.c
index 898fe5cf54f..bd80f9472d7 100644
--- a/sys/arch/i386/stand/libsa/ps2probe.c
+++ b/sys/arch/i386/stand/libsa/ps2probe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ps2probe.c,v 1.1 2004/03/19 13:48:18 tom Exp $ */
+/* $OpenBSD: ps2probe.c,v 1.2 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -36,7 +36,7 @@ ps2probe(void)
char *p;
int r;
- __asm __volatile(DOINT(0x15) "\n\t"
+ __asm volatile(DOINT(0x15) "\n\t"
"setc %b0\n\t"
: "=a" (r), "=b" (p)
: "0" (0xc000)
diff --git a/sys/arch/i386/stand/libsa/time.c b/sys/arch/i386/stand/libsa/time.c
index 581e2f8b87e..ddcdc10c626 100644
--- a/sys/arch/i386/stand/libsa/time.c
+++ b/sys/arch/i386/stand/libsa/time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: time.c,v 1.17 2012/10/30 14:06:29 jsing Exp $ */
+/* $OpenBSD: time.c,v 1.18 2014/03/29 18:09:29 guenther Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -76,7 +76,7 @@ compute(int year, u_int8_t month, u_int8_t day, u_int8_t hour,
static int
bios_time_date(int f, u_int8_t *b)
{
- __asm __volatile(DOINT(0x1a) "\n\t"
+ __asm volatile(DOINT(0x1a) "\n\t"
"setc %b0\n\t"
"movb %%ch, 0(%2)\n\t"
"movb %%cl, 1(%2)\n\t"