diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2013-01-14 07:39:31 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-03-26 12:02:23 -0400 |
commit | e851b58cb77b47a5c14267723bd6b76655d21840 (patch) | |
tree | 19fbccd2ee863b6739947fa748e623afebf386c1 | |
parent | a9a193ffe51d036a7c2d30d7fbdb66498c688237 (diff) |
arm64: Use irqchip_init() for interrupt controller initialisation
This patch uses the generic irqchip_init() function for initialising the
interrupt controller on arm64. It also adds several definitions required
by the ARM GIC irqchip driver but does not enable ARM_GIC yet.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm64/include/asm/exception.h | 1 | ||||
-rw-r--r-- | arch/arm64/include/asm/hardirq.h | 5 | ||||
-rw-r--r-- | arch/arm64/include/asm/irq.h | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/irq.c | 19 |
4 files changed, 16 insertions, 10 deletions
diff --git a/arch/arm64/include/asm/exception.h b/arch/arm64/include/asm/exception.h index ac63519b7b90..0303705fcad6 100644 --- a/arch/arm64/include/asm/exception.h +++ b/arch/arm64/include/asm/exception.h | |||
@@ -19,5 +19,6 @@ | |||
19 | #define __ASM_EXCEPTION_H | 19 | #define __ASM_EXCEPTION_H |
20 | 20 | ||
21 | #define __exception __attribute__((section(".exception.text"))) | 21 | #define __exception __attribute__((section(".exception.text"))) |
22 | #define __exception_irq_entry __exception | ||
22 | 23 | ||
23 | #endif /* __ASM_EXCEPTION_H */ | 24 | #endif /* __ASM_EXCEPTION_H */ |
diff --git a/arch/arm64/include/asm/hardirq.h b/arch/arm64/include/asm/hardirq.h index 507546353d62..990c051e7829 100644 --- a/arch/arm64/include/asm/hardirq.h +++ b/arch/arm64/include/asm/hardirq.h | |||
@@ -49,4 +49,9 @@ static inline void ack_bad_irq(unsigned int irq) | |||
49 | 49 | ||
50 | extern void handle_IRQ(unsigned int, struct pt_regs *); | 50 | extern void handle_IRQ(unsigned int, struct pt_regs *); |
51 | 51 | ||
52 | /* | ||
53 | * No arch-specific IRQ flags. | ||
54 | */ | ||
55 | #define set_irq_flags(irq, flags) | ||
56 | |||
52 | #endif /* __ASM_HARDIRQ_H */ | 57 | #endif /* __ASM_HARDIRQ_H */ |
diff --git a/arch/arm64/include/asm/irq.h b/arch/arm64/include/asm/irq.h index a4e1cad3202a..0332fc077f6e 100644 --- a/arch/arm64/include/asm/irq.h +++ b/arch/arm64/include/asm/irq.h | |||
@@ -4,5 +4,6 @@ | |||
4 | #include <asm-generic/irq.h> | 4 | #include <asm-generic/irq.h> |
5 | 5 | ||
6 | extern void (*handle_arch_irq)(struct pt_regs *); | 6 | extern void (*handle_arch_irq)(struct pt_regs *); |
7 | extern void set_handle_irq(void (*handle_irq)(struct pt_regs *)); | ||
7 | 8 | ||
8 | #endif | 9 | #endif |
diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c index 0373c6609eaf..ecb3354292ed 100644 --- a/arch/arm64/kernel/irq.c +++ b/arch/arm64/kernel/irq.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/of_irq.h> | 28 | #include <linux/irqchip.h> |
29 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
30 | #include <linux/ratelimit.h> | 30 | #include <linux/ratelimit.h> |
31 | 31 | ||
@@ -67,18 +67,17 @@ void handle_IRQ(unsigned int irq, struct pt_regs *regs) | |||
67 | set_irq_regs(old_regs); | 67 | set_irq_regs(old_regs); |
68 | } | 68 | } |
69 | 69 | ||
70 | /* | 70 | void __init set_handle_irq(void (*handle_irq)(struct pt_regs *)) |
71 | * Interrupt controllers supported by the kernel. | 71 | { |
72 | */ | 72 | if (handle_arch_irq) |
73 | static const struct of_device_id intctrl_of_match[] __initconst = { | 73 | return; |
74 | /* IRQ controllers { .compatible, .data } info to go here */ | 74 | |
75 | {} | 75 | handle_arch_irq = handle_irq; |
76 | }; | 76 | } |
77 | 77 | ||
78 | void __init init_IRQ(void) | 78 | void __init init_IRQ(void) |
79 | { | 79 | { |
80 | of_irq_init(intctrl_of_match); | 80 | irqchip_init(); |
81 | |||
82 | if (!handle_arch_irq) | 81 | if (!handle_arch_irq) |
83 | panic("No interrupt controller found."); | 82 | panic("No interrupt controller found."); |
84 | } | 83 | } |