Re: [PATCH V3] PCI: tegra: Fix building Tegra194 PCIe driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/06/2021 18:18, Bjorn Helgaas wrote:
> On Mon, Jun 07, 2021 at 04:50:34PM +0100, Jon Hunter wrote:
>> Hi Bjorn, Lorenzo,
>>
>> On 26/05/2021 13:33, Jon Hunter wrote:
>>> 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.
>>> 2. 7f100744749e ("PCI: tegra: Add Tegra194 MCFG quirks for ECAM
>>>    errata") added "#ifdef CONFIG_PCIE_TEGRA194" around the native
>>>    driver. But if we set CONFIG_PCIE_TEGRA194=m to build the driver as a
>>>    module, autoconf.h contains "#define CONFIG_PCIE_TEGRA194_MODULE 1"
>>>    (not "#define CONFIG_PCIE_TEGRA194 1"), so the #ifdef excludes the
>>>    driver. Instead, use "IS_ENABLED(CONFIG_PCIE_TEGRA194)", which checks
>>>    for either CONFIG_PCIE_TEGRA194 or CONFIG_PCIE_TEGRA194_MODULE.
>>> 3. The below build warnings that are seen with particular kernel
>>>    configurations. Fix these by moving these structure definitions to
>>>    within the necessary guards.
>>>
>>>   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")
>>> Signed-off-by: Jon Hunter <jonathanh@xxxxxxxxxx>
>>
>>
>> Any feedback on this? We need this for v5.13.
> 
> Thanks for the reminder, I'll take a look at this.  It looks like we
> broke this in v5.13-rc1, so we should fix it before v5.13.
> 

Thanks. Yes this is needed before v5.13.

Jon

-- 
nvpublic



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux