aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-12-04 11:01:03 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-14 14:21:40 -0500
commit384895330e0f3954d9478fd0853145f9c169df12 (patch)
treec90f70f4e070b640a1f1f2a76cf4acf864354093
parentb580b899dd05a007ad232ee49a07b32d91876462 (diff)
ARM: GIC: Remove MMIO address from gic_cpu_init, rename to gic_secondary_init
We don't need to re-pass the base address for the CPU interfaces to the GIC for secondary CPUs, as it will never be different from the boot CPU - and even if it was, we'd overwrite the boot CPU's base address. Get rid of this argument, and rename to gic_secondary_init(). Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/common/gic.c7
-rw-r--r--arch/arm/include/asm/hardware/gic.h2
-rw-r--r--arch/arm/mach-omap2/omap-smp.c2
-rw-r--r--arch/arm/mach-realview/platsmp.c2
-rw-r--r--arch/arm/mach-s5pv310/platsmp.c2
-rw-r--r--arch/arm/mach-tegra/platsmp.c2
-rw-r--r--arch/arm/mach-ux500/platsmp.c2
-rw-r--r--arch/arm/mach-vexpress/platsmp.c2
8 files changed, 13 insertions, 8 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index 8eab2f34a7f..dd0d18d560a 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -284,7 +284,7 @@ static void __init gic_dist_init(unsigned int gic_nr, void __iomem *base,
284 writel(1, base + GIC_DIST_CTRL); 284 writel(1, base + GIC_DIST_CTRL);
285} 285}
286 286
287void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base) 287static void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base)
288{ 288{
289 void __iomem *dist_base; 289 void __iomem *dist_base;
290 int i; 290 int i;
@@ -321,6 +321,11 @@ void __init gic_init(unsigned int gic_nr, unsigned int irq_start,
321 gic_cpu_init(gic_nr, cpu_base); 321 gic_cpu_init(gic_nr, cpu_base);
322} 322}
323 323
324void __cpuinit gic_secondary_init(unsigned int gic_nr)
325{
326 gic_cpu_init(gic_nr, gic_data[gic_nr].cpu_base);
327}
328
324#ifdef CONFIG_SMP 329#ifdef CONFIG_SMP
325void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) 330void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
326{ 331{
diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h
index 387c6ae5567..48876a3fbda 100644
--- a/arch/arm/include/asm/hardware/gic.h
+++ b/arch/arm/include/asm/hardware/gic.h
@@ -33,8 +33,8 @@
33#define GIC_DIST_SOFTINT 0xf00 33#define GIC_DIST_SOFTINT 0xf00
34 34
35#ifndef __ASSEMBLY__ 35#ifndef __ASSEMBLY__
36void gic_cpu_init(unsigned int gic_nr, void __iomem *base);
37void gic_init(unsigned int, unsigned int, void __iomem *, void __iomem *); 36void gic_init(unsigned int, unsigned int, void __iomem *, void __iomem *);
37void gic_secondary_init(unsigned int);
38void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); 38void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
39void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); 39void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
40#endif 40#endif
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 9e9f70e18e3..9fbac2c3910 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -50,7 +50,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
50 * core (e.g. timer irq), then they will not have been enabled 50 * core (e.g. timer irq), then they will not have been enabled
51 * for us: do so 51 * for us: do so
52 */ 52 */
53 gic_cpu_init(0, gic_cpu_base_addr); 53 gic_secondary_init(0);
54 54
55 /* 55 /*
56 * Synchronise with the boot thread. 56 * Synchronise with the boot thread.
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index 009265818d5..6da8a2e53c4 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -69,7 +69,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
69 * core (e.g. timer irq), then they will not have been enabled 69 * core (e.g. timer irq), then they will not have been enabled
70 * for us: do so 70 * for us: do so
71 */ 71 */
72 gic_cpu_init(0, gic_cpu_base_addr); 72 gic_secondary_init(0);
73 73
74 /* 74 /*
75 * let the primary processor know we're out of the 75 * let the primary processor know we're out of the
diff --git a/arch/arm/mach-s5pv310/platsmp.c b/arch/arm/mach-s5pv310/platsmp.c
index d357c198ede..15929c169f8 100644
--- a/arch/arm/mach-s5pv310/platsmp.c
+++ b/arch/arm/mach-s5pv310/platsmp.c
@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
54 * core (e.g. timer irq), then they will not have been enabled 54 * core (e.g. timer irq), then they will not have been enabled
55 * for us: do so 55 * for us: do so
56 */ 56 */
57 gic_cpu_init(0, gic_cpu_base_addr); 57 gic_secondary_init(0);
58 58
59 /* 59 /*
60 * let the primary processor know we're out of the 60 * let the primary processor know we're out of the
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 1c0fd92cab3..3b7376c4f35 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -48,7 +48,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
48 * core (e.g. timer irq), then they will not have been enabled 48 * core (e.g. timer irq), then they will not have been enabled
49 * for us: do so 49 * for us: do so
50 */ 50 */
51 gic_cpu_init(0, IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x100); 51 gic_secondary_init(0);
52 52
53 /* 53 /*
54 * Synchronise with the boot thread. 54 * Synchronise with the boot thread.
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 9e4c678de78..b5077b4c419 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -44,7 +44,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
44 * core (e.g. timer irq), then they will not have been enabled 44 * core (e.g. timer irq), then they will not have been enabled
45 * for us: do so 45 * for us: do so
46 */ 46 */
47 gic_cpu_init(0, __io_address(UX500_GIC_CPU_BASE)); 47 gic_secondary_init(0);
48 48
49 /* 49 /*
50 * let the primary processor know we're out of the 50 * let the primary processor know we're out of the
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index 670970699ba..dfb591031d1 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -51,7 +51,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
51 * core (e.g. timer irq), then they will not have been enabled 51 * core (e.g. timer irq), then they will not have been enabled
52 * for us: do so 52 * for us: do so
53 */ 53 */
54 gic_cpu_init(0, gic_cpu_base_addr); 54 gic_secondary_init(0);
55 55
56 /* 56 /*
57 * let the primary processor know we're out of the 57 * let the primary processor know we're out of the