From 1f6d5ce53dbb5b20c9ab07cbb63ebcd4af6b7f3e Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Sat, 29 Jan 2022 00:22:49 +0800 Subject: [PATCH] powerpc: add CPU field to struct thread_info mainline inclusion from mainline-v5.16-rc1 commit 227d735d889e0403f1659df6e2dece7633f380bc category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4Q94A CVE: NA ------------------------------ The CPU field will be moved back into thread_info even when THREAD_INFO_IN_TASK is enabled, so add it back to powerpc's definition of struct thread_info. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Acked-by: Michael Ellerman Signed-off-by: Guan Jing Reviewed-by: Chen Hui Signed-off-by: Zheng Zengkai --- arch/powerpc/include/asm/thread_info.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 46a210b03d2b..28d2908afaa7 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h @@ -48,6 +48,9 @@ struct thread_info { int preempt_count; /* 0 => preemptable, <0 => BUG */ +#ifdef CONFIG_SMP + unsigned int cpu; +#endif unsigned long local_flags; /* private flags for thread */ #ifdef CONFIG_LIVEPATCH unsigned long *livepatch_sp; -- GitLab