[PATCH v5 1/4] cpu/SMT: Provide a default topology_is_primary_thread()

Dietmar Eggemann dietmar.eggemann at arm.com
Sat Aug 17 01:54:39 AEST 2024


On 06/08/2024 10:53, Yicong Yang wrote:
> From: Yicong Yang <yangyicong at hisilicon.com>
> 
> Currently if architectures want to support HOTPLUG_SMT they need to
> provide a topology_is_primary_thread() telling the framework which
> thread in the SMT cannot offline. However arm64 doesn't have a
> restriction on which thread in the SMT cannot offline, a simplest
> choice is that just make 1st thread as the "primary" thread. So
> just make this as the default implementation in the framework and
> let architectures like x86 that have special primary thread to
> override this function.

IMHO, ARM64 (/ARM), RISCV and PARISC (SMP) use GENERIC_ARCH_TOPOLOGY
(and drivers/base/arch_topology.c) so they could share
topology_is_primary_thread() also there?

[...]



More information about the Linuxppc-dev mailing list