Revert "ANDROID: Setting up GS before calling __restore_processor_state."

This reverts commit e3e60c511d4a57ea9bc3ca7cc5506157b38d6bdb.

This was a compiler bug workaround which has now been fixed.

Bug: 166163480
Bug: 191637574
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Ib8b1f794fcf5b8f85cf1845ea70783b915ed377a
This commit is contained in:
Lee Jones
2021-08-09 09:44:37 +01:00
committed by Lee Jones
parent 04a7de0108
commit e24fc6152f

View File

@@ -270,18 +270,6 @@ static void notrace __restore_processor_state(struct saved_context *ctxt)
/* Needed by apm.c */
void notrace restore_processor_state(void)
{
#ifdef __clang__
// The following code snippet is copied from __restore_processor_state.
// Its purpose is to prepare GS segment before the function is called.
// Since the function is compiled with SCS on, it will use GS at its
// entry.
// TODO: Hack to be removed later when compiler bug is fixed.
#ifdef CONFIG_X86_64
wrmsrl(MSR_GS_BASE, saved_context.kernelmode_gs_base);
#else
loadsegment(fs, __KERNEL_PERCPU);
#endif
#endif
__restore_processor_state(&saved_context);
}
#ifdef CONFIG_X86_32