summaryrefslogtreecommitdiff
path: root/arch/csky/kernel/head.S
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2020-03-28 14:14:37 +0300
committerGuo Ren <guoren@linux.alibaba.com>2020-04-03 07:40:07 +0300
commitaefd9461d34a1b0a2acad0750c43216c1c27b9d4 (patch)
tree5758db614e0a99fc098daa1433d400196e690704 /arch/csky/kernel/head.S
parent8f6bb793b2be82f1f73bfb416486f156f70b4314 (diff)
downloadlinux-aefd9461d34a1b0a2acad0750c43216c1c27b9d4.tar.xz
csky: Fixup cpu speculative execution to IO area
For the memory size ( > 512MB, < 1GB), the MSA setting is: - SSEG0: PHY_START , PHY_START + 512MB - SSEG1: PHY_START + 512MB, PHY_START + 1GB But the real memory is no more than 1GB, there is a gap between the end size of memory and border of 1GB. CPU could speculatively execute to that gap and if the gap of the bus couldn't respond to the CPU request, then the crash will happen. Now make the setting with: - SSEG0: PHY_START , PHY_START + 512MB (no change) - SSEG1: Disabled (We use highmem to use the memory of 512MB~1GB) We also deprecated zhole_szie[] settings, it's only used by arm style CPUs. All memory gap should use Reserved setting of dts in csky system. Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Diffstat (limited to 'arch/csky/kernel/head.S')
-rw-r--r--arch/csky/kernel/head.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/csky/kernel/head.S b/arch/csky/kernel/head.S
index 61989f9241c0..17ed9d250480 100644
--- a/arch/csky/kernel/head.S
+++ b/arch/csky/kernel/head.S
@@ -21,6 +21,11 @@ END(_start)
ENTRY(_start_smp_secondary)
SETUP_MMU
+ /* copy msa1 from CPU0 */
+ lrw r6, secondary_msa1
+ ld.w r6, (r6, 0)
+ mtcr r6, cr<31, 15>
+
/* set stack point */
lrw r6, secondary_stack
ld.w r6, (r6, 0)