Skip to contentSkip to conversation

ARM: allmodconfig regressions in linux-next

PATCH New Arnd Bergmann 7 participants 14 messages Apr 23, 2013 – Jun 18, 2013

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: allmodconfig regressions in linux-next

Hi everyone,

These are a couple of simple patches to fix bugs that break allyesconfig and that are only present in linux-next at the moment. Please apply to the appropriate trees or provide feedback!

Arnd Bergmann (5):
mfd: ab8500: remove broken ab8500_debug_register_interrupt logic
usb: phy: phy core cannot yet be a module
ASoC: don't call of_dma_request_slave_channel directly
hwrng: bcm2835: fix MODULE_LICENSE tag
clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change

 drivers/char/hw_random/bcm2835-rng.c  |  2 +-
 drivers/clocksource/bcm_kona_timer.c  | 15 ++++-----------
 drivers/mfd/ab8500-debugfs.c          | 10 ----------
 drivers/usb/phy/Kconfig               |  2 +-
 sound/soc/soc-generic-dmaengine-pcm.c |  9 +++++----
 5 files changed, 11 insertions(+), 27 deletions(-)
Cc Christian Daudt <[email protected]>
Cc Dom Cobley <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Herbert Xu <[email protected]>
Cc John Stultz <[email protected]>
Cc Jonas ABERG <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Lee Jones <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Lubomir Rintel <[email protected]>
Cc Mark Brown <[email protected]>
Cc Matt Mackall <[email protected]>
Cc Mattias WALLIN <[email protected]>
Cc Per FORLIN <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Stephen Warren <[email protected]>
Cc srinidhi kasagar <[email protected]>
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 usb: phy: phy core cannot yet be a module

A lot of platform code calls into the usb phy core at the moment, which does not work if it is built as a loadable module. This will hopefully change when those platforms are all converted to DT based probing, but for now, the easiest solution is to change it from "tristate" to "bool".

This solves at least these ARM allmodconfig build errors:

arch/arm/mach-imx/built-in.o: In function `imx_otg_ulpi_create':
arch/arm/mach-imx/ulpi.c:117: undefined reference to otg_ulpi_create' arch/arm/mach-omap2/built-in.o: In function usbhs_init_phys':
arch/arm/mach-omap2/usb-host.c:652: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap_2430sdp_init':
arch/arm/mach-omap2/board-2430sdp.c:236: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap3_beagle_init':
arch/arm/mach-omap2/board-omap3beagle.c:554: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function devkit8000_init':
arch/arm/mach-omap2/board-devkit8000.c:596: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap_ldp_init':
arch/arm/mach-omap2/board-ldp.c:379: undefined reference to usb_bind_phy' drivers/built-in.o: In function ab8500_charger_probe':
drivers/power/ab8500_charger.c:3629: undefined reference to usb_get_phy' drivers/power/ab8500_charger.c:3706: undefined reference to usb_put_phy' drivers/built-in.o: In function `ab8500_charger_remove':
drivers/power/ab8500_charger.c:3411: undefined reference to `usb_put_phy'

Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/phy/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/Kconfig +1 -1
index 21153d1..371d0e7 100644
@@ -2,7 +2,7 @@
 # Physical Layer USB driver configuration
 #
 menuconfig USB_PHY
-	tristate "USB Physical Layer drivers"
+	bool "USB Physical Layer drivers"
 	help
 	  USB controllers (those which are host, device or DRD) need a
 	  device to handle the physical layer signalling, commonly called
Signature · 1 line
1.8.1.2
#6 lore raw

PATCH 1/1 ASoC: don't call of_dma_request_slave_channel directly

In reply to Arnd Bergmann

The exported interface for device drivers is dma_request_slave_channel, not of_dma_request_slave_channel. The former does not depend on device tree but also works with ACPI and other interfaces providing an abstraction for DMA channels.

This fixes link errors when building ALSA as a loadable module.

Cc Lars-Peter Clausen <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Mark Brown <[email protected]>
---
 sound/soc/soc-generic-dmaengine-pcm.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
sound/soc/soc-generic-dmaengine-pcm.c +5 -4
index 5fd5ed4..8ee9859 100644
@@ -219,19 +219,20 @@ static const char * const dmaengine_pcm_dma_channel_names[] = {
 };
 
 static void dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
-	struct device_node *of_node)
+	struct device *dev)
 {
 	unsigned int i;
+	struct device_node *of_node = dev->of_node;
 
 	if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !of_node)
 		return;
 
 	if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) {
-		pcm->chan[0] = of_dma_request_slave_channel(of_node, "tx_rx");
+		pcm->chan[0] = dma_request_slave_channel(dev, "tx_rx");
 		pcm->chan[1] = pcm->chan[0];
 	} else {
 		for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) {
-			pcm->chan[i] = of_dma_request_slave_channel(of_node,
+			pcm->chan[i] = dma_request_slave_channel(dev,
 					dmaengine_pcm_dma_channel_names[i]);
 		}
 	}
@@ -255,7 +256,7 @@ int snd_dmaengine_pcm_register(struct device *dev,
 	pcm->config = config;
 	pcm->flags = flags;
 
-	dmaengine_pcm_request_chan_of(pcm, dev->of_node);
+	dmaengine_pcm_request_chan_of(pcm, dev);
 
 	if (flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE)
 		return snd_soc_add_platform(dev, &pcm->platform,
Signature · 1 line
1.8.1.2
#10 lore raw

PATCH 1/1 hwrng: bcm2835: fix MODULE_LICENSE tag

In reply to Arnd Bergmann

The MODULE_LICENSE macro invocation must use either "GPL" or "GPL v2", but not "GPLv2" in order to be detected by the module loader.

This fixes the allmodconfig build error:

FATAL: modpost: GPL-incompatible module bcm2835-rng.ko uses GPL-only symbol 'platform_driver_unregister'

Cc Dom Cobley <[email protected]>
Cc Lubomir Rintel <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Matt Mackall <[email protected]>
Cc linux-rpi-kernel at lists.infradead.org
Cc Herbert Xu <[email protected]>
---
 drivers/char/hw_random/bcm2835-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/hw_random/bcm2835-rng.c +1 -1
index eb7f147..43577ca 100644
@@ -110,4 +110,4 @@ module_platform_driver(bcm2835_rng_driver);
 
 MODULE_AUTHOR("Lubomir Rintel <[email protected]>");
 MODULE_DESCRIPTION("BCM2835 Random Number Generator (RNG) driver");
-MODULE_LICENSE("GPLv2");
+MODULE_LICENSE("GPL v2");
Signature · 1 line
1.8.1.2
#12 lore raw

PATCH 1/1 clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change

In reply to Arnd Bergmann

The CLOCKSOURCE_OF_DECLARE functions now take a device_node pointer as their argument, as of the clksrc/cleanup branch in arm-soc. This patch adapts the bcm_kona_timer driver to the new interface.

Cc Christian Daudt <[email protected]>
Cc John Stultz <[email protected]>
---
 drivers/clocksource/bcm_kona_timer.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/clocksource/bcm_kona_timer.c +4 -11
index 350f493..ba3d859 100644
@@ -103,16 +103,10 @@ static const struct of_device_id bcm_timer_ids[] __initconst = {
 	{},
 };
 
-static void __init kona_timers_init(void)
+static void __init kona_timers_init(struct device_node *node)
 {
-	struct device_node *node;
 	u32 freq;
 
-	node = of_find_matching_node(NULL, bcm_timer_ids);
-
-	if (!node)
-		panic("No timer");
-
 	if (!of_property_read_u32(node, "clock-frequency", &freq))
 		arch_timer_rate = freq;
 	else
@@ -199,13 +193,12 @@ static struct irqaction kona_timer_irq = {
 	.handler = kona_timer_interrupt,
 };
 
-static void __init kona_timer_init(void)
+static void __init kona_timer_init(struct device_node *node)
 {
-	kona_timers_init();
+	kona_timers_init(node);
 	kona_timer_clockevents_init();
 	setup_irq(timers.tmr_irq, &kona_timer_irq);
 	kona_timer_set_next_event((arch_timer_rate / HZ), NULL);
 }
 
-CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer",
-	kona_timer_init);
+CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", kona_timer_init);
Signature · 1 line
1.8.1.2
maintainer
#7 lore raw

Re: [PATCH] ASoC: don't call of_dma_request_slave_channel directly

In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

The exported interface for device drivers is dma_request_slave_channel, not of_dma_request_slave_channel. The former does not depend on device tree but also works with ACPI and other interfaces providing an abstraction for DMA channels.

This fixes link errors when building ALSA as a loadable module.

This has already been changed separately, I'm surprised this applies against current code. Though one does have to wonder why it's in the header file if it's not a supported API...

Acked-by on v1 1/1
#2 lore raw

Re: [PATCH] usb: phy: phy core cannot yet be a module

In reply to Arnd Bergmann

Hi,

Quoted 39 lines · Arnd Bergmann

A lot of platform code calls into the usb phy core at the moment, which does not work if it is built as a loadable module. This will hopefully change when those platforms are all converted to DT based probing, but for now, the easiest solution is to change it from "tristate" to "bool".

This solves at least these ARM allmodconfig build errors:

arch/arm/mach-imx/built-in.o: In function `imx_otg_ulpi_create':
arch/arm/mach-imx/ulpi.c:117: undefined reference to otg_ulpi_create' arch/arm/mach-omap2/built-in.o: In function usbhs_init_phys':
arch/arm/mach-omap2/usb-host.c:652: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap_2430sdp_init':
arch/arm/mach-omap2/board-2430sdp.c:236: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap3_beagle_init':
arch/arm/mach-omap2/board-omap3beagle.c:554: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function devkit8000_init':
arch/arm/mach-omap2/board-devkit8000.c:596: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap_ldp_init':
arch/arm/mach-omap2/board-ldp.c:379: undefined reference to usb_bind_phy' drivers/built-in.o: In function ab8500_charger_probe':
drivers/power/ab8500_charger.c:3629: undefined reference to usb_get_phy' drivers/power/ab8500_charger.c:3706: undefined reference to usb_put_phy' drivers/built-in.o: In function `ab8500_charger_remove':
drivers/power/ab8500_charger.c:3411: undefined reference to `usb_put_phy'

Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/phy/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/Kconfig +0 -0
index 21153d1..371d0e7 100644

drivers/usb/phy/Kconfig line 5

Quoted 5 lines
drivers/usb/phy/Kconfig +1 -1
@@ -2,7 +2,7 @@
 # Physical Layer USB driver configuration
 #
 menuconfig USB_PHY
-	tristate "USB Physical Layer drivers"
+	bool "USB Physical Layer drivers"

looks like this is the only way, indeed. Do you need on the merge window on can this wait until -rc1 ? I just sent a pull request to Greg with urgent fixes for the merge window.

Greg, if you want to take this one as a patch, go for it:

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130423/036f247a/attachment.sig>
#3 lore raw

Re: [PATCH] usb: phy: phy core cannot yet be a module

Quoted 7 lines · Felipe Balbi

looks like this is the only way, indeed. Do you need on the merge window on can this wait until -rc1 ? I just sent a pull request to Greg with urgent fixes for the merge window.

Greg, if you want to take this one as a patch, go for it:

It's not relevant for real-life scenarios, it's fine as long as this makes it into 3.10.

Arnd

#4 lore raw

Re: [PATCH] usb: phy: phy core cannot yet be a module

Hi,

Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · Felipe Balbi

looks like this is the only way, indeed. Do you need on the merge window on can this wait until -rc1 ? I just sent a pull request to Greg with urgent fixes for the merge window.

Greg, if you want to take this one as a patch, go for it:

It's not relevant for real-life scenarios, it's fine as long as this makes it into 3.10.

sure, I can take this on -rc1 then.

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130423/4b0bef5f/attachment-0001.sig>
#5 lore raw

Re: [PATCH] usb: phy: phy core cannot yet be a module

In reply to Felipe Balbi
Quoted 52 lines · Felipe Balbi

Hi,

Quoted 39 lines · Arnd Bergmann

A lot of platform code calls into the usb phy core at the moment, which does not work if it is built as a loadable module. This will hopefully change when those platforms are all converted to DT based probing, but for now, the easiest solution is to change it from "tristate" to "bool".

This solves at least these ARM allmodconfig build errors:

arch/arm/mach-imx/built-in.o: In function `imx_otg_ulpi_create':
arch/arm/mach-imx/ulpi.c:117: undefined reference to otg_ulpi_create' arch/arm/mach-omap2/built-in.o: In function usbhs_init_phys':
arch/arm/mach-omap2/usb-host.c:652: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap_2430sdp_init':
arch/arm/mach-omap2/board-2430sdp.c:236: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap3_beagle_init':
arch/arm/mach-omap2/board-omap3beagle.c:554: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function devkit8000_init':
arch/arm/mach-omap2/board-devkit8000.c:596: undefined reference to usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function omap_ldp_init':
arch/arm/mach-omap2/board-ldp.c:379: undefined reference to usb_bind_phy' drivers/built-in.o: In function ab8500_charger_probe':
drivers/power/ab8500_charger.c:3629: undefined reference to usb_get_phy' drivers/power/ab8500_charger.c:3706: undefined reference to usb_put_phy' drivers/built-in.o: In function `ab8500_charger_remove':
drivers/power/ab8500_charger.c:3411: undefined reference to `usb_put_phy'

Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/phy/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/Kconfig +0 -0
index 21153d1..371d0e7 100644

drivers/usb/phy/Kconfig line 5

Quoted 5 lines
drivers/usb/phy/Kconfig +1 -1
@@ -2,7 +2,7 @@
 # Physical Layer USB driver configuration
 #
 menuconfig USB_PHY
-	tristate "USB Physical Layer drivers"
+	bool "USB Physical Layer drivers"

looks like this is the only way, indeed. Do you need on the merge window on can this wait until -rc1 ? I just sent a pull request to Greg with urgent fixes for the merge window.

Quoted 3 lines

Greg, if you want to take this one as a patch, go for it:

I'll take this now, thanks.

greg k-h

#8 lore raw

Re: [PATCH] ASoC: don't call of_dma_request_slave_channel directly

In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

The exported interface for device drivers is dma_request_slave_channel, not of_dma_request_slave_channel. The former does not depend on device tree but also works with ACPI and other interfaces providing an abstraction for DMA channels.

This fixes link errors when building ALSA as a loadable module.

I had already sent a similar patch [1] for that.

Shawn

[1] http://thread.gmane.org/gmane.linux.alsa.devel/107568/

Quoted 48 lines
Cc Lars-Peter Clausen <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Mark Brown <[email protected]>
---
 sound/soc/soc-generic-dmaengine-pcm.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
sound/soc/soc-generic-dmaengine-pcm.c +5 -4
index 5fd5ed4..8ee9859 100644
@@ -219,19 +219,20 @@ static const char * const dmaengine_pcm_dma_channel_names[] = {
 };
 
 static void dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
-	struct device_node *of_node)
+	struct device *dev)
 {
 	unsigned int i;
+	struct device_node *of_node = dev->of_node;
 
 	if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !of_node)
 		return;
 
 	if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) {
-		pcm->chan[0] = of_dma_request_slave_channel(of_node, "tx_rx");
+		pcm->chan[0] = dma_request_slave_channel(dev, "tx_rx");
 		pcm->chan[1] = pcm->chan[0];
 	} else {
 		for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) {
-			pcm->chan[i] = of_dma_request_slave_channel(of_node,
+			pcm->chan[i] = dma_request_slave_channel(dev,
 					dmaengine_pcm_dma_channel_names[i]);
 		}
 	}
@@ -255,7 +256,7 @@ int snd_dmaengine_pcm_register(struct device *dev,
 	pcm->config = config;
 	pcm->flags = flags;
 
-	dmaengine_pcm_request_chan_of(pcm, dev->of_node);
+	dmaengine_pcm_request_chan_of(pcm, dev);
 
 	if (flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE)
 		return snd_soc_add_platform(dev, &pcm->platform,
Signature · 1 line
1.8.1.2
#9 lore raw

Re: [PATCH] ASoC: don't call of_dma_request_slave_channel directly

Quoted 6 lines · Shawn Guo
Quoted 5 lines · Arnd Bergmann

The exported interface for device drivers is dma_request_slave_channel, not of_dma_request_slave_channel. The former does not depend on device tree but also works with ACPI and other interfaces providing an abstraction for DMA channels.

Quoted 6 lines
Quoted 3 lines

This fixes link errors when building ALSA as a loadable module.

I had already sent a similar patch [1] for that.

Yes, I see it in linux-next now.

Thanks,

Arnd

Acked-by Tested-by on v1 1/1
#13 lore raw

Re: [PATCH] clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change

In reply to Arnd Bergmann
Quoted 12 lines · Arnd Bergmann

The CLOCKSOURCE_OF_DECLARE functions now take a device_node pointer as their argument, as of the clksrc/cleanup branch in arm-soc. This patch adapts the bcm_kona_timer driver to the new interface.

Cc Christian Daudt <[email protected]>
Cc John Stultz <[email protected]>
---
  drivers/clocksource/bcm_kona_timer.c | 15 ++++-----------
  1 file changed, 4 insertions(+), 11 deletions(-)

drivers/clocksource/bcm_kona_timer.c static struct irqaction kona_timer_irq = { · line 204

Quoted 5 lines
drivers/clocksource/bcm_kona_timer.c +1 -2
...
 
-CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer",
-	kona_timer_init);
+CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", kona_timer_init);

thanks,
csd

Acked-by on v1 1/1
#11 lore raw

Re: [PATCH] hwrng: bcm2835: fix MODULE_LICENSE tag

In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

The MODULE_LICENSE macro invocation must use either "GPL" or "GPL v2", but not "GPLv2" in order to be detected by the module loader.

This fixes the allmodconfig build error:

FATAL: modpost: GPL-incompatible module bcm2835-rng.ko uses GPL-only symbol 'platform_driver_unregister'

Thank you, obviously a typo of mine that slipped through. I'm wondering if this could get queued for 3.10; it definitely can't do any harm.

Quoted 22 lines
Cc Dom Cobley <[email protected]>
Cc Lubomir Rintel <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Matt Mackall <[email protected]>
Cc linux-rpi-kernel at lists.infradead.org
Cc Herbert Xu <[email protected]>
---
 drivers/char/hw_random/bcm2835-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/hw_random/bcm2835-rng.c +1 -1
index eb7f147..43577ca 100644
@@ -110,4 +110,4 @@ module_platform_driver(bcm2835_rng_driver);
 
 MODULE_AUTHOR("Lubomir Rintel <[email protected]>");
 MODULE_DESCRIPTION("BCM2835 Random Number Generator (RNG) driver");
-MODULE_LICENSE("GPLv2");
+MODULE_LICENSE("GPL v2");