Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+6 -12
+6 -12
arch/arm/mach-realview/platsmp.c
··· 20 20 #include <mach/hardware.h> 21 21 #include <asm/mach-types.h> 22 22 #include <asm/localtimer.h> 23 + #include <asm/unified.h> 23 24 24 25 #include <mach/board-eb.h> 25 26 #include <mach/board-pb11mp.h> ··· 138 137 139 138 static void __init poke_milo(void) 140 139 { 141 - extern void secondary_startup(void); 142 - 143 140 /* nobody is to be released from the pen yet */ 144 141 pen_release = -1; 145 142 146 143 /* 147 - * write the address of secondary startup into the system-wide 148 - * flags register, then clear the bottom two bits, which is what 149 - * BootMonitor is waiting for 144 + * Write the address of secondary startup into the system-wide flags 145 + * register. The BootMonitor waits for this register to become 146 + * non-zero. 150 147 */ 151 - #if 1 152 148 #define REALVIEW_SYS_FLAGSS_OFFSET 0x30 153 - __raw_writel(virt_to_phys(realview_secondary_startup), 149 + #define REALVIEW_SYS_FLAGSC_OFFSET 0x34 150 + __raw_writel(BSYM(virt_to_phys(realview_secondary_startup)), 154 151 __io_address(REALVIEW_SYS_BASE) + 155 152 REALVIEW_SYS_FLAGSS_OFFSET); 156 - #define REALVIEW_SYS_FLAGSC_OFFSET 0x34 157 - __raw_writel(3, 158 - __io_address(REALVIEW_SYS_BASE) + 159 - REALVIEW_SYS_FLAGSC_OFFSET); 160 - #endif 161 153 162 154 mb(); 163 155 }