diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2000-10-02 08:58:50 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2000-10-02 08:58:50 +0000 |
commit | cbe743540c12fba549b329ef283b665da0f57a90 (patch) | |
tree | 869a94a142125aa1f9ffbecc79d9b5ced1889ee1 /sys/i386 | |
parent | 4f4f698466ba9217372a68e49178f68c9419491e (diff) | |
download | FreeBSD-src-cbe743540c12fba549b329ef283b665da0f57a90.zip FreeBSD-src-cbe743540c12fba549b329ef283b665da0f57a90.tar.gz |
Fix StallOp implementaion. I've noticed that StallOp corresponds to
OsdSleepUsec(), SleepOp corresponds to OsdSleep() by reading ACPICA
source code.
- Add OsdSleepUsec() which uses DELAY() simply.
- Change unit of acpi_sleep() argument; microseconds to milliseconds.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/acpica_osd.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/i386/include/acpica_osd.h b/sys/i386/include/acpica_osd.h index cdb96b5..c0f1bea 100644 --- a/sys/i386/include/acpica_osd.h +++ b/sys/i386/include/acpica_osd.h @@ -32,6 +32,7 @@ #include <sys/systm.h> #include <sys/bus.h> #include <machine/bus.h> +#include <machine/clock.h> #include <machine/acpi_machdep.h> #include <machine/vmparam.h> #include <vm/vm.h> @@ -282,12 +283,12 @@ OsdWritePciCfgDword(UINT32 Bus, UINT32 DeviceFunction, UINT32 Register, UINT32 V } _ACPICA_INLINE_ ACPI_STATUS -OsdSleepUsec(UINT32 Microseconds) +OsdSleep(UINT32 Seconds, UINT32 Milliseconds) { int error; ACPI_STATUS status; - error = acpi_sleep(Microseconds); + error = acpi_sleep(Seconds * 1000 + Milliseconds); switch (error) { case 0: /* The running thread slept for the time specified */ @@ -308,8 +309,13 @@ OsdSleepUsec(UINT32 Microseconds) } _ACPICA_INLINE_ ACPI_STATUS -OsdSleep(UINT32 Seconds, UINT32 Milliseconds) +OsdSleepUsec(UINT32 Microseconds) { - return OsdSleepUsec(Seconds * 1000000L + Milliseconds * 1000); + if (Microseconds == 0) { + return (AE_BAD_PARAMETER); + } + + DELAY(Microseconds); + return (AE_OK); } |