diff options
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index a3c7adb06b78..b5801c311846 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -1790,6 +1790,9 @@ void smp_perf_pending_interrupt(struct pt_regs *regs) | |||
1790 | void set_perf_event_pending(void) | 1790 | void set_perf_event_pending(void) |
1791 | { | 1791 | { |
1792 | #ifdef CONFIG_X86_LOCAL_APIC | 1792 | #ifdef CONFIG_X86_LOCAL_APIC |
1793 | if (!x86_pmu.apic || !x86_pmu_initialized()) | ||
1794 | return; | ||
1795 | |||
1793 | apic->send_IPI_self(LOCAL_PENDING_VECTOR); | 1796 | apic->send_IPI_self(LOCAL_PENDING_VECTOR); |
1794 | #endif | 1797 | #endif |
1795 | } | 1798 | } |