Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: add CPU field to struct thread_info

The CPU field will be moved back into thread_info even when
THREAD_INFO_IN_TASK is enabled, so add it back to arm64's definition of
struct thread_info.

Note that arm64 always has CONFIG_SMP=y so there is no point in guarding
the CPU field with an #ifdef.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>

+2
+1
arch/arm64/include/asm/thread_info.h
··· 42 42 void *scs_base; 43 43 void *scs_sp; 44 44 #endif 45 + u32 cpu; 45 46 }; 46 47 47 48 #define thread_saved_pc(tsk) \
+1
arch/arm64/kernel/asm-offsets.c
··· 29 29 DEFINE(TSK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); 30 30 DEFINE(TSK_CPU, offsetof(struct task_struct, cpu)); 31 31 BLANK(); 32 + DEFINE(TSK_TI_CPU, offsetof(struct task_struct, thread_info.cpu)); 32 33 DEFINE(TSK_TI_FLAGS, offsetof(struct task_struct, thread_info.flags)); 33 34 DEFINE(TSK_TI_PREEMPT, offsetof(struct task_struct, thread_info.preempt_count)); 34 35 #ifdef CONFIG_ARM64_SW_TTBR0_PAN