Message ID | 697da40c-7cdd-3d05-5846-37eae31bb729@mobiveil.co.in (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On Thu, 9 Nov 2017, subrahmanya_lingappa wrote: > From e38b741006856f3a3623109dd5ddf5f99326ce61 Mon Sep 17 00:00:00 2001 > From: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in> > Date: Thu, 9 Nov 2017 04:25:21 -0500 > Subject: [PATCH 1/2 v2] PCI: Mobiveil: export irq_set_msi_desc symbol > > This patch exports irq_set_msi_desc symbol which is used by > few PCIe root port drivers. And which one of those is modular? Thanks, tglx
tglx, On Thu, Nov 9, 2017 at 6:57 PM, Thomas Gleixner <tglx@linutronix.de> wrote: > On Thu, 9 Nov 2017, subrahmanya_lingappa wrote: > >> From e38b741006856f3a3623109dd5ddf5f99326ce61 Mon Sep 17 00:00:00 2001 >> From: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in> >> Date: Thu, 9 Nov 2017 04:25:21 -0500 >> Subject: [PATCH 1/2 v2] PCI: Mobiveil: export irq_set_msi_desc symbol >> >> This patch exports irq_set_msi_desc symbol which is used by >> few PCIe root port drivers. > > And which one of those is modular? > I think this one is, as I see at least 25 other files using it, albeit SoC devices. Hope I got the question right. > Thanks, > > tglx
On Fri, Nov 10, 2017 at 05:59:56AM +0530, Subrahmanya Lingappa wrote: > On Thu, Nov 9, 2017 at 6:57 PM, Thomas Gleixner <tglx@linutronix.de> wrote: > > On Thu, 9 Nov 2017, subrahmanya_lingappa wrote: > > > >> From e38b741006856f3a3623109dd5ddf5f99326ce61 Mon Sep 17 00:00:00 2001 > >> From: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in> > >> Date: Thu, 9 Nov 2017 04:25:21 -0500 > >> Subject: [PATCH 1/2 v2] PCI: Mobiveil: export irq_set_msi_desc symbol > >> > >> This patch exports irq_set_msi_desc symbol which is used by > >> few PCIe root port drivers. > > > > And which one of those is modular? > > I think this one is, as I see at least 25 other files using it, albeit > SoC devices. A modular driver would have "tristate" in its Kconfig. You mentioned pcie-xilinx.c, which has: obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o config PCIE_XILINX bool "Xilinx AXI PCIe host bridge support" It's "bool", so not modular, so it shouldn't require the EXPORT_SYMBOL(). You saw an undefined symbol error, though. Was that on an upstream kernel, or possibly some other kernel that has changes to make this driver modular? I don't think your mobiveil driver (as posted) requires this EXPORT_SYMBOL() either. Bjorn
Bjorn, On Fri, Nov 10, 2017 at 6:09 AM, Bjorn Helgaas <helgaas@kernel.org> wrote: > On Fri, Nov 10, 2017 at 05:59:56AM +0530, Subrahmanya Lingappa wrote: >> On Thu, Nov 9, 2017 at 6:57 PM, Thomas Gleixner <tglx@linutronix.de> wrote: >> > On Thu, 9 Nov 2017, subrahmanya_lingappa wrote: >> > >> >> From e38b741006856f3a3623109dd5ddf5f99326ce61 Mon Sep 17 00:00:00 2001 >> >> From: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in> >> >> Date: Thu, 9 Nov 2017 04:25:21 -0500 >> >> Subject: [PATCH 1/2 v2] PCI: Mobiveil: export irq_set_msi_desc symbol >> >> >> >> This patch exports irq_set_msi_desc symbol which is used by >> >> few PCIe root port drivers. >> > >> > And which one of those is modular? >> >> I think this one is, as I see at least 25 other files using it, albeit >> SoC devices. > > A modular driver would have "tristate" in its Kconfig. You mentioned > pcie-xilinx.c, which has: > > obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o > > config PCIE_XILINX > bool "Xilinx AXI PCIe host bridge support" > > It's "bool", so not modular, so it shouldn't require the > EXPORT_SYMBOL(). > > You saw an undefined symbol error, though. Was that on an upstream > kernel, or possibly some other kernel that has changes to make this > driver modular? > > I don't think your mobiveil driver (as posted) requires this > EXPORT_SYMBOL() either. > Agreed, I will drop this patch from my next driver revison. > Bjorn
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index be3c34e..c4222c4 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -137,6 +137,7 @@ int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry) return irq_set_msi_desc_off(irq, 0, entry); } +EXPORT_SYMBOL(irq_set_msi_desc); /** * irq_set_chip_data - set irq chip data for an irq