Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2422358rdd; Fri, 12 Jan 2024 08:58:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHc8YFZkSb+hlHOHSomaptkHYcVaO3lDePyqPJ9b6mj/4feSh1g1qkXSSDz8fj7ryg1+t5i X-Received: by 2002:a17:903:32cf:b0:1d5:aee7:20b4 with SMTP id i15-20020a17090332cf00b001d5aee720b4mr684016plr.30.1705078723466; Fri, 12 Jan 2024 08:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705078723; cv=none; d=google.com; s=arc-20160816; b=SO0y7tzzGh01oHOY2U3ldNnpENj2W0eRIvXGD+ecHmfgZSQDnkqusJ7UVrUMV+rgOP uOJLUrSvuZg2dbKGjlnuc8VaEyq2rjl5iD+cAmUe1XvAQv0MCKWVnpkeWRjLbvG7aW50 GM1EcF0VYXVziQA0gAlYlObdjzWLslgJFXW6LKPTAQXvHe/Y22bf/f/Fgh/om6XyTlrj Ckn5KCnCPV6vQzmRpKf3WMuFVLg9t/GNUw63K3ZujTIjJ4kQsRIyHTzEaQJimOfxSHg4 +P5w4TuUcpck0qrC+R8jCN+foC36nRxQE2JBQ6OMtgY/0lICeZw+5lspmzD3uRLwo8rx 1eHQ== ARC-Message-Signature: i=1; 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:message-id:subject:cc:to:from :date:dkim-signature; bh=65QrkQbHMnuDhNhWXTlWCdUMIN83yzTi6KxLbtfFrQc=; fh=DBrGuDSJDOUuYCkys6I5vLD5HhCR62mpsXfeTsXCflE=; b=W2QyJVIkrIAg65NIw/rFpjx/PApWf4qjT0nktG41J2UoZMsPrAxNph07laXc0BmO6U x2h8V2ifbQSs11uCFO0rptyNMTCvFfcoREXzbLV55eNjoR5XmUIlpmp/UQ4mmqe1Bjb7 0AufOXb0/+iCAT/9Hc/JBaaTOuEghRBKlU2fZrDW0VWLFv+KLXvKrnykg/Zps9ttLlwy nzCpJTS0/5iLVd+soEDhLrZmgqN5FwbHva6zLUiX/OlpIAePt2HdWspUUvl8aIEfiM3W 6IJ1Ole7KogegN7iYpH19/NCxwoD6ALX9cB+EfhfsjW3uplDiJnHqP7pVfB0TQBpZEc3 kBsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="S/it6ZRJ"; spf=pass (google.com: domain of linux-kernel+bounces-24876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w11-20020a170902a70b00b001d4891f73f0si3443893plq.549.2024.01.12.08.58.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 08:58:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="S/it6ZRJ"; spf=pass (google.com: domain of linux-kernel+bounces-24876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24876-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 13CA8285812 for ; Fri, 12 Jan 2024 16:58:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D790175BA; Fri, 12 Jan 2024 16:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="S/it6ZRJ" 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 46A081757F; Fri, 12 Jan 2024 16:58:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5983C433F1; Fri, 12 Jan 2024 16:58:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705078712; bh=6BMDfJ5c63lfLV+AgM5FqKmFO/iabKogwK/rRP83CI8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=S/it6ZRJzqE59hXdX3tLslvvnHCf7nPCJEBt1pv9HEHDmtmqvX9FY4MBiOp9ROPpH URStaObMvnyhJRqYcWfOmofllck+lV5RyS4z3LkMwp8p8493KKkm3b/JRd7qS7pn1u IaFS0oOfW+xfjdAA6FTM/hVgVnFD/GvOSCMm8E27PvbMMFMQgIQip+mD9QlexYgjaP QK2itt5Uh4x5G5bv7CDmLq0i+bc0wIZJaLmV4UM4K1CQOlKwcWg1H9VgozmKuy9iWz HjsvD306JQDVchYbwxWa/l81qIgMgu4+nhGyrcTgt1hO03mM6SP7tBfgmB+dLG7JKH +edfStHMgp5fw== Date: Fri, 12 Jan 2024 10:58:30 -0600 From: Bjorn Helgaas To: Vidya Sagar Cc: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, will@kernel.org, frowand.list@gmail.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, treding@nvidia.com, jonathanh@nvidia.com, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com, kernel test robot Subject: Re: [PATCH V2 2/2] PCI: Add support for "preserve-boot-config" property Message-ID: <20240112165830.GA2271982@bhelgaas> 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: <20240110030725.710547-3-vidyas@nvidia.com> On Wed, Jan 10, 2024 at 08:37:25AM +0530, Vidya Sagar wrote: > Add support for "preserve-boot-config" property that can be used to > selectively (i.e. per host bridge) instruct the kernel to preserve the > boot time configuration done by the platform firmware. > > Reported-by: kernel test robot > Signed-off-by: Vidya Sagar > --- > V2: > * Addressed issues reported by kernel test robot > > drivers/pci/controller/pci-host-common.c | 5 ++++- > drivers/pci/of.c | 18 ++++++++++++++++++ > drivers/pci/probe.c | 2 +- > include/linux/of_pci.h | 6 ++++++ > 4 files changed, 29 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c > index 6be3266cd7b5..d3475dc9ec44 100644 > --- a/drivers/pci/controller/pci-host-common.c > +++ b/drivers/pci/controller/pci-host-common.c > @@ -68,13 +68,16 @@ int pci_host_common_probe(struct platform_device *pdev) > > of_pci_check_probe_only(); > > + bridge->preserve_config = > + of_pci_check_preserve_boot_config(dev->of_node); Thanks for leveraging the existing "preserve_config" support for the ACPI _DSM. Is pci_host_common_probe() the best place for this? I think there are many DT platform drivers that do not use pci_host_common_probe(), so I wonder if there's a more generic place to put this. I see Rob's concern about adding "preserve-boot-config" vs extending "linux,pci-probe-only" and I don't really have an opinion on that, although I do think the "pci-probe-only" name is not as descriptive as it could be. I guess somebody will argue that "preserve_config" could be more descriptive, too :) Bjorn