genirq: ARM: core: switch irq handling to the generic implementation
PATCH 26/50 genirq: ARM: core: switch irq handling to the generic implementation
From: Thomas Gleixner <[email protected]>
Switch the ARM irq core handling to the generic implementation. The ARM specific header files now contain mostly migration stubs and helper macros. Note that each machine type must be converted after this step seperately. This was seperated out from the patch for easier review.
The main changes for the machine type code is the conversion of the type handlers to a 'type flow' and 'chip' model. This affects only the multiplex interrupt handlers. A conversion macro needs to be added to those implementations, which defines the data structure which is registered by the set_irq_chained_handler() macro.
Some minor fixups of include files and the conversion of data structure access is necessary all over the place.
The mostly macro based conversion was provided to allow an easy migration of the existing implementations.
The code compiles on all defconfigs available in arch/arm/configs except those which were broken also before applying the conversion patches.
The code has been boot and runtime tested on following platforms:
PXA, EP93XX, IPX2000, IPX400, IMX, CLPS711X, H720X, S3C2410, OMAP.
--- arch/arm/Kconfig | 12 arch/arm/kernel/fiq.c | 1 arch/arm/kernel/irq.c | 959 ++------------------------------------------- include/asm-arm/dyntick.h | 6 include/asm-arm/hw_irq.h | 9 include/asm-arm/irq.h | 26 - include/asm-arm/mach/irq.h | 143 +----- 7 files changed, 128 insertions(+), 1028 deletions(-)
arch/arm/Kconfig +12 -0
@@ -47,6 +47,18 @@ config MCA <file:Documentation/mca.txt> (and especially the web page given there) before attempting to build an MCA bus kernel. +config GENERIC_HARDIRQS + bool + default y + +config HARDIRQS_SW_RESEND + bool + default y + +config GENERIC_IRQ_PROBE + bool + default y + config RWSEM_GENERIC_SPINLOCK bool default y
arch/arm/kernel/fiq.c +1 -0
@@ -38,6 +38,7 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/interrupt.h> #include <linux/seq_file.h> #include <asm/cacheflush.h>
arch/arm/kernel/irq.c +53 -906
1,052 lines not on this page · raw message
include/asm-arm/dyntick.h new file +6 -0
@@ -0,0 +1,6 @@ +#ifndef _ASMARM_DYNTICK_H +#define _ASMARM_DYNTICK_H + +#include <asm/mach/time.h> + +#endif /* _ASMARM_DYNTICK_H */
include/asm-arm/hw_irq.h new file +9 -0
@@ -0,0 +1,9 @@ +/* +* Nothing to see here yet +*/ +#ifndef _ARCH_ARM_HW_IRQ_H +#define _ARCH_ARM_HW_IRQ_H + +#include <asm/mach/irq.h> + +#endif
include/asm-arm/irq.h +6 -20
@@ -21,18 +21,13 @@struct irqaction ; -extern void disable_irq_nosync (unsigned int ); -extern void disable_irq (unsigned int ); -extern void enable_irq (unsigned int ); -/* -* These correspond with the SA_TRIGGER_* defines, and therefore the -* IORESOURCE_IRQ_* defines. +* Migration helpers */ -#define __IRQT_RISEDGE (1 << 0) -#define __IRQT_FALEDGE (1 << 1) -#define __IRQT_HIGHLVL (1 << 2) -#define __IRQT_LOWLVL (1 << 3) +#define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING +#define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING +#define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW +#define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH#define IRQT_NOEDGE (0)#define IRQT_RISING (__IRQT_RISEDGE)
@@ -40,16 +35,7 @@ extern void enable_irq(unsigned int);#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)#define IRQT_LOW (__IRQT_LOWLVL)#define IRQT_HIGH (__IRQT_HIGHLVL) -#define IRQT_PROBE (1 << 4) - -int set_irq_type (unsigned int irq,unsigned int type); -void disable_irq_wake (unsigned int irq); -void enable_irq_wake (unsigned int irq); -int setup_irq (unsigned int ,struct irqaction *); - -struct irqaction ; -struct pt_regs ; -int handle_IRQ_event (unsigned int ,struct pt_regs *,struct irqaction *); +#define IRQT_PROBE IRQ_TYPE_PROBEextern void migrate_irqs (void );#endif
include/asm-arm/mach/irq.h +41 -102
166 lines not on this page · raw message