From a4447e2ab7c12a55c11efc5a40c71f09279caacf Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Sat, 10 Nov 2012 11:04:27 +0100 Subject: [PATCH] --- yaml --- r: 335683 b: refs/heads/master c: 658e5ce705f2a09ab681eb61ca7c8619bb7a783d h: refs/heads/master i: 335681: 748931bd29384ab594e8796ca794bfcba30a0edd 335679: ef8e4b1591d0411000a2ad399e47e08bb7ecb7fa v: v3 --- [refs] | 2 +- trunk/arch/s390/include/asm/topology.h | 3 +++ trunk/arch/s390/kernel/topology.c | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a83a8ce2d21e..17c5ea38ccee 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fa968ee215c0ca91e4a9c3a69ac2405aae6e5d2f +refs/heads/master: 658e5ce705f2a09ab681eb61ca7c8619bb7a783d diff --git a/trunk/arch/s390/include/asm/topology.h b/trunk/arch/s390/include/asm/topology.h index 9ca305383760..9935cbd6a46f 100644 --- a/trunk/arch/s390/include/asm/topology.h +++ b/trunk/arch/s390/include/asm/topology.h @@ -8,6 +8,9 @@ struct cpu; #ifdef CONFIG_SCHED_BOOK +extern unsigned char cpu_socket_id[NR_CPUS]; +#define topology_physical_package_id(cpu) (cpu_socket_id[cpu]) + extern unsigned char cpu_core_id[NR_CPUS]; extern cpumask_t cpu_core_map[NR_CPUS]; diff --git a/trunk/arch/s390/kernel/topology.c b/trunk/arch/s390/kernel/topology.c index 54d93f4b6818..dd55f7c20104 100644 --- a/trunk/arch/s390/kernel/topology.c +++ b/trunk/arch/s390/kernel/topology.c @@ -40,6 +40,7 @@ static DEFINE_SPINLOCK(topology_lock); static struct mask_info core_info; cpumask_t cpu_core_map[NR_CPUS]; unsigned char cpu_core_id[NR_CPUS]; +unsigned char cpu_socket_id[NR_CPUS]; static struct mask_info book_info; cpumask_t cpu_book_map[NR_CPUS]; @@ -83,11 +84,12 @@ static struct mask_info *add_cpus_to_mask(struct topology_cpu *tl_cpu, cpumask_set_cpu(lcpu, &book->mask); cpu_book_id[lcpu] = book->id; cpumask_set_cpu(lcpu, &core->mask); + cpu_core_id[lcpu] = rcpu; if (one_core_per_cpu) { - cpu_core_id[lcpu] = rcpu; + cpu_socket_id[lcpu] = rcpu; core = core->next; } else { - cpu_core_id[lcpu] = core->id; + cpu_socket_id[lcpu] = core->id; } smp_cpu_set_polarization(lcpu, tl_cpu->pp); }