summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/i86pc/io/mp_platform_common.c16
-rw-r--r--usr/src/uts/i86pc/io/pcplusmp/apic.c24
2 files changed, 22 insertions, 18 deletions
diff --git a/usr/src/uts/i86pc/io/mp_platform_common.c b/usr/src/uts/i86pc/io/mp_platform_common.c
index 54a76687f7..ebf20e9f18 100644
--- a/usr/src/uts/i86pc/io/mp_platform_common.c
+++ b/usr/src/uts/i86pc/io/mp_platform_common.c
@@ -636,22 +636,6 @@ acpi_probe(char *modname)
if (!apicadr)
return (PSM_FAILURE);
- /*
- * We don't enable x2APIC when Solaris is running under xVM.
- */
-#if !defined(__xpv)
- if (apic_detect_x2apic()) {
- apic_enable_x2apic();
- }
-#endif
-
- /*
- * Check for directed-EOI capability in the local APIC.
- */
- if (apic_directed_EOI_supported() == 1) {
- apic_set_directed_EOI_handler();
- }
-
id = apic_reg_ops->apic_read(APIC_LID_REG);
local_ids[0] = (uchar_t)(id >> 24);
apic_nproc = index = 1;
diff --git a/usr/src/uts/i86pc/io/pcplusmp/apic.c b/usr/src/uts/i86pc/io/pcplusmp/apic.c
index 79f0ec2e00..df0000ba7b 100644
--- a/usr/src/uts/i86pc/io/pcplusmp/apic.c
+++ b/usr/src/uts/i86pc/io/pcplusmp/apic.c
@@ -756,7 +756,7 @@ apic_picinit(void)
uint_t isr;
/*
- * initialize interrupt remapping before apic
+ * Initialize and enable interrupt remapping before apic
* hardware initialization
*/
apic_intrr_init(apic_mode);
@@ -796,6 +796,13 @@ apic_picinit(void)
"pcplusmp NMI handler", (caddr_t)NULL))
cmn_err(CE_WARN, "pcplusmp: Unable to add nmi handler");
+ /*
+ * Check for directed-EOI capability in the local APIC.
+ */
+ if (apic_directed_EOI_supported() == 1) {
+ apic_set_directed_EOI_handler();
+ }
+
apic_init_intr();
/* enable apic mode if imcr present */
@@ -2589,6 +2596,12 @@ apic_intrr_init(int apic_mode)
int suppress_brdcst_eoi = 0;
if (psm_vt_ops != NULL) {
+ /*
+ * Since X2APIC requires the use of interrupt remapping
+ * (though this is not documented explicitly in the Intel
+ * documentation (yet)), initialize interrupt remapping
+ * support before initializing the X2APIC unit.
+ */
if (((apic_intrr_ops_t *)psm_vt_ops)->apic_intrr_init(apic_mode)
== DDI_SUCCESS) {
apic_vt_ops = psm_vt_ops;
@@ -2600,10 +2613,17 @@ apic_intrr_init(int apic_mode)
*/
if (apic_directed_EOI_supported() == 0) {
suppress_brdcst_eoi = 1;
- apic_set_directed_EOI_handler();
}
apic_vt_ops->apic_intrr_enable(suppress_brdcst_eoi);
+
+ if (apic_detect_x2apic()) {
+ apic_enable_x2apic();
+ }
+
+ if (apic_directed_EOI_supported() == 0) {
+ apic_set_directed_EOI_handler();
+ }
}
}
}