Skip to content

Commit 001430c

Browse files
committed
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 <[email protected]> Acked-by: Catalin Marinas <[email protected]> Acked-by: Mark Rutland <[email protected]>
1 parent e4e737b commit 001430c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

arch/arm64/include/asm/thread_info.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ struct thread_info {
4242
void *scs_base;
4343
void *scs_sp;
4444
#endif
45+
u32 cpu;
4546
};
4647

4748
#define thread_saved_pc(tsk) \

arch/arm64/kernel/asm-offsets.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ int main(void)
2929
DEFINE(TSK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
3030
DEFINE(TSK_CPU, offsetof(struct task_struct, cpu));
3131
BLANK();
32+
DEFINE(TSK_TI_CPU, offsetof(struct task_struct, thread_info.cpu));
3233
DEFINE(TSK_TI_FLAGS, offsetof(struct task_struct, thread_info.flags));
3334
DEFINE(TSK_TI_PREEMPT, offsetof(struct task_struct, thread_info.preempt_count));
3435
#ifdef CONFIG_ARM64_SW_TTBR0_PAN

0 commit comments

Comments
 (0)