Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp25161lqg; Wed, 10 Apr 2024 14:08:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGKx5dQx040YlDnsLTPwGHb/vx3LE+ObWhez2Ak33kyf8Ekwk6IqkIt19PhvzTUFc11oC3QhcKOwjFHA+6PVn6ImE5J56N8BiLEtxXdQ== X-Google-Smtp-Source: AGHT+IGQAVE38CCuRHgyzWEUW6xtepLJ5hgzIYseeUWZAVnGzsU+XeBMusm/nYNp9T3abhnmgIUj X-Received: by 2002:ac8:4984:0:b0:434:ff20:d30e with SMTP id f4-20020ac84984000000b00434ff20d30emr3540993qtq.9.1712783308899; Wed, 10 Apr 2024 14:08:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712783308; cv=pass; d=google.com; s=arc-20160816; b=uuDVl6I3UAWNs15TuO6xddmywTcaDDSHBpdcXzUdXGrOv0FAPdJP39rRdlxVy467mP ifOXR7eoPNwfKYK6QhzHE3yLRXIZIOYZ+gJAB8Ssn5ehm0EUOE+u03RrqIZApbGFgEKt 0bJNpXHoUqAOzV1J0BmLvXcC3iwID8K65hrKWiH2ukqAOPtrQLqdGB8v/qnBF0Dqd+LB QHLbV6hsvj2QIeEEj6bueaaSTvdG1Z12unD4appfo0+0mBsXJ93Drqw1Oyk7/aho1dv+ NT0WGxkDo+0DrBLTHpifZ8llO25urh1lOS3D5tYQAgzDtlwNcKnOY2wYJOmHNdUDKOWO dlAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=SR1t9d3b+u5CJBsxntcpxz79kFt4ZCweznGzANwpiTI=; fh=mwbdysWItu4icNREfcmV+ekP4RkMToHdHJjaC6vuAoY=; b=n9gnWLD6j+/37ZnDUS84cIlfyvAUtd3KRU7eNLwzdS2oxJXC+MC6/3MttH17irFu0t Eg8jPZPaYpPlZb5TyKVaf9URb0rht9hmhYc77N4iJPO9vNM0YHpl10cywFKTqnLPuNoF xtk6hykBFCmo6McFVhBzmMxxz+XMOA8IZAVpuXwhbcIl2x4BU2zOP8ask0NVqbrdp0Fe ardDzln9Xzhc1RP5piYr/xeKbLduAVQPs2oVpUd5Z0YIz7c0xQo8tin8Fn0AgtMj0TNo s0uyhEXRzycAFtnveWJGWW3mP30Inwo5/HbTB5VbXPbc7uePTuOc5tXOFmFpXLFzuX/n NhnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-139349-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139349-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p13-20020a05622a048d00b004347a939d99si33927qtx.346.2024.04.10.14.08.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 14:08:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139349-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-139349-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139349-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6B34B1C2465D for ; Wed, 10 Apr 2024 21:07:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9A611836D8; Wed, 10 Apr 2024 21:07:21 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 C0CA7181CFD; Wed, 10 Apr 2024 21:07:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712783241; cv=none; b=VQ6IksTT8/O8xAil77IXR4m/+ESi/umn+EX3uVLFwxx0C3ydccgyWryGMcm/YINH394pJbg/krcq+ky9AWBvnl5DQkvgvTpQYR+8lkamfJI77YxVaPdcbJLq4qYe84IxM6TWotHgBQx44pIUoCaZFWZkffYNrvJEszYwijyOdtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712783241; c=relaxed/simple; bh=WUkQx3MHNfpPK223Za2QnwYdPQf2mwT7iuWRCuTCPQM=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mLN/P1nqVz2HkBVi+OS6NK976bTyLo8RMRsOuNHvo54V4kq39PcVNIAHjkfffgizcF9rMNmfOaetlVp1CH9JU6MUSkinlmGf70QTspUEKWJKKDH8s2/cy2IWPJlom1bqE0ejPQqeJxVmwVKUn3gupbooCV/Zfn/oSFLCfHAAYwk= 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; arc=none smtp.client-ip=185.176.79.56 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 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VFFjC372rz6K6DM; Thu, 11 Apr 2024 05:05:35 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 403711402C7; Thu, 11 Apr 2024 05:07:14 +0800 (CST) Received: from localhost (10.126.168.81) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 10 Apr 2024 22:07:13 +0100 Date: Wed, 10 Apr 2024 22:07:12 +0100 From: Jonathan Cameron To: "Rafael J. Wysocki" CC: "Russell King (Oracle)" , , , , , , , , , , , , , , , Salil Mehta , Jean-Philippe Brucker , , , James Morse , Miguel Luis Subject: Re: [PATCH RFC v4 02/15] ACPI: processor: Register all CPUs from acpi_processor_get_info() Message-ID: <20240410220712.0000726f@Huawei.com> In-Reply-To: References: <20240322185327.00002416@Huawei.com> <20240410134318.0000193c@huawei.com> <20240410145005.00003050@Huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: lhrpeml500002.china.huawei.com (7.191.160.78) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 10 Apr 2024 21:08:06 +0200 "Rafael J. Wysocki" wrote: > On Wed, Apr 10, 2024 at 8:56=E2=80=AFPM Russell King (Oracle) > wrote: > > > > On Wed, Apr 10, 2024 at 02:50:05PM +0100, Jonathan Cameron wrote: =20 > > > If we get rid of this catch all, solution would be to move the > > > !acpi_disabled check into the arm64 version of arch_cpu_register() > > > because we would only want the delayed registration path to be > > > used on ACPI cases where the question of CPU availability can't > > > yet be resolved. =20 > > > > Aren't we then needing two arch_register_cpu() implementations? > > I'm assuming that you're suggesting that the !acpi_disabled, then > > do nothing check is moved into arch_register_cpu() - or to put it > > another way, arch_register_cpu() does nothing if ACPI is enabled. > > > > If arch_register_cpu() does nothing if ACPI is enabled, how do > > CPUs get registered (and sysfs files get created to control them) > > on ACPI systems? ACPI wouldn't be able to call arch_register_cpu(), > > so I suspect you'll need an ACPI-specific version of this function. =20 >=20 > arch_register_cpu() will do what it does, but it will check (upfront) > if ACPI is enabled and if so, if the ACPI Namespace is available. In > the case when ACPI is enabled and the ACPI Namespace is not ready, it > will return -EPROBE_DEFER (say). Exactly. I oversimplified and wasn't clear enough. The check is there in the arch_register_cpu() and is one of the ways that function can decide to actually register the cpu but not the only one. I think we may later want to consider breaking it into 2 arch calls (check if ready to register + register) to reduce code duplication in with the hotplug path where there is a little extra to do inbetween. Hopefully that can wait though. Jonathan