]> git.itanic.dy.fi Git - linux-stable/commit
csky: Fixup cpu speculative execution to IO area
authorGuo Ren <guoren@linux.alibaba.com>
Sat, 28 Mar 2020 11:14:37 +0000 (19:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:36:38 +0000 (10:36 +0200)
commite907a0d09b34e63163fb73b6826805e334ae3e11
tree1fb088ef495809da054661faac22a2429c50efe7
parent88591187bebc0140acb3901cb7e73c7442f92771
csky: Fixup cpu speculative execution to IO area

[ Upstream commit aefd9461d34a1b0a2acad0750c43216c1c27b9d4 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/csky/abiv1/inc/abi/entry.h
arch/csky/abiv2/inc/abi/entry.h
arch/csky/kernel/head.S
arch/csky/kernel/setup.c
arch/csky/kernel/smp.c