提交 33c053d0 编写于 作者: G Glauber Costa 提交者: Ingo Molnar

x86: wrap MCA_bus test around an ifdef

Only test for MCA_bus if support for MCA is compiled in.
Also, for x86_64, write the code inside the conditional
for consistency with i386. It won't bite us, since it'll
probably never select CONFIG_MCA anyway.
Signed-off-by: NGlauber Costa <gcosta@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 2c460d0b
...@@ -94,6 +94,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) ...@@ -94,6 +94,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
do_timer_interrupt_hook(); do_timer_interrupt_hook();
#ifdef CONFIG_MCA
if (MCA_bus) { if (MCA_bus) {
/* The PS/2 uses level-triggered interrupts. You can't /* The PS/2 uses level-triggered interrupts. You can't
turn them off, nor would you want to (any attempt to turn them off, nor would you want to (any attempt to
...@@ -107,6 +108,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) ...@@ -107,6 +108,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
u8 irq_v = inb_p( 0x61 ); /* read the current state */ u8 irq_v = inb_p( 0x61 ); /* read the current state */
outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */ outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */
} }
#endif
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/mca.h>
#include <asm/i8253.h> #include <asm/i8253.h>
#include <asm/hpet.h> #include <asm/hpet.h>
...@@ -54,6 +55,13 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) ...@@ -54,6 +55,13 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
global_clock_event->event_handler(global_clock_event); global_clock_event->event_handler(global_clock_event);
#ifdef CONFIG_MCA
if (MCA_bus) {
u8 irq_v = inb_p(0x61); /* read the current state */
outb_p(irq_v|0x80, 0x61); /* reset the IRQ */
}
#endif
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册