From: "Krzysztof Wilczyński" <kw@linux.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Thierry Reding <thierry.reding@gmail.com>,
Vidya Sagar <vidyas@nvidia.com>,
linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH V2] PCI: tegra: Fix building Tegra194 PCIe driver
Date: Thu, 20 May 2021 11:57:13 +0200 [thread overview]
Message-ID: <20210520095713.GA647160@rocinante.localdomain> (raw)
In-Reply-To: <20210520090123.11814-1-jonathanh@nvidia.com>
Hi Jon,
> Commit 7f100744749e ("PCI: tegra: Add Tegra194 MCFG quirks for ECAM
> errata") caused a few build regressions for the Tegra194 PCIe driver
> which are:
>
> 1. The Tegra194 PCIe driver can no longer be built as a module. This
> was caused by removing the Makefile entry to build the pcie-tegra.c
> based upon the CONFIG_PCIE_TEGRA194 option. Therefore, restore this
> so that we can build the driver as a module if ACPI support is not
> enabled in the kernel.
> 2. If CONFIG_PCIE_TEGRA194 is configured to build the driver as a
> module, at the same time that CONFIG_ACPI and CONFIG_PCI_QUIRKS are
> selected to build the driver into the kernel, then the necessary
> functions in the driver to probe and remove the device when booting
> with device-tree and not compiled into to the driver. This prevents
> the PCIe devices being probed when booting with device-tree. Fix this
> by using the IS_ENABLED() macro.
> 3. The below build warnings to be seen with particular kernel
> configurations. Fix these by adding the necessary guards around these
> variable definitions.
>
> drivers/pci/controller/dwc/pcie-tegra194.c:259:18: warning:
> ‘event_cntr_data_offset’ defined but not used [-Wunused-const-variable=]
> drivers/pci/controller/dwc/pcie-tegra194.c:250:18: warning:
> ‘event_cntr_ctrl_offset’ defined but not used [-Wunused-const-variable=]
> drivers/pci/controller/dwc/pcie-tegra194.c:243:27: warning:
> ‘pcie_gen_freq’ defined but not used [-Wunused-const-variable=]
>
> Fixes: 7f100744749e ("PCI: tegra: Add Tegra194 MCFG quirks for ECAM errata")
Thank you for fixing this! Much appreciated!
[...]
> +#if IS_ENABLED(CONFIG_PCIE_TEGRA194)
> static const unsigned int pcie_gen_freq[] = {
> GEN1_CORE_CLK_FREQ,
> GEN2_CORE_CLK_FREQ,
> GEN3_CORE_CLK_FREQ,
> GEN4_CORE_CLK_FREQ
> };
> +#endif
>
> +#if defined(CONFIG_PCIEASPM)
> static const u32 event_cntr_ctrl_offset[] = {
> 0x1d8,
> 0x1a8,
> @@ -264,6 +267,7 @@ static const u32 event_cntr_data_offset[] = {
> 0x1c8,
> 0x1dc
> };
> +#endif
A small note about the above - I believe Bjorn might prefer if we move
these two into the existing blocks, rather than wrapping both as done
here, so that things are grouped together. Albeit, I leave it to Bjorn
to give us feedback on his preferred style.
Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
Krzysztof
next prev parent reply other threads:[~2021-05-20 9:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 9:01 [PATCH V2] PCI: tegra: Fix building Tegra194 PCIe driver Jon Hunter
2021-05-20 9:57 ` Krzysztof Wilczyński [this message]
2021-05-20 22:19 ` Bjorn Helgaas
2021-05-21 13:11 ` Jon Hunter
2021-06-07 23:50 ` Bjorn Helgaas
2021-06-08 7:44 ` Jon Hunter
2021-06-08 13:02 ` Bjorn Helgaas
2021-06-08 13:20 ` Jon Hunter
2021-06-08 18:34 ` Vidya Sagar
2021-06-08 20:11 ` Jon Hunter
2021-06-09 10:23 ` Jon Hunter
2021-06-09 14:00 ` Vidya Sagar
2021-06-09 16:18 ` Bjorn Helgaas
2021-06-09 17:07 ` Jon Hunter
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=20210520095713.GA647160@rocinante.localdomain \
--to=kw@linux.com \
--cc=bhelgaas@google.com \
--cc=jonathanh@nvidia.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=thierry.reding@gmail.com \
--cc=vidyas@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).