diff mbox series

[v4,03/16] PCI/ATS: Restore EXPORT_SYMBOL_GPL() for pci_{enable,disable}_ats()

Message ID 20191219120352.382-4-will@kernel.org
State New
Headers show
Series None | expand

Commit Message

Will Deacon Dec. 19, 2019, 12:03 p.m. UTC
From: Greg Kroah-Hartman <gregkh@google.com>


Commit d355bb209783 ("PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL()")
unexported a bunch of symbols from the PCI core since the only external
users were non-modular IOMMU drivers. Although most of those symbols
can remain private for now, 'pci_{enable,disable_ats()' is required for
the ARM SMMUv3 driver to build as a module, otherwise we get a build
failure as follows:

  | ERROR: "pci_enable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined!
  | ERROR: "pci_disable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined!

Re-export these two functions so that the ARM SMMUv3 driver can be build
as a module.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

[will: rewrote commit message]
Signed-off-by: Will Deacon <will@kernel.org>

---
 drivers/pci/ats.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.24.1.735.g03f4e72817-goog

Comments

Joerg Roedel Dec. 20, 2019, 8:43 a.m. UTC | #1
Hi Bjorn,

On Thu, Dec 19, 2019 at 12:03:39PM +0000, Will Deacon wrote:
> From: Greg Kroah-Hartman <gregkh@google.com>

> 

> Commit d355bb209783 ("PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL()")

> unexported a bunch of symbols from the PCI core since the only external

> users were non-modular IOMMU drivers. Although most of those symbols

> can remain private for now, 'pci_{enable,disable_ats()' is required for

> the ARM SMMUv3 driver to build as a module, otherwise we get a build

> failure as follows:

> 

>   | ERROR: "pci_enable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined!

>   | ERROR: "pci_disable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined!

> 

> Re-export these two functions so that the ARM SMMUv3 driver can be build

> as a module.

> 

> Cc: Bjorn Helgaas <bhelgaas@google.com>

> Cc: Joerg Roedel <jroedel@suse.de>

> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

> [will: rewrote commit message]

> Signed-off-by: Will Deacon <will@kernel.org>

> ---

>  drivers/pci/ats.c | 2 ++

>  1 file changed, 2 insertions(+)


Are you fine with this change? I would apply this series to my tree
then.

Regards,

	Joerg
Bjorn Helgaas Dec. 20, 2019, 3:03 p.m. UTC | #2
On Fri, Dec 20, 2019 at 09:43:03AM +0100, Joerg Roedel wrote:
> Hi Bjorn,

> 

> On Thu, Dec 19, 2019 at 12:03:39PM +0000, Will Deacon wrote:

> > From: Greg Kroah-Hartman <gregkh@google.com>

> > 

> > Commit d355bb209783 ("PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL()")

> > unexported a bunch of symbols from the PCI core since the only external

> > users were non-modular IOMMU drivers. Although most of those symbols

> > can remain private for now, 'pci_{enable,disable_ats()' is required for

> > the ARM SMMUv3 driver to build as a module, otherwise we get a build

> > failure as follows:

> > 

> >   | ERROR: "pci_enable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined!

> >   | ERROR: "pci_disable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined!

> > 

> > Re-export these two functions so that the ARM SMMUv3 driver can be build

> > as a module.

> > 

> > Cc: Bjorn Helgaas <bhelgaas@google.com>

> > Cc: Joerg Roedel <jroedel@suse.de>

> > Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

> > [will: rewrote commit message]

> > Signed-off-by: Will Deacon <will@kernel.org>

> > ---

> >  drivers/pci/ats.c | 2 ++

> >  1 file changed, 2 insertions(+)

> 

> Are you fine with this change? I would apply this series to my tree

> then.


Yep, thanks!  You can add my

Acked-by: Bjorn Helgaas <bhelgaas@google.com>
diff mbox series

Patch

diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c
index 982b46f0a54d..dcbcf1331bb2 100644
--- a/drivers/pci/ats.c
+++ b/drivers/pci/ats.c
@@ -69,6 +69,7 @@  int pci_enable_ats(struct pci_dev *dev, int ps)
 	dev->ats_enabled = 1;
 	return 0;
 }
+EXPORT_SYMBOL_GPL(pci_enable_ats);
 
 /**
  * pci_disable_ats - disable the ATS capability
@@ -87,6 +88,7 @@  void pci_disable_ats(struct pci_dev *dev)
 
 	dev->ats_enabled = 0;
 }
+EXPORT_SYMBOL_GPL(pci_disable_ats);
 
 void pci_restore_ats_state(struct pci_dev *dev)
 {