Re: [PATCH 00/14] numa aware allocation for pacas, stacks, pagetables
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-03-29 06:18:13
Nicholas Piggin [off-list ref] writes:
On Wed, 07 Mar 2018 21:50:04 +1100 Michael Ellerman [off-list ref] wrote:quoted
Nicholas Piggin [off-list ref] writes:quoted
This series allows numa aware allocations for various early data structures for radix. Hash still has a bolted SLB limitation that prevents at least pacas and stacks from node-affine allocations. Fixed up a number of bugs, got pSeries working, added a couple more cases where page tables can be allocated node-local.=20=20=20 Few problems in here: =20 FAILURE kernel-build-linux =C2=BB powerpc,gcc_ubuntu_be,pmac32 arch/powerpc/kernel/prom.c:748:2: error: implicit declaration of funct=
ion 'allocate_paca_ptrs' [-Werror=3Dimplicit-function-declaration]
quoted
=20 FAILURE kernel-build-linux =C2=BB powerpc,gcc_ubuntu_le,powernv arch/powerpc/include/asm/paca.h:49:33: error: 'struct paca_struct' has=
no member named 'lppaca_ptr'
quoted
arch/powerpc/include/asm/paca.h:49:33: error: 'struct paca_struct' has=
no member named 'lppaca_ptr'
quoted
=20 Did I miss a follow-up or something?Here's a patch that applies to "powerpc/64: defer paca allocation until memory topology is discovered". The first hunk fixes the ppc32 issue, and the second hunk avoids freeing the cpu_to_phys_id array if the platform didn't allocate it. But I've just realized that should go into the previous patch (which is missing the memblock_free). --
...
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/set=
up-common.c
quoted hunk ↗ jump to hunk
index 56f7a2b793e0..2ba05acc2973 100644--- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c@@ -854,8 +854,10 @@ static void smp_setup_pacas(void) set_hard_smp_processor_id(cpu, cpu_to_phys_id[cpu]); }=20=20 - memblock_free(__pa(cpu_to_phys_id), nr_cpu_ids * sizeof(u32)); - cpu_to_phys_id =3D NULL; + if (cpu_to_phys_id) { + memblock_free(__pa(cpu_to_phys_id), nr_cpu_ids * sizeof(u32)); + cpu_to_phys_id =3D NULL; + } } #endif
=20 Where did you want that? cheers