diff mbox series

[1/2,v2] PCI: Mobiveil: export irq_set_msi_desc symbol

Message ID 697da40c-7cdd-3d05-5846-37eae31bb729@mobiveil.co.in
State Not Applicable
Headers show
Series [1/2,v2] PCI: Mobiveil: export irq_set_msi_desc symbol | expand

Commit Message

Subrahmanya Lingappa Nov. 9, 2017, 12:03 p.m. UTC
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.

Cc: bhelgaas@google.com
Cc: tglx@linutronix.de

Signed-off-by: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
---
  kernel/irq/chip.c | 1 +
  1 file changed, 1 insertion(+)

   *	@irq:	Interrupt number

Comments

Thomas Gleixner Nov. 9, 2017, 1:27 p.m. UTC | #1
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
Subrahmanya Lingappa Nov. 10, 2017, 12:29 a.m. UTC | #2
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
Bjorn Helgaas Nov. 10, 2017, 12:39 a.m. UTC | #3
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
Subrahmanya Lingappa Nov. 10, 2017, 5:50 a.m. UTC | #4
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 mbox series

Patch

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