Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp431850lqs; Tue, 5 Mar 2024 06:24:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWHRE9S2Nl2WAHnnKLzdoaNNcBcMvcbt0Zr3AejQ59T9CSRtszoGeYmzCxEpO6l3jNxyiJ7vfEDOhMM2BUsZFway2peq1rDCDU6rR6+zA== X-Google-Smtp-Source: AGHT+IHF4KyBQhb2xi2y0YL7IplY84pbffmkYecV1lmq31f2ywpvvGmqCABKIIsklHooKUXa39E3 X-Received: by 2002:a05:6358:e498:b0:17b:a0d0:5678 with SMTP id by24-20020a056358e49800b0017ba0d05678mr2098431rwb.9.1709648679503; Tue, 05 Mar 2024 06:24:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709648679; cv=pass; d=google.com; s=arc-20160816; b=ddNf79rOUEA4NT9bcA04f9wIFIr6UOLgxODHBAaqgu97yQSjIkHL8dHM4BXpFj7wo4 LM48095x5iAoJEJo3HxD8O8FzCwikbPi8GQutf37k/KSB30NKLsAayO4dU2GeoWYWe4c RTubGPkLjgakJZxqWVMsyZVLwc9193C935NB27CDLa0/w1y74oAdlnZzTIEXyGrTvTys /eVcNMZxt0FuwIlhQNao3sWuoBdBxZX5n1Kao2/xiFe2ZkQPeZZ7dh/88gTz2xRvV5ej FMWnkBC3yOjX8N/1FAOgH9J92mc5/PXpNR5cZ/Eal7dNDgk5tewLvpkyKjY+ZER9Ptly XrOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=4i05r2tZWetMzjAGhPLqBLfkSa9irtTqd32PXjcozS4=; fh=yuYUidodnSy/a5ifRJoMeVUKv4COloU/RV9BYpvCJVA=; b=b26Foj58vnGV6I+CJn0qnEMKFYSui9ZxZuNtwmoiibVqb7LNdiY8Nuc3ceqFIWtrA4 1aGTV8cPqgJ31jp/qK+cSbeLc8qdGMVAtULFf1bXkhXvyMGhdWHADWOQQdT1jrAkh5Bs nDm7UaWfadFEjckZUC1otKxzC7tlwDrFqgSd5xSNETt55C6844BEZ1zgKiy3bu6KajmI +hh7iG22tcJnXy++kt28co9jG39mQQ5Yg8cAN4Mf8UOZ+Ah+ln1b4pcIUBrXMP/q/wb6 VD2lk7TWPjhhh7OvZMYZhRO3l/xP5hamkDmwq+4BDzioj8OlrAO5ZVqoPgOpmgfXMoGo qC/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="L0uUn/6V"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u27-20020a05620a085b00b0078829cc8b2csi4347548qku.458.2024.03.05.06.24.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 06:24:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92511-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=pass header.i=@kernel.org header.s=k20201202 header.b="L0uUn/6V"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 38A2D1C21A55 for ; Tue, 5 Mar 2024 14:24:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7D028664F; Tue, 5 Mar 2024 14:24:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L0uUn/6V" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C352386122; Tue, 5 Mar 2024 14:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709648669; cv=none; b=UGz4S5cPyPaTbGJNUsKzfj4MenvZVThA3YVIr/sUDM9zMgIiKOt4gRK+jJWAt234GEROr3kVIiF8JOYBukrW6waU1vGrK6zyNuqay9ZCjGCfFgdgcZtAsumqkipW8ZPwp83uJlR4lgPxxWjGILc4lzmgGU1qq4ueRyttKLJB+7o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709648669; c=relaxed/simple; bh=zan+ZoeDXxzZ7Py3Ib0gvt0twgnpqQJYfL+M/dbapaM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HfHKHYeOoK9tqH/bJBOusVaDBxtCBJxyl6dVCLBbV6WgqtFCjqpY1AmCF2kX/OCxg7jpLZisDGLablq/ZWPVGaw8mW1JFlAcCuNUxQnzI+PBbzRiyUz3d/NA5/AldjziK0qYmI1CuHauXpecgcD8OQ5u0zxRKMAME9q/RXvcrEE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L0uUn/6V; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15069C43390; Tue, 5 Mar 2024 14:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709648669; bh=zan+ZoeDXxzZ7Py3Ib0gvt0twgnpqQJYfL+M/dbapaM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L0uUn/6VWsIRpBj0MI8Cs9Zlz68UfqVVESRLH41lV8Jnh0qjwNa2FKGJJv0OrELOB sJFJUk0V1+sBQNKd+WToPNFo0HYwal0psvcVrmwZoAeord/9WQCA3XapUZp//xTdj/ O64EsudmuwyatGTs5ewvhP7aPebIcRtvi1SkoC6nfW6yFO6S/PG4jF/jPfFqdTmyUf DIxyBjGbaq/o3OMndkl5rvNOMBoNwbBXcRGfmsD5yKAsWpkdjcRvF5fC3iUXG+OkhB UXdXwYoZwzwVoOqfJ9AFCRHLn4lg2xpaJKc3n9eWlituqTr46U1alWxIdTIrrI5rnM JCmTfpUrrootQ== Date: Tue, 5 Mar 2024 08:24:26 -0600 From: Rob Herring To: Vidya Sagar Cc: bhelgaas@google.com, rafael@kernel.org, lenb@kernel.org, will@kernel.org, lpieralisi@kernel.org, kw@linux.com, frowand.list@gmail.com, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, treding@nvidia.com, jonathanh@nvidia.com, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com Subject: Re: [PATCH V4] PCI: Add support for preserving boot configuration Message-ID: <20240305142426.GB3259724-robh@kernel.org> References: <20240222124110.2681455-1-vidyas@nvidia.com> <20240223080021.1692996-1-vidyas@nvidia.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=us-ascii Content-Disposition: inline In-Reply-To: <20240223080021.1692996-1-vidyas@nvidia.com> On Fri, Feb 23, 2024 at 01:30:21PM +0530, Vidya Sagar wrote: > Add support for preserving the boot configuration done by the > platform firmware per host bridge basis, based on the presence of > 'linux,pci-probe-only' property in the respective PCI host bridge > device-tree node. It also unifies the ACPI and DT based boot flows > in this regard. > > Signed-off-by: Vidya Sagar > --- > V4: > * Addressed Bjorn's review comments > > V3: > * Unified ACPI and DT flows as part of addressing Bjorn's review comments > > V2: > * Addressed issues reported by kernel test robot > > drivers/acpi/pci_root.c | 12 ------- > drivers/pci/controller/pci-host-common.c | 4 --- > drivers/pci/of.c | 21 +++++++++++ > drivers/pci/probe.c | 46 ++++++++++++++++++------ > include/linux/of_pci.h | 6 ++++ > 5 files changed, 62 insertions(+), 27 deletions(-) One more thing. > @@ -3080,20 +3106,18 @@ int pci_host_probe(struct pci_host_bridge *bridge) > > bus = bridge->bus; > > + /* If we must preserve the resource configuration, claim now */ > + if (pci_has_flag(PCI_PROBE_ONLY) || bridge->preserve_config) > + pci_bus_claim_resources(bus); No reason to check PCI_PROBE_ONLY if you set preserve_config based on /chosen as well. IOW, we should deprecate PCI_PROBE_ONLY flag in favor of the per host bridge setting. Rob