Subject: Re: [PATCH v7 1/4] cpu/SMT: Provide a default topology_is_primary_thread()

From: Thomas Gleixner <[email-masked]>
Date: Fri, 01 Nov 2024 10:31:37 +0100

On Fri, Nov 01 2024 at 11:18, Yicong Yang wrote:
> On 2024/10/31 21:33, Thomas Gleixner wrote:
>> cpu_smt_control is not guaranteed to have CPU_SMT_ENABLED state, so this
>> argument is bogus.
>> 
> sorry for didn't explain all the cases here.
>
> For cpu_sm_control == {CPU_SMT_ENABLED, CPU_SMT_NOT_SUPPORTED, CPU_SMT_NOT_IMPLEMENTED},
> all the cpu's bootable and we won't check topology_is_primary_thread().

You don't have to copy the code to me. I'm familiar with it.

All I need is a proper explanation why your topology_is_primary_thread()
implementation is correct under all circumstances.

Thanks,

        tglx