Commit e29e9ed6 authored by Srikar Dronamraju's avatar Srikar Dronamraju Committed by Michael Ellerman
Browse files

powerpc/smp: Remove get_physical_package_id



Now that cpu_core_mask has been removed and topology_core_cpumask has
been updated to use cpu_cpu_mask, we no more need
get_physical_package_id.

Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Tested-by: default avatarSatheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200921095653.9701-4-srikar@linux.vnet.ibm.com
parent 4ca234a9
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -114,12 +114,7 @@ static inline int cpu_to_coregroup_id(int cpu)
#ifdef CONFIG_PPC64
#include <asm/smp.h>

#ifdef CONFIG_PPC_SPLPAR
int get_physical_package_id(int cpu);
#define topology_physical_package_id(cpu)	(get_physical_package_id(cpu))
#else
#define topology_physical_package_id(cpu)	(cpu_to_chip_id(cpu))
#endif

#define topology_sibling_cpumask(cpu)	(per_cpu(cpu_sibling_map, cpu))
#define topology_core_cpumask(cpu)	(cpu_cpu_mask(cpu))
+0 −20
Original line number Diff line number Diff line
@@ -1292,26 +1292,6 @@ static inline void add_cpu_to_smallcore_masks(int cpu)
	}
}

int get_physical_package_id(int cpu)
{
	int pkg_id = cpu_to_chip_id(cpu);

	/*
	 * If the platform is PowerNV or Guest on KVM, ibm,chip-id is
	 * defined. Hence we would return the chip-id as the result of
	 * get_physical_package_id.
	 */
	if (pkg_id == -1 && firmware_has_feature(FW_FEATURE_LPAR) &&
	    IS_ENABLED(CONFIG_PPC_SPLPAR)) {
		struct device_node *np = of_get_cpu_node(cpu, NULL);
		pkg_id = of_node_to_nid(np);
		of_node_put(np);
	}

	return pkg_id;
}
EXPORT_SYMBOL_GPL(get_physical_package_id);

static void add_cpu_to_masks(int cpu)
{
	int first_thread = cpu_first_thread_sibling(cpu);