Commit 217f6710 authored by Finn Thain's avatar Finn Thain Committed by Linus Torvalds

m68k: Mac IRQ cleanup

There are no slow IRQs on Macs since Roman Zippel's IRQ reorganisation that
went into 2.6.16 and removed mac_irq_list[] and the do_mac_irq_list()
dispatcher. (They were implemented in do_mac_irq_list() by lowering the IPL.)
Hence there's no more use for mutual exclusion in the Mac interrupt
dispatchers. Remove it.
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cd713ddc
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
/* #define DEBUG_BABOON */ /* #define DEBUG_BABOON */
/* #define DEBUG_IRQS */ /* #define DEBUG_IRQS */
int baboon_present,baboon_active; int baboon_present;
volatile struct baboon *baboon; volatile struct baboon *baboon;
irqreturn_t baboon_irq(int, void *); irqreturn_t baboon_irq(int, void *);
...@@ -45,7 +45,6 @@ void __init baboon_init(void) ...@@ -45,7 +45,6 @@ void __init baboon_init(void)
baboon = (struct baboon *) BABOON_BASE; baboon = (struct baboon *) BABOON_BASE;
baboon_present = 1; baboon_present = 1;
baboon_active = 0;
printk("Baboon detected at %p\n", baboon); printk("Baboon detected at %p\n", baboon);
} }
...@@ -70,9 +69,9 @@ irqreturn_t baboon_irq(int irq, void *dev_id) ...@@ -70,9 +69,9 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
unsigned char events; unsigned char events;
#ifdef DEBUG_IRQS #ifdef DEBUG_IRQS
printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X active %02X\n", printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X\n",
(uint) baboon->mb_control, (uint) baboon->mb_ifr, (uint) baboon->mb_control, (uint) baboon->mb_ifr,
(uint) baboon->mb_status, baboon_active); (uint) baboon->mb_status);
#endif #endif
if (!(events = baboon->mb_ifr & 0x07)) if (!(events = baboon->mb_ifr & 0x07))
...@@ -81,11 +80,9 @@ irqreturn_t baboon_irq(int irq, void *dev_id) ...@@ -81,11 +80,9 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
irq_num = IRQ_BABOON_0; irq_num = IRQ_BABOON_0;
irq_bit = 1; irq_bit = 1;
do { do {
if (events & irq_bit/* & baboon_active*/) { if (events & irq_bit) {
baboon_active &= ~irq_bit;
baboon->mb_ifr &= ~irq_bit; baboon->mb_ifr &= ~irq_bit;
m68k_handle_int(irq_num); m68k_handle_int(irq_num);
baboon_active |= irq_bit;
} }
irq_bit <<= 1; irq_bit <<= 1;
irq_num++; irq_num++;
...@@ -99,21 +96,18 @@ irqreturn_t baboon_irq(int irq, void *dev_id) ...@@ -99,21 +96,18 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
} }
void baboon_irq_enable(int irq) { void baboon_irq_enable(int irq) {
int irq_idx = IRQ_IDX(irq);
#ifdef DEBUG_IRQUSE #ifdef DEBUG_IRQUSE
printk("baboon_irq_enable(%d)\n", irq); printk("baboon_irq_enable(%d)\n", irq);
#endif #endif
baboon_active |= (1 << irq_idx); /* FIXME: figure out how to mask and unmask baboon interrupt sources */
enable_irq(IRQ_NUBUS_C);
} }
void baboon_irq_disable(int irq) { void baboon_irq_disable(int irq) {
int irq_idx = IRQ_IDX(irq);
#ifdef DEBUG_IRQUSE #ifdef DEBUG_IRQUSE
printk("baboon_irq_disable(%d)\n", irq); printk("baboon_irq_disable(%d)\n", irq);
#endif #endif
baboon_active &= ~(1 << irq_idx); disable_irq(IRQ_NUBUS_C);
} }
void baboon_irq_clear(int irq) { void baboon_irq_clear(int irq) {
......
...@@ -112,10 +112,8 @@ irqreturn_t oss_irq(int irq, void *dev_id) ...@@ -112,10 +112,8 @@ irqreturn_t oss_irq(int irq, void *dev_id)
oss->irq_pending &= ~OSS_IP_SOUND; oss->irq_pending &= ~OSS_IP_SOUND;
/* FIXME: call sound handler */ /* FIXME: call sound handler */
} else if (events & OSS_IP_SCSI) { } else if (events & OSS_IP_SCSI) {
oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED;
oss->irq_pending &= ~OSS_IP_SCSI; oss->irq_pending &= ~OSS_IP_SCSI;
m68k_handle_int(IRQ_MAC_SCSI); m68k_handle_int(IRQ_MAC_SCSI);
oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI;
} else { } else {
/* FIXME: error check here? */ /* FIXME: error check here? */
} }
...@@ -149,10 +147,8 @@ irqreturn_t oss_nubus_irq(int irq, void *dev_id) ...@@ -149,10 +147,8 @@ irqreturn_t oss_nubus_irq(int irq, void *dev_id)
--i; --i;
irq_bit >>= 1; irq_bit >>= 1;
if (events & irq_bit) { if (events & irq_bit) {
oss->irq_level[i] = OSS_IRQLEV_DISABLED;
oss->irq_pending &= ~irq_bit; oss->irq_pending &= ~irq_bit;
m68k_handle_int(NUBUS_SOURCE_BASE + i); m68k_handle_int(NUBUS_SOURCE_BASE + i);
oss->irq_level[i] = OSS_IRQLEV_NUBUS;
} }
} while(events & (irq_bit - 1)); } while(events & (irq_bit - 1));
return IRQ_HANDLED; return IRQ_HANDLED;
......
...@@ -147,10 +147,8 @@ irqreturn_t psc_irq(int irq, void *dev_id) ...@@ -147,10 +147,8 @@ irqreturn_t psc_irq(int irq, void *dev_id)
irq_bit = 1; irq_bit = 1;
do { do {
if (events & irq_bit) { if (events & irq_bit) {
psc_write_byte(pIER, irq_bit);
psc_write_byte(pIFR, irq_bit); psc_write_byte(pIFR, irq_bit);
m68k_handle_int(irq_num); m68k_handle_int(irq_num);
psc_write_byte(pIER, irq_bit | 0x80);
} }
irq_num++; irq_num++;
irq_bit <<= 1; irq_bit <<= 1;
......
...@@ -443,11 +443,6 @@ void __init via_nubus_init(void) ...@@ -443,11 +443,6 @@ void __init via_nubus_init(void)
/* /*
* The generic VIA interrupt routines (shamelessly stolen from Alan Cox's * The generic VIA interrupt routines (shamelessly stolen from Alan Cox's
* via6522.c :-), disable/pending masks added. * via6522.c :-), disable/pending masks added.
*
* The new interrupt architecture in macints.c takes care of a lot of the
* gruntwork for us, including tallying the interrupts and calling the
* handlers on the linked list. All we need to do here is basically generate
* the machspec interrupt number after clearing the interrupt.
*/ */
irqreturn_t via1_irq(int irq, void *dev_id) irqreturn_t via1_irq(int irq, void *dev_id)
...@@ -463,10 +458,8 @@ irqreturn_t via1_irq(int irq, void *dev_id) ...@@ -463,10 +458,8 @@ irqreturn_t via1_irq(int irq, void *dev_id)
irq_bit = 1; irq_bit = 1;
do { do {
if (events & irq_bit) { if (events & irq_bit) {
via1[vIER] = irq_bit;
via1[vIFR] = irq_bit; via1[vIFR] = irq_bit;
m68k_handle_int(irq_num); m68k_handle_int(irq_num);
via1[vIER] = irq_bit | 0x80;
} }
++irq_num; ++irq_num;
irq_bit <<= 1; irq_bit <<= 1;
...@@ -502,11 +495,8 @@ irqreturn_t via2_irq(int irq, void *dev_id) ...@@ -502,11 +495,8 @@ irqreturn_t via2_irq(int irq, void *dev_id)
irq_bit = 1; irq_bit = 1;
do { do {
if (events & irq_bit) { if (events & irq_bit) {
via2[gIER] = irq_bit;
via2[gIFR] = irq_bit | rbv_clear; via2[gIFR] = irq_bit | rbv_clear;
m68k_handle_int(irq_num); m68k_handle_int(irq_num);
if (irq_num != IRQ_MAC_NUBUS || nubus_disabled == 0)
via2[gIER] = irq_bit | 0x80;
} }
++irq_num; ++irq_num;
irq_bit <<= 1; irq_bit <<= 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment