Merge tag 'v6.8-rc4' into x86/percpu, to resolve conflicts and refresh the branch
[linux-2.6-block.git] / arch / x86 / include / asm / processor.h
index 26620d7642a9fcf9d4a822140a1dd009399ee16a..1188e8bf76a2998d9d8cb50d0da0ae9a9d28351e 100644 (file)
@@ -533,6 +533,9 @@ static __always_inline unsigned long current_top_of_stack(void)
         *  and around vm86 mode and sp0 on x86_64 is special because of the
         *  entry trampoline.
         */
+       if (IS_ENABLED(CONFIG_USE_X86_SEG_SUPPORT))
+               return this_cpu_read_const(const_pcpu_hot.top_of_stack);
+
        return this_cpu_read_stable(pcpu_hot.top_of_stack);
 }