]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc/32s: Fix segments setup when TASK_SIZE is not a multiple of 256M
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 24 Dec 2025 11:20:53 +0000 (12:20 +0100)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 7 Jan 2026 04:01:04 +0000 (09:31 +0530)
commitfb7903771c107b0358584a359b8545060e23c530
treebc2382ebd9b8b23f49293d0835fe691d013598a0
parent704f4300315396af94e26ec0127ff0cd3fd309bf
powerpc/32s: Fix segments setup when TASK_SIZE is not a multiple of 256M

For book3s/32 it is assumed that TASK_SIZE is a multiple of 256 Mbytes,
but Kconfig allows any value for TASK_SIZE.

In all relevant calculations, align TASK_SIZE to the upper 256 Mbytes
boundary.

Also use ASM_CONST() in the definition of TASK_SIZE to ensure it is
seen as an unsigned constant.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/8928d906079e156c59794c41e826a684eaaaebb4.1766574657.git.chleroy@kernel.org
arch/powerpc/include/asm/book3s/32/mmu-hash.h
arch/powerpc/include/asm/task_size_32.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/head_book3s_32.S
arch/powerpc/mm/book3s32/mmu.c
arch/powerpc/mm/ptdump/segment_regs.c