topology.c (0bbdb4258bd116d8cd5d209e8d5b29bae516e5b3) | topology.c (5d2068da8d339e4dff8f9b9a1246e6a79e2949d8) |
---|---|
1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * This file contains NUMA specific variables and functions which can 7 * be split away from DISCONTIGMEM and are used on NUMA machines with 8 * contiguous memory. --- 134 unchanged lines hidden (view full) --- 143 struct cache_info * this_leaf) 144{ 145 pal_cache_shared_info_t csi; 146 int num_shared, i = 0; 147 unsigned int j; 148 149 if (cpu_data(cpu)->threads_per_core <= 1 && 150 cpu_data(cpu)->cores_per_socket <= 1) { | 1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * This file contains NUMA specific variables and functions which can 7 * be split away from DISCONTIGMEM and are used on NUMA machines with 8 * contiguous memory. --- 134 unchanged lines hidden (view full) --- 143 struct cache_info * this_leaf) 144{ 145 pal_cache_shared_info_t csi; 146 int num_shared, i = 0; 147 unsigned int j; 148 149 if (cpu_data(cpu)->threads_per_core <= 1 && 150 cpu_data(cpu)->cores_per_socket <= 1) { |
151 cpu_set(cpu, this_leaf->shared_cpu_map); | 151 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); |
152 return; 153 } 154 155 if (ia64_pal_cache_shared_info(this_leaf->level, 156 this_leaf->type, 157 0, 158 &csi) != PAL_STATUS_SUCCESS) 159 return; 160 161 num_shared = (int) csi.num_shared; 162 do { 163 for_each_possible_cpu(j) 164 if (cpu_data(cpu)->socket_id == cpu_data(j)->socket_id 165 && cpu_data(j)->core_id == csi.log1_cid 166 && cpu_data(j)->thread_id == csi.log1_tid) | 152 return; 153 } 154 155 if (ia64_pal_cache_shared_info(this_leaf->level, 156 this_leaf->type, 157 0, 158 &csi) != PAL_STATUS_SUCCESS) 159 return; 160 161 num_shared = (int) csi.num_shared; 162 do { 163 for_each_possible_cpu(j) 164 if (cpu_data(cpu)->socket_id == cpu_data(j)->socket_id 165 && cpu_data(j)->core_id == csi.log1_cid 166 && cpu_data(j)->thread_id == csi.log1_tid) |
167 cpu_set(j, this_leaf->shared_cpu_map); | 167 cpumask_set_cpu(j, &this_leaf->shared_cpu_map); |
168 169 i++; 170 } while (i < num_shared && 171 ia64_pal_cache_shared_info(this_leaf->level, 172 this_leaf->type, 173 i, 174 &csi) == PAL_STATUS_SUCCESS); 175} 176#else 177static void cache_shared_cpu_map_setup(unsigned int cpu, 178 struct cache_info * this_leaf) 179{ | 168 169 i++; 170 } while (i < num_shared && 171 ia64_pal_cache_shared_info(this_leaf->level, 172 this_leaf->type, 173 i, 174 &csi) == PAL_STATUS_SUCCESS); 175} 176#else 177static void cache_shared_cpu_map_setup(unsigned int cpu, 178 struct cache_info * this_leaf) 179{ |
180 cpu_set(cpu, this_leaf->shared_cpu_map); | 180 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); |
181 return; 182} 183#endif 184 185static ssize_t show_coherency_line_size(struct cache_info *this_leaf, 186 char *buf) 187{ 188 return sprintf(buf, "%u\n", 1 << this_leaf->cci.pcci_line_size); --- 282 unchanged lines hidden --- | 181 return; 182} 183#endif 184 185static ssize_t show_coherency_line_size(struct cache_info *this_leaf, 186 char *buf) 187{ 188 return sprintf(buf, "%u\n", 1 << this_leaf->cci.pcci_line_size); --- 282 unchanged lines hidden --- |