Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Revert sr workarounds #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/x86/power/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OBJECT_FILES_NON_STANDARD_hibernate_asm_$(BITS).o := y
# __restore_processor_state() restores %gs after S3 resume and so should not
# itself be stack-protected
nostackp := $(call cc-option, -fno-stack-protector)
CFLAGS_cpu.o := $(nostackp)
CFLAGS_cpu.o := $(nostackp)

obj-$(CONFIG_PM_SLEEP) += cpu.o
obj-$(CONFIG_HIBERNATION) += hibernate_$(BITS).o hibernate_asm_$(BITS).o hibernate.o
15 changes: 1 addition & 14 deletions arch/x86/power/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static void fix_processor_context(void)
* The asm code that gets us here will have restored a usable GDT, although
* it will be pointing to the wrong alias.
*/
static void noinline notrace __restore_processor_state(struct saved_context *ctxt)
static void notrace __restore_processor_state(struct saved_context *ctxt)
{
if (ctxt->misc_enable_saved)
wrmsrl(MSR_IA32_MISC_ENABLE, ctxt->misc_enable);
Expand Down Expand Up @@ -268,19 +268,6 @@ static void noinline notrace __restore_processor_state(struct saved_context *ctx
/* 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);
loadsegment(gs, __KERNEL_STACK_CANARY);
#endif
#endif
__restore_processor_state(&saved_context);
}
#ifdef CONFIG_X86_32
Expand Down