diff mbox

ARM: imx: select HAVE_IMX_SRC when SMP is enabled

Message ID 1350977942-15964-1-git-send-email-shawn.guo@linaro.org
State New
Headers show

Commit Message

Shawn Guo Oct. 23, 2012, 7:39 a.m. UTC
With being part of multi-platform support, SMP can be enabled by other
platform even when SOC_IMX6Q is deselected.  It leads to a situation
that arch/arm/mach-imx/platsmp.c is built without HAVE_IMX_SRC selection
which will cause build error.  For example, the following link errors
will be seen when building imx5 with other v7 platforms.

 arch/arm/mach-imx/built-in.o: In function `imx_cpu_die':
 platform-ahci-imx.c:(.text+0x219c): undefined reference to `imx_enable_cpu'
 arch/arm/mach-imx/built-in.o: In function `imx_boot_secondary':
 platform-ahci-imx.c:(.cpuinit.text+0x14): undefined reference to `imx_set_cpu_jump'
 platform-ahci-imx.c:(.cpuinit.text+0x20): undefined reference to `imx_enable_cpu'

Select HAVE_IMX_SRC as long as SMP is enabled to fix the problem.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 arch/arm/mach-imx/Kconfig |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Artem Bityutskiy Jan. 17, 2013, 10:48 a.m. UTC | #1
On Tue, 2012-10-23 at 15:39 +0800, Shawn Guo wrote:
> With being part of multi-platform support, SMP can be enabled by other
> platform even when SOC_IMX6Q is deselected.  It leads to a situation
> that arch/arm/mach-imx/platsmp.c is built without HAVE_IMX_SRC selection
> which will cause build error.  For example, the following link errors
> will be seen when building imx5 with other v7 platforms.
> 
>  arch/arm/mach-imx/built-in.o: In function `imx_cpu_die':
>  platform-ahci-imx.c:(.text+0x219c): undefined reference to `imx_enable_cpu'
>  arch/arm/mach-imx/built-in.o: In function `imx_boot_secondary':
>  platform-ahci-imx.c:(.cpuinit.text+0x14): undefined reference to `imx_set_cpu_jump'
>  platform-ahci-imx.c:(.cpuinit.text+0x20): undefined reference to `imx_enable_cpu'
> 
> Select HAVE_IMX_SRC as long as SMP is enabled to fix the problem.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

The build is still broken in Linus' tree...
Artem Bityutskiy Jan. 17, 2013, 10:52 a.m. UTC | #2
On Tue, 2012-10-23 at 15:39 +0800, Shawn Guo wrote:
> With being part of multi-platform support, SMP can be enabled by other
> platform even when SOC_IMX6Q is deselected.  It leads to a situation
> that arch/arm/mach-imx/platsmp.c is built without HAVE_IMX_SRC selection
> which will cause build error.  For example, the following link errors
> will be seen when building imx5 with other v7 platforms.
> 
>  arch/arm/mach-imx/built-in.o: In function `imx_cpu_die':
>  platform-ahci-imx.c:(.text+0x219c): undefined reference to `imx_enable_cpu'
>  arch/arm/mach-imx/built-in.o: In function `imx_boot_secondary':
>  platform-ahci-imx.c:(.cpuinit.text+0x14): undefined reference to `imx_set_cpu_jump'
>  platform-ahci-imx.c:(.cpuinit.text+0x20): undefined reference to `imx_enable_cpu'
> 
> Select HAVE_IMX_SRC as long as SMP is enabled to fix the problem.

Err, sorry, the issue I get is a bit different, but similar:

arch/arm/mach-imx/built-in.o: In function `imx6q_restart':
platform-spi_imx.c:(.text+0x2220): undefined reference to `imx_src_prepare_restart'
arch/arm/mach-imx/built-in.o: In function `imx6q_pm_enter':
platform-spi_imx.c:(.text+0x22e4): undefined reference to `imx_set_cpu_jump'
arch/arm/mach-imx/built-in.o: In function `imx6q_init_irq':
platform-spi_imx.c:(.init.text+0x7280): undefined reference to `imx_src_init'
make[1]: *** [vmlinux] Error 1
Shawn Guo Jan. 17, 2013, 10:56 a.m. UTC | #3
On Thu, Jan 17, 2013 at 12:52:16PM +0200, Artem Bityutskiy wrote:
> Err, sorry, the issue I get is a bit different, but similar:
> 
> arch/arm/mach-imx/built-in.o: In function `imx6q_restart':
> platform-spi_imx.c:(.text+0x2220): undefined reference to `imx_src_prepare_restart'
> arch/arm/mach-imx/built-in.o: In function `imx6q_pm_enter':
> platform-spi_imx.c:(.text+0x22e4): undefined reference to `imx_set_cpu_jump'
> arch/arm/mach-imx/built-in.o: In function `imx6q_init_irq':
> platform-spi_imx.c:(.init.text+0x7280): undefined reference to `imx_src_init'
> make[1]: *** [vmlinux] Error 1
> 
The fix [1] is on the way to mainline.

Shawn

[1] http://article.gmane.org/gmane.linux.ports.arm.kernel/209206
diff mbox

Patch

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 8c75bae..4f73866 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -72,7 +72,7 @@  config HAVE_IMX_MMDC
 	bool
 
 config HAVE_IMX_SRC
-	bool
+	def_bool y if SMP
 
 config IMX_HAVE_IOMUX_V1
 	bool
@@ -839,7 +839,6 @@  config SOC_IMX6Q
 	select HAVE_CAN_FLEXCAN if CAN
 	select HAVE_IMX_GPC
 	select HAVE_IMX_MMDC
-	select HAVE_IMX_SRC
 	select HAVE_SMP
 	select MFD_SYSCON
 	select PINCTRL