From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout04.his.huawei.com (canpmsgout04.his.huawei.com [113.46.200.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E7FD35201A for ; Tue, 19 May 2026 12:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779195385; cv=none; b=PbHQFls2F2rhU+oK0epRnuXzXM6MXZVel8AL87qx8Kpuj+k1RsQuMF6qFLc9jBV/I30tj3jZvx0UiOU++i+m8OvMy3swXf3Wc09fGKXeXUCFpN4X1v59/4zc46z53YLAN8KVP0eKaDpzcJJbAMfGRTiOt03bAoWS2tEStS+ij48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779195385; c=relaxed/simple; bh=Mb8FMnYx1gZrkkTmrg0xWSnjN98MnD5ug5xhOkuOjQs=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=BKqKD6CjOWFW19d5BqUSe/KvK0CrsR/xJVd/plXmNnNK6yQ4J2vJtKVYSqdIl1Zj9VuVwoV9Fzp2MojBYcEDf7eORTpPr8i1A+eZW08HXtIIKqfSk6h+VeRaAoayKeO3XbE93Piwm1Aerd3qaUCy7GW7ro52FwVVl7N9MKJH2Tk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=fLORaE3u; arc=none smtp.client-ip=113.46.200.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="fLORaE3u" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=V1JT7VQxeL29+vLf+spih2BhEkD13clNDfsZcECdHjA=; b=fLORaE3ui0SETO+3P7jPPcdwEnnI4636J27EEqplAndJr2kkh+uspS5QFm1zz/eBqpN/c0ci5 eMcTdD1RsmcD0FUrdpeBfoSEWbmhfZ75wvpwDufMmFE4OjhkIJZ8AzMKC3gFOs+HVT76dUvLlJl mBoc1ueH5w7yy9eyWG7AsAQ= Received: from mail.maildlp.com (unknown [172.19.163.104]) by canpmsgout04.his.huawei.com (SkyGuard) with ESMTPS id 4gKZGr3P5xz1prLY; Tue, 19 May 2026 20:48:36 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id D20CC4048F; Tue, 19 May 2026 20:56:19 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by dggpemf500011.china.huawei.com (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 19 May 2026 20:56:18 +0800 Message-ID: <0079639f-5ea4-4aea-b002-e13750f87d87@huawei.com> Date: Tue, 19 May 2026 20:56:18 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] cpu/hotplug: Fix NULL kobject warning in cpuhp_smt_enable() To: Will Deacon , Catalin Marinas CC: , , , , , , , , , , , , , , , , References: <20260427023507.1247418-1-ruanjinjie@huawei.com> From: Jinjie Ruan In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To dggpemf500011.china.huawei.com (7.185.36.131) 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 >