Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp7402rdb; Mon, 22 Jan 2024 10:08:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeseyN6zMSKQaE7Mdyzt2ftgbLdX6JaMKZaQaoFDsrqRYiwc55qwK5Ew5sACZyyc4AUpLf X-Received: by 2002:a05:6830:cc:b0:6dd:e316:8175 with SMTP id x12-20020a05683000cc00b006dde3168175mr5022049oto.3.1705946880130; Mon, 22 Jan 2024 10:08:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705946880; cv=pass; d=google.com; s=arc-20160816; b=SRdaBm68i5poEOiWPnztDmZ6yblXGATMSaU3NlCuX/vXJH4Y3y72o/+J8sOTuv9uzU NIlJO3IRyOUwk63vYsa/51vRpgmClfhjfBOkm/+8wpA5jjR5qMSpsufBJhAoejey7QMk nMMhm6gzwRncMvPqbe+8H6cDbzbXEgk/146mLqdRvrdWH1UYFEvyky5aj/70RYFmqIGj g0pgQcGwtgE/lLAFe/11QYsYSF42Hxs9OOlvexku8Oz/fAcGoO7SJ43ac8pDlv9F2d7Z /6nOoWS1Pg3MuUdU4d1u+hWJiuIbKxsluB9zqQWChywW8N6169vdkJ5QlEJ1qd2OYjeJ 43sQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4s5ASXue467nLReommt3Qb/xh4/CleRrf7HABCgDhAc=; fh=+ODUIt4VnAeK/nkCHAGa8GofO0JrYydBV5TxZEqgJOY=; b=BFUkAoNagvshP0WO0IfXSlNOV4skoBa+2JhqFy3Rjk4/+kX5XJKS75GFgm63hYTV9F VuMrsvwIeIwn44548Efl/UQx5JpKJBmzz+plam1drereebGnO/5MoH3Z+XrxVtjU19In NyGjGJ8YM7PrYo5O1xKFMleZS82gyKUoYs3uUXF7k+ZztWOkgl/32tZzn5hC1mwCgpaL jDCC6GLRlfLSL4la6j1CGmb7z4XgX/I6HabojJPy/V3eXAfbuyKvLDXjuXE7LJAOFh65 TI0uBgMhOGxv1dY3i6dhBFRjDEMZsjM2tNGTBpTepqUL7dD9zF0Q2lIQcUjfL3sI49nI 4sFA== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=k2RTabvp; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-33818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33818-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 ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y12-20020a05622a120c00b0042a1f94fe38si6201760qtx.268.2024.01.22.10.07.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 10:08:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=k2RTabvp; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-33818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33818-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 06D8E1C29188 for ; Mon, 22 Jan 2024 18:06:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68EC665196; Mon, 22 Jan 2024 17:27:56 +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="k2RTabvp" 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 CC1A764CF3; Mon, 22 Jan 2024 17:27:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705944475; cv=none; b=IiW1my2hweiB/7c0OKC2aUOMJGQ/GYSNHXiDdBVUlf3iw7KonByRFJUx7aRskv7UgguqV8OGNFi/hCVWAmnhzSjsJqY80/eFx1458TqE6cx7n3Y7DPF3U2xaRIAlVORopNQ0wzx3gg3lKKww+g1iUxEBvcR1Sks/reBszJFcQhE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705944475; c=relaxed/simple; bh=HxKy5Bibhf+2B00lsgPRKpJNJzyu7ueJfD16Tr2+GJg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XoYYi6D/A7GiGaMGZ+UxyabrgoMSI+fmrWjLGFwcHxcqep4+h3gzbe8zsCrhEMsO965JdyK7eZlAl8Xl2X9oJ/FldO9D6RGqXkHsumA+qGN9WF2cJ6O1iSo/U3NWpWcQYo6+3/1UZ1ATjalxnl1pHnmGsrO/BFMYL366XRJLSh8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=k2RTabvp; arc=none smtp.client-ip=78.32.30.218 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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date: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=4s5ASXue467nLReommt3Qb/xh4/CleRrf7HABCgDhAc=; b=k2RTabvplP91YS/X8q/zqV21/0 qq9DgaiMgmZJiqO3jB55Q9chgwQ35eB1+eA7x7jhEHzaKdet6hSaC52CWHQUgwvG7gkDXSgFaHYat F0fK7xJGkii9k+DKttPiUF0xErSZBLXj7z3pTPWSb7ke6hMhA8Q1+WfuHcA4kdmfF4+MTDeWJqrHn DKxdjxQtMmdbZ+GjpYGGO2++xFou5Tg1sahLJn3m0tXgnSlLLVFyRoEFSuaMmiAwqWqCQ62AkNjs/ r8m/fC/O5qBwbiu03pbM8QcCyTyuegbDsHWC+bqv2hZ/QYcKy7OJpQoabZft8xMDIEc6qarES6VyY n51mtm7A==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:60388) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rRy5I-0001Gc-2T; Mon, 22 Jan 2024 17:27:44 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rRy5D-0001Bz-Ok; Mon, 22 Jan 2024 17:27:39 +0000 Date: Mon, 22 Jan 2024 17:27:39 +0000 From: "Russell King (Oracle)" To: Jonathan Cameron Cc: "Rafael J. Wysocki" , 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, Salil Mehta , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com, James Morse Subject: Re: [PATCH RFC v3 03/21] ACPI: processor: Register CPUs that are online, but not described in the DSDT Message-ID: References: <20240122160227.00002d83@Huawei.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240122160227.00002d83@Huawei.com> Sender: Russell King (Oracle) On Mon, Jan 22, 2024 at 04:02:27PM +0000, Jonathan Cameron wrote: > On Mon, 15 Jan 2024 11:06:29 +0000 > "Russell King (Oracle)" wrote: > > > On Mon, Dec 18, 2023 at 09:22:03PM +0100, Rafael J. Wysocki wrote: > > > On Wed, Dec 13, 2023 at 1:49 PM Russell King wrote: > > > > > > > > From: James Morse > > > > > > > > ACPI has two descriptions of CPUs, one in the MADT/APIC table, the other > > > > in the DSDT. Both are required. (ACPI 6.5's 8.4 "Declaring Processors" > > > > says "Each processor in the system must be declared in the ACPI > > > > namespace"). Having two descriptions allows firmware authors to get > > > > this wrong. > > > > > > > > If CPUs are described in the MADT/APIC, they will be brought online > > > > early during boot. Once the register_cpu() calls are moved to ACPI, > > > > they will be based on the DSDT description of the CPUs. When CPUs are > > > > missing from the DSDT description, they will end up online, but not > > > > registered. > > > > > > > > Add a helper that runs after acpi_init() has completed to register > > > > CPUs that are online, but weren't found in the DSDT. Any CPU that > > > > is registered by this code triggers a firmware-bug warning and kernel > > > > taint. > > > > > > > > Qemu TCG only describes the first CPU in the DSDT, unless cpu-hotplug > > > > is configured. > > > > > > So why is this a kernel problem? > > > > So what are you proposing should be the behaviour here? What this > > statement seems to be saying is that QEMU as it exists today only > > describes the first CPU in DSDT. > > This confuses me somewhat, because I'm far from sure which machines this > is true for in QEMU. I'm guessing it's a legacy thing with > some old distro version of QEMU - so we'll have to paper over it anyway > but for current QEMU I'm not sure it's true. > > Helpfully there are a bunch of ACPI table tests so I've been checking > through all the multi CPU cases. > > CPU hotplug not enabled. > pc/DSDT.dimmpxm - 4x Processor entries. -smp 4 > pc/DSDT.acpihmat - 2x Processor entries. -smp 2 > q35/DSDT.acpihmat - 2x Processor entries. -smp 2 > virt/DSDT.acpihmatvirt - 4x ACPI0007 entries -smp 4 > q35/DSDT.acpihmat-noinitiator - 4 x Processor () entries -smp 4 > virt/DSDT.topology - 8x ACPI0007 entries > > I've also looked at the code and we have various types of > CPU hotplug on x86 but they all build appropriate numbers of > Processor() entries in DSDT. > Arm likewise seems to build the right number of ACPI0007 entries > (and doesn't yet have CPU HP support). > > If anyone can add a reference on why this is needed that would be very > helpful. Maybe Salil can shed some light on this? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!