powerpc/setup: Add cpu_to_phys_id array
authorNicholas Piggin <npiggin@gmail.com>
Tue, 13 Feb 2018 15:08:18 +0000 (01:08 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 30 Mar 2018 12:34:27 +0000 (23:34 +1100)
commit9f593f131ed463dc571290980dd12cb9e56d8ea5
tree8bc19a7024692d8d26f0b3b7956e7c2284b48956
parentc0abd0c745bdabe027a8f013a866f385fba717b1
powerpc/setup: Add cpu_to_phys_id array

Build an array that finds hardware CPU number from logical CPU
number in firmware CPU discovery. Use that rather than setting
paca of other CPUs directly, to begin with. Subsequent patch will
not have pacas allocated at this point.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Fix SMP=n build by adding #ifdef in arch_match_cpu_phys_id()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/smp.h
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/setup-common.c