提交 1a239894 编写于 作者: F Finn Thain 提交者: Linus Torvalds

[PATCH] m68k: m68k mac VIA2 fixes and cleanups

Some fixes and cleanups from the linux-mac68k repo.  Fix mac_esp by clearing
the VIA2 SCSI IRQ flag before the SCSI IRQ handler is invoked.  Also fix a
race condition caused by unmasking a nubus slot IRQ then setting the relevant
nubus_active bit.
Signed-off-by: NFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 6d2f16a8
...@@ -89,24 +89,11 @@ extern void mac_debugging_long(int, long); ...@@ -89,24 +89,11 @@ extern void mac_debugging_long(int, long);
static void mac_get_model(char *str); static void mac_get_model(char *str);
void mac_bang(int irq, void *vector, struct pt_regs *p)
{
printk(KERN_INFO "Resetting ...\n");
mac_reset();
}
static void mac_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)) static void mac_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *))
{ {
via_init_clock(vector); via_init_clock(vector);
} }
#if 0
void mac_waitbut (void)
{
;
}
#endif
extern irqreturn_t mac_default_handler(int, void *, struct pt_regs *); extern irqreturn_t mac_default_handler(int, void *, struct pt_regs *);
irqreturn_t (*mac_handlers[8])(int, void *, struct pt_regs *)= irqreturn_t (*mac_handlers[8])(int, void *, struct pt_regs *)=
......
...@@ -216,7 +216,6 @@ static void scc_irq_disable(int); ...@@ -216,7 +216,6 @@ static void scc_irq_disable(int);
* console_loglevel determines NMI handler function * console_loglevel determines NMI handler function
*/ */
extern irqreturn_t mac_bang(int, void *, struct pt_regs *);
irqreturn_t mac_nmi_handler(int, void *, struct pt_regs *); irqreturn_t mac_nmi_handler(int, void *, struct pt_regs *);
irqreturn_t mac_debug_handler(int, void *, struct pt_regs *); irqreturn_t mac_debug_handler(int, void *, struct pt_regs *);
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/ide.h> #include <linux/ide.h>
#include <asm/traps.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include <asm/macintosh.h> #include <asm/macintosh.h>
#include <asm/macints.h> #include <asm/macints.h>
...@@ -71,7 +70,6 @@ void via_irq_enable(int irq); ...@@ -71,7 +70,6 @@ void via_irq_enable(int irq);
void via_irq_disable(int irq); void via_irq_disable(int irq);
void via_irq_clear(int irq); void via_irq_clear(int irq);
extern irqreturn_t mac_bang(int, void *, struct pt_regs *);
extern irqreturn_t mac_scc_dispatch(int, void *, struct pt_regs *); extern irqreturn_t mac_scc_dispatch(int, void *, struct pt_regs *);
extern int oss_present; extern int oss_present;
...@@ -212,11 +210,6 @@ void __init via_init(void) ...@@ -212,11 +210,6 @@ void __init via_init(void)
break; break;
} }
#else #else
/* The alernate IRQ mapping seems to just not work. Anyone with a */
/* supported machine is welcome to take a stab at fixing it. It */
/* _should_ work on the following Quadras: 610,650,700,800,900,950 */
/* - 1999-06-12 (jmt) */
via_alt_mapping = 0; via_alt_mapping = 0;
#endif #endif
...@@ -270,12 +263,6 @@ void __init via_register_interrupts(void) ...@@ -270,12 +263,6 @@ void __init via_register_interrupts(void)
cpu_request_irq(IRQ_AUTO_1, via1_irq, cpu_request_irq(IRQ_AUTO_1, via1_irq,
IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1",
(void *) via1); (void *) via1);
#if 0 /* interferes with serial on some machines */
if (!psc_present) {
cpu_request_irq(IRQ_AUTO_6, mac_bang, IRQ_FLG_LOCK,
"Off Switch", mac_bang);
}
#endif
} }
cpu_request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, cpu_request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST,
"via2", (void *) via2); "via2", (void *) via2);
...@@ -471,8 +458,8 @@ irqreturn_t via2_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -471,8 +458,8 @@ irqreturn_t via2_irq(int irq, void *dev_id, struct pt_regs *regs)
for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
if (events & irq_bit) { if (events & irq_bit) {
via2[gIER] = irq_bit; via2[gIER] = irq_bit;
mac_do_irq_list(VIA2_SOURCE_BASE + i, regs);
via2[gIFR] = irq_bit | rbv_clear; via2[gIFR] = irq_bit | rbv_clear;
mac_do_irq_list(VIA2_SOURCE_BASE + i, regs);
via2[gIER] = irq_bit | 0x80; via2[gIER] = irq_bit | 0x80;
} }
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -529,6 +516,7 @@ void via_irq_enable(int irq) { ...@@ -529,6 +516,7 @@ void via_irq_enable(int irq) {
} }
via2[gIER] = irq_bit | 0x80; via2[gIER] = irq_bit | 0x80;
} else if (irq_src == 7) { } else if (irq_src == 7) {
nubus_active |= irq_bit;
if (rbv_present) { if (rbv_present) {
/* enable the slot interrupt. SIER works like IER. */ /* enable the slot interrupt. SIER works like IER. */
via2[rSIER] = IER_SET_BIT(irq_idx); via2[rSIER] = IER_SET_BIT(irq_idx);
...@@ -550,7 +538,6 @@ void via_irq_enable(int irq) { ...@@ -550,7 +538,6 @@ void via_irq_enable(int irq) {
} }
} }
} }
nubus_active |= irq_bit;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册