Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1964074rda; Tue, 24 Oct 2023 08:22:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhLuuhoqa3qC39cywvgHogQYEnknMrj4mi9vTdVNo3aXhWJO4qYhlLFCFZAfPbCBUBv30c X-Received: by 2002:a17:903:230b:b0:1ca:42b:f625 with SMTP id d11-20020a170903230b00b001ca042bf625mr17086527plh.3.1698160971660; Tue, 24 Oct 2023 08:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698160971; cv=none; d=google.com; s=arc-20160816; b=OJ8GrA8EOdBLbOSH8MtgM+ySbwyf3cQFKL1iKoLNu0E4aK/uAQGz3K5xWJJLPy/loV w79ySzNBs6EvZVanvioJqqGApEDNohRjLp7XldttY2XLXj/b4yYb9CarsnpZTdfF1yNN 7e6ws4oMVoa2y3vfa4FmaQT20S6nYNkv1H8/NbnSK6R7MYMXXcy+3ilGRFgLdhjkfxuO 6PzgySdG7iBQmxxS/pMjSdtmwy4B72HUetFoBx3f3oHBt67Q8L9rLO3K32X9jtMhmrnf GJgzOGNwgHWFFoHYPdWSxmtnTxFOYc50sYCoGjSM4P1VuzjQmbOQPCgpEFqaFyUFLs5b vdkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:sender:message-id:content-transfer-encoding :content-disposition:mime-version:subject:cc:to:from:references :in-reply-to:dkim-signature; bh=CNWnC0tTNPuhROu5TZS+GHZycyp85uHcS0xNgApILVE=; fh=SkTV5xOrq7hxTIOggvbIOXu+48dqXijvMNKji0VGfy8=; b=a9nSInyJtnXXFIjrezqcT4LcMMCLlYIiy8bWuTARoi0w8Rg7ddlAAYl7dJnvhEHGif gTs9IFUSlzowry0SRJ7hSm+XiS6rHDzE37gGwv2TCaBsS9e9cIls5QDJOxABiniZCQHz AOGoCl9fZaNS47ecjtji1yP9pEceg8jNtc7tk2z3BsRwMMRtyocosjcy557Fg2vIbu4y B8tkDTcvPSyBCQnzTaWpLZIHC3CVpqxv8xHRJ3rm2CVBR52VbJ7HWij3VA1lBVWQFw/0 TikupT30rLaoIZ5RtEymZMJMekWlR+XV9ZyIAtHFQTXKcohds2sqrVrOdCmjAHRpmRwj p7gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="auysF/6+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id d6-20020a170903230600b001ca6abecb27si9145340plh.498.2023.10.24.08.22.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 08:22:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="auysF/6+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 74128808349C; Tue, 24 Oct 2023 08:22:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234701AbjJXPWi (ORCPT + 99 others); Tue, 24 Oct 2023 11:22:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234865AbjJXPVR (ORCPT ); Tue, 24 Oct 2023 11:21:17 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21C652718; Tue, 24 Oct 2023 08:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CNWnC0tTNPuhROu5TZS+GHZycyp85uHcS0xNgApILVE=; b=auysF/6+X5CraAmh0uKYn72RQz MfQ+xLXff/KeM/31BhutwoZlcL72VsQbyxNYq3dpn94RmvR3gmzahgotSLculfToabojp6EEyZ2qn gXb3+IOXviSlZB5Ikl332rb1KTNxRoI5072LJ+ChkAjxkM27BbXg+AqqA/PxH+e2ygHzHJSJHw6SU vLfpoLPWMHOeYX4g2KpWnoemI9zro0jUoTZLXP6R2edTeTUsYq8Ze5avqgEzJbM5Ei4p0XiHDyeVz GHzWsDQ1wGF4QbSlov9XA7q6VRoK6bL26dLVpFHWC461tnoZhCn0U3vH5yjb9eMKKJF6sg9i97tGe V+h4AODw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:53116 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qvJAt-0004UN-31; Tue, 24 Oct 2023 16:18:32 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qvJAv-00AqRY-CI; Tue, 24 Oct 2023 16:18:33 +0100 In-Reply-To: References: From: Russell King (Oracle) 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, x86@kernel.org, linux-csky@vger.kernel.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org Cc: Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, James Morse , "Rafael J. Wysocki" , Len Brown Subject: [PATCH 28/39] ACPI: Warn when the present bit changes but the feature is not enabled MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Tue, 24 Oct 2023 16:18:33 +0100 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 pete.vger.email 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 (pete.vger.email [0.0.0.0]); Tue, 24 Oct 2023 08:22:45 -0700 (PDT) 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: Jonathan Cameron Reviewed-by: Gavin Shan Signed-off-by: Russell King (Oracle) --- Changes since RFC v2: * Update commit message with suggestion from Gavin Shan --- 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 19fceb3ec4e2..b7a94c1348b0 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -189,8 +189,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) -- 2.30.2