public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix•de>
To: Yicong Yang <yangyicong@huawei•com>,
	catalin.marinas@arm•com, will@kernel•org, sudeep.holla@arm•com,
	peterz@infradead•org, mpe@ellerman•id.au,
	linux-arm-kernel@lists•infradead.org, mingo@redhat•com,
	bp@alien8•de, dave.hansen@linux•intel.com,
	pierre.gondois@arm•com, dietmar.eggemann@arm•com
Cc: linuxppc-dev@lists•ozlabs.org, x86@kernel•org,
	linux-kernel@vger•kernel.org, morten.rasmussen@arm•com,
	msuchanek@suse•de, gregkh@linuxfoundation•org, rafael@kernel•org,
	jonathan.cameron@huawei•com, prime.zeng@hisilicon•com,
	linuxarm@huawei•com, yangyicong@hisilicon•com, xuwei5@huawei•com,
	guohanjun@huawei•com
Subject: Re: [PATCH v7 1/4] cpu/SMT: Provide a default topology_is_primary_thread()
Date: Wed, 30 Oct 2024 15:55:17 +0100	[thread overview]
Message-ID: <87ttcty71m.ffs@tglx> (raw)
In-Reply-To: <20241030125415.18994-2-yangyicong@huawei.com>

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


  reply	other threads:[~2024-10-30 14:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 12:54 [PATCH v7 0/4] Support SMT control on arm64 Yicong Yang
2024-10-30 12:54 ` [PATCH v7 1/4] cpu/SMT: Provide a default topology_is_primary_thread() Yicong Yang
2024-10-30 14:55   ` Thomas Gleixner [this message]
2024-10-31 12:17     ` Yicong Yang
2024-10-31 13:33       ` Thomas Gleixner
2024-11-01  3:18         ` Yicong Yang
2024-11-01  9:31           ` Thomas Gleixner
2024-11-07 17:20       ` Pierre Gondois
2024-10-30 12:54 ` [PATCH v7 2/4] arch_topology: Support SMT control for OF based system Yicong Yang
2024-10-30 12:54 ` [PATCH v7 3/4] arm64: topology: Support SMT control on ACPI " Yicong Yang
2024-11-07 17:20   ` Pierre Gondois
2024-11-08  8:06     ` Yicong Yang
2024-10-30 12:54 ` [PATCH v7 4/4] arm64: Kconfig: Enable HOTPLUG_SMT Yicong Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttcty71m.ffs@tglx \
    --to=tglx@linutronix$(echo .)de \
    --cc=bp@alien8$(echo .)de \
    --cc=catalin.marinas@arm$(echo .)com \
    --cc=dave.hansen@linux$(echo .)intel.com \
    --cc=dietmar.eggemann@arm$(echo .)com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=guohanjun@huawei$(echo .)com \
    --cc=jonathan.cameron@huawei$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxarm@huawei$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mingo@redhat$(echo .)com \
    --cc=morten.rasmussen@arm$(echo .)com \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=msuchanek@suse$(echo .)de \
    --cc=peterz@infradead$(echo .)org \
    --cc=pierre.gondois@arm$(echo .)com \
    --cc=prime.zeng@hisilicon$(echo .)com \
    --cc=rafael@kernel$(echo .)org \
    --cc=sudeep.holla@arm$(echo .)com \
    --cc=will@kernel$(echo .)org \
    --cc=x86@kernel$(echo .)org \
    --cc=xuwei5@huawei$(echo .)com \
    --cc=yangyicong@hisilicon$(echo .)com \
    --cc=yangyicong@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox