diff options
| author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2015-02-04 08:48:25 -0500 |
|---|---|---|
| committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-02-12 03:37:22 -0500 |
| commit | da0c636ea79380c2001f319844e9a237cf211f96 (patch) | |
| tree | d80530069364e6d89d4384234414b6a558d33249 /arch/s390/include/asm | |
| parent | d05d15da18f521c4fb5a35b923ce33955c848d99 (diff) | |
s390/topology: convert cpu_topology array to per cpu variable
Convert the per cpu topology cpu masks to a per cpu variable.
At least for machines which do have less possible cpus than NR_CPUS this can
save a bit of memory (z/VM: max 64 vs 512 for performance_defconfig).
This reduces the kernel image size by 100k.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm')
| -rw-r--r-- | arch/s390/include/asm/topology.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h index 9454231c9f23..b1453a2ae1ca 100644 --- a/arch/s390/include/asm/topology.h +++ b/arch/s390/include/asm/topology.h | |||
| @@ -18,15 +18,15 @@ struct cpu_topology_s390 { | |||
| 18 | cpumask_t book_mask; | 18 | cpumask_t book_mask; |
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | extern struct cpu_topology_s390 cpu_topology[NR_CPUS]; | 21 | DECLARE_PER_CPU(struct cpu_topology_s390, cpu_topology); |
| 22 | 22 | ||
| 23 | #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id) | 23 | #define topology_physical_package_id(cpu) (per_cpu(cpu_topology, cpu).socket_id) |
| 24 | #define topology_thread_id(cpu) (cpu_topology[cpu].thread_id) | 24 | #define topology_thread_id(cpu) (per_cpu(cpu_topology, cpu).thread_id) |
| 25 | #define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_mask) | 25 | #define topology_thread_cpumask(cpu) (&per_cpu(cpu_topology, cpu).thread_mask) |
| 26 | #define topology_core_id(cpu) (cpu_topology[cpu].core_id) | 26 | #define topology_core_id(cpu) (per_cpu(cpu_topology, cpu).core_id) |
| 27 | #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_mask) | 27 | #define topology_core_cpumask(cpu) (&per_cpu(cpu_topology, cpu).core_mask) |
| 28 | #define topology_book_id(cpu) (cpu_topology[cpu].book_id) | 28 | #define topology_book_id(cpu) (per_cpu(cpu_topology, cpu).book_id) |
| 29 | #define topology_book_cpumask(cpu) (&cpu_topology[cpu].book_mask) | 29 | #define topology_book_cpumask(cpu) (&per_cpu(cpu_topology, cpu).book_mask) |
| 30 | 30 | ||
| 31 | #define mc_capable() 1 | 31 | #define mc_capable() 1 |
| 32 | 32 | ||
