Page MenuHomeFreeBSD

D33669.id100617.diff
No OneTemporary

D33669.id100617.diff

Index: sys/x86/x86/local_apic.c
===================================================================
--- sys/x86/x86/local_apic.c
+++ sys/x86/x86/local_apic.c
@@ -913,6 +913,12 @@
struct lapic *la;
register_t intr;
+#ifdef DEV_ATPIC
+ /* Fail if the local APIC is not present. */
+ if (!x2apic_mode && lapic_map == NULL)
+ return;
+#endif
+
intr = intr_disable();
la = &lapics[lapic_id()];
@@ -932,9 +938,11 @@
#ifdef HWPMC_HOOKS
u_int32_t maxlvt;
+#ifdef DEV_ATPIC
/* Fail if the local APIC is not present. */
if (!x2apic_mode && lapic_map == NULL)
return (0);
+#endif
/* Fail if the PMC LVT is not present. */
maxlvt = (lapic_read32(LAPIC_VERSION) & APIC_VER_MAXLVT) >> MAXLVTSHIFT;
@@ -971,9 +979,11 @@
#ifdef HWPMC_HOOKS
u_int32_t maxlvt;
+#ifdef DEV_ATPIC
/* Fail if the local APIC is not present. */
if (!x2apic_mode && lapic_map == NULL)
return;
+#endif
/* Fail if the PMC LVT is not present. */
maxlvt = (lapic_read32(LAPIC_VERSION) & APIC_VER_MAXLVT) >> MAXLVTSHIFT;

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 26, 12:25 AM (7 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28998001
Default Alt Text
D33669.id100617.diff (1 KB)

Event Timeline