aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2008-04-25 16:09:03 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2008-04-25 16:09:03 +0000
commitfe39c042ca35bbf5c167e18d99ece78323ad9494 (patch)
tree17811aa282b538abeda050be79d716a57e9679de /sys
parent26b77ff3b1036bafaa28a48ab6e2b7900391ba50 (diff)
downloadsrc-fe39c042ca35bbf5c167e18d99ece78323ad9494.tar.gz
src-fe39c042ca35bbf5c167e18d99ece78323ad9494.zip
Unbreak previous commit. While here, refactor the code a bit.
Notes
Notes: svn path=/head/; revision=178494
Diffstat (limited to 'sys')
-rw-r--r--sys/ia64/ia64/machdep.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index d6ed3c328667..42b13942f6e3 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()
{