From e24fc6152fb497ded3d7d72d682b5a10ea5408f3 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 9 Aug 2021 09:44:37 +0100 Subject: [PATCH] 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 Change-Id: Ib8b1f794fcf5b8f85cf1845ea70783b915ed377a --- arch/x86/power/cpu.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 8ceedd6bb385..3a070e7cdb8b 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c @@ -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