aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-12-04 11:13:29 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-14 14:21:42 -0500
commitff2e27ae0b17f53a6a289c87d325f706598f3788 (patch)
tree1288f491bce11b3d8a6d48604fd00d68bea6eb98 /arch/arm/common
parent384895330e0f3954d9478fd0853145f9c169df12 (diff)
ARM: GIC: consolidate gic_cpu_base_addr to common GIC code
Every architecture using the GIC has a gic_cpu_base_addr pointer for GIC 0 for their entry assembly code to use to decode the cause of the current interrupt. Move this into the common GIC code. 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>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/gic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index dd0d18d560ac..9105d48c02de 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -35,6 +35,9 @@
35 35
36static DEFINE_SPINLOCK(irq_controller_lock); 36static DEFINE_SPINLOCK(irq_controller_lock);
37 37
38/* Address of GIC 0 CPU interface */
39void __iomem *gic_cpu_base_addr;
40
38struct gic_chip_data { 41struct gic_chip_data {
39 unsigned int irq_offset; 42 unsigned int irq_offset;
40 void __iomem *dist_base; 43 void __iomem *dist_base;
@@ -317,6 +320,8 @@ static void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base)
317void __init gic_init(unsigned int gic_nr, unsigned int irq_start, 320void __init gic_init(unsigned int gic_nr, unsigned int irq_start,
318 void __iomem *dist_base, void __iomem *cpu_base) 321 void __iomem *dist_base, void __iomem *cpu_base)
319{ 322{
323 if (gic_nr == 0)
324 gic_cpu_base_addr = cpu_base;
320 gic_dist_init(gic_nr, dist_base, irq_start); 325 gic_dist_init(gic_nr, dist_base, irq_start);
321 gic_cpu_init(gic_nr, cpu_base); 326 gic_cpu_init(gic_nr, cpu_base);
322} 327}