perf_counter/x86: Remove the IRQ (non-NMI) handling bits
authorYong Wang <yong.y.wang@linux.intel.com>
Wed, 3 Jun 2009 05:12:55 +0000 (13:12 +0800)
committerIngo Molnar <mingo@elte.hu>
Wed, 3 Jun 2009 07:53:34 +0000 (09:53 +0200)
Remove the IRQ (non-NMI) handling bits as NMI will be used always.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <20090603051255.GA2791@ywang-moblin2.bj.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/entry_arch.h
arch/x86/include/asm/hw_irq.h
arch/x86/include/asm/irq_vectors.h
arch/x86/kernel/cpu/perf_counter.c
arch/x86/kernel/entry_64.S
arch/x86/kernel/irqinit_32.c
arch/x86/kernel/irqinit_64.c

index fe24d280249009df115a105e89a54d3e67e926b9..d750a10ccad663fe0e8cd5df1d5e5778e12e0d90 100644 (file)
@@ -49,7 +49,6 @@ BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR)
 BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR)
 
 #ifdef CONFIG_PERF_COUNTERS
-BUILD_INTERRUPT(perf_counter_interrupt, LOCAL_PERF_VECTOR)
 BUILD_INTERRUPT(perf_pending_interrupt, LOCAL_PENDING_VECTOR)
 #endif
 
index 7309c0ad6902347d30a0e81bc2f5aa6a32afad40..4b4921d7a28ed4a1f40fd6d0583eb2e3a6032aaf 100644 (file)
@@ -29,7 +29,6 @@
 extern void apic_timer_interrupt(void);
 extern void generic_interrupt(void);
 extern void error_interrupt(void);
-extern void perf_counter_interrupt(void);
 extern void perf_pending_interrupt(void);
 
 extern void spurious_interrupt(void);
index 545bb811ccb52cded56d322a528e596779baa7b6..4492e19f83913a32a93af82bc76ca548d3abc807 100644 (file)
  */
 #define LOCAL_TIMER_VECTOR             0xef
 
-/*
- * Performance monitoring interrupt vector:
- */
-#define LOCAL_PERF_VECTOR              0xee
-
 /*
  * Generic system vector for platform specific use
  */
index e16e8c13132fd37274a2f27b4843003dcfcfa755..12cc05ed9f4886953e9f2b37661a1b6ec3c121fa 100644 (file)
@@ -40,7 +40,7 @@ struct cpu_hw_counters {
 struct x86_pmu {
        const char      *name;
        int             version;
-       int             (*handle_irq)(struct pt_regs *, int);
+       int             (*handle_irq)(struct pt_regs *);
        void            (*disable_all)(void);
        void            (*enable_all)(void);
        void            (*enable)(struct hw_perf_counter *, int);
@@ -755,7 +755,7 @@ static void intel_pmu_reset(void)
  * This handler is triggered by the local APIC, so the APIC IRQ handling
  * rules apply:
  */
-static int intel_pmu_handle_irq(struct pt_regs *regs, int nmi)
+static int intel_pmu_handle_irq(struct pt_regs *regs)
 {
        struct cpu_hw_counters *cpuc;
        struct cpu_hw_counters;
@@ -794,7 +794,7 @@ again:
                if (!intel_pmu_save_and_restart(counter))
                        continue;
 
-               if (perf_counter_overflow(counter, nmi, regs, 0))
+               if (perf_counter_overflow(counter, 1, regs, 0))
                        intel_pmu_disable_counter(&counter->hw, bit);
        }
 
@@ -812,7 +812,7 @@ again:
        return 1;
 }
 
-static int amd_pmu_handle_irq(struct pt_regs *regs, int nmi)
+static int amd_pmu_handle_irq(struct pt_regs *regs)
 {
        int cpu, idx, handled = 0;
        struct cpu_hw_counters *cpuc;
@@ -840,22 +840,13 @@ static int amd_pmu_handle_irq(struct pt_regs *regs, int nmi)
                if (!x86_perf_counter_set_period(counter, hwc, idx))
                        continue;
 
-               if (perf_counter_overflow(counter, nmi, regs, 0))
+               if (perf_counter_overflow(counter, 1, regs, 0))
                        amd_pmu_disable_counter(hwc, idx);
        }
 
        return handled;
 }
 
-void smp_perf_counter_interrupt(struct pt_regs *regs)
-{
-       irq_enter();
-       apic_write(APIC_LVTPC, LOCAL_PERF_VECTOR);
-       ack_APIC_irq();
-       x86_pmu.handle_irq(regs, 0);
-       irq_exit();
-}
-
 void smp_perf_pending_interrupt(struct pt_regs *regs)
 {
        irq_enter();
@@ -910,7 +901,7 @@ perf_counter_nmi_handler(struct notifier_block *self,
         * If the first NMI handles both, the latter will be empty and daze
         * the CPU.
         */
-       x86_pmu.handle_irq(regs, 1);
+       x86_pmu.handle_irq(regs);
 
        return NOTIFY_STOP;
 }
index 891004619142581e8bb5f89ad8c07afa0d81698a..7985c010f8ac95b34baa47b28e0c6e518422e986 100644 (file)
@@ -1026,8 +1026,6 @@ apicinterrupt SPURIOUS_APIC_VECTOR \
        spurious_interrupt smp_spurious_interrupt
 
 #ifdef CONFIG_PERF_COUNTERS
-apicinterrupt LOCAL_PERF_VECTOR \
-       perf_counter_interrupt smp_perf_counter_interrupt
 apicinterrupt LOCAL_PENDING_VECTOR \
        perf_pending_interrupt smp_perf_pending_interrupt
 #endif
index 3190a6b961e64d933976fb4d249c26c33315eb37..205bdd880d31efb2cac092370629e82f19570963 100644 (file)
@@ -165,7 +165,6 @@ static void __init apic_intr_init(void)
        alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
        alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
 # ifdef CONFIG_PERF_COUNTERS
-       alloc_intr_gate(LOCAL_PERF_VECTOR, perf_counter_interrupt);
        alloc_intr_gate(LOCAL_PENDING_VECTOR, perf_pending_interrupt);
 # endif
 
index 53ceb26f80ff3f5118495d2a3d8291519d38d869..fa6ef692000f0a61aa428b8bf87ac7c12f740f12 100644 (file)
@@ -155,7 +155,6 @@ static void __init apic_intr_init(void)
 
        /* Performance monitoring interrupt: */
 #ifdef CONFIG_PERF_COUNTERS
-       alloc_intr_gate(LOCAL_PERF_VECTOR, perf_counter_interrupt);
        alloc_intr_gate(LOCAL_PENDING_VECTOR, perf_pending_interrupt);
 #endif
 }