[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ttcty71m.ffs@tglx>
Date: Wed, 30 Oct 2024 15:55:17 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Yicong Yang <yangyicong@...wei.com>, catalin.marinas@....com,
will@...nel.org, sudeep.holla@....com, peterz@...radead.org,
mpe@...erman.id.au, linux-arm-kernel@...ts.infradead.org,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
pierre.gondois@....com, dietmar.eggemann@....com
Cc: linuxppc-dev@...ts.ozlabs.org, x86@...nel.org,
linux-kernel@...r.kernel.org, morten.rasmussen@....com, msuchanek@...e.de,
gregkh@...uxfoundation.org, rafael@...nel.org,
jonathan.cameron@...wei.com, prime.zeng@...ilicon.com,
linuxarm@...wei.com, yangyicong@...ilicon.com, xuwei5@...wei.com,
guohanjun@...wei.com
Subject: Re: [PATCH v7 1/4] cpu/SMT: Provide a default
topology_is_primary_thread()
On Wed, Oct 30 2024 at 20:54, Yicong Yang wrote:
>
> +#ifndef topology_is_primary_thread
> +#define topology_is_primary_thread topology_is_primary_thread
Please do not glue defines and functions together w/o a newline in between.
> +static inline bool topology_is_primary_thread(unsigned int cpu)
> +{
> + /*
> + * On SMT hotplug the primary thread of the SMT won't be disabled.
> + * Architectures do have a special primary thread (e.g. x86) need
> + * to override this function. Otherwise just make the first thread
> + * in the SMT as the primary thread.
> + */
> + return cpu == cpumask_first(topology_sibling_cpumask(cpu));
How is that supposed to work? Assume both siblings are offline, then the
sibling mask is empty and you can't boot the CPU anymore.
Thanks,
tglx
Powered by blists - more mailing lists