aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authoreric miao <eric.y.miao@gmail.com>2010-12-13 03:42:34 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-24 04:47:34 -0500
commit521086412ee423fbdfc7da81f257239c43f707b4 (patch)
tree88423e6db9544002ebec1494b82a3d91bfb57363 /arch/arm/include/asm
parent4a50bfe365a977f634311504484342fbfffe855c (diff)
ARM: 6532/1: Allow machine to specify it's own IRQ handlers at run-time
Normally different ARM platform has different way to decode the IRQ hardware status and demultiplex to the corresponding IRQ handler. This is highly optimized by macro irq_handler in entry-armv.S, and each machine defines their own macro to decode the IRQ number. However, this prevents multiple machine classes to be built into a single kernel. By allowing each machine to specify thier own handler, and making function pointer 'handle_arch_irq' to point to it at run time, this can be solved. And introduce CONFIG_MULTI_IRQ_HANDLER to allow both solutions to work. Comparing with the highly optimized macro of irq_handler, the new function must be written with care not to lose too much performance. And the IPI stuff on SMP is expected to move to the provided arch IRQ handler as well. The assembly code to invoke handle_arch_irq is optimized by Russell King. Signed-off-by: Eric Miao <eric.miao@canonical.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/mach/arch.h3
-rw-r--r--arch/arm/include/asm/mach/irq.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index d97a964207fa..7d55356110d4 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -40,6 +40,9 @@ struct machine_desc {
40 void (*init_irq)(void); 40 void (*init_irq)(void);
41 struct sys_timer *timer; /* system tick timer */ 41 struct sys_timer *timer; /* system tick timer */
42 void (*init_machine)(void); 42 void (*init_machine)(void);
43#ifdef CONFIG_MULTI_IRQ_HANDLER
44 void (*handle_irq)(struct pt_regs *);
45#endif
43}; 46};
44 47
45/* 48/*
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index ce3eee9fe26c..6ecdad9a5c42 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -22,6 +22,10 @@ extern void (*init_arch_irq)(void);
22extern void init_FIQ(void); 22extern void init_FIQ(void);
23extern int show_fiq_list(struct seq_file *, void *); 23extern int show_fiq_list(struct seq_file *, void *);
24 24
25#ifdef CONFIG_MULTI_IRQ_HANDLER
26extern void (*handle_arch_irq)(struct pt_regs *);
27#endif
28
25/* 29/*
26 * This is for easy migration, but should be changed in the source 30 * This is for easy migration, but should be changed in the source
27 */ 31 */