From: zippel@linux-m68k.org
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Finn Thain <fthain@telegraphics.com.au>
Subject: [PATCH 11/11] m68k mac VIA2 fixes and cleanups
Date: Thu, 25 May 2006 02:27:53 +0200 [thread overview]
Message-ID: <20060525003424.301767000@linux-m68k.org> (raw)
In-Reply-To: 20060525002742.723577000@linux-m68k.org
From: Finn Thain <fthain@telegraphics.com.au>
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: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
arch/m68k/mac/config.c | 13 -------------
arch/m68k/mac/macints.c | 1 -
arch/m68k/mac/via.c | 17 ++---------------
3 files changed, 2 insertions(+), 29 deletions(-)
Index: linux-2.6-mm/arch/m68k/mac/config.c
===================================================================
--- linux-2.6-mm.orig/arch/m68k/mac/config.c
+++ linux-2.6-mm/arch/m68k/mac/config.c
@@ -89,24 +89,11 @@ extern void mac_debugging_long(int, long
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 *))
{
via_init_clock(vector);
}
-#if 0
-void mac_waitbut (void)
-{
- ;
-}
-#endif
-
extern irqreturn_t mac_default_handler(int, void *, struct pt_regs *);
irqreturn_t (*mac_handlers[8])(int, void *, struct pt_regs *)=
Index: linux-2.6-mm/arch/m68k/mac/macints.c
===================================================================
--- linux-2.6-mm.orig/arch/m68k/mac/macints.c
+++ linux-2.6-mm/arch/m68k/mac/macints.c
@@ -216,7 +216,6 @@ static void scc_irq_disable(int);
* 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_debug_handler(int, void *, struct pt_regs *);
Index: linux-2.6-mm/arch/m68k/mac/via.c
===================================================================
--- linux-2.6-mm.orig/arch/m68k/mac/via.c
+++ linux-2.6-mm/arch/m68k/mac/via.c
@@ -25,7 +25,6 @@
#include <linux/init.h>
#include <linux/ide.h>
-#include <asm/traps.h>
#include <asm/bootinfo.h>
#include <asm/macintosh.h>
#include <asm/macints.h>
@@ -71,7 +70,6 @@ void via_irq_enable(int irq);
void via_irq_disable(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 int oss_present;
@@ -212,11 +210,6 @@ void __init via_init(void)
break;
}
#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;
#endif
@@ -270,12 +263,6 @@ void __init via_register_interrupts(void
cpu_request_irq(IRQ_AUTO_1, via1_irq,
IRQ_FLG_LOCK|IRQ_FLG_FAST, "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,
"via2", (void *) via2);
@@ -471,8 +458,8 @@ irqreturn_t via2_irq(int irq, void *dev_
for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
if (events & irq_bit) {
via2[gIER] = irq_bit;
- mac_do_irq_list(VIA2_SOURCE_BASE + i, regs);
via2[gIFR] = irq_bit | rbv_clear;
+ mac_do_irq_list(VIA2_SOURCE_BASE + i, regs);
via2[gIER] = irq_bit | 0x80;
}
return IRQ_HANDLED;
@@ -529,6 +516,7 @@ void via_irq_enable(int irq) {
}
via2[gIER] = irq_bit | 0x80;
} else if (irq_src == 7) {
+ nubus_active |= irq_bit;
if (rbv_present) {
/* enable the slot interrupt. SIER works like IER. */
via2[rSIER] = IER_SET_BIT(irq_idx);
@@ -550,7 +538,6 @@ void via_irq_enable(int irq) {
}
}
}
- nubus_active |= irq_bit;
}
}
--
prev parent reply other threads:[~2006-05-25 1:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 0:27 [PATCH 00/11] various m68k patches zippel
2006-05-25 0:27 ` [PATCH 01/11] completely initialize hw_regs_t in ide_setup_ports zippel
2006-05-25 0:27 ` [PATCH 02/11] atyfb_base compile fix for CONFIG_PCI=n zippel
2006-05-25 1:33 ` Andrew Morton
2006-05-25 4:07 ` Greg KH
2006-05-25 4:28 ` Andrew Morton
2006-05-30 12:21 ` Roman Zippel
2006-05-25 0:27 ` [PATCH 03/11] cleanup unistd.h zippel
2006-05-25 0:27 ` [PATCH 04/11] Remove some unused definitions in zorro.h zippel
2006-05-25 0:27 ` [PATCH 05/11] use c99 initializer zippel
2006-05-25 0:27 ` [PATCH 06/11] print correct stack trace zippel
2006-05-25 0:27 ` [PATCH 07/11] restore amikbd compatibility with 2.4 zippel
2006-05-25 1:36 ` Andrew Morton
2006-05-25 1:50 ` Roman Zippel
2006-05-25 0:27 ` [PATCH 08/11] extra delay zippel
2006-05-25 0:27 ` [PATCH 09/11] use proper defines for zone initialization zippel
2006-05-25 0:27 ` [PATCH 10/11] adjust to changed HARDIRQ_MASK zippel
2006-05-25 0:27 ` zippel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060525003424.301767000@linux-m68k.org \
--to=zippel@linux-m68k.org \
--cc=akpm@osdl.org \
--cc=fthain@telegraphics.com.au \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox