Re: [External] Re: [PATCH v11 09/12] x86/smpboot: Remove initial_stack on 64-bit

From: Usama Arif
Date: Fri Feb 24 2023 - 14:18:05 EST




On 24/02/2023 18:28, David Woodhouse wrote:
On Fri, 2023-02-24 at 18:24 +0000, Michael Kelley (LINUX) wrote:
I'm getting a compile error on the new reference to PTREGS_SIZE:

Is it just that <asm/asm-offsets.h> is included conditionally, and not
in your build? What if you include it directly from <asm/processor.h>

This is fixed in the v2 patch that Brian sent.

diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 9c4a5c4d46c1..bdde7316e75b 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -650,8 +650,8 @@ static inline void spin_lock_prefetch(const void *x)
#else
extern unsigned long __end_init_task[];

-#define INIT_THREAD { \
- .sp = (unsigned long)&__end_init_task - PTREGS_SIZE, \
+#define INIT_THREAD { \
+ .sp = (unsigned long)&__end_init_task - sizeof(struct pt_regs), \
}

extern unsigned long KSTK_ESP(struct task_struct *task);