Re: [PATCH v7] PCI: Add pcie_link_is_active() to determine if the PCIe link

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

 




----- Original Message -----
> From: "Timothy Pearson" <tpearson@xxxxxxxxxxxxxxxxxxxxxxxx>
> To: "Bjorn Helgaas" <helgaas@xxxxxxxxxx>
> Cc: "linux-pci" <linux-pci@xxxxxxxxxxxxxxx>, "mahesh" <mahesh@xxxxxxxxxxxxx>, "Oliver" <oohall@xxxxxxxxx>, "Madhavan
> Srinivasan" <maddy@xxxxxxxxxxxxx>, "Michael Ellerman" <mpe@xxxxxxxxxxxxxx>, "Lukas Wunner" <lukas@xxxxxxxxx>
> Sent: Tuesday, June 17, 2025 10:15:25 AM
> Subject: Re: [PATCH v7] PCI: Add pcie_link_is_active() to determine if the PCIe link

> ----- Original Message -----
>> From: "Bjorn Helgaas" <helgaas@xxxxxxxxxx>
>> To: "Timothy Pearson" <tpearson@xxxxxxxxxxxxxxxxxxxxx>
>> Cc: "linux-pci" <linux-pci@xxxxxxxxxxxxxxx>, "mahesh" <mahesh@xxxxxxxxxxxxx>,
>> "Oliver" <oohall@xxxxxxxxx>, "Madhavan
>> Srinivasan" <maddy@xxxxxxxxxxxxx>, "Michael Ellerman" <mpe@xxxxxxxxxxxxxx>,
>> "Lukas Wunner" <lukas@xxxxxxxxx>
>> Sent: Tuesday, June 17, 2025 10:03:01 AM
>> Subject: Re: [PATCH v7] PCI: Add pcie_link_is_active() to determine if the PCIe
>> link
> 
>> [+cc ppc folks, Lukas]
>> 
>> On Tue, Jun 17, 2025 at 09:25:24AM -0500, Timothy Pearson wrote:
> 
>>> +	return !!(lnk_status & PCI_EXP_LNKSTA_DLLLA);
>>> +}
>>> +EXPORT_SYMBOL(pcie_link_is_active);
>> 
>> Unless something outside drivers/pci/ actually needs this, it should
>> not be exported and it should be declared in drivers/pci/pci.h
>> instead.
> 
> Agreed.  Will fix in v8.

On further inspection, it looks like we need to export the symbol after all.  The problem is hotplug drivers (pnv-php in particular) a.) need this functionality and b.) may be built as a module.  I think we should still keep the definition in the PCI include directory, but the symbol itself needs to be exported.  I will make this change in the next patch series revision.




[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