if (cpu_has(c, X86_FEATURE_HT)) { if (!WARN_ON_ONCE(tscan->ebx1_nproc_shift < core_shift))
smt_shift = tscan->ebx1_nproc_shift - core_shift; /* * The parser expects leaf 0xb/0x1f format, which means * the number of logical processors at core level is * counting threads.
*/
core_shift += smt_shift;
cores <<= smt_shift;
}
staticbool fake_topology(struct topo_scan *tscan)
{ /* * Preset the CORE level shift for CPUID less systems and XEN_PV, * which has useless CPUID information.
*/
topology_set_dom(tscan, TOPO_SMT_DOMAIN, 0, 1);
topology_set_dom(tscan, TOPO_CORE_DOMAIN, 0, 1);
/* Preset Initial APIC ID from CPUID leaf 1 */
cpuid_leaf_reg(1, CPUID_EBX, &ebx);
c->topo.initial_apicid = ebx.apicid;
/* * The initial invocation from early_identify_cpu() happens before * the APIC is mapped or X2APIC enabled. For establishing the * topology, that's not required. Use the initial APIC ID.
*/ if (early)
c->topo.apicid = c->topo.initial_apicid; else
c->topo.apicid = read_apic_id();
/* The above is sufficient for UP */ if (!IS_ENABLED(CONFIG_SMP)) return;
switch (c->x86_vendor) { case X86_VENDOR_AMD: if (IS_ENABLED(CONFIG_CPU_SUP_AMD))
cpu_parse_topology_amd(tscan); break; case X86_VENDOR_CENTAUR: case X86_VENDOR_ZHAOXIN:
parse_legacy(tscan); break; case X86_VENDOR_INTEL: if (!IS_ENABLED(CONFIG_CPU_SUP_INTEL) || !cpu_parse_topology_ext(tscan))
parse_legacy(tscan); if (c->cpuid_level >= 0x1a)
c->topo.cpu_type = cpuid_eax(0x1a); break; case X86_VENDOR_HYGON: if (IS_ENABLED(CONFIG_CPU_SUP_HYGON))
cpu_parse_topology_amd(tscan); break;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.