Defer initializing machine checks for the boot CPU until the local APIC is

fully configured.

MFC after:	1 month
This commit is contained in:
John Baldwin 2010-05-28 17:50:24 +00:00
parent 9be223a169
commit 0c86af8162
4 changed files with 26 additions and 2 deletions

View File

@ -285,7 +285,6 @@ cpu_startup(dummy)
vm_pager_bufferinit();
cpu_setregs();
mca_init();
}
/*

View File

@ -789,6 +789,19 @@ mca_init(void)
load_cr4(rcr4() | CR4_MCE);
}
/*
* The machine check registers for the BSP cannot be initialized until
* the local APIC is initialized. This happens at SI_SUB_CPU,
* SI_ORDER_SECOND.
*/
static void
mca_init_bsp(void *arg __unused)
{
mca_init();
}
SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL);
/* Called when a machine check exception fires. */
int
mca_intr(void)

View File

@ -328,7 +328,6 @@ cpu_startup(dummy)
#ifndef XEN
cpu_setregs();
#endif
mca_init();
}
/*

View File

@ -812,6 +812,19 @@ mca_init(void)
load_cr4(rcr4() | CR4_MCE);
}
/*
* The machine check registers for the BSP cannot be initialized until
* the local APIC is initialized. This happens at SI_SUB_CPU,
* SI_ORDER_SECOND.
*/
static void
mca_init_bsp(void *arg __unused)
{
mca_init();
}
SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL);
/* Called when a machine check exception fires. */
int
mca_intr(void)