Skip to content

Commit d780613

Browse files
committed
sh: Only invalidate the I-cache range for secondary CPUs stack_start.
Secondary CPUs already take care of the D-cache bits through the common cache initialization path, and the only thing that is necessary after twiddling around with stack_start is ensuring that the I-cache changes are visible (particularly since this tends to be the only part lacking coherency). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 36c8719 commit d780613

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎arch/sh/kernel/smp.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ int __cpuinit __cpu_up(unsigned int cpu)
120120
stack_start.bss_start = 0; /* don't clear bss for secondary cpus */
121121
stack_start.start_kernel_fn = start_secondary;
122122

123-
flush_cache_all();
123+
flush_icache_range((unsigned long)&stack_start,
124+
(unsigned long)&stack_start + sizeof(stack_start));
125+
wmb();
124126

125127
plat_start_cpu(cpu, (unsigned long)_stext);
126128

0 commit comments

Comments
 (0)