Re: [PATCH RESEND 0/3] Represent cluster topology and enable load balance between clusters

From: Peter Zijlstra
Date: Tue Oct 05 2021 - 03:59:27 EST


On Mon, Oct 04, 2021 at 03:54:50PM -0700, Tim Chen wrote:
> diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
> index 2548d824f103..cc164777e661 100644
> --- a/arch/x86/include/asm/topology.h
> +++ b/arch/x86/include/asm/topology.h
> @@ -109,12 +109,12 @@ extern const struct cpumask *cpu_clustergroup_mask(int cpu);
> #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_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_cluster_id(cpu) (per_cpu(cpu_l2c_id, cpu))
> #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
>
> extern unsigned int __max_die_per_package;
>
> #ifdef CONFIG_SMP
> +#define topology_cluster_id(cpu) (per_cpu(cpu_l2c_id, cpu))
> #define topology_die_cpumask(cpu) (per_cpu(cpu_die_map, cpu))
> #define topology_cluster_cpumask(cpu) (cpu_clustergroup_mask(cpu))
> #define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
>

Fixed.