[patch 21/33] m68k: reverse Mac IRQ damage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Finn Thain <[email protected]>

Reverse the last of a monumental brown-paper-bag commit that went into the 2.3
kernel.

Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
---
 arch/m68k/mac/baboon.c |    2 +-
 arch/m68k/mac/oss.c    |    6 +++---
 arch/m68k/mac/psc.c    |    2 +-
 arch/m68k/mac/via.c    |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

--- linux-m68k-2.6.21.orig/arch/m68k/mac/baboon.c
+++ linux-m68k-2.6.21/arch/m68k/mac/baboon.c
@@ -81,9 +81,9 @@ irqreturn_t baboon_irq(int irq, void *de
 	for (i = 0, irq_bit = 1 ; i < 3 ; i++, irq_bit <<= 1) {
 	        if (events & irq_bit/* & baboon_active*/) {
 			baboon_active &= ~irq_bit;
+			baboon->mb_ifr &= ~irq_bit;
 			m68k_handle_int(IRQ_BABOON_0 + i);
 			baboon_active |= irq_bit;
-			baboon->mb_ifr &= ~irq_bit;
 		}
 	}
 #if 0
--- linux-m68k-2.6.21.orig/arch/m68k/mac/oss.c
+++ linux-m68k-2.6.21/arch/m68k/mac/oss.c
@@ -109,12 +109,12 @@ irqreturn_t oss_irq(int irq, void *dev_i
 	/* FIXME: how do you clear a pending IRQ?    */
 
 	if (events & OSS_IP_SOUND) {
-		/* FIXME: call sound handler */
 		oss->irq_pending &= ~OSS_IP_SOUND;
+		/* FIXME: call sound handler */
 	} else if (events & OSS_IP_SCSI) {
 		oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED;
-		m68k_handle_int(IRQ_MAC_SCSI);
 		oss->irq_pending &= ~OSS_IP_SCSI;
+		m68k_handle_int(IRQ_MAC_SCSI);
 		oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI;
 	} else {
 		/* FIXME: error check here? */
@@ -146,8 +146,8 @@ irqreturn_t oss_nubus_irq(int irq, void 
 	for (i = 0, irq_bit = 1 ; i < 6 ; i++, irq_bit <<= 1) {
 		if (events & irq_bit) {
 			oss->irq_level[i] = OSS_IRQLEV_DISABLED;
-			m68k_handle_int(NUBUS_SOURCE_BASE + i);
 			oss->irq_pending &= ~irq_bit;
+			m68k_handle_int(NUBUS_SOURCE_BASE + i);
 			oss->irq_level[i] = OSS_IRQLEV_NUBUS;
 		}
 	}
--- linux-m68k-2.6.21.orig/arch/m68k/mac/psc.c
+++ linux-m68k-2.6.21/arch/m68k/mac/psc.c
@@ -149,8 +149,8 @@ irqreturn_t psc_irq(int irq, void *dev_i
 	for (i = 0, irq_bit = 1 ; i < 4 ; i++, irq_bit <<= 1) {
 	        if (events & irq_bit) {
 			psc_write_byte(pIER, irq_bit);
-			m68k_handle_int(base_irq + i);
 			psc_write_byte(pIFR, irq_bit);
+			m68k_handle_int(base_irq + i);
 			psc_write_byte(pIER, irq_bit | 0x80);
 		}
 	}
--- linux-m68k-2.6.21.orig/arch/m68k/mac/via.c
+++ linux-m68k-2.6.21/arch/m68k/mac/via.c
@@ -430,8 +430,8 @@ irqreturn_t via1_irq(int irq, void *dev_
 	for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
 		if (events & irq_bit) {
 			via1[vIER] = irq_bit;
-			m68k_handle_int(VIA1_SOURCE_BASE + i);
 			via1[vIFR] = irq_bit;
+			m68k_handle_int(VIA1_SOURCE_BASE + i);
 			via1[vIER] = irq_bit | 0x80;
 		}
 

--
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux