Message ID | 20230203135043.409192-20-james.morse@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp865847wrn; Fri, 3 Feb 2023 06:22:17 -0800 (PST) X-Google-Smtp-Source: AK7set+mBa/STV0zd9rmwkTBhhNElQK1UaQEQuowbg3BIqDZw3/Y6Gcim1mIEcCeOIMC80BifhPY X-Received: by 2002:a17:907:7ba9:b0:87b:d3dd:e0ca with SMTP id ne41-20020a1709077ba900b0087bd3dde0camr2385490ejc.26.1675434137122; Fri, 03 Feb 2023 06:22:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675434137; cv=none; d=google.com; s=arc-20160816; b=pDbLDHiBqZPjEYD0Exhi7LAw9HSYEiew+CsjcXZBITDSzO17/ZBVL9CAUrD8jQ6i7Y OB3z4hiLBqja0Hs6syLsbPgtSy/aN68spYDvrvuWRZ7v5nR9HAvNebKIG2W8H5bSiAwz Fegp7ENvuth/3E/hI4//rUtrPP+ABKs3SygWRkxDSW0+H6vstCOqqzF1iudIMbiPl82I nzYjZh5kL+wwF88b9BFrcmLsifoZRebybCF9QpIEiJGlSmOz5hlwSCDJM0qubgLjKGRp rAj0r0V+l9rUdvUASMAVZyqrodpLqXgWUQHJTzde9LKO0ellIG3IMD/yOng38+/1Suit pHxQ== 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=eIV1ErOXrfYinJDpW4z4heye67htdtjTZUoGoM3fed0=; b=xEUur5jvFUDWDLr9SsrJ5EClaCJImmu4187eHVLK31aDs0zSsYNgqvf7Xqf9nOVLUK ORFS9U5iMCH+i2AMkq5CbewZ4n0ALdsGoWmb1ML3a30iNIkaMuY06g3ljFbg83LuZmuF EBamvw6SxdW+jAJlhQtXTmxi6JhVAKu3kH6OKLohbQg/MfwmU4Q87HhteAkbv0HZH5cZ NirqjpVDiE6ikOsgXf7lv8w4mAoZbuaSJNyfts2T+zhSdRSwtFWAvA4AkwmMlE4FOIqh rL+Golk+TJRvFnEQJ48WadVOozmlFXsLdpdV3OnJEI4RITf0x6xT7ohDG2XO+gEjgd1i yihA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf7-20020a170906c50700b008845c66840esi2398233ejb.185.2023.02.03.06.21.52; Fri, 03 Feb 2023 06:22:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233666AbjBCOGD (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Fri, 3 Feb 2023 09:06:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233948AbjBCOFP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Feb 2023 09:05:15 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 26B32A58FB; Fri, 3 Feb 2023 06:02:41 -0800 (PST) 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 10775165C; Fri, 3 Feb 2023 05:53:56 -0800 (PST) Received: from eglon.cambridge.arm.com (eglon.cambridge.arm.com [10.1.196.177]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 429563F71E; Fri, 3 Feb 2023 05:53:10 -0800 (PST) From: James Morse <james.morse@arm.com> To: linux-pm@vger.kernel.org, loongarch@lists.linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org Cc: Marc Zyngier <maz@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Sudeep Holla <sudeep.holla@arm.com>, Borislav Petkov <bp@alien8.de>, H Peter Anvin <hpa@zytor.com>, Dave Hansen <dave.hansen@linux.intel.com>, Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Huacai Chen <chenhuacai@kernel.org>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Oliver Upton <oliver.upton@linux.dev>, Len Brown <lenb@kernel.org>, Rafael Wysocki <rafael@kernel.org>, WANG Xuerui <kernel@xen0n.name>, Salil Mehta <salil.mehta@huawei.com>, Russell King <linux@armlinux.org.uk>, Jean-Philippe Brucker <jean-philippe@linaro.org> Subject: [RFC PATCH 19/32] ACPI: Warn when the present bit changes but the feature is not enabled Date: Fri, 3 Feb 2023 13:50:30 +0000 Message-Id: <20230203135043.409192-20-james.morse@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230203135043.409192-1-james.morse@arm.com> References: <20230203135043.409192-1-james.morse@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756820025944337688?= X-GMAIL-MSGID: =?utf-8?q?1756820025944337688?= |
Series |
ACPI/arm64: add support for virtual cpuhotplug
|
|
Commit Message
James Morse
Feb. 3, 2023, 1:50 p.m. UTC
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 <james.morse@arm.com>
---
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 e6419b06cb37..572a12672c0e 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -155,8 +155,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; @@ -414,8 +416,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)