Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp85181rdh; Mon, 18 Dec 2023 05:13:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IGV3kNkISjFL+XqRvPSM1F9r149vVh/BdyiIu5J50IcNEyF7nDSfP07hstlipoM0CucR8GM X-Received: by 2002:ac2:4141:0:b0:50e:1514:e56 with SMTP id c1-20020ac24141000000b0050e15140e56mr3562998lfi.79.1702905212832; Mon, 18 Dec 2023 05:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702905212; cv=none; d=google.com; s=arc-20160816; b=UPKRrxr6ew6dbNXP7fSucVX/detsSQvCVfUIziitM1DWJivz9MrYXuzBAaC/cmpSk4 04sFnLITHrjw0OBp1YEeUMcJ05IjKNqPH6MbuVib22ZWBXhP90o6j27cAekc4XCr25RT fTqIbL/JhmWb2G2sofSAuNBxC1Z5hrk814pF8wmbVCMtUO5B6gPppqOJmZAJSX93nbD6 3fFe2ntpg7qgI74v90hL2Cu0msZB5QyGmQriieC8O9agzS+FwuhQ09/hlZMPm7vGt+pO 9/Gz0t0v5GBbWUhqq8TuO/3PkHAVoxjaxyZqPkiSnhJ/bUuP6irDkPmM1AqFVp1onCT3 a9ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=c3eKilpmoTPP3MlwZ5iW3IIjl94dA6VEFoJ51DK0uIc=; fh=sz1bnsmfsHafwhebCwnTDdXcest4CQi2jofbDUyFEmc=; b=n2tRIoXeZmG8Ur7LSUvJye1qzDrK9djvquSGJFcQUVnrA/X2StNBdgDPTGOESzzCji 93F0hvWQAR6XcttaMLOX/UVUua8Z/upL7vklGjwzDAseKO4aDL/lDFW4gg0oMeLtcXkY qI24IjqvazCnswYfCtBcUnP9OhYL1cByueRv9M971aeC5tQaXGeKXWES6hM7LpTb2Ygl tCPR6o3LvGq6jTAs9cb9mos7HJaVsFqQUQMZkOOFZGp6LYioHWxvlfmNS3ak6QNapdfK eX8wuavMPtA0owRlPi3Cv9WjKZUtk7VbKHaHke2TKdooiMZEc1i4eAD1P+5RwNOTtQ81 Ku5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="t2qWeN/K"; spf=pass (google.com: domain of linux-kernel+bounces-3696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m8-20020a170906234800b00a2367af52c9si213347eja.194.2023.12.18.05.13.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 05:13:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="t2qWeN/K"; spf=pass (google.com: domain of linux-kernel+bounces-3696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 765851F23629 for ; Mon, 18 Dec 2023 13:12:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E077E76089; Mon, 18 Dec 2023 13:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="t2qWeN/K" X-Original-To: linux-kernel@vger.kernel.org Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 EFB6574E34; Mon, 18 Dec 2023 13:03:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=c3eKilpmoTPP3MlwZ5iW3IIjl94dA6VEFoJ51DK0uIc=; b=t2qWeN/K1/ZUeWCCwzbZCQkW1G urS7LRHKiO4WVI1zASvcITTj5+Q8MiC0TkAIG6ZF76NYpoU8gXZg2wyzdXn8dMUvB4VD3mIPO2F7n Ai9OIwJOxjTXWbkmCCFGr9g4TQ4e+htCIK56krjljDKEQQEVytCzdTYcHRcmU8W0Yen05kAWHWzBJ b3NsaBARf6pa8sd/fDAyhEn20KMkY9LwqsAoO4DeuRwt8KD1ycIqXrFuQ1w5A9XdxY08rWO/EApVh 0FPZjb3Z98sn9uGkDhsOnOSAZ52Og5ahiI3Qq96NjrCe+OmvyKfp5RKZapy5RBLs3+h9ZB6wunTCO /SfYj9NQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:39414) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rFDHO-0005N6-33; Mon, 18 Dec 2023 13:03:31 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rFDHQ-0006jG-Oq; Mon, 18 Dec 2023 13:03:32 +0000 Date: Mon, 18 Dec 2023 13:03:32 +0000 From: "Russell King (Oracle)" To: Jonathan Cameron , 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, acpica-devel@lists.linuxfoundation.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 Subject: Re: [PATCH RFC v3 17/21] ACPI: add support to register CPUs based on the _STA enabled bit Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) On Wed, Dec 13, 2023 at 12:50:38PM +0000, Russell King wrote: > From: James Morse > > acpi_processor_get_info() registers all present CPUs. Registering a > CPU is what creates the sysfs entries and triggers the udev > notifications. > > arm64 virtual machines that support 'virtual cpu hotplug' use the > enabled bit to indicate whether the CPU can be brought online, as > the existing ACPI tables require all hardware to be described and > present. > > If firmware describes a CPU as present, but disabled, skip the > registration. Such CPUs are present, but can't be brought online for > whatever reason. (e.g. firmware/hypervisor policy). > > Once firmware sets the enabled bit, the CPU can be registered and > brought online by user-space. Online CPUs, or CPUs that are missing > an _STA method must always be registered. ... > @@ -526,6 +552,9 @@ static void acpi_processor_post_eject(struct acpi_device *device) > acpi_processor_make_not_present(device); > return; > } > + > + if (cpu_present(pr->id) && !(sta & ACPI_STA_DEVICE_ENABLED)) > + arch_unregister_cpu(pr->id); This change isn't described in the commit log, but seems to be the cause of the build error identified by the kernel build bot that is fixed later in this series. I'm wondering whether this should be in a different patch, maybe "ACPI: Check _STA present bit before making CPUs not present" ? Or maybe my brain isn't working properly (due to being Covid positive.) Any thoughts, Jonathan? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!