diff options
author | marcel <marcel@FreeBSD.org> | 2008-04-25 16:09:03 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2008-04-25 16:09:03 +0000 |
commit | b14c656c51b11d04dfc49637147be87152663252 (patch) | |
tree | 17811aa282b538abeda050be79d716a57e9679de /sys | |
parent | fc2ca88c2cdb7b3edde2fb691db4e331f745518c (diff) | |
download | FreeBSD-src-b14c656c51b11d04dfc49637147be87152663252.zip FreeBSD-src-b14c656c51b11d04dfc49637147be87152663252.tar.gz |
Unbreak previous commit. While here, refactor the code a bit.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ia64/ia64/machdep.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index d6ed3c3..42b1394 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -142,7 +142,10 @@ extern vm_offset_t ksym_start, ksym_end; static void cpu_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); -struct msgbuf *msgbufp=0; +struct msgbuf *msgbufp = NULL; + +/* Other subsystems (e.g., ACPI) can hook this later. */ +void (*cpu_idle_hook)(void) = NULL; long Maxmem = 0; long realmem = 0; @@ -334,18 +337,15 @@ cpu_halt() efi_reset_system(); } -static void -cpu_idle_default(int busy) +void +cpu_idle(int busy) { struct ia64_pal_result res; - res = ia64_call_pal_static(PAL_HALT_LIGHT, 0, 0, 0); -} - -void -cpu_idle() -{ - (*cpu_idle_hook)(); + if (cpu_idle_hook != NULL) + (*cpu_idle_hook)(); + else + res = ia64_call_pal_static(PAL_HALT_LIGHT, 0, 0, 0); } int @@ -355,9 +355,6 @@ cpu_idle_wakeup(int cpu) return (0); } -/* Other subsystems (e.g., ACPI) can hook this later. */ -void (*cpu_idle_hook)(void) = cpu_idle_default; - void cpu_reset() { |