aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2007-05-01 16:32:58 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 20:59:07 -0400
commit217f6710c275118af1008bb1447d244be52d2dc3 (patch)
treeafcc692e42ea227090384c6973ed2c97a8636040 /arch/m68k
parentcd713ddc93bf2f612783aea8eff6d0df6107765e (diff)
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: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/mac/baboon.c20
-rw-r--r--arch/m68k/mac/oss.c4
-rw-r--r--arch/m68k/mac/psc.c2
-rw-r--r--arch/m68k/mac/via.c10
4 files changed, 7 insertions, 29 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 8ea7498cec37..673a1085984d 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -22,7 +22,7 @@
22/* #define DEBUG_BABOON */ 22/* #define DEBUG_BABOON */
23/* #define DEBUG_IRQS */ 23/* #define DEBUG_IRQS */
24 24
25int baboon_present,baboon_active; 25int baboon_present;
26volatile struct baboon *baboon; 26volatile struct baboon *baboon;
27 27
28irqreturn_t baboon_irq(int, void *); 28irqreturn_t baboon_irq(int, void *);
@@ -45,7 +45,6 @@ void __init baboon_init(void)
45 45
46 baboon = (struct baboon *) BABOON_BASE; 46 baboon = (struct baboon *) BABOON_BASE;
47 baboon_present = 1; 47 baboon_present = 1;
48 baboon_active = 0;
49 48
50 printk("Baboon detected at %p\n", baboon); 49 printk("Baboon detected at %p\n", baboon);
51} 50}
@@ -70,9 +69,9 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
70 unsigned char events; 69 unsigned char events;
71 70
72#ifdef DEBUG_IRQS 71#ifdef DEBUG_IRQS
73 printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X active %02X\n", 72 printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X\n",
74 (uint) baboon->mb_control, (uint) baboon->mb_ifr, 73 (uint) baboon->mb_control, (uint) baboon->mb_ifr,
75 (uint) baboon->mb_status, baboon_active); 74 (uint) baboon->mb_status);
76#endif 75#endif
77 76
78 if (!(events = baboon->mb_ifr & 0x07)) 77 if (!(events = baboon->mb_ifr & 0x07))
@@ -81,11 +80,9 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
81 irq_num = IRQ_BABOON_0; 80 irq_num = IRQ_BABOON_0;
82 irq_bit = 1; 81 irq_bit = 1;
83 do { 82 do {
84 if (events & irq_bit/* & baboon_active*/) { 83 if (events & irq_bit) {
85 baboon_active &= ~irq_bit;
86 baboon->mb_ifr &= ~irq_bit; 84 baboon->mb_ifr &= ~irq_bit;
87 m68k_handle_int(irq_num); 85 m68k_handle_int(irq_num);
88 baboon_active |= irq_bit;
89 } 86 }
90 irq_bit <<= 1; 87 irq_bit <<= 1;
91 irq_num++; 88 irq_num++;
@@ -99,21 +96,18 @@ irqreturn_t baboon_irq(int irq, void *dev_id)
99} 96}
100 97
101void baboon_irq_enable(int irq) { 98void baboon_irq_enable(int irq) {
102 int irq_idx = IRQ_IDX(irq);
103
104#ifdef DEBUG_IRQUSE 99#ifdef DEBUG_IRQUSE
105 printk("baboon_irq_enable(%d)\n", irq); 100 printk("baboon_irq_enable(%d)\n", irq);
106#endif 101#endif
107 baboon_active |= (1 << irq_idx); 102 /* FIXME: figure out how to mask and unmask baboon interrupt sources */
103 enable_irq(IRQ_NUBUS_C);
108} 104}
109 105
110void baboon_irq_disable(int irq) { 106void baboon_irq_disable(int irq) {
111 int irq_idx = IRQ_IDX(irq);
112
113#ifdef DEBUG_IRQUSE 107#ifdef DEBUG_IRQUSE
114 printk("baboon_irq_disable(%d)\n", irq); 108 printk("baboon_irq_disable(%d)\n", irq);
115#endif 109#endif
116 baboon_active &= ~(1 << irq_idx); 110 disable_irq(IRQ_NUBUS_C);
117} 111}
118 112
119void baboon_irq_clear(int irq) { 113void baboon_irq_clear(int irq) {
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index 6399883ae742..d7be16917efd 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -112,10 +112,8 @@ irqreturn_t oss_irq(int irq, void *dev_id)
112 oss->irq_pending &= ~OSS_IP_SOUND; 112 oss->irq_pending &= ~OSS_IP_SOUND;
113 /* FIXME: call sound handler */ 113 /* FIXME: call sound handler */
114 } else if (events & OSS_IP_SCSI) { 114 } else if (events & OSS_IP_SCSI) {
115 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED;
116 oss->irq_pending &= ~OSS_IP_SCSI; 115 oss->irq_pending &= ~OSS_IP_SCSI;
117 m68k_handle_int(IRQ_MAC_SCSI); 116 m68k_handle_int(IRQ_MAC_SCSI);
118 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI;
119 } else { 117 } else {
120 /* FIXME: error check here? */ 118 /* FIXME: error check here? */
121 } 119 }
@@ -149,10 +147,8 @@ irqreturn_t oss_nubus_irq(int irq, void *dev_id)
149 --i; 147 --i;
150 irq_bit >>= 1; 148 irq_bit >>= 1;
151 if (events & irq_bit) { 149 if (events & irq_bit) {
152 oss->irq_level[i] = OSS_IRQLEV_DISABLED;
153 oss->irq_pending &= ~irq_bit; 150 oss->irq_pending &= ~irq_bit;
154 m68k_handle_int(NUBUS_SOURCE_BASE + i); 151 m68k_handle_int(NUBUS_SOURCE_BASE + i);
155 oss->irq_level[i] = OSS_IRQLEV_NUBUS;
156 } 152 }
157 } while(events & (irq_bit - 1)); 153 } while(events & (irq_bit - 1));
158 return IRQ_HANDLED; 154 return IRQ_HANDLED;
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 1dba88247c6f..d66f723b17c3 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -147,10 +147,8 @@ irqreturn_t psc_irq(int irq, void *dev_id)
147 irq_bit = 1; 147 irq_bit = 1;
148 do { 148 do {
149 if (events & irq_bit) { 149 if (events & irq_bit) {
150 psc_write_byte(pIER, irq_bit);
151 psc_write_byte(pIFR, irq_bit); 150 psc_write_byte(pIFR, irq_bit);
152 m68k_handle_int(irq_num); 151 m68k_handle_int(irq_num);
153 psc_write_byte(pIER, irq_bit | 0x80);
154 } 152 }
155 irq_num++; 153 irq_num++;
156 irq_bit <<= 1; 154 irq_bit <<= 1;
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index 83a3bb0c0325..d5cac72eb3db 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -443,11 +443,6 @@ void __init via_nubus_init(void)
443/* 443/*
444 * The generic VIA interrupt routines (shamelessly stolen from Alan Cox's 444 * The generic VIA interrupt routines (shamelessly stolen from Alan Cox's
445 * via6522.c :-), disable/pending masks added. 445 * via6522.c :-), disable/pending masks added.
446 *
447 * The new interrupt architecture in macints.c takes care of a lot of the
448 * gruntwork for us, including tallying the interrupts and calling the
449 * handlers on the linked list. All we need to do here is basically generate
450 * the machspec interrupt number after clearing the interrupt.
451 */ 446 */
452 447
453irqreturn_t via1_irq(int irq, void *dev_id) 448irqreturn_t via1_irq(int irq, void *dev_id)
@@ -463,10 +458,8 @@ irqreturn_t via1_irq(int irq, void *dev_id)
463 irq_bit = 1; 458 irq_bit = 1;
464 do { 459 do {
465 if (events & irq_bit) { 460 if (events & irq_bit) {
466 via1[vIER] = irq_bit;
467 via1[vIFR] = irq_bit; 461 via1[vIFR] = irq_bit;
468 m68k_handle_int(irq_num); 462 m68k_handle_int(irq_num);
469 via1[vIER] = irq_bit | 0x80;
470 } 463 }
471 ++irq_num; 464 ++irq_num;
472 irq_bit <<= 1; 465 irq_bit <<= 1;
@@ -502,11 +495,8 @@ irqreturn_t via2_irq(int irq, void *dev_id)
502 irq_bit = 1; 495 irq_bit = 1;
503 do { 496 do {
504 if (events & irq_bit) { 497 if (events & irq_bit) {
505 via2[gIER] = irq_bit;
506 via2[gIFR] = irq_bit | rbv_clear; 498 via2[gIFR] = irq_bit | rbv_clear;
507 m68k_handle_int(irq_num); 499 m68k_handle_int(irq_num);
508 if (irq_num != IRQ_MAC_NUBUS || nubus_disabled == 0)
509 via2[gIER] = irq_bit | 0x80;
510 } 500 }
511 ++irq_num; 501 ++irq_num;
512 irq_bit <<= 1; 502 irq_bit <<= 1;