Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jinjie Ruan <ruanjinjie@huawei.com>
To: Will Deacon <will@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>
Cc: <punit.agrawal@oss.qualcomm.com>, <rafael.j.wysocki@intel.com>,
	<fengchengwen@huawei.com>, <chenl311@chinatelecom.cn>,
	<suzuki.poulose@arm.com>, <maz@kernel.org>,
	<timothy.hayes@arm.com>, <lpieralisi@kernel.org>,
	<mrigendra.chaubey@gmail.com>, <arnd@arndb.de>,
	<sudeep.holla@kernel.org>, <yangyicong@hisilicon.com>,
	<jic23@kernel.org>, <pierre.gondois@arm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <james.morse@arm.com>
Subject: Re: [PATCH v2] cpu/hotplug: Fix NULL kobject warning in cpuhp_smt_enable()
Date: Tue, 19 May 2026 20:56:18 +0800	[thread overview]
Message-ID: <0079639f-5ea4-4aea-b002-e13750f87d87@huawei.com> (raw)
In-Reply-To: <agxcF1bzmErb_lB9@willie-the-truck>



On 5/19/2026 8:48 PM, Will Deacon wrote:
> On Mon, May 11, 2026 at 06:37:21PM +0100, Catalin Marinas wrote:
>> On Mon, Apr 27, 2026 at 10:35:07AM +0800, Jinjie Ruan wrote:
>>> On arm64, when booting with `maxcpus` greater than the number of present
>>> CPUs (e.g., QEMU -smp cpus=4,maxcpus=8), some CPUs are marked as 'present'
>>> but have not yet been registered via register_cpu(). Consequently,
>>> the per-cpu device objects for these CPUs are not yet initialized.
>> [...]
>>> Fix this by:
>>>
>>> 1. When booting with ACPI, checking the ACPI_MADT_ENABLED flag in the GICC
>>>    entry before calling set_cpu_present() during SMP initialization.
>>>
>>> 2. Properly managing the present mask in acpi_map_cpu() and
>>>    acpi_unmap_cpu() to support actual CPU hotplug events, This aligns with
>>>    other architectures like x86 and LoongArch.
>>
>> I had a chat with James earlier and IIUC the decision was to mark all
>> CPUs present and the GIC must be fully initialised. But digging through
>> the GICv3 code, I don't see it depending on cpu_present_mask but rather
>> on the "always on" MADT GICR description. So I think it should be safe
>> as long as we don't rely on the GICC gicr_base_address. But we should
>> update Documentation/arch/arm64/cpu-hotplug.rst to no longer state that
>> all online-capable vCPUs are marked as present by the kernel.
>>
>> (or maybe I misunderstood all this)
> 
> Jinjie, do you plan to respin with a documentation update as per
> Catalin's comment above?

Ah, sorry, I will definitely include this change in the next version soon.

Thanks,
Jinjie

> 
> Will
> 



      reply	other threads:[~2026-05-19 12:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27  2:35 [PATCH v2] cpu/hotplug: Fix NULL kobject warning in cpuhp_smt_enable() Jinjie Ruan
2026-05-11  3:17 ` Jinjie Ruan
2026-05-11  9:55   ` Catalin Marinas
2026-05-11 17:37 ` Catalin Marinas
2026-05-19 12:48   ` Will Deacon
2026-05-19 12:56     ` Jinjie Ruan [this message]

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=0079639f-5ea4-4aea-b002-e13750f87d87@huawei.com \
    --to=ruanjinjie@huawei.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=chenl311@chinatelecom.cn \
    --cc=fengchengwen@huawei.com \
    --cc=james.morse@arm.com \
    --cc=jic23@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=maz@kernel.org \
    --cc=mrigendra.chaubey@gmail.com \
    --cc=pierre.gondois@arm.com \
    --cc=punit.agrawal@oss.qualcomm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sudeep.holla@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=timothy.hayes@arm.com \
    --cc=will@kernel.org \
    --cc=yangyicong@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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