summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/smp.c
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2022-02-11 08:13:44 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2022-02-16 20:46:50 +0100
commitcc19db8b312a6c75645645f5cc1b45166b109006 (patch)
treeb13ea4b633c3387ec73c60b041863e5de99062c5 /arch/mips/kernel/smp.c
parentd9565bf40da22426d2f660cb31700b6858d1911d (diff)
MIPS: ralink: mt7621: do memory detection on KSEG1
It's reported that current memory detection code occasionally detects larger memory under some bootloaders. Current memory detection code tests whether address space wraps around on KSEG0, which is unreliable because it's cached. Rewrite memory size detection to perform the same test on KSEG1 instead. While at it, this patch also does the following two things: 1. use a fixed pattern instead of a random function pointer as the magic value. 2. add an additional memory write and a second comparison as part of the test to prevent possible smaller memory detection result due to leftover values in memory. Fixes: 139c949f7f0a MIPS: ("ralink: mt7621: add memory detection support") Reported-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Chuanhong Guo <gch981213@gmail.com> Tested-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Tested-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/kernel/smp.c')
0 files changed, 0 insertions, 0 deletions