All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel

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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel

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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* [PATCH 01/28] genirq: Add missing "else" in irq_shutdown()
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Thomas Gleixner

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.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
v6: Added this changeset
---
 kernel/irq/chip.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index d5a3009..dc5114b 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -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);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 01/28] genirq: Add missing "else" in irq_shutdown()
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Thomas Gleixner

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.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
v6: Added this changeset
---
 kernel/irq/chip.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index d5a3009..dc5114b 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -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);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, linux-ide

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. --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’

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-ide@vger.kernel.org
---
 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(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 04b0956..8126824 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -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>
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 61fdf54..3d42043 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -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>
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7ecb1ad..ce8237d 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -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>
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, linux-ide

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. --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’

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-ide@vger.kernel.org
---
 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(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 04b0956..8126824 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -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>
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 61fdf54..3d42043 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -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>
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7ecb1ad..ce8237d 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -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>
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, linux-ide

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. --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’

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-ide@vger.kernel.org
---
 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(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 04b0956..8126824 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -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>
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 61fdf54..3d42043 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -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>
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7ecb1ad..ce8237d 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -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>
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 03/28] keyboard: Do not include <linux/irq.>
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Greg Kroah-Hartman

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. --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

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/tty/vt/keyboard.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 3761ccf..a605549 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -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);
 
 /*
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 03/28] keyboard: Do not include <linux/irq.>
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Greg Kroah-Hartman

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. --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

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/tty/vt/keyboard.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 3761ccf..a605549 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -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);
 
 /*
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 04/28] m68k/irq: Rename irq_controller to irq_chip
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Make 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.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index c5b5212..320c5d0 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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))
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index ecd0f7c..637ef53 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -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))
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 5d47f3a..d6e8f33 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index a8eb6ba..3e1be40 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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) */
 
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 69ed0d7..d8c6f68 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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 *);
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 761ee04..f43ad7b 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -52,23 +52,21 @@ extern u16 user_irqvec_fixup[];
 
 /* table for system interrupt handlers */
 static struct irq_node *irq_list[NR_IRQS];
-static struct irq_controller *irq_controller[NR_IRQS];
+static struct irq_chip *irq_chip[NR_IRQS];
 static int irq_depth[NR_IRQS];
 
 static int m68k_first_user_vec;
 
-static struct irq_controller auto_irq_controller = {
+static struct irq_chip auto_irq_chip = {
 	.name		= "auto",
-	.lock		= __SPIN_LOCK_UNLOCKED(auto_irq_controller.lock),
-	.startup	= m68k_irq_startup,
-	.shutdown	= m68k_irq_shutdown,
+	.irq_startup	= m68k_irq_startup,
+	.irq_shutdown	= m68k_irq_shutdown,
 };
 
-static struct irq_controller user_irq_controller = {
+static struct irq_chip user_irq_chip = {
 	.name		= "user",
-	.lock		= __SPIN_LOCK_UNLOCKED(user_irq_controller.lock),
-	.startup	= m68k_irq_startup,
-	.shutdown	= m68k_irq_shutdown,
+	.irq_startup	= m68k_irq_startup,
+	.irq_shutdown	= m68k_irq_shutdown,
 };
 
 #define NUM_IRQ_NODES 100
@@ -96,7 +94,7 @@ void __init init_IRQ(void)
 	}
 
 	for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
-		irq_controller[i] = &auto_irq_controller;
+		irq_chip[i] = &auto_irq_chip;
 
 	mach_init_IRQ();
 }
@@ -136,7 +134,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_controller[IRQ_USER + i] = &user_irq_controller;
+		irq_chip[IRQ_USER + i] = &user_irq_chip;
 	*user_irqvec_fixup = vec - IRQ_USER;
 	if (handler)
 		*user_irqhandler_fixup = (u32)handler;
@@ -144,7 +142,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
 }
 
 /**
- * m68k_setup_irq_controller
+ * m68k_setup_irq_chip
  * @contr: irq controller which controls specified irq
  * @irq: first irq to be managed by the controller
  *
@@ -153,13 +151,13 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
  * be changed as well, but the controller probably should use m68k_irq_startup/
  * m68k_irq_shutdown.
  */
-void m68k_setup_irq_controller(struct irq_controller *contr, unsigned int irq,
+void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,
 			       unsigned int cnt)
 {
 	int i;
 
 	for (i = 0; i < cnt; i++)
-		irq_controller[irq + i] = contr;
+		irq_chip[irq + i] = contr;
 }
 
 irq_node_t *new_irq_node(void)
@@ -180,23 +178,23 @@ irq_node_t *new_irq_node(void)
 
 int setup_irq(unsigned int irq, struct irq_node *node)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	struct irq_node **prev;
 	unsigned long flags;
 
-	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
+	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
 		printk("%s: Incorrect IRQ %d from %s\n",
 		       __func__, irq, node->devname);
 		return -ENXIO;
 	}
 
-	spin_lock_irqsave(&contr->lock, flags);
+	local_irq_save(flags);
 
 	prev = irq_list + irq;
 	if (*prev) {
 		/* Can't share interrupts unless both agree to */
 		if (!((*prev)->flags & node->flags & IRQF_SHARED)) {
-			spin_unlock_irqrestore(&contr->lock, flags);
+			local_irq_restore(flags);
 			return -EBUSY;
 		}
 		while (*prev)
@@ -204,15 +202,15 @@ int setup_irq(unsigned int irq, struct irq_node *node)
 	}
 
 	if (!irq_list[irq]) {
-		if (contr->startup)
-			contr->startup(irq);
+		if (contr->irq_startup)
+			contr->irq_startup(irq);
 		else
-			contr->enable(irq);
+			contr->irq_enable(irq);
 	}
 	node->next = NULL;
 	*prev = node;
 
-	spin_unlock_irqrestore(&contr->lock, flags);
+	local_irq_restore(flags);
 
 	return 0;
 }
@@ -244,16 +242,16 @@ EXPORT_SYMBOL(request_irq);
 
 void free_irq(unsigned int irq, void *dev_id)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	struct irq_node **p, *node;
 	unsigned long flags;
 
-	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
+	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
 		printk("%s: Incorrect IRQ %d\n", __func__, irq);
 		return;
 	}
 
-	spin_lock_irqsave(&contr->lock, flags);
+	local_irq_save(flags);
 
 	p = irq_list + irq;
 	while ((node = *p)) {
@@ -270,58 +268,58 @@ void free_irq(unsigned int irq, void *dev_id)
 		       __func__, irq);
 
 	if (!irq_list[irq]) {
-		if (contr->shutdown)
-			contr->shutdown(irq);
+		if (contr->irq_shutdown)
+			contr->irq_shutdown(irq);
 		else
-			contr->disable(irq);
+			contr->irq_disable(irq);
 	}
 
-	spin_unlock_irqrestore(&contr->lock, flags);
+	local_irq_restore(flags);
 }
 
 EXPORT_SYMBOL(free_irq);
 
 void enable_irq(unsigned int irq)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	unsigned long flags;
 
-	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
+	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
 		printk("%s: Incorrect IRQ %d\n",
 		       __func__, irq);
 		return;
 	}
 
-	spin_lock_irqsave(&contr->lock, flags);
+	local_irq_save(flags);
 	if (irq_depth[irq]) {
 		if (!--irq_depth[irq]) {
-			if (contr->enable)
-				contr->enable(irq);
+			if (contr->irq_enable)
+				contr->irq_enable(irq);
 		}
 	} else
 		WARN_ON(1);
-	spin_unlock_irqrestore(&contr->lock, flags);
+	local_irq_restore(flags);
 }
 
 EXPORT_SYMBOL(enable_irq);
 
 void disable_irq(unsigned int irq)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	unsigned long flags;
 
-	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
+	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
 		printk("%s: Incorrect IRQ %d\n",
 		       __func__, irq);
 		return;
 	}
 
-	spin_lock_irqsave(&contr->lock, flags);
+	local_irq_save(flags);
 	if (!irq_depth[irq]++) {
-		if (contr->disable)
-			contr->disable(irq);
+		if (contr->irq_disable)
+			contr->irq_disable(irq);
 	}
-	spin_unlock_irqrestore(&contr->lock, flags);
+	local_irq_restore(flags);
 }
 
 EXPORT_SYMBOL(disable_irq);
@@ -330,7 +328,7 @@ void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));
 
 EXPORT_SYMBOL(disable_irq_nosync);
 
-int m68k_irq_startup(unsigned int irq)
+unsigned int m68k_irq_startup(unsigned int irq)
 {
 	if (irq <= IRQ_AUTO_7)
 		vectors[VEC_SPUR + irq] = auto_inthandler;
@@ -413,13 +411,13 @@ asmlinkage void handle_badint(struct pt_regs *regs)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	struct irq_node *node;
 	int i = *(loff_t *) v;
 
 	/* autovector interrupts */
 	if (irq_list[i]) {
-		contr = irq_controller[i];
+		contr = irq_chip[i];
 		node = irq_list[i];
 		seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname);
 		while ((node = node->next))
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index f92190c..ffa1b3f 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -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
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index 9f0e3d5..fa05a03 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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);
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 6464ad3..97fa9ed 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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))
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 04/28] m68k/irq: Rename irq_controller to irq_chip
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Make 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.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index c5b5212..320c5d0 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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))
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index ecd0f7c..637ef53 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -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))
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 5d47f3a..d6e8f33 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index a8eb6ba..3e1be40 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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) */
 
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 69ed0d7..d8c6f68 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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 *);
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 761ee04..f43ad7b 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -52,23 +52,21 @@ extern u16 user_irqvec_fixup[];
 
 /* table for system interrupt handlers */
 static struct irq_node *irq_list[NR_IRQS];
-static struct irq_controller *irq_controller[NR_IRQS];
+static struct irq_chip *irq_chip[NR_IRQS];
 static int irq_depth[NR_IRQS];
 
 static int m68k_first_user_vec;
 
-static struct irq_controller auto_irq_controller = {
+static struct irq_chip auto_irq_chip = {
 	.name		= "auto",
-	.lock		= __SPIN_LOCK_UNLOCKED(auto_irq_controller.lock),
-	.startup	= m68k_irq_startup,
-	.shutdown	= m68k_irq_shutdown,
+	.irq_startup	= m68k_irq_startup,
+	.irq_shutdown	= m68k_irq_shutdown,
 };
 
-static struct irq_controller user_irq_controller = {
+static struct irq_chip user_irq_chip = {
 	.name		= "user",
-	.lock		= __SPIN_LOCK_UNLOCKED(user_irq_controller.lock),
-	.startup	= m68k_irq_startup,
-	.shutdown	= m68k_irq_shutdown,
+	.irq_startup	= m68k_irq_startup,
+	.irq_shutdown	= m68k_irq_shutdown,
 };
 
 #define NUM_IRQ_NODES 100
@@ -96,7 +94,7 @@ void __init init_IRQ(void)
 	}
 
 	for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
-		irq_controller[i] = &auto_irq_controller;
+		irq_chip[i] = &auto_irq_chip;
 
 	mach_init_IRQ();
 }
@@ -136,7 +134,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_controller[IRQ_USER + i] = &user_irq_controller;
+		irq_chip[IRQ_USER + i] = &user_irq_chip;
 	*user_irqvec_fixup = vec - IRQ_USER;
 	if (handler)
 		*user_irqhandler_fixup = (u32)handler;
@@ -144,7 +142,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
 }
 
 /**
- * m68k_setup_irq_controller
+ * m68k_setup_irq_chip
  * @contr: irq controller which controls specified irq
  * @irq: first irq to be managed by the controller
  *
@@ -153,13 +151,13 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
  * be changed as well, but the controller probably should use m68k_irq_startup/
  * m68k_irq_shutdown.
  */
-void m68k_setup_irq_controller(struct irq_controller *contr, unsigned int irq,
+void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,
 			       unsigned int cnt)
 {
 	int i;
 
 	for (i = 0; i < cnt; i++)
-		irq_controller[irq + i] = contr;
+		irq_chip[irq + i] = contr;
 }
 
 irq_node_t *new_irq_node(void)
@@ -180,23 +178,23 @@ irq_node_t *new_irq_node(void)
 
 int setup_irq(unsigned int irq, struct irq_node *node)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	struct irq_node **prev;
 	unsigned long flags;
 
-	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
+	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
 		printk("%s: Incorrect IRQ %d from %s\n",
 		       __func__, irq, node->devname);
 		return -ENXIO;
 	}
 
-	spin_lock_irqsave(&contr->lock, flags);
+	local_irq_save(flags);
 
 	prev = irq_list + irq;
 	if (*prev) {
 		/* Can't share interrupts unless both agree to */
 		if (!((*prev)->flags & node->flags & IRQF_SHARED)) {
-			spin_unlock_irqrestore(&contr->lock, flags);
+			local_irq_restore(flags);
 			return -EBUSY;
 		}
 		while (*prev)
@@ -204,15 +202,15 @@ int setup_irq(unsigned int irq, struct irq_node *node)
 	}
 
 	if (!irq_list[irq]) {
-		if (contr->startup)
-			contr->startup(irq);
+		if (contr->irq_startup)
+			contr->irq_startup(irq);
 		else
-			contr->enable(irq);
+			contr->irq_enable(irq);
 	}
 	node->next = NULL;
 	*prev = node;
 
-	spin_unlock_irqrestore(&contr->lock, flags);
+	local_irq_restore(flags);
 
 	return 0;
 }
@@ -244,16 +242,16 @@ EXPORT_SYMBOL(request_irq);
 
 void free_irq(unsigned int irq, void *dev_id)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	struct irq_node **p, *node;
 	unsigned long flags;
 
-	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
+	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
 		printk("%s: Incorrect IRQ %d\n", __func__, irq);
 		return;
 	}
 
-	spin_lock_irqsave(&contr->lock, flags);
+	local_irq_save(flags);
 
 	p = irq_list + irq;
 	while ((node = *p)) {
@@ -270,58 +268,58 @@ void free_irq(unsigned int irq, void *dev_id)
 		       __func__, irq);
 
 	if (!irq_list[irq]) {
-		if (contr->shutdown)
-			contr->shutdown(irq);
+		if (contr->irq_shutdown)
+			contr->irq_shutdown(irq);
 		else
-			contr->disable(irq);
+			contr->irq_disable(irq);
 	}
 
-	spin_unlock_irqrestore(&contr->lock, flags);
+	local_irq_restore(flags);
 }
 
 EXPORT_SYMBOL(free_irq);
 
 void enable_irq(unsigned int irq)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	unsigned long flags;
 
-	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
+	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
 		printk("%s: Incorrect IRQ %d\n",
 		       __func__, irq);
 		return;
 	}
 
-	spin_lock_irqsave(&contr->lock, flags);
+	local_irq_save(flags);
 	if (irq_depth[irq]) {
 		if (!--irq_depth[irq]) {
-			if (contr->enable)
-				contr->enable(irq);
+			if (contr->irq_enable)
+				contr->irq_enable(irq);
 		}
 	} else
 		WARN_ON(1);
-	spin_unlock_irqrestore(&contr->lock, flags);
+	local_irq_restore(flags);
 }
 
 EXPORT_SYMBOL(enable_irq);
 
 void disable_irq(unsigned int irq)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	unsigned long flags;
 
-	if (irq >= NR_IRQS || !(contr = irq_controller[irq])) {
+	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
 		printk("%s: Incorrect IRQ %d\n",
 		       __func__, irq);
 		return;
 	}
 
-	spin_lock_irqsave(&contr->lock, flags);
+	local_irq_save(flags);
 	if (!irq_depth[irq]++) {
-		if (contr->disable)
-			contr->disable(irq);
+		if (contr->irq_disable)
+			contr->irq_disable(irq);
 	}
-	spin_unlock_irqrestore(&contr->lock, flags);
+	local_irq_restore(flags);
 }
 
 EXPORT_SYMBOL(disable_irq);
@@ -330,7 +328,7 @@ void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));
 
 EXPORT_SYMBOL(disable_irq_nosync);
 
-int m68k_irq_startup(unsigned int irq)
+unsigned int m68k_irq_startup(unsigned int irq)
 {
 	if (irq <= IRQ_AUTO_7)
 		vectors[VEC_SPUR + irq] = auto_inthandler;
@@ -413,13 +411,13 @@ asmlinkage void handle_badint(struct pt_regs *regs)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-	struct irq_controller *contr;
+	struct irq_chip *contr;
 	struct irq_node *node;
 	int i = *(loff_t *) v;
 
 	/* autovector interrupts */
 	if (irq_list[i]) {
-		contr = irq_controller[i];
+		contr = irq_chip[i];
 		node = irq_list[i];
 		seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname);
 		while ((node = node->next))
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index f92190c..ffa1b3f 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -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
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index 9f0e3d5..fa05a03 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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);
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 6464ad3..97fa9ed 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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))
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 05/28] m68k/irq: Kill irq_node_t typedef, always use struct irq_node
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68k/include/asm/irq.h |    8 ++++----
 arch/m68k/kernel/ints.c     |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index d8c6f68..bfc521f 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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,
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index f43ad7b..9de8eb4 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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--) {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 05/28] m68k/irq: Kill irq_node_t typedef, always use struct irq_node
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68k/include/asm/irq.h |    8 ++++----
 arch/m68k/kernel/ints.c     |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index d8c6f68..bfc521f 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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,
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index f43ad7b..9de8eb4 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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--) {
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 06/28] m68k/irq: Rename irq_node to irq_data
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (7 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Make it more similar to the genirq version:
  - Add an irq field

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68k/include/asm/irq.h |    9 +++++----
 arch/m68k/kernel/ints.c     |   21 +++++++++++----------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index bfc521f..3cb037c 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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,
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 9de8eb4..8877932 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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 */
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 06/28] m68k/irq: Rename irq_node to irq_data
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (6 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Make it more similar to the genirq version:
  - Add an irq field

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68k/include/asm/irq.h |    9 +++++----
 arch/m68k/kernel/ints.c     |   21 +++++++++++----------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index bfc521f..3cb037c 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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,
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 9de8eb4..8877932 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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 */
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (8 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  2011-09-11 13:40     ` Finn Thain
  -1 siblings, 1 reply; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 320c5d0..09a695b 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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);
 }
 
 /*
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index 637ef53..b04b453 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -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);
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index d6e8f33..2bdab49 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index 3e1be40..de0cb42 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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,
 };
 
 /*
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 3cb037c..423f064 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 8877932..404d832 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index ffa1b3f..3cee6d2 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -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)
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index fa05a03..cb245f9 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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 !!
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 97fa9ed..5d45e00 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (9 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 320c5d0..09a695b 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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);
 }
 
 /*
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index 637ef53..b04b453 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -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);
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index d6e8f33..2bdab49 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index 3e1be40..de0cb42 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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,
 };
 
 /*
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 3cb037c..423f064 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 8877932..404d832 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index ffa1b3f..3cee6d2 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -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)
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index fa05a03..cb245f9 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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 !!
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 97fa9ed..5d45e00 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 08/28] m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (10 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

It has nothing to do with the standard one in <linux/irq.h>

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68k/kernel/ints.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 404d832..e68a3bd 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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;
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 08/28] m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (11 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

It has nothing to do with the standard one in <linux/irq.h>

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68k/kernel/ints.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 404d832..e68a3bd 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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;
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 09/28] m68k/irq: Extract irq_set_chip()
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (13 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68k/kernel/ints.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index e68a3bd..4f9868e 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 09/28] m68k/irq: Extract irq_set_chip()
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (12 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/m68k/kernel/ints.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index e68a3bd..4f9868e 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 10/28] m68k/irq: Add m68k_setup_irq_controller()
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (15 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

This is a wrapper around m68k_setup_irq_chip() that discards its dummy
second parameter, to ease the future transition to genirq.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 09a695b..8af5ea3 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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))
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index b04b453..84663ae 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -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))
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 2bdab49..bdc4428 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index de0cb42..ab3ac13 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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) */
 
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 423f064..d0b7efd 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -115,6 +115,8 @@ extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re
 extern 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 *);
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index 3cee6d2..98497d2 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -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
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index cb245f9..a8a5ce8 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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);
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 5d45e00..2046127 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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))
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 10/28] m68k/irq: Add m68k_setup_irq_controller()
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (14 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

This is a wrapper around m68k_setup_irq_chip() that discards its dummy
second parameter, to ease the future transition to genirq.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 09a695b..8af5ea3 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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))
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index b04b453..84663ae 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -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))
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 2bdab49..bdc4428 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index de0cb42..ab3ac13 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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) */
 
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 423f064..d0b7efd 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -115,6 +115,8 @@ extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re
 extern 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 *);
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index 3cee6d2..98497d2 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -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
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index cb245f9..a8a5ce8 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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);
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 5d45e00..2046127 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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))
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 11/28] m68k/irq: Rename {,__}m68k_handle_int()
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (16 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

  - Rename m68k_handle_int() to generic_handle_irq(), and drop the unneeded
    asmlinkage,
  - Rename __m68k_handle_int() to do_IRQ().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 8af5ea3..0daa7fc 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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;
 }
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index 84663ae..18c0e29 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -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;
 }
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index bdc4428..4b76431 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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;
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index d0b7efd..9a2bae8 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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)
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
index bd0ec05..f5927d0 100644
--- a/arch/m68k/kernel/entry_mm.S
+++ b/arch/m68k/kernel/entry_mm.S
@@ -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)
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 4f9868e..15dbbe2 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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);
 }
 
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 2a96beb..f264791 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -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++;
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index a9c0f5a..ad51241 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -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;
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index a4c3eb6..26c2b65 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -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;
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index e71166d..0678570 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -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;
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index a8a5ce8..afe600c 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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;
 }
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 2046127..20ffee7 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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)
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 11/28] m68k/irq: Rename {,__}m68k_handle_int()
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (17 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

  - Rename m68k_handle_int() to generic_handle_irq(), and drop the unneeded
    asmlinkage,
  - Rename __m68k_handle_int() to do_IRQ().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 8af5ea3..0daa7fc 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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;
 }
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index 84663ae..18c0e29 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -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;
 }
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index bdc4428..4b76431 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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;
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index d0b7efd..9a2bae8 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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)
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
index bd0ec05..f5927d0 100644
--- a/arch/m68k/kernel/entry_mm.S
+++ b/arch/m68k/kernel/entry_mm.S
@@ -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)
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 4f9868e..15dbbe2 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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);
 }
 
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 2a96beb..f264791 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -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++;
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index a9c0f5a..ad51241 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -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;
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index a4c3eb6..26c2b65 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -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;
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index e71166d..0678570 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -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;
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index a8a5ce8..afe600c 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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;
 }
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 2046127..20ffee7 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

The m68k core irq code stopped honoring these flags during the irq
restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 0daa7fc..e5f3033 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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>
diff --git a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c
index f6312c7..c87fe69 100644
--- a/arch/m68k/hp300/time.c
+++ b/arch/m68k/hp300/time.c
@@ -70,7 +70,7 @@ void __init hp300_sched_init(irq_handler_t vector)
 
   asm volatile(" 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 */
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 9a2bae8..fe625e2 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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).
  */
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 15dbbe2..f6a4698 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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>
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
index 1ad4e9d..a5462cc 100644
--- a/arch/m68k/mac/iop.c
+++ b/arch/m68k/mac/iop.c
@@ -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])) {
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index ad51241..1eb60f0 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -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");
 }
 
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index 0678570..af9ed33 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -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");
 }
 
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 6cb9c3a..01f2adf 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -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 */
diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c
index 817f37a..c9570fc 100644
--- a/drivers/macintosh/via-macii.c
+++ b/drivers/macintosh/via-macii.c
@@ -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;
 
diff --git a/drivers/macintosh/via-maciisi.c b/drivers/macintosh/via-maciisi.c
index 9ab5b0c..34d02a9 100644
--- a/drivers/macintosh/via-maciisi.c
+++ b/drivers/macintosh/via-maciisi.c
@@ -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;
 	}
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index c93679e..aae4cfc 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -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);
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index af3a6af..ea2bde2 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -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;
diff --git a/drivers/tty/serial/68360serial.c b/drivers/tty/serial/68360serial.c
index 0a3e878..daf0b1d 100644
--- a/drivers/tty/serial/68360serial.c
+++ b/drivers/tty/serial/68360serial.c
@@ -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.
 			*/
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

The m68k core irq code stopped honoring these flags during the irq
restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 0daa7fc..e5f3033 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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>
diff --git a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c
index f6312c7..c87fe69 100644
--- a/arch/m68k/hp300/time.c
+++ b/arch/m68k/hp300/time.c
@@ -70,7 +70,7 @@ void __init hp300_sched_init(irq_handler_t vector)
 
   asm volatile(" 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 */
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 9a2bae8..fe625e2 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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).
  */
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 15dbbe2..f6a4698 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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>
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
index 1ad4e9d..a5462cc 100644
--- a/arch/m68k/mac/iop.c
+++ b/arch/m68k/mac/iop.c
@@ -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])) {
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index ad51241..1eb60f0 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -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");
 }
 
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index 0678570..af9ed33 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -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");
 }
 
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 6cb9c3a..01f2adf 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -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 */
diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c
index 817f37a..c9570fc 100644
--- a/drivers/macintosh/via-macii.c
+++ b/drivers/macintosh/via-macii.c
@@ -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;
 
diff --git a/drivers/macintosh/via-maciisi.c b/drivers/macintosh/via-maciisi.c
index 9ab5b0c..34d02a9 100644
--- a/drivers/macintosh/via-maciisi.c
+++ b/drivers/macintosh/via-maciisi.c
@@ -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;
 	}
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index c93679e..aae4cfc 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -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);
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index af3a6af..ea2bde2 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -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;
diff --git a/drivers/tty/serial/68360serial.c b/drivers/tty/serial/68360serial.c
index 0a3e878..daf0b1d 100644
--- a/drivers/tty/serial/68360serial.c
+++ b/drivers/tty/serial/68360serial.c
@@ -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.
 			*/
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 13/28] m68k/irq: Add genirq support
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (20 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Disabled on all platforms for now

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
[v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 4ef37c9..557b4b7 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/include/asm/hardirq.h b/arch/m68k/include/asm/hardirq.h
index 870e534..db30ed2 100644
--- a/arch/m68k/include/asm/hardirq.h
+++ b/arch/m68k/include/asm/hardirq.h
@@ -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;
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index fe625e2..8971647 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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_ */
diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
index aced678..8122750 100644
--- a/arch/m68k/kernel/Makefile_mm
+++ b/arch/m68k/kernel/Makefile_mm
@@ -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
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index f6a4698..cea439f 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -31,6 +31,7 @@ extern u32 auto_irqhandler_fixup[];
 extern u32 user_irqhandler_fixup[];
 extern u16 user_irqvec_fixup[];
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 /* table for system interrupt handlers */
 static struct irq_data *irq_list[NR_IRQS];
 static struct irq_chip *irq_chip[NR_IRQS];
@@ -41,6 +42,8 @@ static inline int irq_set_chip(unsigned int irq, struct irq_chip *chip)
 	irq_chip[irq] = chip;
 	return 0;
 }
+#define irq_set_chip_and_handler(irq, chip, dummy)	irq_set_chip(irq, chip)
+#endif /* !CONFIG_GENERIC_HARDIRQS */
 
 static int m68k_first_user_vec;
 
@@ -56,8 +59,10 @@ static struct irq_chip user_irq_chip = {
 	.irq_shutdown	= m68k_irq_shutdown,
 };
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 #define NUM_IRQ_NODES 100
 static struct irq_data nodes[NUM_IRQ_NODES];
+#endif /* !CONFIG_GENERIC_HARDIRQS */
 
 /*
  * void init_IRQ(void)
@@ -81,7 +86,7 @@ void __init init_IRQ(void)
 	}
 
 	for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
-		irq_set_chip(i, &auto_irq_chip);
+		irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);
 
 	mach_init_IRQ();
 }
@@ -128,6 +133,35 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
 	flush_icache();
 }
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+
+/**
+ * m68k_setup_irq_controller
+ * @chip: irq chip which controls specified irq
+ * @handle: flow handler which handles specified irq
+ * @irq: first irq to be managed by the controller
+ * @cnt: number of irqs to be managed by the controller
+ *
+ * Change the controller for the specified range of irq, which will be used to
+ * manage these irq. auto/user irq already have a default controller, which can
+ * be changed as well, but the controller probably should use m68k_irq_startup/
+ * m68k_irq_shutdown.
+ */
+void m68k_setup_irq_controller(struct irq_chip *chip,
+			       irq_flow_handler_t handle, unsigned int irq,
+			       unsigned int cnt)
+{
+	int i;
+
+	for (i = 0; i < cnt; i++) {
+		irq_set_chip(irq + i, chip);
+		if (handle)
+			irq_set_handler(irq + i, handle);
+	}
+}
+
+#else /* !CONFIG_GENERIC_HARDIRQS */
+
 /**
  * m68k_setup_irq_chip
  * @contr: irq controller which controls specified irq
@@ -316,6 +350,8 @@ void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));
 
 EXPORT_SYMBOL(disable_irq_nosync);
 
+#endif /* !CONFIG_GENERIC_HARDIRQS */
+
 unsigned int m68k_irq_startup_irq(unsigned int irq)
 {
 	if (irq <= IRQ_AUTO_7)
@@ -341,6 +377,8 @@ void m68k_irq_shutdown(struct irq_data *data)
 }
 
 
+#ifndef CONFIG_GENERIC_HARDIRQS
+
 /*
  * Do we need these probe functions on the m68k?
  *
@@ -367,6 +405,7 @@ int probe_irq_off (unsigned long irqs)
 }
 
 EXPORT_SYMBOL(probe_irq_off);
+#endif /* CONFIG_GENERIC_HARDIRQS */
 
 unsigned int irq_canonicalize(unsigned int irq)
 {
@@ -379,6 +418,7 @@ unsigned int irq_canonicalize(unsigned int irq)
 
 EXPORT_SYMBOL(irq_canonicalize);
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 void generic_handle_irq(unsigned int irq)
 {
 	struct irq_data *node;
@@ -428,3 +468,13 @@ void init_irq_proc(void)
 	/* Insert /proc/irq driver here */
 }
 #endif
+
+#else /* CONFIG_GENERIC_HARDIRQS */
+
+asmlinkage void handle_badint(struct pt_regs *regs)
+{
+	atomic_inc(&irq_err_count);
+	pr_warn("unexpected interrupt from %u\n", regs->vector);
+}
+
+#endif /* CONFIG_GENERIC_HARDIRQS */
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 13/28] m68k/irq: Add genirq support
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (19 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Disabled on all platforms for now

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
[v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 4ef37c9..557b4b7 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/include/asm/hardirq.h b/arch/m68k/include/asm/hardirq.h
index 870e534..db30ed2 100644
--- a/arch/m68k/include/asm/hardirq.h
+++ b/arch/m68k/include/asm/hardirq.h
@@ -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;
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index fe625e2..8971647 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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_ */
diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
index aced678..8122750 100644
--- a/arch/m68k/kernel/Makefile_mm
+++ b/arch/m68k/kernel/Makefile_mm
@@ -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
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index f6a4698..cea439f 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -31,6 +31,7 @@ extern u32 auto_irqhandler_fixup[];
 extern u32 user_irqhandler_fixup[];
 extern u16 user_irqvec_fixup[];
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 /* table for system interrupt handlers */
 static struct irq_data *irq_list[NR_IRQS];
 static struct irq_chip *irq_chip[NR_IRQS];
@@ -41,6 +42,8 @@ static inline int irq_set_chip(unsigned int irq, struct irq_chip *chip)
 	irq_chip[irq] = chip;
 	return 0;
 }
+#define irq_set_chip_and_handler(irq, chip, dummy)	irq_set_chip(irq, chip)
+#endif /* !CONFIG_GENERIC_HARDIRQS */
 
 static int m68k_first_user_vec;
 
@@ -56,8 +59,10 @@ static struct irq_chip user_irq_chip = {
 	.irq_shutdown	= m68k_irq_shutdown,
 };
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 #define NUM_IRQ_NODES 100
 static struct irq_data nodes[NUM_IRQ_NODES];
+#endif /* !CONFIG_GENERIC_HARDIRQS */
 
 /*
  * void init_IRQ(void)
@@ -81,7 +86,7 @@ void __init init_IRQ(void)
 	}
 
 	for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
-		irq_set_chip(i, &auto_irq_chip);
+		irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);
 
 	mach_init_IRQ();
 }
@@ -128,6 +133,35 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
 	flush_icache();
 }
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+
+/**
+ * m68k_setup_irq_controller
+ * @chip: irq chip which controls specified irq
+ * @handle: flow handler which handles specified irq
+ * @irq: first irq to be managed by the controller
+ * @cnt: number of irqs to be managed by the controller
+ *
+ * Change the controller for the specified range of irq, which will be used to
+ * manage these irq. auto/user irq already have a default controller, which can
+ * be changed as well, but the controller probably should use m68k_irq_startup/
+ * m68k_irq_shutdown.
+ */
+void m68k_setup_irq_controller(struct irq_chip *chip,
+			       irq_flow_handler_t handle, unsigned int irq,
+			       unsigned int cnt)
+{
+	int i;
+
+	for (i = 0; i < cnt; i++) {
+		irq_set_chip(irq + i, chip);
+		if (handle)
+			irq_set_handler(irq + i, handle);
+	}
+}
+
+#else /* !CONFIG_GENERIC_HARDIRQS */
+
 /**
  * m68k_setup_irq_chip
  * @contr: irq controller which controls specified irq
@@ -316,6 +350,8 @@ void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));
 
 EXPORT_SYMBOL(disable_irq_nosync);
 
+#endif /* !CONFIG_GENERIC_HARDIRQS */
+
 unsigned int m68k_irq_startup_irq(unsigned int irq)
 {
 	if (irq <= IRQ_AUTO_7)
@@ -341,6 +377,8 @@ void m68k_irq_shutdown(struct irq_data *data)
 }
 
 
+#ifndef CONFIG_GENERIC_HARDIRQS
+
 /*
  * Do we need these probe functions on the m68k?
  *
@@ -367,6 +405,7 @@ int probe_irq_off (unsigned long irqs)
 }
 
 EXPORT_SYMBOL(probe_irq_off);
+#endif /* CONFIG_GENERIC_HARDIRQS */
 
 unsigned int irq_canonicalize(unsigned int irq)
 {
@@ -379,6 +418,7 @@ unsigned int irq_canonicalize(unsigned int irq)
 
 EXPORT_SYMBOL(irq_canonicalize);
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 void generic_handle_irq(unsigned int irq)
 {
 	struct irq_data *node;
@@ -428,3 +468,13 @@ void init_irq_proc(void)
 	/* Insert /proc/irq driver here */
 }
 #endif
+
+#else /* CONFIG_GENERIC_HARDIRQS */
+
+asmlinkage void handle_badint(struct pt_regs *regs)
+{
+	atomic_inc(&irq_err_count);
+	pr_warn("unexpected interrupt from %u\n", regs->vector);
+}
+
+#endif /* CONFIG_GENERIC_HARDIRQS */
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 14/28] m68k/atari: Convert Atari to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
[v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 557b4b7..2df049f 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 14/28] m68k/atari: Convert Atari to genirq
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
[v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 557b4b7..2df049f 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 15/28] m68k/atari: Remove code and comments about different irq types
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

This code was obsoleted during the irq restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v4: Added this changeset
---
 arch/m68k/atari/ataints.c |  236 ---------------------------------------------
 1 files changed, 0 insertions(+), 236 deletions(-)

diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index ab3ac13..908bcfc 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 15/28] m68k/atari: Remove code and comments about different irq types
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

This code was obsoleted during the irq restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v4: Added this changeset
---
 arch/m68k/atari/ataints.c |  236 ---------------------------------------------
 1 files changed, 0 insertions(+), 236 deletions(-)

diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index ab3ac13..908bcfc 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 16/28] m68k/amiga: Refactor amiints.c
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

  - Remove filename in comments,
  - Reorder functions so we no longer need forward declarations.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2: Added this changeset
---
 arch/m68k/amiga/amiints.c |   98 +++++++++++++++++++++-----------------------
 1 files changed, 47 insertions(+), 51 deletions(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index e5f3033..c8f9eac 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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);
+}
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 16/28] m68k/amiga: Refactor amiints.c
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

  - Remove filename in comments,
  - Reorder functions so we no longer need forward declarations.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2: Added this changeset
---
 arch/m68k/amiga/amiints.c |   98 +++++++++++++++++++++-----------------------
 1 files changed, 47 insertions(+), 51 deletions(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index e5f3033..c8f9eac 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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);
+}
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 17/28] m68k/amiga: Convert Amiga to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (25 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 2df049f..20e27d1 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index c8f9eac..c3da534 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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>
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 17/28] m68k/amiga: Convert Amiga to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (24 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 2df049f..20e27d1 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index c8f9eac..c3da534 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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>
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 18/28] m68k/amiga: Optimize interrupts using chain handlers
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (26 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index c3da534..a8da471 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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))
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 18/28] m68k/amiga: Optimize interrupts using chain handlers
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (27 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index c3da534..a8da471 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -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))
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 19/28] m68k/mac: Convert Mac to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (28 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 20e27d1..24f39df 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index f264791..ff11746 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -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>
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index 1eb60f0..ed95270 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -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>
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 26c2b65..0a34b7a 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -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>
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index af9ed33..bde156c 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -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>
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 19/28] m68k/mac: Convert Mac to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (29 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 20e27d1..24f39df 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index f264791..ff11746 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -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>
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index 1eb60f0..ed95270 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -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>
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 26c2b65..0a34b7a 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -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>
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index af9ed33..bde156c 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -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>
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 20/28] m68k/mac: Optimize interrupts using chain handlers
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (31 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index ff11746..425144c 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -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
 }
 
 /*
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index ed95270..cc784c2 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -32,10 +32,11 @@
 int oss_present;
 volatile struct mac_oss *oss;
 
-static irqreturn_t oss_irq(int, void *);
-static irqreturn_t oss_nubus_irq(int, void *);
-
+#ifdef CONFIG_GENERIC_HARDIRQS
+extern void via1_irq(unsigned int irq, struct irq_desc *desc);
+#else
 extern irqreturn_t via1_irq(int, void *);
+#endif
 
 /*
  * Initialize the OSS
@@ -63,23 +64,6 @@ void __init oss_init(void)
 }
 
 /*
- * Register the OSS and NuBus interrupt dispatchers.
- */
-
-void __init oss_register_interrupts(void)
-{
-	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, 0, "nubus",
-			(void *)oss))
-		pr_err("Couldn't register %s interrupt\n", "nubus");
-	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, 0, "via1", (void *)via1))
-		pr_err("Couldn't register %s interrupt\n", "via1");
-}
-
-/*
  * Initialize OSS for Nubus access
  */
 
@@ -92,6 +76,34 @@ void __init oss_nubus_init(void)
  * and SCSI; everything else is routed to its own autovector IRQ.
  */
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+static void oss_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int events;
+
+	events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI);
+	if (!events)
+		return;
+
+#ifdef DEBUG_IRQS
+	if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
+		printk("oss_irq: irq %u events = 0x%04X\n", irq,
+			(int) oss->irq_pending);
+	}
+#endif
+	/* FIXME: how do you clear a pending IRQ?    */
+
+	if (events & OSS_IP_SOUND) {
+		oss->irq_pending &= ~OSS_IP_SOUND;
+		/* FIXME: call sound handler */
+	} else if (events & OSS_IP_SCSI) {
+		oss->irq_pending &= ~OSS_IP_SCSI;
+		generic_handle_irq(IRQ_MAC_SCSI);
+	} else {
+		/* FIXME: error check here? */
+	}
+}
+#else
 static irqreturn_t oss_irq(int irq, void *dev_id)
 {
 	int events;
@@ -119,6 +131,7 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
 	}
 	return IRQ_HANDLED;
 }
+#endif
 
 /*
  * Nubus IRQ handler, OSS style
@@ -126,6 +139,34 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
  * Unlike the VIA/RBV this is on its own autovector interrupt level.
  */
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int events, irq_bit, i;
+
+	events = oss->irq_pending & OSS_IP_NUBUS;
+	if (!events)
+		return;
+
+#ifdef DEBUG_NUBUS_INT
+	if (console_loglevel > 7) {
+		printk("oss_nubus_irq: events = 0x%04X\n", events);
+	}
+#endif
+	/* There are only six slots on the OSS, not seven */
+
+	i = 6;
+	irq_bit = 0x40;
+	do {
+		--i;
+		irq_bit >>= 1;
+		if (events & irq_bit) {
+			oss->irq_pending &= ~irq_bit;
+			generic_handle_irq(NUBUS_SOURCE_BASE + i);
+		}
+	} while(events & (irq_bit - 1));
+}
+#else
 static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
 {
 	int events, irq_bit, i;
@@ -153,6 +194,31 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
 	} while(events & (irq_bit - 1));
 	return IRQ_HANDLED;
 }
+#endif
+
+/*
+ * Register the OSS and NuBus interrupt dispatchers.
+ */
+
+void __init oss_register_interrupts(void)
+{
+#ifdef CONFIG_GENERIC_HARDIRQS
+	irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq);
+	irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq);
+	irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq);
+	irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq);
+#else /* !CONFIG_GENERIC_HARDIRQS */
+	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, 0, "nubus",
+			(void *)oss))
+		pr_err("Couldn't register %s interrupt\n", "nubus");
+	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, 0, "via1", (void *)via1))
+		pr_err("Couldn't register %s interrupt\n", "via1");
+#endif /* !CONFIG_GENERIC_HARDIRQS */
+}
 
 /*
  * Enable an OSS interrupt
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 0a34b7a..52840b8 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -33,8 +33,6 @@
 int psc_present;
 volatile __u8 *psc;
 
-irqreturn_t psc_irq(int, void *);
-
 /*
  * Debugging dump, used in various places to see what's going on.
  */
@@ -115,26 +113,40 @@ void __init psc_init(void)
 }
 
 /*
- * Register the PSC interrupt dispatchers for autovector interrupts 3-6.
+ * PSC interrupt handler. It's a lot like the VIA interrupt handler.
  */
 
-void __init psc_register_interrupts(void)
+#ifdef CONFIG_GENERIC_HARDIRQS
+static void psc_irq(unsigned int irq, struct irq_desc *desc)
 {
-	if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30))
-		pr_err("Couldn't register psc%d interrupt\n", 3);
-	if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40))
-		pr_err("Couldn't register psc%d interrupt\n", 4);
-	if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50))
-		pr_err("Couldn't register psc%d interrupt\n", 5);
-	if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60))
-		pr_err("Couldn't register psc%d interrupt\n", 6);
-}
+	unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
+	int pIFR	= pIFRbase + offset;
+	int pIER	= pIERbase + offset;
+	int irq_num;
+	unsigned char irq_bit, events;
 
-/*
- * PSC interrupt handler. It's a lot like the VIA interrupt handler.
- */
+#ifdef DEBUG_IRQS
+	printk("psc_irq: irq %u pIFR = 0x%02X pIER = 0x%02X\n",
+		irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER));
+#endif
 
-irqreturn_t psc_irq(int irq, void *dev_id)
+	events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF;
+	if (!events)
+		return;
+
+	irq_num = irq << 3;
+	irq_bit = 1;
+	do {
+		if (events & irq_bit) {
+			psc_write_byte(pIFR, irq_bit);
+			generic_handle_irq(irq_num);
+		}
+		irq_num++;
+		irq_bit <<= 1;
+	} while (events >= irq_bit);
+}
+#else
+static irqreturn_t psc_irq(int irq, void *dev_id)
 {
 	int pIFR	= pIFRbase + ((int) dev_id);
 	int pIER	= pIERbase + ((int) dev_id);
@@ -162,6 +174,34 @@ irqreturn_t psc_irq(int irq, void *dev_id)
 	} while (events >= irq_bit);
 	return IRQ_HANDLED;
 }
+#endif
+
+/*
+ * Register the PSC interrupt dispatchers for autovector interrupts 3-6.
+ */
+
+void __init psc_register_interrupts(void)
+{
+#ifdef CONFIG_GENERIC_HARDIRQS
+	irq_set_chained_handler(IRQ_AUTO_3, psc_irq);
+	irq_set_handler_data(IRQ_AUTO_3, (void *)0x30);
+	irq_set_chained_handler(IRQ_AUTO_4, psc_irq);
+	irq_set_handler_data(IRQ_AUTO_4, (void *)0x40);
+	irq_set_chained_handler(IRQ_AUTO_5, psc_irq);
+	irq_set_handler_data(IRQ_AUTO_5, (void *)0x50);
+	irq_set_chained_handler(IRQ_AUTO_6, psc_irq);
+	irq_set_handler_data(IRQ_AUTO_6, (void *)0x60);
+#else /* !CONFIG_GENERIC_HARDIRQS */
+	if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30))
+		pr_err("Couldn't register psc%d interrupt\n", 3);
+	if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40))
+		pr_err("Couldn't register psc%d interrupt\n", 4);
+	if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50))
+		pr_err("Couldn't register psc%d interrupt\n", 5);
+	if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60))
+		pr_err("Couldn't register psc%d interrupt\n", 6);
+#endif /* !CONFIG_GENERIC_HARDIRQS */
+}
 
 void psc_irq_enable(int irq) {
 	int irq_src	= IRQ_SRC(irq);
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index bde156c..b8156ac 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -80,9 +80,6 @@ static int gIER,gIFR,gBufA,gBufB;
 static u8 nubus_disabled;
 
 void via_debug_dump(void);
-irqreturn_t via1_irq(int, void *);
-irqreturn_t via2_irq(int, void *);
-irqreturn_t via_nubus_irq(int, void *);
 void via_irq_enable(int irq);
 void via_irq_disable(int irq);
 void via_irq_clear(int irq);
@@ -289,29 +286,6 @@ void __init via_init_clock(irq_handler_t func)
 }
 
 /*
- * Register the interrupt dispatchers for VIA or RBV machines only.
- */
-
-void __init via_register_interrupts(void)
-{
-	if (via_alt_mapping) {
-		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, 0, "via1", (void *)via1))
-			pr_err("Couldn't register %s interrupt\n", "via1");
-	} else {
-		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, 0, "via2", (void *)via2))
-		pr_err("Couldn't register %s interrupt\n", "via2");
-	if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus",
-			(void *)via2))
-		pr_err("Couldn't register %s interrupt\n", "nubus");
-}
-
-/*
  * Debugging dump, used in various places to see what's going on.
  */
 
@@ -443,6 +417,49 @@ void __init via_nubus_init(void)
  * via6522.c :-), disable/pending masks added.
  */
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+void via1_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int irq_num;
+	unsigned char irq_bit, events;
+
+	events = via1[vIFR] & via1[vIER] & 0x7F;
+	if (!events)
+		return;
+
+	irq_num = VIA1_SOURCE_BASE;
+	irq_bit = 1;
+	do {
+		if (events & irq_bit) {
+			via1[vIFR] = irq_bit;
+			generic_handle_irq(irq_num);
+		}
+		++irq_num;
+		irq_bit <<= 1;
+	} while (events >= irq_bit);
+}
+
+static void via2_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int irq_num;
+	unsigned char irq_bit, events;
+
+	events = via2[gIFR] & via2[gIER] & 0x7F;
+	if (!events)
+		return;
+
+	irq_num = VIA2_SOURCE_BASE;
+	irq_bit = 1;
+	do {
+		if (events & irq_bit) {
+			via2[gIFR] = irq_bit | rbv_clear;
+			generic_handle_irq(irq_num);
+		}
+		++irq_num;
+		irq_bit <<= 1;
+	} while (events >= irq_bit);
+}
+#else
 irqreturn_t via1_irq(int irq, void *dev_id)
 {
 	int irq_num;
@@ -486,12 +503,49 @@ irqreturn_t via2_irq(int irq, void *dev_id)
 	} while (events >= irq_bit);
 	return IRQ_HANDLED;
 }
+#endif
 
 /*
  * Dispatch Nubus interrupts. We are called as a secondary dispatch by the
  * VIA2 dispatcher as a fast interrupt handler.
  */
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int slot_irq;
+	unsigned char slot_bit, events;
+
+	events = ~via2[gBufA] & 0x7F;
+	if (rbv_present)
+		events &= via2[rSIER];
+	else
+		events &= ~via2[vDirA];
+	if (!events)
+		return;
+
+	do {
+		slot_irq = IRQ_NUBUS_F;
+		slot_bit = 0x40;
+		do {
+			if (events & slot_bit) {
+				events &= ~slot_bit;
+				generic_handle_irq(slot_irq);
+			}
+			--slot_irq;
+			slot_bit >>= 1;
+		} while (events);
+
+ 		/* clear the CA1 interrupt and make certain there's no more. */
+		via2[gIFR] = 0x02 | rbv_clear;
+		events = ~via2[gBufA] & 0x7F;
+		if (rbv_present)
+			events &= via2[rSIER];
+		else
+			events &= ~via2[vDirA];
+	} while (events);
+}
+#else
 irqreturn_t via_nubus_irq(int irq, void *dev_id)
 {
 	int slot_irq;
@@ -527,6 +581,43 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)
 	} while (events);
 	return IRQ_HANDLED;
 }
+#endif
+
+/*
+ * Register the interrupt dispatchers for VIA or RBV machines only.
+ */
+
+void __init via_register_interrupts(void)
+{
+#ifdef CONFIG_GENERIC_HARDIRQS
+	if (via_alt_mapping) {
+		/* software interrupt */
+		irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
+		/* via1 interrupt */
+		irq_set_chained_handler(IRQ_AUTO_6, via1_irq);
+	} else {
+		irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
+	}
+	irq_set_chained_handler(IRQ_AUTO_2, via2_irq);
+	irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq);
+#else
+	if (via_alt_mapping) {
+		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, 0, "via1", (void *)via1))
+			pr_err("Couldn't register %s interrupt\n", "via1");
+	} else {
+		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, 0, "via2", (void *)via2))
+		pr_err("Couldn't register %s interrupt\n", "via2");
+	if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus",
+			(void *)via2))
+		pr_err("Couldn't register %s interrupt\n", "nubus");
+#endif
+}
 
 void via_irq_enable(int irq) {
 	int irq_src	= IRQ_SRC(irq);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 20/28] m68k/mac: Optimize interrupts using chain handlers
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (30 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index ff11746..425144c 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -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
 }
 
 /*
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index ed95270..cc784c2 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -32,10 +32,11 @@
 int oss_present;
 volatile struct mac_oss *oss;
 
-static irqreturn_t oss_irq(int, void *);
-static irqreturn_t oss_nubus_irq(int, void *);
-
+#ifdef CONFIG_GENERIC_HARDIRQS
+extern void via1_irq(unsigned int irq, struct irq_desc *desc);
+#else
 extern irqreturn_t via1_irq(int, void *);
+#endif
 
 /*
  * Initialize the OSS
@@ -63,23 +64,6 @@ void __init oss_init(void)
 }
 
 /*
- * Register the OSS and NuBus interrupt dispatchers.
- */
-
-void __init oss_register_interrupts(void)
-{
-	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, 0, "nubus",
-			(void *)oss))
-		pr_err("Couldn't register %s interrupt\n", "nubus");
-	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, 0, "via1", (void *)via1))
-		pr_err("Couldn't register %s interrupt\n", "via1");
-}
-
-/*
  * Initialize OSS for Nubus access
  */
 
@@ -92,6 +76,34 @@ void __init oss_nubus_init(void)
  * and SCSI; everything else is routed to its own autovector IRQ.
  */
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+static void oss_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int events;
+
+	events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI);
+	if (!events)
+		return;
+
+#ifdef DEBUG_IRQS
+	if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
+		printk("oss_irq: irq %u events = 0x%04X\n", irq,
+			(int) oss->irq_pending);
+	}
+#endif
+	/* FIXME: how do you clear a pending IRQ?    */
+
+	if (events & OSS_IP_SOUND) {
+		oss->irq_pending &= ~OSS_IP_SOUND;
+		/* FIXME: call sound handler */
+	} else if (events & OSS_IP_SCSI) {
+		oss->irq_pending &= ~OSS_IP_SCSI;
+		generic_handle_irq(IRQ_MAC_SCSI);
+	} else {
+		/* FIXME: error check here? */
+	}
+}
+#else
 static irqreturn_t oss_irq(int irq, void *dev_id)
 {
 	int events;
@@ -119,6 +131,7 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
 	}
 	return IRQ_HANDLED;
 }
+#endif
 
 /*
  * Nubus IRQ handler, OSS style
@@ -126,6 +139,34 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
  * Unlike the VIA/RBV this is on its own autovector interrupt level.
  */
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int events, irq_bit, i;
+
+	events = oss->irq_pending & OSS_IP_NUBUS;
+	if (!events)
+		return;
+
+#ifdef DEBUG_NUBUS_INT
+	if (console_loglevel > 7) {
+		printk("oss_nubus_irq: events = 0x%04X\n", events);
+	}
+#endif
+	/* There are only six slots on the OSS, not seven */
+
+	i = 6;
+	irq_bit = 0x40;
+	do {
+		--i;
+		irq_bit >>= 1;
+		if (events & irq_bit) {
+			oss->irq_pending &= ~irq_bit;
+			generic_handle_irq(NUBUS_SOURCE_BASE + i);
+		}
+	} while(events & (irq_bit - 1));
+}
+#else
 static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
 {
 	int events, irq_bit, i;
@@ -153,6 +194,31 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
 	} while(events & (irq_bit - 1));
 	return IRQ_HANDLED;
 }
+#endif
+
+/*
+ * Register the OSS and NuBus interrupt dispatchers.
+ */
+
+void __init oss_register_interrupts(void)
+{
+#ifdef CONFIG_GENERIC_HARDIRQS
+	irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq);
+	irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq);
+	irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq);
+	irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq);
+#else /* !CONFIG_GENERIC_HARDIRQS */
+	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, 0, "nubus",
+			(void *)oss))
+		pr_err("Couldn't register %s interrupt\n", "nubus");
+	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, 0, "via1", (void *)via1))
+		pr_err("Couldn't register %s interrupt\n", "via1");
+#endif /* !CONFIG_GENERIC_HARDIRQS */
+}
 
 /*
  * Enable an OSS interrupt
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 0a34b7a..52840b8 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -33,8 +33,6 @@
 int psc_present;
 volatile __u8 *psc;
 
-irqreturn_t psc_irq(int, void *);
-
 /*
  * Debugging dump, used in various places to see what's going on.
  */
@@ -115,26 +113,40 @@ void __init psc_init(void)
 }
 
 /*
- * Register the PSC interrupt dispatchers for autovector interrupts 3-6.
+ * PSC interrupt handler. It's a lot like the VIA interrupt handler.
  */
 
-void __init psc_register_interrupts(void)
+#ifdef CONFIG_GENERIC_HARDIRQS
+static void psc_irq(unsigned int irq, struct irq_desc *desc)
 {
-	if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30))
-		pr_err("Couldn't register psc%d interrupt\n", 3);
-	if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40))
-		pr_err("Couldn't register psc%d interrupt\n", 4);
-	if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50))
-		pr_err("Couldn't register psc%d interrupt\n", 5);
-	if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60))
-		pr_err("Couldn't register psc%d interrupt\n", 6);
-}
+	unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
+	int pIFR	= pIFRbase + offset;
+	int pIER	= pIERbase + offset;
+	int irq_num;
+	unsigned char irq_bit, events;
 
-/*
- * PSC interrupt handler. It's a lot like the VIA interrupt handler.
- */
+#ifdef DEBUG_IRQS
+	printk("psc_irq: irq %u pIFR = 0x%02X pIER = 0x%02X\n",
+		irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER));
+#endif
 
-irqreturn_t psc_irq(int irq, void *dev_id)
+	events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF;
+	if (!events)
+		return;
+
+	irq_num = irq << 3;
+	irq_bit = 1;
+	do {
+		if (events & irq_bit) {
+			psc_write_byte(pIFR, irq_bit);
+			generic_handle_irq(irq_num);
+		}
+		irq_num++;
+		irq_bit <<= 1;
+	} while (events >= irq_bit);
+}
+#else
+static irqreturn_t psc_irq(int irq, void *dev_id)
 {
 	int pIFR	= pIFRbase + ((int) dev_id);
 	int pIER	= pIERbase + ((int) dev_id);
@@ -162,6 +174,34 @@ irqreturn_t psc_irq(int irq, void *dev_id)
 	} while (events >= irq_bit);
 	return IRQ_HANDLED;
 }
+#endif
+
+/*
+ * Register the PSC interrupt dispatchers for autovector interrupts 3-6.
+ */
+
+void __init psc_register_interrupts(void)
+{
+#ifdef CONFIG_GENERIC_HARDIRQS
+	irq_set_chained_handler(IRQ_AUTO_3, psc_irq);
+	irq_set_handler_data(IRQ_AUTO_3, (void *)0x30);
+	irq_set_chained_handler(IRQ_AUTO_4, psc_irq);
+	irq_set_handler_data(IRQ_AUTO_4, (void *)0x40);
+	irq_set_chained_handler(IRQ_AUTO_5, psc_irq);
+	irq_set_handler_data(IRQ_AUTO_5, (void *)0x50);
+	irq_set_chained_handler(IRQ_AUTO_6, psc_irq);
+	irq_set_handler_data(IRQ_AUTO_6, (void *)0x60);
+#else /* !CONFIG_GENERIC_HARDIRQS */
+	if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30))
+		pr_err("Couldn't register psc%d interrupt\n", 3);
+	if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40))
+		pr_err("Couldn't register psc%d interrupt\n", 4);
+	if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50))
+		pr_err("Couldn't register psc%d interrupt\n", 5);
+	if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60))
+		pr_err("Couldn't register psc%d interrupt\n", 6);
+#endif /* !CONFIG_GENERIC_HARDIRQS */
+}
 
 void psc_irq_enable(int irq) {
 	int irq_src	= IRQ_SRC(irq);
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index bde156c..b8156ac 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -80,9 +80,6 @@ static int gIER,gIFR,gBufA,gBufB;
 static u8 nubus_disabled;
 
 void via_debug_dump(void);
-irqreturn_t via1_irq(int, void *);
-irqreturn_t via2_irq(int, void *);
-irqreturn_t via_nubus_irq(int, void *);
 void via_irq_enable(int irq);
 void via_irq_disable(int irq);
 void via_irq_clear(int irq);
@@ -289,29 +286,6 @@ void __init via_init_clock(irq_handler_t func)
 }
 
 /*
- * Register the interrupt dispatchers for VIA or RBV machines only.
- */
-
-void __init via_register_interrupts(void)
-{
-	if (via_alt_mapping) {
-		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, 0, "via1", (void *)via1))
-			pr_err("Couldn't register %s interrupt\n", "via1");
-	} else {
-		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, 0, "via2", (void *)via2))
-		pr_err("Couldn't register %s interrupt\n", "via2");
-	if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus",
-			(void *)via2))
-		pr_err("Couldn't register %s interrupt\n", "nubus");
-}
-
-/*
  * Debugging dump, used in various places to see what's going on.
  */
 
@@ -443,6 +417,49 @@ void __init via_nubus_init(void)
  * via6522.c :-), disable/pending masks added.
  */
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+void via1_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int irq_num;
+	unsigned char irq_bit, events;
+
+	events = via1[vIFR] & via1[vIER] & 0x7F;
+	if (!events)
+		return;
+
+	irq_num = VIA1_SOURCE_BASE;
+	irq_bit = 1;
+	do {
+		if (events & irq_bit) {
+			via1[vIFR] = irq_bit;
+			generic_handle_irq(irq_num);
+		}
+		++irq_num;
+		irq_bit <<= 1;
+	} while (events >= irq_bit);
+}
+
+static void via2_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int irq_num;
+	unsigned char irq_bit, events;
+
+	events = via2[gIFR] & via2[gIER] & 0x7F;
+	if (!events)
+		return;
+
+	irq_num = VIA2_SOURCE_BASE;
+	irq_bit = 1;
+	do {
+		if (events & irq_bit) {
+			via2[gIFR] = irq_bit | rbv_clear;
+			generic_handle_irq(irq_num);
+		}
+		++irq_num;
+		irq_bit <<= 1;
+	} while (events >= irq_bit);
+}
+#else
 irqreturn_t via1_irq(int irq, void *dev_id)
 {
 	int irq_num;
@@ -486,12 +503,49 @@ irqreturn_t via2_irq(int irq, void *dev_id)
 	} while (events >= irq_bit);
 	return IRQ_HANDLED;
 }
+#endif
 
 /*
  * Dispatch Nubus interrupts. We are called as a secondary dispatch by the
  * VIA2 dispatcher as a fast interrupt handler.
  */
 
+#ifdef CONFIG_GENERIC_HARDIRQS
+void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
+{
+	int slot_irq;
+	unsigned char slot_bit, events;
+
+	events = ~via2[gBufA] & 0x7F;
+	if (rbv_present)
+		events &= via2[rSIER];
+	else
+		events &= ~via2[vDirA];
+	if (!events)
+		return;
+
+	do {
+		slot_irq = IRQ_NUBUS_F;
+		slot_bit = 0x40;
+		do {
+			if (events & slot_bit) {
+				events &= ~slot_bit;
+				generic_handle_irq(slot_irq);
+			}
+			--slot_irq;
+			slot_bit >>= 1;
+		} while (events);
+
+ 		/* clear the CA1 interrupt and make certain there's no more. */
+		via2[gIFR] = 0x02 | rbv_clear;
+		events = ~via2[gBufA] & 0x7F;
+		if (rbv_present)
+			events &= via2[rSIER];
+		else
+			events &= ~via2[vDirA];
+	} while (events);
+}
+#else
 irqreturn_t via_nubus_irq(int irq, void *dev_id)
 {
 	int slot_irq;
@@ -527,6 +581,43 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)
 	} while (events);
 	return IRQ_HANDLED;
 }
+#endif
+
+/*
+ * Register the interrupt dispatchers for VIA or RBV machines only.
+ */
+
+void __init via_register_interrupts(void)
+{
+#ifdef CONFIG_GENERIC_HARDIRQS
+	if (via_alt_mapping) {
+		/* software interrupt */
+		irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
+		/* via1 interrupt */
+		irq_set_chained_handler(IRQ_AUTO_6, via1_irq);
+	} else {
+		irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
+	}
+	irq_set_chained_handler(IRQ_AUTO_2, via2_irq);
+	irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq);
+#else
+	if (via_alt_mapping) {
+		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, 0, "via1", (void *)via1))
+			pr_err("Couldn't register %s interrupt\n", "via1");
+	} else {
+		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, 0, "via2", (void *)via2))
+		pr_err("Couldn't register %s interrupt\n", "via2");
+	if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus",
+			(void *)via2))
+		pr_err("Couldn't register %s interrupt\n", "nubus");
+#endif
+}
 
 void via_irq_enable(int irq) {
 	int irq_src	= IRQ_SRC(irq);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Philip Blundell

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Philip Blundell <philb@gnu.org>
---
v3: Added this changeset
---
 arch/m68k/Kconfig.mmu |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 24f39df..9707db5 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Philip Blundell

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Philip Blundell <philb@gnu.org>
---
v3: Added this changeset
---
 arch/m68k/Kconfig.mmu |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 24f39df..9707db5 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 22/28] m68k/vme: Convert VME to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (34 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Richard Hirst

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Hirst <rhirst@parisc-linux.org>
---
v3: Added this changeset
---
 arch/m68k/Kconfig.mmu |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 9707db5..258d92b 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 22/28] m68k/vme: Convert VME to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (33 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Richard Hirst

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Hirst <rhirst@parisc-linux.org>
---
v3: Added this changeset
---
 arch/m68k/Kconfig.mmu |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 9707db5..258d92b 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 23/28] m68k/apollo: Convert Apollo to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (36 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Peter De Schrijver

Replace the custom user vector interrupt handler that calls do_IRQ() and
does an EOI by handle_fasteoi_irq().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Peter De Schrijver <p2@debian.org>
---
v4: Added this changeset
---
 arch/m68k/Kconfig.mmu      |    1 -
 arch/m68k/apollo/dn_ints.c |   25 +++++++++++++++++++++++--
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 258d92b..b5e331f 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 4b76431..fc190b3 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 23/28] m68k/apollo: Convert Apollo to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (35 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Peter De Schrijver

Replace the custom user vector interrupt handler that calls do_IRQ() and
does an EOI by handle_fasteoi_irq().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Peter De Schrijver <p2@debian.org>
---
v4: Added this changeset
---
 arch/m68k/Kconfig.mmu      |    1 -
 arch/m68k/apollo/dn_ints.c |   25 +++++++++++++++++++++++--
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 258d92b..b5e331f 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 4b76431..fc190b3 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 24/28] m68k/sun3: Use the kstat_irqs_cpu() wrapper
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Sam Creasey

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
v4: Added this changeset
---
 arch/m68k/sun3/sun3ints.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 20ffee7..1273eb8 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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;
 }
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 24/28] m68k/sun3: Use the kstat_irqs_cpu() wrapper
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Sam Creasey

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
v4: Added this changeset
---
 arch/m68k/sun3/sun3ints.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 20ffee7..1273eb8 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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;
 }
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 25/28] m68k/sun3: Convert Sun3/3x to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (38 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Sam Creasey

Replace the custom irq handler that masks the irq and calls do_IRQ(), and
the unmasking in the individual handlers, by handle_level_irq().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
v4: Added this changeset
---
 arch/m68k/Kconfig.mmu     |    2 --
 arch/m68k/sun3/sun3ints.c |   16 ++++++++++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index b5e331f..fa98287 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
 
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 1273eb8..626b601 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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))
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 25/28] m68k/sun3: Convert Sun3/3x to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (39 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Sam Creasey

Replace the custom irq handler that masks the irq and calls do_IRQ(), and
the unmasking in the individual handlers, by handle_level_irq().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
v4: Added this changeset
---
 arch/m68k/Kconfig.mmu     |    2 --
 arch/m68k/sun3/sun3ints.c |   16 ++++++++++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index b5e331f..fa98287 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
 
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 1273eb8..626b601 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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))
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 26/28] m68k/q40: Convert Q40/Q60 to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (40 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Richard Zidlicky

q40_irq_handler() must be kept to translate ISA IRQs to the range 1-15.
q40_probe_irq_o{ff,n}() become unused.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Zidlicky <rz@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index fa98287..39da911 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -200,7 +200,6 @@ config SUN3
 
 config USE_GENERIC_HARDIRQS
 	bool "Use genirq"
-	depends on !Q40
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 
diff --git a/arch/m68k/include/asm/q40ints.h b/arch/m68k/include/asm/q40ints.h
index 3d970af..01cdbb4 100644
--- a/arch/m68k/include/asm/q40ints.h
+++ b/arch/m68k/include/asm/q40ints.h
@@ -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
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index afe600c..f1e5288 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 26/28] m68k/q40: Convert Q40/Q60 to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (41 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Richard Zidlicky

q40_irq_handler() must be kept to translate ISA IRQs to the range 1-15.
q40_probe_irq_o{ff,n}() become unused.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Zidlicky <rz@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index fa98287..39da911 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -200,7 +200,6 @@ config SUN3
 
 config USE_GENERIC_HARDIRQS
 	bool "Use genirq"
-	depends on !Q40
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 
diff --git a/arch/m68k/include/asm/q40ints.h b/arch/m68k/include/asm/q40ints.h
index 3d970af..01cdbb4 100644
--- a/arch/m68k/include/asm/q40ints.h
+++ b/arch/m68k/include/asm/q40ints.h
@@ -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
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index afe600c..f1e5288 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 27/28] m68k/irq: Remove obsolete m68k irq framework
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 6f490b9..5306229 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -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
diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 39da911..4ef37c9 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index a8da471..47b5f90 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -9,9 +9,7 @@
 #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>
@@ -48,7 +46,6 @@ 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;
@@ -140,103 +137,6 @@ static void ami_int5(unsigned int irq, struct irq_desc *desc)
 		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;
-
-	/* 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);
-	}
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t ami_int3(int irq, void *dev_id)
-{
-	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);
-	}
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t ami_int4(int irq, void *dev_id)
-{
-	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);
-	}
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t ami_int5(int irq, void *dev_id)
-{
-	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);
-	}
-	return IRQ_HANDLED;
-}
-#endif /* !CONFIG_GENERIC_HARDIRQS */
 
 
 /*
@@ -252,7 +152,6 @@ 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);
 
@@ -260,19 +159,6 @@ void __init amiga_init_IRQ(void)
 	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))
-		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);
-#endif /* !CONFIG_GENERIC_HARDIRQS */
 
 	/* turn off PCMCIA interrupts */
 	if (AMIGAHW_PRESENT(PCMCIA))
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index fc190b3..b7d0aa3 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 8971647..6f28dd8 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -49,67 +49,6 @@
 
 #define IRQ_USER	8
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-
-#include <linux/linkage.h>
-#include <linux/hardirq.h>
-#include <linux/irqreturn.h>
-#include <linux/spinlock_types.h>
-
-struct pt_regs;
-
-/*
- * This structure is used to chain together the ISRs for a particular
- * interrupt source (if it supports chaining).
- */
-struct irq_data {
-	unsigned int	irq;
-	irqreturn_t	(*handler)(int, void *);
-	void		*dev_id;
-	struct irq_data *next;
-	unsigned long	flags;
-	const char	*devname;
-};
-
-/*
- * This structure has only 4 elements for speed reasons
- */
-struct irq_handler {
-	int		(*handler)(int, void *);
-	unsigned long	flags;
-	void		*dev_id;
-	const char	*devname;
-};
-
-struct irq_chip {
-	const char *name;
-	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(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
- */
-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,
-				      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))
-
-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;
@@ -126,8 +65,6 @@ extern void m68k_setup_irq_controller(struct irq_chip *,
 						     struct irq_desc *desc),
 				      unsigned int irq, unsigned int cnt);
 
-#endif /* CONFIG_GENERIC_HARDIRQS */
-
 extern unsigned int irq_canonicalize(unsigned int irq);
 
 #else
diff --git a/arch/m68k/include/asm/q40ints.h b/arch/m68k/include/asm/q40ints.h
index 01cdbb4..22f12c9 100644
--- a/arch/m68k/include/asm/q40ints.h
+++ b/arch/m68k/include/asm/q40ints.h
@@ -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
diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
index 8122750..24aed9c 100644
--- a/arch/m68k/kernel/Makefile_mm
+++ b/arch/m68k/kernel/Makefile_mm
@@ -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
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index cea439f..e2b056b 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -31,20 +31,6 @@ extern u32 auto_irqhandler_fixup[];
 extern u32 user_irqhandler_fixup[];
 extern u16 user_irqvec_fixup[];
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-/* table for system interrupt handlers */
-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;
-}
-#define irq_set_chip_and_handler(irq, chip, dummy)	irq_set_chip(irq, chip)
-#endif /* !CONFIG_GENERIC_HARDIRQS */
-
 static int m68k_first_user_vec;
 
 static struct irq_chip auto_irq_chip = {
@@ -59,11 +45,6 @@ static struct irq_chip user_irq_chip = {
 	.irq_shutdown	= m68k_irq_shutdown,
 };
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-#define NUM_IRQ_NODES 100
-static struct irq_data nodes[NUM_IRQ_NODES];
-#endif /* !CONFIG_GENERIC_HARDIRQS */
-
 /*
  * void init_IRQ(void)
  *
@@ -133,8 +114,6 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
 	flush_icache();
 }
 
-#ifdef CONFIG_GENERIC_HARDIRQS
-
 /**
  * m68k_setup_irq_controller
  * @chip: irq chip which controls specified irq
@@ -160,198 +139,6 @@ void m68k_setup_irq_controller(struct irq_chip *chip,
 	}
 }
 
-#else /* !CONFIG_GENERIC_HARDIRQS */
-
-/**
- * m68k_setup_irq_chip
- * @contr: irq controller which controls specified irq
- * @irq: first irq to be managed by the controller
- *
- * Change the controller for the specified range of irq, which will be used to
- * manage these irq. auto/user irq already have a default controller, which can
- * be changed as well, but the controller probably should use m68k_irq_startup/
- * m68k_irq_shutdown.
- */
-void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,
-			       unsigned int cnt)
-{
-	int i;
-
-	for (i = 0; i < cnt; i++)
-		irq_set_chip(irq + i, contr);
-}
-
-struct irq_data *new_irq_node(void)
-{
-	struct irq_data *node;
-	short i;
-
-	for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) {
-		if (!node->handler) {
-			memset(node, 0, sizeof(*node));
-			return node;
-		}
-	}
-
-	printk ("new_irq_node: out of nodes\n");
-	return NULL;
-}
-
-static int m68k_setup_irq(unsigned int irq, struct irq_data *node)
-{
-	struct irq_chip *contr;
-	struct irq_data **prev;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
-		printk("%s: Incorrect IRQ %d from %s\n",
-		       __func__, irq, node->devname);
-		return -ENXIO;
-	}
-
-	local_irq_save(flags);
-
-	prev = irq_list + irq;
-	if (*prev) {
-		/* Can't share interrupts unless both agree to */
-		if (!((*prev)->flags & node->flags & IRQF_SHARED)) {
-			local_irq_restore(flags);
-			return -EBUSY;
-		}
-		while (*prev)
-			prev = &(*prev)->next;
-	}
-
-	if (!irq_list[irq]) {
-		if (contr->irq_startup)
-			contr->irq_startup(node);
-		else
-			contr->irq_enable(node);
-	}
-	node->next = NULL;
-	*prev = node;
-
-	local_irq_restore(flags);
-
-	return 0;
-}
-
-int request_irq(unsigned int irq,
-		irq_handler_t handler,
-		unsigned long flags, const char *devname, void *dev_id)
-{
-	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;
-	node->devname = devname;
-
-	res = m68k_setup_irq(irq, node);
-	if (res)
-		node->handler = NULL;
-
-	return res;
-}
-
-EXPORT_SYMBOL(request_irq);
-
-void free_irq(unsigned int irq, void *dev_id)
-{
-	struct irq_chip *contr;
-	struct irq_data **p, *node;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
-		printk("%s: Incorrect IRQ %d\n", __func__, irq);
-		return;
-	}
-
-	local_irq_save(flags);
-
-	p = irq_list + irq;
-	while ((node = *p)) {
-		if (node->dev_id == dev_id)
-			break;
-		p = &node->next;
-	}
-
-	if (node) {
-		*p = node->next;
-		node->handler = NULL;
-	} else
-		printk("%s: Removing probably wrong IRQ %d\n",
-		       __func__, irq);
-
-	if (!irq_list[irq]) {
-		if (contr->irq_shutdown)
-			contr->irq_shutdown(node);
-		else
-			contr->irq_disable(node);
-	}
-
-	local_irq_restore(flags);
-}
-
-EXPORT_SYMBOL(free_irq);
-
-void enable_irq(unsigned int irq)
-{
-	struct irq_chip *contr;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
-		printk("%s: Incorrect IRQ %d\n",
-		       __func__, irq);
-		return;
-	}
-
-	local_irq_save(flags);
-	if (irq_depth[irq]) {
-		if (!--irq_depth[irq]) {
-			if (contr->irq_enable)
-				contr->irq_enable(irq_list[irq]);
-		}
-	} else
-		WARN_ON(1);
-	local_irq_restore(flags);
-}
-
-EXPORT_SYMBOL(enable_irq);
-
-void disable_irq(unsigned int irq)
-{
-	struct irq_chip *contr;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
-		printk("%s: Incorrect IRQ %d\n",
-		       __func__, irq);
-		return;
-	}
-
-	local_irq_save(flags);
-	if (!irq_depth[irq]++) {
-		if (contr->irq_disable)
-			contr->irq_disable(irq_list[irq]);
-	}
-	local_irq_restore(flags);
-}
-
-EXPORT_SYMBOL(disable_irq);
-
-void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));
-
-EXPORT_SYMBOL(disable_irq_nosync);
-
-#endif /* !CONFIG_GENERIC_HARDIRQS */
-
 unsigned int m68k_irq_startup_irq(unsigned int irq)
 {
 	if (irq <= IRQ_AUTO_7)
@@ -377,36 +164,6 @@ void m68k_irq_shutdown(struct irq_data *data)
 }
 
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-
-/*
- * Do we need these probe functions on the m68k?
- *
- *  ... may be useful with ISA devices
- */
-unsigned long probe_irq_on (void)
-{
-#ifdef CONFIG_Q40
-	if (MACH_IS_Q40)
-		return q40_probe_irq_on();
-#endif
-	return 0;
-}
-
-EXPORT_SYMBOL(probe_irq_on);
-
-int probe_irq_off (unsigned long irqs)
-{
-#ifdef CONFIG_Q40
-	if (MACH_IS_Q40)
-		return q40_probe_irq_off(irqs);
-#endif
-	return 0;
-}
-
-EXPORT_SYMBOL(probe_irq_off);
-#endif /* CONFIG_GENERIC_HARDIRQS */
-
 unsigned int irq_canonicalize(unsigned int irq)
 {
 #ifdef CONFIG_Q40
@@ -418,63 +175,9 @@ unsigned int irq_canonicalize(unsigned int irq)
 
 EXPORT_SYMBOL(irq_canonicalize);
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-void generic_handle_irq(unsigned int irq)
-{
-	struct irq_data *node;
-	kstat_cpu(0).irqs[irq]++;
-	node = irq_list[irq];
-	do {
-		node->handler(irq, node->dev_id);
-		node = node->next;
-	} while (node);
-}
-
-asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
-{
-	struct pt_regs *old_regs;
-	old_regs = set_irq_regs(regs);
-	generic_handle_irq(irq);
-	set_irq_regs(old_regs);
-}
-
-asmlinkage void handle_badint(struct pt_regs *regs)
-{
-	kstat_cpu(0).irqs[0]++;
-	printk("unexpected interrupt from %u\n", regs->vector);
-}
-
-int show_interrupts(struct seq_file *p, void *v)
-{
-	struct irq_chip *contr;
-	struct irq_data *node;
-	int i = *(loff_t *) v;
-
-	/* autovector interrupts */
-	if (irq_list[i]) {
-		contr = irq_chip[i];
-		node = irq_list[i];
-		seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname);
-		while ((node = node->next))
-			seq_printf(p, ", %s", node->devname);
-		seq_puts(p, "\n");
-	}
-	return 0;
-}
-
-#ifdef CONFIG_PROC_FS
-void init_irq_proc(void)
-{
-	/* Insert /proc/irq driver here */
-}
-#endif
-
-#else /* CONFIG_GENERIC_HARDIRQS */
 
 asmlinkage void handle_badint(struct pt_regs *regs)
 {
 	atomic_inc(&irq_err_count);
 	pr_warn("unexpected interrupt from %u\n", regs->vector);
 }
-
-#endif /* CONFIG_GENERIC_HARDIRQS */
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 425144c..b55ead2 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -11,9 +11,7 @@
 #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>
@@ -56,7 +54,6 @@ 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;
@@ -88,39 +85,6 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc)
 	baboon->mb_ifr &= ~events;
 #endif
 }
-#else
-static irqreturn_t baboon_irq(int irq, void *dev_id)
-{
-	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
-
-	if (!(events = baboon->mb_ifr & 0x07))
-		return IRQ_NONE;
-
-	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
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Register the Baboon interrupt dispatcher on nubus slot $C.
@@ -129,12 +93,7 @@ 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
 }
 
 /*
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index cc784c2..a4c82da 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -19,9 +19,7 @@
 #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>
@@ -32,11 +30,7 @@
 int oss_present;
 volatile struct mac_oss *oss;
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 extern void via1_irq(unsigned int irq, struct irq_desc *desc);
-#else
-extern irqreturn_t via1_irq(int, void *);
-#endif
 
 /*
  * Initialize the OSS
@@ -76,7 +70,6 @@ void __init oss_nubus_init(void)
  * and SCSI; everything else is routed to its own autovector IRQ.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 static void oss_irq(unsigned int irq, struct irq_desc *desc)
 {
 	int events;
@@ -103,35 +96,6 @@ static void oss_irq(unsigned int irq, struct irq_desc *desc)
 		/* FIXME: error check here? */
 	}
 }
-#else
-static irqreturn_t oss_irq(int irq, void *dev_id)
-{
-	int events;
-
-	events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI);
-	if (!events)
-		return IRQ_NONE;
-
-#ifdef DEBUG_IRQS
-	if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
-		printk("oss_irq: irq %d events = 0x%04X\n", irq,
-			(int) oss->irq_pending);
-	}
-#endif
-	/* FIXME: how do you clear a pending IRQ?    */
-
-	if (events & OSS_IP_SOUND) {
-		oss->irq_pending &= ~OSS_IP_SOUND;
-		/* FIXME: call sound handler */
-	} else if (events & OSS_IP_SCSI) {
-		oss->irq_pending &= ~OSS_IP_SCSI;
-		generic_handle_irq(IRQ_MAC_SCSI);
-	} else {
-		/* FIXME: error check here? */
-	}
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Nubus IRQ handler, OSS style
@@ -139,7 +103,6 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
  * Unlike the VIA/RBV this is on its own autovector interrupt level.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
 {
 	int events, irq_bit, i;
@@ -166,35 +129,6 @@ static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
 		}
 	} while(events & (irq_bit - 1));
 }
-#else
-static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
-{
-	int events, irq_bit, i;
-
-	events = oss->irq_pending & OSS_IP_NUBUS;
-	if (!events)
-		return IRQ_NONE;
-
-#ifdef DEBUG_NUBUS_INT
-	if (console_loglevel > 7) {
-		printk("oss_nubus_irq: events = 0x%04X\n", events);
-	}
-#endif
-	/* There are only six slots on the OSS, not seven */
-
-	i = 6;
-	irq_bit = 0x40;
-	do {
-		--i;
-		irq_bit >>= 1;
-		if (events & irq_bit) {
-			oss->irq_pending &= ~irq_bit;
-			generic_handle_irq(NUBUS_SOURCE_BASE + i);
-		}
-	} while(events & (irq_bit - 1));
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Register the OSS and NuBus interrupt dispatchers.
@@ -202,22 +136,10 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
 
 void __init oss_register_interrupts(void)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS
 	irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq);
 	irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq);
 	irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq);
 	irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq);
-#else /* !CONFIG_GENERIC_HARDIRQS */
-	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, 0, "nubus",
-			(void *)oss))
-		pr_err("Couldn't register %s interrupt\n", "nubus");
-	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, 0, "via1", (void *)via1))
-		pr_err("Couldn't register %s interrupt\n", "via1");
-#endif /* !CONFIG_GENERIC_HARDIRQS */
 }
 
 /*
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 52840b8..e6c2d20 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -18,9 +18,7 @@
 #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>
@@ -116,7 +114,6 @@ void __init psc_init(void)
  * PSC interrupt handler. It's a lot like the VIA interrupt handler.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 static void psc_irq(unsigned int irq, struct irq_desc *desc)
 {
 	unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
@@ -145,36 +142,6 @@ static void psc_irq(unsigned int irq, struct irq_desc *desc)
 		irq_bit <<= 1;
 	} while (events >= irq_bit);
 }
-#else
-static irqreturn_t psc_irq(int irq, void *dev_id)
-{
-	int pIFR	= pIFRbase + ((int) dev_id);
-	int pIER	= pIERbase + ((int) dev_id);
-	int irq_num;
-	unsigned char irq_bit, events;
-
-#ifdef DEBUG_IRQS
-	printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n",
-		irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER));
-#endif
-
-	events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF;
-	if (!events)
-		return IRQ_NONE;
-
-	irq_num = irq << 3;
-	irq_bit = 1;
-	do {
-		if (events & irq_bit) {
-			psc_write_byte(pIFR, irq_bit);
-			generic_handle_irq(irq_num);
-		}
-		irq_num++;
-		irq_bit <<= 1;
-	} while (events >= irq_bit);
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Register the PSC interrupt dispatchers for autovector interrupts 3-6.
@@ -182,7 +149,6 @@ static irqreturn_t psc_irq(int irq, void *dev_id)
 
 void __init psc_register_interrupts(void)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS
 	irq_set_chained_handler(IRQ_AUTO_3, psc_irq);
 	irq_set_handler_data(IRQ_AUTO_3, (void *)0x30);
 	irq_set_chained_handler(IRQ_AUTO_4, psc_irq);
@@ -191,16 +157,6 @@ void __init psc_register_interrupts(void)
 	irq_set_handler_data(IRQ_AUTO_5, (void *)0x50);
 	irq_set_chained_handler(IRQ_AUTO_6, psc_irq);
 	irq_set_handler_data(IRQ_AUTO_6, (void *)0x60);
-#else /* !CONFIG_GENERIC_HARDIRQS */
-	if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30))
-		pr_err("Couldn't register psc%d interrupt\n", 3);
-	if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40))
-		pr_err("Couldn't register psc%d interrupt\n", 4);
-	if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50))
-		pr_err("Couldn't register psc%d interrupt\n", 5);
-	if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60))
-		pr_err("Couldn't register psc%d interrupt\n", 6);
-#endif /* !CONFIG_GENERIC_HARDIRQS */
 }
 
 void psc_irq_enable(int irq) {
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index b8156ac..f1600ad 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -28,9 +28,7 @@
 #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>
@@ -417,7 +415,6 @@ void __init via_nubus_init(void)
  * via6522.c :-), disable/pending masks added.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 void via1_irq(unsigned int irq, struct irq_desc *desc)
 {
 	int irq_num;
@@ -459,58 +456,12 @@ static void via2_irq(unsigned int irq, struct irq_desc *desc)
 		irq_bit <<= 1;
 	} while (events >= irq_bit);
 }
-#else
-irqreturn_t via1_irq(int irq, void *dev_id)
-{
-	int irq_num;
-	unsigned char irq_bit, events;
-
-	events = via1[vIFR] & via1[vIER] & 0x7F;
-	if (!events)
-		return IRQ_NONE;
-
-	irq_num = VIA1_SOURCE_BASE;
-	irq_bit = 1;
-	do {
-		if (events & irq_bit) {
-			via1[vIFR] = irq_bit;
-			generic_handle_irq(irq_num);
-		}
-		++irq_num;
-		irq_bit <<= 1;
-	} while (events >= irq_bit);
-	return IRQ_HANDLED;
-}
-
-irqreturn_t via2_irq(int irq, void *dev_id)
-{
-	int irq_num;
-	unsigned char irq_bit, events;
-
-	events = via2[gIFR] & via2[gIER] & 0x7F;
-	if (!events)
-		return IRQ_NONE;
-
-	irq_num = VIA2_SOURCE_BASE;
-	irq_bit = 1;
-	do {
-		if (events & irq_bit) {
-			via2[gIFR] = irq_bit | rbv_clear;
-			generic_handle_irq(irq_num);
-		}
-		++irq_num;
-		irq_bit <<= 1;
-	} while (events >= irq_bit);
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Dispatch Nubus interrupts. We are called as a secondary dispatch by the
  * VIA2 dispatcher as a fast interrupt handler.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
 {
 	int slot_irq;
@@ -545,43 +496,6 @@ void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
 			events &= ~via2[vDirA];
 	} while (events);
 }
-#else
-irqreturn_t via_nubus_irq(int irq, void *dev_id)
-{
-	int slot_irq;
-	unsigned char slot_bit, events;
-
-	events = ~via2[gBufA] & 0x7F;
-	if (rbv_present)
-		events &= via2[rSIER];
-	else
-		events &= ~via2[vDirA];
-	if (!events)
-		return IRQ_NONE;
-
-	do {
-		slot_irq = IRQ_NUBUS_F;
-		slot_bit = 0x40;
-		do {
-			if (events & slot_bit) {
-				events &= ~slot_bit;
-				generic_handle_irq(slot_irq);
-			}
-			--slot_irq;
-			slot_bit >>= 1;
-		} while (events);
-
- 		/* clear the CA1 interrupt and make certain there's no more. */
-		via2[gIFR] = 0x02 | rbv_clear;
-		events = ~via2[gBufA] & 0x7F;
-		if (rbv_present)
-			events &= via2[rSIER];
-		else
-			events &= ~via2[vDirA];
-	} while (events);
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Register the interrupt dispatchers for VIA or RBV machines only.
@@ -589,7 +503,6 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)
 
 void __init via_register_interrupts(void)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS
 	if (via_alt_mapping) {
 		/* software interrupt */
 		irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
@@ -600,23 +513,6 @@ void __init via_register_interrupts(void)
 	}
 	irq_set_chained_handler(IRQ_AUTO_2, via2_irq);
 	irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq);
-#else
-	if (via_alt_mapping) {
-		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, 0, "via1", (void *)via1))
-			pr_err("Couldn't register %s interrupt\n", "via1");
-	} else {
-		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, 0, "via2", (void *)via2))
-		pr_err("Couldn't register %s interrupt\n", "via2");
-	if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus",
-			(void *)via2))
-		pr_err("Couldn't register %s interrupt\n", "nubus");
-#endif
 }
 
 void via_irq_enable(int irq) {
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index f1e5288..2b88849 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 626b601..7eb3781 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 27/28] m68k/irq: Remove obsolete m68k irq framework
@ 2011-09-11 11:59   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 6f490b9..5306229 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -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
diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index 39da911..4ef37c9 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -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
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index a8da471..47b5f90 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -9,9 +9,7 @@
 #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>
@@ -48,7 +46,6 @@ 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;
@@ -140,103 +137,6 @@ static void ami_int5(unsigned int irq, struct irq_desc *desc)
 		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;
-
-	/* 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);
-	}
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t ami_int3(int irq, void *dev_id)
-{
-	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);
-	}
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t ami_int4(int irq, void *dev_id)
-{
-	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);
-	}
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t ami_int5(int irq, void *dev_id)
-{
-	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);
-	}
-	return IRQ_HANDLED;
-}
-#endif /* !CONFIG_GENERIC_HARDIRQS */
 
 
 /*
@@ -252,7 +152,6 @@ 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);
 
@@ -260,19 +159,6 @@ void __init amiga_init_IRQ(void)
 	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))
-		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);
-#endif /* !CONFIG_GENERIC_HARDIRQS */
 
 	/* turn off PCMCIA interrupts */
 	if (AMIGAHW_PRESENT(PCMCIA))
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index fc190b3..b7d0aa3 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 8971647..6f28dd8 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -49,67 +49,6 @@
 
 #define IRQ_USER	8
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-
-#include <linux/linkage.h>
-#include <linux/hardirq.h>
-#include <linux/irqreturn.h>
-#include <linux/spinlock_types.h>
-
-struct pt_regs;
-
-/*
- * This structure is used to chain together the ISRs for a particular
- * interrupt source (if it supports chaining).
- */
-struct irq_data {
-	unsigned int	irq;
-	irqreturn_t	(*handler)(int, void *);
-	void		*dev_id;
-	struct irq_data *next;
-	unsigned long	flags;
-	const char	*devname;
-};
-
-/*
- * This structure has only 4 elements for speed reasons
- */
-struct irq_handler {
-	int		(*handler)(int, void *);
-	unsigned long	flags;
-	void		*dev_id;
-	const char	*devname;
-};
-
-struct irq_chip {
-	const char *name;
-	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(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
- */
-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,
-				      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))
-
-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;
@@ -126,8 +65,6 @@ extern void m68k_setup_irq_controller(struct irq_chip *,
 						     struct irq_desc *desc),
 				      unsigned int irq, unsigned int cnt);
 
-#endif /* CONFIG_GENERIC_HARDIRQS */
-
 extern unsigned int irq_canonicalize(unsigned int irq);
 
 #else
diff --git a/arch/m68k/include/asm/q40ints.h b/arch/m68k/include/asm/q40ints.h
index 01cdbb4..22f12c9 100644
--- a/arch/m68k/include/asm/q40ints.h
+++ b/arch/m68k/include/asm/q40ints.h
@@ -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
diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
index 8122750..24aed9c 100644
--- a/arch/m68k/kernel/Makefile_mm
+++ b/arch/m68k/kernel/Makefile_mm
@@ -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
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index cea439f..e2b056b 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -31,20 +31,6 @@ extern u32 auto_irqhandler_fixup[];
 extern u32 user_irqhandler_fixup[];
 extern u16 user_irqvec_fixup[];
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-/* table for system interrupt handlers */
-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;
-}
-#define irq_set_chip_and_handler(irq, chip, dummy)	irq_set_chip(irq, chip)
-#endif /* !CONFIG_GENERIC_HARDIRQS */
-
 static int m68k_first_user_vec;
 
 static struct irq_chip auto_irq_chip = {
@@ -59,11 +45,6 @@ static struct irq_chip user_irq_chip = {
 	.irq_shutdown	= m68k_irq_shutdown,
 };
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-#define NUM_IRQ_NODES 100
-static struct irq_data nodes[NUM_IRQ_NODES];
-#endif /* !CONFIG_GENERIC_HARDIRQS */
-
 /*
  * void init_IRQ(void)
  *
@@ -133,8 +114,6 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
 	flush_icache();
 }
 
-#ifdef CONFIG_GENERIC_HARDIRQS
-
 /**
  * m68k_setup_irq_controller
  * @chip: irq chip which controls specified irq
@@ -160,198 +139,6 @@ void m68k_setup_irq_controller(struct irq_chip *chip,
 	}
 }
 
-#else /* !CONFIG_GENERIC_HARDIRQS */
-
-/**
- * m68k_setup_irq_chip
- * @contr: irq controller which controls specified irq
- * @irq: first irq to be managed by the controller
- *
- * Change the controller for the specified range of irq, which will be used to
- * manage these irq. auto/user irq already have a default controller, which can
- * be changed as well, but the controller probably should use m68k_irq_startup/
- * m68k_irq_shutdown.
- */
-void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,
-			       unsigned int cnt)
-{
-	int i;
-
-	for (i = 0; i < cnt; i++)
-		irq_set_chip(irq + i, contr);
-}
-
-struct irq_data *new_irq_node(void)
-{
-	struct irq_data *node;
-	short i;
-
-	for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) {
-		if (!node->handler) {
-			memset(node, 0, sizeof(*node));
-			return node;
-		}
-	}
-
-	printk ("new_irq_node: out of nodes\n");
-	return NULL;
-}
-
-static int m68k_setup_irq(unsigned int irq, struct irq_data *node)
-{
-	struct irq_chip *contr;
-	struct irq_data **prev;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
-		printk("%s: Incorrect IRQ %d from %s\n",
-		       __func__, irq, node->devname);
-		return -ENXIO;
-	}
-
-	local_irq_save(flags);
-
-	prev = irq_list + irq;
-	if (*prev) {
-		/* Can't share interrupts unless both agree to */
-		if (!((*prev)->flags & node->flags & IRQF_SHARED)) {
-			local_irq_restore(flags);
-			return -EBUSY;
-		}
-		while (*prev)
-			prev = &(*prev)->next;
-	}
-
-	if (!irq_list[irq]) {
-		if (contr->irq_startup)
-			contr->irq_startup(node);
-		else
-			contr->irq_enable(node);
-	}
-	node->next = NULL;
-	*prev = node;
-
-	local_irq_restore(flags);
-
-	return 0;
-}
-
-int request_irq(unsigned int irq,
-		irq_handler_t handler,
-		unsigned long flags, const char *devname, void *dev_id)
-{
-	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;
-	node->devname = devname;
-
-	res = m68k_setup_irq(irq, node);
-	if (res)
-		node->handler = NULL;
-
-	return res;
-}
-
-EXPORT_SYMBOL(request_irq);
-
-void free_irq(unsigned int irq, void *dev_id)
-{
-	struct irq_chip *contr;
-	struct irq_data **p, *node;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
-		printk("%s: Incorrect IRQ %d\n", __func__, irq);
-		return;
-	}
-
-	local_irq_save(flags);
-
-	p = irq_list + irq;
-	while ((node = *p)) {
-		if (node->dev_id == dev_id)
-			break;
-		p = &node->next;
-	}
-
-	if (node) {
-		*p = node->next;
-		node->handler = NULL;
-	} else
-		printk("%s: Removing probably wrong IRQ %d\n",
-		       __func__, irq);
-
-	if (!irq_list[irq]) {
-		if (contr->irq_shutdown)
-			contr->irq_shutdown(node);
-		else
-			contr->irq_disable(node);
-	}
-
-	local_irq_restore(flags);
-}
-
-EXPORT_SYMBOL(free_irq);
-
-void enable_irq(unsigned int irq)
-{
-	struct irq_chip *contr;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
-		printk("%s: Incorrect IRQ %d\n",
-		       __func__, irq);
-		return;
-	}
-
-	local_irq_save(flags);
-	if (irq_depth[irq]) {
-		if (!--irq_depth[irq]) {
-			if (contr->irq_enable)
-				contr->irq_enable(irq_list[irq]);
-		}
-	} else
-		WARN_ON(1);
-	local_irq_restore(flags);
-}
-
-EXPORT_SYMBOL(enable_irq);
-
-void disable_irq(unsigned int irq)
-{
-	struct irq_chip *contr;
-	unsigned long flags;
-
-	if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
-		printk("%s: Incorrect IRQ %d\n",
-		       __func__, irq);
-		return;
-	}
-
-	local_irq_save(flags);
-	if (!irq_depth[irq]++) {
-		if (contr->irq_disable)
-			contr->irq_disable(irq_list[irq]);
-	}
-	local_irq_restore(flags);
-}
-
-EXPORT_SYMBOL(disable_irq);
-
-void disable_irq_nosync(unsigned int irq) __attribute__((alias("disable_irq")));
-
-EXPORT_SYMBOL(disable_irq_nosync);
-
-#endif /* !CONFIG_GENERIC_HARDIRQS */
-
 unsigned int m68k_irq_startup_irq(unsigned int irq)
 {
 	if (irq <= IRQ_AUTO_7)
@@ -377,36 +164,6 @@ void m68k_irq_shutdown(struct irq_data *data)
 }
 
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-
-/*
- * Do we need these probe functions on the m68k?
- *
- *  ... may be useful with ISA devices
- */
-unsigned long probe_irq_on (void)
-{
-#ifdef CONFIG_Q40
-	if (MACH_IS_Q40)
-		return q40_probe_irq_on();
-#endif
-	return 0;
-}
-
-EXPORT_SYMBOL(probe_irq_on);
-
-int probe_irq_off (unsigned long irqs)
-{
-#ifdef CONFIG_Q40
-	if (MACH_IS_Q40)
-		return q40_probe_irq_off(irqs);
-#endif
-	return 0;
-}
-
-EXPORT_SYMBOL(probe_irq_off);
-#endif /* CONFIG_GENERIC_HARDIRQS */
-
 unsigned int irq_canonicalize(unsigned int irq)
 {
 #ifdef CONFIG_Q40
@@ -418,63 +175,9 @@ unsigned int irq_canonicalize(unsigned int irq)
 
 EXPORT_SYMBOL(irq_canonicalize);
 
-#ifndef CONFIG_GENERIC_HARDIRQS
-void generic_handle_irq(unsigned int irq)
-{
-	struct irq_data *node;
-	kstat_cpu(0).irqs[irq]++;
-	node = irq_list[irq];
-	do {
-		node->handler(irq, node->dev_id);
-		node = node->next;
-	} while (node);
-}
-
-asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
-{
-	struct pt_regs *old_regs;
-	old_regs = set_irq_regs(regs);
-	generic_handle_irq(irq);
-	set_irq_regs(old_regs);
-}
-
-asmlinkage void handle_badint(struct pt_regs *regs)
-{
-	kstat_cpu(0).irqs[0]++;
-	printk("unexpected interrupt from %u\n", regs->vector);
-}
-
-int show_interrupts(struct seq_file *p, void *v)
-{
-	struct irq_chip *contr;
-	struct irq_data *node;
-	int i = *(loff_t *) v;
-
-	/* autovector interrupts */
-	if (irq_list[i]) {
-		contr = irq_chip[i];
-		node = irq_list[i];
-		seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname);
-		while ((node = node->next))
-			seq_printf(p, ", %s", node->devname);
-		seq_puts(p, "\n");
-	}
-	return 0;
-}
-
-#ifdef CONFIG_PROC_FS
-void init_irq_proc(void)
-{
-	/* Insert /proc/irq driver here */
-}
-#endif
-
-#else /* CONFIG_GENERIC_HARDIRQS */
 
 asmlinkage void handle_badint(struct pt_regs *regs)
 {
 	atomic_inc(&irq_err_count);
 	pr_warn("unexpected interrupt from %u\n", regs->vector);
 }
-
-#endif /* CONFIG_GENERIC_HARDIRQS */
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 425144c..b55ead2 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -11,9 +11,7 @@
 #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>
@@ -56,7 +54,6 @@ 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;
@@ -88,39 +85,6 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc)
 	baboon->mb_ifr &= ~events;
 #endif
 }
-#else
-static irqreturn_t baboon_irq(int irq, void *dev_id)
-{
-	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
-
-	if (!(events = baboon->mb_ifr & 0x07))
-		return IRQ_NONE;
-
-	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
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Register the Baboon interrupt dispatcher on nubus slot $C.
@@ -129,12 +93,7 @@ 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
 }
 
 /*
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index cc784c2..a4c82da 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -19,9 +19,7 @@
 #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>
@@ -32,11 +30,7 @@
 int oss_present;
 volatile struct mac_oss *oss;
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 extern void via1_irq(unsigned int irq, struct irq_desc *desc);
-#else
-extern irqreturn_t via1_irq(int, void *);
-#endif
 
 /*
  * Initialize the OSS
@@ -76,7 +70,6 @@ void __init oss_nubus_init(void)
  * and SCSI; everything else is routed to its own autovector IRQ.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 static void oss_irq(unsigned int irq, struct irq_desc *desc)
 {
 	int events;
@@ -103,35 +96,6 @@ static void oss_irq(unsigned int irq, struct irq_desc *desc)
 		/* FIXME: error check here? */
 	}
 }
-#else
-static irqreturn_t oss_irq(int irq, void *dev_id)
-{
-	int events;
-
-	events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI);
-	if (!events)
-		return IRQ_NONE;
-
-#ifdef DEBUG_IRQS
-	if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
-		printk("oss_irq: irq %d events = 0x%04X\n", irq,
-			(int) oss->irq_pending);
-	}
-#endif
-	/* FIXME: how do you clear a pending IRQ?    */
-
-	if (events & OSS_IP_SOUND) {
-		oss->irq_pending &= ~OSS_IP_SOUND;
-		/* FIXME: call sound handler */
-	} else if (events & OSS_IP_SCSI) {
-		oss->irq_pending &= ~OSS_IP_SCSI;
-		generic_handle_irq(IRQ_MAC_SCSI);
-	} else {
-		/* FIXME: error check here? */
-	}
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Nubus IRQ handler, OSS style
@@ -139,7 +103,6 @@ static irqreturn_t oss_irq(int irq, void *dev_id)
  * Unlike the VIA/RBV this is on its own autovector interrupt level.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
 {
 	int events, irq_bit, i;
@@ -166,35 +129,6 @@ static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc)
 		}
 	} while(events & (irq_bit - 1));
 }
-#else
-static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
-{
-	int events, irq_bit, i;
-
-	events = oss->irq_pending & OSS_IP_NUBUS;
-	if (!events)
-		return IRQ_NONE;
-
-#ifdef DEBUG_NUBUS_INT
-	if (console_loglevel > 7) {
-		printk("oss_nubus_irq: events = 0x%04X\n", events);
-	}
-#endif
-	/* There are only six slots on the OSS, not seven */
-
-	i = 6;
-	irq_bit = 0x40;
-	do {
-		--i;
-		irq_bit >>= 1;
-		if (events & irq_bit) {
-			oss->irq_pending &= ~irq_bit;
-			generic_handle_irq(NUBUS_SOURCE_BASE + i);
-		}
-	} while(events & (irq_bit - 1));
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Register the OSS and NuBus interrupt dispatchers.
@@ -202,22 +136,10 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id)
 
 void __init oss_register_interrupts(void)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS
 	irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq);
 	irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq);
 	irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq);
 	irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq);
-#else /* !CONFIG_GENERIC_HARDIRQS */
-	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, 0, "nubus",
-			(void *)oss))
-		pr_err("Couldn't register %s interrupt\n", "nubus");
-	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, 0, "via1", (void *)via1))
-		pr_err("Couldn't register %s interrupt\n", "via1");
-#endif /* !CONFIG_GENERIC_HARDIRQS */
 }
 
 /*
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 52840b8..e6c2d20 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -18,9 +18,7 @@
 #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>
@@ -116,7 +114,6 @@ void __init psc_init(void)
  * PSC interrupt handler. It's a lot like the VIA interrupt handler.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 static void psc_irq(unsigned int irq, struct irq_desc *desc)
 {
 	unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
@@ -145,36 +142,6 @@ static void psc_irq(unsigned int irq, struct irq_desc *desc)
 		irq_bit <<= 1;
 	} while (events >= irq_bit);
 }
-#else
-static irqreturn_t psc_irq(int irq, void *dev_id)
-{
-	int pIFR	= pIFRbase + ((int) dev_id);
-	int pIER	= pIERbase + ((int) dev_id);
-	int irq_num;
-	unsigned char irq_bit, events;
-
-#ifdef DEBUG_IRQS
-	printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n",
-		irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER));
-#endif
-
-	events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF;
-	if (!events)
-		return IRQ_NONE;
-
-	irq_num = irq << 3;
-	irq_bit = 1;
-	do {
-		if (events & irq_bit) {
-			psc_write_byte(pIFR, irq_bit);
-			generic_handle_irq(irq_num);
-		}
-		irq_num++;
-		irq_bit <<= 1;
-	} while (events >= irq_bit);
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Register the PSC interrupt dispatchers for autovector interrupts 3-6.
@@ -182,7 +149,6 @@ static irqreturn_t psc_irq(int irq, void *dev_id)
 
 void __init psc_register_interrupts(void)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS
 	irq_set_chained_handler(IRQ_AUTO_3, psc_irq);
 	irq_set_handler_data(IRQ_AUTO_3, (void *)0x30);
 	irq_set_chained_handler(IRQ_AUTO_4, psc_irq);
@@ -191,16 +157,6 @@ void __init psc_register_interrupts(void)
 	irq_set_handler_data(IRQ_AUTO_5, (void *)0x50);
 	irq_set_chained_handler(IRQ_AUTO_6, psc_irq);
 	irq_set_handler_data(IRQ_AUTO_6, (void *)0x60);
-#else /* !CONFIG_GENERIC_HARDIRQS */
-	if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30))
-		pr_err("Couldn't register psc%d interrupt\n", 3);
-	if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40))
-		pr_err("Couldn't register psc%d interrupt\n", 4);
-	if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50))
-		pr_err("Couldn't register psc%d interrupt\n", 5);
-	if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60))
-		pr_err("Couldn't register psc%d interrupt\n", 6);
-#endif /* !CONFIG_GENERIC_HARDIRQS */
 }
 
 void psc_irq_enable(int irq) {
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index b8156ac..f1600ad 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -28,9 +28,7 @@
 #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>
@@ -417,7 +415,6 @@ void __init via_nubus_init(void)
  * via6522.c :-), disable/pending masks added.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 void via1_irq(unsigned int irq, struct irq_desc *desc)
 {
 	int irq_num;
@@ -459,58 +456,12 @@ static void via2_irq(unsigned int irq, struct irq_desc *desc)
 		irq_bit <<= 1;
 	} while (events >= irq_bit);
 }
-#else
-irqreturn_t via1_irq(int irq, void *dev_id)
-{
-	int irq_num;
-	unsigned char irq_bit, events;
-
-	events = via1[vIFR] & via1[vIER] & 0x7F;
-	if (!events)
-		return IRQ_NONE;
-
-	irq_num = VIA1_SOURCE_BASE;
-	irq_bit = 1;
-	do {
-		if (events & irq_bit) {
-			via1[vIFR] = irq_bit;
-			generic_handle_irq(irq_num);
-		}
-		++irq_num;
-		irq_bit <<= 1;
-	} while (events >= irq_bit);
-	return IRQ_HANDLED;
-}
-
-irqreturn_t via2_irq(int irq, void *dev_id)
-{
-	int irq_num;
-	unsigned char irq_bit, events;
-
-	events = via2[gIFR] & via2[gIER] & 0x7F;
-	if (!events)
-		return IRQ_NONE;
-
-	irq_num = VIA2_SOURCE_BASE;
-	irq_bit = 1;
-	do {
-		if (events & irq_bit) {
-			via2[gIFR] = irq_bit | rbv_clear;
-			generic_handle_irq(irq_num);
-		}
-		++irq_num;
-		irq_bit <<= 1;
-	} while (events >= irq_bit);
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Dispatch Nubus interrupts. We are called as a secondary dispatch by the
  * VIA2 dispatcher as a fast interrupt handler.
  */
 
-#ifdef CONFIG_GENERIC_HARDIRQS
 void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
 {
 	int slot_irq;
@@ -545,43 +496,6 @@ void via_nubus_irq(unsigned int irq, struct irq_desc *desc)
 			events &= ~via2[vDirA];
 	} while (events);
 }
-#else
-irqreturn_t via_nubus_irq(int irq, void *dev_id)
-{
-	int slot_irq;
-	unsigned char slot_bit, events;
-
-	events = ~via2[gBufA] & 0x7F;
-	if (rbv_present)
-		events &= via2[rSIER];
-	else
-		events &= ~via2[vDirA];
-	if (!events)
-		return IRQ_NONE;
-
-	do {
-		slot_irq = IRQ_NUBUS_F;
-		slot_bit = 0x40;
-		do {
-			if (events & slot_bit) {
-				events &= ~slot_bit;
-				generic_handle_irq(slot_irq);
-			}
-			--slot_irq;
-			slot_bit >>= 1;
-		} while (events);
-
- 		/* clear the CA1 interrupt and make certain there's no more. */
-		via2[gIFR] = 0x02 | rbv_clear;
-		events = ~via2[gBufA] & 0x7F;
-		if (rbv_present)
-			events &= via2[rSIER];
-		else
-			events &= ~via2[vDirA];
-	} while (events);
-	return IRQ_HANDLED;
-}
-#endif
 
 /*
  * Register the interrupt dispatchers for VIA or RBV machines only.
@@ -589,7 +503,6 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id)
 
 void __init via_register_interrupts(void)
 {
-#ifdef CONFIG_GENERIC_HARDIRQS
 	if (via_alt_mapping) {
 		/* software interrupt */
 		irq_set_chained_handler(IRQ_AUTO_1, via1_irq);
@@ -600,23 +513,6 @@ void __init via_register_interrupts(void)
 	}
 	irq_set_chained_handler(IRQ_AUTO_2, via2_irq);
 	irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq);
-#else
-	if (via_alt_mapping) {
-		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, 0, "via1", (void *)via1))
-			pr_err("Couldn't register %s interrupt\n", "via1");
-	} else {
-		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, 0, "via2", (void *)via2))
-		pr_err("Couldn't register %s interrupt\n", "via2");
-	if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus",
-			(void *)via2))
-		pr_err("Couldn't register %s interrupt\n", "nubus");
-#endif
 }
 
 void via_irq_enable(int irq) {
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index f1e5288..2b88849 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -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
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 626b601..7eb3781 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 28/28] m68k/irq: Remove obsolete support for user vector interrupt fixups
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (44 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

It was used on Apollo only, before its conversion to genirq.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index b7d0aa3..17be1e7 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index 908bcfc..8048e1b 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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);
 
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c
index 1edd950..8128647 100644
--- a/arch/m68k/bvme6000/config.c
+++ b/arch/m68k/bvme6000/config.c
@@ -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)
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 6f28dd8..d3a8acd 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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),
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
index f5927d0..c713f51 100644
--- a/arch/m68k/kernel/entry_mm.S
+++ b/arch/m68k/kernel/entry_mm.S
@@ -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
 
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index e2b056b..74fefac 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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();
 }
 
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 01f2adf..5de924e 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -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)
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index ea9ebad..c3fb3bd 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -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)
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 7eb3781..78b60f5 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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");
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* [PATCH 28/28] m68k/irq: Remove obsolete support for user vector interrupt fixups
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (43 preceding siblings ...)
  (?)
@ 2011-09-11 11:59 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 11:59 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven

It was used on Apollo only, before its conversion to genirq.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)

diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index b7d0aa3..17be1e7 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -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);
 }
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index 908bcfc..8048e1b 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -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);
 
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c
index 1edd950..8128647 100644
--- a/arch/m68k/bvme6000/config.c
+++ b/arch/m68k/bvme6000/config.c
@@ -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)
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 6f28dd8..d3a8acd 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -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),
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
index f5927d0..c713f51 100644
--- a/arch/m68k/kernel/entry_mm.S
+++ b/arch/m68k/kernel/entry_mm.S
@@ -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
 
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index e2b056b..74fefac 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -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();
 }
 
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 01f2adf..5de924e 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -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)
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index ea9ebad..c3fb3bd 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -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)
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 7eb3781..78b60f5 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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");
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
  2011-09-11 11:59 ` [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data" Geert Uytterhoeven
@ 2011-09-11 13:40     ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-09-11 13:40 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel


On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:

> diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
> index ffa1b3f..3cee6d2 100644
> --- a/arch/m68k/mac/macints.c
> +++ b/arch/m68k/mac/macints.c
> @@ -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)


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?)

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

Index: linux-m68k/arch/m68k/mac/baboon.c
===================================================================
--- linux-m68k.orig/arch/m68k/mac/baboon.c	2011-08-27 22:52:44.000000000 +1000
+++ linux-m68k/arch/m68k/mac/baboon.c	2011-08-27 22:53:10.000000000 +1000
@@ -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)
Index: linux-m68k/arch/m68k/mac/macints.c
===================================================================
--- linux-m68k.orig/arch/m68k/mac/macints.c	2011-08-27 22:52:44.000000000 +1000
+++ linux-m68k/arch/m68k/mac/macints.c	2011-08-27 22:52:58.000000000 +1000
@@ -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) {
Index: linux-m68k/arch/m68k/include/asm/macintosh.h
===================================================================
--- linux-m68k.orig/arch/m68k/include/asm/macintosh.h	2011-08-27 22:52:44.000000000 +1000
+++ linux-m68k/arch/m68k/include/asm/macintosh.h	2011-08-27 22:52:58.000000000 +1000
@@ -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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
@ 2011-09-11 13:40     ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-09-11 13:40 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel


On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:

> diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
> index ffa1b3f..3cee6d2 100644
> --- a/arch/m68k/mac/macints.c
> +++ b/arch/m68k/mac/macints.c
> @@ -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)


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?)

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

Index: linux-m68k/arch/m68k/mac/baboon.c
===================================================================
--- linux-m68k.orig/arch/m68k/mac/baboon.c	2011-08-27 22:52:44.000000000 +1000
+++ linux-m68k/arch/m68k/mac/baboon.c	2011-08-27 22:53:10.000000000 +1000
@@ -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)
Index: linux-m68k/arch/m68k/mac/macints.c
===================================================================
--- linux-m68k.orig/arch/m68k/mac/macints.c	2011-08-27 22:52:44.000000000 +1000
+++ linux-m68k/arch/m68k/mac/macints.c	2011-08-27 22:52:58.000000000 +1000
@@ -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) {
Index: linux-m68k/arch/m68k/include/asm/macintosh.h
===================================================================
--- linux-m68k.orig/arch/m68k/include/asm/macintosh.h	2011-08-27 22:52:44.000000000 +1000
+++ linux-m68k/arch/m68k/include/asm/macintosh.h	2011-08-27 22:52:58.000000000 +1000
@@ -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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
  2011-09-11 13:40     ` Finn Thain
  (?)
  (?)
@ 2011-09-11 17:46     ` Geert Uytterhoeven
  2011-09-12  2:48         ` Finn Thain
  -1 siblings, 1 reply; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 17:46 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel

On Sun, Sep 11, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
> On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:
>> diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
>> index ffa1b3f..3cee6d2 100644
>> --- a/arch/m68k/mac/macints.c
>> +++ b/arch/m68k/mac/macints.c
>> @@ -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)
>
>
> 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.

> @@ -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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
  2011-09-11 13:40     ` Finn Thain
  (?)
@ 2011-09-11 17:46     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-11 17:46 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel

On Sun, Sep 11, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
> On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:
>> diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
>> index ffa1b3f..3cee6d2 100644
>> --- a/arch/m68k/mac/macints.c
>> +++ b/arch/m68k/mac/macints.c
>> @@ -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)
>
>
> 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.

> @@ -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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
  2011-09-11 17:46     ` Geert Uytterhoeven
@ 2011-09-12  2:48         ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-09-12  2:48 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 733 bytes --]


On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:

> 
> > @@ -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.

> 
> 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

> 
> Gr{oetje,eeting}s,
> 
>                         Geert

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data"
@ 2011-09-12  2:48         ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-09-12  2:48 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 733 bytes --]


On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:

> 
> > @@ -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.

> 
> 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

> 
> Gr{oetje,eeting}s,
> 
>                         Geert

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 01/28] genirq: Add missing "else" in irq_shutdown()
  2011-09-11 11:59   ` Geert Uytterhoeven
@ 2011-09-12  7:53     ` Thomas Gleixner
  -1 siblings, 0 replies; 99+ messages in thread
From: Thomas Gleixner @ 2011-09-12  7:53 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel

On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:

> 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.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>

Applied into irq/urgent with a note to stable@...

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 01/28] genirq: Add missing "else" in irq_shutdown()
@ 2011-09-12  7:53     ` Thomas Gleixner
  0 siblings, 0 replies; 99+ messages in thread
From: Thomas Gleixner @ 2011-09-12  7:53 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel

On Sun, 11 Sep 2011, Geert Uytterhoeven wrote:

> 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.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>

Applied into irq/urgent with a note to stable@...

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
  2011-09-11 11:59   ` Geert Uytterhoeven
@ 2011-09-12  9:59     ` Sergei Shtylyov
  -1 siblings, 0 replies; 99+ messages in thread
From: Sergei Shtylyov @ 2011-09-12  9:59 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel, linux-ide

Hello.

On 11-09-2011 15:59, Geert Uytterhoeven wrote:

> 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. --rmk

> Remove inclusion of <linux/irq.>, to prevent the following compile error

    <linux/irq.h>? You've also typoed in the subject.

> 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 <geert@linux-m68k.org>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: linux-ide@vger.kernel.org

WBR, Sergei

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
@ 2011-09-12  9:59     ` Sergei Shtylyov
  0 siblings, 0 replies; 99+ messages in thread
From: Sergei Shtylyov @ 2011-09-12  9:59 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel, linux-ide

Hello.

On 11-09-2011 15:59, Geert Uytterhoeven wrote:

> 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. --rmk

> Remove inclusion of <linux/irq.>, to prevent the following compile error

    <linux/irq.h>? You've also typoed in the subject.

> 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 <geert@linux-m68k.org>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: linux-ide@vger.kernel.org

WBR, Sergei

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.>
  2011-09-11 11:59   ` Geert Uytterhoeven
  (?)
  (?)
@ 2011-09-12  9:59   ` Sergei Shtylyov
  -1 siblings, 0 replies; 99+ messages in thread
From: Sergei Shtylyov @ 2011-09-12  9:59 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel, linux-ide

Hello.

On 11-09-2011 15:59, Geert Uytterhoeven wrote:

> 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. --rmk

> Remove inclusion of <linux/irq.>, to prevent the following compile error

    <linux/irq.h>? You've also typoed in the subject.

> 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 <geert@linux-m68k.org>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: linux-ide@vger.kernel.org

WBR, Sergei

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 24/28] m68k/sun3: Use the kstat_irqs_cpu() wrapper
  2011-09-11 11:59   ` Geert Uytterhoeven
@ 2011-09-12 17:38     ` Sam Creasey
  -1 siblings, 0 replies; 99+ messages in thread
From: Sam Creasey @ 2011-09-12 17:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel, Sam Creasey

Signed-off-by: Sam Creasey <sammy@sammy.net>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
v4: Added this changeset
---
 arch/m68k/sun3/sun3ints.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 20ffee7..1273eb8 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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;
 }
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 99+ messages in thread

* Re: [PATCH 24/28] m68k/sun3: Use the kstat_irqs_cpu() wrapper
@ 2011-09-12 17:38     ` Sam Creasey
  0 siblings, 0 replies; 99+ messages in thread
From: Sam Creasey @ 2011-09-12 17:38 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel, Sam Creasey

Signed-off-by: Sam Creasey <sammy@sammy.net>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
v4: Added this changeset
---
 arch/m68k/sun3/sun3ints.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 20ffee7..1273eb8 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -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;
 }
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-09-13 11:11   ` Finn Thain
  -1 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-09-13 11:11 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel


Hi Geert,

When I was testing your v5 patch series, I had to patch macmace.c to 
resolve some compiler errors --

--- linux-m68k.orig/drivers/net/macmace.c	2011-09-13 18:33:55.000000000 +1000
+++ linux-m68k/drivers/net/macmace.c	2011-09-13 18:34:05.000000000 +1000
@@ -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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-09-13 11:11   ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-09-13 11:11 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel


Hi Geert,

When I was testing your v5 patch series, I had to patch macmace.c to 
resolve some compiler errors --

--- linux-m68k.orig/drivers/net/macmace.c	2011-09-13 18:33:55.000000000 +1000
+++ linux-m68k/drivers/net/macmace.c	2011-09-13 18:34:05.000000000 +1000
@@ -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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-09-13 11:11   ` Finn Thain
  (?)
@ 2011-09-13 11:18   ` Geert Uytterhoeven
  2011-09-13 17:26       ` Finn Thain
  -1 siblings, 1 reply; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-13 11:18 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel

On Tue, Sep 13, 2011 at 13:11, Finn Thain <fthain@telegraphics.com.au> wrote:
> When I was testing your v5 patch series, I had to patch macmace.c to
> resolve some compiler errors --
>
> --- linux-m68k.orig/drivers/net/macmace.c       2011-09-13 18:33:55.000000000 +1000
> +++ linux-m68k/drivers/net/macmace.c    2011-09-13 18:34:05.000000000 +1000
> @@ -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?

Will do. Don't think I ever saw that problem, though.
Did it show up with genirq disabled or enabled?

> (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.

> 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).

Thanks, will do.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-09-13 11:11   ` Finn Thain
  (?)
  (?)
@ 2011-09-13 11:18   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-09-13 11:18 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel

On Tue, Sep 13, 2011 at 13:11, Finn Thain <fthain@telegraphics.com.au> wrote:
> When I was testing your v5 patch series, I had to patch macmace.c to
> resolve some compiler errors --
>
> --- linux-m68k.orig/drivers/net/macmace.c       2011-09-13 18:33:55.000000000 +1000
> +++ linux-m68k/drivers/net/macmace.c    2011-09-13 18:34:05.000000000 +1000
> @@ -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?

Will do. Don't think I ever saw that problem, though.
Did it show up with genirq disabled or enabled?

> (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.

> 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).

Thanks, will do.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-09-13 11:18   ` Geert Uytterhoeven
@ 2011-09-13 17:26       ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-09-13 17:26 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel


On Tue, 13 Sep 2011, Geert Uytterhoeven wrote:

> > --- linux-m68k.orig/drivers/net/macmace.c       2011-09-13 18:33:55.0000000$
> > +++ linux-m68k/drivers/net/macmace.c    2011-09-13 18:34:05.000000000 +1000
> > @@ -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?
> 
> 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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-09-13 17:26       ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-09-13 17:26 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel


On Tue, 13 Sep 2011, Geert Uytterhoeven wrote:

> > --- linux-m68k.orig/drivers/net/macmace.c       2011-09-13 18:33:55.0000000$
> > +++ linux-m68k/drivers/net/macmace.c    2011-09-13 18:34:05.000000000 +1000
> > @@ -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?
> 
> 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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
@ 2011-10-20 12:18   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-20 12:18 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, linux-ide

On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 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,

This went into v3.1-rc6.

>  - [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).

>  - [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.

Any fixes I still have to apply?

> 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-20 12:18   ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-20 12:18 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, linux-ide

On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 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,

This went into v3.1-rc6.

>  - [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).

>  - [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.

Any fixes I still have to apply?

> 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-09-11 11:59 ` Geert Uytterhoeven
                   ` (47 preceding siblings ...)
  (?)
@ 2011-10-20 12:18 ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-20 12:18 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, linux-ide

On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 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,

This went into v3.1-rc6.

>  - [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).

>  - [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.

Any fixes I still have to apply?

> 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-20 12:18   ` Geert Uytterhoeven
@ 2011-10-20 13:40     ` Finn Thain
  -1 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-10-20 13:40 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel, linux-ide

[-- Attachment #1: Type: TEXT/PLAIN, Size: 783 bytes --]


On Thu, 20 Oct 2011, Geert Uytterhoeven wrote:

> > 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

> 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.

Sounds good. The mac_esp fix I sent is already in linux-next.

Finn

> 
> Gr{oetje,eeting}s,
> 
>                         Geert

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-20 13:40     ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-10-20 13:40 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel, linux-ide

[-- Attachment #1: Type: TEXT/PLAIN, Size: 783 bytes --]


On Thu, 20 Oct 2011, Geert Uytterhoeven wrote:

> > 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

> 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.

Sounds good. The mac_esp fix I sent is already in linux-next.

Finn

> 
> Gr{oetje,eeting}s,
> 
>                         Geert

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-20 13:40     ` Finn Thain
@ 2011-10-20 15:02       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-20 15:02 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel, linux-ide

On Thu, Oct 20, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
> On Thu, 20 Oct 2011, Geert Uytterhoeven wrote:
>
>> > 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

OK, I'll add it.

>> 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.
>
> Sounds good. The mac_esp fix 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-20 15:02       ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-20 15:02 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel, linux-ide

On Thu, Oct 20, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
> On Thu, 20 Oct 2011, Geert Uytterhoeven wrote:
>
>> > 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

OK, I'll add it.

>> 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.
>
> Sounds good. The mac_esp fix 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-20 13:40     ` Finn Thain
  (?)
@ 2011-10-20 15:02     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-20 15:02 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel, linux-ide

On Thu, Oct 20, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
> On Thu, 20 Oct 2011, Geert Uytterhoeven wrote:
>
>> > 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

OK, I'll add it.

>> 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.
>
> Sounds good. The mac_esp fix 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-20 15:02       ` Geert Uytterhoeven
@ 2011-10-20 16:03         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-20 16:03 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel

On Thu, Oct 20, 2011 at 17:02, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Oct 20, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
>> Sounds good. The mac_esp fix 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-20 16:03         ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-20 16:03 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, linux-kernel

On Thu, Oct 20, 2011 at 17:02, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Oct 20, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
>> Sounds good. The mac_esp fix 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-20 16:03         ` Geert Uytterhoeven
@ 2011-10-20 23:30           ` Finn Thain
  -1 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-10-20 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 692 bytes --]


On Thu, 20 Oct 2011, Geert Uytterhoeven wrote:

> On Thu, Oct 20, 2011 at 17:02, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Thu, Oct 20, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
> >> Sounds good. The mac_esp fix 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.

> And it should be applied (at least to m68k/master)_before_ the genirq
> conversion, right?

For bisection purposes, yes.

Finn

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-20 23:30           ` Finn Thain
  0 siblings, 0 replies; 99+ messages in thread
From: Finn Thain @ 2011-10-20 23:30 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 692 bytes --]


On Thu, 20 Oct 2011, Geert Uytterhoeven wrote:

> On Thu, Oct 20, 2011 at 17:02, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Thu, Oct 20, 2011 at 15:40, Finn Thain <fthain@telegraphics.com.au> wrote:
> >> Sounds good. The mac_esp fix 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.

> And it should be applied (at least to m68k/master)_before_ the genirq
> conversion, right?

For bisection purposes, yes.

Finn

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-20 12:18   ` Geert Uytterhoeven
@ 2011-10-23  9:49     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-23  9:49 UTC (permalink / raw)
  To: linux-m68k, Greg Ungerer, Thomas Gleixner; +Cc: linux-kernel, netdev

On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> 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,
>
> This went into v3.1-rc6.
>
>>  - [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.

>> 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, 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-23  9:49     ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-23  9:49 UTC (permalink / raw)
  To: linux-m68k, Greg Ungerer, Thomas Gleixner; +Cc: linux-kernel, netdev

On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> 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,
>
> This went into v3.1-rc6.
>
>>  - [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.

>> 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, 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-20 12:18   ` Geert Uytterhoeven
  (?)
  (?)
@ 2011-10-23  9:49   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-23  9:49 UTC (permalink / raw)
  To: linux-m68k, Greg Ungerer, Thomas Gleixner; +Cc: linux-kernel, netdev

On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> 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,
>
> This went into v3.1-rc6.
>
>>  - [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.

>> 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, 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-23  9:49     ` Geert Uytterhoeven
  (?)
@ 2011-10-23 11:29       ` Greg Ungerer
  -1 siblings, 0 replies; 99+ messages in thread
From: Greg Ungerer @ 2011-10-23 11:29 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, Thomas Gleixner, linux-kernel, netdev

Hi Geert,

On 10/23/2011 07:49 PM, Geert Uytterhoeven wrote:
> On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven<geert@linux-m68k.org>  wrote:
>> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven<geert@linux-m68k.org>  wrote:
>>> 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,
>>
>> This went into v3.1-rc6.
>>
>>> á- [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.
>
>>> 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, 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.

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:     gerg@snapgear.com
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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-23 11:29       ` Greg Ungerer
  0 siblings, 0 replies; 99+ messages in thread
From: Greg Ungerer @ 2011-10-23 11:29 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, Thomas Gleixner, linux-kernel, netdev

Hi Geert,

On 10/23/2011 07:49 PM, Geert Uytterhoeven wrote:
> On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven<geert@linux-m68k.org>  wrote:
>> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven<geert@linux-m68k.org>  wrote:
>>> 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,
>>
>> This went into v3.1-rc6.
>>
>>> á- [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.
>
>>> 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, 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.

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:     gerg@snapgear.com
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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-23 11:29       ` Greg Ungerer
  0 siblings, 0 replies; 99+ messages in thread
From: Greg Ungerer @ 2011-10-23 11:29 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, Thomas Gleixner, linux-kernel, netdev

Hi Geert,

On 10/23/2011 07:49 PM, Geert Uytterhoeven wrote:
> On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven<geert@linux-m68k.org>  wrote:
>> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven<geert@linux-m68k.org>  wrote:
>>> 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,
>>
>> This went into v3.1-rc6.
>>
>>> á- [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.
>
>>> 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, 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.

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:     gerg@snapgear.com
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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-23 11:29       ` Greg Ungerer
@ 2011-10-23 12:12         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-23 12:12 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: linux-m68k, Thomas Gleixner, linux-kernel, netdev

On Sun, Oct 23, 2011 at 13:29, Greg Ungerer <gerg@snapgear.com> wrote:
> On 10/23/2011 07:49 PM, Geert Uytterhoeven wrote:
>> On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven<geert@linux-m68k.org>
>>  wrote:
>>> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven<geert@linux-m68k.org>
>>>  wrote:
>>>> 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,
>>>
>>> This went into v3.1-rc6.
>>>
>>>> á- [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.
>>
>>>> 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, 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.
>
> 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
@ 2011-10-23 12:12         ` Geert Uytterhoeven
  0 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-23 12:12 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: linux-m68k, Thomas Gleixner, linux-kernel, netdev

On Sun, Oct 23, 2011 at 13:29, Greg Ungerer <gerg@snapgear.com> wrote:
> On 10/23/2011 07:49 PM, Geert Uytterhoeven wrote:
>> On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven<geert@linux-m68k.org>
>>  wrote:
>>> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven<geert@linux-m68k.org>
>>>  wrote:
>>>> 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,
>>>
>>> This went into v3.1-rc6.
>>>
>>>> á- [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.
>>
>>>> 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, 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.
>
> 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

* Re: [PATCH 00/28 v6] m68k: Convert to genirq
  2011-10-23 11:29       ` Greg Ungerer
  (?)
  (?)
@ 2011-10-23 12:12       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 99+ messages in thread
From: Geert Uytterhoeven @ 2011-10-23 12:12 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: linux-m68k, Thomas Gleixner, linux-kernel, netdev

On Sun, Oct 23, 2011 at 13:29, Greg Ungerer <gerg@snapgear.com> wrote:
> On 10/23/2011 07:49 PM, Geert Uytterhoeven wrote:
>> On Thu, Oct 20, 2011 at 14:18, Geert Uytterhoeven<geert@linux-m68k.org>
>>  wrote:
>>> On Sun, Sep 11, 2011 at 13:59, Geert Uytterhoeven<geert@linux-m68k.org>
>>>  wrote:
>>>> 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,
>>>
>>> This went into v3.1-rc6.
>>>
>>>> á- [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.
>>
>>>> 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, 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.
>
> 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 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 99+ messages in thread

end of thread, other threads:[~2011-10-23 12:12 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-11 11:59 [PATCH 00/28 v6] m68k: Convert to genirq Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 01/28] genirq: Add missing "else" in irq_shutdown() Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-12  7:53   ` Thomas Gleixner
2011-09-12  7:53     ` Thomas Gleixner
2011-09-11 11:59 ` [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.> Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-12  9:59   ` Sergei Shtylyov
2011-09-12  9:59     ` Sergei Shtylyov
2011-09-12  9:59   ` Sergei Shtylyov
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 03/28] keyboard: " Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 04/28] m68k/irq: Rename irq_controller to irq_chip Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 05/28] m68k/irq: Kill irq_node_t typedef, always use struct irq_node Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 06/28] m68k/irq: Rename irq_node to irq_data Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data" Geert Uytterhoeven
2011-09-11 13:40   ` Finn Thain
2011-09-11 13:40     ` Finn Thain
2011-09-11 17:46     ` Geert Uytterhoeven
2011-09-11 17:46     ` Geert Uytterhoeven
2011-09-12  2:48       ` Finn Thain
2011-09-12  2:48         ` Finn Thain
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 08/28] m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 09/28] m68k/irq: Extract irq_set_chip() Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 10/28] m68k/irq: Add m68k_setup_irq_controller() Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 11/28] m68k/irq: Rename {,__}m68k_handle_int() Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 13/28] m68k/irq: Add genirq support Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 14/28] m68k/atari: Convert Atari to genirq Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 15/28] m68k/atari: Remove code and comments about different irq types Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 16/28] m68k/amiga: Refactor amiints.c Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 17/28] m68k/amiga: Convert Amiga to genirq Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 18/28] m68k/amiga: Optimize interrupts using chain handlers Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 19/28] m68k/mac: Convert Mac to genirq Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 20/28] m68k/mac: Optimize interrupts using chain handlers Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 22/28] m68k/vme: Convert VME " Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 23/28] m68k/apollo: Convert Apollo " Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 24/28] m68k/sun3: Use the kstat_irqs_cpu() wrapper Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-12 17:38   ` Sam Creasey
2011-09-12 17:38     ` Sam Creasey
2011-09-11 11:59 ` [PATCH 25/28] m68k/sun3: Convert Sun3/3x to genirq Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 26/28] m68k/q40: Convert Q40/Q60 " Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 27/28] m68k/irq: Remove obsolete m68k irq framework Geert Uytterhoeven
2011-09-11 11:59   ` Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 28/28] m68k/irq: Remove obsolete support for user vector interrupt fixups Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven
2011-09-13 11:11 ` [PATCH 00/28 v6] m68k: Convert to genirq Finn Thain
2011-09-13 11:11   ` Finn Thain
2011-09-13 11:18   ` Geert Uytterhoeven
2011-09-13 17:26     ` Finn Thain
2011-09-13 17:26       ` Finn Thain
2011-09-13 11:18   ` Geert Uytterhoeven
2011-10-20 12:18 ` Geert Uytterhoeven
2011-10-20 12:18   ` Geert Uytterhoeven
2011-10-20 13:40   ` Finn Thain
2011-10-20 13:40     ` Finn Thain
2011-10-20 15:02     ` Geert Uytterhoeven
2011-10-20 15:02     ` Geert Uytterhoeven
2011-10-20 15:02       ` Geert Uytterhoeven
2011-10-20 16:03       ` Geert Uytterhoeven
2011-10-20 16:03         ` Geert Uytterhoeven
2011-10-20 23:30         ` Finn Thain
2011-10-20 23:30           ` Finn Thain
2011-10-23  9:49   ` Geert Uytterhoeven
2011-10-23  9:49   ` Geert Uytterhoeven
2011-10-23  9:49     ` Geert Uytterhoeven
2011-10-23 11:29     ` Greg Ungerer
2011-10-23 11:29       ` Greg Ungerer
2011-10-23 11:29       ` Greg Ungerer
2011-10-23 12:12       ` Geert Uytterhoeven
2011-10-23 12:12       ` Geert Uytterhoeven
2011-10-23 12:12         ` Geert Uytterhoeven
2011-10-20 12:18 ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.