linux/arch/powerpc/mm/nohash
Christophe Leroy 370d841929 powerpc/32: Automatically adapt TASK_SIZE based on constraints
At the time being, TASK_SIZE can be customized by the user via Kconfig
but it is not possible to check all constraints in Kconfig. Impossible
setups are detected at compile time with BUILD_BUG() but that leads
to build failure when setting crazy values. It is not a problem on its
own because the user will usually either use the default value or set
a well thought value. However build robots generate crazy random
configs that lead to build failures, and build robots see it as a
regression every time a patch adds such a constraint.

So instead of failing the build when the custom TASK_SIZE is too
big, just adjust it to the maximum possible value matching the setup.

Several architectures already calculate TASK_SIZE based on other
parameters and options.

In order to do so, move MODULES_VADDR calculation into task_size_32.h
and ensure that:
- On book3s/32, userspace and module area have their own segments (256M)
- On 8xx, userspace has its own full PGDIR entries (4M)

Then TASK_SIZE is guaranteed to be correct so remove related
BUILD_BUG()s.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/6a2575420770d075cd090b5a316730a2ffafdee4.1766574657.git.chleroy@kernel.org
2026-01-07 09:31:05 +05:30
..
8xx.c powerpc/32: Automatically adapt TASK_SIZE based on constraints 2026-01-07 09:31:05 +05:30
44x.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
book3e_pgtable.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
e500_hugetlbpage.c powerpc: Refactor update_mmu_cache_range() 2023-10-19 17:12:44 +11:00
e500.c powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx() 2024-03-17 13:33:21 +11:00
kaslr_booke.c Add a new optional ",cma" suffix to the crashkernel= command line option 2025-07-19 19:08:22 -07:00
kup.c powerpc: Remove core support for 40x 2024-06-28 22:28:47 +10:00
Makefile - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
mmu_context.c powerpc/8xx: Remove offset in SPRN_M_TWB 2025-09-06 16:01:24 +05:30
tlb_64e.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00
tlb_low_64e.S powerpc/e500: use contiguous PMD instead of hugepd 2024-07-12 15:52:18 -07:00
tlb_low.S powerpc: Remove core support for 40x 2024-06-28 22:28:47 +10:00
tlb.c asm-generic: introduce text-patching.h 2024-11-07 14:25:15 -08:00