[ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms

This patch modifies the get_irqnr_preamble macro to work with multiple
platforms at run-time by reading the address of the GIC controller from
the gic_cpu_base_addr variable. This variable is defined in core.c and
intialised in realview_eb.c (gic_init_irq).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index e42ac56e..f36af13 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -256,8 +256,9 @@
 		writel(0x00000000, __io_address(REALVIEW_SYS_LOCK));
 
 		/* core tile GIC, primary */
+		gic_cpu_base_addr = __io_address(REALVIEW_EB11MP_GIC_CPU_BASE);
 		gic_dist_init(0, __io_address(REALVIEW_EB11MP_GIC_DIST_BASE), 29);
-		gic_cpu_init(0, __io_address(REALVIEW_EB11MP_GIC_CPU_BASE));
+		gic_cpu_init(0, gic_cpu_base_addr);
 
 #ifndef CONFIG_REALVIEW_MPCORE_REVB
 		/* board GIC, secondary */
@@ -267,8 +268,9 @@
 #endif
 	} else {
 		/* board GIC, primary */
+		gic_cpu_base_addr = __io_address(REALVIEW_GIC_CPU_BASE);
 		gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29);
-		gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE));
+		gic_cpu_init(0, gic_cpu_base_addr);
 	}
 }