Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp192936lql; Fri, 12 Apr 2024 07:42:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlKn0uA6iIrNPH6oj1vzBdE7dNmeKZVwFEVE21f8eP2swFGDUwhWpg+QtMynyC+KmuarwfImEWZXNwWcO11GaUga2e6qZsV0/io6mWKQ== X-Google-Smtp-Source: AGHT+IHbqfhPbERZR3d3BGaDla2+2/Mt2/mrHvddFa/AfXx8mwVkKOT7A9kkEoX8oBzK3nd3l0bJ X-Received: by 2002:a17:902:6b0b:b0:1e2:6bcd:e64e with SMTP id o11-20020a1709026b0b00b001e26bcde64emr2179745plk.16.1712932979198; Fri, 12 Apr 2024 07:42:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712932979; cv=pass; d=google.com; s=arc-20160816; b=SXfHl4zDTngoZO9KyskpUGEoRHofDMlDDBD+H9pYPE6gbGDJ+BEhH/0/xwhw7D7WT/ 3y7J4uc3+rrOwhQ9CX3F6st918vPHK50N9hUYz3M5fhhULIF90mVFKvwLvlX1Wti8eR7 /fuLYf95A96VcEzYYgKYiGk086XcNPy/rcGoeF88jR2Um4a0fS1RmtTVDZ0aWAj3grc3 Df/nu81pZCAgjIywFQCgL580gTOfgV2ngDf3KElNwhvmGDk7WbjWK+mQYAgwDdcvPwbx +3Bc4qL1lKHjVKL67U2+cR6FVWXyMMQftUXj4jz1TeKZsD/6JFutb80o97IAwR0sa68v FAKg== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=J5s1MleMP/AhM84zksayeQDNPDEFZsLLde6RdA/c0FA=; fh=8XQHdFtte3XOHSEIytMgmfctfSZlTmw2q6RqB5HTTCI=; b=Zp8HExmR52eyKg+uJxaOl3Kzgu+euabFNIL7lI2dfTrPbyZLMv212rgkbjI6kYwVZh TDF+F33bzlHJmUu4xjlMhOJeWBhE9JV0aEt490IQ60QXzAd/XGxvNjxuN6qjdQghhuh8 rUof8qwUF06mOLtejjd2vDkrQ6UHWdTy5Ye+xH/Xbjg0/if74hRejpLxdM8jm9hamCpx i28rOJuho3yaKLRk4yG7boTzx/PMHvL8Tkyq/CydTGOFE1qK8/RD6Td20PFtEw8EbYXC SGKzLYp6iocvwseTVu3c39qbX+NkeFZNoXCiCYUwingUfiu+6KOPecwezcmzhDHKHNYG ZjXQ==; 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-142863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lq16-20020a170903145000b001e4fffdf93asi3435344plb.131.2024.04.12.07.42.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 07:42:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::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-142863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142863-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8E09E2828F0 for ; Fri, 12 Apr 2024 14:42:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 432A9143892; Fri, 12 Apr 2024 14:42:29 +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 08DBB1422D9; Fri, 12 Apr 2024 14:42:25 +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=1712932948; cv=none; b=P/lUp7pWl+iWK9H+Iwn6Xof6dShuLztQeQ3paOKiryShBMbd/FdtJO3qXoL8ljTekN0oBw14YWjlcJbde0X8UT+mNd2/6+3RSQOGZP6nTCRdnHX8SxDsnPmGy0T6ImHftEVvr+mUGV8S2+aGeN9KnC4qv657pxWFe0J5jtCqN+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712932948; c=relaxed/simple; bh=2GdqiP0JC/ghCLdQfEGwLcBG/F3i4l8nIw33SDUmodY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d5168pEcVKRQLA57yzjp66FEJouMiMKdxqvUpzVqQRpp+lZJNth72IjNbwEKjJvFNDd0KDBW1D12COIuZG/J3YmjCTHpqoPgwtGwP+GQRsBxFb8Dg0gxeZI53Kw821ciy8do2wuEgD5ZcITTPM5BhkXT4UktUbQ1KtQm9KUZqBQ= 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.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VGK0Y3rFyz6K8wp; Fri, 12 Apr 2024 22:37:33 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id E15E81402CD; Fri, 12 Apr 2024 22:42:23 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) 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; Fri, 12 Apr 2024 15:42:23 +0100 From: Jonathan Cameron To: , , , , , , , , Russell King , "Rafael J . Wysocki" , Miguel Luis , James Morse , Salil Mehta , Jean-Philippe Brucker , Catalin Marinas , Will Deacon CC: , , Subject: [PATCH v5 10/18] ACPI: Warn when the present bit changes but the feature is not enabled Date: Fri, 12 Apr 2024 15:37:11 +0100 Message-ID: <20240412143719.11398-11-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240412143719.11398-1-Jonathan.Cameron@huawei.com> References: <20240412143719.11398-1-Jonathan.Cameron@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) From: James Morse ACPI firmware can trigger the events to add and remove CPUs, but the OS may not support this. Print an error message 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 Reviewed-by: Gavin Shan Tested-by: Miguel Luis Tested-by: Vishnu Pajjuri Tested-by: Jianyong Wu Signed-off-by: Russell King (Oracle) Signed-off-by: Jonathan Cameron --- v5: No change --- 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 0403eddb3f80..3fb167ee9807 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -187,8 +187,10 @@ static int acpi_processor_make_present(struct acpi_processor *pr) { int ret; - if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_CPU)) + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_CPU)) { + pr_err_once("Changing CPU present bit is not supported\n"); return -ENODEV; + } if (invalid_phys_cpuid(pr->phys_id)) return -ENODEV; @@ -466,8 +468,10 @@ static void acpi_processor_make_not_present(struct acpi_device *device) { struct acpi_processor *pr; - if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_CPU)) + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_CPU)) { + pr_err_once("Changing CPU present bit is not supported"); return; + } pr = acpi_driver_data(device); if (pr->id >= nr_cpu_ids) -- 2.39.2