public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Shawn Guo <shawn.guo@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, arm@kernel.org,
	Liam Girdwood <lrg@ti.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 05/15] ASoC: fsl: fiq and dma cannot both be modules
Date: Tue, 5 Feb 2013 16:21:12 +0000	[thread overview]
Message-ID: <201302051621.12320.arnd@arndb.de> (raw)
In-Reply-To: <20130122063331.GA1766@opensource.wolfsonmicro.com>

On Tuesday 22 January 2013, Mark Brown wrote:
>   Show Details
>   On Tue, Jan 22, 2013 at 11:50:30AM +0800, Shawn Guo wrote:
> > On Mon, Jan 21, 2013 at 05:15:58PM +0000, Arnd Bergmann wrote:
> 
> > > Without this patch, we cannot build the ARM 'allmodconfig', or
> > > we get this error:
> 
> > > sound/soc/fsl/imx-pcm-dma.o: In function `init_module':
> > > sound/soc/fsl/imx-pcm-dma.c:177: multiple definition of `init_module'
> > > sound/soc/fsl/imx-pcm-fiq.o:sound/soc/fsl/imx-pcm-fiq.c:334: first defined here
> > > sound/soc/fsl/imx-pcm-dma.o: In function `cleanup_module':
> > > sound/soc/fsl/imx-pcm-dma.c:177: multiple definition of `cleanup_module'
> > > sound/soc/fsl/imx-pcm-fiq.o:sound/soc/fsl/imx-pcm-fiq.c:334: first defined here
> 
> > I sent a fix [1] for that queued by Mark.
> 
> > Mark,
> 
> > Is the patch on the way to 3.8-rc?
> 
> Yes, should be.
>   

Hmm, I tried building 3.8-rc again, which contains the fix to make
'make allmodconfig' work with this code, but it broke 'make allyesconfig', which
was working before :(

8<----------
Subject: [PATCH] ASoC: fsl: fix allyesconfig build for imx-pcm

Patch 25b8d314 "ASoC: fsl: fix multiple definition of init_module changed
the Makefile for imx-pcm.ko to build two modules that both contain the
imx-pcm.c file, which nicely solves the problem of building both versions
of the driver as modules, but it causes two new problems:

1. Since imx-pcm.c is now used in two different modules, Kbuild no longer
sets the KBUILD_MODNAME symbol when building the object file, which makes
it impossible to use dynamic pr_debug code, resulting in this error

sound/soc/fsl/imx-pcm.c: In function 'snd_imx_pcm_mmap':
sound/soc/fsl/imx-pcm.c:28:121: error: 'KBUILD_MODNAME' undeclared (first use in this function)
sound/soc/fsl/imx-pcm.c:28:121: note: each undeclared identifier is reported only once for each function it appears insound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `imx_pcm_free':

2. If we don't use the dynamic debug code, we get a link error since we now
try to link together the same file into built-in.o twice:

sound/soc/fsl/imx-pcm.c:80: multiple definition of `imx_pcm_free'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:/sound/soc/fsl/imx-pcm.c:80: first defined here
sound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `snd_imx_pcm_mmap':
sound/soc/fsl/imx-pcm.c:21: multiple definition of `snd_imx_pcm_mmap'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:/sound/soc/fsl/imx-pcm.c:21: first defined here
sound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `imx_pcm_new':
sound/soc/fsl/imx-pcm.c:52: multiple definition of `imx_pcm_new'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:/sound/soc/fsl/imx-pcm.c:52: first defined here

I originally suggested disallowing the selection of both the DMA and FIQ
code in the same kernel. That is not very nice, but it resolves the
build error for both built-in and modular code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index e24e417..3f20cb7 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -122,7 +122,7 @@ config SND_SOC_IMX_AUDMUX
 config SND_MXC_SOC_WM1133_EV1
 	tristate "Audio on the i.MX31ADS with WM1133-EV1 fitted"
 	depends on MACH_MX31ADS_WM1133_EV1
-	depends on !SND_SOC_IMX_PCM_DMA || SND_IMX_SOC=y
+	depends on !SND_SOC_IMX_PCM_DMA
 	select SND_SOC_WM8350
 	select SND_SOC_IMX_PCM_FIQ
 	select SND_SOC_IMX_AUDMUX
@@ -145,7 +145,7 @@ config SND_SOC_MX27VIS_AIC32X4
 config SND_SOC_PHYCORE_AC97
 	tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards"
 	depends on MACH_PCM043 || MACH_PCA100
-	depends on !SND_SOC_IMX_PCM_DMA || SND_IMX_SOC=y
+	depends on !SND_SOC_IMX_PCM_DMA
 	select SND_SOC_AC97_BUS
 	select SND_SOC_WM9712
 	select SND_SOC_IMX_PCM_FIQ
@@ -162,7 +162,7 @@ config SND_SOC_EUKREA_TLV320
 		|| MACH_EUKREA_MBIMXSD35_BASEBOARD \
 		|| MACH_EUKREA_MBIMXSD51_BASEBOARD
 	depends on I2C
-	depends on !SND_SOC_IMX_PCM_DMA || SND_IMX_SOC=y
+	depends on !SND_SOC_IMX_PCM_DMA
 	select SND_SOC_TLV320AIC23
 	select SND_SOC_IMX_PCM_FIQ
 	select SND_SOC_IMX_AUDMUX
diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index ec14579..ddd9076 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -30,13 +30,6 @@ obj-$(CONFIG_SND_MPC52xx_SOC_EFIKA) += efika-audio-fabric.o
 # i.MX Platform Support
 snd-soc-imx-ssi-objs := imx-ssi.o
 snd-soc-imx-audmux-objs := imx-audmux.o
-snd-soc-imx-pcm-objs := imx-pcm.o
-ifneq ($(CONFIG_SND_SOC_IMX_PCM_FIQ),)
-	snd-soc-imx-pcm-objs += imx-pcm-fiq.o
-endif
-ifneq ($(CONFIG_SND_SOC_IMX_PCM_DMA),)
-	snd-soc-imx-pcm-objs += imx-pcm-dma.o
-endif
 
 obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o
 obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o

  parent reply	other threads:[~2013-02-05 16:21 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 17:15 [PATCH 00/15] ARM build regressions in v3.8 Arnd Bergmann
2013-01-21 17:15 ` [PATCH 01/15] ARM: compressed/head.S: work around new binutils warning Arnd Bergmann
2013-01-21 17:15 ` [PATCH 02/15] ARM: mvebu: build coherency_ll.S for arch=armv7-a Arnd Bergmann
2013-01-21 19:03   ` Tony Lindgren
2013-01-21 20:16     ` Arnd Bergmann
2013-01-21 17:15 ` [PATCH 03/15] ARM: samsung: fix assembly syntax for new gas Arnd Bergmann
2013-01-21 17:15 ` [PATCH 04/15] ARM: w90x900: fix legacy assembly syntax Arnd Bergmann
2013-01-21 17:15 ` [PATCH 05/15] ASoC: fsl: fiq and dma cannot both be modules Arnd Bergmann
2013-01-22  3:50   ` Shawn Guo
2013-01-22  6:33     ` Mark Brown
2013-01-22  8:21       ` Arnd Bergmann
2013-02-05 16:21       ` Arnd Bergmann [this message]
2013-02-05 16:42         ` [PATCH] ASoC: fsl: fix allyesconfig build for imx-pcm Arnd Bergmann
2013-02-06  4:02           ` Shawn Guo
2013-02-06  8:58             ` Arnd Bergmann
2013-01-21 17:15 ` [PATCH 06/15] clk: export __clk_get_name Arnd Bergmann
2013-01-21 20:51   ` Ulf Hansson
2013-01-22 10:54   ` Fabio Estevam
2013-01-22 15:43     ` Arnd Bergmann
2013-02-14 17:41       ` Arnd Bergmann
2013-01-21 17:16 ` [PATCH 07/15] drm/exynos: don't include plat/gpio-cfg.h Arnd Bergmann
2013-01-21 17:16 ` [PATCH 08/15] drm/exynos: fimd and ipp are broken on multiplatform Arnd Bergmann
2013-01-22  1:26   ` Inki Dae
2013-01-21 17:16 ` [PATCH 09/15] media: coda: don't build " Arnd Bergmann
2013-01-22  3:54   ` Shawn Guo
2013-01-22 12:32     ` Mauro Carvalho Chehab
2013-01-22 12:34       ` Mauro Carvalho Chehab
2013-01-22  8:21   ` Sascha Hauer
2013-01-22 15:41     ` Arnd Bergmann
2013-01-21 17:16 ` [PATCH 10/15] mfd/vexpress: export vexpress_config_func_{put,get} Arnd Bergmann
2013-01-21 17:23   ` Pawel Moll
2013-01-21 17:16 ` [PATCH 11/15] mtd: davinci_nand: fix OF support Arnd Bergmann
2013-01-21 21:37   ` Heiko Schocher
2013-01-21 21:50     ` Arnd Bergmann
2013-01-21 17:16 ` [PATCH 12/15] USB: gadget/freescale: disable non-multiplatform drivers Arnd Bergmann
2013-01-21 18:41   ` Felipe Balbi
2013-01-21 18:57     ` Greg Kroah-Hartman
2013-01-21 19:00       ` Felipe Balbi
2013-01-21 20:15       ` Arnd Bergmann
2013-02-05 16:27       ` Arnd Bergmann
2013-02-05 17:00         ` Greg Kroah-Hartman
2013-02-05 21:37           ` Felipe Balbi
2013-02-05 22:54             ` Arnd Bergmann
2013-02-06  1:55               ` Greg Kroah-Hartman
2013-02-06  7:06                 ` Felipe Balbi
2013-01-21 17:16 ` [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist Arnd Bergmann
2013-01-21 18:42   ` Felipe Balbi
2013-01-21 20:11     ` Alan Stern
2013-01-21 21:37       ` Arnd Bergmann
2013-01-22  6:11         ` Shawn Guo
2013-01-22  6:14           ` Shawn Guo
2013-01-22 15:30           ` Alan Stern
2013-01-21 20:14     ` Arnd Bergmann
2013-01-21 20:35       ` Alan Stern
2013-01-21 21:49         ` Arnd Bergmann
2013-01-22  3:39           ` Alan Stern
2013-01-21 17:16 ` [PATCH 14/15] samples/seccomp: be less stupid about cross compiling Arnd Bergmann
2013-01-22 21:20   ` Kees Cook
2013-01-28 14:26     ` Will Drewry
2013-01-21 17:16 ` [PATCH 15/15] staging/omapdrm: don't build on multiplatform Arnd Bergmann
2013-01-21 17:26   ` Rob Clark
2013-01-21 17:29     ` Rob Clark
2013-01-21 17:41     ` Arnd Bergmann
2013-01-21 18:39       ` Rob Clark
2013-01-21 20:09         ` Arnd Bergmann
2013-01-22 16:53         ` Greg Kroah-Hartman
2013-01-22 16:57           ` Rob Clark
2013-01-22 17:30             ` Greg Kroah-Hartman
2013-01-22 17:47               ` Arnd Bergmann
2013-01-22 18:16                 ` Rob Clark
2013-01-22 21:07                   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201302051621.12320.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arm@kernel.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=shawn.guo@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox