Commit 02fb601d authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

x86/cpu: Move phys_proc_id into topology info

parent b9655e70
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ Package-related topology information in the kernel:

    The physical ID of the die. This information is retrieved via CPUID.

  - cpuinfo_x86.phys_proc_id:
  - cpuinfo_x86.topo.pkg_id:

    The physical ID of the package. This information is retrieved via CPUID
    and deduced from the APIC IDs of the cores in the package.
+3 −2
Original line number Diff line number Diff line
@@ -83,6 +83,9 @@ struct cpuinfo_topology {
	u32			apicid;
	// The initial APIC ID provided by CPUID
	u32			initial_apicid;

	// Physical package ID
	u32			pkg_id;
};

struct cpuinfo_x86 {
@@ -134,8 +137,6 @@ struct cpuinfo_x86 {
	u16			x86_clflush_size;
	/* number of cores as seen by the OS: */
	u16			booted_cores;
	/* Physical processor id: */
	u16			phys_proc_id;
	/* Logical processor id: */
	u16			logical_proc_id;
	/* Core id: */
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ 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_physical_package_id(cpu)	(cpu_data(cpu).phys_proc_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_die_id(cpu)			(cpu_data(cpu).cpu_die_id)
#define topology_core_id(cpu)			(cpu_data(cpu).cpu_core_id)
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ struct x86_init_ops {
 * struct x86_cpuinit_ops - platform specific cpu hotplug setups
 * @setup_percpu_clockev:	set up the per cpu clock event device
 * @early_percpu_clock_init:	early init of the per cpu clock event device
 * @fixup_cpu_id:		fixup function for cpuinfo_x86::phys_proc_id
 * @fixup_cpu_id:		fixup function for cpuinfo_x86::topo.pkg_id
 * @parallel_bringup:		Parallel bringup control
 */
struct x86_cpuinit_ops {
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ static void fixup_cpu_id(struct cpuinfo_x86 *c, int node)
		nodes = ((val >> 3) & 7) + 1;
	}

	c->phys_proc_id = node / nodes;
	c->topo.pkg_id = node / nodes;
}

static int __init numachip_system_init(void)
Loading