aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/time_32.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-20 15:54:21 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-08-31 09:35:46 +0200
commit64fcbac1f38882d8ae82c44a1c2a676cfa5e79e1 (patch)
treeec1206322a8ca2a775db5ca552d5666b968be77c /arch/x86/kernel/time_32.c
parentx86: Prepare unification of time_32/64.c (diff)
downloadlinux-dev-64fcbac1f38882d8ae82c44a1c2a676cfa5e79e1.tar.xz
linux-dev-64fcbac1f38882d8ae82c44a1c2a676cfa5e79e1.zip
x86: Simplify timer_ack magic in time_32.c
Let the compiler optimize the timer_ack magic away in the 32bit timer interrupt and put the same code into time_64.c. It's optimized out for CONFIG_X86_IO_APIC on 32bit and for 64bit because timer_ack is const 0 in both cases. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/time_32.c')
-rw-r--r--arch/x86/kernel/time_32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c
index acbaefd61e8e..7a26bcf887f6 100644
--- a/arch/x86/kernel/time_32.c
+++ b/arch/x86/kernel/time_32.c
@@ -23,7 +23,9 @@
#include <asm/time.h>
#include <asm/nmi.h>
+#if defined(CONFIG_X86_32) && defined(CONFIG_X86_IO_APIC)
int timer_ack;
+#endif
unsigned long profile_pc(struct pt_regs *regs)
{
@@ -60,7 +62,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
/* Keep nmi watchdog up to date */
inc_irq_stat(irq0_irqs);
-#ifdef CONFIG_X86_IO_APIC
+ /* Optimized out for !IO_APIC and x86_64 */
if (timer_ack) {
/*
* Subtle, when I/O APICs are used we have to ack timer IRQ
@@ -73,7 +75,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
inb(PIC_MASTER_POLL);
spin_unlock(&i8259A_lock);
}
-#endif
global_clock_event->event_handler(global_clock_event);