From: Jiaxun Yang Date: Wed, 22 Apr 2020 14:45:34 +0000 (+0800) Subject: MIPS: Clear XContext at boot time X-Git-Tag: v5.15~3731^2~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c213db614685e8dc9f910bca5cf934816ba423fe;p=platform%2Fkernel%2Flinux-starfive.git MIPS: Clear XContext at boot time XContext might be dirty at boot time. We need to clear it to ensure early stackframe is safe. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 351d40f..3b02ffe 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S @@ -132,6 +132,9 @@ dtb_found: #endif MTC0 zero, CP0_CONTEXT # clear context register +#ifdef CONFIG_64BIT + MTC0 zero, CP0_XCONTEXT +#endif PTR_LA $28, init_thread_union /* Set the SP after an empty pt_regs. */ PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE