2020-12-02 13:15:33

by Jianjun Wang (王建军)

[permalink] [raw]
Subject: [v1] PCI: Export pci_pio_to_address() for module use

This interface will be used by PCI host drivers for PIO translation,
export it to support compiling those drivers as kernel modules.

Signed-off-by: Jianjun Wang <[email protected]>
---
drivers/pci/pci.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index a458c46d7e39..509008899182 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4003,6 +4003,7 @@ phys_addr_t pci_pio_to_address(unsigned long pio)

return address;
}
+EXPORT_SYMBOL(pci_pio_to_address);

unsigned long __weak pci_address_to_pio(phys_addr_t address)
{
--
2.25.1


2020-12-02 13:52:24

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [v1] PCI: Export pci_pio_to_address() for module use

On Wed, Dec 02, 2020 at 09:12:55PM +0800, Jianjun Wang wrote:
> This interface will be used by PCI host drivers for PIO translation,
> export it to support compiling those drivers as kernel modules.
>
> Signed-off-by: Jianjun Wang <[email protected]>

Please include this in a series that adds a modular host driver or
converts an existing one to be modular. That way we know we have at
least one user and things get merged in the right order.

> ---
> drivers/pci/pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index a458c46d7e39..509008899182 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4003,6 +4003,7 @@ phys_addr_t pci_pio_to_address(unsigned long pio)
>
> return address;
> }
> +EXPORT_SYMBOL(pci_pio_to_address);
>
> unsigned long __weak pci_address_to_pio(phys_addr_t address)
> {
> --
> 2.25.1
>

2020-12-03 03:51:24

by Jianjun Wang (王建军)

[permalink] [raw]
Subject: Re: [v1] PCI: Export pci_pio_to_address() for module use

On Wed, 2020-12-02 at 07:49 -0600, Bjorn Helgaas wrote:
> On Wed, Dec 02, 2020 at 09:12:55PM +0800, Jianjun Wang wrote:
> > This interface will be used by PCI host drivers for PIO translation,
> > export it to support compiling those drivers as kernel modules.
> >
> > Signed-off-by: Jianjun Wang <[email protected]>
>
> Please include this in a series that adds a modular host driver or
> converts an existing one to be modular. That way we know we have at
> least one user and things get merged in the right order.

Hi Bjorn,

OK, I will include this patch in the next version of pcie-mediatek-gen3
series.

thanks.
>
> > ---
> > drivers/pci/pci.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> > index a458c46d7e39..509008899182 100644
> > --- a/drivers/pci/pci.c
> > +++ b/drivers/pci/pci.c
> > @@ -4003,6 +4003,7 @@ phys_addr_t pci_pio_to_address(unsigned long pio)
> >
> > return address;
> > }
> > +EXPORT_SYMBOL(pci_pio_to_address);
> >
> > unsigned long __weak pci_address_to_pio(phys_addr_t address)
> > {
> > --
> > 2.25.1
> >