diff options
author | jhb <jhb@FreeBSD.org> | 2003-06-03 18:44:31 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-06-03 18:44:31 +0000 |
commit | 7f19d2eef4319aca28ddf895522373fa8795f488 (patch) | |
tree | c5623af04bc26a8d1b28e54b08da131496f2feeb /sys/i386 | |
parent | 02cd5660622a8f693c98143cd9ac418f4ffa373e (diff) | |
download | FreeBSD-src-7f19d2eef4319aca28ddf895522373fa8795f488.zip FreeBSD-src-7f19d2eef4319aca28ddf895522373fa8795f488.tar.gz |
Bah, revert the previous commit for the time being due to inadequate testing
on my part. The output asm looks correct with the previous commit in place
and it works on amd64, but on my laptop I got a spew of AE_BAD_PARAMETER
errors trying to unlock the acpi global lock.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/acpica_machdep.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/i386/include/acpica_machdep.h b/sys/i386/include/acpica_machdep.h index a59cfe1..2624e63 100644 --- a/sys/i386/include/acpica_machdep.h +++ b/sys/i386/include/acpica_machdep.h @@ -72,27 +72,29 @@ */ #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - asm("1: movl %1,%%eax;" \ + int dummy; \ + 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), "+m" (GLptr) : "i" (~1L) : "edx"); \ + :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \ } while(0) #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - asm("1: movl %1,%%eax;" \ + int dummy; \ + 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), "+m" (GLptr) : "i" (~3L) : "edx"); \ + :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \ } while(0) |