diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-20 09:59:35 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-31 03:35:46 -0400 |
commit | 0be6939422eb2f54df4b3d8763c569c6759c1a42 (patch) | |
tree | 0bfde8bc4c230f8a5f0f5f2651c8ebc366020124 | |
parent | 64fcbac1f38882d8ae82c44a1c2a676cfa5e79e1 (diff) |
x86: Remove mca bus ifdef from timer interrupt
MCA_bus is constant 0 when CONFIG_MCA=n. So the compiler removes that
code w/o needing an extra #ifdef
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/time_32.c | 18 | ||||
-rw-r--r-- | arch/x86/kernel/time_64.c | 9 |
2 files changed, 6 insertions, 21 deletions
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c index 7a26bcf887f6..ec729cdcfa3d 100644 --- a/arch/x86/kernel/time_32.c +++ b/arch/x86/kernel/time_32.c | |||
@@ -78,21 +78,9 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
78 | 78 | ||
79 | global_clock_event->event_handler(global_clock_event); | 79 | global_clock_event->event_handler(global_clock_event); |
80 | 80 | ||
81 | #ifdef CONFIG_MCA | 81 | /* MCA bus quirk: Acknowledge irq0 by setting bit 7 in port 0x61 */ |
82 | if (MCA_bus) { | 82 | if (MCA_bus) |
83 | /* The PS/2 uses level-triggered interrupts. You can't | 83 | outb_p(inb_p(0x61)| 0x80, 0x61); |
84 | turn them off, nor would you want to (any attempt to | ||
85 | enable edge-triggered interrupts usually gets intercepted by a | ||
86 | special hardware circuit). Hence we have to acknowledge | ||
87 | the timer interrupt. Through some incredibly stupid | ||
88 | design idea, the reset for IRQ 0 is done by setting the | ||
89 | high bit of the PPI port B (0x61). Note that some PS/2s, | ||
90 | notably the 55SX, work fine if this is removed. */ | ||
91 | |||
92 | u8 irq_v = inb_p(0x61); /* read the current state */ | ||
93 | outb_p(irq_v | 0x80, 0x61); /* reset the IRQ */ | ||
94 | } | ||
95 | #endif | ||
96 | 84 | ||
97 | return IRQ_HANDLED; | 85 | return IRQ_HANDLED; |
98 | } | 86 | } |
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c index 35e0a925da56..7db3912b8692 100644 --- a/arch/x86/kernel/time_64.c +++ b/arch/x86/kernel/time_64.c | |||
@@ -67,12 +67,9 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
67 | 67 | ||
68 | global_clock_event->event_handler(global_clock_event); | 68 | global_clock_event->event_handler(global_clock_event); |
69 | 69 | ||
70 | #ifdef CONFIG_MCA | 70 | /* MCA bus quirk: Acknowledge irq0 by setting bit 7 in port 0x61 */ |
71 | if (MCA_bus) { | 71 | if (MCA_bus) |
72 | u8 irq_v = inb_p(0x61); /* read the current state */ | 72 | outb_p(inb_p(0x61)| 0x80, 0x61); |
73 | outb_p(irq_v|0x80, 0x61); /* reset the IRQ */ | ||
74 | } | ||
75 | #endif | ||
76 | 73 | ||
77 | return IRQ_HANDLED; | 74 | return IRQ_HANDLED; |
78 | } | 75 | } |