sw64: ensure IRQs are off when switch/load/activate mm context
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNEN -------------------------------- This is because of commit f98db601 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler") in which switch_mm_irqs_off() is called by the scheduler, vs switch_mm() which is used by use_mm(). This patch mirrors the x86 code, ie. it disables interrupt in switch_mm(), and optimises the scheduler case by defining switch_mm_irqs_off(). After that, the asn_lock and need_new_asn in cpu_data are no longer needed. This patch also moves __load_new_mm_context() into flush_tlb_current() and make sure IRQs are off over it. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
Showing
想要评论请 注册 或 登录