Эх сурвалжийг харах

x86: apic - unify local_apic_timer_interrupt

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cyrill Gorcunov 17 жил өмнө
parent
commit
0b23e8cf55

+ 4 - 0
arch/x86/kernel/apic_32.c

@@ -685,7 +685,11 @@ static void local_apic_timer_interrupt(void)
 	/*
 	/*
 	 * the NMI deadlock-detector uses this.
 	 * the NMI deadlock-detector uses this.
 	 */
 	 */
+#ifdef CONFIG_X86_64
+	add_pda(apic_timer_irqs, 1);
+#else
 	per_cpu(irq_stat, cpu).apic_timer_irqs++;
 	per_cpu(irq_stat, cpu).apic_timer_irqs++;
+#endif
 
 
 	evt->event_handler(evt);
 	evt->event_handler(evt);
 }
 }

+ 4 - 0
arch/x86/kernel/apic_64.c

@@ -567,7 +567,11 @@ static void local_apic_timer_interrupt(void)
 	/*
 	/*
 	 * the NMI deadlock-detector uses this.
 	 * the NMI deadlock-detector uses this.
 	 */
 	 */
+#ifdef CONFIG_X86_64
 	add_pda(apic_timer_irqs, 1);
 	add_pda(apic_timer_irqs, 1);
+#else
+	per_cpu(irq_stat, cpu).apic_timer_irqs++;
+#endif
 
 
 	evt->event_handler(evt);
 	evt->event_handler(evt);
 }
 }