ARM: GIC: Remove MMIO address from gic_cpu_init, rename to gic_secondary_init
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 4 Dec 2010 16:01:03 +0000 (16:01 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 14 Dec 2010 19:21:40 +0000 (19:21 +0000)
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>
arch/arm/common/gic.c
arch/arm/include/asm/hardware/gic.h
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-realview/platsmp.c
arch/arm/mach-s5pv310/platsmp.c
arch/arm/mach-tegra/platsmp.c
arch/arm/mach-ux500/platsmp.c
arch/arm/mach-vexpress/platsmp.c

index 8eab2f34a7fa47999b956e478e7286ff6475013a..dd0d18d560ac8680f5db34f8e7385b8652ba5792 100644 (file)
@@ -284,7 +284,7 @@ static void __init gic_dist_init(unsigned int gic_nr, void __iomem *base,
        writel(1, base + GIC_DIST_CTRL);
 }
 
-void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base)
+static void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base)
 {
        void __iomem *dist_base;
        int i;
@@ -321,6 +321,11 @@ void __init gic_init(unsigned int gic_nr, unsigned int irq_start,
        gic_cpu_init(gic_nr, cpu_base);
 }
 
+void __cpuinit gic_secondary_init(unsigned int gic_nr)
+{
+       gic_cpu_init(gic_nr, gic_data[gic_nr].cpu_base);
+}
+
 #ifdef CONFIG_SMP
 void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
 {
index 387c6ae5567370a81121c75bbcaa96da611b0cac..48876a3fbda88c826b4ab841365b53f6da2fc319 100644 (file)
@@ -33,8 +33,8 @@
 #define GIC_DIST_SOFTINT               0xf00
 
 #ifndef __ASSEMBLY__
-void gic_cpu_init(unsigned int gic_nr, void __iomem *base);
 void gic_init(unsigned int, unsigned int, void __iomem *, void __iomem *);
+void gic_secondary_init(unsigned int);
 void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
 void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
 #endif
index 9e9f70e18e3c95436cf6b957e2791175a3cdc90a..9fbac2c39104a7968eb362935ad33b7831911e64 100644 (file)
@@ -50,7 +50,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
         * core (e.g. timer irq), then they will not have been enabled
         * for us: do so
         */
-       gic_cpu_init(0, gic_cpu_base_addr);
+       gic_secondary_init(0);
 
        /*
         * Synchronise with the boot thread.
index 009265818d55752aa401ad8bde837d59a6b89ea5..6da8a2e53c44b2bb911a9a4396947f4b42d5b093 100644 (file)
@@ -69,7 +69,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
         * core (e.g. timer irq), then they will not have been enabled
         * for us: do so
         */
-       gic_cpu_init(0, gic_cpu_base_addr);
+       gic_secondary_init(0);
 
        /*
         * let the primary processor know we're out of the
index d357c198edee308112bc3633256376ca69720abb..15929c169f81c74524555aa246eed84e84cfafec 100644 (file)
@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
         * core (e.g. timer irq), then they will not have been enabled
         * for us: do so
         */
-       gic_cpu_init(0, gic_cpu_base_addr);
+       gic_secondary_init(0);
 
        /*
         * let the primary processor know we're out of the
index 1c0fd92cab39e44779a3823e89d5248997163a72..3b7376c4f356cc89d2c8eb4c4c2ec1bf4fc47c62 100644 (file)
@@ -48,7 +48,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
         * core (e.g. timer irq), then they will not have been enabled
         * for us: do so
         */
-       gic_cpu_init(0, IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x100);
+       gic_secondary_init(0);
 
        /*
         * Synchronise with the boot thread.
index 9e4c678de78593a248c9010a4eb8e0edcb4cb4dc..b5077b4c419fab54f0907f9aa347b5aacf33a810 100644 (file)
@@ -44,7 +44,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
         * core (e.g. timer irq), then they will not have been enabled
         * for us: do so
         */
-       gic_cpu_init(0, __io_address(UX500_GIC_CPU_BASE));
+       gic_secondary_init(0);
 
        /*
         * let the primary processor know we're out of the
index 670970699ba93e09d2b270cdc0a061b17b64177b..dfb591031d17c6b3d724b1ef02d27059acd184b9 100644 (file)
@@ -51,7 +51,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
         * core (e.g. timer irq), then they will not have been enabled
         * for us: do so
         */
-       gic_cpu_init(0, gic_cpu_base_addr);
+       gic_secondary_init(0);
 
        /*
         * let the primary processor know we're out of the
This page took 0.030028 seconds and 5 git commands to generate.