Unbreak previous commit. While here, refactor the code a bit.

This commit is contained in:
Marcel Moolenaar 2008-04-25 16:09:03 +00:00
parent 26b77ff3b1
commit fe39c042ca
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178494

View File

@ -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()
{