2010-12-20 08:21:32

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the final tree (mfd tree related)

Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/mfd/built-in.o: In function `__crc_pwm_free':
(*ABS*+0x24ba6d1e): multiple definition of `__crc_pwm_free'
drivers/mfd/built-in.o: In function `.pwm_free':
(.text+0x1a2bc): multiple definition of `.pwm_free'
drivers/misc/built-in.o:(.text+0x32e40): first defined here
drivers/mfd/built-in.o: In function `__crc_pwm_request':
(*ABS*+0xc1f4ec93): multiple definition of `__crc_pwm_request'
drivers/mfd/built-in.o: In function `__crc_pwm_enable':
(*ABS*+0x9d09808d): multiple definition of `__crc_pwm_enable'
drivers/mfd/built-in.o: In function `.pwm_enable':
(.text+0x1a348): multiple definition of `.pwm_enable'
drivers/misc/built-in.o:(.text+0x32eac): first defined here
drivers/mfd/built-in.o: In function `.pwm_request':
(.text+0x19ff4): multiple definition of `.pwm_request'
drivers/misc/built-in.o:(.text+0x32c80): first defined here
drivers/mfd/built-in.o: In function `pwm_config':
(.opd+0x1e48): multiple definition of `pwm_config'
drivers/misc/built-in.o:(.opd+0x4158): first defined here
drivers/mfd/built-in.o: In function `pwm_free':
(.opd+0x1e90): multiple definition of `pwm_free'
drivers/misc/built-in.o:(.opd+0x4128): first defined here
drivers/mfd/built-in.o: In function `pwm_request':
(.opd+0x1e60): multiple definition of `pwm_request'
drivers/misc/built-in.o:(.opd+0x40b0): first defined here
drivers/mfd/built-in.o: In function `__crc_pwm_disable':
(*ABS*+0xb0493b18): multiple definition of `__crc_pwm_disable'
drivers/mfd/built-in.o: In function `.pwm_disable':
(.text+0x1a1a4): multiple definition of `.pwm_disable'
drivers/misc/built-in.o:(.text+0x32d70): first defined here
drivers/mfd/built-in.o: In function `pwm_enable':
(.opd+0x1ea8): multiple definition of `pwm_enable'
drivers/misc/built-in.o:(.opd+0x4140): first defined here
drivers/mfd/built-in.o: In function `.pwm_config':
(.text+0x19ec8): multiple definition of `.pwm_config'
drivers/misc/built-in.o:(.text+0x32f8c): first defined here
drivers/mfd/built-in.o: In function `pwm_disable':
(.opd+0x1e78): multiple definition of `pwm_disable'
drivers/misc/built-in.o:(.opd+0x4110): first defined here
drivers/mfd/built-in.o: In function `__crc_pwm_config':
(*ABS*+0xc23f5b9): multiple definition of `__crc_pwm_config'

Probably caused by commit 665ba7cafa19e2e2596ace30edc75ebec882e82d ("mfd:
Remove ARCH_U8500 dependency from AB8500") which allowed this driver to
be built in on PowerPC ...

Some of the above symbols are global in more than one place in our code ...

I have reverted that commit for today.
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (2.65 kB)
(No filename) (490.00 B)
Download all attachments

2010-12-20 10:33:41

by Samuel Ortiz

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (mfd tree related)

Hi Stephen,

On Mon, Dec 20, 2010 at 07:21:21PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
Ok, I removed Mark's commit, the MFD tree should build fine now.
I'm keeping this one for whenever we'll have a proper pwm framework.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/

2010-12-20 10:52:07

by Mark Brown

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (mfd tree related)

On Mon, Dec 20, 2010 at 11:33:37AM +0100, Samuel Ortiz wrote:
> On Mon, Dec 20, 2010 at 07:21:21PM +1100, Stephen Rothwell wrote:

> > After merging the final tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:

> Ok, I removed Mark's commit, the MFD tree should build fine now.
> I'm keeping this one for whenever we'll have a proper pwm framework.

It doesn't need dropping I think, the driver should just need a
dependency on HAVE_PWM adding.

2010-12-20 12:18:47

by Mark Brown

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (mfd tree related)

On Mon, Dec 20, 2010 at 10:52:03AM +0000, Mark Brown wrote:
> On Mon, Dec 20, 2010 at 11:33:37AM +0100, Samuel Ortiz wrote:

> > Ok, I removed Mark's commit, the MFD tree should build fine now.
> > I'm keeping this one for whenever we'll have a proper pwm framework.

> It doesn't need dropping I think, the driver should just need a
> dependency on HAVE_PWM adding.

Meh, sorry, wrong way round.

2010-12-20 12:28:35

by Mark Brown

[permalink] [raw]
Subject: [PATCH] misc: Make AB8500_PWM driver depend on U8500 due to PWM breakage

Since we don't have a PWM API every PWM driver ends up exporting its
own version and we need to limit the platforms we try to build them on
in order to avoid multiple definitions. As the AB8500 is normally a
companion chip for the U8500 CPU depend on that architecture.

Previously the driver was relying on the AB8500 core only being built
on U8500 but this did not give us build coverage of any of the other
functions for the device.

Signed-off-by: Mark Brown <[email protected]>
---

Here's a better way of solving the problem, it means we can build the
MFD and all the other functions on other platforms and still exclude the
problematic PWM driver.

drivers/misc/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 4d073f1..736004d 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -64,7 +64,7 @@ config ATMEL_PWM

config AB8500_PWM
bool "AB8500 PWM support"
- depends on AB8500_CORE
+ depends on AB8500_CORE && ARCH_U8500
select HAVE_PWM
help
This driver exports functions to enable/disble/config/free Pulse
--
1.7.1

2010-12-20 13:00:11

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH] misc: Make AB8500_PWM driver depend on U8500 due to PWM breakage

Hi Mark,

On Mon, Dec 20, 2010 at 12:28:11PM +0000, Mark Brown wrote:
> Since we don't have a PWM API every PWM driver ends up exporting its
> own version and we need to limit the platforms we try to build them on
> in order to avoid multiple definitions. As the AB8500 is normally a
> companion chip for the U8500 CPU depend on that architecture.
>
> Previously the driver was relying on the AB8500 core only being built
> on U8500 but this did not give us build coverage of any of the other
> functions for the device.
>
> Signed-off-by: Mark Brown <[email protected]>
> ---
>
> Here's a better way of solving the problem,
Definitely nicer, yes. Patch applied, thanks a lot.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/