diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2011-09-06 05:23:45 -0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2011-11-15 13:13:59 -0500 |
commit | fea9fe8329c74159fb2030f1aacf29fdab9fc6d6 (patch) | |
tree | 658f1ebb663ca822f4be0e7d03ef56935270a178 /arch | |
parent | 562e0027d21bf64838178e2f5157df3d5833972e (diff) |
ARM: imx: convert smp platforms to global gic_handle_irq()
Convert the SMP imx platforms to use the global gic_handle_irq()
function instead a private function.
Cc: Sascha Hauer <kernel@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-mxc/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/gic.c | 41 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/common.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/entry-macro.S | 11 |
4 files changed, 1 insertions, 55 deletions
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index b9f0f5f499a4..076db84f3e31 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -5,7 +5,6 @@ | |||
5 | # Common support | 5 | # Common support |
6 | obj-y := clock.o time.o devices.o cpu.o system.o irq-common.o | 6 | obj-y := clock.o time.o devices.o cpu.o system.o irq-common.o |
7 | 7 | ||
8 | obj-$(CONFIG_ARM_GIC) += gic.o | ||
9 | obj-$(CONFIG_MXC_TZIC) += tzic.o | 8 | obj-$(CONFIG_MXC_TZIC) += tzic.o |
10 | obj-$(CONFIG_MXC_AVIC) += avic.o | 9 | obj-$(CONFIG_MXC_AVIC) += avic.o |
11 | 10 | ||
diff --git a/arch/arm/plat-mxc/gic.c b/arch/arm/plat-mxc/gic.c deleted file mode 100644 index ea51ea4aba67..000000000000 --- a/arch/arm/plat-mxc/gic.c +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | #include <asm/exception.h> | ||
15 | #include <asm/localtimer.h> | ||
16 | #include <asm/hardware/gic.h> | ||
17 | #ifdef CONFIG_SMP | ||
18 | #include <asm/smp.h> | ||
19 | #endif | ||
20 | |||
21 | asmlinkage void __exception_irq_entry mxc_gic_handle_irq(struct pt_regs *regs) | ||
22 | { | ||
23 | u32 irqstat, irqnr; | ||
24 | |||
25 | do { | ||
26 | irqstat = readl_relaxed(gic_cpu_base_addr + GIC_CPU_INTACK); | ||
27 | irqnr = irqstat & 0x3ff; | ||
28 | if (irqnr == 1023) | ||
29 | break; | ||
30 | |||
31 | if (irqnr > 15 && irqnr < 1021) | ||
32 | handle_IRQ(irqnr, regs); | ||
33 | #ifdef CONFIG_SMP | ||
34 | else { | ||
35 | writel_relaxed(irqstat, gic_cpu_base_addr + | ||
36 | GIC_CPU_EOI); | ||
37 | handle_IPI(irqnr, regs); | ||
38 | } | ||
39 | #endif | ||
40 | } while (1); | ||
41 | } | ||
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index d7c290d32e3e..14b4703e6e46 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h | |||
@@ -90,7 +90,6 @@ extern void imx_print_silicon_rev(const char *cpu, int srev); | |||
90 | 90 | ||
91 | void avic_handle_irq(struct pt_regs *); | 91 | void avic_handle_irq(struct pt_regs *); |
92 | void tzic_handle_irq(struct pt_regs *); | 92 | void tzic_handle_irq(struct pt_regs *); |
93 | void mxc_gic_handle_irq(struct pt_regs *); | ||
94 | 93 | ||
95 | #define imx1_handle_irq avic_handle_irq | 94 | #define imx1_handle_irq avic_handle_irq |
96 | #define imx21_handle_irq avic_handle_irq | 95 | #define imx21_handle_irq avic_handle_irq |
@@ -101,7 +100,7 @@ void mxc_gic_handle_irq(struct pt_regs *); | |||
101 | #define imx50_handle_irq tzic_handle_irq | 100 | #define imx50_handle_irq tzic_handle_irq |
102 | #define imx51_handle_irq tzic_handle_irq | 101 | #define imx51_handle_irq tzic_handle_irq |
103 | #define imx53_handle_irq tzic_handle_irq | 102 | #define imx53_handle_irq tzic_handle_irq |
104 | #define imx6q_handle_irq mxc_gic_handle_irq | 103 | #define imx6q_handle_irq gic_handle_irq |
105 | 104 | ||
106 | extern void imx_enable_cpu(int cpu, bool enable); | 105 | extern void imx_enable_cpu(int cpu, bool enable); |
107 | extern void imx_set_cpu_jump(int cpu, void *jump_addr); | 106 | extern void imx_set_cpu_jump(int cpu, void *jump_addr); |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index ca5cf26a04b1..def5d30cb67e 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -9,19 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /* Unused, we use CONFIG_MULTI_IRQ_HANDLER */ | ||
13 | |||
14 | .macro disable_fiq | 12 | .macro disable_fiq |
15 | .endm | 13 | .endm |
16 | 14 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | 15 | .macro arch_ret_to_user, tmp1, tmp2 |
21 | .endm | 16 | .endm |
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | .endm | ||
25 | |||
26 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
27 | .endm | ||