aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-07-24 07:33:00 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2009-07-24 07:33:00 -0400
commitdff2ab16ac53d2e21c1ee5ec72f446d5740d8ca2 (patch)
tree728576b978b00260b3a54bdbecfcd5b1999de5c2 /arch/arm/mach-realview
parentadca6dc23bc620ea95392659625200a252b97be3 (diff)
Thumb-2: Pass a Thumb-2 address to the secondary CPUs to jump to
This patch sets bit 0 in the startup address passed to the secondary CPUs so that they branch into Thumb-2 mode. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r--arch/arm/mach-realview/platsmp.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index ac0e83f1cc3a..a88458b4799d 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -20,6 +20,7 @@
20#include <mach/hardware.h> 20#include <mach/hardware.h>
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/localtimer.h> 22#include <asm/localtimer.h>
23#include <asm/unified.h>
23 24
24#include <mach/board-eb.h> 25#include <mach/board-eb.h>
25#include <mach/board-pb11mp.h> 26#include <mach/board-pb11mp.h>
@@ -137,26 +138,19 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
137 138
138static void __init poke_milo(void) 139static void __init poke_milo(void)
139{ 140{
140 extern void secondary_startup(void);
141
142 /* nobody is to be released from the pen yet */ 141 /* nobody is to be released from the pen yet */
143 pen_release = -1; 142 pen_release = -1;
144 143
145 /* 144 /*
146 * write the address of secondary startup into the system-wide 145 * Write the address of secondary startup into the system-wide flags
147 * flags register, then clear the bottom two bits, which is what 146 * register. The BootMonitor waits for this register to become
148 * BootMonitor is waiting for 147 * non-zero.
149 */ 148 */
150#if 1
151#define REALVIEW_SYS_FLAGSS_OFFSET 0x30 149#define REALVIEW_SYS_FLAGSS_OFFSET 0x30
152 __raw_writel(virt_to_phys(realview_secondary_startup),
153 __io_address(REALVIEW_SYS_BASE) +
154 REALVIEW_SYS_FLAGSS_OFFSET);
155#define REALVIEW_SYS_FLAGSC_OFFSET 0x34 150#define REALVIEW_SYS_FLAGSC_OFFSET 0x34
156 __raw_writel(3, 151 __raw_writel(BSYM(virt_to_phys(realview_secondary_startup)),
157 __io_address(REALVIEW_SYS_BASE) + 152 __io_address(REALVIEW_SYS_BASE) +
158 REALVIEW_SYS_FLAGSC_OFFSET); 153 REALVIEW_SYS_FLAGSS_OFFSET);
159#endif
160 154
161 mb(); 155 mb();
162} 156}