diff options
| author | Jiaxun Yang <[email protected]> | 2020-04-22 22:45:34 +0800 |
|---|---|---|
| committer | Thomas Bogendoerfer <[email protected]> | 2020-04-24 18:37:23 +0200 |
| commit | c213db614685e8dc9f910bca5cf934816ba423fe (patch) | |
| tree | 6e4c6c24228bd99061c5cf0294c768cac42ebe96 | |
| parent | d82d500f5118f9d07477d597fe75c3bd73b44c8e (diff) | |
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 <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
| -rw-r--r-- | arch/mips/kernel/head.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 351d40fe0859..3b02ffe46304 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 |