diff options
author | jhb <jhb@FreeBSD.org> | 2003-06-07 14:34:18 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-06-07 14:34:18 +0000 |
commit | d000b6db794ebebad8753aed4cf69cfecb55ad90 (patch) | |
tree | 5f8ad0921382f91aa8ac237ac8f63f649100db98 /sys/i386 | |
parent | 727d06d19916eec270c577b813a90df5c64b132a (diff) | |
download | FreeBSD-src-d000b6db794ebebad8753aed4cf69cfecb55ad90.zip FreeBSD-src-d000b6db794ebebad8753aed4cf69cfecb55ad90.tar.gz |
Reinstate the bug fix in revision 1.2 as it is correct. The errors I saw
on my laptop after this change were the result of a bug in the ACPICA code.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/acpica_machdep.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/i386/include/acpica_machdep.h b/sys/i386/include/acpica_machdep.h index 2624e63..a59cfe1 100644 --- a/sys/i386/include/acpica_machdep.h +++ b/sys/i386/include/acpica_machdep.h @@ -72,29 +72,27 @@ */ #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - int dummy; \ - asm("1: movl (%1),%%eax;" \ + asm("1: movl %1,%%eax;" \ "movl %%eax,%%edx;" \ "andl %2,%%edx;" \ "btsl $0x1,%%edx;" \ "adcl $0x0,%%edx;" \ - "lock; cmpxchgl %%edx,(%1);" \ + "lock; cmpxchgl %%edx,%1;" \ "jnz 1b;" \ "cmpb $0x3,%%dl;" \ "sbbl %%eax,%%eax" \ - :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \ + : "=a" (Acq), "+m" (GLptr) : "i" (~1L) : "edx"); \ } while(0) #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - int dummy; \ - asm("1: movl (%1),%%eax;" \ + asm("1: movl %1,%%eax;" \ "movl %%eax,%%edx;" \ "andl %2,%%edx;" \ - "lock; cmpxchgl %%edx,(%1);" \ + "lock; cmpxchgl %%edx,%1;" \ "jnz 1b;" \ "andl $0x1,%%eax" \ - :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \ + : "=a" (Acq), "+m" (GLptr) : "i" (~3L) : "edx"); \ } while(0) |