diff options
| author | Uros Bizjak <[email protected]> | 2023-10-24 16:28:14 +0200 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2023-10-24 18:37:20 +0200 |
| commit | 0548eb067ed664b93043e033295ca71e3e706245 (patch) | |
| tree | ceee4f42779a05511f964e1611281418561a839d | |
| parent | ed2f752e0e0a21d941ca0ee539ef3d4cd576bc5e (diff) | |
x86/percpu: Return correct variable from current_top_of_stack()
current_top_of_stack() should return variable from _seg_gs
qualified named address space when CONFIG_USE_X86_SEG_SUPPORT=y
is enbled.
Fixes: ed2f752e0e0a ("x86/percpu: Introduce const-qualified const_pcpu_hot to micro-optimize code generation")
Signed-off-by: Uros Bizjak <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: Andy Lutomirski <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Sean Christopherson <[email protected]>
| -rw-r--r-- | arch/x86/include/asm/processor.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index b47a9975233f..f20e87632669 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -519,7 +519,7 @@ static __always_inline unsigned long current_top_of_stack(void) * entry trampoline. */ if (IS_ENABLED(CONFIG_USE_X86_SEG_SUPPORT)) - return pcpu_hot.top_of_stack; + return const_pcpu_hot.top_of_stack; return this_cpu_read_stable(pcpu_hot.top_of_stack); } |