Commit d82e6762 authored by Michael Ellerman's avatar Michael Ellerman
Browse files

Merge tag 'smp-core-for-ppc-23-07-28' of...

Merge tag 'smp-core-for-ppc-23-07-28' of https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into topic/cpu-smt

SMP core changes for powerpc
parents 6eaae198 7f48405c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -555,6 +555,7 @@ Description: Control Symmetric Multi Threading (SMT)
			 ================ =========================================
			 "on"		  SMT is enabled
			 "off"		  SMT is disabled
			 "<N>"		  SMT is enabled with N threads per core.
			 "forceoff"	  SMT is force disabled. Cannot be changed.
			 "notsupported"   SMT is not supported by the CPU
			 "notimplemented" SMT runtime toggling is not
+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ config ARCH_HAS_SUBPAGE_FAULTS
config HOTPLUG_SMT
	bool

config SMT_NUM_THREADS_DYNAMIC
	bool

# Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL
config HOTPLUG_CORE_SYNC
	bool
+2 −2
Original line number Diff line number Diff line
@@ -136,10 +136,11 @@ static inline int topology_max_smt_threads(void)
	return __max_smt_threads;
}

#include <linux/cpu_smt.h>

int topology_update_package_map(unsigned int apicid, unsigned int cpu);
int topology_update_die_map(unsigned int dieid, unsigned int cpu);
int topology_phys_to_logical_pkg(unsigned int pkg);
bool topology_smt_supported(void);

extern struct cpumask __cpu_primary_thread_mask;
#define cpu_primary_thread_mask ((const struct cpumask *)&__cpu_primary_thread_mask)
@@ -162,7 +163,6 @@ static inline int topology_phys_to_logical_pkg(unsigned int pkg) { return 0; }
static inline int topology_max_die_per_package(void) { return 1; }
static inline int topology_max_smt_threads(void) { return 1; }
static inline bool topology_is_primary_thread(unsigned int cpu) { return true; }
static inline bool topology_smt_supported(void) { return false; }
#endif /* !CONFIG_SMP */

static inline void arch_fix_phys_package_id(int num, u32 slot)
+1 −1
Original line number Diff line number Diff line
@@ -2317,7 +2317,7 @@ void __init arch_cpu_finalize_init(void)
	 * identify_boot_cpu() initialized SMT support information, let the
	 * core code know.
	 */
	cpu_smt_check_topology();
	cpu_smt_set_num_threads(smp_num_siblings, smp_num_siblings);

	if (!IS_ENABLED(CONFIG_SMP)) {
		pr_info("CPU: ");
+0 −8
Original line number Diff line number Diff line
@@ -326,14 +326,6 @@ static void notrace start_secondary(void *unused)
	cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}

/**
 * topology_smt_supported - Check whether SMT is supported by the CPUs
 */
bool topology_smt_supported(void)
{
	return smp_num_siblings > 1;
}

/**
 * topology_phys_to_logical_pkg - Map a physical package id to a logical
 * @phys_pkg:	The physical package id to map
Loading