[PATCH v16 12/21] powerpc: Use sizeof(struct thread_info) in INIT_SP_LIMIT

Michael Ellerman mpe at ellerman.id.au
Tue Feb 5 22:32:10 AEDT 2019


From: Christophe Leroy <christophe.leroy at c-s.fr>

Currently INIT_SP_LIMIT uses sizeof(init_thread_info), but that symbol
won't exist when we enable THREAD_INFO_IN_TASK. So just use the sizeof
the type which is the same value but will continue to work.

Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>
Reviewed-by: Nicholas Piggin <npiggin at gmail.com>
[mpe: Split out of larger patch]
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 arch/powerpc/include/asm/processor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index d9b1503ba0f0..b40b614047e4 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -268,7 +268,7 @@ struct thread_struct {
 
 #define INIT_SP		(sizeof(init_stack) + (unsigned long) &init_stack)
 #define INIT_SP_LIMIT \
-	(_ALIGN_UP(sizeof(init_thread_info), 16) + (unsigned long) &init_stack)
+	(_ALIGN_UP(sizeof(struct thread_info), 16) + (unsigned long)&init_stack)
 
 #ifdef CONFIG_SPE
 #define SPEFSCR_INIT \
-- 
2.20.1



More information about the Linuxppc-dev mailing list