m68k: Convert to genirq
Subsystems (13)
Geert Uytterhoeven
maintainerv6 cover m68k: Convert to genirq
This patch series converts the m68k/mmu (nommu was converted before) architecture to the generic hardirq framework.
- [01/28] genirq: Add missing "else" in irq_shutdown()
- [02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
- [03/28] keyboard: Do not include <linux/irq.>
- [04/28] m68k/irq: Rename irq_controller to irq_chip
- [05/28] m68k/irq: Kill irq_node_t typedef, always use struct irq_node
- [06/28] m68k/irq: Rename irq_node to irq_data
- [07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
- [08/28] m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static
- [09/28] m68k/irq: Extract irq_set_chip()
- [10/28] m68k/irq: Add m68k_setup_irq_controller()
- [11/28] m68k/irq: Rename {,__}m68k_handle_int()
- [12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
- [13/28] m68k/irq: Add genirq support
- [14/28] m68k/atari: Convert Atari to genirq
- [15/28] m68k/atari: Remove code and comments about different irq types
- [16/28] m68k/amiga: Refactor amiints.c
- [17/28] m68k/amiga: Convert Amiga to genirq
- [18/28] m68k/amiga: Optimize interrupts using chain handlers
- [19/28] m68k/mac: Convert Mac to genirq
- [20/28] m68k/mac: Optimize interrupts using chain handlers
- [21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
- [22/28] m68k/vme: Convert VME to genirq
- [23/28] m68k/apollo: Convert Apollo to genirq
- [24/28] m68k/sun3: Use the kstat_irqs_cpu() wrapper
- [25/28] m68k/sun3: Convert Sun3/3x to genirq
- [26/28] m68k/q40: Convert Q40/Q60 to genirq
- [27/28] m68k/irq: Remove obsolete m68k irq framework
- [28/28] m68k/irq: Remove obsolete support for user vector interrupt fixups
Overview:
- [01] is a fix for the core genirq code,
- [02-03] are fixes to avoid compile problems later in the conversion process,
- [04-12] refactor the current m68k irq framework to match the generic hardirq framework more closely w.r.t. to its (platform) users,
- [13] adds generic hardirq support to the core, which can be enabled through a config option, so both legacy and generic hardirq can coexist at the source level during the migration,
- [14-26] convert the individual platforms to use generic hardirqs,
- [27] removes support for the legacy m68k irq framework,
- [28] removes a now unused feature.
The code has received some testing on Amiga, Atari (mainly ARAnyM), and Mac. There are some known issues with drivers, which Finn and Michael are looking into.
I will update my m68k-genirq branch as soon as master.kernel.org is available again.
Thanks for your comments, feedback, and testing!
Changelog:
v6:
- Add [01] genirq: Add missing "else" in irq_shutdown()
- Add [27] m68k/irq: Remove obsolete m68k irq framework
- Add [28] m68k/irq: Remove obsolete support for user vector interrupt fixups
- Split off [02] ide-{cd,floppy,tape}: Do not include <linux/irq.>
- Split off [03] keyboard: Do not include <linux/irq.>
- Keep irq_canonicalize(), which is needed for ac3200, atari_91C111, serial_core, and 8250.
- Correct irq args of irq_set_handler_data() calls in Mac PSC chain handlers, as reported by Finn
v5:
- Add [20] m68k/mac: Optimize interrupts using chain handlers
- Add [26] m68k/q40: Convert Q40/Q60 to genirq
- Keep m68k_setup_auto_interrupt(), it's still needed for Q40
v4:
- Add [15] m68k/atari: Remove code and comments about different irq types
- Add [23] m68k/apollo: Convert Apollo to genirq
- Add [24] m68k/sun3: Use the kstat_irqs_cpu() wrapper
- Add [25] m68k/sun3: Convert Sun3/3x to genirq
v3:
- Add [11] m68k/irq: Rename {,__}m68k_handle_int()
- Add [12] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
- Add [19] m68k/mac: Convert Mac to genirq
- Add [21] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
- Add [22] m68k/vme: Convert VME to genirq
- Use handle_simple_irq() instead of handle_level_irq(), which also means we don't need the .irq_{,un}mask methods anymore, so they can be removed again.
- Wrapper __m68k_handle_int() for do_IRQ() is no longer needed
- Keep track of spurious interrupts
v2:
- Add [10] m68k/irq: Add m68k_setup_irq_controller()
- Add [16] m68k/amiga: Refactor amiints.c
- Add [17] m68k/amiga: Convert Amiga to genirq
- Add [18] m68k/amiga: Optimize interrupts using chain handlers]
- Add missing "irq" offset in m68k_setup_irq_controller()
- Set up default handlers for autovector interrupts, and fill in missing .irq_{,un}mask methods,
v1:
- Initial version, acked by Thomas Gleixner
arch/m68k/Kconfig | 4 +- arch/m68k/amiga/amiints.c | 168 ++++++++------------ arch/m68k/amiga/cia.c | 39 +++-- arch/m68k/apollo/dn_ints.c | 35 +++-- arch/m68k/atari/ataints.c | 274 +++----------------------------- arch/m68k/bvme6000/config.c | 2 +- arch/m68k/hp300/time.c | 2 +- arch/m68k/include/asm/hardirq.h | 5 + arch/m68k/include/asm/irq.h | 82 ++-------- arch/m68k/include/asm/q40ints.h | 3 - arch/m68k/kernel/Makefile_mm | 2 +- arch/m68k/kernel/entry_mm.S | 7 +- arch/m68k/kernel/ints.c | 323 ++++---------------------------------- arch/m68k/mac/baboon.c | 14 +- arch/m68k/mac/iop.c | 10 +- arch/m68k/mac/macints.c | 19 ++- arch/m68k/mac/oss.c | 54 +++---- arch/m68k/mac/psc.c | 49 +++--- arch/m68k/mac/via.c | 74 ++++------ arch/m68k/mvme147/config.c | 5 +- arch/m68k/mvme16x/config.c | 2 +- arch/m68k/q40/q40ints.c | 60 ++++---- arch/m68k/sun3/sun3ints.c | 46 +++--- drivers/ide/ide-cd.c | 1 - drivers/ide/ide-floppy.c | 1 - drivers/ide/ide-tape.c | 1 - drivers/macintosh/via-macii.c | 2 +- drivers/macintosh/via-maciisi.c | 4 +- drivers/net/macsonic.c | 7 +- drivers/scsi/mac_scsi.c | 3 +- drivers/tty/serial/68360serial.c | 4 +- drivers/tty/vt/keyboard.c | 3 +- kernel/irq/chip.c | 2 +- 33 files changed, 358 insertions(+), 949 deletions(-)
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
Geert Uytterhoeven
maintainerPATCH v6 1/28 genirq: Add missing "else" in irq_shutdown()
If an irq_chip provides .irq_shutdown(), but neither of .irq_disable() or .irq_mask(), free_irq() crashes when jumping to NULL.
Fix this by only trying .irq_disable() and .irq_mask() if there's no .irq_shutdown() provided.
This revives the symmetry with irq_startup(), which tries .irq_startup(), .irq_enable(), and irq_unmask(), and makes it consistent with the comment for irq_chip.irq_shutdown() in <linux/irq.h>, which says:
* @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL)
This is also how __free_irq() behaved before the big overhaul, cfr. e.g. 3b56f0585fd4c02d047dc406668cb40159b2d340 ("genirq: Remove bogus conditional"), where the core interrupt code always overrode .irq_shutdown() to .irq_disable() if .irq_shutdown() was NULL.
---
v6: Added this changeset
--- kernel/irq/chip.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/irq/chip.c +1 -1
@@ -178,7 +178,7 @@ void irq_shutdown(struct irq_desc *desc) desc->depth =1 ;if (desc->irq_data.chip->irq_shutdown) desc->irq_data.chip->irq_shutdown (&desc->irq_data); -if (desc->irq_data.chip->irq_disable) +else if (desc->irq_data.chip->irq_disable) desc->irq_data.chip->irq_disable (&desc->irq_data);else desc->irq_data.chip->irq_mask (&desc->irq_data);
Signature · 1 line
1.7.0.4
Thomas Gleixner
AppliedRe: [PATCH 01/28] genirq: Add missing "else" in irq_shutdown()
Quoted 11 lines · Geert Uytterhoeven
If an
irq_chipprovides .irq_shutdown(), but neither of .irq_disable() or .irq_mask(),free_irq()crashes when jumping to NULL.
Fix this by only trying .irq_disable() and .irq_mask() if there's no .irq_shutdown() provided.This revives the symmetry with
irq_startup(), which tries .irq_startup(), .irq_enable(), andirq_unmask(), and makes it consistent with the comment forirq_chip.irq_shutdown()in <linux/irq.h>, which says:* @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL)
Quoted 7 lines
This is also how
__free_irq()behaved before the big overhaul, cfr. e.g.3b56f0585fd4c02d047dc406668cb40159b2d340("genirq: Remove bogus conditional"), where the core interrupt code always overrode .irq_shutdown() to .irq_disable() if .irq_shutdown() was NULL.Signed-off-by Geert Uytterhoeven <[email protected]>Cc Thomas Gleixner <[email protected]>
Applied into irq/urgent with a note to stable@...
Thanks,
tglx
Geert Uytterhoeven
maintainerPATCH v6 2/28 ide-{cd,floppy,tape}: Do not include <linux/irq.>
In reply to Geert UytterhoevenThe top of <linux/irq.h> has this comment:
* Please do not include this file in generic code. There is currently
* no requirement for any architecture to implement anything held
* within this file.
*
* Thanks. --rmk
Remove inclusion of <linux/irq.>, to prevent the following compile error from happening soon:
| include/linux/irq.h:132: error: redefinition of ‘struct irq_data’ | include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’
--- drivers/ide/ide-cd.c | 1 - drivers/ide/ide-floppy.c | 1 - drivers/ide/ide-tape.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/ide/ide-cd.c +0 -1
@@ -43,7 +43,6 @@/* For SCSI -> ATAPI command conversion */ #include <scsi/scsi.h> -#include <linux/irq.h> #include <linux/io.h> #include <asm/byteorder.h> #include <linux/uaccess.h>
drivers/ide/ide-floppy.c +0 -1
@@ -35,7 +35,6 @@#include <scsi/scsi_ioctl.h> #include <asm/byteorder.h> -#include <linux/irq.h> #include <linux/uaccess.h> #include <linux/io.h> #include <asm/unaligned.h>
drivers/ide/ide-tape.c +0 -1
@@ -41,7 +41,6 @@#include <scsi/scsi.h> #include <asm/byteorder.h> -#include <linux/irq.h> #include <linux/uaccess.h> #include <linux/io.h> #include <asm/unaligned.h>
Signature · 1 line
1.7.0.4
Re: [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
Hello.
Quoted 9 lines · Geert Uytterhoeven
The top of <
linux/irq.h> has this comment:* Please do not include this file in generic code. There is currently
* no requirement for any architecture to implement anything held
* within this file.
*
* Thanks. --rmkRemove inclusion of <linux/irq.>, to prevent the following compile error
<linux/irq.h>? You've also typoed in the subject.
Quoted 8 lines
from happening soon:
|
include/linux/irq.h:132: error: redefinition of ‘struct irq_data’ |include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’Signed-off-by Geert Uytterhoeven <[email protected]>Acked-by Thomas Gleixner <[email protected]>
WBR, Sergei
Re: [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
In reply to Geert UytterhoevenHello.
Quoted 9 lines · Geert Uytterhoeven
The top of <
linux/irq.h> has this comment:* Please do not include this file in generic code. There is currently
* no requirement for any architecture to implement anything held
* within this file.
*
* Thanks. --rmkRemove inclusion of <linux/irq.>, to prevent the following compile error
<linux/irq.h>? You've also typoed in the subject.
Quoted 8 lines
from happening soon:
|
include/linux/irq.h:132: error: redefinition of ‘struct irq_data’ |include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’Signed-off-by Geert Uytterhoeven <[email protected]>Acked-by Thomas Gleixner <[email protected]>
WBR, Sergei
Geert Uytterhoeven
maintainerPATCH v6 2/28 ide-{cd,floppy,tape}: Do not include <linux/irq.>
In reply to Geert UytterhoevenThe top of <linux/irq.h> has this comment:
* Please do not include this file in generic code. There is currently
* no requirement for any architecture to implement anything held
* within this file.
*
* Thanks. --rmk
Remove inclusion of <linux/irq.>, to prevent the following compile error from happening soon:
| include/linux/irq.h:132: error: redefinition of ‘struct irq_data’ | include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’
--- drivers/ide/ide-cd.c | 1 - drivers/ide/ide-floppy.c | 1 - drivers/ide/ide-tape.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/ide/ide-cd.c +0 -1
@@ -43,7 +43,6 @@/* For SCSI -> ATAPI command conversion */ #include <scsi/scsi.h> -#include <linux/irq.h> #include <linux/io.h> #include <asm/byteorder.h> #include <linux/uaccess.h>
drivers/ide/ide-floppy.c +0 -1
@@ -35,7 +35,6 @@#include <scsi/scsi_ioctl.h> #include <asm/byteorder.h> -#include <linux/irq.h> #include <linux/uaccess.h> #include <linux/io.h> #include <asm/unaligned.h>
drivers/ide/ide-tape.c +0 -1
@@ -41,7 +41,6 @@#include <scsi/scsi.h> #include <asm/byteorder.h> -#include <linux/irq.h> #include <linux/uaccess.h> #include <linux/io.h> #include <asm/unaligned.h>
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 3/28 keyboard: Do not include <linux/irq.>
In reply to Geert UytterhoevenThe top of <linux/irq.h> has this comment:
* Please do not include this file in generic code. There is currently
* no requirement for any architecture to implement anything held
* within this file.
*
* Thanks. --rmk
Remove inclusion of <linux/irq.>, to prevent the following compile error from happening soon:
| include/linux/irq.h:132: error: redefinition of ‘struct irq_data’ | include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’
drivers/tty/vt/keyboard.c needs to include <asm/irq_regs.h> for get_irq_regs():
| drivers/tty/vt/keyboard.c:497: error: implicit declaration of function ‘get_irq_regs’ | drivers/tty/vt/keyboard.c:497: warning: initialization makes pointer from integer without a cast
--- drivers/tty/vt/keyboard.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/tty/vt/keyboard.c +2 -1
@@ -33,7 +33,6 @@#include <linux/string.h> #include <linux/init.h> #include <linux/slab.h> -#include <linux/irq.h> #include <linux/kbd_kern.h> #include <linux/kbd_diacr.h>
@@ -43,6 +42,8 @@#include <linux/notifier.h> #include <linux/jiffies.h> +#include <asm/irq_regs.h> +extern void ctrl_alt_del (void );/*
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 4/28 m68k/irq: Rename irq_controller to irq_chip
In reply to Geert UytterhoevenMake it more similar to the genirq version:
- Remove lock (unused as we don't do SMP anyway),
- Prepend methods with irq_,
- Make irq_startup() return unsigned int.
--- arch/m68k/amiga/amiints.c | 9 ++-- arch/m68k/amiga/cia.c | 18 ++++----- arch/m68k/apollo/dn_ints.c | 11 ++--- arch/m68k/atari/ataints.c | 15 +++---- arch/m68k/include/asm/irq.h | 15 +++---- arch/m68k/kernel/ints.c | 86 +++++++++++++++++++++---------------------- arch/m68k/mac/macints.c | 9 ++-- arch/m68k/q40/q40ints.c | 17 ++++---- arch/m68k/sun3/sun3ints.c | 13 +++--- 9 files changed, 91 insertions(+), 102 deletions(-)
arch/m68k/amiga/amiints.c +4 -5
@@ -52,11 +52,10 @@ static irqreturn_t ami_int3(int irq, void *dev_id);static irqreturn_t ami_int4 (int irq,void *dev_id);static irqreturn_t ami_int5 (int irq,void *dev_id); -static struct irq_controller amiga_irq_controller = { +static struct irq_chip amiga_irq_chip = { .name ="amiga" , - .lock =__SPIN_LOCK_UNLOCKED (amiga_irq_controller.lock), - .enable = amiga_enable_irq, - .disable = amiga_disable_irq, + .irq_enable = amiga_enable_irq, + .irq_disable = amiga_disable_irq, };/*
@@ -81,7 +80,7 @@ void __init amiga_init_IRQ(void)if (request_irq (IRQ_AUTO_5 , ami_int5,0 ,"int5" ,NULL ))pr_err ("Couldn't register int%d\n" ,5 ); -m68k_setup_irq_controller (&amiga_irq_controller,IRQ_USER ,AMI_STD_IRQS ); +m68k_setup_irq_chip (&amiga_irq_chip,IRQ_USER ,AMI_STD_IRQS );/* turn off PCMCIA interrupts */ if (AMIGAHW_PRESENT (PCMCIA ))
arch/m68k/amiga/cia.c +8 -10
@@ -121,11 +121,10 @@ static void cia_disable_irq(unsigned int irq)cia_able_irq (&ciaa_base,1 << (irq -IRQ_AMIGA_CIAA )); } -static struct irq_controller cia_irq_controller = { +static struct irq_chip cia_irq_chip = { .name ="cia" , - .lock =__SPIN_LOCK_UNLOCKED (cia_irq_controller.lock), - .enable = cia_enable_irq, - .disable = cia_disable_irq, + .irq_enable = cia_enable_irq, + .irq_disable = cia_disable_irq, };/*
@@ -158,23 +157,22 @@ static void auto_disable_irq(unsigned int irq) } } -static struct irq_controller auto_irq_controller = { +static struct irq_chip auto_irq_chip = { .name ="auto" , - .lock =__SPIN_LOCK_UNLOCKED (auto_irq_controller.lock), - .enable = auto_enable_irq, - .disable = auto_disable_irq, + .irq_enable = auto_enable_irq, + .irq_disable = auto_disable_irq, };void __init cia_init_IRQ (struct ciabase *base) { -m68k_setup_irq_controller (&cia_irq_controller, base->cia_irq,CIA_IRQS ); +m68k_setup_irq_chip (&cia_irq_chip, base->cia_irq,CIA_IRQS );/* clear any pending interrupt and turn off all interrupts */ cia_set_irq (base,CIA_ICR_ALL );cia_able_irq (base,CIA_ICR_ALL );/* override auto int and install CIA handler */ -m68k_setup_irq_controller (&auto_irq_controller, base->handler_irq,1 ); +m68k_setup_irq_chip (&auto_irq_chip, base->handler_irq,1 );m68k_irq_startup (base->handler_irq);if (request_irq (base->handler_irq, cia_handler,IRQF_SHARED , base->name, base))
arch/m68k/apollo/dn_ints.c +5 -6
@@ -12,7 +12,7 @@ void dn_process_int(unsigned int irq, struct pt_regs *fp) *(volatile unsigned char *)(picb)=0x20 ; } -int apollo_irq_startup (unsigned int irq) +unsigned int apollo_irq_startup (unsigned int irq) {if (irq <8 ) *(volatile unsigned char *)(pica+1 ) &= ~(1 << irq);
@@ -29,16 +29,15 @@ void apollo_irq_shutdown(unsigned int irq) *(volatile unsigned char *)(picb+1 ) |= (1 << (irq -8 )); } -static struct irq_controller apollo_irq_controller = { +static struct irq_chip apollo_irq_chip = { .name ="apollo" , - .lock =__SPIN_LOCK_UNLOCKED (apollo_irq_controller.lock), - .startup = apollo_irq_startup, - .shutdown = apollo_irq_shutdown, + .irq_startup = apollo_irq_startup, + .irq_shutdown = apollo_irq_shutdown, };void __init dn_init_IRQ (void ) {m68k_setup_user_interrupt (VEC_USER +96 ,16 , dn_process_int); -m68k_setup_irq_controller (&apollo_irq_controller,IRQ_APOLLO ,16 ); +m68k_setup_irq_chip (&apollo_irq_chip,IRQ_APOLLO ,16 ); }
arch/m68k/atari/ataints.c +7 -8
@@ -318,7 +318,7 @@ __ALIGN_STR "\n\t"extern void atari_microwire_cmd (int cmd); -static int atari_startup_irq (unsigned int irq) +static unsigned int atari_startup_irq (unsigned int irq) {m68k_irq_startup (irq);atari_turnon_irq (irq);
@@ -336,13 +336,12 @@ static void atari_shutdown_irq(unsigned int irq) vectors[VEC_INT4 ] = falcon_hblhandler; } -static struct irq_controller atari_irq_controller = { +static struct irq_chip atari_irq_chip = { .name ="atari" , - .lock =__SPIN_LOCK_UNLOCKED (atari_irq_controller.lock), - .startup = atari_startup_irq, - .shutdown = atari_shutdown_irq, - .enable = atari_enable_irq, - .disable = atari_disable_irq, + .irq_startup = atari_startup_irq, + .irq_shutdown = atari_shutdown_irq, + .irq_enable = atari_enable_irq, + .irq_disable = atari_disable_irq, };/*
@@ -359,7 +358,7 @@ static struct irq_controller atari_irq_controller = {void __init atari_init_IRQ (void ) {m68k_setup_user_interrupt (VEC_USER ,NUM_ATARI_SOURCES -IRQ_USER ,NULL ); -m68k_setup_irq_controller (&atari_irq_controller,1 ,NUM_ATARI_SOURCES -1 ); +m68k_setup_irq_chip (&atari_irq_chip,1 ,NUM_ATARI_SOURCES -1 );/* Initialize the MFP(s) */
arch/m68k/include/asm/irq.h +7 -8
@@ -93,16 +93,15 @@ struct irq_handler {const char *devname; }; -struct irq_controller { +struct irq_chip {const char *name; -spinlock_t lock; -int (*startup)(unsigned int irq); -void (*shutdown)(unsigned int irq); -void (*enable)(unsigned int irq); -void (*disable)(unsigned int irq); +unsigned int (*irq_startup)(unsigned int irq); +void (*irq_shutdown)(unsigned int irq); +void (*irq_enable)(unsigned int irq); +void (*irq_disable)(unsigned int irq); }; -extern int m68k_irq_startup (unsigned int ); +extern unsigned int m68k_irq_startup (unsigned int );extern void m68k_irq_shutdown (unsigned int );/*
@@ -113,7 +112,7 @@ extern irq_node_t *new_irq_node(void);extern void m68k_setup_auto_interrupt (void (*handler)(unsigned int ,struct pt_regs *));extern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt,void (*handler)(unsigned int ,struct pt_regs *)); -extern void m68k_setup_irq_controller (struct irq_controller *,unsigned int ,unsigned int ); +extern void m68k_setup_irq_chip (struct irq_chip *,unsigned int ,unsigned int ); asmlinkage void m68k_handle_int(unsigned int); asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);
arch/m68k/kernel/ints.c +42 -44
231 lines not on this page · raw message
arch/m68k/mac/macints.c +4 -5
@@ -193,11 +193,10 @@ irqreturn_t mac_debug_handler(int, void *);void mac_enable_irq (unsigned int irq);void mac_disable_irq (unsigned int irq); -static struct irq_controller mac_irq_controller = { +static struct irq_chip mac_irq_chip = { .name ="mac" , - .lock =__SPIN_LOCK_UNLOCKED (mac_irq_controller.lock), - .enable = mac_enable_irq, - .disable = mac_disable_irq, + .irq_enable = mac_enable_irq, + .irq_disable = mac_disable_irq, };void __init mac_init_IRQ (void )
@@ -205,7 +204,7 @@ void __init mac_init_IRQ(void)#ifdef DEBUG_MACINTS printk ("mac_init_IRQ(): Setting things up...\n" );#endif -m68k_setup_irq_controller (&mac_irq_controller,IRQ_USER , +m68k_setup_irq_chip (&mac_irq_chip,IRQ_USER ,NUM_MAC_SOURCES -IRQ_USER );/* Make sure the SONIC interrupt is cleared or things get ugly */ #ifdef SHUTUP_SONIC
arch/m68k/q40/q40ints.c +8 -9
@@ -41,14 +41,14 @@ static void q40_disable_irq(unsigned int);unsigned short q40_ablecount[35 ];unsigned short q40_state[35 ]; -static int q40_irq_startup (unsigned int irq) +static unsigned int q40_irq_startup (unsigned int irq) {/* test for ISA ints not implemented by HW */ switch (irq) {case 1 :case 2 :case 8 :case 9 :case 11 :case 12 :case 13 :printk ("%s: ISA IRQ %d not implemented by HW\n" , __func__, irq); -return -ENXIO ; +/* FIXME return -ENXIO; */ }return 0 ; }
@@ -57,13 +57,12 @@ static void q40_irq_shutdown(unsigned int irq) { } -static struct irq_controller q40_irq_controller = { +static struct irq_chip q40_irq_chip = { .name ="q40" , - .lock =__SPIN_LOCK_UNLOCKED (q40_irq_controller.lock), - .startup = q40_irq_startup, - .shutdown = q40_irq_shutdown, - .enable = q40_enable_irq, - .disable = q40_disable_irq, + .irq_startup = q40_irq_startup, + .irq_shutdown = q40_irq_shutdown, + .irq_enable = q40_enable_irq, + .irq_disable = q40_disable_irq, };/*
@@ -81,7 +80,7 @@ static int disabled;void __init q40_init_IRQ (void ) { -m68k_setup_irq_controller (&q40_irq_controller,1 ,Q40_IRQ_MAX ); +m68k_setup_irq_chip (&q40_irq_chip,1 ,Q40_IRQ_MAX );/* setup handler for ISA ints */ m68k_setup_auto_interrupt (q40_irq_handler);
arch/m68k/sun3/sun3ints.c +6 -7
@@ -86,13 +86,12 @@ static void sun3_inthandle(unsigned int irq, struct pt_regs *fp)__m68k_handle_int (irq, fp); } -static struct irq_controller sun3_irq_controller = { +static struct irq_chip sun3_irq_chip = { .name ="sun3" , - .lock =__SPIN_LOCK_UNLOCKED (sun3_irq_controller.lock), - .startup = m68k_irq_startup, - .shutdown = m68k_irq_shutdown, - .enable = sun3_enable_irq, - .disable = sun3_disable_irq, + .irq_startup = m68k_irq_startup, + .irq_shutdown = m68k_irq_shutdown, + .irq_enable = sun3_enable_irq, + .irq_disable = sun3_disable_irq, };void __init sun3_init_IRQ (void )
@@ -100,7 +99,7 @@ void __init sun3_init_IRQ(void) *sun3_intreg =1 ;m68k_setup_auto_interrupt (sun3_inthandle); -m68k_setup_irq_controller (&sun3_irq_controller,IRQ_AUTO_1 ,7 ); +m68k_setup_irq_chip (&sun3_irq_chip,IRQ_AUTO_1 ,7 );m68k_setup_user_interrupt (VEC_USER ,128 ,NULL );if (request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL ))
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 5/28 m68k/irq: Kill irq_node_t typedef, always use struct irq_node
In reply to Geert Uytterhoeven--- arch/m68k/include/asm/irq.h | 8 ++++---- arch/m68k/kernel/ints.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-)
arch/m68k/include/asm/irq.h +4 -4
@@ -75,13 +75,13 @@ struct pt_regs;* This structure is used to chain together the ISRs for a particular * interrupt source (if it supports chaining). */ -typedef struct irq_node { +struct irq_node {irqreturn_t (*handler)(int ,void *);void *dev_id;struct irq_node *next;unsigned long flags;const char *devname; -}irq_node_t ; +};/* * This structure has only 4 elements for speed reasons
@@ -105,9 +105,9 @@ extern unsigned int m68k_irq_startup(unsigned int);extern void m68k_irq_shutdown (unsigned int );/* -* This function returns a new irq_node_t +* This function returns a new struct irq_node */ -extern irq_node_t *new_irq_node (void ); +extern struct irq_node *new_irq_node (void );extern void m68k_setup_auto_interrupt (void (*handler)(unsigned int ,struct pt_regs *)); extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
arch/m68k/kernel/ints.c +3 -3
@@ -70,7 +70,7 @@ static struct irq_chip user_irq_chip = { };#define NUM_IRQ_NODES 100 -static irq_node_t nodes[NUM_IRQ_NODES ]; +static struct irq_node nodes[NUM_IRQ_NODES ];/* * void init_IRQ(void)
@@ -160,9 +160,9 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq, irq_chip[irq + i] = contr; } -irq_node_t *new_irq_node (void ) +struct irq_node *new_irq_node (void ) { -irq_node_t *node; +struct irq_node *node;short i;for (node = nodes, i =NUM_IRQ_NODES -1 ; i >=0 ; node++, i--) {
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 6/28 m68k/irq: Rename irq_node to irq_data
In reply to Geert UytterhoevenMake it more similar to the genirq version:
- Add an irq field
--- arch/m68k/include/asm/irq.h | 9 +++++---- arch/m68k/kernel/ints.c | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-)
arch/m68k/include/asm/irq.h +5 -4
@@ -75,10 +75,11 @@ struct pt_regs;* This structure is used to chain together the ISRs for a particular * interrupt source (if it supports chaining). */ -struct irq_node { +struct irq_data { +unsigned int irq;irqreturn_t (*handler)(int ,void *);void *dev_id; -struct irq_node *next; +struct irq_data *next;unsigned long flags;const char *devname; };
@@ -105,9 +106,9 @@ extern unsigned int m68k_irq_startup(unsigned int);extern void m68k_irq_shutdown (unsigned int );/* -* This function returns a new struct irq_node +* This function returns a new struct irq_data */ -extern struct irq_node *new_irq_node (void ); +extern struct irq_data *new_irq_node (void );extern void m68k_setup_auto_interrupt (void (*handler)(unsigned int ,struct pt_regs *)); extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
arch/m68k/kernel/ints.c +11 -10
@@ -51,7 +51,7 @@ extern u32 user_irqhandler_fixup[];extern u16 user_irqvec_fixup[];/* table for system interrupt handlers */ -static struct irq_node *irq_list[NR_IRQS ]; +static struct irq_data *irq_list[NR_IRQS ];static struct irq_chip *irq_chip[NR_IRQS ];static int irq_depth[NR_IRQS ];
@@ -70,7 +70,7 @@ static struct irq_chip user_irq_chip = { };#define NUM_IRQ_NODES 100 -static struct irq_node nodes[NUM_IRQ_NODES ]; +static struct irq_data nodes[NUM_IRQ_NODES ];/* * void init_IRQ(void)
@@ -160,9 +160,9 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq, irq_chip[irq + i] = contr; } -struct irq_node *new_irq_node (void ) +struct irq_data *new_irq_node (void ) { -struct irq_node *node; +struct irq_data *node;short i;for (node = nodes, i =NUM_IRQ_NODES -1 ; i >=0 ; node++, i--) {
@@ -176,10 +176,10 @@ struct irq_node *new_irq_node(void)return NULL ; } -int setup_irq (unsigned int irq,struct irq_node *node) +int setup_irq (unsigned int irq,struct irq_data *node) {struct irq_chip *contr; -struct irq_node **prev; +struct irq_data **prev;unsigned long flags;if (irq >=NR_IRQS || !(contr = irq_chip[irq])) {
@@ -219,13 +219,14 @@ int request_irq(unsigned int irq,irq_handler_t handler, unsigned long flags, const char *devname, void *dev_id) { - struct irq_node *node; + struct irq_data *node;int res; node =new_irq_node ();if (!node)return -ENOMEM ; + node->irq = irq; node->handler = handler; node->flags = flags; node->dev_id = dev_id;
@@ -243,7 +244,7 @@ EXPORT_SYMBOL(request_irq);void free_irq (unsigned int irq,void *dev_id) {struct irq_chip *contr; -struct irq_node **p, *node; +struct irq_data **p, *node;unsigned long flags;if (irq >=NR_IRQS || !(contr = irq_chip[irq])) {
@@ -386,7 +387,7 @@ EXPORT_SYMBOL(irq_canonicalize); asmlinkage void m68k_handle_int(unsigned int irq) { -struct irq_node *node; +struct irq_data *node;kstat_cpu (0 ).irqs[irq]++; node = irq_list[irq]; do {
@@ -412,7 +413,7 @@ asmlinkage void handle_badint(struct pt_regs *regs)int show_interrupts (struct seq_file *p,void *v) {struct irq_chip *contr; -struct irq_node *node; +struct irq_data *node;int i = *(loff_t *) v;/* autovector interrupts */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 6/28 m68k/irq: Rename irq_node to irq_data
In reply to Geert UytterhoevenMake it more similar to the genirq version:
- Add an irq field
--- arch/m68k/include/asm/irq.h | 9 +++++---- arch/m68k/kernel/ints.c | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-)
arch/m68k/include/asm/irq.h +5 -4
@@ -75,10 +75,11 @@ struct pt_regs;* This structure is used to chain together the ISRs for a particular * interrupt source (if it supports chaining). */ -struct irq_node { +struct irq_data { +unsigned int irq;irqreturn_t (*handler)(int ,void *);void *dev_id; -struct irq_node *next; +struct irq_data *next;unsigned long flags;const char *devname; };
@@ -105,9 +106,9 @@ extern unsigned int m68k_irq_startup(unsigned int);extern void m68k_irq_shutdown (unsigned int );/* -* This function returns a new struct irq_node +* This function returns a new struct irq_data */ -extern struct irq_node *new_irq_node (void ); +extern struct irq_data *new_irq_node (void );extern void m68k_setup_auto_interrupt (void (*handler)(unsigned int ,struct pt_regs *)); extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
arch/m68k/kernel/ints.c +11 -10
@@ -51,7 +51,7 @@ extern u32 user_irqhandler_fixup[];extern u16 user_irqvec_fixup[];/* table for system interrupt handlers */ -static struct irq_node *irq_list[NR_IRQS ]; +static struct irq_data *irq_list[NR_IRQS ];static struct irq_chip *irq_chip[NR_IRQS ];static int irq_depth[NR_IRQS ];
@@ -70,7 +70,7 @@ static struct irq_chip user_irq_chip = { };#define NUM_IRQ_NODES 100 -static struct irq_node nodes[NUM_IRQ_NODES ]; +static struct irq_data nodes[NUM_IRQ_NODES ];/* * void init_IRQ(void)
@@ -160,9 +160,9 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq, irq_chip[irq + i] = contr; } -struct irq_node *new_irq_node (void ) +struct irq_data *new_irq_node (void ) { -struct irq_node *node; +struct irq_data *node;short i;for (node = nodes, i =NUM_IRQ_NODES -1 ; i >=0 ; node++, i--) {
@@ -176,10 +176,10 @@ struct irq_node *new_irq_node(void)return NULL ; } -int setup_irq (unsigned int irq,struct irq_node *node) +int setup_irq (unsigned int irq,struct irq_data *node) {struct irq_chip *contr; -struct irq_node **prev; +struct irq_data **prev;unsigned long flags;if (irq >=NR_IRQS || !(contr = irq_chip[irq])) {
@@ -219,13 +219,14 @@ int request_irq(unsigned int irq,irq_handler_t handler, unsigned long flags, const char *devname, void *dev_id) { - struct irq_node *node; + struct irq_data *node;int res; node =new_irq_node ();if (!node)return -ENOMEM ; + node->irq = irq; node->handler = handler; node->flags = flags; node->dev_id = dev_id;
@@ -243,7 +244,7 @@ EXPORT_SYMBOL(request_irq);void free_irq (unsigned int irq,void *dev_id) {struct irq_chip *contr; -struct irq_node **p, *node; +struct irq_data **p, *node;unsigned long flags;if (irq >=NR_IRQS || !(contr = irq_chip[irq])) {
@@ -386,7 +387,7 @@ EXPORT_SYMBOL(irq_canonicalize); asmlinkage void m68k_handle_int(unsigned int irq) { -struct irq_node *node; +struct irq_data *node;kstat_cpu (0 ).irqs[irq]++; node = irq_list[irq]; do {
@@ -412,7 +413,7 @@ asmlinkage void handle_badint(struct pt_regs *regs)int show_interrupts (struct seq_file *p,void *v) {struct irq_chip *contr; -struct irq_node *node; +struct irq_data *node;int i = *(loff_t *) v;/* autovector interrupts */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 7/28 m68k/irq: Switch irq_chip methods to "struct irq_data *data"
In reply to Geert Uytterhoeven--- arch/m68k/amiga/amiints.c | 16 ++++++++-------- arch/m68k/amiga/cia.c | 25 ++++++++++++++----------- arch/m68k/apollo/dn_ints.c | 8 ++++++-- arch/m68k/atari/ataints.c | 30 ++++++++++++++++++++++-------- arch/m68k/include/asm/irq.h | 13 +++++++------ arch/m68k/kernel/ints.c | 23 +++++++++++++++-------- arch/m68k/mac/macints.c | 14 ++++++++++++-- arch/m68k/q40/q40ints.c | 28 +++++++++++++++++----------- arch/m68k/sun3/sun3ints.c | 14 ++++++++++++-- 9 files changed, 113 insertions(+), 58 deletions(-)
arch/m68k/amiga/amiints.c +8 -8
@@ -45,8 +45,8 @@#include <asm/amigaints.h> #include <asm/amipcmcia.h> -static void amiga_enable_irq (unsigned int irq); -static void amiga_disable_irq (unsigned int irq); +static void amiga_irq_enable (struct irq_data *data); +static void amiga_irq_disable (struct irq_data *data);static irqreturn_t ami_int1 (int irq,void *dev_id);static irqreturn_t ami_int3 (int irq,void *dev_id);static irqreturn_t ami_int4 (int irq,void *dev_id);
@@ -54,8 +54,8 @@ static irqreturn_t ami_int5(int irq, void *dev_id);static struct irq_chip amiga_irq_chip = { .name ="amiga" , - .irq_enable = amiga_enable_irq, - .irq_disable = amiga_disable_irq, + .irq_enable = amiga_irq_enable, + .irq_disable = amiga_irq_disable, };/*
@@ -102,14 +102,14 @@ void __init amiga_init_IRQ(void)* internal data, that may not be changed by the interrupt at the same time. */ -static void amiga_enable_irq (unsigned int irq) +static void amiga_irq_enable (struct irq_data *data) { - amiga_custom.intena =IF_SETCLR | (1 << (irq -IRQ_USER )); + amiga_custom.intena =IF_SETCLR | (1 << (data->irq -IRQ_USER )); } -static void amiga_disable_irq (unsigned int irq) +static void amiga_irq_disable (struct irq_data *data) { - amiga_custom.intena =1 << (irq -IRQ_USER ); + amiga_custom.intena =1 << (data->irq -IRQ_USER ); }/*
arch/m68k/amiga/cia.c +14 -11
@@ -98,8 +98,9 @@ static irqreturn_t cia_handler(int irq, void *dev_id)return IRQ_HANDLED ; } -static void cia_enable_irq (unsigned int irq) +static void cia_irq_enable (struct irq_data *data) { +unsigned int irq = data->irq;unsigned char mask;if (irq >=IRQ_AMIGA_CIAB ) {
@@ -113,8 +114,10 @@ static void cia_enable_irq(unsigned int irq) } } -static void cia_disable_irq (unsigned int irq) +static void cia_irq_disable (struct irq_data *data) { +unsigned int irq = data->irq; +if (irq >=IRQ_AMIGA_CIAB )cia_able_irq (&ciab_base,1 << (irq -IRQ_AMIGA_CIAB ));else
@@ -123,8 +126,8 @@ static void cia_disable_irq(unsigned int irq)static struct irq_chip cia_irq_chip = { .name ="cia" , - .irq_enable = cia_enable_irq, - .irq_disable = cia_disable_irq, + .irq_enable = cia_irq_enable, + .irq_disable = cia_irq_disable, };/*
@@ -133,9 +136,9 @@ static struct irq_chip cia_irq_chip = {* into this chain. */ -static void auto_enable_irq (unsigned int irq) +static void auto_irq_enable (struct irq_data *data) { -switch (irq) { +switch (data->irq) {case IRQ_AUTO_2 : amiga_custom.intena =IF_SETCLR |IF_PORTS ;break ;
@@ -145,9 +148,9 @@ static void auto_enable_irq(unsigned int irq) } } -static void auto_disable_irq (unsigned int irq) +static void auto_irq_disable (struct irq_data *data) { -switch (irq) { +switch (data->irq) {case IRQ_AUTO_2 : amiga_custom.intena =IF_PORTS ;break ;
@@ -159,8 +162,8 @@ static void auto_disable_irq(unsigned int irq)static struct irq_chip auto_irq_chip = { .name ="auto" , - .irq_enable = auto_enable_irq, - .irq_disable = auto_disable_irq, + .irq_enable = auto_irq_enable, + .irq_disable = auto_irq_disable, };void __init cia_init_IRQ (struct ciabase *base)
@@ -173,7 +176,7 @@ void __init cia_init_IRQ(struct ciabase *base)/* override auto int and install CIA handler */ m68k_setup_irq_chip (&auto_irq_chip, base->handler_irq,1 ); -m68k_irq_startup (base->handler_irq); +m68k_irq_startup_irq (base->handler_irq);if (request_irq (base->handler_irq, cia_handler,IRQF_SHARED , base->name, base))pr_err ("Couldn't register %s interrupt\n" , base->name);
arch/m68k/apollo/dn_ints.c +6 -2
@@ -12,8 +12,10 @@ void dn_process_int(unsigned int irq, struct pt_regs *fp) *(volatile unsigned char *)(picb)=0x20 ; } -unsigned int apollo_irq_startup (unsigned int irq) +unsigned int apollo_irq_startup (struct irq_data *data) { +unsigned int irq = data->irq; +if (irq <8 ) *(volatile unsigned char *)(pica+1 ) &= ~(1 << irq);else
@@ -21,8 +23,10 @@ unsigned int apollo_irq_startup(unsigned int irq)return 0 ; } -void apollo_irq_shutdown (unsigned int irq) +void apollo_irq_shutdown (struct irq_data *data) { +unsigned int irq = data->irq; +if (irq <8 ) *(volatile unsigned char *)(pica+1 ) |= (1 << irq);else
arch/m68k/atari/ataints.c +22 -8
@@ -318,30 +318,44 @@ __ALIGN_STR "\n\t"extern void atari_microwire_cmd (int cmd); -static unsigned int atari_startup_irq (unsigned int irq) +static unsigned int atari_irq_startup (struct irq_data *data) { -m68k_irq_startup (irq); +unsigned int irq = data->irq; + +m68k_irq_startup (data);atari_turnon_irq (irq);atari_enable_irq (irq);return 0 ; } -static void atari_shutdown_irq (unsigned int irq) +static void atari_irq_shutdown (struct irq_data *data) { +unsigned int irq = data->irq; +atari_disable_irq (irq);atari_turnoff_irq (irq); -m68k_irq_shutdown (irq); +m68k_irq_shutdown (data);if (irq ==IRQ_AUTO_4 ) vectors[VEC_INT4 ] = falcon_hblhandler; } +static void atari_irq_enable (struct irq_data *data) +{ +atari_enable_irq (data->irq); +} + +static void atari_irq_disable (struct irq_data *data) +{ +atari_disable_irq (data->irq); +} +static struct irq_chip atari_irq_chip = { .name ="atari" , - .irq_startup = atari_startup_irq, - .irq_shutdown = atari_shutdown_irq, - .irq_enable = atari_enable_irq, - .irq_disable = atari_disable_irq, + .irq_startup = atari_irq_startup, + .irq_shutdown = atari_irq_shutdown, + .irq_enable = atari_irq_enable, + .irq_disable = atari_irq_disable, };/*
arch/m68k/include/asm/irq.h +7 -6
@@ -96,14 +96,15 @@ struct irq_handler {struct irq_chip {const char *name; -unsigned int (*irq_startup)(unsigned int irq); -void (*irq_shutdown)(unsigned int irq); -void (*irq_enable)(unsigned int irq); -void (*irq_disable)(unsigned int irq); +unsigned int (*irq_startup)(struct irq_data *data); +void (*irq_shutdown)(struct irq_data *data); +void (*irq_enable)(struct irq_data *data); +void (*irq_disable)(struct irq_data *data); }; -extern unsigned int m68k_irq_startup (unsigned int ); -extern void m68k_irq_shutdown (unsigned int ); +extern unsigned int m68k_irq_startup (struct irq_data *data); +extern unsigned int m68k_irq_startup_irq (unsigned int irq); +extern void m68k_irq_shutdown (struct irq_data *data);/* * This function returns a new struct irq_data
arch/m68k/kernel/ints.c +15 -8
@@ -203,9 +203,9 @@ int setup_irq(unsigned int irq, struct irq_data *node)if (!irq_list[irq]) {if (contr->irq_startup) - contr->irq_startup (irq); + contr->irq_startup (node);else - contr->irq_enable (irq); + contr->irq_enable (node); } node->next =NULL ; *prev = node;
@@ -270,9 +270,9 @@ void free_irq(unsigned int irq, void *dev_id)if (!irq_list[irq]) {if (contr->irq_shutdown) - contr->irq_shutdown (irq); + contr->irq_shutdown (node);else - contr->irq_disable (irq); + contr->irq_disable (node); }local_irq_restore (flags);
@@ -295,7 +295,7 @@ void enable_irq(unsigned int irq)if (irq_depth[irq]) {if (!--irq_depth[irq]) {if (contr->irq_enable) - contr->irq_enable (irq); + contr->irq_enable (irq_list[irq]); } }else WARN_ON (1 );
@@ -318,7 +318,7 @@ void disable_irq(unsigned int irq)local_irq_save (flags);if (!irq_depth[irq]++) {if (contr->irq_disable) - contr->irq_disable (irq); + contr->irq_disable (irq_list[irq]); }local_irq_restore (flags); }
@@ -329,7 +329,7 @@ void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));EXPORT_SYMBOL (disable_irq_nosync); -unsigned int m68k_irq_startup (unsigned int irq) +unsigned int m68k_irq_startup_irq (unsigned int irq) {if (irq <=IRQ_AUTO_7 ) vectors[VEC_SPUR + irq] = auto_inthandler;
@@ -338,8 +338,15 @@ unsigned int m68k_irq_startup(unsigned int irq)return 0 ; } -void m68k_irq_shutdown (unsigned int irq) +unsigned int m68k_irq_startup (struct irq_data *data) { +return m68k_irq_startup_irq (data->irq); +} + +void m68k_irq_shutdown (struct irq_data *data) +{ +unsigned int irq = data->irq; +if (irq <=IRQ_AUTO_7 ) vectors[VEC_SPUR + irq] = bad_inthandler;else
arch/m68k/mac/macints.c +12 -2
@@ -193,10 +193,20 @@ irqreturn_t mac_debug_handler(int, void *);void mac_enable_irq (unsigned int irq);void mac_disable_irq (unsigned int irq); +static void mac_irq_enable (struct irq_data *data) +{ +mac_enable_irq (data->irq); +} + +static void mac_irq_disable (struct irq_data *data) +{ +mac_disable_irq (data->irq); +} +static struct irq_chip mac_irq_chip = { .name ="mac" , - .irq_enable = mac_enable_irq, - .irq_disable = mac_disable_irq, + .irq_enable = mac_irq_enable, + .irq_disable = mac_irq_disable, };void __init mac_init_IRQ (void )
arch/m68k/q40/q40ints.c +17 -11
@@ -35,14 +35,16 @@*/ static void q40_irq_handler (unsigned int ,struct pt_regs *fp); -static void q40_enable_irq (unsigned int ); -static void q40_disable_irq (unsigned int ); +static void q40_irq_enable (struct irq_data *data); +static void q40_irq_disable (struct irq_data *data);unsigned short q40_ablecount[35 ];unsigned short q40_state[35 ]; -static unsigned int q40_irq_startup (unsigned int irq) +static unsigned int q40_irq_startup (struct irq_data *data) { +unsigned int irq = data->irq; +/* test for ISA ints not implemented by HW */ switch (irq) {case 1 :case 2 :case 8 :case 9 :
@@ -53,7 +55,7 @@ static unsigned int q40_irq_startup(unsigned int irq)return 0 ; } -static void q40_irq_shutdown (unsigned int irq) +static void q40_irq_shutdown (struct irq_data *data) { }
@@ -61,8 +63,8 @@ static struct irq_chip q40_irq_chip = { .name = "q40", .irq_startup = q40_irq_startup, .irq_shutdown = q40_irq_shutdown, - .irq_enable = q40_enable_irq, - .irq_disable = q40_disable_irq, + .irq_enable = q40_irq_enable, + .irq_disable = q40_irq_disable, };/*
@@ -85,8 +87,8 @@ void __init q40_init_IRQ(void)/* setup handler for ISA ints */ m68k_setup_auto_interrupt (q40_irq_handler); -m68k_irq_startup (IRQ_AUTO_2 ); -m68k_irq_startup (IRQ_AUTO_4 ); +m68k_irq_startup_irq (IRQ_AUTO_2 ); +m68k_irq_startup_irq (IRQ_AUTO_4 );/* now enable some ints.. */ master_outb (1 ,EXT_ENABLE_REG );/* ISA IRQ 5-15 */
@@ -292,20 +294,24 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)return ; } -void q40_enable_irq (unsigned int irq) +void q40_irq_enable (struct irq_data *data) { +unsigned int irq = data->irq; +if (irq >=5 && irq <=15 ) { mext_disabled--;if (mext_disabled >0 ) -printk ("q40_enable_irq : nested disable/enable\n" ); +printk ("q40_irq_enable : nested disable/enable\n" );if (mext_disabled ==0 )master_outb (1 ,EXT_ENABLE_REG ); } } -void q40_disable_irq (unsigned int irq) +void q40_irq_disable (struct irq_data *data) { +unsigned int irq = data->irq; +/* disable ISA iqs : only do something if the driver has been * verified to be Q40 "compatible" - right now IDE, NE2K * Any driver should not attempt to sleep across disable_irq !!
arch/m68k/sun3/sun3ints.c +12 -2
@@ -86,12 +86,22 @@ static void sun3_inthandle(unsigned int irq, struct pt_regs *fp)__m68k_handle_int (irq, fp); } +static void sun3_irq_enable (struct irq_data *data) +{ +sun3_enable_irq (data->irq); +}; + +static void sun3_irq_disable (struct irq_data *data) +{ +sun3_disable_irq (data->irq); +}; +static struct irq_chip sun3_irq_chip = { .name ="sun3" , .irq_startup = m68k_irq_startup, .irq_shutdown = m68k_irq_shutdown, - .irq_enable = sun3_enable_irq, - .irq_disable = sun3_disable_irq, + .irq_enable = sun3_irq_enable, + .irq_disable = sun3_irq_disable, };void __init sun3_init_IRQ (void )
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 7/28 m68k/irq: Switch irq_chip methods to "struct irq_data *data"
In reply to Geert Uytterhoeven--- arch/m68k/amiga/amiints.c | 16 ++++++++-------- arch/m68k/amiga/cia.c | 25 ++++++++++++++----------- arch/m68k/apollo/dn_ints.c | 8 ++++++-- arch/m68k/atari/ataints.c | 30 ++++++++++++++++++++++-------- arch/m68k/include/asm/irq.h | 13 +++++++------ arch/m68k/kernel/ints.c | 23 +++++++++++++++-------- arch/m68k/mac/macints.c | 14 ++++++++++++-- arch/m68k/q40/q40ints.c | 28 +++++++++++++++++----------- arch/m68k/sun3/sun3ints.c | 14 ++++++++++++-- 9 files changed, 113 insertions(+), 58 deletions(-)
arch/m68k/amiga/amiints.c +8 -8
@@ -45,8 +45,8 @@#include <asm/amigaints.h> #include <asm/amipcmcia.h> -static void amiga_enable_irq (unsigned int irq); -static void amiga_disable_irq (unsigned int irq); +static void amiga_irq_enable (struct irq_data *data); +static void amiga_irq_disable (struct irq_data *data);static irqreturn_t ami_int1 (int irq,void *dev_id);static irqreturn_t ami_int3 (int irq,void *dev_id);static irqreturn_t ami_int4 (int irq,void *dev_id);
@@ -54,8 +54,8 @@ static irqreturn_t ami_int5(int irq, void *dev_id);static struct irq_chip amiga_irq_chip = { .name ="amiga" , - .irq_enable = amiga_enable_irq, - .irq_disable = amiga_disable_irq, + .irq_enable = amiga_irq_enable, + .irq_disable = amiga_irq_disable, };/*
@@ -102,14 +102,14 @@ void __init amiga_init_IRQ(void)* internal data, that may not be changed by the interrupt at the same time. */ -static void amiga_enable_irq (unsigned int irq) +static void amiga_irq_enable (struct irq_data *data) { - amiga_custom.intena =IF_SETCLR | (1 << (irq -IRQ_USER )); + amiga_custom.intena =IF_SETCLR | (1 << (data->irq -IRQ_USER )); } -static void amiga_disable_irq (unsigned int irq) +static void amiga_irq_disable (struct irq_data *data) { - amiga_custom.intena =1 << (irq -IRQ_USER ); + amiga_custom.intena =1 << (data->irq -IRQ_USER ); }/*
arch/m68k/amiga/cia.c +14 -11
@@ -98,8 +98,9 @@ static irqreturn_t cia_handler(int irq, void *dev_id)return IRQ_HANDLED ; } -static void cia_enable_irq (unsigned int irq) +static void cia_irq_enable (struct irq_data *data) { +unsigned int irq = data->irq;unsigned char mask;if (irq >=IRQ_AMIGA_CIAB ) {
@@ -113,8 +114,10 @@ static void cia_enable_irq(unsigned int irq) } } -static void cia_disable_irq (unsigned int irq) +static void cia_irq_disable (struct irq_data *data) { +unsigned int irq = data->irq; +if (irq >=IRQ_AMIGA_CIAB )cia_able_irq (&ciab_base,1 << (irq -IRQ_AMIGA_CIAB ));else
@@ -123,8 +126,8 @@ static void cia_disable_irq(unsigned int irq)static struct irq_chip cia_irq_chip = { .name ="cia" , - .irq_enable = cia_enable_irq, - .irq_disable = cia_disable_irq, + .irq_enable = cia_irq_enable, + .irq_disable = cia_irq_disable, };/*
@@ -133,9 +136,9 @@ static struct irq_chip cia_irq_chip = {* into this chain. */ -static void auto_enable_irq (unsigned int irq) +static void auto_irq_enable (struct irq_data *data) { -switch (irq) { +switch (data->irq) {case IRQ_AUTO_2 : amiga_custom.intena =IF_SETCLR |IF_PORTS ;break ;
@@ -145,9 +148,9 @@ static void auto_enable_irq(unsigned int irq) } } -static void auto_disable_irq (unsigned int irq) +static void auto_irq_disable (struct irq_data *data) { -switch (irq) { +switch (data->irq) {case IRQ_AUTO_2 : amiga_custom.intena =IF_PORTS ;break ;
@@ -159,8 +162,8 @@ static void auto_disable_irq(unsigned int irq)static struct irq_chip auto_irq_chip = { .name ="auto" , - .irq_enable = auto_enable_irq, - .irq_disable = auto_disable_irq, + .irq_enable = auto_irq_enable, + .irq_disable = auto_irq_disable, };void __init cia_init_IRQ (struct ciabase *base)
@@ -173,7 +176,7 @@ void __init cia_init_IRQ(struct ciabase *base)/* override auto int and install CIA handler */ m68k_setup_irq_chip (&auto_irq_chip, base->handler_irq,1 ); -m68k_irq_startup (base->handler_irq); +m68k_irq_startup_irq (base->handler_irq);if (request_irq (base->handler_irq, cia_handler,IRQF_SHARED , base->name, base))pr_err ("Couldn't register %s interrupt\n" , base->name);
arch/m68k/apollo/dn_ints.c +6 -2
@@ -12,8 +12,10 @@ void dn_process_int(unsigned int irq, struct pt_regs *fp) *(volatile unsigned char *)(picb)=0x20 ; } -unsigned int apollo_irq_startup (unsigned int irq) +unsigned int apollo_irq_startup (struct irq_data *data) { +unsigned int irq = data->irq; +if (irq <8 ) *(volatile unsigned char *)(pica+1 ) &= ~(1 << irq);else
@@ -21,8 +23,10 @@ unsigned int apollo_irq_startup(unsigned int irq)return 0 ; } -void apollo_irq_shutdown (unsigned int irq) +void apollo_irq_shutdown (struct irq_data *data) { +unsigned int irq = data->irq; +if (irq <8 ) *(volatile unsigned char *)(pica+1 ) |= (1 << irq);else
arch/m68k/atari/ataints.c +22 -8
@@ -318,30 +318,44 @@ __ALIGN_STR "\n\t"extern void atari_microwire_cmd (int cmd); -static unsigned int atari_startup_irq (unsigned int irq) +static unsigned int atari_irq_startup (struct irq_data *data) { -m68k_irq_startup (irq); +unsigned int irq = data->irq; + +m68k_irq_startup (data);atari_turnon_irq (irq);atari_enable_irq (irq);return 0 ; } -static void atari_shutdown_irq (unsigned int irq) +static void atari_irq_shutdown (struct irq_data *data) { +unsigned int irq = data->irq; +atari_disable_irq (irq);atari_turnoff_irq (irq); -m68k_irq_shutdown (irq); +m68k_irq_shutdown (data);if (irq ==IRQ_AUTO_4 ) vectors[VEC_INT4 ] = falcon_hblhandler; } +static void atari_irq_enable (struct irq_data *data) +{ +atari_enable_irq (data->irq); +} + +static void atari_irq_disable (struct irq_data *data) +{ +atari_disable_irq (data->irq); +} +static struct irq_chip atari_irq_chip = { .name ="atari" , - .irq_startup = atari_startup_irq, - .irq_shutdown = atari_shutdown_irq, - .irq_enable = atari_enable_irq, - .irq_disable = atari_disable_irq, + .irq_startup = atari_irq_startup, + .irq_shutdown = atari_irq_shutdown, + .irq_enable = atari_irq_enable, + .irq_disable = atari_irq_disable, };/*
arch/m68k/include/asm/irq.h +7 -6
@@ -96,14 +96,15 @@ struct irq_handler {struct irq_chip {const char *name; -unsigned int (*irq_startup)(unsigned int irq); -void (*irq_shutdown)(unsigned int irq); -void (*irq_enable)(unsigned int irq); -void (*irq_disable)(unsigned int irq); +unsigned int (*irq_startup)(struct irq_data *data); +void (*irq_shutdown)(struct irq_data *data); +void (*irq_enable)(struct irq_data *data); +void (*irq_disable)(struct irq_data *data); }; -extern unsigned int m68k_irq_startup (unsigned int ); -extern void m68k_irq_shutdown (unsigned int ); +extern unsigned int m68k_irq_startup (struct irq_data *data); +extern unsigned int m68k_irq_startup_irq (unsigned int irq); +extern void m68k_irq_shutdown (struct irq_data *data);/* * This function returns a new struct irq_data
arch/m68k/kernel/ints.c +15 -8
@@ -203,9 +203,9 @@ int setup_irq(unsigned int irq, struct irq_data *node)if (!irq_list[irq]) {if (contr->irq_startup) - contr->irq_startup (irq); + contr->irq_startup (node);else - contr->irq_enable (irq); + contr->irq_enable (node); } node->next =NULL ; *prev = node;
@@ -270,9 +270,9 @@ void free_irq(unsigned int irq, void *dev_id)if (!irq_list[irq]) {if (contr->irq_shutdown) - contr->irq_shutdown (irq); + contr->irq_shutdown (node);else - contr->irq_disable (irq); + contr->irq_disable (node); }local_irq_restore (flags);
@@ -295,7 +295,7 @@ void enable_irq(unsigned int irq)if (irq_depth[irq]) {if (!--irq_depth[irq]) {if (contr->irq_enable) - contr->irq_enable (irq); + contr->irq_enable (irq_list[irq]); } }else WARN_ON (1 );
@@ -318,7 +318,7 @@ void disable_irq(unsigned int irq)local_irq_save (flags);if (!irq_depth[irq]++) {if (contr->irq_disable) - contr->irq_disable (irq); + contr->irq_disable (irq_list[irq]); }local_irq_restore (flags); }
@@ -329,7 +329,7 @@ void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));EXPORT_SYMBOL (disable_irq_nosync); -unsigned int m68k_irq_startup (unsigned int irq) +unsigned int m68k_irq_startup_irq (unsigned int irq) {if (irq <=IRQ_AUTO_7 ) vectors[VEC_SPUR + irq] = auto_inthandler;
@@ -338,8 +338,15 @@ unsigned int m68k_irq_startup(unsigned int irq)return 0 ; } -void m68k_irq_shutdown (unsigned int irq) +unsigned int m68k_irq_startup (struct irq_data *data) { +return m68k_irq_startup_irq (data->irq); +} + +void m68k_irq_shutdown (struct irq_data *data) +{ +unsigned int irq = data->irq; +if (irq <=IRQ_AUTO_7 ) vectors[VEC_SPUR + irq] = bad_inthandler;else
arch/m68k/mac/macints.c +12 -2
@@ -193,10 +193,20 @@ irqreturn_t mac_debug_handler(int, void *);void mac_enable_irq (unsigned int irq);void mac_disable_irq (unsigned int irq); +static void mac_irq_enable (struct irq_data *data) +{ +mac_enable_irq (data->irq); +} + +static void mac_irq_disable (struct irq_data *data) +{ +mac_disable_irq (data->irq); +} +static struct irq_chip mac_irq_chip = { .name ="mac" , - .irq_enable = mac_enable_irq, - .irq_disable = mac_disable_irq, + .irq_enable = mac_irq_enable, + .irq_disable = mac_irq_disable, };void __init mac_init_IRQ (void )
arch/m68k/q40/q40ints.c +17 -11
@@ -35,14 +35,16 @@*/ static void q40_irq_handler (unsigned int ,struct pt_regs *fp); -static void q40_enable_irq (unsigned int ); -static void q40_disable_irq (unsigned int ); +static void q40_irq_enable (struct irq_data *data); +static void q40_irq_disable (struct irq_data *data);unsigned short q40_ablecount[35 ];unsigned short q40_state[35 ]; -static unsigned int q40_irq_startup (unsigned int irq) +static unsigned int q40_irq_startup (struct irq_data *data) { +unsigned int irq = data->irq; +/* test for ISA ints not implemented by HW */ switch (irq) {case 1 :case 2 :case 8 :case 9 :
@@ -53,7 +55,7 @@ static unsigned int q40_irq_startup(unsigned int irq)return 0 ; } -static void q40_irq_shutdown (unsigned int irq) +static void q40_irq_shutdown (struct irq_data *data) { }
@@ -61,8 +63,8 @@ static struct irq_chip q40_irq_chip = { .name = "q40", .irq_startup = q40_irq_startup, .irq_shutdown = q40_irq_shutdown, - .irq_enable = q40_enable_irq, - .irq_disable = q40_disable_irq, + .irq_enable = q40_irq_enable, + .irq_disable = q40_irq_disable, };/*
@@ -85,8 +87,8 @@ void __init q40_init_IRQ(void)/* setup handler for ISA ints */ m68k_setup_auto_interrupt (q40_irq_handler); -m68k_irq_startup (IRQ_AUTO_2 ); -m68k_irq_startup (IRQ_AUTO_4 ); +m68k_irq_startup_irq (IRQ_AUTO_2 ); +m68k_irq_startup_irq (IRQ_AUTO_4 );/* now enable some ints.. */ master_outb (1 ,EXT_ENABLE_REG );/* ISA IRQ 5-15 */
@@ -292,20 +294,24 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)return ; } -void q40_enable_irq (unsigned int irq) +void q40_irq_enable (struct irq_data *data) { +unsigned int irq = data->irq; +if (irq >=5 && irq <=15 ) { mext_disabled--;if (mext_disabled >0 ) -printk ("q40_enable_irq : nested disable/enable\n" ); +printk ("q40_irq_enable : nested disable/enable\n" );if (mext_disabled ==0 )master_outb (1 ,EXT_ENABLE_REG ); } } -void q40_disable_irq (unsigned int irq) +void q40_irq_disable (struct irq_data *data) { +unsigned int irq = data->irq; +/* disable ISA iqs : only do something if the driver has been * verified to be Q40 "compatible" - right now IDE, NE2K * Any driver should not attempt to sleep across disable_irq !!
arch/m68k/sun3/sun3ints.c +12 -2
@@ -86,12 +86,22 @@ static void sun3_inthandle(unsigned int irq, struct pt_regs *fp)__m68k_handle_int (irq, fp); } +static void sun3_irq_enable (struct irq_data *data) +{ +sun3_enable_irq (data->irq); +}; + +static void sun3_irq_disable (struct irq_data *data) +{ +sun3_disable_irq (data->irq); +}; +static struct irq_chip sun3_irq_chip = { .name ="sun3" , .irq_startup = m68k_irq_startup, .irq_shutdown = m68k_irq_shutdown, - .irq_enable = sun3_enable_irq, - .irq_disable = sun3_disable_irq, + .irq_enable = sun3_irq_enable, + .irq_disable = sun3_irq_disable, };void __init sun3_init_IRQ (void )
Signature · 1 line
1.7.0.4
Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
Quoted 17 lines · Geert Uytterhoeven
arch/m68k/mac/macints.c +9
-0@@ -193,10 +193,20 @@ irqreturn_t mac_debug_handler(int, void *);void mac_enable_irq (unsigned int irq);void mac_disable_irq (unsigned int irq); +static void mac_irq_enable (struct irq_data *data) +{ +mac_enable_irq (data->irq); +} + +static void mac_irq_disable (struct irq_data *data) +{ +mac_disable_irq (data->irq); +}
arch/m68k/mac/macints.c irqreturn_t mac_debug_handler(int, void *); · line 212
Quoted 10 lines
arch/m68k/mac/macints.c +3
-2+static struct irq_chip mac_irq_chip = { .name ="mac" , - .irq_enable = mac_enable_irq, - .irq_disable = mac_disable_irq, + .irq_enable = mac_irq_enable, + .irq_disable = mac_irq_disable, };void __init mac_init_IRQ (void )
I wrote a patch (below) to remove these wrapper functions from the m68k-genirq branch. What do you think of it? (Perhaps fold it into the patch above?)
arch/m68k/mac/baboon.c +2 -5
@@ -23,9 +23,6 @@/* #define DEBUG_IRQS */ -extern void mac_enable_irq (unsigned int ); -extern void mac_disable_irq (unsigned int ); -int baboon_present;static volatile struct baboon *baboon;static unsigned char baboon_disabled;
@@ -152,7 +149,7 @@ void baboon_irq_enable(int irq) baboon_disabled &= ~(1 << irq_idx);if (!baboon_disabled) -mac_enable_irq (IRQ_NUBUS_C ); +mac_irq_enable (irq_get_irq_data (IRQ_NUBUS_C )); }void baboon_irq_disable (int irq)
@@ -165,7 +162,7 @@ void baboon_irq_disable(int irq) baboon_disabled |=1 << irq_idx;if (baboon_disabled) -mac_disable_irq (IRQ_NUBUS_C ); +mac_irq_disable (irq_get_irq_data (IRQ_NUBUS_C )); }void baboon_irq_clear (int irq)
arch/m68k/mac/macints.c +7 -18
@@ -190,19 +190,6 @@ irqreturn_t mac_debug_handler(int, void/* #define DEBUG_MACINTS */ -void mac_enable_irq (unsigned int irq); -void mac_disable_irq (unsigned int irq); - -static void mac_irq_enable (struct irq_data *data) -{ -mac_enable_irq (data->irq); -} - -static void mac_irq_disable (struct irq_data *data) -{ -mac_disable_irq (data->irq); -} -static struct irq_chip mac_irq_chip = { .name ="mac" , .irq_enable = mac_irq_enable,
@@ -250,16 +237,17 @@ void __init mac_init_IRQ(void) }/* -* mac_enable_irq - enable an interrupt source -* mac_disable_irq - disable an interrupt source +* mac_irq_enable - enable an interrupt source +* mac_irq_disable - disable an interrupt source * mac_clear_irq - clears a pending interrupt -* mac_pending_irq - Returns the pending status of an IRQ (nonzero = pending) +* mac_irq_pending - returns the pending status of an IRQ (nonzero = pending) * * These routines are just dispatchers to the VIA/OSS/PSC routines. */ -void mac_enable_irq (unsigned int irq) +void mac_irq_enable (struct irq_data *data) { +int irq = data->irq;int irq_src =IRQ_SRC (irq);switch (irq_src) {
@@ -292,8 +280,9 @@ void mac_enable_irq(unsigned int irq) } } -void mac_disable_irq (unsigned int irq) +void mac_irq_disable (struct irq_data *data) { +int irq = data->irq;int irq_src =IRQ_SRC (irq);switch (irq_src) {
arch/m68k/include/asm/macintosh.h +2 -0
@@ -12,6 +12,8 @@ extern void mac_reset(void);extern void mac_poweroff (void );extern void mac_init_IRQ (void );extern int mac_irq_pending (unsigned int ); +extern void mac_irq_enable (struct irq_data *data); +extern void mac_irq_disable (struct irq_data *data);/* * Floppy driver magic hook - probably shouldn't be here
Geert Uytterhoeven
maintainerRe: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
Quoted 27 lines · Finn Thain
Quoted 26 lines · Geert Uytterhoeven
arch/m68k/mac/macints.c +12
-2@@ -193,10 +193,20 @@ irqreturn_t mac_debug_handler(int, void *); void mac_enable_irq(unsigned int irq); void mac_disable_irq(unsigned int irq); +static void mac_irq_enable (struct irq_data *data) +{ + mac_enable_irq(data->irq); +} + +static void mac_irq_disable (struct irq_data *data) +{ + mac_disable_irq(data->irq); +} + static struct irq_chip mac_irq_chip = { .name = "mac", - .irq_enable = mac_enable_irq, - .irq_disable = mac_disable_irq, + .irq_enable = mac_irq_enable, + .irq_disable = mac_irq_disable, };
Quoted 6 lines
arch/m68k/mac/macints.c irqreturn_t mac_debug_handler(int, void *); · line 212
Quoted 1 line
arch/m68k/mac/macints.c +0
-0void __init mac_init_IRQ(void)I wrote a patch (below) to remove these wrapper functions from the m68k-genirq branch. What do you think of it? (Perhaps fold it into the patch above?)
I didn't remove the wrappers, as they're used outside the file.
arch/m68k/mac/baboon.c void baboon_irq_enable(int irq) · line 152
Quoted 6 lines
arch/m68k/mac/baboon.c +1
-1@@ -152,7 +149,7 @@ void baboon_irq_enable(int irq) baboon_disabled &= ~(1 << irq_idx); if (!baboon_disabled) - mac_enable_irq(IRQ_NUBUS_C); + mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));
irq_get_irq_data() is not available in the non-genirq case, so this cleanup cannot be folded in patch 7, and has to wait until after patch 27.
I'll add it at the end of the series, OK?
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
Geert Uytterhoeven
maintainerRe: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
In reply to Finn ThainQuoted 27 lines · Finn Thain
Quoted 26 lines · Geert Uytterhoeven
arch/m68k/mac/macints.c +12
-2@@ -193,10 +193,20 @@ irqreturn_t mac_debug_handler(int, void *); void mac_enable_irq(unsigned int irq); void mac_disable_irq(unsigned int irq); +static void mac_irq_enable (struct irq_data *data) +{ + mac_enable_irq(data->irq); +} + +static void mac_irq_disable (struct irq_data *data) +{ + mac_disable_irq(data->irq); +} + static struct irq_chip mac_irq_chip = { .name = "mac", - .irq_enable = mac_enable_irq, - .irq_disable = mac_disable_irq, + .irq_enable = mac_irq_enable, + .irq_disable = mac_irq_disable, };
Quoted 6 lines
arch/m68k/mac/macints.c irqreturn_t mac_debug_handler(int, void *); · line 212
Quoted 1 line
arch/m68k/mac/macints.c +0
-0void __init mac_init_IRQ(void)I wrote a patch (below) to remove these wrapper functions from the m68k-genirq branch. What do you think of it? (Perhaps fold it into the patch above?)
I didn't remove the wrappers, as they're used outside the file.
arch/m68k/mac/baboon.c void baboon_irq_enable(int irq) · line 152
Quoted 6 lines
arch/m68k/mac/baboon.c +1
-1@@ -152,7 +149,7 @@ void baboon_irq_enable(int irq) baboon_disabled &= ~(1 << irq_idx); if (!baboon_disabled) - mac_enable_irq(IRQ_NUBUS_C); + mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));
irq_get_irq_data() is not available in the non-genirq case, so this cleanup cannot be folded in patch 7, and has to wait until after patch 27.
I'll add it at the end of the series, OK?
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
Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
Quoted 11 lines · Geert Uytterhoeven
arch/m68k/mac/baboon.c void baboon_irq_enable(int irq) · line 152
Quoted 7 lines
arch/m68k/mac/baboon.c +1
-1@@ -152,7 +149,7 @@ void baboon_irq_enable(int irq) baboon_disabled &= ~(1 << irq_idx); if (!baboon_disabled) - mac_enable_irq(IRQ_NUBUS_C); + mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));
irq_get_irq_data()is not available in the non-genirq case, so this cleanup cannot be folded in patch 7, and has to wait until after patch 27.
Right, I forgot about that.
Quoted 2 lines
I'll add it at the end of the series, OK?
That's fine. Please go ahead and add my signed-off-by tag (or I can resubmit if you would prefer).
Finn
Quoted 4 lines
Gr{oetje,eeting}s,
Geert
Geert Uytterhoeven
maintainerPATCH v6 8/28 m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static
In reply to Geert UytterhoevenIt has nothing to do with the standard one in <linux/irq.h>
--- arch/m68k/kernel/ints.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/kernel/ints.c +2 -2
@@ -176,7 +176,7 @@ struct irq_data *new_irq_node(void)return NULL ; } -int setup_irq (unsigned int irq,struct irq_data *node) +static int m68k_setup_irq (unsigned int irq,struct irq_data *node) {struct irq_chip *contr;struct irq_data **prev;
@@ -232,7 +232,7 @@ int request_irq(unsigned int irq, node->dev_id = dev_id; node->devname = devname; - res =setup_irq (irq, node); + res =m68k_setup_irq (irq, node);if (res) node->handler =NULL ;
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 8/28 m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static
In reply to Geert UytterhoevenIt has nothing to do with the standard one in <linux/irq.h>
--- arch/m68k/kernel/ints.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/kernel/ints.c +2 -2
@@ -176,7 +176,7 @@ struct irq_data *new_irq_node(void)return NULL ; } -int setup_irq (unsigned int irq,struct irq_data *node) +static int m68k_setup_irq (unsigned int irq,struct irq_data *node) {struct irq_chip *contr;struct irq_data **prev;
@@ -232,7 +232,7 @@ int request_irq(unsigned int irq, node->dev_id = dev_id; node->devname = devname; - res =setup_irq (irq, node); + res =m68k_setup_irq (irq, node);if (res) node->handler =NULL ;
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 9/28 m68k/irq: Extract irq_set_chip()
In reply to Geert Uytterhoeven--- arch/m68k/kernel/ints.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
arch/m68k/kernel/ints.c +9 -3
@@ -55,6 +55,12 @@ static struct irq_data *irq_list[NR_IRQS];static struct irq_chip *irq_chip[NR_IRQS ];static int irq_depth[NR_IRQS ]; +static inline int irq_set_chip (unsigned int irq,struct irq_chip *chip) +{ + irq_chip[irq] = chip; +return 0 ; +} +static int m68k_first_user_vec;static struct irq_chip auto_irq_chip = {
@@ -94,7 +100,7 @@ void __init init_IRQ(void) }for (i =IRQ_AUTO_1 ; i <=IRQ_AUTO_7 ; i++) - irq_chip[i] = &auto_irq_chip; +irq_set_chip (i, &auto_irq_chip);mach_init_IRQ (); }
@@ -134,7 +140,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,BUG_ON (IRQ_USER + cnt >NR_IRQS ); m68k_first_user_vec = vec;for (i =0 ; i < cnt; i++) - irq_chip[IRQ_USER + i] = &user_irq_chip; +irq_set_chip (IRQ_USER + i, &user_irq_chip); *user_irqvec_fixup = vec -IRQ_USER ;if (handler) *user_irqhandler_fixup = (u32 )handler;
@@ -157,7 +163,7 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,int i;for (i =0 ; i < cnt; i++) - irq_chip[irq + i] = contr; +irq_set_chip (irq + i, contr); }struct irq_data *new_irq_node (void )
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 9/28 m68k/irq: Extract irq_set_chip()
In reply to Geert Uytterhoeven--- arch/m68k/kernel/ints.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
arch/m68k/kernel/ints.c +9 -3
@@ -55,6 +55,12 @@ static struct irq_data *irq_list[NR_IRQS];static struct irq_chip *irq_chip[NR_IRQS ];static int irq_depth[NR_IRQS ]; +static inline int irq_set_chip (unsigned int irq,struct irq_chip *chip) +{ + irq_chip[irq] = chip; +return 0 ; +} +static int m68k_first_user_vec;static struct irq_chip auto_irq_chip = {
@@ -94,7 +100,7 @@ void __init init_IRQ(void) }for (i =IRQ_AUTO_1 ; i <=IRQ_AUTO_7 ; i++) - irq_chip[i] = &auto_irq_chip; +irq_set_chip (i, &auto_irq_chip);mach_init_IRQ (); }
@@ -134,7 +140,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,BUG_ON (IRQ_USER + cnt >NR_IRQS ); m68k_first_user_vec = vec;for (i =0 ; i < cnt; i++) - irq_chip[IRQ_USER + i] = &user_irq_chip; +irq_set_chip (IRQ_USER + i, &user_irq_chip); *user_irqvec_fixup = vec -IRQ_USER ;if (handler) *user_irqhandler_fixup = (u32 )handler;
@@ -157,7 +163,7 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,int i;for (i =0 ; i < cnt; i++) - irq_chip[irq + i] = contr; +irq_set_chip (irq + i, contr); }struct irq_data *new_irq_node (void )
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 10/28 m68k/irq: Add m68k_setup_irq_controller()
In reply to Geert UytterhoevenThis is a wrapper around m68k_setup_irq_chip() that discards its dummy second parameter, to ease the future transition to genirq.
---
v3: Use handle_simple_irq() instead of handle_level_irq()
v2: Added this changeset
--- arch/m68k/amiga/amiints.c | 3 ++- arch/m68k/amiga/cia.c | 6 ++++-- arch/m68k/apollo/dn_ints.c | 3 ++- arch/m68k/atari/ataints.c | 3 ++- arch/m68k/include/asm/irq.h | 2 ++ arch/m68k/mac/macints.c | 2 +- arch/m68k/q40/q40ints.c | 3 ++- arch/m68k/sun3/sun3ints.c | 3 ++- 8 files changed, 17 insertions(+), 8 deletions(-)
arch/m68k/amiga/amiints.c +2 -1
@@ -80,7 +80,8 @@ void __init amiga_init_IRQ(void)if (request_irq (IRQ_AUTO_5 , ami_int5,0 ,"int5" ,NULL ))pr_err ("Couldn't register int%d\n" ,5 ); -m68k_setup_irq_chip (&amiga_irq_chip,IRQ_USER ,AMI_STD_IRQS ); +m68k_setup_irq_controller (&amiga_irq_chip, handle_simple_irq,IRQ_USER , +AMI_STD_IRQS );/* turn off PCMCIA interrupts */ if (AMIGAHW_PRESENT (PCMCIA ))
arch/m68k/amiga/cia.c +4 -2
@@ -168,14 +168,16 @@ static struct irq_chip auto_irq_chip = {void __init cia_init_IRQ (struct ciabase *base) { -m68k_setup_irq_chip (&cia_irq_chip, base->cia_irq,CIA_IRQS ); +m68k_setup_irq_controller (&cia_irq_chip, handle_simple_irq, + base->cia_irq,CIA_IRQS );/* clear any pending interrupt and turn off all interrupts */ cia_set_irq (base,CIA_ICR_ALL );cia_able_irq (base,CIA_ICR_ALL );/* override auto int and install CIA handler */ -m68k_setup_irq_chip (&auto_irq_chip, base->handler_irq,1 ); +m68k_setup_irq_controller (&auto_irq_chip, handle_simple_irq, + base->handler_irq,1 );m68k_irq_startup_irq (base->handler_irq);if (request_irq (base->handler_irq, cia_handler,IRQF_SHARED , base->name, base))
arch/m68k/apollo/dn_ints.c +2 -1
@@ -43,5 +43,6 @@ static struct irq_chip apollo_irq_chip = {void __init dn_init_IRQ (void ) {m68k_setup_user_interrupt (VEC_USER +96 ,16 , dn_process_int); -m68k_setup_irq_chip (&apollo_irq_chip,IRQ_APOLLO ,16 ); +m68k_setup_irq_controller (&apollo_irq_chip, handle_simple_irq, +IRQ_APOLLO ,16 ); }
arch/m68k/atari/ataints.c +2 -1
@@ -372,7 +372,8 @@ static struct irq_chip atari_irq_chip = {void __init atari_init_IRQ (void ) {m68k_setup_user_interrupt (VEC_USER ,NUM_ATARI_SOURCES -IRQ_USER ,NULL ); -m68k_setup_irq_chip (&atari_irq_chip,1 ,NUM_ATARI_SOURCES -1 ); +m68k_setup_irq_controller (&atari_irq_chip, handle_simple_irq,1 , +NUM_ATARI_SOURCES -1 );/* Initialize the MFP(s) */
arch/m68k/include/asm/irq.h +2 -0
@@ -115,6 +115,8 @@ extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_reextern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt,void (*handler)(unsigned int ,struct pt_regs *));extern void m68k_setup_irq_chip (struct irq_chip *,unsigned int ,unsigned int ); +#define m68k_setup_irq_controller (chip, dummy, irq, cnt) \ + m68k_setup_irq_chip((chip), (irq), (cnt)) asmlinkage void m68k_handle_int(unsigned int); asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);
arch/m68k/mac/macints.c +1 -1
@@ -214,7 +214,7 @@ void __init mac_init_IRQ(void)#ifdef DEBUG_MACINTS printk ("mac_init_IRQ(): Setting things up...\n" );#endif -m68k_setup_irq_chip (&mac_irq_chip,IRQ_USER , +m68k_setup_irq_controller (&mac_irq_chip, handle_simple_irq,IRQ_USER ,NUM_MAC_SOURCES -IRQ_USER );/* Make sure the SONIC interrupt is cleared or things get ugly */ #ifdef SHUTUP_SONIC
arch/m68k/q40/q40ints.c +2 -1
@@ -82,7 +82,8 @@ static int disabled;void __init q40_init_IRQ (void ) { -m68k_setup_irq_chip (&q40_irq_chip,1 ,Q40_IRQ_MAX ); +m68k_setup_irq_controller (&q40_irq_chip, handle_simple_irq,1 , +Q40_IRQ_MAX );/* setup handler for ISA ints */ m68k_setup_auto_interrupt (q40_irq_handler);
arch/m68k/sun3/sun3ints.c +2 -1
@@ -109,7 +109,8 @@ void __init sun3_init_IRQ(void) *sun3_intreg =1 ;m68k_setup_auto_interrupt (sun3_inthandle); -m68k_setup_irq_chip (&sun3_irq_chip,IRQ_AUTO_1 ,7 ); +m68k_setup_irq_controller (&sun3_irq_chip, handle_simple_irq, +IRQ_AUTO_1 ,7 );m68k_setup_user_interrupt (VEC_USER ,128 ,NULL );if (request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL ))
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 10/28 m68k/irq: Add m68k_setup_irq_controller()
In reply to Geert UytterhoevenThis is a wrapper around m68k_setup_irq_chip() that discards its dummy second parameter, to ease the future transition to genirq.
---
v3: Use handle_simple_irq() instead of handle_level_irq()
v2: Added this changeset
--- arch/m68k/amiga/amiints.c | 3 ++- arch/m68k/amiga/cia.c | 6 ++++-- arch/m68k/apollo/dn_ints.c | 3 ++- arch/m68k/atari/ataints.c | 3 ++- arch/m68k/include/asm/irq.h | 2 ++ arch/m68k/mac/macints.c | 2 +- arch/m68k/q40/q40ints.c | 3 ++- arch/m68k/sun3/sun3ints.c | 3 ++- 8 files changed, 17 insertions(+), 8 deletions(-)
arch/m68k/amiga/amiints.c +2 -1
@@ -80,7 +80,8 @@ void __init amiga_init_IRQ(void)if (request_irq (IRQ_AUTO_5 , ami_int5,0 ,"int5" ,NULL ))pr_err ("Couldn't register int%d\n" ,5 ); -m68k_setup_irq_chip (&amiga_irq_chip,IRQ_USER ,AMI_STD_IRQS ); +m68k_setup_irq_controller (&amiga_irq_chip, handle_simple_irq,IRQ_USER , +AMI_STD_IRQS );/* turn off PCMCIA interrupts */ if (AMIGAHW_PRESENT (PCMCIA ))
arch/m68k/amiga/cia.c +4 -2
@@ -168,14 +168,16 @@ static struct irq_chip auto_irq_chip = {void __init cia_init_IRQ (struct ciabase *base) { -m68k_setup_irq_chip (&cia_irq_chip, base->cia_irq,CIA_IRQS ); +m68k_setup_irq_controller (&cia_irq_chip, handle_simple_irq, + base->cia_irq,CIA_IRQS );/* clear any pending interrupt and turn off all interrupts */ cia_set_irq (base,CIA_ICR_ALL );cia_able_irq (base,CIA_ICR_ALL );/* override auto int and install CIA handler */ -m68k_setup_irq_chip (&auto_irq_chip, base->handler_irq,1 ); +m68k_setup_irq_controller (&auto_irq_chip, handle_simple_irq, + base->handler_irq,1 );m68k_irq_startup_irq (base->handler_irq);if (request_irq (base->handler_irq, cia_handler,IRQF_SHARED , base->name, base))
arch/m68k/apollo/dn_ints.c +2 -1
@@ -43,5 +43,6 @@ static struct irq_chip apollo_irq_chip = {void __init dn_init_IRQ (void ) {m68k_setup_user_interrupt (VEC_USER +96 ,16 , dn_process_int); -m68k_setup_irq_chip (&apollo_irq_chip,IRQ_APOLLO ,16 ); +m68k_setup_irq_controller (&apollo_irq_chip, handle_simple_irq, +IRQ_APOLLO ,16 ); }
arch/m68k/atari/ataints.c +2 -1
@@ -372,7 +372,8 @@ static struct irq_chip atari_irq_chip = {void __init atari_init_IRQ (void ) {m68k_setup_user_interrupt (VEC_USER ,NUM_ATARI_SOURCES -IRQ_USER ,NULL ); -m68k_setup_irq_chip (&atari_irq_chip,1 ,NUM_ATARI_SOURCES -1 ); +m68k_setup_irq_controller (&atari_irq_chip, handle_simple_irq,1 , +NUM_ATARI_SOURCES -1 );/* Initialize the MFP(s) */
arch/m68k/include/asm/irq.h +2 -0
@@ -115,6 +115,8 @@ extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_reextern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt,void (*handler)(unsigned int ,struct pt_regs *));extern void m68k_setup_irq_chip (struct irq_chip *,unsigned int ,unsigned int ); +#define m68k_setup_irq_controller (chip, dummy, irq, cnt) \ + m68k_setup_irq_chip((chip), (irq), (cnt)) asmlinkage void m68k_handle_int(unsigned int); asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *);
arch/m68k/mac/macints.c +1 -1
@@ -214,7 +214,7 @@ void __init mac_init_IRQ(void)#ifdef DEBUG_MACINTS printk ("mac_init_IRQ(): Setting things up...\n" );#endif -m68k_setup_irq_chip (&mac_irq_chip,IRQ_USER , +m68k_setup_irq_controller (&mac_irq_chip, handle_simple_irq,IRQ_USER ,NUM_MAC_SOURCES -IRQ_USER );/* Make sure the SONIC interrupt is cleared or things get ugly */ #ifdef SHUTUP_SONIC
arch/m68k/q40/q40ints.c +2 -1
@@ -82,7 +82,8 @@ static int disabled;void __init q40_init_IRQ (void ) { -m68k_setup_irq_chip (&q40_irq_chip,1 ,Q40_IRQ_MAX ); +m68k_setup_irq_controller (&q40_irq_chip, handle_simple_irq,1 , +Q40_IRQ_MAX );/* setup handler for ISA ints */ m68k_setup_auto_interrupt (q40_irq_handler);
arch/m68k/sun3/sun3ints.c +2 -1
@@ -109,7 +109,8 @@ void __init sun3_init_IRQ(void) *sun3_intreg =1 ;m68k_setup_auto_interrupt (sun3_inthandle); -m68k_setup_irq_chip (&sun3_irq_chip,IRQ_AUTO_1 ,7 ); +m68k_setup_irq_controller (&sun3_irq_chip, handle_simple_irq, +IRQ_AUTO_1 ,7 );m68k_setup_user_interrupt (VEC_USER ,128 ,NULL );if (request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL ))
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 11/28 m68k/irq: Rename {,__}m68k_handle_int()
In reply to Geert Uytterhoeven - Rename m68k_handle_int() to generic_handle_irq(), and drop the unneeded asmlinkage,
- Rename __m68k_handle_int() to do_IRQ().
---
v3: Added this changeset
--- arch/m68k/amiga/amiints.c | 24 ++++++++++++------------ arch/m68k/amiga/cia.c | 2 +- arch/m68k/apollo/dn_ints.c | 2 +- arch/m68k/include/asm/irq.h | 4 ++-- arch/m68k/kernel/entry_mm.S | 4 ++-- arch/m68k/kernel/ints.c | 10 +++++----- arch/m68k/mac/baboon.c | 2 +- arch/m68k/mac/oss.c | 4 ++-- arch/m68k/mac/psc.c | 2 +- arch/m68k/mac/via.c | 6 +++--- arch/m68k/q40/q40ints.c | 8 ++++---- arch/m68k/sun3/sun3ints.c | 2 +- 12 files changed, 35 insertions(+), 35 deletions(-)
arch/m68k/amiga/amiints.c +12 -12
@@ -124,19 +124,19 @@ static irqreturn_t ami_int1(int irq, void *dev_id)/* if serial transmit buffer empty, interrupt */ if (ints &IF_TBE ) { amiga_custom.intreq =IF_TBE ; -m68k_handle_int (IRQ_AMIGA_TBE ); +generic_handle_irq (IRQ_AMIGA_TBE ); }/* if floppy disk transfer complete, interrupt */ if (ints &IF_DSKBLK ) { amiga_custom.intreq =IF_DSKBLK ; -m68k_handle_int (IRQ_AMIGA_DSKBLK ); +generic_handle_irq (IRQ_AMIGA_DSKBLK ); }/* if software interrupt set, interrupt */ if (ints &IF_SOFT ) { amiga_custom.intreq =IF_SOFT ; -m68k_handle_int (IRQ_AMIGA_SOFT ); +generic_handle_irq (IRQ_AMIGA_SOFT ); }return IRQ_HANDLED ; }
@@ -148,19 +148,19 @@ static irqreturn_t ami_int3(int irq, void *dev_id)/* if a blitter interrupt */ if (ints &IF_BLIT ) { amiga_custom.intreq =IF_BLIT ; -m68k_handle_int (IRQ_AMIGA_BLIT ); +generic_handle_irq (IRQ_AMIGA_BLIT ); }/* if a copper interrupt */ if (ints &IF_COPER ) { amiga_custom.intreq =IF_COPER ; -m68k_handle_int (IRQ_AMIGA_COPPER ); +generic_handle_irq (IRQ_AMIGA_COPPER ); }/* if a vertical blank interrupt */ if (ints &IF_VERTB ) { amiga_custom.intreq =IF_VERTB ; -m68k_handle_int (IRQ_AMIGA_VERTB ); +generic_handle_irq (IRQ_AMIGA_VERTB ); }return IRQ_HANDLED ; }
@@ -172,25 +172,25 @@ static irqreturn_t ami_int4(int irq, void *dev_id)/* if audio 0 interrupt */ if (ints &IF_AUD0 ) { amiga_custom.intreq =IF_AUD0 ; -m68k_handle_int (IRQ_AMIGA_AUD0 ); +generic_handle_irq (IRQ_AMIGA_AUD0 ); }/* if audio 1 interrupt */ if (ints &IF_AUD1 ) { amiga_custom.intreq =IF_AUD1 ; -m68k_handle_int (IRQ_AMIGA_AUD1 ); +generic_handle_irq (IRQ_AMIGA_AUD1 ); }/* if audio 2 interrupt */ if (ints &IF_AUD2 ) { amiga_custom.intreq =IF_AUD2 ; -m68k_handle_int (IRQ_AMIGA_AUD2 ); +generic_handle_irq (IRQ_AMIGA_AUD2 ); }/* if audio 3 interrupt */ if (ints &IF_AUD3 ) { amiga_custom.intreq =IF_AUD3 ; -m68k_handle_int (IRQ_AMIGA_AUD3 ); +generic_handle_irq (IRQ_AMIGA_AUD3 ); }return IRQ_HANDLED ; }
@@ -202,13 +202,13 @@ static irqreturn_t ami_int5(int irq, void *dev_id)/* if serial receive buffer full interrupt */ if (ints &IF_RBF ) {/* acknowledge of IF_RBF must be done by the serial interrupt */ -m68k_handle_int (IRQ_AMIGA_RBF ); +generic_handle_irq (IRQ_AMIGA_RBF ); }/* if a disk sync interrupt */ if (ints &IF_DSKSYN ) { amiga_custom.intreq =IF_DSKSYN ; -m68k_handle_int (IRQ_AMIGA_DSKSYN ); +generic_handle_irq (IRQ_AMIGA_DSKSYN ); }return IRQ_HANDLED ; }
arch/m68k/amiga/cia.c +1 -1
@@ -93,7 +93,7 @@ static irqreturn_t cia_handler(int irq, void *dev_id) amiga_custom.intreq = base->int_mask;for (; ints; mach_irq++, ints >>=1 ) {if (ints &1 ) -m68k_handle_int (mach_irq); +generic_handle_irq (mach_irq); }return IRQ_HANDLED ; }
arch/m68k/apollo/dn_ints.c +1 -1
@@ -6,7 +6,7 @@void dn_process_int (unsigned int irq,struct pt_regs *fp) { -__m68k_handle_int (irq, fp); +do_IRQ (irq, fp); *(volatile unsigned char *)(pica)=0x20 ; *(volatile unsigned char *)(picb)=0x20 ;
arch/m68k/include/asm/irq.h +2 -2
@@ -118,8 +118,8 @@ extern void m68k_setup_irq_chip(struct irq_chip *, unsigned int, unsigned int);#define m68k_setup_irq_controller (chip, dummy, irq, cnt) \ m68k_setup_irq_chip((chip), (irq), (cnt)) -asmlinkage void m68k_handle_int(unsigned int); -asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *); +extern void generic_handle_irq (unsigned int ); +asmlinkage void do_IRQ(int irq, struct pt_regs *regs);#else #define irq_canonicalize (irq) (irq)
arch/m68k/kernel/entry_mm.S +2 -2
@@ -207,7 +207,7 @@ ENTRY(auto_inthandler) movel %sp,%sp@- movel %d0,%sp@- | put vector # on stack auto_irqhandler_fixup = . + 2 - jsr __m68k_handle_int | process the IRQ + jsr do_IRQ | process the IRQ addql #8,%sp | pop parameters off stack ret_from_interrupt:
@@ -241,7 +241,7 @@ user_irqvec_fixup = . + 2 movel %sp,%sp@- movel %d0,%sp@- | put vector # on stack user_irqhandler_fixup = . + 2 - jsr __m68k_handle_int | process the IRQ + jsr do_IRQ | process the IRQ addql #8,%sp | pop parameters off stack subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
arch/m68k/kernel/ints.c +5 -5
@@ -110,7 +110,7 @@ void __init init_IRQ(void)* @handler: called from auto vector interrupts * * setup the handler to be called from auto vector interrupts instead of the -* standard __m68k_handle_int(), it will be called with irq numbers in the range +* standard do_IRQ(), it will be called with irq numbers in the range * from IRQ_AUTO_1 - IRQ_AUTO_7. */ void __init m68k_setup_auto_interrupt (void (*handler)(unsigned int ,struct pt_regs *))
@@ -129,7 +129,7 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re* setup user vector interrupts, this includes activating the specified range * of interrupts, only then these interrupts can be requested (note: this is * different from auto vector interrupts). An optional handler can be installed -* to be called instead of the default __m68k_handle_int(), it will be called +* to be called instead of the default do_IRQ(), it will be called * with irq numbers starting from IRQ_USER. */ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
@@ -398,7 +398,7 @@ unsigned int irq_canonicalize(unsigned int irq)EXPORT_SYMBOL (irq_canonicalize); -asmlinkage void m68k_handle_int(unsigned int irq) +void generic_handle_irq (unsigned int irq) {struct irq_data *node;kstat_cpu (0 ).irqs[irq]++;
@@ -409,11 +409,11 @@ asmlinkage void m68k_handle_int(unsigned int irq) }while (node); } -asmlinkage void __m68k_handle_int(unsigned int irq, struct pt_regs *regs) +asmlinkage void do_IRQ(int irq, struct pt_regs *regs) {struct pt_regs *old_regs; old_regs =set_irq_regs (regs); -m68k_handle_int (irq); +generic_handle_irq (irq);set_irq_regs (old_regs); }
arch/m68k/mac/baboon.c +1 -1
@@ -72,7 +72,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id) do { if (events & irq_bit) { baboon->mb_ifr &= ~irq_bit; - m68k_handle_int(irq_num); + generic_handle_irq(irq_num); } irq_bit <<= 1; irq_num++;
arch/m68k/mac/oss.c +2 -2
@@ -113,7 +113,7 @@ static irqreturn_t oss_irq(int irq, void *dev_id)/* FIXME: call sound handler */ }else if (events &OSS_IP_SCSI ) { oss->irq_pending &= ~OSS_IP_SCSI ; -m68k_handle_int (IRQ_MAC_SCSI ); +generic_handle_irq (IRQ_MAC_SCSI ); }else {/* FIXME: error check here? */ }
@@ -148,7 +148,7 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id) irq_bit >>=1 ;if (events & irq_bit) { oss->irq_pending &= ~irq_bit; -m68k_handle_int (NUBUS_SOURCE_BASE + i); +generic_handle_irq (NUBUS_SOURCE_BASE + i); } }while (events & (irq_bit -1 ));return IRQ_HANDLED ;
arch/m68k/mac/psc.c +1 -1
@@ -152,7 +152,7 @@ irqreturn_t psc_irq(int irq, void *dev_id) do { if (events & irq_bit) { psc_write_byte(pIFR, irq_bit); - m68k_handle_int(irq_num); + generic_handle_irq(irq_num); } irq_num++; irq_bit <<= 1;
arch/m68k/mac/via.c +3 -3
@@ -460,7 +460,7 @@ irqreturn_t via1_irq(int irq, void *dev_id) do { if (events & irq_bit) { via1[vIFR] = irq_bit; - m68k_handle_int(irq_num); + generic_handle_irq(irq_num); } ++irq_num; irq_bit <<= 1;
@@ -482,7 +482,7 @@ irqreturn_t via2_irq(int irq, void *dev_id) do { if (events & irq_bit) { via2[gIFR] = irq_bit | rbv_clear; - m68k_handle_int(irq_num); + generic_handle_irq(irq_num); } ++irq_num; irq_bit <<= 1;
@@ -514,7 +514,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id) do { if (events & slot_bit) { events &= ~slot_bit; - m68k_handle_int(slot_irq); + generic_handle_irq(slot_irq); } --slot_irq; slot_bit >>= 1;
arch/m68k/q40/q40ints.c +4 -4
@@ -220,11 +220,11 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)switch (irq) {case 4 :case 6 : -__m68k_handle_int (Q40_IRQ_SAMPLE , fp); +do_IRQ (Q40_IRQ_SAMPLE , fp);return ; }if (mir &Q40_IRQ_FRAME_MASK ) { -__m68k_handle_int (Q40_IRQ_FRAME , fp); +do_IRQ (Q40_IRQ_FRAME , fp);master_outb (-1 ,FRAME_CLEAR_REG ); }if ((mir &Q40_IRQ_SER_MASK ) || (mir &Q40_IRQ_EXT_MASK )) {
@@ -259,7 +259,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) goto iirq; } q40_state[irq] |=IRQ_INPROGRESS ; -__m68k_handle_int (irq, fp); +do_IRQ (irq, fp); q40_state[irq] &= ~IRQ_INPROGRESS ;/* naively enable everything, if that fails than */
@@ -290,7 +290,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) mir =master_inb (IIRQ_REG );/* should test whether keyboard irq is really enabled, doing it in defhand */ if (mir &Q40_IRQ_KEYB_MASK ) -__m68k_handle_int (Q40_IRQ_KEYBOARD , fp); +do_IRQ (Q40_IRQ_KEYBOARD , fp);return ; }
arch/m68k/sun3/sun3ints.c +1 -1
@@ -83,7 +83,7 @@ static void sun3_inthandle(unsigned int irq, struct pt_regs *fp) { *sun3_intreg &= ~(1 << irq); -__m68k_handle_int (irq, fp); +do_IRQ (irq, fp); }static void sun3_irq_enable (struct irq_data *data)
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 11/28 m68k/irq: Rename {,__}m68k_handle_int()
In reply to Geert Uytterhoeven - Rename m68k_handle_int() to generic_handle_irq(), and drop the unneeded asmlinkage,
- Rename __m68k_handle_int() to do_IRQ().
---
v3: Added this changeset
--- arch/m68k/amiga/amiints.c | 24 ++++++++++++------------ arch/m68k/amiga/cia.c | 2 +- arch/m68k/apollo/dn_ints.c | 2 +- arch/m68k/include/asm/irq.h | 4 ++-- arch/m68k/kernel/entry_mm.S | 4 ++-- arch/m68k/kernel/ints.c | 10 +++++----- arch/m68k/mac/baboon.c | 2 +- arch/m68k/mac/oss.c | 4 ++-- arch/m68k/mac/psc.c | 2 +- arch/m68k/mac/via.c | 6 +++--- arch/m68k/q40/q40ints.c | 8 ++++---- arch/m68k/sun3/sun3ints.c | 2 +- 12 files changed, 35 insertions(+), 35 deletions(-)
arch/m68k/amiga/amiints.c +12 -12
@@ -124,19 +124,19 @@ static irqreturn_t ami_int1(int irq, void *dev_id)/* if serial transmit buffer empty, interrupt */ if (ints &IF_TBE ) { amiga_custom.intreq =IF_TBE ; -m68k_handle_int (IRQ_AMIGA_TBE ); +generic_handle_irq (IRQ_AMIGA_TBE ); }/* if floppy disk transfer complete, interrupt */ if (ints &IF_DSKBLK ) { amiga_custom.intreq =IF_DSKBLK ; -m68k_handle_int (IRQ_AMIGA_DSKBLK ); +generic_handle_irq (IRQ_AMIGA_DSKBLK ); }/* if software interrupt set, interrupt */ if (ints &IF_SOFT ) { amiga_custom.intreq =IF_SOFT ; -m68k_handle_int (IRQ_AMIGA_SOFT ); +generic_handle_irq (IRQ_AMIGA_SOFT ); }return IRQ_HANDLED ; }
@@ -148,19 +148,19 @@ static irqreturn_t ami_int3(int irq, void *dev_id)/* if a blitter interrupt */ if (ints &IF_BLIT ) { amiga_custom.intreq =IF_BLIT ; -m68k_handle_int (IRQ_AMIGA_BLIT ); +generic_handle_irq (IRQ_AMIGA_BLIT ); }/* if a copper interrupt */ if (ints &IF_COPER ) { amiga_custom.intreq =IF_COPER ; -m68k_handle_int (IRQ_AMIGA_COPPER ); +generic_handle_irq (IRQ_AMIGA_COPPER ); }/* if a vertical blank interrupt */ if (ints &IF_VERTB ) { amiga_custom.intreq =IF_VERTB ; -m68k_handle_int (IRQ_AMIGA_VERTB ); +generic_handle_irq (IRQ_AMIGA_VERTB ); }return IRQ_HANDLED ; }
@@ -172,25 +172,25 @@ static irqreturn_t ami_int4(int irq, void *dev_id)/* if audio 0 interrupt */ if (ints &IF_AUD0 ) { amiga_custom.intreq =IF_AUD0 ; -m68k_handle_int (IRQ_AMIGA_AUD0 ); +generic_handle_irq (IRQ_AMIGA_AUD0 ); }/* if audio 1 interrupt */ if (ints &IF_AUD1 ) { amiga_custom.intreq =IF_AUD1 ; -m68k_handle_int (IRQ_AMIGA_AUD1 ); +generic_handle_irq (IRQ_AMIGA_AUD1 ); }/* if audio 2 interrupt */ if (ints &IF_AUD2 ) { amiga_custom.intreq =IF_AUD2 ; -m68k_handle_int (IRQ_AMIGA_AUD2 ); +generic_handle_irq (IRQ_AMIGA_AUD2 ); }/* if audio 3 interrupt */ if (ints &IF_AUD3 ) { amiga_custom.intreq =IF_AUD3 ; -m68k_handle_int (IRQ_AMIGA_AUD3 ); +generic_handle_irq (IRQ_AMIGA_AUD3 ); }return IRQ_HANDLED ; }
@@ -202,13 +202,13 @@ static irqreturn_t ami_int5(int irq, void *dev_id)/* if serial receive buffer full interrupt */ if (ints &IF_RBF ) {/* acknowledge of IF_RBF must be done by the serial interrupt */ -m68k_handle_int (IRQ_AMIGA_RBF ); +generic_handle_irq (IRQ_AMIGA_RBF ); }/* if a disk sync interrupt */ if (ints &IF_DSKSYN ) { amiga_custom.intreq =IF_DSKSYN ; -m68k_handle_int (IRQ_AMIGA_DSKSYN ); +generic_handle_irq (IRQ_AMIGA_DSKSYN ); }return IRQ_HANDLED ; }
arch/m68k/amiga/cia.c +1 -1
@@ -93,7 +93,7 @@ static irqreturn_t cia_handler(int irq, void *dev_id) amiga_custom.intreq = base->int_mask;for (; ints; mach_irq++, ints >>=1 ) {if (ints &1 ) -m68k_handle_int (mach_irq); +generic_handle_irq (mach_irq); }return IRQ_HANDLED ; }
arch/m68k/apollo/dn_ints.c +1 -1
@@ -6,7 +6,7 @@void dn_process_int (unsigned int irq,struct pt_regs *fp) { -__m68k_handle_int (irq, fp); +do_IRQ (irq, fp); *(volatile unsigned char *)(pica)=0x20 ; *(volatile unsigned char *)(picb)=0x20 ;
arch/m68k/include/asm/irq.h +2 -2
@@ -118,8 +118,8 @@ extern void m68k_setup_irq_chip(struct irq_chip *, unsigned int, unsigned int);#define m68k_setup_irq_controller (chip, dummy, irq, cnt) \ m68k_setup_irq_chip((chip), (irq), (cnt)) -asmlinkage void m68k_handle_int(unsigned int); -asmlinkage void __m68k_handle_int(unsigned int, struct pt_regs *); +extern void generic_handle_irq (unsigned int ); +asmlinkage void do_IRQ(int irq, struct pt_regs *regs);#else #define irq_canonicalize (irq) (irq)
arch/m68k/kernel/entry_mm.S +2 -2
@@ -207,7 +207,7 @@ ENTRY(auto_inthandler) movel %sp,%sp@- movel %d0,%sp@- | put vector # on stack auto_irqhandler_fixup = . + 2 - jsr __m68k_handle_int | process the IRQ + jsr do_IRQ | process the IRQ addql #8,%sp | pop parameters off stack ret_from_interrupt:
@@ -241,7 +241,7 @@ user_irqvec_fixup = . + 2 movel %sp,%sp@- movel %d0,%sp@- | put vector # on stack user_irqhandler_fixup = . + 2 - jsr __m68k_handle_int | process the IRQ + jsr do_IRQ | process the IRQ addql #8,%sp | pop parameters off stack subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
arch/m68k/kernel/ints.c +5 -5
@@ -110,7 +110,7 @@ void __init init_IRQ(void)* @handler: called from auto vector interrupts * * setup the handler to be called from auto vector interrupts instead of the -* standard __m68k_handle_int(), it will be called with irq numbers in the range +* standard do_IRQ(), it will be called with irq numbers in the range * from IRQ_AUTO_1 - IRQ_AUTO_7. */ void __init m68k_setup_auto_interrupt (void (*handler)(unsigned int ,struct pt_regs *))
@@ -129,7 +129,7 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re* setup user vector interrupts, this includes activating the specified range * of interrupts, only then these interrupts can be requested (note: this is * different from auto vector interrupts). An optional handler can be installed -* to be called instead of the default __m68k_handle_int(), it will be called +* to be called instead of the default do_IRQ(), it will be called * with irq numbers starting from IRQ_USER. */ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
@@ -398,7 +398,7 @@ unsigned int irq_canonicalize(unsigned int irq)EXPORT_SYMBOL (irq_canonicalize); -asmlinkage void m68k_handle_int(unsigned int irq) +void generic_handle_irq (unsigned int irq) {struct irq_data *node;kstat_cpu (0 ).irqs[irq]++;
@@ -409,11 +409,11 @@ asmlinkage void m68k_handle_int(unsigned int irq) }while (node); } -asmlinkage void __m68k_handle_int(unsigned int irq, struct pt_regs *regs) +asmlinkage void do_IRQ(int irq, struct pt_regs *regs) {struct pt_regs *old_regs; old_regs =set_irq_regs (regs); -m68k_handle_int (irq); +generic_handle_irq (irq);set_irq_regs (old_regs); }
arch/m68k/mac/baboon.c +1 -1
@@ -72,7 +72,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id) do { if (events & irq_bit) { baboon->mb_ifr &= ~irq_bit; - m68k_handle_int(irq_num); + generic_handle_irq(irq_num); } irq_bit <<= 1; irq_num++;
arch/m68k/mac/oss.c +2 -2
@@ -113,7 +113,7 @@ static irqreturn_t oss_irq(int irq, void *dev_id)/* FIXME: call sound handler */ }else if (events &OSS_IP_SCSI ) { oss->irq_pending &= ~OSS_IP_SCSI ; -m68k_handle_int (IRQ_MAC_SCSI ); +generic_handle_irq (IRQ_MAC_SCSI ); }else {/* FIXME: error check here? */ }
@@ -148,7 +148,7 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id) irq_bit >>=1 ;if (events & irq_bit) { oss->irq_pending &= ~irq_bit; -m68k_handle_int (NUBUS_SOURCE_BASE + i); +generic_handle_irq (NUBUS_SOURCE_BASE + i); } }while (events & (irq_bit -1 ));return IRQ_HANDLED ;
arch/m68k/mac/psc.c +1 -1
@@ -152,7 +152,7 @@ irqreturn_t psc_irq(int irq, void *dev_id) do { if (events & irq_bit) { psc_write_byte(pIFR, irq_bit); - m68k_handle_int(irq_num); + generic_handle_irq(irq_num); } irq_num++; irq_bit <<= 1;
arch/m68k/mac/via.c +3 -3
@@ -460,7 +460,7 @@ irqreturn_t via1_irq(int irq, void *dev_id) do { if (events & irq_bit) { via1[vIFR] = irq_bit; - m68k_handle_int(irq_num); + generic_handle_irq(irq_num); } ++irq_num; irq_bit <<= 1;
@@ -482,7 +482,7 @@ irqreturn_t via2_irq(int irq, void *dev_id) do { if (events & irq_bit) { via2[gIFR] = irq_bit | rbv_clear; - m68k_handle_int(irq_num); + generic_handle_irq(irq_num); } ++irq_num; irq_bit <<= 1;
@@ -514,7 +514,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id) do { if (events & slot_bit) { events &= ~slot_bit; - m68k_handle_int(slot_irq); + generic_handle_irq(slot_irq); } --slot_irq; slot_bit >>= 1;
arch/m68k/q40/q40ints.c +4 -4
@@ -220,11 +220,11 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)switch (irq) {case 4 :case 6 : -__m68k_handle_int (Q40_IRQ_SAMPLE , fp); +do_IRQ (Q40_IRQ_SAMPLE , fp);return ; }if (mir &Q40_IRQ_FRAME_MASK ) { -__m68k_handle_int (Q40_IRQ_FRAME , fp); +do_IRQ (Q40_IRQ_FRAME , fp);master_outb (-1 ,FRAME_CLEAR_REG ); }if ((mir &Q40_IRQ_SER_MASK ) || (mir &Q40_IRQ_EXT_MASK )) {
@@ -259,7 +259,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) goto iirq; } q40_state[irq] |=IRQ_INPROGRESS ; -__m68k_handle_int (irq, fp); +do_IRQ (irq, fp); q40_state[irq] &= ~IRQ_INPROGRESS ;/* naively enable everything, if that fails than */
@@ -290,7 +290,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) mir =master_inb (IIRQ_REG );/* should test whether keyboard irq is really enabled, doing it in defhand */ if (mir &Q40_IRQ_KEYB_MASK ) -__m68k_handle_int (Q40_IRQ_KEYBOARD , fp); +do_IRQ (Q40_IRQ_KEYBOARD , fp);return ; }
arch/m68k/sun3/sun3ints.c +1 -1
@@ -83,7 +83,7 @@ static void sun3_inthandle(unsigned int irq, struct pt_regs *fp) { *sun3_intreg &= ~(1 << irq); -__m68k_handle_int (irq, fp); +do_IRQ (irq, fp); }static void sun3_irq_enable (struct irq_data *data)
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 12/28 m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
In reply to Geert UytterhoevenThe m68k core irq code stopped honoring these flags during the irq restructuring in 2006.
---
v3: Added this changeset
--- arch/m68k/amiga/amiints.c | 29 ----------------------------- arch/m68k/hp300/time.c | 2 +- arch/m68k/include/asm/irq.h | 13 ------------- arch/m68k/kernel/ints.c | 19 ------------------- arch/m68k/mac/iop.c | 10 ++++------ arch/m68k/mac/oss.c | 13 +++++-------- arch/m68k/mac/via.c | 22 ++++++++-------------- arch/m68k/mvme147/config.c | 3 +-- drivers/macintosh/via-macii.c | 2 +- drivers/macintosh/via-maciisi.c | 4 ++-- drivers/net/macsonic.c | 7 +++---- drivers/scsi/mac_scsi.c | 3 +-- drivers/tty/serial/68360serial.c | 4 ++-- 13 files changed, 28 insertions(+), 103 deletions(-)
arch/m68k/amiga/amiints.c +0 -29
@@ -4,35 +4,6 @@* This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. -* -* 11/07/96: rewritten interrupt handling, irq lists are exists now only for -* this sources where it makes sense (VERTB/PORTS/EXTER) and you must -* be careful that dev_id for this sources is unique since this the -* only possibility to distinguish between different handlers for -* free_irq. irq lists also have different irq flags: -* - IRQ_FLG_FAST: handler is inserted at top of list (after other -* fast handlers) -* - IRQ_FLG_SLOW: handler is inserted at bottom of list and before -* they're executed irq level is set to the previous -* one, but handlers don't need to be reentrant, if -* reentrance occurred, slow handlers will be just -* called again. -* The whole interrupt handling for CIAs is moved to cia.c -* /Roman Zippel -* -* 07/08/99: rewamp of the interrupt handling - we now have two types of -* interrupts, normal and fast handlers, fast handlers being -* marked with IRQF_DISABLED and runs with all other interrupts -* disabled. Normal interrupts disable their own source but -* run with all other interrupt sources enabled. -* PORTS and EXTER interrupts are always shared even if the -* drivers do not explicitly mark this when calling -* request_irq which they really should do. -* This is similar to the way interrupts are handled on all -* other architectures and makes a ton of sense besides -* having the advantage of making it easier to share -* drivers. -* /Jes */ #include <linux/init.h>
arch/m68k/hp300/time.c +1 -1
@@ -70,7 +70,7 @@ void __init hp300_sched_init(irq_handler_t vector) asmvolatile (" movpw %0,%1@(5)" : :"d" (INTVAL ),"a" (CLOCKBASE )); -if (request_irq (IRQ_AUTO_6 , hp300_tick,IRQ_FLG_STD ,"timer tick" , vector)) +if (request_irq (IRQ_AUTO_6 , hp300_tick,0 ,"timer tick" , vector))pr_err ("Couldn't register timer interrupt\n" );out_8 (CLOCKBASE +CLKCR2 ,0x1 );/* select CR1 */
arch/m68k/include/asm/irq.h +0 -13
@@ -59,19 +59,6 @@ extern unsigned int irq_canonicalize(unsigned int irq);struct pt_regs ;/* -* various flags for request_irq() - the Amiga now uses the standard -* mechanism like all other architectures - IRQF_DISABLED and -* IRQF_SHARED are your friends. -*/ -#ifndef MACH_AMIGA_ONLY -#define IRQ_FLG_LOCK (0x0001)/* handler is not replaceable */ -#define IRQ_FLG_REPLACE (0x0002)/* replace existing handler */ -#define IRQ_FLG_FAST (0x0004) -#define IRQ_FLG_SLOW (0x0008) -#define IRQ_FLG_STD (0x8000)/* internally used */ -#endif - -/* * This structure is used to chain together the ISRs for a particular * interrupt source (if it supports chaining). */
arch/m68k/kernel/ints.c +0 -19
@@ -4,25 +4,6 @@* This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. -* -* 07/03/96: Timer initialization, and thus mach_sched_init(), -* removed from request_irq() and moved to init_time(). -* We should therefore consider renaming our add_isr() and -* remove_isr() to request_irq() and free_irq() -* respectively, so they are compliant with the other -* architectures. /Jes -* 11/07/96: Changed all add_/remove_isr() to request_/free_irq() calls. -* Removed irq list support, if any machine needs an irq server -* it must implement this itself (as it's already done), instead -* only default handler are used with mach_default_handler. -* request_irq got some flags different from other architectures: -* - IRQ_FLG_REPLACE : Replace an existing handler (the default one -* can be replaced without this flag) -* - IRQ_FLG_LOCK : handler can't be replaced -* There are other machine depending flags, see there -* If you want to replace a default handler you should know what -* you're doing, since it might handle different other irq sources -* which must be served /Roman Zippel */ #include <linux/module.h>
arch/m68k/mac/iop.c +4 -6
@@ -305,15 +305,13 @@ void __init iop_register_interrupts(void) {if (iop_ism_present) {if (oss_present) { -if (request_irq (OSS_IRQLEV_IOPISM , iop_ism_irq, -IRQ_FLG_LOCK ,"ISM IOP" , - (void *)IOP_NUM_ISM )) +if (request_irq (OSS_IRQLEV_IOPISM , iop_ism_irq,0 , +"ISM IOP" , (void *)IOP_NUM_ISM ))pr_err ("Couldn't register ISM IOP interrupt\n" );oss_irq_enable (IRQ_MAC_ADB ); }else { -if (request_irq (IRQ_VIA2_0 , iop_ism_irq, -IRQ_FLG_LOCK |IRQ_FLG_FAST ,"ISM IOP" , - (void *)IOP_NUM_ISM )) +if (request_irq (IRQ_VIA2_0 , iop_ism_irq,0 ,"ISM IOP" , + (void *)IOP_NUM_ISM ))pr_err ("Couldn't register ISM IOP interrupt\n" ); }if (!iop_alive (iop_base[IOP_NUM_ISM ])) {
arch/m68k/mac/oss.c +5 -8
@@ -65,17 +65,14 @@ void __init oss_init(void)void __init oss_register_interrupts (void ) { -if (request_irq (OSS_IRQLEV_SCSI , oss_irq,IRQ_FLG_LOCK , -"scsi" , (void *) oss)) +if (request_irq (OSS_IRQLEV_SCSI , oss_irq,0 ,"scsi" , (void *)oss))pr_err ("Couldn't register %s interrupt\n" ,"scsi" ); -if (request_irq (OSS_IRQLEV_NUBUS , oss_nubus_irq,IRQ_FLG_LOCK , -"nubus" , (void *) oss)) +if (request_irq (OSS_IRQLEV_NUBUS , oss_nubus_irq,0 ,"nubus" , + (void *)oss))pr_err ("Couldn't register %s interrupt\n" ,"nubus" ); -if (request_irq (OSS_IRQLEV_SOUND , oss_irq,IRQ_FLG_LOCK , -"sound" , (void *) oss)) +if (request_irq (OSS_IRQLEV_SOUND , oss_irq,0 ,"sound" , (void *)oss))pr_err ("Couldn't register %s interrupt\n" ,"sound" ); -if (request_irq (OSS_IRQLEV_VIA1 , via1_irq,IRQ_FLG_LOCK , -"via1" , (void *) via1)) +if (request_irq (OSS_IRQLEV_VIA1 , via1_irq,0 ,"via1" , (void *)via1))pr_err ("Couldn't register %s interrupt\n" ,"via1" ); }
arch/m68k/mac/via.c +8 -14
@@ -281,7 +281,7 @@ void __init via_init_clock(irq_handler_t func) via1[vT1CL] =MAC_CLOCK_LOW ; via1[vT1CH] =MAC_CLOCK_HIGH ; -if (request_irq (IRQ_MAC_TIMER_1 , func,IRQ_FLG_LOCK ,"timer" , func)) +if (request_irq (IRQ_MAC_TIMER_1 , func,0 ,"timer" , func))pr_err ("Couldn't register %s interrupt\n" ,"timer" ); }
@@ -292,25 +292,19 @@ void __init via_init_clock(irq_handler_t func)void __init via_register_interrupts (void ) {if (via_alt_mapping) { -if (request_irq (IRQ_AUTO_1 , via1_irq, -IRQ_FLG_LOCK |IRQ_FLG_FAST ,"software" , - (void *) via1)) +if (request_irq (IRQ_AUTO_1 , via1_irq,0 ,"software" , + (void *)via1))pr_err ("Couldn't register %s interrupt\n" ,"software" ); -if (request_irq (IRQ_AUTO_6 , via1_irq, -IRQ_FLG_LOCK |IRQ_FLG_FAST ,"via1" , - (void *) via1)) +if (request_irq (IRQ_AUTO_6 , via1_irq,0 ,"via1" , (void *)via1))pr_err ("Couldn't register %s interrupt\n" ,"via1" ); }else { -if (request_irq (IRQ_AUTO_1 , via1_irq, -IRQ_FLG_LOCK |IRQ_FLG_FAST ,"via1" , - (void *) via1)) +if (request_irq (IRQ_AUTO_1 , via1_irq,0 ,"via1" , (void *)via1))pr_err ("Couldn't register %s interrupt\n" ,"via1" ); } -if (request_irq (IRQ_AUTO_2 , via2_irq,IRQ_FLG_LOCK |IRQ_FLG_FAST , -"via2" , (void *) via2)) +if (request_irq (IRQ_AUTO_2 , via2_irq,0 ,"via2" , (void *)via2))pr_err ("Couldn't register %s interrupt\n" ,"via2" ); -if (request_irq (IRQ_MAC_NUBUS , via_nubus_irq, -IRQ_FLG_LOCK |IRQ_FLG_FAST ,"nubus" , (void *) via2)) +if (request_irq (IRQ_MAC_NUBUS , via_nubus_irq,0 ,"nubus" , + (void *)via2))pr_err ("Couldn't register %s interrupt\n" ,"nubus" ); }
arch/m68k/mvme147/config.c +1 -2
@@ -114,8 +114,7 @@ static irqreturn_t mvme147_timer_int (int irq, void *dev_id)void mvme147_sched_init (irq_handler_t timer_routine) { tick_handler = timer_routine; -if (request_irq (PCC_IRQ_TIMER1 , mvme147_timer_int,IRQ_FLG_REPLACE , -"timer 1" ,NULL )) +if (request_irq (PCC_IRQ_TIMER1 , mvme147_timer_int,0 ,"timer 1" ,NULL ))pr_err ("Couldn't register timer interrupt\n" );/* Init the clock with a value */
drivers/macintosh/via-macii.c +1 -1
@@ -159,7 +159,7 @@ int macii_init(void) err =macii_init_via ();if (err) goto out; - err =request_irq (IRQ_MAC_ADB , macii_interrupt,IRQ_FLG_LOCK ,"ADB" , + err =request_irq (IRQ_MAC_ADB , macii_interrupt,0 ,"ADB" , macii_interrupt);if (err) goto out;
drivers/macintosh/via-maciisi.c +2 -2
@@ -122,8 +122,8 @@ maciisi_init(void)return err; } -if (request_irq (IRQ_MAC_ADB , maciisi_interrupt,IRQ_FLG_LOCK |IRQ_FLG_FAST , -"ADB" , maciisi_interrupt)) { +if (request_irq (IRQ_MAC_ADB , maciisi_interrupt,0 ,"ADB" , + maciisi_interrupt)) {printk (KERN_ERR "maciisi_init: can't get irq %d\n" ,IRQ_MAC_ADB );return -EAGAIN ; }
drivers/net/macsonic.c +3 -4
@@ -142,8 +142,7 @@ static int macsonic_open(struct net_device* dev) {int retval; - retval =request_irq (dev->irq, sonic_interrupt,IRQ_FLG_FAST , -"sonic" , dev); + retval =request_irq (dev->irq, sonic_interrupt,0 ,"sonic" , dev);if (retval) {printk (KERN_ERR "%s: unable to get IRQ %d.\n" , dev->name, dev->irq);
@@ -154,8 +153,8 @@ static int macsonic_open(struct net_device* dev)* rupt as well, which must prevent re-entrance of the sonic handler. */ if (dev->irq ==IRQ_AUTO_3 ) { - retval =request_irq (IRQ_NUBUS_9 , macsonic_interrupt, -IRQ_FLG_FAST ,"sonic" , dev); + retval =request_irq (IRQ_NUBUS_9 , macsonic_interrupt,0 , +"sonic" , dev);if (retval) {printk (KERN_ERR "%s: unable to get IRQ %d.\n" , dev->name,IRQ_NUBUS_9 );
drivers/scsi/mac_scsi.c +1 -2
@@ -291,8 +291,7 @@ int __init macscsi_detect(struct scsi_host_template * tpnt) ((struct NCR5380_hostdata *)instance->hostdata)->ctrl =0 ;if (instance->irq !=SCSI_IRQ_NONE ) -if (request_irq (instance->irq, NCR5380_intr,IRQ_FLG_SLOW , -"ncr5380" , instance)) { +if (request_irq (instance->irq, NCR5380_intr,0 ,"ncr5380" , instance)) {printk (KERN_WARNING "scsi%d: IRQ%d not free, interrupts disabled\n" , instance->host_no, instance->irq); instance->irq =SCSI_IRQ_NONE ;
drivers/tty/serial/68360serial.c +2 -2
@@ -2771,8 +2771,8 @@ static int __init rs_360_init(void)*/ /* cpm_install_handler(IRQ_MACHSPEC | state->irq, rs_360_interrupt, info); */ /*request_irq(IRQ_MACHSPEC | state->irq, rs_360_interrupt, */ -request_irq (state->irq, rs_360_interrupt, -IRQ_FLG_LOCK ,"ttyS" , (void *)info); +request_irq (state->irq, rs_360_interrupt,0 ,"ttyS" , + (void *)info);/* Set up the baud rate generator. */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 13/28 m68k/irq: Add genirq support
In reply to Geert UytterhoevenDisabled on all platforms for now
[v1] Acked-by: Thomas Gleixner <[email protected]>
---
v6:
- Keep irq_canonicalize(), which is needed for ac3200, atari_91C111,
serial_core, and 8250.
v5:
- Keep m68k_setup_auto_interrupt(), it's still needed for Q40
v3:
- Wrapper __m68k_handle_int() for do_IRQ() is no longer needed
- Use handle_simple_irq() instead of handle_level_irq(), which also means we don't need the .irq_{,un}mask methods anymore, so they can be removed again.
- Keep track of spurious interrupts
v2:
- Add missing "irq" offset in m68k_setup_irq_controller()
- Set up default handlers for autovector interrupts, and fill in missing
.irq_{,un}mask methods,
---
arch/m68k/Kconfig.mmu | 16 ++++++++++++
arch/m68k/include/asm/hardirq.h | 5 +++
arch/m68k/include/asm/irq.h | 35 +++++++++++++++++++++----
arch/m68k/kernel/Makefile_mm | 5 +++-
arch/m68k/kernel/ints.c | 52 ++++++++++++++++++++++++++++++++++++++-
5 files changed, 105 insertions(+), 8 deletions(-)arch/m68k/Kconfig.mmu +16 -0
@@ -198,6 +198,22 @@ config SUN3 If you don't want to compile a kernel exclusively for a Sun 3, say N. +config USE_GENERIC_HARDIRQS + bool "Use genirq" + depends on !AMIGA + depends on !ATARI + depends on !MAC + depends on !APOLLO + depends on !MVME147 + depends on !MVME16x + depends on !BVME6000 + depends on !HP300 + depends on !SUN3X + depends on !Q40 + depends on !SUN3 + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW + config NATFEAT bool "ARAnyM emulator support" depends on ATARI
arch/m68k/include/asm/hardirq.h +5 -0
@@ -18,6 +18,11 @@ #ifdef CONFIG_MMU +static inline void ack_bad_irq(unsigned int irq) +{ + pr_crit("unexpected IRQ trap at vector %02x\n", irq); +} + /* entry.S is sensitive to the offsets of these fields */ typedef struct { unsigned int __softirq_pending;
arch/m68k/include/asm/irq.h +29 -6
@@ -27,11 +27,6 @@#ifdef CONFIG_MMU -#include <linux/linkage.h> -#include <linux/hardirq.h> -#include <linux/irqreturn.h> -#include <linux/spinlock_types.h> -/* * Interrupt source definitions * General interrupt sources are the level 1-7.
@@ -54,7 +49,12 @@#define IRQ_USER 8 -extern unsigned int irq_canonicalize (unsigned int irq); +#ifndef CONFIG_GENERIC_HARDIRQS + +#include <linux/linkage.h> +#include <linux/hardirq.h> +#include <linux/irqreturn.h> +#include <linux/spinlock_types.h> struct pt_regs ;
@@ -108,10 +108,33 @@ extern void m68k_setup_irq_chip(struct irq_chip *, unsigned int, unsigned int);extern void generic_handle_irq (unsigned int ); asmlinkage void do_IRQ(int irq, struct pt_regs *regs); +#else /* CONFIG_GENERIC_HARDIRQS */ + +struct irq_data ; +struct irq_chip ; +struct irq_desc ; +extern unsigned int m68k_irq_startup (struct irq_data *data); +extern unsigned int m68k_irq_startup_irq (unsigned int irq); +extern void m68k_irq_shutdown (struct irq_data *data); +extern void m68k_setup_auto_interrupt (void (*handler)(unsigned int , +struct pt_regs *)); +extern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt, +void (*handler)(unsigned int , +struct pt_regs *)); +extern void m68k_setup_irq_controller (struct irq_chip *, +void (*handle)(unsigned int irq, +struct irq_desc *desc), +unsigned int irq,unsigned int cnt); + +#endif /* CONFIG_GENERIC_HARDIRQS */ + +extern unsigned int irq_canonicalize (unsigned int irq); +#else #define irq_canonicalize (irq) (irq)#endif /* CONFIG_MMU */ asmlinkage void do_IRQ(int irq, struct pt_regs *regs); +extern atomic_t irq_err_count;#endif /* _M68K_IRQ_H_ */
arch/m68k/kernel/Makefile_mm +4 -1
@@ -10,8 +10,11 @@ endif extra-y += vmlinux.lds obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \ - sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o + sys_m68k.o time.o setup.o m68k_ksyms.o syscalltable.o devres-y = ../../../kernel/irq/devres.o obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo + +obj-y$(CONFIG_GENERIC_HARDIRQS) += devres.o +obj-$(CONFIG_GENERIC_HARDIRQS) += irq.o
arch/m68k/kernel/ints.c +51 -1
111 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 13/28 m68k/irq: Add genirq support
In reply to Geert UytterhoevenDisabled on all platforms for now
[v1] Acked-by: Thomas Gleixner <[email protected]>
---
v6:
- Keep irq_canonicalize(), which is needed for ac3200, atari_91C111,
serial_core, and 8250.
v5:
- Keep m68k_setup_auto_interrupt(), it's still needed for Q40
v3:
- Wrapper __m68k_handle_int() for do_IRQ() is no longer needed
- Use handle_simple_irq() instead of handle_level_irq(), which also means we don't need the .irq_{,un}mask methods anymore, so they can be removed again.
- Keep track of spurious interrupts
v2:
- Add missing "irq" offset in m68k_setup_irq_controller()
- Set up default handlers for autovector interrupts, and fill in missing
.irq_{,un}mask methods,
---
arch/m68k/Kconfig.mmu | 16 ++++++++++++
arch/m68k/include/asm/hardirq.h | 5 +++
arch/m68k/include/asm/irq.h | 35 +++++++++++++++++++++----
arch/m68k/kernel/Makefile_mm | 5 +++-
arch/m68k/kernel/ints.c | 52 ++++++++++++++++++++++++++++++++++++++-
5 files changed, 105 insertions(+), 8 deletions(-)arch/m68k/Kconfig.mmu +16 -0
@@ -198,6 +198,22 @@ config SUN3 If you don't want to compile a kernel exclusively for a Sun 3, say N. +config USE_GENERIC_HARDIRQS + bool "Use genirq" + depends on !AMIGA + depends on !ATARI + depends on !MAC + depends on !APOLLO + depends on !MVME147 + depends on !MVME16x + depends on !BVME6000 + depends on !HP300 + depends on !SUN3X + depends on !Q40 + depends on !SUN3 + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW + config NATFEAT bool "ARAnyM emulator support" depends on ATARI
arch/m68k/include/asm/hardirq.h +5 -0
@@ -18,6 +18,11 @@ #ifdef CONFIG_MMU +static inline void ack_bad_irq(unsigned int irq) +{ + pr_crit("unexpected IRQ trap at vector %02x\n", irq); +} + /* entry.S is sensitive to the offsets of these fields */ typedef struct { unsigned int __softirq_pending;
arch/m68k/include/asm/irq.h +29 -6
@@ -27,11 +27,6 @@#ifdef CONFIG_MMU -#include <linux/linkage.h> -#include <linux/hardirq.h> -#include <linux/irqreturn.h> -#include <linux/spinlock_types.h> -/* * Interrupt source definitions * General interrupt sources are the level 1-7.
@@ -54,7 +49,12 @@#define IRQ_USER 8 -extern unsigned int irq_canonicalize (unsigned int irq); +#ifndef CONFIG_GENERIC_HARDIRQS + +#include <linux/linkage.h> +#include <linux/hardirq.h> +#include <linux/irqreturn.h> +#include <linux/spinlock_types.h> struct pt_regs ;
@@ -108,10 +108,33 @@ extern void m68k_setup_irq_chip(struct irq_chip *, unsigned int, unsigned int);extern void generic_handle_irq (unsigned int ); asmlinkage void do_IRQ(int irq, struct pt_regs *regs); +#else /* CONFIG_GENERIC_HARDIRQS */ + +struct irq_data ; +struct irq_chip ; +struct irq_desc ; +extern unsigned int m68k_irq_startup (struct irq_data *data); +extern unsigned int m68k_irq_startup_irq (unsigned int irq); +extern void m68k_irq_shutdown (struct irq_data *data); +extern void m68k_setup_auto_interrupt (void (*handler)(unsigned int , +struct pt_regs *)); +extern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt, +void (*handler)(unsigned int , +struct pt_regs *)); +extern void m68k_setup_irq_controller (struct irq_chip *, +void (*handle)(unsigned int irq, +struct irq_desc *desc), +unsigned int irq,unsigned int cnt); + +#endif /* CONFIG_GENERIC_HARDIRQS */ + +extern unsigned int irq_canonicalize (unsigned int irq); +#else #define irq_canonicalize (irq) (irq)#endif /* CONFIG_MMU */ asmlinkage void do_IRQ(int irq, struct pt_regs *regs); +extern atomic_t irq_err_count;#endif /* _M68K_IRQ_H_ */
arch/m68k/kernel/Makefile_mm +4 -1
@@ -10,8 +10,11 @@ endif extra-y += vmlinux.lds obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \ - sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o + sys_m68k.o time.o setup.o m68k_ksyms.o syscalltable.o devres-y = ../../../kernel/irq/devres.o obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo + +obj-y$(CONFIG_GENERIC_HARDIRQS) += devres.o +obj-$(CONFIG_GENERIC_HARDIRQS) += irq.o
arch/m68k/kernel/ints.c +51 -1
111 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 14/28 m68k/atari: Convert Atari to genirq
In reply to Geert Uytterhoeven[v1] Acked-by: Thomas Gleixner <[email protected]>
---
v3: With handle_simple_irq(), we don't need the .irq_{,un}mask methods anymore,
hence the conversion to genirq becomes trivial.
--- arch/m68k/Kconfig.mmu | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -201,7 +201,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" depends on !AMIGA - depends on !ATARI depends on !MAC depends on !APOLLO depends on !MVME147
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 15/28 m68k/atari: Remove code and comments about different irq types
In reply to Geert UytterhoevenThis code was obsoleted during the irq restructuring in 2006.
---
v4: Added this changeset
--- arch/m68k/atari/ataints.c | 236 --------------------------------------------- 1 files changed, 0 insertions(+), 236 deletions(-)
arch/m68k/atari/ataints.c +0 -236
@@ -60,244 +60,8 @@* <asm/atariints.h>): Autovector interrupts are 1..7, then follow ST-MFP, * TT-MFP, SCC, and finally VME interrupts. Vector numbers for the latter can * be allocated by atari_register_vme_int(). -* -* Each interrupt can be of three types: -* -* - SLOW: The handler runs with all interrupts enabled, except the one it -* was called by (to avoid reentering). This should be the usual method. -* But it is currently possible only for MFP ints, since only the MFP -* offers an easy way to mask interrupts. -* -* - FAST: The handler runs with all interrupts disabled. This should be used -* only for really fast handlers, that just do actions immediately -* necessary, and let the rest do a bottom half or task queue. -* -* - PRIORITIZED: The handler can be interrupted by higher-level ints -* (greater IPL, no MFP priorities!). This is the method of choice for ints -* which should be slow, but are not from a MFP. -* -* The feature of more than one handler for one int source is still there, but -* only applicable if all handers are of the same type. To not slow down -* processing of ints with only one handler by the chaining feature, the list -* calling function atari_call_irq_list() is only plugged in at the time the -* second handler is registered. -* -* Implementation notes: For fast-as-possible int handling, there are separate -* entry points for each type (slow/fast/prio). The assembler handler calls -* the irq directly in the usual case, no C wrapper is involved. In case of -* multiple handlers, atari_call_irq_list() is registered as handler and calls -* in turn the real irq's. To ease access from assembler level to the irq -* function pointer and accompanying data, these two are stored in a separate -* array, irq_handler[]. The rest of data (type, name) are put into a second -* array, irq_param, that is accessed from C only. For each slow interrupt (32 -* in all) there are separate handler functions, which makes it possible to -* hard-code the MFP register address and value, are necessary to mask the -* int. If there'd be only one generic function, lots of calculations would be -* needed to determine MFP register and int mask from the vector number :-( -* -* Furthermore, slow ints may not lower the IPL below its previous value -* (before the int happened). This is needed so that an int of class PRIO, on -* that this int may be stacked, cannot be reentered. This feature is -* implemented as follows: If the stack frame format is 1 (throwaway), the int -* is not stacked, and the IPL is anded with 0xfbff, resulting in a new level -* 2, which still blocks the HSYNC, but no interrupts of interest. If the -* frame format is 0, the int is nested, and the old IPL value can be found in -* the sr copy in the frame. */ -#if 0 - -#define NUM_INT_SOURCES (8 + NUM_ATARI_SOURCES) - -typedef void (*asm_irq_handler )(void ); - -struct irqhandler { -irqreturn_t (*handler)(int ,void *,struct pt_regs *); -void *dev_id; -}; - -struct irqparam { -unsigned long flags; -const char *devname; -}; - -/* -* Array with irq's and their parameter data. This array is accessed from low -* level assembler code, so an element size of 8 allows usage of index scaling -* addressing mode. -*/ -static struct irqhandler irq_handler[NUM_INT_SOURCES ]; - -/* -* This array hold the rest of parameters of int handlers: type -* (slow,fast,prio) and the name of the handler. These values are only -* accessed from C -*/ -static struct irqparam irq_param[NUM_INT_SOURCES ]; - -/* check for valid int number (complex, sigh...) */ -#define IS_VALID_INTNO (n) \ - ((n) > 0 && \ -/* autovec and ST-MFP ok anyway */ \ - (((n) < TTMFP_SOURCE_BASE) || \ - /* TT-MFP ok if present */ \ - ((n) >= TTMFP_SOURCE_BASE && (n) < SCC_SOURCE_BASE && \ - ATARIHW_PRESENT(TT_MFP)) || \ - /* SCC ok if present and number even */ \ - ((n) >= SCC_SOURCE_BASE && (n) < VME_SOURCE_BASE && \ - !((n) & 1) && ATARIHW_PRESENT(SCC)) || \ - /* greater numbers ok if they are registered VME vectors */ \ - ((n) >= VME_SOURCE_BASE && (n) < VME_SOURCE_BASE + VME_MAX_SOURCES && \ - free_vme_vec_bitmap & (1 << ((n) - VME_SOURCE_BASE))))) - - -/* -* Here start the assembler entry points for interrupts -*/ - -#define IRQ_NAME (nr) atari_slow_irq_##nr##_handler(void) - -#define BUILD_SLOW_IRQ(n) \ -asmlinkage void IRQ_NAME(n); \ -/* Dummy function to allow asm with operands. */ \ -void atari_slow_irq_##n##_dummy (void) { \ -__asm__ (__ALIGN_STR "\n" \ -"atari_slow_irq_" #n "_handler:\t" \ -" addl %6,%5\n" /* preempt_count() += HARDIRQ_OFFSET */ \ -SAVE_ALL_INT "\n" \ - GET_CURRENT(%%d0) "\n" \ -" andb #~(1<<(%c3&7)),%a4:w\n"/* mask this interrupt */ \ -/* get old IPL from stack frame */ \ -" bfextu %%sp@(%c2){#5,#3},%%d0\n" \ -" movew %%sr,%%d1\n" \ -" bfins %%d0,%%d1{#21,#3}\n" \ -" movew %%d1,%%sr\n" /* set IPL = previous value */ \ -" addql #1,%a0\n" \ -" lea %a1,%%a0\n" \ -" pea %%sp@\n" /* push addr of frame */ \ -" movel %%a0@(4),%%sp@-\n" /* push handler data */ \ -" pea (%c3+8)\n" /* push int number */ \ -" movel %%a0@,%%a0\n" \ -" jbsr %%a0@\n" /* call the handler */ \ -" addql #8,%%sp\n" \ -" addql #4,%%sp\n" \ -" orw #0x0600,%%sr\n" \ -" andw #0xfeff,%%sr\n" /* set IPL = 6 again */ \ -" orb #(1<<(%c3&7)),%a4:w\n" /* now unmask the int again */ \ -" jbra ret_from_interrupt\n" \ - : : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]), \ -"n" (PT_OFF_SR ),"n" (n), \ -"i" (n &8 ? (n &16 ? &tt_mfp.int_mk_a : &st_mfp.int_mk_a) \ - : (n &16 ? &tt_mfp.int_mk_b : &st_mfp.int_mk_b)), \ -"m" (preempt_count ()),"di" (HARDIRQ_OFFSET ) \ -); \ -for (;;);/* fake noreturn */ \ -} - -BUILD_SLOW_IRQ (0 ); -BUILD_SLOW_IRQ (1 ); -BUILD_SLOW_IRQ (2 ); -BUILD_SLOW_IRQ (3 ); -BUILD_SLOW_IRQ (4 ); -BUILD_SLOW_IRQ (5 ); -BUILD_SLOW_IRQ (6 ); -BUILD_SLOW_IRQ (7 ); -BUILD_SLOW_IRQ (8 ); -BUILD_SLOW_IRQ (9 ); -BUILD_SLOW_IRQ (10 ); -BUILD_SLOW_IRQ (11 ); -BUILD_SLOW_IRQ (12 ); -BUILD_SLOW_IRQ (13 ); -BUILD_SLOW_IRQ (14 ); -BUILD_SLOW_IRQ (15 ); -BUILD_SLOW_IRQ (16 ); -BUILD_SLOW_IRQ (17 ); -BUILD_SLOW_IRQ (18 ); -BUILD_SLOW_IRQ (19 ); -BUILD_SLOW_IRQ (20 ); -BUILD_SLOW_IRQ (21 ); -BUILD_SLOW_IRQ (22 ); -BUILD_SLOW_IRQ (23 ); -BUILD_SLOW_IRQ (24 ); -BUILD_SLOW_IRQ (25 ); -BUILD_SLOW_IRQ (26 ); -BUILD_SLOW_IRQ (27 ); -BUILD_SLOW_IRQ (28 ); -BUILD_SLOW_IRQ (29 ); -BUILD_SLOW_IRQ (30 ); -BUILD_SLOW_IRQ (31 ); - -asm_irq_handler slow_handlers[32 ] = { - [0 ] = atari_slow_irq_0_handler, - [1 ] = atari_slow_irq_1_handler, - [2 ] = atari_slow_irq_2_handler, - [3 ] = atari_slow_irq_3_handler, - [4 ] = atari_slow_irq_4_handler, - [5 ] = atari_slow_irq_5_handler, - [6 ] = atari_slow_irq_6_handler, - [7 ] = atari_slow_irq_7_handler, - [8 ] = atari_slow_irq_8_handler, - [9 ] = atari_slow_irq_9_handler, - [10 ] = atari_slow_irq_10_handler, - [11 ] = atari_slow_irq_11_handler, - [12 ] = atari_slow_irq_12_handler, - [13 ] = atari_slow_irq_13_handler, - [14 ] = atari_slow_irq_14_handler, - [15 ] = atari_slow_irq_15_handler, - [16 ] = atari_slow_irq_16_handler, - [17 ] = atari_slow_irq_17_handler, - [18 ] = atari_slow_irq_18_handler, - [19 ] = atari_slow_irq_19_handler, - [20 ] = atari_slow_irq_20_handler, - [21 ] = atari_slow_irq_21_handler, - [22 ] = atari_slow_irq_22_handler, - [23 ] = atari_slow_irq_23_handler, - [24 ] = atari_slow_irq_24_handler, - [25 ] = atari_slow_irq_25_handler, - [26 ] = atari_slow_irq_26_handler, - [27 ] = atari_slow_irq_27_handler, - [28 ] = atari_slow_irq_28_handler, - [29 ] = atari_slow_irq_29_handler, - [30 ] = atari_slow_irq_30_handler, - [31 ] = atari_slow_irq_31_handler -}; - -asmlinkage void atari_fast_irq_handler( void ); -asmlinkage void atari_prio_irq_handler( void ); - -/* Dummy function to allow asm with operands. */ -void atari_fast_prio_irq_dummy (void ) { -__asm__ (__ALIGN_STR"\n" -"atari_fast_irq_handler:\n\t" -"orw #0x700,%%sr\n" /* disable all interrupts */ -"atari_prio_irq_handler:\n\t" -"addl %3,%2\n\t" /* preempt_count() += HARDIRQ_OFFSET */ -SAVE_ALL_INT "\n\t" - GET_CURRENT(%%d0) "\n\t" -/* get vector number from stack frame and convert to source */ -"bfextu %%sp@(%c1){#4,#10},%%d0\n\t" -"subw #(0x40-8),%%d0\n\t" -"jpl 1f\n\t" -"addw #(0x40-8-0x18),%%d0\n" -"1:\tlea %a0,%%a0\n\t" -"addql #1,%%a0@(%%d0:l:4)\n\t" -"lea irq_handler,%%a0\n\t" -"lea %%a0@(%%d0:l:8),%%a0\n\t" -"pea %%sp@\n\t" /* push frame address */ -"movel %%a0@(4),%%sp@-\n\t" /* push handler data */ -"movel %%d0,%%sp@-\n\t" /* push int number */ -"movel %%a0@,%%a0\n\t" -"jsr %%a0@\n\t" /* and call the handler */ -"addql #8,%%sp\n\t" -"addql #4,%%sp\n\t" -"jbra ret_from_interrupt" - : : "i" (&kstat_cpu(0).irqs), "n" (PT_OFF_FORMATVEC), -"m" (preempt_count ()),"di" (HARDIRQ_OFFSET ) -); -for (;;); -} -#endif -/* * Bitmap for free interrupt vector numbers * (new vectors starting from 0x70 can be allocated by
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 16/28 m68k/amiga: Refactor amiints.c
In reply to Geert Uytterhoeven - Remove filename in comments,
- Reorder functions so we no longer need forward declarations.
---
v2: Added this changeset
--- arch/m68k/amiga/amiints.c | 98 +++++++++++++++++++++----------------------- 1 files changed, 47 insertions(+), 51 deletions(-)
arch/m68k/amiga/amiints.c +47 -51
@@ -1,5 +1,5 @@/* -* linux/arch/m68k/amiga/amiints.c -- Amiga Linux interrupt handling code +* Amiga Linux interrupt handling code * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive
@@ -16,56 +16,6 @@#include <asm/amigaints.h> #include <asm/amipcmcia.h> -static void amiga_irq_enable (struct irq_data *data); -static void amiga_irq_disable (struct irq_data *data); -static irqreturn_t ami_int1 (int irq,void *dev_id); -static irqreturn_t ami_int3 (int irq,void *dev_id); -static irqreturn_t ami_int4 (int irq,void *dev_id); -static irqreturn_t ami_int5 (int irq,void *dev_id); - -static struct irq_chip amiga_irq_chip = { - .name ="amiga" , - .irq_enable = amiga_irq_enable, - .irq_disable = amiga_irq_disable, -}; - -/* -* void amiga_init_IRQ(void) -* -* Parameters: None -* -* Returns: Nothing -* -* This function should be called during kernel startup to initialize -* the amiga IRQ handling routines. -*/ - -void __init amiga_init_IRQ (void ) -{ -if (request_irq (IRQ_AUTO_1 , ami_int1,0 ,"int1" ,NULL )) -pr_err ("Couldn't register int%d\n" ,1 ); -if (request_irq (IRQ_AUTO_3 , ami_int3,0 ,"int3" ,NULL )) -pr_err ("Couldn't register int%d\n" ,3 ); -if (request_irq (IRQ_AUTO_4 , ami_int4,0 ,"int4" ,NULL )) -pr_err ("Couldn't register int%d\n" ,4 ); -if (request_irq (IRQ_AUTO_5 , ami_int5,0 ,"int5" ,NULL )) -pr_err ("Couldn't register int%d\n" ,5 ); - -m68k_setup_irq_controller (&amiga_irq_chip, handle_simple_irq,IRQ_USER , -AMI_STD_IRQS ); - -/* turn off PCMCIA interrupts */ -if (AMIGAHW_PRESENT (PCMCIA )) - gayle.inten =GAYLE_IRQ_IDE ; - -/* turn off all interrupts and enable the master interrupt bit */ - amiga_custom.intena =0x7fff ; - amiga_custom.intreq =0x7fff ; - amiga_custom.intena =IF_SETCLR |IF_INTEN ; - -cia_init_IRQ (&ciaa_base); -cia_init_IRQ (&ciab_base); -}/* * Enable/disable a particular machine specific interrupt source.
@@ -84,6 +34,13 @@ static void amiga_irq_disable(struct irq_data *data) amiga_custom.intena =1 << (data->irq -IRQ_USER ); } +static struct irq_chip amiga_irq_chip = { + .name ="amiga" , + .irq_enable = amiga_irq_enable, + .irq_disable = amiga_irq_disable, +}; + +/* * The builtin Amiga hardware interrupt handlers. */
@@ -183,3 +140,42 @@ static irqreturn_t ami_int5(int irq, void *dev_id) }return IRQ_HANDLED ; } + + +/* +* void amiga_init_IRQ(void) +* +* Parameters: None +* +* Returns: Nothing +* +* This function should be called during kernel startup to initialize +* the amiga IRQ handling routines. +*/ + +void __init amiga_init_IRQ (void ) +{ +if (request_irq (IRQ_AUTO_1 , ami_int1,0 ,"int1" ,NULL )) +pr_err ("Couldn't register int%d\n" ,1 ); +if (request_irq (IRQ_AUTO_3 , ami_int3,0 ,"int3" ,NULL )) +pr_err ("Couldn't register int%d\n" ,3 ); +if (request_irq (IRQ_AUTO_4 , ami_int4,0 ,"int4" ,NULL )) +pr_err ("Couldn't register int%d\n" ,4 ); +if (request_irq (IRQ_AUTO_5 , ami_int5,0 ,"int5" ,NULL )) +pr_err ("Couldn't register int%d\n" ,5 ); + +m68k_setup_irq_controller (&amiga_irq_chip, handle_simple_irq,IRQ_USER , +AMI_STD_IRQS ); + +/* turn off PCMCIA interrupts */ +if (AMIGAHW_PRESENT (PCMCIA )) + gayle.inten =GAYLE_IRQ_IDE ; + +/* turn off all interrupts and enable the master interrupt bit */ + amiga_custom.intena =0x7fff ; + amiga_custom.intreq =0x7fff ; + amiga_custom.intena =IF_SETCLR |IF_INTEN ; + +cia_init_IRQ (&ciaa_base); +cia_init_IRQ (&ciab_base); +}
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 17/28 m68k/amiga: Convert Amiga to genirq
In reply to Geert Uytterhoeven---
v3: With handle_simple_irq(), we don't need the .irq_{,un}mask methods anymore.
With m68k_handle_int() renamed to generic_handle_irq(), code paths for legacy and genirq become the same.
v2: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - arch/m68k/amiga/amiints.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -200,7 +200,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !AMIGA depends on !MAC depends on !APOLLO depends on !MVME147
arch/m68k/amiga/amiints.c +3 -0
@@ -9,6 +9,9 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/errno.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/irq.h> #include <asm/traps.h>
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 17/28 m68k/amiga: Convert Amiga to genirq
In reply to Geert Uytterhoeven---
v3: With handle_simple_irq(), we don't need the .irq_{,un}mask methods anymore.
With m68k_handle_int() renamed to generic_handle_irq(), code paths for legacy and genirq become the same.
v2: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - arch/m68k/amiga/amiints.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -200,7 +200,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !AMIGA depends on !MAC depends on !APOLLO depends on !MVME147
arch/m68k/amiga/amiints.c +3 -0
@@ -9,6 +9,9 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/errno.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/irq.h> #include <asm/traps.h>
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 18/28 m68k/amiga: Optimize interrupts using chain handlers
In reply to Geert Uytterhoeven---
v3: Use handle_simple_irq() instead of handle_level_irq()
Small updates for rename of m68k_handle_int() to generic_handle_irq()
v2: Added this changeset
--- arch/m68k/amiga/amiints.c | 104 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 104 insertions(+), 0 deletions(-)
arch/m68k/amiga/amiints.c +104 -0
@@ -48,6 +48,99 @@ static struct irq_chip amiga_irq_chip = {* The builtin Amiga hardware interrupt handlers. */ +#ifdef CONFIG_GENERIC_HARDIRQS +static void ami_int1 (unsigned int irq,struct irq_desc *desc) +{ +unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; + +/* if serial transmit buffer empty, interrupt */ +if (ints &IF_TBE ) { + amiga_custom.intreq =IF_TBE ; +generic_handle_irq (IRQ_AMIGA_TBE ); + } + +/* if floppy disk transfer complete, interrupt */ +if (ints &IF_DSKBLK ) { + amiga_custom.intreq =IF_DSKBLK ; +generic_handle_irq (IRQ_AMIGA_DSKBLK ); + } + +/* if software interrupt set, interrupt */ +if (ints &IF_SOFT ) { + amiga_custom.intreq =IF_SOFT ; +generic_handle_irq (IRQ_AMIGA_SOFT ); + } +} + +static void ami_int3 (unsigned int irq,struct irq_desc *desc) +{ +unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; + +/* if a blitter interrupt */ +if (ints &IF_BLIT ) { + amiga_custom.intreq =IF_BLIT ; +generic_handle_irq (IRQ_AMIGA_BLIT ); + } + +/* if a copper interrupt */ +if (ints &IF_COPER ) { + amiga_custom.intreq =IF_COPER ; +generic_handle_irq (IRQ_AMIGA_COPPER ); + } + +/* if a vertical blank interrupt */ +if (ints &IF_VERTB ) { + amiga_custom.intreq =IF_VERTB ; +generic_handle_irq (IRQ_AMIGA_VERTB ); + } +} + +static void ami_int4 (unsigned int irq,struct irq_desc *desc) +{ +unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; + +/* if audio 0 interrupt */ +if (ints &IF_AUD0 ) { + amiga_custom.intreq =IF_AUD0 ; +generic_handle_irq (IRQ_AMIGA_AUD0 ); + } + +/* if audio 1 interrupt */ +if (ints &IF_AUD1 ) { + amiga_custom.intreq =IF_AUD1 ; +generic_handle_irq (IRQ_AMIGA_AUD1 ); + } + +/* if audio 2 interrupt */ +if (ints &IF_AUD2 ) { + amiga_custom.intreq =IF_AUD2 ; +generic_handle_irq (IRQ_AMIGA_AUD2 ); + } + +/* if audio 3 interrupt */ +if (ints &IF_AUD3 ) { + amiga_custom.intreq =IF_AUD3 ; +generic_handle_irq (IRQ_AMIGA_AUD3 ); + } +} + +static void ami_int5 (unsigned int irq,struct irq_desc *desc) +{ +unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; + +/* if serial receive buffer full interrupt */ +if (ints &IF_RBF ) { +/* acknowledge of IF_RBF must be done by the serial interrupt */ +generic_handle_irq (IRQ_AMIGA_RBF ); + } + +/* if a disk sync interrupt */ +if (ints &IF_DSKSYN ) { + amiga_custom.intreq =IF_DSKSYN ; +generic_handle_irq (IRQ_AMIGA_DSKSYN ); + } +} +#else /* !CONFIG_GENERIC_HARDIRQS */ static irqreturn_t ami_int1 (int irq,void *dev_id) {unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
@@ -143,6 +236,7 @@ static irqreturn_t ami_int5(int irq, void *dev_id) }return IRQ_HANDLED ; } +#endif /* !CONFIG_GENERIC_HARDIRQS */ /*
@@ -158,6 +252,15 @@ static irqreturn_t ami_int5(int irq, void *dev_id)void __init amiga_init_IRQ (void ) { +#ifdef CONFIG_GENERIC_HARDIRQS +m68k_setup_irq_controller (&amiga_irq_chip, handle_simple_irq,IRQ_USER , +AMI_STD_IRQS ); + +irq_set_chained_handler (IRQ_AUTO_1 , ami_int1); +irq_set_chained_handler (IRQ_AUTO_3 , ami_int3); +irq_set_chained_handler (IRQ_AUTO_4 , ami_int4); +irq_set_chained_handler (IRQ_AUTO_5 , ami_int5); +#else /* !CONFIG_GENERIC_HARDIRQS */ if (request_irq (IRQ_AUTO_1 , ami_int1,0 ,"int1" ,NULL ))pr_err ("Couldn't register int%d\n" ,1 );if (request_irq (IRQ_AUTO_3 , ami_int3,0 ,"int3" ,NULL ))
@@ -169,6 +272,7 @@ void __init amiga_init_IRQ(void)m68k_setup_irq_controller (&amiga_irq_chip, handle_simple_irq,IRQ_USER ,AMI_STD_IRQS ); +#endif /* !CONFIG_GENERIC_HARDIRQS */ /* turn off PCMCIA interrupts */ if (AMIGAHW_PRESENT (PCMCIA ))
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 18/28 m68k/amiga: Optimize interrupts using chain handlers
In reply to Geert Uytterhoeven---
v3: Use handle_simple_irq() instead of handle_level_irq()
Small updates for rename of m68k_handle_int() to generic_handle_irq()
v2: Added this changeset
--- arch/m68k/amiga/amiints.c | 104 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 104 insertions(+), 0 deletions(-)
arch/m68k/amiga/amiints.c +104 -0
@@ -48,6 +48,99 @@ static struct irq_chip amiga_irq_chip = {* The builtin Amiga hardware interrupt handlers. */ +#ifdef CONFIG_GENERIC_HARDIRQS +static void ami_int1 (unsigned int irq,struct irq_desc *desc) +{ +unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; + +/* if serial transmit buffer empty, interrupt */ +if (ints &IF_TBE ) { + amiga_custom.intreq =IF_TBE ; +generic_handle_irq (IRQ_AMIGA_TBE ); + } + +/* if floppy disk transfer complete, interrupt */ +if (ints &IF_DSKBLK ) { + amiga_custom.intreq =IF_DSKBLK ; +generic_handle_irq (IRQ_AMIGA_DSKBLK ); + } + +/* if software interrupt set, interrupt */ +if (ints &IF_SOFT ) { + amiga_custom.intreq =IF_SOFT ; +generic_handle_irq (IRQ_AMIGA_SOFT ); + } +} + +static void ami_int3 (unsigned int irq,struct irq_desc *desc) +{ +unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; + +/* if a blitter interrupt */ +if (ints &IF_BLIT ) { + amiga_custom.intreq =IF_BLIT ; +generic_handle_irq (IRQ_AMIGA_BLIT ); + } + +/* if a copper interrupt */ +if (ints &IF_COPER ) { + amiga_custom.intreq =IF_COPER ; +generic_handle_irq (IRQ_AMIGA_COPPER ); + } + +/* if a vertical blank interrupt */ +if (ints &IF_VERTB ) { + amiga_custom.intreq =IF_VERTB ; +generic_handle_irq (IRQ_AMIGA_VERTB ); + } +} + +static void ami_int4 (unsigned int irq,struct irq_desc *desc) +{ +unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; + +/* if audio 0 interrupt */ +if (ints &IF_AUD0 ) { + amiga_custom.intreq =IF_AUD0 ; +generic_handle_irq (IRQ_AMIGA_AUD0 ); + } + +/* if audio 1 interrupt */ +if (ints &IF_AUD1 ) { + amiga_custom.intreq =IF_AUD1 ; +generic_handle_irq (IRQ_AMIGA_AUD1 ); + } + +/* if audio 2 interrupt */ +if (ints &IF_AUD2 ) { + amiga_custom.intreq =IF_AUD2 ; +generic_handle_irq (IRQ_AMIGA_AUD2 ); + } + +/* if audio 3 interrupt */ +if (ints &IF_AUD3 ) { + amiga_custom.intreq =IF_AUD3 ; +generic_handle_irq (IRQ_AMIGA_AUD3 ); + } +} + +static void ami_int5 (unsigned int irq,struct irq_desc *desc) +{ +unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; + +/* if serial receive buffer full interrupt */ +if (ints &IF_RBF ) { +/* acknowledge of IF_RBF must be done by the serial interrupt */ +generic_handle_irq (IRQ_AMIGA_RBF ); + } + +/* if a disk sync interrupt */ +if (ints &IF_DSKSYN ) { + amiga_custom.intreq =IF_DSKSYN ; +generic_handle_irq (IRQ_AMIGA_DSKSYN ); + } +} +#else /* !CONFIG_GENERIC_HARDIRQS */ static irqreturn_t ami_int1 (int irq,void *dev_id) {unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
@@ -143,6 +236,7 @@ static irqreturn_t ami_int5(int irq, void *dev_id) }return IRQ_HANDLED ; } +#endif /* !CONFIG_GENERIC_HARDIRQS */ /*
@@ -158,6 +252,15 @@ static irqreturn_t ami_int5(int irq, void *dev_id)void __init amiga_init_IRQ (void ) { +#ifdef CONFIG_GENERIC_HARDIRQS +m68k_setup_irq_controller (&amiga_irq_chip, handle_simple_irq,IRQ_USER , +AMI_STD_IRQS ); + +irq_set_chained_handler (IRQ_AUTO_1 , ami_int1); +irq_set_chained_handler (IRQ_AUTO_3 , ami_int3); +irq_set_chained_handler (IRQ_AUTO_4 , ami_int4); +irq_set_chained_handler (IRQ_AUTO_5 , ami_int5); +#else /* !CONFIG_GENERIC_HARDIRQS */ if (request_irq (IRQ_AUTO_1 , ami_int1,0 ,"int1" ,NULL ))pr_err ("Couldn't register int%d\n" ,1 );if (request_irq (IRQ_AUTO_3 , ami_int3,0 ,"int3" ,NULL ))
@@ -169,6 +272,7 @@ void __init amiga_init_IRQ(void)m68k_setup_irq_controller (&amiga_irq_chip, handle_simple_irq,IRQ_USER ,AMI_STD_IRQS ); +#endif /* !CONFIG_GENERIC_HARDIRQS */ /* turn off PCMCIA interrupts */ if (AMIGAHW_PRESENT (PCMCIA ))
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 19/28 m68k/mac: Convert Mac to genirq
In reply to Geert Uytterhoeven---
v3: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - arch/m68k/mac/baboon.c | 3 +++ arch/m68k/mac/oss.c | 3 +++ arch/m68k/mac/psc.c | 3 +++ arch/m68k/mac/via.c | 3 +++ 5 files changed, 12 insertions(+), 1 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -200,7 +200,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !MAC depends on !APOLLO depends on !MVME147 depends on !MVME16x
arch/m68k/mac/baboon.c +3 -0
@@ -11,6 +11,9 @@#include <linux/mm.h> #include <linux/delay.h> #include <linux/init.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/traps.h> #include <asm/bootinfo.h>
arch/m68k/mac/oss.c +3 -0
@@ -19,6 +19,9 @@#include <linux/mm.h> #include <linux/delay.h> #include <linux/init.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/bootinfo.h> #include <asm/macintosh.h>
arch/m68k/mac/psc.c +3 -0
@@ -18,6 +18,9 @@#include <linux/mm.h> #include <linux/delay.h> #include <linux/init.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/traps.h> #include <asm/bootinfo.h>
arch/m68k/mac/via.c +3 -0
@@ -28,6 +28,9 @@#include <linux/delay.h> #include <linux/init.h> #include <linux/module.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/bootinfo.h> #include <asm/macintosh.h>
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 19/28 m68k/mac: Convert Mac to genirq
In reply to Geert Uytterhoeven---
v3: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - arch/m68k/mac/baboon.c | 3 +++ arch/m68k/mac/oss.c | 3 +++ arch/m68k/mac/psc.c | 3 +++ arch/m68k/mac/via.c | 3 +++ 5 files changed, 12 insertions(+), 1 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -200,7 +200,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !MAC depends on !APOLLO depends on !MVME147 depends on !MVME16x
arch/m68k/mac/baboon.c +3 -0
@@ -11,6 +11,9 @@#include <linux/mm.h> #include <linux/delay.h> #include <linux/init.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/traps.h> #include <asm/bootinfo.h>
arch/m68k/mac/oss.c +3 -0
@@ -19,6 +19,9 @@#include <linux/mm.h> #include <linux/delay.h> #include <linux/init.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/bootinfo.h> #include <asm/macintosh.h>
arch/m68k/mac/psc.c +3 -0
@@ -18,6 +18,9 @@#include <linux/mm.h> #include <linux/delay.h> #include <linux/init.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/traps.h> #include <asm/bootinfo.h>
arch/m68k/mac/via.c +3 -0
@@ -28,6 +28,9 @@#include <linux/delay.h> #include <linux/init.h> #include <linux/module.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#endif #include <asm/bootinfo.h> #include <asm/macintosh.h>
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 20/28 m68k/mac: Optimize interrupts using chain handlers
In reply to Geert Uytterhoeven---
v6: Correct irq args of irq_set_handler_data() calls, as reported by Finn
v5: Added this changeset
--- arch/m68k/mac/baboon.c | 38 +++++++++++++ arch/m68k/mac/oss.c | 106 +++++++++++++++++++++++++++++------- arch/m68k/mac/psc.c | 74 +++++++++++++++++++------ arch/m68k/mac/via.c | 143 +++++++++++++++++++++++++++++++++++++++--------- 4 files changed, 298 insertions(+), 63 deletions(-)
arch/m68k/mac/baboon.c +38 -0
@@ -56,6 +56,39 @@ void __init baboon_init(void)* Baboon interrupt handler. This works a lot like a VIA. */ +#ifdef CONFIG_GENERIC_HARDIRQS +static void baboon_irq (unsigned int irq,struct irq_desc *desc) +{ +int irq_bit, irq_num; +unsigned char events; + +#ifdef DEBUG_IRQS +printk ("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X\n" , + (uint ) baboon->mb_control, (uint ) baboon->mb_ifr, + (uint ) baboon->mb_status); +#endif + + events = baboon->mb_ifr &0x07 ; +if (!events) +return ; + + irq_num =IRQ_BABOON_0 ; + irq_bit =1 ; +do { +if (events & irq_bit) { + baboon->mb_ifr &= ~irq_bit; +generic_handle_irq (irq_num); + } + irq_bit <<=1 ; + irq_num++; + }while (events >= irq_bit); +#if 0 +if (baboon->mb_ifr &0x02 )macide_ack_intr (NULL ); +/* for now we need to smash all interrupts */ + baboon->mb_ifr &= ~events; +#endif +} +#else static irqreturn_t baboon_irq (int irq,void *dev_id) {int irq_bit, irq_num;
@@ -87,6 +120,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)#endif return IRQ_HANDLED; } +#endif /* * Register the Baboon interrupt dispatcher on nubus slot $C.
@@ -95,8 +129,12 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)void __init baboon_register_interrupts (void ) { baboon_disabled =0 ; +#ifdef CONFIG_GENERIC_HARDIRQS +irq_set_chained_handler (IRQ_NUBUS_C , baboon_irq); +#else if (request_irq (IRQ_NUBUS_C , baboon_irq,0 ,"baboon" , (void *)baboon))pr_err ("Couldn't register baboon interrupt\n" ); +#endif }/*
arch/m68k/mac/oss.c +86 -20
143 lines not on this page · raw message
arch/m68k/mac/psc.c +57 -17
97 lines not on this page · raw message
arch/m68k/mac/via.c +117 -26
179 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 20/28 m68k/mac: Optimize interrupts using chain handlers
In reply to Geert Uytterhoeven---
v6: Correct irq args of irq_set_handler_data() calls, as reported by Finn
v5: Added this changeset
--- arch/m68k/mac/baboon.c | 38 +++++++++++++ arch/m68k/mac/oss.c | 106 +++++++++++++++++++++++++++++------- arch/m68k/mac/psc.c | 74 +++++++++++++++++++------ arch/m68k/mac/via.c | 143 +++++++++++++++++++++++++++++++++++++++--------- 4 files changed, 298 insertions(+), 63 deletions(-)
arch/m68k/mac/baboon.c +38 -0
@@ -56,6 +56,39 @@ void __init baboon_init(void)* Baboon interrupt handler. This works a lot like a VIA. */ +#ifdef CONFIG_GENERIC_HARDIRQS +static void baboon_irq (unsigned int irq,struct irq_desc *desc) +{ +int irq_bit, irq_num; +unsigned char events; + +#ifdef DEBUG_IRQS +printk ("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X\n" , + (uint ) baboon->mb_control, (uint ) baboon->mb_ifr, + (uint ) baboon->mb_status); +#endif + + events = baboon->mb_ifr &0x07 ; +if (!events) +return ; + + irq_num =IRQ_BABOON_0 ; + irq_bit =1 ; +do { +if (events & irq_bit) { + baboon->mb_ifr &= ~irq_bit; +generic_handle_irq (irq_num); + } + irq_bit <<=1 ; + irq_num++; + }while (events >= irq_bit); +#if 0 +if (baboon->mb_ifr &0x02 )macide_ack_intr (NULL ); +/* for now we need to smash all interrupts */ + baboon->mb_ifr &= ~events; +#endif +} +#else static irqreturn_t baboon_irq (int irq,void *dev_id) {int irq_bit, irq_num;
@@ -87,6 +120,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)#endif return IRQ_HANDLED; } +#endif /* * Register the Baboon interrupt dispatcher on nubus slot $C.
@@ -95,8 +129,12 @@ static irqreturn_t baboon_irq(int irq, void *dev_id)void __init baboon_register_interrupts (void ) { baboon_disabled =0 ; +#ifdef CONFIG_GENERIC_HARDIRQS +irq_set_chained_handler (IRQ_NUBUS_C , baboon_irq); +#else if (request_irq (IRQ_NUBUS_C , baboon_irq,0 ,"baboon" , (void *)baboon))pr_err ("Couldn't register baboon interrupt\n" ); +#endif }/*
arch/m68k/mac/oss.c +86 -20
143 lines not on this page · raw message
arch/m68k/mac/psc.c +57 -17
97 lines not on this page · raw message
arch/m68k/mac/via.c +117 -26
179 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 21/28 m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
In reply to Geert Uytterhoeven---
v3: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -204,7 +204,6 @@ config USE_GENERIC_HARDIRQS depends on !MVME147 depends on !MVME16x depends on !BVME6000 - depends on !HP300 depends on !SUN3X depends on !Q40 depends on !SUN3
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 22/28 m68k/vme: Convert VME to genirq
In reply to Geert Uytterhoeven---
v3: Added this changeset
--- arch/m68k/Kconfig.mmu | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
arch/m68k/Kconfig.mmu +0 -3
@@ -201,9 +201,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" depends on !APOLLO - depends on !MVME147 - depends on !MVME16x - depends on !BVME6000 depends on !SUN3X depends on !Q40 depends on !SUN3
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 22/28 m68k/vme: Convert VME to genirq
In reply to Geert Uytterhoeven---
v3: Added this changeset
--- arch/m68k/Kconfig.mmu | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
arch/m68k/Kconfig.mmu +0 -3
@@ -201,9 +201,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" depends on !APOLLO - depends on !MVME147 - depends on !MVME16x - depends on !BVME6000 depends on !SUN3X depends on !Q40 depends on !SUN3
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 23/28 m68k/apollo: Convert Apollo to genirq
In reply to Geert UytterhoevenReplace the custom user vector interrupt handler that calls do_IRQ() and does an EOI by handle_fasteoi_irq().
---
v4: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - arch/m68k/apollo/dn_ints.c | 25 +++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -200,7 +200,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !APOLLO depends on !SUN3X depends on !Q40 depends on !SUN3
arch/m68k/apollo/dn_ints.c +23 -2
@@ -1,9 +1,14 @@#include <linux/interrupt.h> - +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#else #include <asm/irq.h> +#endif +#include <asm/traps.h> #include <asm/apollohw.h> +#ifndef CONFIG_GENERIC_HARDIRQS void dn_process_int (unsigned int irq,struct pt_regs *fp) {do_IRQ (irq, fp);
@@ -11,6 +16,7 @@ void dn_process_int(unsigned int irq, struct pt_regs *fp) *(volatile unsigned char *)(pica)=0x20 ; *(volatile unsigned char *)(picb)=0x20; } +#endif unsigned int apollo_irq_startup (struct irq_data *data) {
@@ -33,16 +39,31 @@ void apollo_irq_shutdown(struct irq_data *data) *(volatile unsigned char *)(picb+1 ) |= (1 << (irq -8 )); } +#ifdef CONFIG_GENERIC_HARDIRQS +void apollo_irq_eoi (struct irq_data *data) +{ + *(volatile unsigned char *)(pica) =0x20 ; + *(volatile unsigned char *)(picb) =0x20 ; +} +#endif +static struct irq_chip apollo_irq_chip = { .name ="apollo" , .irq_startup = apollo_irq_startup, .irq_shutdown = apollo_irq_shutdown, +#ifdef CONFIG_GENERIC_HARDIRQS + .irq_eoi = apollo_irq_eoi, +#endif };void __init dn_init_IRQ (void ) { +#ifdef CONFIG_GENERIC_HARDIRQS +m68k_setup_user_interrupt (VEC_USER +96 ,16 ,NULL ); +#else m68k_setup_user_interrupt (VEC_USER +96 ,16 , dn_process_int); -m68k_setup_irq_controller (&apollo_irq_chip, handle_simple_irq, +#endif +m68k_setup_irq_controller (&apollo_irq_chip, handle_fasteoi_irq,IRQ_APOLLO ,16 ); }
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 23/28 m68k/apollo: Convert Apollo to genirq
In reply to Geert UytterhoevenReplace the custom user vector interrupt handler that calls do_IRQ() and does an EOI by handle_fasteoi_irq().
---
v4: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - arch/m68k/apollo/dn_ints.c | 25 +++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -200,7 +200,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !APOLLO depends on !SUN3X depends on !Q40 depends on !SUN3
arch/m68k/apollo/dn_ints.c +23 -2
@@ -1,9 +1,14 @@#include <linux/interrupt.h> - +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#else #include <asm/irq.h> +#endif +#include <asm/traps.h> #include <asm/apollohw.h> +#ifndef CONFIG_GENERIC_HARDIRQS void dn_process_int (unsigned int irq,struct pt_regs *fp) {do_IRQ (irq, fp);
@@ -11,6 +16,7 @@ void dn_process_int(unsigned int irq, struct pt_regs *fp) *(volatile unsigned char *)(pica)=0x20 ; *(volatile unsigned char *)(picb)=0x20; } +#endif unsigned int apollo_irq_startup (struct irq_data *data) {
@@ -33,16 +39,31 @@ void apollo_irq_shutdown(struct irq_data *data) *(volatile unsigned char *)(picb+1 ) |= (1 << (irq -8 )); } +#ifdef CONFIG_GENERIC_HARDIRQS +void apollo_irq_eoi (struct irq_data *data) +{ + *(volatile unsigned char *)(pica) =0x20 ; + *(volatile unsigned char *)(picb) =0x20 ; +} +#endif +static struct irq_chip apollo_irq_chip = { .name ="apollo" , .irq_startup = apollo_irq_startup, .irq_shutdown = apollo_irq_shutdown, +#ifdef CONFIG_GENERIC_HARDIRQS + .irq_eoi = apollo_irq_eoi, +#endif };void __init dn_init_IRQ (void ) { +#ifdef CONFIG_GENERIC_HARDIRQS +m68k_setup_user_interrupt (VEC_USER +96 ,16 ,NULL ); +#else m68k_setup_user_interrupt (VEC_USER +96 ,16 , dn_process_int); -m68k_setup_irq_controller (&apollo_irq_chip, handle_simple_irq, +#endif +m68k_setup_irq_controller (&apollo_irq_chip, handle_fasteoi_irq,IRQ_APOLLO ,16 ); }
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 24/28 m68k/sun3: Use the kstat_irqs_cpu() wrapper
In reply to Geert Uytterhoeven---
v4: Added this changeset
--- arch/m68k/sun3/sun3ints.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
arch/m68k/sun3/sun3ints.c +10 -4
@@ -51,14 +51,19 @@ void sun3_disable_irq(unsigned int irq)static irqreturn_t sun3_int7 (int irq,void *dev_id) { +unsigned int cnt; + *sun3_intreg |= (1 << irq); -if (!(kstat_cpu (0 ).irqs[irq] %2000 )) -sun3_leds (led_pattern[(kstat_cpu (0 ).irqs[irq] %16000 ) /2000 ]); + cnt =kstat_irqs_cpu (irq,0 ); +if (!(cnt %2000 )) +sun3_leds (led_pattern[cnt %16000 /2000 ]);return IRQ_HANDLED ; }static irqreturn_t sun3_int5 (int irq,void *dev_id) { +unsigned int cnt; +#ifdef CONFIG_SUN3 intersil_clear ();#endif
@@ -68,8 +73,9 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)#endif xtime_update (1 );update_process_times (user_mode (get_irq_regs ())); -if (!(kstat_cpu (0 ).irqs[irq] %20 )) -sun3_leds (led_pattern[(kstat_cpu (0 ).irqs[irq] %160 ) /20 ]); + cnt =kstat_irqs_cpu (irq,0 ); +if (!(cnt %20 )) +sun3_leds (led_pattern[cnt %160 /20 ]);return IRQ_HANDLED ; }
Signature · 1 line
1.7.0.4
Sam Creasey
maintainerRe: [PATCH 24/28] m68k/sun3: Use the kstat_irqs_cpu() wrapper
---
v4: Added this changeset
--- arch/m68k/sun3/sun3ints.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
arch/m68k/sun3/sun3ints.c +10 -4
@@ -51,14 +51,19 @@ void sun3_disable_irq(unsigned int irq)static irqreturn_t sun3_int7 (int irq,void *dev_id) { +unsigned int cnt; + *sun3_intreg |= (1 << irq); -if (!(kstat_cpu (0 ).irqs[irq] %2000 )) -sun3_leds (led_pattern[(kstat_cpu (0 ).irqs[irq] %16000 ) /2000 ]); + cnt =kstat_irqs_cpu (irq,0 ); +if (!(cnt %2000 )) +sun3_leds (led_pattern[cnt %16000 /2000 ]);return IRQ_HANDLED ; }static irqreturn_t sun3_int5 (int irq,void *dev_id) { +unsigned int cnt; +#ifdef CONFIG_SUN3 intersil_clear ();#endif
@@ -68,8 +73,9 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)#endif xtime_update (1 );update_process_times (user_mode (get_irq_regs ())); -if (!(kstat_cpu (0 ).irqs[irq] %20 )) -sun3_leds (led_pattern[(kstat_cpu (0 ).irqs[irq] %160 ) /20 ]); + cnt =kstat_irqs_cpu (irq,0 ); +if (!(cnt %20 )) +sun3_leds (led_pattern[cnt %160 /20 ]);return IRQ_HANDLED ; }
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 25/28 m68k/sun3: Convert Sun3/3x to genirq
In reply to Geert UytterhoevenReplace the custom irq handler that masks the irq and calls do_IRQ(), and the unmasking in the individual handlers, by handle_level_irq().
---
v4: Added this changeset
--- arch/m68k/Kconfig.mmu | 2 -- arch/m68k/sun3/sun3ints.c | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-)
arch/m68k/Kconfig.mmu +0 -2
@@ -200,9 +200,7 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !SUN3X depends on !Q40 - depends on !SUN3 select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_SHOW
arch/m68k/sun3/sun3ints.c +14 -2
@@ -53,7 +53,9 @@ static irqreturn_t sun3_int7(int irq, void *dev_id) {unsigned int cnt; +#ifndef CONFIG_GENERIC_HARDIRQS *sun3_intreg |= (1 << irq); +#endif cnt =kstat_irqs_cpu (irq,0 );if (!(cnt %2000 ))sun3_leds (led_pattern[cnt %16000 /2000 ]);
@@ -67,7 +69,9 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)#ifdef CONFIG_SUN3 intersil_clear ();#endif +#ifndef CONFIG_GENERIC_HARDIRQS *sun3_intreg |= (1 << irq); +#endif #ifdef CONFIG_SUN3 intersil_clear ();#endif
@@ -85,12 +89,14 @@ static irqreturn_t sun3_vec255(int irq, void *dev_id)return IRQ_HANDLED ; } +#ifndef CONFIG_GENERIC_HARDIRQS static void sun3_inthandle (unsigned int irq,struct pt_regs *fp) { *sun3_intreg &= ~(1 << irq);do_IRQ (irq, fp); } +#endif static void sun3_irq_enable (struct irq_data *data) {
@@ -108,15 +114,21 @@ static struct irq_chip sun3_irq_chip = { .irq_shutdown = m68k_irq_shutdown, .irq_enable = sun3_irq_enable, .irq_disable = sun3_irq_disable, +#ifdef CONFIG_GENERIC_HARDIRQS + .irq_mask = sun3_irq_disable, + .irq_unmask = sun3_irq_enable, +#endif };void __init sun3_init_IRQ (void ) { *sun3_intreg =1 ; +#ifndef CONFIG_GENERIC_HARDIRQS m68k_setup_auto_interrupt (sun3_inthandle); -m68k_setup_irq_controller (&sun3_irq_chip, handle_simple_irq, -IRQ_AUTO_1 ,7 ); +#endif +m68k_setup_irq_controller (&sun3_irq_chip, handle_level_irq,IRQ_AUTO_1 , +7 );m68k_setup_user_interrupt (VEC_USER ,128 ,NULL );if (request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL ))
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 25/28 m68k/sun3: Convert Sun3/3x to genirq
In reply to Geert UytterhoevenReplace the custom irq handler that masks the irq and calls do_IRQ(), and the unmasking in the individual handlers, by handle_level_irq().
---
v4: Added this changeset
--- arch/m68k/Kconfig.mmu | 2 -- arch/m68k/sun3/sun3ints.c | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-)
arch/m68k/Kconfig.mmu +0 -2
@@ -200,9 +200,7 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !SUN3X depends on !Q40 - depends on !SUN3 select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_SHOW
arch/m68k/sun3/sun3ints.c +14 -2
@@ -53,7 +53,9 @@ static irqreturn_t sun3_int7(int irq, void *dev_id) {unsigned int cnt; +#ifndef CONFIG_GENERIC_HARDIRQS *sun3_intreg |= (1 << irq); +#endif cnt =kstat_irqs_cpu (irq,0 );if (!(cnt %2000 ))sun3_leds (led_pattern[cnt %16000 /2000 ]);
@@ -67,7 +69,9 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)#ifdef CONFIG_SUN3 intersil_clear ();#endif +#ifndef CONFIG_GENERIC_HARDIRQS *sun3_intreg |= (1 << irq); +#endif #ifdef CONFIG_SUN3 intersil_clear ();#endif
@@ -85,12 +89,14 @@ static irqreturn_t sun3_vec255(int irq, void *dev_id)return IRQ_HANDLED ; } +#ifndef CONFIG_GENERIC_HARDIRQS static void sun3_inthandle (unsigned int irq,struct pt_regs *fp) { *sun3_intreg &= ~(1 << irq);do_IRQ (irq, fp); } +#endif static void sun3_irq_enable (struct irq_data *data) {
@@ -108,15 +114,21 @@ static struct irq_chip sun3_irq_chip = { .irq_shutdown = m68k_irq_shutdown, .irq_enable = sun3_irq_enable, .irq_disable = sun3_irq_disable, +#ifdef CONFIG_GENERIC_HARDIRQS + .irq_mask = sun3_irq_disable, + .irq_unmask = sun3_irq_enable, +#endif };void __init sun3_init_IRQ (void ) { *sun3_intreg =1 ; +#ifndef CONFIG_GENERIC_HARDIRQS m68k_setup_auto_interrupt (sun3_inthandle); -m68k_setup_irq_controller (&sun3_irq_chip, handle_simple_irq, -IRQ_AUTO_1 ,7 ); +#endif +m68k_setup_irq_controller (&sun3_irq_chip, handle_level_irq,IRQ_AUTO_1 , +7 );m68k_setup_user_interrupt (VEC_USER ,128 ,NULL );if (request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL ))
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 26/28 m68k/q40: Convert Q40/Q60 to genirq
In reply to Geert Uytterhoevenq40_irq_handler() must be kept to translate ISA IRQs to the range 1-15. q40_probe_irq_o{ff,n}() become unused.
---
v5: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - arch/m68k/include/asm/q40ints.h | 2 ++ arch/m68k/q40/q40ints.c | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -200,7 +200,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !Q40 select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_SHOW
arch/m68k/include/asm/q40ints.h +2 -0
@@ -25,5 +25,7 @@#define Q40_IRQ14_MASK (1<<6)#define Q40_IRQ15_MASK (1<<7) +#ifndef CONFIG_GENERIC_HARDIRQS extern unsigned long q40_probe_irq_on (void );extern int q40_probe_irq_off (unsigned long irqs); +#endif
arch/m68k/q40/q40ints.c +7 -1
@@ -15,10 +15,14 @@#include <linux/kernel.h> #include <linux/errno.h> #include <linux/interrupt.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#else +#include <asm/irq.h> +#endif #include <asm/ptrace.h> #include <asm/system.h> -#include <asm/irq.h> #include <asm/traps.h> #include <asm/q40_master.h>
@@ -326,6 +330,7 @@ void q40_irq_disable(struct irq_data *data) } } +#ifndef CONFIG_GENERIC_HARDIRQS unsigned long q40_probe_irq_on (void ) {printk ("irq probing not working - reconfigure the driver to avoid this\n" );
@@ -335,3 +340,4 @@ int q40_probe_irq_off(unsigned long irqs) {return -1 ; } +#endif
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 26/28 m68k/q40: Convert Q40/Q60 to genirq
In reply to Geert Uytterhoevenq40_irq_handler() must be kept to translate ISA IRQs to the range 1-15. q40_probe_irq_o{ff,n}() become unused.
---
v5: Added this changeset
--- arch/m68k/Kconfig.mmu | 1 - arch/m68k/include/asm/q40ints.h | 2 ++ arch/m68k/q40/q40ints.c | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-)
arch/m68k/Kconfig.mmu +0 -1
@@ -200,7 +200,6 @@ config SUN3 config USE_GENERIC_HARDIRQS bool "Use genirq" - depends on !Q40 select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_SHOW
arch/m68k/include/asm/q40ints.h +2 -0
@@ -25,5 +25,7 @@#define Q40_IRQ14_MASK (1<<6)#define Q40_IRQ15_MASK (1<<7) +#ifndef CONFIG_GENERIC_HARDIRQS extern unsigned long q40_probe_irq_on (void );extern int q40_probe_irq_off (unsigned long irqs); +#endif
arch/m68k/q40/q40ints.c +7 -1
@@ -15,10 +15,14 @@#include <linux/kernel.h> #include <linux/errno.h> #include <linux/interrupt.h> +#ifdef CONFIG_GENERIC_HARDIRQS +#include <linux/irq.h> +#else +#include <asm/irq.h> +#endif #include <asm/ptrace.h> #include <asm/system.h> -#include <asm/irq.h> #include <asm/traps.h> #include <asm/q40_master.h>
@@ -326,6 +330,7 @@ void q40_irq_disable(struct irq_data *data) } } +#ifndef CONFIG_GENERIC_HARDIRQS unsigned long q40_probe_irq_on (void ) {printk ("irq probing not working - reconfigure the driver to avoid this\n" );
@@ -335,3 +340,4 @@ int q40_probe_irq_off(unsigned long irqs) {return -1 ; } +#endif
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 27/28 m68k/irq: Remove obsolete m68k irq framework
In reply to Geert Uytterhoeven---
v6: Added this changeset
--- arch/m68k/Kconfig | 4 +- arch/m68k/Kconfig.mmu | 5 - arch/m68k/amiga/amiints.c | 114 --------------- arch/m68k/apollo/dn_ints.c | 22 --- arch/m68k/include/asm/irq.h | 63 -------- arch/m68k/include/asm/q40ints.h | 5 - arch/m68k/kernel/Makefile_mm | 5 +- arch/m68k/kernel/ints.c | 297 --------------------------------------- arch/m68k/mac/baboon.c | 41 ------ arch/m68k/mac/oss.c | 78 ---------- arch/m68k/mac/psc.c | 44 ------ arch/m68k/mac/via.c | 104 -------------- arch/m68k/q40/q40ints.c | 16 -- arch/m68k/sun3/sun3ints.c | 20 --- 14 files changed, 3 insertions(+), 815 deletions(-)
arch/m68k/Kconfig +2 -2
@@ -4,8 +4,8 @@ config M68K select HAVE_IDE select HAVE_AOUT if MMU select GENERIC_ATOMIC64 if MMU - select HAVE_GENERIC_HARDIRQS if !MMU - select GENERIC_IRQ_SHOW if !MMU + select HAVE_GENERIC_HARDIRQS + select GENERIC_IRQ_SHOW select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS config RWSEM_GENERIC_SPINLOCK
arch/m68k/Kconfig.mmu +0 -5
@@ -198,11 +198,6 @@ config SUN3 If you don't want to compile a kernel exclusively for a Sun 3, say N. -config USE_GENERIC_HARDIRQS - bool "Use genirq" - select HAVE_GENERIC_HARDIRQS - select GENERIC_IRQ_SHOW - config NATFEAT bool "ARAnyM emulator support" depends on ATARI
arch/m68k/amiga/amiints.c +0 -114
145 lines not on this page · raw message
arch/m68k/apollo/dn_ints.c +0 -22
@@ -1,23 +1,9 @@#include <linux/interrupt.h> -#ifdef CONFIG_GENERIC_HARDIRQS #include <linux/irq.h> -#else -#include <asm/irq.h> -#endif #include <asm/traps.h> #include <asm/apollohw.h> -#ifndef CONFIG_GENERIC_HARDIRQS -void dn_process_int (unsigned int irq,struct pt_regs *fp) -{ -do_IRQ (irq, fp); - - *(volatile unsigned char *)(pica)=0x20 ; - *(volatile unsigned char *)(picb)=0x20 ; -} -#endif -unsigned int apollo_irq_startup (struct irq_data *data) {unsigned int irq = data->irq;
@@ -39,31 +25,23 @@ void apollo_irq_shutdown(struct irq_data *data) *(volatile unsigned char *)(picb+1 ) |= (1 << (irq -8 )); } -#ifdef CONFIG_GENERIC_HARDIRQS void apollo_irq_eoi (struct irq_data *data) { *(volatile unsigned char *)(pica) =0x20 ; *(volatile unsigned char *)(picb) =0x20 ; } -#endif static struct irq_chip apollo_irq_chip = { .name ="apollo" , .irq_startup = apollo_irq_startup, .irq_shutdown = apollo_irq_shutdown, -#ifdef CONFIG_GENERIC_HARDIRQS .irq_eoi = apollo_irq_eoi, -#endif };void __init dn_init_IRQ (void ) { -#ifdef CONFIG_GENERIC_HARDIRQS m68k_setup_user_interrupt (VEC_USER +96 ,16 ,NULL ); -#else -m68k_setup_user_interrupt (VEC_USER +96 ,16 , dn_process_int); -#endif m68k_setup_irq_controller (&apollo_irq_chip, handle_fasteoi_irq,IRQ_APOLLO ,16 ); }
arch/m68k/include/asm/irq.h +0 -63
75 lines not on this page · raw message
arch/m68k/include/asm/q40ints.h +0 -5
@@ -24,8 +24,3 @@#define Q40_IRQ10_MASK (1<<5)#define Q40_IRQ14_MASK (1<<6)#define Q40_IRQ15_MASK (1<<7) - -#ifndef CONFIG_GENERIC_HARDIRQS -extern unsigned long q40_probe_irq_on (void ); -extern int q40_probe_irq_off (unsigned long irqs); -#endif
arch/m68k/kernel/Makefile_mm +1 -4
@@ -10,11 +10,8 @@ endif extra-y += vmlinux.lds obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \ - sys_m68k.o time.o setup.o m68k_ksyms.o syscalltable.o + sys_m68k.o time.o setup.o m68k_ksyms.o syscalltable.o irq.o devres-y = ../../../kernel/irq/devres.o obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo - -obj-y$(CONFIG_GENERIC_HARDIRQS) += devres.o -obj-$(CONFIG_GENERIC_HARDIRQS) += irq.o
arch/m68k/kernel/ints.c +0 -297
336 lines not on this page · raw message
arch/m68k/mac/baboon.c +0 -41
67 lines not on this page · raw message
arch/m68k/mac/oss.c +0 -78
126 lines not on this page · raw message
arch/m68k/mac/psc.c +0 -44
75 lines not on this page · raw message
arch/m68k/mac/via.c +0 -104
147 lines not on this page · raw message
arch/m68k/q40/q40ints.c +0 -16
@@ -15,11 +15,7 @@#include <linux/kernel.h> #include <linux/errno.h> #include <linux/interrupt.h> -#ifdef CONFIG_GENERIC_HARDIRQS #include <linux/irq.h> -#else -#include <asm/irq.h> -#endif #include <asm/ptrace.h> #include <asm/system.h>
@@ -329,15 +325,3 @@ void q40_irq_disable(struct irq_data *data)printk ("disable_irq nesting count %d\n" ,mext_disabled); } } - -#ifndef CONFIG_GENERIC_HARDIRQS -unsigned long q40_probe_irq_on (void ) -{ -printk ("irq probing not working - reconfigure the driver to avoid this\n" ); -return -1 ; -} -int q40_probe_irq_off (unsigned long irqs) -{ -return -1 ; -} -#endif
arch/m68k/sun3/sun3ints.c +0 -20
@@ -53,9 +53,6 @@ static irqreturn_t sun3_int7(int irq, void *dev_id) {unsigned int cnt; -#ifndef CONFIG_GENERIC_HARDIRQS - *sun3_intreg |= (1 << irq); -#endif cnt =kstat_irqs_cpu (irq,0 );if (!(cnt %2000 ))sun3_leds (led_pattern[cnt %16000 /2000 ]);
@@ -69,9 +66,6 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)#ifdef CONFIG_SUN3 intersil_clear ();#endif -#ifndef CONFIG_GENERIC_HARDIRQS - *sun3_intreg |= (1 << irq); -#endif #ifdef CONFIG_SUN3 intersil_clear ();#endif
@@ -89,15 +83,6 @@ static irqreturn_t sun3_vec255(int irq, void *dev_id)return IRQ_HANDLED ; } -#ifndef CONFIG_GENERIC_HARDIRQS -static void sun3_inthandle (unsigned int irq,struct pt_regs *fp) -{ - *sun3_intreg &= ~(1 << irq); - -do_IRQ (irq, fp); -} -#endif -static void sun3_irq_enable (struct irq_data *data) {sun3_enable_irq (data->irq);
@@ -114,19 +99,14 @@ static struct irq_chip sun3_irq_chip = { .irq_shutdown = m68k_irq_shutdown, .irq_enable = sun3_irq_enable, .irq_disable = sun3_irq_disable, -#ifdef CONFIG_GENERIC_HARDIRQS .irq_mask = sun3_irq_disable, .irq_unmask = sun3_irq_enable, -#endif };void __init sun3_init_IRQ (void ) { *sun3_intreg =1 ; -#ifndef CONFIG_GENERIC_HARDIRQS -m68k_setup_auto_interrupt (sun3_inthandle); -#endif m68k_setup_irq_controller (&sun3_irq_chip, handle_level_irq,IRQ_AUTO_1 ,7 );m68k_setup_user_interrupt (VEC_USER ,128 ,NULL );
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 28/28 m68k/irq: Remove obsolete support for user vector interrupt fixups
In reply to Geert UytterhoevenIt was used on Apollo only, before its conversion to genirq.
---
v6: Added this changeset
--- arch/m68k/apollo/dn_ints.c | 2 +- arch/m68k/atari/ataints.c | 2 +- arch/m68k/bvme6000/config.c | 2 +- arch/m68k/include/asm/irq.h | 4 +--- arch/m68k/kernel/entry_mm.S | 3 +-- arch/m68k/kernel/ints.c | 11 ++--------- arch/m68k/mvme147/config.c | 2 +- arch/m68k/mvme16x/config.c | 2 +- arch/m68k/sun3/sun3ints.c | 2 +- 9 files changed, 10 insertions(+), 20 deletions(-)
arch/m68k/apollo/dn_ints.c +1 -1
@@ -41,7 +41,7 @@ static struct irq_chip apollo_irq_chip = {void __init dn_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER +96 ,16 ,NULL ); +m68k_setup_user_interrupt (VEC_USER +96 ,16 );m68k_setup_irq_controller (&apollo_irq_chip, handle_fasteoi_irq,IRQ_APOLLO ,16 ); }
arch/m68k/atari/ataints.c +1 -1
@@ -135,7 +135,7 @@ static struct irq_chip atari_irq_chip = {void __init atari_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER ,NUM_ATARI_SOURCES -IRQ_USER ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,NUM_ATARI_SOURCES -IRQ_USER );m68k_setup_irq_controller (&atari_irq_chip, handle_simple_irq,1 ,NUM_ATARI_SOURCES -1 );
arch/m68k/bvme6000/config.c +1 -1
@@ -86,7 +86,7 @@ static void bvme6000_get_model(char *model)*/ static void __init bvme6000_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER ,192 ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,192 ); }void __init config_bvme6000 (void )
arch/m68k/include/asm/irq.h +1 -3
@@ -57,9 +57,7 @@ extern unsigned int m68k_irq_startup_irq(unsigned int irq);extern void m68k_irq_shutdown (struct irq_data *data);extern void m68k_setup_auto_interrupt (void (*handler)(unsigned int ,struct pt_regs *)); -extern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt, -void (*handler)(unsigned int , -struct pt_regs *)); +extern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt); extern void m68k_setup_irq_controller(struct irq_chip *, void (*handle)(unsigned int irq, struct irq_desc *desc),
arch/m68k/kernel/entry_mm.S +1 -2
@@ -48,7 +48,7 @@ .globl sys_fork, sys_clone, sys_vfork .globl ret_from_interrupt, bad_interrupt .globl auto_irqhandler_fixup -.globl user_irqvec_fixup, user_irqhandler_fixup +.globl user_irqvec_fixup .text ENTRY(buserr)
@@ -240,7 +240,6 @@ user_irqvec_fixup = . + 2 movel %sp,%sp@- movel %d0,%sp@- | put vector # on stack -user_irqhandler_fixup = . + 2 jsr do_IRQ | process the IRQ addql #8,%sp | pop parameters off stack
arch/m68k/kernel/ints.c +2 -9
@@ -28,7 +28,6 @@#endif extern u32 auto_irqhandler_fixup[]; -extern u32 user_irqhandler_fixup[];extern u16 user_irqvec_fixup[];static int m68k_first_user_vec;
@@ -91,16 +90,12 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re* m68k_setup_user_interrupt * @vec: first user vector interrupt to handle * @cnt: number of active user vector interrupts -* @handler: called from user vector interrupts * * setup user vector interrupts, this includes activating the specified range * of interrupts, only then these interrupts can be requested (note: this is -* different from auto vector interrupts). An optional handler can be installed -* to be called instead of the default do_IRQ(), it will be called -* with irq numbers starting from IRQ_USER. +* different from auto vector interrupts). */ -void __init m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt, -void (*handler)(unsigned int ,struct pt_regs *)) +void __init m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt) {int i;
@@ -109,8 +104,6 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,for (i =0 ; i < cnt; i++)irq_set_chip (IRQ_USER + i, &user_irq_chip); *user_irqvec_fixup = vec -IRQ_USER ; -if (handler) - *user_irqhandler_fixup = (u32 )handler;flush_icache (); }
arch/m68k/mvme147/config.c +1 -1
@@ -81,7 +81,7 @@ static void mvme147_get_model(char *model)void __init mvme147_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER ,192 ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,192 ); }void __init config_mvme147 (void )
arch/m68k/mvme16x/config.c +1 -1
@@ -117,7 +117,7 @@ static void mvme16x_get_hardware_list(struct seq_file *m)static void __init mvme16x_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER ,192 ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,192 ); }#define pcc2chip ((volatile u_char *)0xfff42000)
arch/m68k/sun3/sun3ints.c +1 -1
@@ -109,7 +109,7 @@ void __init sun3_init_IRQ(void)m68k_setup_irq_controller (&sun3_irq_chip, handle_level_irq,IRQ_AUTO_1 ,7 ); -m68k_setup_user_interrupt (VEC_USER ,128 ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,128 );if (request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL ))pr_err ("Couldn't register %s interrupt\n" ,"int5" );
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH v6 28/28 m68k/irq: Remove obsolete support for user vector interrupt fixups
In reply to Geert UytterhoevenIt was used on Apollo only, before its conversion to genirq.
---
v6: Added this changeset
--- arch/m68k/apollo/dn_ints.c | 2 +- arch/m68k/atari/ataints.c | 2 +- arch/m68k/bvme6000/config.c | 2 +- arch/m68k/include/asm/irq.h | 4 +--- arch/m68k/kernel/entry_mm.S | 3 +-- arch/m68k/kernel/ints.c | 11 ++--------- arch/m68k/mvme147/config.c | 2 +- arch/m68k/mvme16x/config.c | 2 +- arch/m68k/sun3/sun3ints.c | 2 +- 9 files changed, 10 insertions(+), 20 deletions(-)
arch/m68k/apollo/dn_ints.c +1 -1
@@ -41,7 +41,7 @@ static struct irq_chip apollo_irq_chip = {void __init dn_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER +96 ,16 ,NULL ); +m68k_setup_user_interrupt (VEC_USER +96 ,16 );m68k_setup_irq_controller (&apollo_irq_chip, handle_fasteoi_irq,IRQ_APOLLO ,16 ); }
arch/m68k/atari/ataints.c +1 -1
@@ -135,7 +135,7 @@ static struct irq_chip atari_irq_chip = {void __init atari_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER ,NUM_ATARI_SOURCES -IRQ_USER ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,NUM_ATARI_SOURCES -IRQ_USER );m68k_setup_irq_controller (&atari_irq_chip, handle_simple_irq,1 ,NUM_ATARI_SOURCES -1 );
arch/m68k/bvme6000/config.c +1 -1
@@ -86,7 +86,7 @@ static void bvme6000_get_model(char *model)*/ static void __init bvme6000_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER ,192 ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,192 ); }void __init config_bvme6000 (void )
arch/m68k/include/asm/irq.h +1 -3
@@ -57,9 +57,7 @@ extern unsigned int m68k_irq_startup_irq(unsigned int irq);extern void m68k_irq_shutdown (struct irq_data *data);extern void m68k_setup_auto_interrupt (void (*handler)(unsigned int ,struct pt_regs *)); -extern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt, -void (*handler)(unsigned int , -struct pt_regs *)); +extern void m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt); extern void m68k_setup_irq_controller(struct irq_chip *, void (*handle)(unsigned int irq, struct irq_desc *desc),
arch/m68k/kernel/entry_mm.S +1 -2
@@ -48,7 +48,7 @@ .globl sys_fork, sys_clone, sys_vfork .globl ret_from_interrupt, bad_interrupt .globl auto_irqhandler_fixup -.globl user_irqvec_fixup, user_irqhandler_fixup +.globl user_irqvec_fixup .text ENTRY(buserr)
@@ -240,7 +240,6 @@ user_irqvec_fixup = . + 2 movel %sp,%sp@- movel %d0,%sp@- | put vector # on stack -user_irqhandler_fixup = . + 2 jsr do_IRQ | process the IRQ addql #8,%sp | pop parameters off stack
arch/m68k/kernel/ints.c +2 -9
@@ -28,7 +28,6 @@#endif extern u32 auto_irqhandler_fixup[]; -extern u32 user_irqhandler_fixup[];extern u16 user_irqvec_fixup[];static int m68k_first_user_vec;
@@ -91,16 +90,12 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re* m68k_setup_user_interrupt * @vec: first user vector interrupt to handle * @cnt: number of active user vector interrupts -* @handler: called from user vector interrupts * * setup user vector interrupts, this includes activating the specified range * of interrupts, only then these interrupts can be requested (note: this is -* different from auto vector interrupts). An optional handler can be installed -* to be called instead of the default do_IRQ(), it will be called -* with irq numbers starting from IRQ_USER. +* different from auto vector interrupts). */ -void __init m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt, -void (*handler)(unsigned int ,struct pt_regs *)) +void __init m68k_setup_user_interrupt (unsigned int vec,unsigned int cnt) {int i;
@@ -109,8 +104,6 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,for (i =0 ; i < cnt; i++)irq_set_chip (IRQ_USER + i, &user_irq_chip); *user_irqvec_fixup = vec -IRQ_USER ; -if (handler) - *user_irqhandler_fixup = (u32 )handler;flush_icache (); }
arch/m68k/mvme147/config.c +1 -1
@@ -81,7 +81,7 @@ static void mvme147_get_model(char *model)void __init mvme147_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER ,192 ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,192 ); }void __init config_mvme147 (void )
arch/m68k/mvme16x/config.c +1 -1
@@ -117,7 +117,7 @@ static void mvme16x_get_hardware_list(struct seq_file *m)static void __init mvme16x_init_IRQ (void ) { -m68k_setup_user_interrupt (VEC_USER ,192 ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,192 ); }#define pcc2chip ((volatile u_char *)0xfff42000)
arch/m68k/sun3/sun3ints.c +1 -1
@@ -109,7 +109,7 @@ void __init sun3_init_IRQ(void)m68k_setup_irq_controller (&sun3_irq_chip, handle_level_irq,IRQ_AUTO_1 ,7 ); -m68k_setup_user_interrupt (VEC_USER ,128 ,NULL ); +m68k_setup_user_interrupt (VEC_USER ,128 );if (request_irq (IRQ_AUTO_5 , sun3_int5,0 ,"int5" ,NULL ))pr_err ("Couldn't register %s interrupt\n" ,"int5" );
Signature · 1 line
1.7.0.4
Hi Geert,
When I was testing your v5 patch series, I had to patch macmace.c to resolve some compiler errors --
drivers/net/macmace.c +1 -1
@@ -31,8 +31,8 @@#include <linux/dma-mapping.h> #include <linux/platform_device.h> #include <linux/gfp.h> +#include <linux/interrupt.h> #include <asm/io.h> -#include <asm/irq.h> #include <asm/macints.h> #include <asm/mac_psc.h> #include <asm/page.h>
Would you please check whether this is still needed after the v6 series? (I'd check myself, but I don't have the source tree on which your emailed patches were based...)
BTW, you'll probably want to patch this comment in include/linux/interrupt.h --
/*
* Special function to avoid ifdeffery in kernel/irq/devres.c which
* gets magically built by GENERIC_HARDIRQS=n architectures (sparc,
* m68k).
Finn
Geert Uytterhoeven
maintainerQuoted 16 lines · Finn Thain
When I was testing your v5 patch series, I had to patch
macmace.cto resolve some compiler errors --drivers/net/macmace.c 2011-09-13 18:34:05.000000000 +1000 renamed from drivers/net/macmace.c 2011-09-13 18:33:55.000000000 +1000 +1
-1@@ -31,8 +31,8 @@ #include <linux/dma-mapping.h> #include <linux/platform_device.h> #include <linux/gfp.h> +#include <linux/interrupt.h> #include <asm/io.h> -#include <asm/irq.h> #include <asm/macints.h> #include <asm/mac_psc.h> #include <asm/page.h>
Quoted 1 line
Would you please check whether this is still needed after the v6 series?
Will do. Don't think I ever saw that problem, though. Did it show up with genirq disabled or enabled?
Quoted 2 lines
(I'd check myself, but I don't have the source tree on which your emailed patches were based...)
They're based on a v3.1-rc5 version of the m68k tree. I think it's identical to the
current m68k master with v3.1-rc5 merged into.
Quoted 7 lines
BTW, you'll probably want to patch this comment in
include/linux/interrupt.h--/*
* Special function to avoid ifdeffery inkernel/irq/devres.cwhich
* gets magically built by GENERIC_HARDIRQS=n architectures (sparc,
* m68k).
Thanks, will do.
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
Geert Uytterhoeven
maintainerQuoted 16 lines · Finn Thain
When I was testing your v5 patch series, I had to patch
macmace.cto resolve some compiler errors --drivers/net/macmace.c 2011-09-13 18:34:05.000000000 +1000 renamed from drivers/net/macmace.c 2011-09-13 18:33:55.000000000 +1000 +1
-1@@ -31,8 +31,8 @@ #include <linux/dma-mapping.h> #include <linux/platform_device.h> #include <linux/gfp.h> +#include <linux/interrupt.h> #include <asm/io.h> -#include <asm/irq.h> #include <asm/macints.h> #include <asm/mac_psc.h> #include <asm/page.h>
Quoted 1 line
Would you please check whether this is still needed after the v6 series?
Will do. Don't think I ever saw that problem, though. Did it show up with genirq disabled or enabled?
Quoted 2 lines
(I'd check myself, but I don't have the source tree on which your emailed patches were based...)
They're based on a v3.1-rc5 version of the m68k tree. I think it's identical to the
current m68k master with v3.1-rc5 merged into.
Quoted 7 lines
BTW, you'll probably want to patch this comment in
include/linux/interrupt.h--/*
* Special function to avoid ifdeffery inkernel/irq/devres.cwhich
* gets magically built by GENERIC_HARDIRQS=n architectures (sparc,
* m68k).
Thanks, will do.
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
Quoted 13 lines · Geert Uytterhoeven
Quoted 13 lines
drivers/net/macmace.c 2011-09-13 18:34:05.000000000 +1000 renamed from drivers/net/macmace.c 2011-09-13 18:33:55.0000000$ +1
-1@@ -31,8 +31,8 @@ #include <linux/dma-mapping.h> #include <linux/platform_device.h> #include <linux/gfp.h> +#include <linux/interrupt.h> #include <asm/io.h> -#include <asm/irq.h> #include <asm/macints.h> #include <asm/mac_psc.h> #include <asm/page.h>
Quoted 4 lines
Quoted 2 lines
Would you please check whether this is still needed after the v6 series?
Will do. Don't think I ever saw that problem, though.
Sorry, my bad. The patch above was needed by a cleanup patch I was working on which removes the #include <asm/macintosh.h> from macmace.c.
Finn
Geert Uytterhoeven
maintainerQuoted 32 lines · Geert Uytterhoeven
This patch series converts the m68k/mmu (nommu was converted before) architecture to the generic hardirq framework.
- [01/28] genirq: Add missing "else" in
irq_shutdown()
- [02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
- [03/28] keyboard: Do not include <linux/irq.>
- [04/28] m68k/irq: Renameirq_controllertoirq_chip
- [05/28] m68k/irq: Killirq_node_ttypedef, always use structirq_node
- [06/28] m68k/irq: Renameirq_nodetoirq_data
- [07/28] m68k/irq: Switchirq_chipmethods to "structirq_data*data"
- [08/28] m68k/irq: Renamesetup_irq()tom68k_setup_irq()and make it static
- [09/28] m68k/irq: Extractirq_set_chip()
- [10/28] m68k/irq: Addm68k_setup_irq_controller()
- [11/28] m68k/irq: Rename {,__}m68k_handle_int()
- [12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
- [13/28] m68k/irq: Add genirq support
- [14/28] m68k/atari: Convert Atari to genirq
- [15/28] m68k/atari: Remove code and comments about different irq types
- [16/28] m68k/amiga: Refactoramiints.c
- [17/28] m68k/amiga: Convert Amiga to genirq
- [18/28] m68k/amiga: Optimize interrupts using chain handlers
- [19/28] m68k/mac: Convert Mac to genirq
- [20/28] m68k/mac: Optimize interrupts using chain handlers
- [21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
- [22/28] m68k/vme: Convert VME to genirq
- [23/28] m68k/apollo: Convert Apollo to genirq
- [24/28] m68k/sun3: Use thekstat_irqs_cpu()wrapper
- [25/28] m68k/sun3: Convert Sun3/3x to genirq
- [26/28] m68k/q40: Convert Q40/Q60 to genirq
- [27/28] m68k/irq: Remove obsolete m68k irq framework
- [28/28] m68k/irq: Remove obsolete support for user vector interrupt fixups
Quoted 2 lines
Overview:
- [01] is a fix for the core genirq code,
This went into v3.1-rc6.
Quoted 2 lines
- [02-03] are fixes to avoid compile problems later in the conversion process,
The keyboard path went into the tty -next tree. The IDE one is still pending (I've just resent it).
Quoted 9 lines
- [04-12] refactor the current m68k irq framework to match the generic hardirq framework more closely w.r.t. to its (platform) users,
- [13] adds generic hardirq support to the core, which can be enabled through a config option, so both legacy and generic hardirq can coexist at the source level during the migration,
- [14-26] convert the individual platforms to use generic hardirqs,
- [27] removes support for the legacy m68k irq framework,
- [28] removes a now unused feature.
Quoted 3 lines
The code has received some testing on Amiga, Atari (mainly ARAnyM), and Mac. There are some known issues with drivers, which Finn and Michael are looking into.
Any fixes I still have to apply?
Quoted 2 lines
I will update my m68k-genirq branch as soon as master.kernel.org is available again.
Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirq
If noone objects, I'd like to add this to the m68k master and for-3.2 branches.
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
Quoted 4 lines · Geert Uytterhoeven
Quoted 2 lines
There are some known issues with drivers, which Finn and Michael are looking into.
Any fixes I still have to apply?
I did some further testing on Baboon and OSS hardware etc. and I didn't find any new regressions to fix.
There is a cleanup patch though --
http://article.gmane.org/gmane.linux.ports.m68k/2726
Quoted 5 lines
Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirqIf noone objects, I'd like to add this to the m68k master and for-3.2 branches.
Sounds good. The mac_esp fix I sent is already in linux-next.
Finn
Quoted 4 lines
Gr{oetje,eeting}s,
Geert
Geert Uytterhoeven
maintainerQuoted 5 lines · Finn Thain
Quoted 3 lines · Geert Uytterhoeven
Quoted 2 lines
There are some known issues with drivers, which Finn and Michael are looking into.
Quoted 7 lines
Quoted 1 line
Any fixes I still have to apply?
I did some further testing on Baboon and OSS hardware etc. and I didn't find any new regressions to fix.
There is a cleanup patch though --
http://article.gmane.org/gmane.linux.ports.m68k/2726
OK, I'll add it.
Quoted 7 lines
Quoted 5 lines
Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirqIf noone objects, I'd like to add this to the m68k master and for-3.2 branches.
Sounds good. The
mac_espfix I sent is already in linux-next.
Thanks for reminding me I still have to apply that one :-)
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
Geert Uytterhoeven
maintainerQuoted 4 lines · Geert Uytterhoeven
Quoted 1 line · Finn Thain
Sounds good. The
mac_espfix I sent is already in linux-next.Thanks for reminding me I still have to apply that one :-)
That's e544d704f9bea6892808e453e219aa305bc0269a
("[SCSI] mac_esp: remove redundant mutual exclusion")?
And it should be applied (at least to m68k/master)_before_ the genirq conversion, right?
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
Quoted 8 lines · Geert Uytterhoeven
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line · Finn Thain
Sounds good. The
mac_espfix I sent is already in linux-next.Thanks for reminding me I still have to apply that one :-)
That's
e544d704f9bea6892808e453e219aa305bc0269a("[SCSI]mac_esp: remove redundant mutual exclusion")?
Yes.
Quoted 2 lines
And it should be applied (at least to m68k/master)_before_ the genirq conversion, right?
For bisection purposes, yes.
Finn
Quoted 5 lines
Gr{oetje,eeting}s,
Geert
Geert Uytterhoeven
maintainerQuoted 5 lines · Finn Thain
Quoted 3 lines · Geert Uytterhoeven
Quoted 2 lines
There are some known issues with drivers, which Finn and Michael are looking into.
Quoted 7 lines
Quoted 1 line
Any fixes I still have to apply?
I did some further testing on Baboon and OSS hardware etc. and I didn't find any new regressions to fix.
There is a cleanup patch though --
http://article.gmane.org/gmane.linux.ports.m68k/2726
OK, I'll add it.
Quoted 7 lines
Quoted 5 lines
Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirqIf noone objects, I'd like to add this to the m68k master and for-3.2 branches.
Sounds good. The
mac_espfix I sent is already in linux-next.
Thanks for reminding me I still have to apply that one :-)
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
Geert Uytterhoeven
maintainerQuoted 36 lines · Geert Uytterhoeven
Quoted 32 lines · Geert Uytterhoeven
This patch series converts the m68k/mmu (nommu was converted before) architecture to the generic hardirq framework.
- [01/28] genirq: Add missing "else" in
irq_shutdown()
- [02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
- [03/28] keyboard: Do not include <linux/irq.>
- [04/28] m68k/irq: Renameirq_controllertoirq_chip
- [05/28] m68k/irq: Killirq_node_ttypedef, always use structirq_node
- [06/28] m68k/irq: Renameirq_nodetoirq_data
- [07/28] m68k/irq: Switchirq_chipmethods to "structirq_data*data"
- [08/28] m68k/irq: Renamesetup_irq()tom68k_setup_irq()and make it static
- [09/28] m68k/irq: Extractirq_set_chip()
- [10/28] m68k/irq: Addm68k_setup_irq_controller()
- [11/28] m68k/irq: Rename {,__}m68k_handle_int()
- [12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
- [13/28] m68k/irq: Add genirq support
- [14/28] m68k/atari: Convert Atari to genirq
- [15/28] m68k/atari: Remove code and comments about different irq types
- [16/28] m68k/amiga: Refactoramiints.c
- [17/28] m68k/amiga: Convert Amiga to genirq
- [18/28] m68k/amiga: Optimize interrupts using chain handlers
- [19/28] m68k/mac: Convert Mac to genirq
- [20/28] m68k/mac: Optimize interrupts using chain handlers
- [21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
- [22/28] m68k/vme: Convert VME to genirq
- [23/28] m68k/apollo: Convert Apollo to genirq
- [24/28] m68k/sun3: Use thekstat_irqs_cpu()wrapper
- [25/28] m68k/sun3: Convert Sun3/3x to genirq
- [26/28] m68k/q40: Convert Q40/Q60 to genirq
- [27/28] m68k/irq: Remove obsolete m68k irq framework
- [28/28] m68k/irq: Remove obsolete support for user vector interrupt fixupsQuoted 2 lines
Overview:
- [01] is a fix for the core genirq code,
Quoted 7 lines
This went into v3.1-rc6.
Quoted 2 lines
- [02-03] are fixes to avoid compile problems later in the conversion process,
The keyboard path went into the tty -next tree. The IDE one is still pending (I've just resent it).
The IDE one got acked in the mean time.
Quoted 7 lines
Quoted 2 lines
I will update my m68k-genirq branch as soon as master.kernel.org is available again.
Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirqIf noone objects, I'd like to add this to the m68k master and for-3.2 branches.
I added it to m68k master.
As there were several merge conflicts with current -next (arch/m68k/kernel/Makefile_mm
due to the mmu/nommu merge, and drivers/net/macsonic.c in [12/28] due to the network
driver reshuffling dance), I did not add it to for-3.2 and for-next, but to for-3.3.
Depending on Stephen's return during or after the merge window, and the merge timing
of the m68knommu and netdev trees, I may stil try to sneak it in 3.2, though.
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
Hi Geert,
Quoted 64 lines · Geert Uytterhoeven
Quoted 36 lines · Geert Uytterhoeven
Quoted 32 lines · Geert Uytterhoeven
This patch series converts the m68k/mmu (nommu was converted before) architecture to the generic hardirq framework.
á- [01/28] genirq: Add missing "else" in
irq_shutdown()
á- [02/28] ide-{cd,floppy,tape}: Do not include<linux/irq.>
á- [03/28] keyboard: Do not include<linux/irq.>
á- [04/28] m68k/irq: Renameirq_controllertoirq_chip
á- [05/28] m68k/irq: Killirq_node_ttypedef, always use structirq_nodeá- [06/28] m68k/irq: Renameirq_nodetoirq_data
á- [07/28] m68k/irq: Switchirq_chipmethods to "structirq_data*data" á- [08/28] m68k/irq: Renamesetup_irq()tom68k_setup_irq()and make it static á- [09/28] m68k/irq: Extractirq_set_chip()
á- [10/28] m68k/irq: Addm68k_setup_irq_controller()
á- [11/28] m68k/irq: Rename {,__}m68k_handle_int()
á- [12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users á- [13/28] m68k/irq: Add genirq support
á- [14/28] m68k/atari: Convert Atari to genirq
á- [15/28] m68k/atari: Remove code and comments about different irq types á- [16/28] m68k/amiga: Refactoramiints.c
á- [17/28] m68k/amiga: Convert Amiga to genirq
á- [18/28] m68k/amiga: Optimize interrupts using chain handlers á- [19/28] m68k/mac: Convert Mac to genirq
á- [20/28] m68k/mac: Optimize interrupts using chain handlers
á- [21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq á- [22/28] m68k/vme: Convert VME to genirq
á- [23/28] m68k/apollo: Convert Apollo to genirq
á- [24/28] m68k/sun3: Use thekstat_irqs_cpu()wrapper
á- [25/28] m68k/sun3: Convert Sun3/3x to genirq
á- [26/28] m68k/q40: Convert Q40/Q60 to genirq
á- [27/28] m68k/irq: Remove obsolete m68k irq framework
á- [28/28] m68k/irq: Remove obsolete support for user vector interrupt fixupsQuoted 2 lines
Overview:
á- [01] is a fix for the core genirq code,Quoted 7 lines
This went into v3.1-rc6.
Quoted 2 lines
á- [02-03] are fixes to avoid compile problems later in the conversion á áprocess,
The keyboard path went into the tty -next tree. The IDE one is still pending (I've just resent it).
The IDE one got acked in the mean time.
Quoted 7 lines
Quoted 2 lines
I will update my m68k-genirq branch as soon as master.kernel.org is available again.
Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirqIf noone objects, I'd like to add this to the m68k master and for-3.2 branches.
I added it to m68k master.
As there were several merge conflicts with current -next (
arch/m68k/kernel/Makefile_mm
due to the mmu/nommu merge, anddrivers/net/macsonic.cin [12/28] due to the network
driver reshuffling dance), I did not add it to for-3.2 and for-next, but to for-3.3.
Quoted 3 lines
Depending on Stephen's return during or after the merge window, and the merge timing
of the m68knommu and netdev trees, I may stil try to sneak it in 3.2, though.
I can ask Linus to pull the m68knommu tree early in the merge window, if that will help.
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: [email protected] SnapGear Group, McAfee PHONE: +61 7 3435 2888 8 Gardner Close, FAX: +61 7 3891 3630 Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
Geert Uytterhoeven
maintainerQuoted 74 lines · Greg Ungerer
Quoted 73 lines · Geert Uytterhoeven
Quoted 41 lines · Geert Uytterhoeven
Quoted 36 lines · Geert Uytterhoeven
This patch series converts the m68k/mmu (nommu was converted before) architecture to the generic hardirq framework.
á- [01/28] genirq: Add missing "else" in
irq_shutdown()
á- [02/28] ide-{cd,floppy,tape}: Do not include<linux/irq.> á- [03/28] keyboard: Do not include<linux/irq.>
á- [04/28] m68k/irq: Renameirq_controllertoirq_chip
á- [05/28] m68k/irq: Killirq_node_ttypedef, always use structirq_node
á- [06/28] m68k/irq: Renameirq_nodetoirq_data
á- [07/28] m68k/irq: Switchirq_chipmethods to "structirq_data*data" á- [08/28] m68k/irq: Renamesetup_irq()tom68k_setup_irq()and make it static
á- [09/28] m68k/irq: Extractirq_set_chip()
á- [10/28] m68k/irq: Addm68k_setup_irq_controller()
á- [11/28] m68k/irq: Rename {,__}m68k_handle_int()
á- [12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users á- [13/28] m68k/irq: Add genirq support
á- [14/28] m68k/atari: Convert Atari to genirq
á- [15/28] m68k/atari: Remove code and comments about different irq types
á- [16/28] m68k/amiga: Refactoramiints.c
á- [17/28] m68k/amiga: Convert Amiga to genirq
á- [18/28] m68k/amiga: Optimize interrupts using chain handlers á- [19/28] m68k/mac: Convert Mac to genirq
á- [20/28] m68k/mac: Optimize interrupts using chain handlers á- [21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq á- [22/28] m68k/vme: Convert VME to genirq
á- [23/28] m68k/apollo: Convert Apollo to genirq
á- [24/28] m68k/sun3: Use thekstat_irqs_cpu()wrapper
á- [25/28] m68k/sun3: Convert Sun3/3x to genirq
á- [26/28] m68k/q40: Convert Q40/Q60 to genirq
á- [27/28] m68k/irq: Remove obsolete m68k irq framework
á- [28/28] m68k/irq: Remove obsolete support for user vector interrupt fixupsQuoted 2 lines
Overview:
á- [01] is a fix for the core genirq code,Quoted 7 lines
This went into v3.1-rc6.
Quoted 2 lines
á- [02-03] are fixes to avoid compile problems later in the conversion á áprocess,
The keyboard path went into the tty -next tree. The IDE one is still pending (I've just resent it).
The IDE one got acked in the mean time.
Quoted 10 lines
Quoted 3 lines
I will update my m68k-genirq branch as soon as master.kernel.org is available
again.Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirq
If noone objects, I'd like to add this to the m68k master and for-3.2 branches.
I added it to m68k master.
As there were several merge conflicts with current -next (
arch/m68k/kernel/Makefile_mm
due to the mmu/nommu merge, anddrivers/net/macsonic.cin [12/28] due to the network
driver reshuffling dance), I did not add it to for-3.2 and for-next, but to for-3.3.
Quoted 7 lines
Quoted 4 lines
Depending on Stephen's return during or after the merge window, and the merge timing
of the m68knommu and netdev trees, I may stil try to sneak it in 3.2, though.I can ask Linus to pull the m68knommu tree early in the merge window, if that will help.
Thanks, that will help. Then I can rebase on top of that.
And I'll split "[12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users",
so the net/scsi/tty parts can hit the repective trees separately.
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
Geert Uytterhoeven
maintainerQuoted 74 lines · Greg Ungerer
Quoted 73 lines · Geert Uytterhoeven
Quoted 41 lines · Geert Uytterhoeven
Quoted 36 lines · Geert Uytterhoeven
This patch series converts the m68k/mmu (nommu was converted before) architecture to the generic hardirq framework.
á- [01/28] genirq: Add missing "else" in
irq_shutdown()
á- [02/28] ide-{cd,floppy,tape}: Do not include<linux/irq.> á- [03/28] keyboard: Do not include<linux/irq.>
á- [04/28] m68k/irq: Renameirq_controllertoirq_chip
á- [05/28] m68k/irq: Killirq_node_ttypedef, always use structirq_node
á- [06/28] m68k/irq: Renameirq_nodetoirq_data
á- [07/28] m68k/irq: Switchirq_chipmethods to "structirq_data*data" á- [08/28] m68k/irq: Renamesetup_irq()tom68k_setup_irq()and make it static
á- [09/28] m68k/irq: Extractirq_set_chip()
á- [10/28] m68k/irq: Addm68k_setup_irq_controller()
á- [11/28] m68k/irq: Rename {,__}m68k_handle_int()
á- [12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users á- [13/28] m68k/irq: Add genirq support
á- [14/28] m68k/atari: Convert Atari to genirq
á- [15/28] m68k/atari: Remove code and comments about different irq types
á- [16/28] m68k/amiga: Refactoramiints.c
á- [17/28] m68k/amiga: Convert Amiga to genirq
á- [18/28] m68k/amiga: Optimize interrupts using chain handlers á- [19/28] m68k/mac: Convert Mac to genirq
á- [20/28] m68k/mac: Optimize interrupts using chain handlers á- [21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq á- [22/28] m68k/vme: Convert VME to genirq
á- [23/28] m68k/apollo: Convert Apollo to genirq
á- [24/28] m68k/sun3: Use thekstat_irqs_cpu()wrapper
á- [25/28] m68k/sun3: Convert Sun3/3x to genirq
á- [26/28] m68k/q40: Convert Q40/Q60 to genirq
á- [27/28] m68k/irq: Remove obsolete m68k irq framework
á- [28/28] m68k/irq: Remove obsolete support for user vector interrupt fixupsQuoted 2 lines
Overview:
á- [01] is a fix for the core genirq code,Quoted 7 lines
This went into v3.1-rc6.
Quoted 2 lines
á- [02-03] are fixes to avoid compile problems later in the conversion á áprocess,
The keyboard path went into the tty -next tree. The IDE one is still pending (I've just resent it).
The IDE one got acked in the mean time.
Quoted 10 lines
Quoted 3 lines
I will update my m68k-genirq branch as soon as master.kernel.org is available
again.Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirq
If noone objects, I'd like to add this to the m68k master and for-3.2 branches.
I added it to m68k master.
As there were several merge conflicts with current -next (
arch/m68k/kernel/Makefile_mm
due to the mmu/nommu merge, anddrivers/net/macsonic.cin [12/28] due to the network
driver reshuffling dance), I did not add it to for-3.2 and for-next, but to for-3.3.
Quoted 7 lines
Quoted 4 lines
Depending on Stephen's return during or after the merge window, and the merge timing
of the m68knommu and netdev trees, I may stil try to sneak it in 3.2, though.I can ask Linus to pull the m68knommu tree early in the merge window, if that will help.
Thanks, that will help. Then I can rebase on top of that.
And I'll split "[12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users",
so the net/scsi/tty parts can hit the repective trees separately.
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
Geert Uytterhoeven
maintainerQuoted 36 lines · Geert Uytterhoeven
Quoted 32 lines · Geert Uytterhoeven
This patch series converts the m68k/mmu (nommu was converted before) architecture to the generic hardirq framework.
- [01/28] genirq: Add missing "else" in
irq_shutdown()
- [02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
- [03/28] keyboard: Do not include <linux/irq.>
- [04/28] m68k/irq: Renameirq_controllertoirq_chip
- [05/28] m68k/irq: Killirq_node_ttypedef, always use structirq_node
- [06/28] m68k/irq: Renameirq_nodetoirq_data
- [07/28] m68k/irq: Switchirq_chipmethods to "structirq_data*data"
- [08/28] m68k/irq: Renamesetup_irq()tom68k_setup_irq()and make it static
- [09/28] m68k/irq: Extractirq_set_chip()
- [10/28] m68k/irq: Addm68k_setup_irq_controller()
- [11/28] m68k/irq: Rename {,__}m68k_handle_int()
- [12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
- [13/28] m68k/irq: Add genirq support
- [14/28] m68k/atari: Convert Atari to genirq
- [15/28] m68k/atari: Remove code and comments about different irq types
- [16/28] m68k/amiga: Refactoramiints.c
- [17/28] m68k/amiga: Convert Amiga to genirq
- [18/28] m68k/amiga: Optimize interrupts using chain handlers
- [19/28] m68k/mac: Convert Mac to genirq
- [20/28] m68k/mac: Optimize interrupts using chain handlers
- [21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
- [22/28] m68k/vme: Convert VME to genirq
- [23/28] m68k/apollo: Convert Apollo to genirq
- [24/28] m68k/sun3: Use thekstat_irqs_cpu()wrapper
- [25/28] m68k/sun3: Convert Sun3/3x to genirq
- [26/28] m68k/q40: Convert Q40/Q60 to genirq
- [27/28] m68k/irq: Remove obsolete m68k irq framework
- [28/28] m68k/irq: Remove obsolete support for user vector interrupt fixupsQuoted 2 lines
Overview:
- [01] is a fix for the core genirq code,
Quoted 7 lines
This went into v3.1-rc6.
Quoted 2 lines
- [02-03] are fixes to avoid compile problems later in the conversion process,
The keyboard path went into the tty -next tree. The IDE one is still pending (I've just resent it).
The IDE one got acked in the mean time.
Quoted 7 lines
Quoted 2 lines
I will update my m68k-genirq branch as soon as master.kernel.org is available again.
Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirqIf noone objects, I'd like to add this to the m68k master and for-3.2 branches.
I added it to m68k master.
As there were several merge conflicts with current -next (arch/m68k/kernel/Makefile_mm
due to the mmu/nommu merge, and drivers/net/macsonic.c in [12/28] due to the network
driver reshuffling dance), I did not add it to for-3.2 and for-next, but to for-3.3.
Depending on Stephen's return during or after the merge window, and the merge timing
of the m68knommu and netdev trees, I may stil try to sneak it in 3.2, though.
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
Geert Uytterhoeven
maintainerQuoted 32 lines · Geert Uytterhoeven
This patch series converts the m68k/mmu (nommu was converted before) architecture to the generic hardirq framework.
- [01/28] genirq: Add missing "else" in
irq_shutdown()
- [02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
- [03/28] keyboard: Do not include <linux/irq.>
- [04/28] m68k/irq: Renameirq_controllertoirq_chip
- [05/28] m68k/irq: Killirq_node_ttypedef, always use structirq_node
- [06/28] m68k/irq: Renameirq_nodetoirq_data
- [07/28] m68k/irq: Switchirq_chipmethods to "structirq_data*data"
- [08/28] m68k/irq: Renamesetup_irq()tom68k_setup_irq()and make it static
- [09/28] m68k/irq: Extractirq_set_chip()
- [10/28] m68k/irq: Addm68k_setup_irq_controller()
- [11/28] m68k/irq: Rename {,__}m68k_handle_int()
- [12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
- [13/28] m68k/irq: Add genirq support
- [14/28] m68k/atari: Convert Atari to genirq
- [15/28] m68k/atari: Remove code and comments about different irq types
- [16/28] m68k/amiga: Refactoramiints.c
- [17/28] m68k/amiga: Convert Amiga to genirq
- [18/28] m68k/amiga: Optimize interrupts using chain handlers
- [19/28] m68k/mac: Convert Mac to genirq
- [20/28] m68k/mac: Optimize interrupts using chain handlers
- [21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
- [22/28] m68k/vme: Convert VME to genirq
- [23/28] m68k/apollo: Convert Apollo to genirq
- [24/28] m68k/sun3: Use thekstat_irqs_cpu()wrapper
- [25/28] m68k/sun3: Convert Sun3/3x to genirq
- [26/28] m68k/q40: Convert Q40/Q60 to genirq
- [27/28] m68k/irq: Remove obsolete m68k irq framework
- [28/28] m68k/irq: Remove obsolete support for user vector interrupt fixups
Quoted 2 lines
Overview:
- [01] is a fix for the core genirq code,
This went into v3.1-rc6.
Quoted 2 lines
- [02-03] are fixes to avoid compile problems later in the conversion process,
The keyboard path went into the tty -next tree. The IDE one is still pending (I've just resent it).
Quoted 9 lines
- [04-12] refactor the current m68k irq framework to match the generic hardirq framework more closely w.r.t. to its (platform) users,
- [13] adds generic hardirq support to the core, which can be enabled through a config option, so both legacy and generic hardirq can coexist at the source level during the migration,
- [14-26] convert the individual platforms to use generic hardirqs,
- [27] removes support for the legacy m68k irq framework,
- [28] removes a now unused feature.
Quoted 3 lines
The code has received some testing on Amiga, Atari (mainly ARAnyM), and Mac. There are some known issues with drivers, which Finn and Michael are looking into.
Any fixes I still have to apply?
Quoted 2 lines
I will update my m68k-genirq branch as soon as master.kernel.org is available again.
Updated, on top of m68k master (which is at v3.1-rc10 now).
http://git.kernel.org/?p=linux/kernel/git/geert/linux-m68k.git;a=shortlog;h=refs/heads/m68k-genirq
If noone objects, I'd like to add this to the m68k master and for-3.2 branches.
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