diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2010-08-05 03:49:26 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-03-18 04:01:04 -0400 |
commit | c6345ab1a3d17f4b6c80ac79d7fb0f006b32fdaa (patch) | |
tree | 8f3980f69cba2e3269aa9688426fca95be56d7a6 /arch/blackfin/mach-bf561/secondary.S | |
parent | 6f546bc3ac9eedbf770bf3bcbc45ce2ea32c94ad (diff) |
Blackfin: SMP: work around anomaly 05000491
In order to safely work around anomaly 05000491, we have to execute IFLUSH
from L1 instruction sram. The trouble with multi-core systems is that all
L1 sram is visible only to the active core. So we can't just place the
functions into L1 and call it directly. We need to setup a jump table and
place the entry point in external memory. This will call the right func
based on the active core.
In the process, convert from the manual relocation of a small bit of code
into Core B's L1 to the more general framework we already have in place
for loading arbitrary pieces of code into L1.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf561/secondary.S')
-rw-r--r-- | arch/blackfin/mach-bf561/secondary.S | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/blackfin/mach-bf561/secondary.S b/arch/blackfin/mach-bf561/secondary.S index 148e50764555..4c462838f4e1 100644 --- a/arch/blackfin/mach-bf561/secondary.S +++ b/arch/blackfin/mach-bf561/secondary.S | |||
@@ -13,7 +13,11 @@ | |||
13 | #include <asm/asm-offsets.h> | 13 | #include <asm/asm-offsets.h> |
14 | #include <asm/trace.h> | 14 | #include <asm/trace.h> |
15 | 15 | ||
16 | __INIT | 16 | /* |
17 | * This code must come first as CoreB is hardcoded (in hardware) | ||
18 | * to start at the beginning of its L1 instruction memory. | ||
19 | */ | ||
20 | .section .l1.text.head | ||
17 | 21 | ||
18 | /* Lay the initial stack into the L1 scratch area of Core B */ | 22 | /* Lay the initial stack into the L1 scratch area of Core B */ |
19 | #define INITIAL_STACK (COREB_L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12) | 23 | #define INITIAL_STACK (COREB_L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12) |
@@ -160,7 +164,6 @@ ENTRY(_coreb_trampoline_start) | |||
160 | .LWAIT_HERE: | 164 | .LWAIT_HERE: |
161 | jump .LWAIT_HERE; | 165 | jump .LWAIT_HERE; |
162 | ENDPROC(_coreb_trampoline_start) | 166 | ENDPROC(_coreb_trampoline_start) |
163 | ENTRY(_coreb_trampoline_end) | ||
164 | 167 | ||
165 | #ifdef CONFIG_HOTPLUG_CPU | 168 | #ifdef CONFIG_HOTPLUG_CPU |
166 | .section ".text" | 169 | .section ".text" |