[v1.05][X86] Assume logical and physical cores from total_cores

This commit is contained in:
Dr-Noob
2024-07-17 08:50:11 +01:00
parent 21dddc63ff
commit 5dc2234e97

View File

@@ -656,10 +656,15 @@ bool get_cache_topology_amd(struct cpuInfo* cpu, struct topology* topo) {
void get_topology_from_udev(struct topology* topo) {
topo->total_cores = get_ncores_from_cpuinfo();
// TODO: To be improved in the future
// Conservative setting as we only know the total
// number of cores.
if (topo->total_cores != -1) {
// Assuming this for now
topo->logical_cores = topo->total_cores;
topo->physical_cores = topo->total_cores;
}
else {
topo->logical_cores = UNKNOWN_DATA;
topo->physical_cores = UNKNOWN_DATA;
}
topo->smt_available = 1;
topo->smt_supported = 1;
topo->sockets = 1;