sw64: remove hmcall swpctx from context switch
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- It used to switch context in hmcall swpctx, which is not flexible enough. We try to make it happen in kernel without hmcall swpctx. To achieve this end, not only fpu state but also usp and tls pointer have to be saved and restored. For process creation and hibernation, the current tls pointer has to be read from CSR:TID as it may be out- of-sync with the saved value. For suspend, it's better to be saved and restored because there is no guarantee that WAKEUP interrupt will be used. To do this, we add hmcall fixup to access CSR:TID and obtain backward compatibility for user. Besides, the old `unique` is too obscure to be understood. To make it clear, we rename it to `tp` which is short for tls pointer, and then retain HMC_rdunique/wrunique as alias of HMC_rdtp/wrtp. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
Showing
arch/sw_64/kernel/hmcall.c
0 → 100644
想要评论请 注册 或 登录