Lines Matching +full:en +full:- +full:us

28  * This file implements the APIC-ID-based CPU topology enumeration logic,
31 * http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
42 #include "qapi/qapi-types-machine-common.h"
46 * APIC IDs can be 32-bit, but beware: APIC IDs > 255 require x2APIC support
71 count -= 1; in apicid_bitwidth_for_count()
72 return count ? 32 - clz32(count) : 0; in apicid_bitwidth_for_count()
78 return apicid_bitwidth_for_count(topo_info->threads_per_core); in apicid_smt_width()
84 return apicid_bitwidth_for_count(topo_info->cores_per_module); in apicid_core_width()
90 return apicid_bitwidth_for_count(topo_info->modules_per_die); in apicid_module_width()
96 return apicid_bitwidth_for_count(topo_info->dies_per_pkg); in apicid_die_width()
132 return (topo_ids->pkg_id << apicid_pkg_offset(topo_info)) | in x86_apicid_from_topo_ids()
133 (topo_ids->die_id << apicid_die_offset(topo_info)) | in x86_apicid_from_topo_ids()
134 (topo_ids->module_id << apicid_module_offset(topo_info)) | in x86_apicid_from_topo_ids()
135 (topo_ids->core_id << apicid_core_offset(topo_info)) | in x86_apicid_from_topo_ids()
136 topo_ids->smt_id; in x86_apicid_from_topo_ids()
147 unsigned nr_dies = topo_info->dies_per_pkg; in x86_topo_ids_from_idx()
148 unsigned nr_modules = topo_info->modules_per_die; in x86_topo_ids_from_idx()
149 unsigned nr_cores = topo_info->cores_per_module; in x86_topo_ids_from_idx()
150 unsigned nr_threads = topo_info->threads_per_core; in x86_topo_ids_from_idx()
152 topo_ids->pkg_id = cpu_index / (nr_dies * nr_modules * in x86_topo_ids_from_idx()
154 topo_ids->die_id = cpu_index / (nr_modules * nr_cores * in x86_topo_ids_from_idx()
156 topo_ids->module_id = cpu_index / (nr_cores * nr_threads) % in x86_topo_ids_from_idx()
158 topo_ids->core_id = cpu_index / nr_threads % nr_cores; in x86_topo_ids_from_idx()
159 topo_ids->smt_id = cpu_index % nr_threads; in x86_topo_ids_from_idx()
170 topo_ids->smt_id = apicid & in x86_topo_ids_from_apicid()
172 topo_ids->core_id = in x86_topo_ids_from_apicid()
175 topo_ids->module_id = in x86_topo_ids_from_apicid()
178 topo_ids->die_id = in x86_topo_ids_from_apicid()
181 topo_ids->pkg_id = apicid >> apicid_pkg_offset(topo_info); in x86_topo_ids_from_apicid()
208 return topo_info->modules_per_die * topo_info->dies_per_pkg; in x86_module_per_pkg()
213 return topo_info->cores_per_module * x86_module_per_pkg(topo_info); in x86_cores_per_pkg()
218 return topo_info->threads_per_core * x86_cores_per_pkg(topo_info); in x86_threads_per_pkg()
223 return topo_info->threads_per_core * topo_info->cores_per_module; in x86_threads_per_module()
228 return x86_threads_per_module(topo_info) * topo_info->modules_per_die; in x86_threads_per_die()