提交 38489533 编写于 作者: R Russell King

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: NCatalin Marinas <catalin.marinas@arm.com>
Tested-by: NAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 b580b899
...@@ -284,7 +284,7 @@ static void __init gic_dist_init(unsigned int gic_nr, void __iomem *base, ...@@ -284,7 +284,7 @@ static void __init gic_dist_init(unsigned int gic_nr, void __iomem *base,
writel(1, base + GIC_DIST_CTRL); 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; void __iomem *dist_base;
int i; int i;
...@@ -321,6 +321,11 @@ void __init gic_init(unsigned int gic_nr, unsigned int irq_start, ...@@ -321,6 +321,11 @@ void __init gic_init(unsigned int gic_nr, unsigned int irq_start,
gic_cpu_init(gic_nr, cpu_base); 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 #ifdef CONFIG_SMP
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
{ {
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#define GIC_DIST_SOFTINT 0xf00 #define GIC_DIST_SOFTINT 0xf00
#ifndef __ASSEMBLY__ #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_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_cascade_irq(unsigned int gic_nr, unsigned int irq);
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
#endif #endif
......
...@@ -50,7 +50,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) ...@@ -50,7 +50,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
* core (e.g. timer irq), then they will not have been enabled * core (e.g. timer irq), then they will not have been enabled
* for us: do so * for us: do so
*/ */
gic_cpu_init(0, gic_cpu_base_addr); gic_secondary_init(0);
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
......
...@@ -69,7 +69,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) ...@@ -69,7 +69,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
* core (e.g. timer irq), then they will not have been enabled * core (e.g. timer irq), then they will not have been enabled
* for us: do so * 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 * let the primary processor know we're out of the
......
...@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) ...@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
* core (e.g. timer irq), then they will not have been enabled * core (e.g. timer irq), then they will not have been enabled
* for us: do so * 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 * let the primary processor know we're out of the
......
...@@ -48,7 +48,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) ...@@ -48,7 +48,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
* core (e.g. timer irq), then they will not have been enabled * core (e.g. timer irq), then they will not have been enabled
* for us: do so * for us: do so
*/ */
gic_cpu_init(0, IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x100); gic_secondary_init(0);
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
......
...@@ -44,7 +44,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) ...@@ -44,7 +44,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
* core (e.g. timer irq), then they will not have been enabled * core (e.g. timer irq), then they will not have been enabled
* for us: do so * 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 * let the primary processor know we're out of the
......
...@@ -51,7 +51,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) ...@@ -51,7 +51,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
* core (e.g. timer irq), then they will not have been enabled * core (e.g. timer irq), then they will not have been enabled
* for us: do so * 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 * let the primary processor know we're out of the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册