From: Bjorn Helgaas <helgaas@kernel.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-pci@vger.kernel.org,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Sinan Kaya <okaya@kernel.org>, Ali Saidi <alisaidi@amazon.com>,
Zeev Zilberman <zeev@amazon.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/4] pci: Do not auto-enable PCI reallocation when _DSM #5 returns 0
Date: Fri, 21 Jun 2019 15:07:47 -0500 [thread overview]
Message-ID: <20190621200747.GD127746@google.com> (raw)
In-Reply-To: <20190615002359.29577-3-benh@kernel.crashing.org>
PCI: Don't auto-realloc if we're preserving firmware config
On Sat, Jun 15, 2019 at 10:23:58AM +1000, Benjamin Herrenschmidt wrote:
> This prevents auto-enabling of bridges reallocation when the FW tells
> us that the initial configuration must be preserved for a given host
> bridge.
"Prevent auto-enabling ..." to follow usual style of imperative mood in
commit logs.
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> drivers/pci/setup-bus.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index 0cdd5ff389de..049a5602b942 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -1684,10 +1684,16 @@ static enum enable_type pci_realloc_detect(struct pci_bus *bus,
> enum enable_type enable_local)
> {
> bool unassigned = false;
> + struct pci_host_bridge *hb;
Conventional variable names are "bridge" or "host".
> if (enable_local != undefined)
> return enable_local;
>
> + /* Don't realloc if ACPI tells us not to */
I'd drop the comment, since there might be other mechanisms, e.g., DT,
someday.
> + hb = pci_find_host_bridge(bus);
> + if (hb->preserve_config)
> + return auto_disabled;
> +
> pci_walk_bus(bus, iov_resources_unassigned, &unassigned);
> if (unassigned)
> return auto_enabled;
> --
> 2.17.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
linux-pci@vger.kernel.org, Sinan Kaya <okaya@kernel.org>,
Zeev Zilberman <zeev@amazon.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Ali Saidi <alisaidi@amazon.com>
Subject: Re: [PATCH 3/4] pci: Do not auto-enable PCI reallocation when _DSM #5 returns 0
Date: Fri, 21 Jun 2019 15:07:47 -0500 [thread overview]
Message-ID: <20190621200747.GD127746@google.com> (raw)
In-Reply-To: <20190615002359.29577-3-benh@kernel.crashing.org>
PCI: Don't auto-realloc if we're preserving firmware config
On Sat, Jun 15, 2019 at 10:23:58AM +1000, Benjamin Herrenschmidt wrote:
> This prevents auto-enabling of bridges reallocation when the FW tells
> us that the initial configuration must be preserved for a given host
> bridge.
"Prevent auto-enabling ..." to follow usual style of imperative mood in
commit logs.
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> drivers/pci/setup-bus.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index 0cdd5ff389de..049a5602b942 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -1684,10 +1684,16 @@ static enum enable_type pci_realloc_detect(struct pci_bus *bus,
> enum enable_type enable_local)
> {
> bool unassigned = false;
> + struct pci_host_bridge *hb;
Conventional variable names are "bridge" or "host".
> if (enable_local != undefined)
> return enable_local;
>
> + /* Don't realloc if ACPI tells us not to */
I'd drop the comment, since there might be other mechanisms, e.g., DT,
someday.
> + hb = pci_find_host_bridge(bus);
> + if (hb->preserve_config)
> + return auto_disabled;
> +
> pci_walk_bus(bus, iov_resources_unassigned, &unassigned);
> if (unassigned)
> return auto_enabled;
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-06-21 20:07 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-15 0:23 [PATCH 1/4] arm64: pci: acpi: Use pci_assign_unassigned_root_bus_resources() Benjamin Herrenschmidt
2019-06-15 0:23 ` Benjamin Herrenschmidt
2019-06-15 0:23 ` [PATCH 2/4] pci: acpi: Read _DSM #5 from ACPI on root bridges Benjamin Herrenschmidt
2019-06-15 0:23 ` Benjamin Herrenschmidt
2019-06-21 20:07 ` Bjorn Helgaas
2019-06-21 20:07 ` Bjorn Helgaas
2019-06-15 0:23 ` [PATCH 3/4] pci: Do not auto-enable PCI reallocation when _DSM #5 returns 0 Benjamin Herrenschmidt
2019-06-15 0:23 ` Benjamin Herrenschmidt
2019-06-21 20:07 ` Bjorn Helgaas [this message]
2019-06-21 20:07 ` Bjorn Helgaas
2019-06-15 0:23 ` [PATCH 4/4] arm64: pci: acpi: Preserve PCI resources configuration when asked by ACPI Benjamin Herrenschmidt
2019-06-15 0:23 ` Benjamin Herrenschmidt
2019-06-21 14:57 ` Lorenzo Pieralisi
2019-06-21 14:57 ` Lorenzo Pieralisi
2019-06-21 23:07 ` Benjamin Herrenschmidt
2019-06-21 23:07 ` Benjamin Herrenschmidt
2019-06-21 15:44 ` Ard Biesheuvel
2019-06-21 15:44 ` Ard Biesheuvel
2019-06-21 20:08 ` Bjorn Helgaas
2019-06-21 20:08 ` Bjorn Helgaas
2019-06-20 17:13 ` [PATCH 1/4] arm64: pci: acpi: Use pci_assign_unassigned_root_bus_resources() Lorenzo Pieralisi
2019-06-20 17:13 ` Lorenzo Pieralisi
2019-06-20 22:55 ` Benjamin Herrenschmidt
2019-06-20 22:55 ` Benjamin Herrenschmidt
2019-06-21 20:06 ` Bjorn Helgaas
2019-06-21 20:06 ` Bjorn Helgaas
2019-06-21 20:48 ` Bjorn Helgaas
2019-06-21 20:48 ` Bjorn Helgaas
2019-06-21 22:58 ` Benjamin Herrenschmidt
2019-06-21 22:58 ` Benjamin Herrenschmidt
2019-06-21 23:00 ` Benjamin Herrenschmidt
2019-06-21 23:00 ` Benjamin Herrenschmidt
2019-06-21 23:15 ` Bjorn Helgaas
2019-06-21 23:15 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190621200747.GD127746@google.com \
--to=helgaas@kernel.org \
--cc=alisaidi@amazon.com \
--cc=ard.biesheuvel@linaro.org \
--cc=benh@kernel.crashing.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=okaya@kernel.org \
--cc=zeev@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.