Skip to contentSkip to conversation

cpu-to-thread_info update for v5.16-rc1

GIT PULL Merged Kees Cook 2 participants 2 messages Nov 1, 2021 – Nov 2, 2021

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

Hi Linus,

Please pull this cpu-to-thread_info update for v5.16-rc1. Since I've tended to carry other cross-architecture changes in the past, and mpe wanted a stable topic branch for powerpc for this, I carried Ard's PR. Since it was a stable topic branch and I wanted to capture Ard's summary, it also includes an explicit Merge commit; please let me know if that shouldn't be done in the future. This has been in -next for most of the last cycle, and has been Acked by all the arch maintainers.

Thanks!

-Kees

The following changes since commit e4e737bb5c170df6135a127739a9e6148ee3da82:

Linux 5.15-rc2 (2021-09-19 17:28:22 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/cpu-to-thread_info-v5.16-rc1

for you to fetch changes up to d9f2a53f64a6fcae994457e64a7124d2a3efd323:

Merge tag 'pr-move-task-cpu-to-ti' of git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git (2021-09-30 10:36:44 -0700)

----------------------------------------------------------------
cpu-to-thread_info update for v5.16-rc1

Cross-architecture update to move task_struct::cpu back into thread_info on arm64, x86, s390, powerpc, and riscv. All Acked by arch maintainers.

Quoting Ard Biesheuvel:

"Move task_struct::cpu back into thread_info

Keeping CPU in task_struct is problematic for architectures that define raw_smp_processor_id() in terms of this field, as it requires linux/sched.h to be included, which causes a lot of pain in terms of circular dependencies (aka 'header soup')

This series moves it back into thread_info (where it came from) for all architectures that enable THREAD_INFO_IN_TASK, addressing the header soup issue as well as some pointless differences in the implementations of task_cpu() and set_task_cpu()."

----------------------------------------------------------------
Ard Biesheuvel (7):
arm64: add CPU field to struct thread_info
x86: add CPU field to struct thread_info
s390: add CPU field to struct thread_info
powerpc: add CPU field to struct thread_info
sched: move CPU field back into thread_info if THREAD_INFO_IN_TASK=y
powerpc: smp: remove hack to obtain offset of task_struct::cpu
riscv: rely on core code to keep thread_info::cpu updated

Kees Cook (1):
Merge tag 'pr-move-task-cpu-to-ti' of git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git

 arch/arm64/include/asm/thread_info.h   |  1 +
 arch/arm64/kernel/asm-offsets.c        |  2 +-
 arch/arm64/kernel/head.S               |  2 +-
 arch/powerpc/Makefile                  | 11 -----------
 arch/powerpc/include/asm/smp.h         | 17 +----------------
 arch/powerpc/include/asm/thread_info.h |  3 +++
 arch/powerpc/kernel/asm-offsets.c      |  4 +---
 arch/powerpc/kernel/smp.c              |  2 +-
 arch/riscv/kernel/asm-offsets.c        |  1 -
 arch/riscv/kernel/entry.S              |  5 -----
 arch/riscv/kernel/head.S               |  1 -
 arch/s390/include/asm/thread_info.h    |  1 +
 arch/x86/include/asm/thread_info.h     |  3 +++
 include/linux/sched.h                  | 13 +------------
 kernel/sched/sched.h                   |  4 ----
 15 files changed, 14 insertions(+), 56 deletions(-)
Signature · 1 line
Kees Cook
merge bot Merged
#1 lore raw
The pull request you sent on Mon, 1 Nov 2021 09:12:01 -0700:

The pull request you sent on Mon, 1 Nov 2021 09:12:01 -0700:

Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/cpu-to-thread_info-v5.16-rc1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/01463374c50e4fe75abec927fa231f8f5d701852

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html