All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [RFC] irqchip or mfd/tps65217: fix link error
@ 2016-09-14  8:22 Arnd Bergmann
  2016-09-14  9:31 ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-09-14  8:22 UTC (permalink / raw)
  To: Lee Jones, Thomas Gleixner
  Cc: Arnd Bergmann, Andrew F. Davis, Marc Zyngier, Daniel Lezcano,
	linux-kernel

Building tps65217 as a loadable module (as done in allmodconfig)
now fails after we started calling irq_set_parent():

  ERROR: "irq_set_parent" [drivers/mfd/tps65217.ko] undefined!

The two obvious workarounds are either to force the driver
to be built-in, or to make that symbol exported to modules.

As it's not clear to me if either of them would be acceptable,
I'm sending both of them here, please comment on which one
you want to have, or whether the driver should handle this
differently and not call irq_set_parent() at all.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 262d5cc6ceb2 ("mfd: tps65217: Add support for IRQs")
---
 drivers/mfd/Kconfig | 2 +-
 kernel/irq/manage.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index be1945a42dd1..9a4cef5a2ece 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1229,7 +1229,7 @@ config MFD_TPS65090
 	  functionality of the device.
 
 config MFD_TPS65217
-	tristate "TI TPS65217 Power Management / White LED chips"
+	bool "TI TPS65217 Power Management / White LED chips"
 	depends on I2C
 	select MFD_CORE
 	select REGMAP_I2C
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0c5f1a5db654..9c4d30483264 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -721,6 +721,7 @@ int irq_set_parent(int irq, int parent_irq)
 	irq_put_desc_unlock(desc, flags);
 	return 0;
 }
+EXPORT_SYMBOL_GPL(irq_set_parent);
 #endif
 
 /*
-- 
2.9.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [RFC] irqchip or mfd/tps65217: fix link error
  2016-09-14  8:22 [PATCH] [RFC] irqchip or mfd/tps65217: fix link error Arnd Bergmann
@ 2016-09-14  9:31 ` Thomas Gleixner
  2016-09-14 13:56   ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2016-09-14  9:31 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Lee Jones, Andrew F. Davis, Marc Zyngier, Daniel Lezcano, linux-kernel

On Wed, 14 Sep 2016, Arnd Bergmann wrote:
> Building tps65217 as a loadable module (as done in allmodconfig)
> now fails after we started calling irq_set_parent():
> 
>   ERROR: "irq_set_parent" [drivers/mfd/tps65217.ko] undefined!
> 
> The two obvious workarounds are either to force the driver
> to be built-in, or to make that symbol exported to modules.
> 
> As it's not clear to me if either of them would be acceptable,
> I'm sending both of them here, please comment on which one
> you want to have, or whether the driver should handle this
> differently and not call irq_set_parent() at all.

The question is why it needs to call that. But if it's justified, then I'm
not opposed to export it.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [RFC] irqchip or mfd/tps65217: fix link error
  2016-09-14  9:31 ` Thomas Gleixner
@ 2016-09-14 13:56   ` Arnd Bergmann
  2016-09-14 15:09     ` Marcin Niestroj
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-09-14 13:56 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Lee Jones, Andrew F. Davis, Marc Zyngier, Daniel Lezcano,
	linux-kernel, Marcin Niestroj, Grygorii Strashko, Tony Lindgren

On Wednesday, September 14, 2016 11:31:17 AM CEST Thomas Gleixner wrote:
> On Wed, 14 Sep 2016, Arnd Bergmann wrote:
> > Building tps65217 as a loadable module (as done in allmodconfig)
> > now fails after we started calling irq_set_parent():
> > 
> >   ERROR: "irq_set_parent" [drivers/mfd/tps65217.ko] undefined!
> > 
> > The two obvious workarounds are either to force the driver
> > to be built-in, or to make that symbol exported to modules.
> > 
> > As it's not clear to me if either of them would be acceptable,
> > I'm sending both of them here, please comment on which one
> > you want to have, or whether the driver should handle this
> > differently and not call irq_set_parent() at all.
> 
> The question is why it needs to call that. But if it's justified, then I'm
> not opposed to export it.

Ok. I just noticed that I forgot to put the right people on Cc
that worked on the patch originally, fixed that now.

My other approach of making the symbol "bool" in the meantime has
caused another problem when CONFIG_I2C=m:

drivers/mfd/tps65217.o: In function `tps65217_init':
tps65217.c:(.init.text+0x8): undefined reference to `i2c_register_driver'
drivers/mfd/tps65217.o: In function `tps65217_probe':
tps65217.c:(.text.tps65217_probe+0x94): undefined reference to `__devm_regmap_init_i2c'

so the dependency would be "depends on I2C=y", getting increasingly
ugly. I'll let Marcin or Grygorii reply on why the call is needed,
we can then either export the symbol or change the code.

	Arnd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [RFC] irqchip or mfd/tps65217: fix link error
  2016-09-14 13:56   ` Arnd Bergmann
@ 2016-09-14 15:09     ` Marcin Niestroj
  0 siblings, 0 replies; 4+ messages in thread
From: Marcin Niestroj @ 2016-09-14 15:09 UTC (permalink / raw)
  To: Arnd Bergmann, Thomas Gleixner
  Cc: Lee Jones, Andrew F. Davis, Marc Zyngier, Daniel Lezcano,
	linux-kernel, Grygorii Strashko, Tony Lindgren

On 14.09.2016 15:56, Arnd Bergmann wrote:
> On Wednesday, September 14, 2016 11:31:17 AM CEST Thomas Gleixner wrote:
>> On Wed, 14 Sep 2016, Arnd Bergmann wrote:
>>> Building tps65217 as a loadable module (as done in allmodconfig)
>>> now fails after we started calling irq_set_parent():
>>>
>>>   ERROR: "irq_set_parent" [drivers/mfd/tps65217.ko] undefined!
>>>
>>> The two obvious workarounds are either to force the driver
>>> to be built-in, or to make that symbol exported to modules.
>>>
>>> As it's not clear to me if either of them would be acceptable,
>>> I'm sending both of them here, please comment on which one
>>> you want to have, or whether the driver should handle this
>>> differently and not call irq_set_parent() at all.
>>
>> The question is why it needs to call that. But if it's justified, then I'm
>> not opposed to export it.
>
> Ok. I just noticed that I forgot to put the right people on Cc
> that worked on the patch originally, fixed that now.
>
> My other approach of making the symbol "bool" in the meantime has
> caused another problem when CONFIG_I2C=m:
>
> drivers/mfd/tps65217.o: In function `tps65217_init':
> tps65217.c:(.init.text+0x8): undefined reference to `i2c_register_driver'
> drivers/mfd/tps65217.o: In function `tps65217_probe':
> tps65217.c:(.text.tps65217_probe+0x94): undefined reference to `__devm_regmap_init_i2c'
>
> so the dependency would be "depends on I2C=y", getting increasingly
> ugly. I'll let Marcin or Grygorii reply on why the call is needed,
> we can then either export the symbol or change the code.
>
> 	Arnd
>

I have added irq_set_parent() similarly as in 
drivers/base/regmap/regmap-irq.c

But to be honest I am not sure what it really does in case of tps65217.

-- 
Marcin Niestroj

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-14 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14  8:22 [PATCH] [RFC] irqchip or mfd/tps65217: fix link error Arnd Bergmann
2016-09-14  9:31 ` Thomas Gleixner
2016-09-14 13:56   ` Arnd Bergmann
2016-09-14 15:09     ` Marcin Niestroj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.