diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-15 00:13:52 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-15 00:13:52 -0400 |
commit | dc825b17904a06bbd2f79d720b23156e4c01a22f (patch) | |
tree | 8f1e13b850a06264530f1f1bb680a541e73cef34 /arch/sh/include/asm/irq.h | |
parent | fecf066c2d2fbc7e6a7e7e3a5af772a165bdd7b0 (diff) |
sh: intc: IRQ auto-distribution support.
This implements support for hardware-managed IRQ balancing as implemented
by SH-X3 cores (presently only hooked up for SH7786, but can probably be
carried over to other SH-X3 cores, too).
CPUs need to specify their distribution register along with the mask
definitions, as these follow the same format. Peripheral IRQs that don't
opt out of balancing will be automatically distributed at the whim of the
hardware block, while each CPU needs to verify whether it is handling the
IRQ or not, especially before clearing the mask.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/irq.h')
-rw-r--r-- | arch/sh/include/asm/irq.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h index df8e1500527c..99c593b3a827 100644 --- a/arch/sh/include/asm/irq.h +++ b/arch/sh/include/asm/irq.h | |||
@@ -12,6 +12,14 @@ | |||
12 | #define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */ | 12 | #define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */ |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * This is a special IRQ number for indicating that no IRQ has been | ||
16 | * triggered and to simply ignore the IRQ dispatch. This is a special | ||
17 | * case that can happen with IRQ auto-distribution when multiple CPUs | ||
18 | * are woken up and signalled in parallel. | ||
19 | */ | ||
20 | #define NO_IRQ_IGNORE ((unsigned int)-1) | ||
21 | |||
22 | /* | ||
15 | * Convert back and forth between INTEVT and IRQ values. | 23 | * Convert back and forth between INTEVT and IRQ values. |
16 | */ | 24 | */ |
17 | #ifdef CONFIG_CPU_HAS_INTEVT | 25 | #ifdef CONFIG_CPU_HAS_INTEVT |
@@ -53,6 +61,14 @@ extern void irq_ctx_exit(int cpu); | |||
53 | # define irq_ctx_exit(cpu) do { } while (0) | 61 | # define irq_ctx_exit(cpu) do { } while (0) |
54 | #endif | 62 | #endif |
55 | 63 | ||
64 | #ifdef CONFIG_INTC_BALANCING | ||
65 | extern unsigned int irq_lookup(unsigned int irq); | ||
66 | extern void irq_finish(unsigned int irq); | ||
67 | #else | ||
68 | #define irq_lookup(irq) (irq) | ||
69 | #define irq_finish(irq) do { } while (0) | ||
70 | #endif | ||
71 | |||
56 | #include <asm-generic/irq.h> | 72 | #include <asm-generic/irq.h> |
57 | #ifdef CONFIG_CPU_SH5 | 73 | #ifdef CONFIG_CPU_SH5 |
58 | #include <cpu/irq.h> | 74 | #include <cpu/irq.h> |