From 30fc4ca2a8ab508d160a917b89b7e1c27f893354 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 2 Dec 2016 10:38:37 +0100 Subject: s390/topology: use cpu_topology array instead of per cpu variable CPU topology information like cpu to node mapping must be setup in setup_arch already. Topology information is currently made available with a per cpu variable; this however will not work when the initialization will be moved to setup_arch, since the generic percpu setup will be done much later. Therefore convert back to a cpu_topology array. Reviewed-by: Michael Holzheu Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/numa/mode_emu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/s390/numa') diff --git a/arch/s390/numa/mode_emu.c b/arch/s390/numa/mode_emu.c index b831093..2ed27e8 100644 --- a/arch/s390/numa/mode_emu.c +++ b/arch/s390/numa/mode_emu.c @@ -355,7 +355,7 @@ static struct toptree *toptree_from_topology(void) phys = toptree_new(TOPTREE_ID_PHYS, 1); for_each_online_cpu(cpu) { - top = &per_cpu(cpu_topology, cpu); + top = &cpu_topology[cpu]; node = toptree_get_child(phys, 0); drawer = toptree_get_child(node, top->drawer_id); book = toptree_get_child(drawer, top->book_id); @@ -378,7 +378,7 @@ static void topology_add_core(struct toptree *core) int cpu; for_each_cpu(cpu, &core->mask) { - top = &per_cpu(cpu_topology, cpu); + top = &cpu_topology[cpu]; cpumask_copy(&top->thread_mask, &core->mask); cpumask_copy(&top->core_mask, &core_mc(core)->mask); cpumask_copy(&top->book_mask, &core_book(core)->mask); -- cgit v1.1