Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3951275rdb; Thu, 14 Sep 2023 07:37:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEdkBJHglIYyAIp/M2QvC9oqYcCjWSekEfHTlDOB1ln3DQWfAAobKdXKHPvBK/nWZsEV7jN X-Received: by 2002:a17:902:c106:b0:1bd:c6ca:e0db with SMTP id 6-20020a170902c10600b001bdc6cae0dbmr5590340pli.37.1694702267935; Thu, 14 Sep 2023 07:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694702267; cv=none; d=google.com; s=arc-20160816; b=dUKl1rZg48m7jXv8u5N5GA0tPVaf/TllTluKXAd8yJlpw2asLm4vrX2f6cpb0KpQl3 Kgy5awbQPNh/R41RD9cV4xBbCect868/9jbqsEU7tGTLTOpFuCLfP1nmBz1SWK9G4tF+ 78BsHRAK7/6RRkuITi4vF3m+NC0urmlZ847D+2oQMOrpjn3ry+brbEGRoi6+49hUMGRI IC/aQdT3Upu4TmLgt6tVCB8hx1OFv6zQmJOmHUBbeQjEYHrxXVPqNqks1I0KCbYJqk92 mVGaJPHYdna6pTGfhFcEAeDen7s905xX4G7MrJeYvzI8y4Xz4kAUDh8Z+jLsxZuP2o6c 3+6A== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=QTqv3Bxdx8b7azuVTZypMNg5RpIaG2UsjQ6/RUBzVSo=; fh=oO43h3w0Gnh1/uzgjBLTRg+oe1Gv6aFHPIod5z8aS5s=; b=cYhDyVNvXGrZFVQgzoCNuLoF6SHNjp1aonmbtk2T4GNpyj/lV/zI58tMkr0jwj09TT 9Xh+z1KLQtMnNELBprF1y3csJiMP5qyxpk2DgSHUY9MN4XJO5vx4QLVIJggJMLPoSuAA D638L25BR+Gb+Jca8w0dV7euLqmLnmPChJ+yHghLWUlznXhpdJKSHt5cebXtj1TIuH7J azzWkPQvhZg9SEWu8KAWtBTwcB2MCGrxbQmY2dmfPYBXA+qz6IJRkpQ/5+I0Z9HB8Hck dM000x4ZXnvr7i6wapxbNtGeBVUCJ+f9jmLCK33n/CYfJ+E0zmcEqGaoBj0Ygp8qWfDh UVsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id a13-20020a170902eccd00b001b674055d72si1965996plh.621.2023.09.14.07.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 07:37:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 36AA2801CF52; Thu, 14 Sep 2023 07:32:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235945AbjINOcP (ORCPT + 99 others); Thu, 14 Sep 2023 10:32:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231695AbjINOcO (ORCPT ); Thu, 14 Sep 2023 10:32:14 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B79E1A2; Thu, 14 Sep 2023 07:32:10 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RmfmH4clgz67KXG; Thu, 14 Sep 2023 22:27:27 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 14 Sep 2023 15:32:08 +0100 Date: Thu, 14 Sep 2023 15:32:07 +0100 From: Jonathan Cameron To: James Morse CC: , , , , , , , , , Salil Mehta , Russell King , Jean-Philippe Brucker , , Subject: Re: [RFC PATCH v2 23/35] ACPI: Warn when the present bit changes but the feature is not enabled Message-ID: <20230914153207.00006492@Huawei.com> In-Reply-To: <20230913163823.7880-24-james.morse@arm.com> References: <20230913163823.7880-1-james.morse@arm.com> <20230913163823.7880-24-james.morse@arm.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 14 Sep 2023 07:32:19 -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 agentk.vger.email On Wed, 13 Sep 2023 16:38:11 +0000 James Morse wrote: > ACPI firmware can trigger the events to add and remove CPUs, but the > OS may not support this. > > Print a warning when this happens. > > This gives early warning on arm64 systems that don't support > CONFIG_ACPI_HOTPLUG_PRESENT_CPU, as making CPUs not present has > side effects for other parts of the system. > > Signed-off-by: James Morse Seem like a good idea to me. Reviewed-by: Jonathan Cameron > --- > drivers/acpi/acpi_processor.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c > index 2cafea1edc24..b67616079751 100644 > --- a/drivers/acpi/acpi_processor.c > +++ b/drivers/acpi/acpi_processor.c > @@ -188,8 +188,10 @@ static int acpi_processor_make_present(struct acpi_processor *pr) > acpi_status status; > int ret; > > - if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) > + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) { > + pr_err_once("Changing CPU present bit is not supported\n"); > return -ENODEV; > + } > > if (invalid_phys_cpuid(pr->phys_id)) > return -ENODEV; > @@ -462,8 +464,10 @@ static void acpi_processor_make_not_present(struct acpi_device *device) > { > struct acpi_processor *pr; > > - if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) > + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) { > + pr_err_once("Changing CPU present bit is not supported"); > return; > + } > > pr = acpi_driver_data(device); > if (pr->id >= nr_cpu_ids)