Commit dea18da4 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

powerpc/64s: Fix stress_hpt memblock alloc alignment



The stress_hpt memblock allocation did not pass in an alignment,
which causes a stack dump in early boot (that I missed, oops).

Fixes: 6b34a099 ("powerpc/64s/hash: add stress_hpt kernel boot option to increase hash faults")
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221216115930.2667772-2-npiggin@gmail.com
parent ffc8e90d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1051,7 +1051,8 @@ static void __init htab_initialize(void)
		static_branch_enable(&stress_hpt_key);
		// Too early to use nr_cpu_ids, so use NR_CPUS
		tmp = memblock_phys_alloc_range(sizeof(struct stress_hpt_struct) * NR_CPUS,
						0, 0, MEMBLOCK_ALLOC_ANYWHERE);
						__alignof__(struct stress_hpt_struct),
						0, MEMBLOCK_ALLOC_ANYWHERE);
		memset((void *)tmp, 0xff, sizeof(struct stress_hpt_struct) * NR_CPUS);
		stress_hpt_struct = __va(tmp);