From: Jiaxun Yang Date: Fri, 16 Feb 2024 17:42:11 +0000 (+0100) Subject: MIPS: Fix set_uncached_handler for ebase in XKPHYS X-Git-Tag: microblaze-v6.10~95^2~46 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=3391b95cf6a0b5b70904857dcc415b832f81866a;p=linux-2.6-microblaze.git MIPS: Fix set_uncached_handler for ebase in XKPHYS ebase might reside in XKPHYS if memblock is unable to allocate memory within the KSEG0 physical range. To map EBASE into uncached space, we convert it back to its physical address and utilize the new CKSEG1ADDR_OR_64BIT helper for mapping. Co-developed-by: Vladimir Kondratiev Signed-off-by: Vladimir Kondratiev Co-developed-by: Gregory CLEMENT Signed-off-by: Jiaxun Yang Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 2d95e9971a2d..a0085445f440 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -2299,7 +2299,7 @@ static const char panic_null_cerr[] = void set_uncached_handler(unsigned long offset, void *addr, unsigned long size) { - unsigned long uncached_ebase = CKSEG1ADDR(ebase); + unsigned long uncached_ebase = CKSEG1ADDR_OR_64BIT(__pa(ebase)); if (!addr) panic(panic_null_cerr);