Message ID | 20230913163823.7880-14-james.morse@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp1220018vqx; Wed, 13 Sep 2023 09:51:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHo52ZH4FJHr7HNkFu0mQuE2A8Rtkuy4Nd/YgzgkNi/FcOaJVKc6anmQvjx/vDkYFWtiMi X-Received: by 2002:a05:6a00:851:b0:68e:2d59:b1f3 with SMTP id q17-20020a056a00085100b0068e2d59b1f3mr3814542pfk.13.1694623895884; Wed, 13 Sep 2023 09:51:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694623895; cv=none; d=google.com; s=arc-20160816; b=XimZmnae+KG65lIPiBLHmgz8YP2MXVLeWoYk48vAjzpeH1/khktG2ifa5bM/nzWEGJ YB6boNEh/zRLUGpM4ePPOsW6fPYjCAKmukFe/Qns0eXGxh+E0JhqZ4nEHXIhdBolItdj /TGbcRScFINBKrvsuzygQyLpR225WaV22JPLLRwEN1m4QAFHPmPrYuBlPcMdnIO9nTte a1L1PzvN1KK4YHzYZzfhgmp35cyJ5Fh4es0UJD9vHZV6CNY9c/5GbBR4U4depP9L2CO2 Pp2QdaAazroTy+BDayiQVIO6yMhdSXPcjueV9RyDgFIJYVBxguotcIcnMKd4wamimQZA 17UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=joyA2RRgDbhuge5sGDyMojCf87Sw8Bpxtzby5XkXThk=; fh=2nhVWB0fZ+8YH0lLFpnF/Mo8eq+n1VMLe+b+IpvS0g0=; b=Q/b2+3z31C+RcDFH+4RZ6obzWga8C9vd4BFs9z/fQweHAKPkSSHZQHlOERVifXsnPj ahCx+7Ex6PQWwVjjl5M/MhES2/RxnnIWMCrLCyF/PPN/6KJM2Olo96et7E03olFIzkdH Dwgo4IPVki4UilD0d05HiGHimdgPf7xNl8v3YeZTJHlHQRGc9YBmF3mW6LENXccxv9at FdZh3sJlmGeaBuA2QkdsOIsVeW22ev2L+D/ulEQpmy9eRtvTNw/Fx2Y7choRc/Ck5IX/ vCHmqe0DVQAB3BmWoX53qhgIzhT1N0v32XqIvR3WaqGLMzF3loK8WAR5fR9qLziorSEm Kqhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id k189-20020a6384c6000000b00565f4fb0999si9939413pgd.610.2023.09.13.09.51.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 09:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2A21F81142C1; Wed, 13 Sep 2023 09:40:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230400AbjIMQkI (ORCPT <rfc822;pwkd43@gmail.com> + 35 others); Wed, 13 Sep 2023 12:40:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbjIMQjk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Sep 2023 12:39:40 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B1432106; Wed, 13 Sep 2023 09:39:19 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3A2C21FB; Wed, 13 Sep 2023 09:39:56 -0700 (PDT) Received: from merodach.members.linode.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3F3BD3F5A1; Wed, 13 Sep 2023 09:39:17 -0700 (PDT) From: James Morse <james.morse@arm.com> To: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kvmarm@lists.linux.dev Cc: x86@kernel.org, Salil Mehta <salil.mehta@huawei.com>, Russell King <linux@armlinux.org.uk>, Jean-Philippe Brucker <jean-philippe@linaro.org>, jianyong.wu@arm.com, justin.he@arm.com Subject: [RFC PATCH v2 13/35] ACPI: Rename acpi_scan_device_not_present() to be about enumeration Date: Wed, 13 Sep 2023 16:38:01 +0000 Message-Id: <20230913163823.7880-14-james.morse@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230913163823.7880-1-james.morse@arm.com> References: <20230913163823.7880-1-james.morse@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 13 Sep 2023 09:40:25 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776941946267850529 X-GMAIL-MSGID: 1776941946267850529 |
Series |
ACPI/arm64: add support for virtual cpuhotplug
|
|
Commit Message
James Morse
Sept. 13, 2023, 4:38 p.m. UTC
acpi_scan_device_not_present() is called when a device in the
hierarchy is not available for enumeration. Historically enumeration
was only based on whether the device was present.
To add support for only enumerating devices that are both present
and enabled, this helper should be renamed. It was only ever about
enumeration, rename it acpi_scan_device_not_enumerated().
No change in behaviour is intended.
Signed-off-by: James Morse <james.morse@arm.com>
---
drivers/acpi/scan.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On 9/14/23 02:38, James Morse wrote: > acpi_scan_device_not_present() is called when a device in the > hierarchy is not available for enumeration. Historically enumeration > was only based on whether the device was present. > > To add support for only enumerating devices that are both present > and enabled, this helper should be renamed. It was only ever about > enumeration, rename it acpi_scan_device_not_enumerated(). > > No change in behaviour is intended. > > Signed-off-by: James Morse <james.morse@arm.com> > --- > drivers/acpi/scan.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Gavin Shan <gshan@redhat.com> > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > index ed01e19514ef..17ab875a7d4e 100644 > --- a/drivers/acpi/scan.c > +++ b/drivers/acpi/scan.c > @@ -289,10 +289,10 @@ static int acpi_scan_hot_remove(struct acpi_device *device) > return 0; > } > > -static int acpi_scan_device_not_present(struct acpi_device *adev) > +static int acpi_scan_device_not_enumerated(struct acpi_device *adev) > { > if (!acpi_device_enumerated(adev)) { > - dev_warn(&adev->dev, "Still not present\n"); > + dev_warn(&adev->dev, "Still not enumerated\n"); > return -EALREADY; > } > acpi_bus_trim(adev); > @@ -327,7 +327,7 @@ static int acpi_scan_device_check(struct acpi_device *adev) > error = -ENODEV; > } > } else { > - error = acpi_scan_device_not_present(adev); > + error = acpi_scan_device_not_enumerated(adev); > } > return error; > } > @@ -339,7 +339,7 @@ static int acpi_scan_bus_check(struct acpi_device *adev, void *not_used) > > acpi_bus_get_status(adev); > if (!acpi_device_is_present(adev)) { > - acpi_scan_device_not_present(adev); > + acpi_scan_device_not_enumerated(adev); > return 0; > } > if (handler && handler->hotplug.scan_dependent) Thanks, Gavin
On Wed, Sep 13, 2023 at 04:38:01PM +0000, James Morse wrote: > acpi_scan_device_not_present() is called when a device in the > hierarchy is not available for enumeration. Historically enumeration > was only based on whether the device was present. > > To add support for only enumerating devices that are both present > and enabled, this helper should be renamed. It was only ever about > enumeration, rename it acpi_scan_device_not_enumerated(). > > No change in behaviour is intended. > > Signed-off-by: James Morse <james.morse@arm.com> Is this another patch which ought to be submitted without waiting for the rest of the series? Thanks.
On Fri, 20 Oct 2023 17:01:30 +0100 "Russell King (Oracle)" <linux@armlinux.org.uk> wrote: > On Wed, Sep 13, 2023 at 04:38:01PM +0000, James Morse wrote: > > acpi_scan_device_not_present() is called when a device in the > > hierarchy is not available for enumeration. Historically enumeration > > was only based on whether the device was present. > > > > To add support for only enumerating devices that are both present > > and enabled, this helper should be renamed. It was only ever about > > enumeration, rename it acpi_scan_device_not_enumerated(). > > > > No change in behaviour is intended. > > > > Signed-off-by: James Morse <james.morse@arm.com> > > Is this another patch which ought to be submitted without waiting > for the rest of the series? > > Thanks. > Looks like a valid standalone change to me.
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index ed01e19514ef..17ab875a7d4e 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -289,10 +289,10 @@ static int acpi_scan_hot_remove(struct acpi_device *device) return 0; } -static int acpi_scan_device_not_present(struct acpi_device *adev) +static int acpi_scan_device_not_enumerated(struct acpi_device *adev) { if (!acpi_device_enumerated(adev)) { - dev_warn(&adev->dev, "Still not present\n"); + dev_warn(&adev->dev, "Still not enumerated\n"); return -EALREADY; } acpi_bus_trim(adev); @@ -327,7 +327,7 @@ static int acpi_scan_device_check(struct acpi_device *adev) error = -ENODEV; } } else { - error = acpi_scan_device_not_present(adev); + error = acpi_scan_device_not_enumerated(adev); } return error; } @@ -339,7 +339,7 @@ static int acpi_scan_bus_check(struct acpi_device *adev, void *not_used) acpi_bus_get_status(adev); if (!acpi_device_is_present(adev)) { - acpi_scan_device_not_present(adev); + acpi_scan_device_not_enumerated(adev); return 0; } if (handler && handler->hotplug.scan_dependent)