Modern systems use this value for the socket. There may be multiple
packages within a socket. This value may differ from topo.die_id.
- - cpuinfo_x86.logical_proc_id:
+ - cpuinfo_x86.topo.logical_pkg_id:
The logical ID of the package. As we do not trust BIOSes to enumerate the
packages in a consistent way, we introduced the concept of logical package
struct cpuinfo_x86 *c = &cpu_data(cpu);
if (c->initialized && cpu_to_node(cpu) == node)
- return c->logical_die_id;
+ return c->topo.logical_die_id;
}
return -1;
// Core ID relative to the package
u32 core_id;
+
+ // Logical ID mappings
+ u32 logical_pkg_id;
+ u32 logical_die_id;
};
struct cpuinfo_x86 {
u16 x86_clflush_size;
/* number of cores as seen by the OS: */
u16 booted_cores;
- /* Logical processor id: */
- u16 logical_proc_id;
- /* Core id: */
- u16 logical_die_id;
/* Index into per_cpu list: */
u16 cpu_index;
/* Is SMT active on this core? */
extern const struct cpumask *cpu_coregroup_mask(int cpu);
extern const struct cpumask *cpu_clustergroup_mask(int cpu);
-#define topology_logical_package_id(cpu) (cpu_data(cpu).logical_proc_id)
+#define topology_logical_package_id(cpu) (cpu_data(cpu).topo.logical_pkg_id)
#define topology_physical_package_id(cpu) (cpu_data(cpu).topo.pkg_id)
-#define topology_logical_die_id(cpu) (cpu_data(cpu).logical_die_id)
+#define topology_logical_die_id(cpu) (cpu_data(cpu).topo.logical_die_id)
#define topology_die_id(cpu) (cpu_data(cpu).topo.die_id)
#define topology_core_id(cpu) (cpu_data(cpu).topo.core_id)
#define topology_ppin(cpu) (cpu_data(cpu).ppin)
BUG_ON(topology_update_package_map(c->topo.pkg_id, cpu));
BUG_ON(topology_update_die_map(c->topo.die_id, cpu));
#else
- c->logical_proc_id = 0;
+ c->topo.logical_pkg_id = 0;
#endif
}
struct cpuinfo_x86 *c = &cpu_data(cpu);
if (c->initialized && c->topo.pkg_id == phys_pkg)
- return c->logical_proc_id;
+ return c->topo.logical_pkg_id;
}
return -1;
}
if (c->initialized && c->topo.die_id == die_id &&
c->topo.pkg_id == proc_id)
- return c->logical_die_id;
+ return c->topo.logical_die_id;
}
return -1;
}
cpu, pkg, new);
}
found:
- cpu_data(cpu).logical_proc_id = new;
+ cpu_data(cpu).topo.logical_pkg_id = new;
return 0;
}
/**
cpu, die, new);
}
found:
- cpu_data(cpu).logical_die_id = new;
+ cpu_data(cpu).topo.logical_die_id = new;
return 0;
}