All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: imx6: fix SMP compilation again
@ 2014-07-22  8:30 Arnd Bergmann
  2014-07-22  8:50 ` Shawn Guo
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2014-07-22  8:30 UTC (permalink / raw)
  To: linux-arm-kernel

My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions
only when needed") fixed a problem with building an i.MX5 kernel,
but missed the corner case of building a kernel for i.MX5 with
SMP enabled. It is an extremely rare case that has only now
happened after many thousands of randconfig kernel builds.

The error message I get is
arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
:(.text+0x5124): undefined reference to `v7_invalidate_l1'

This puts the code inside of an "ifdef CONFIG_SMP" to hopefully
do the right thing in all configurations.

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

diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index ac88599ca080..23c02932bf84 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -93,9 +93,11 @@ obj-$(CONFIG_HAVE_IMX_ANATOP) += anatop.o
 obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
 obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
 obj-$(CONFIG_HAVE_IMX_SRC) += src.o
+ifdef CONFIG_SOC_IMX6
 AFLAGS_headsmp.o :=-Wa,-march=armv7-a
 obj-$(CONFIG_SMP) += headsmp.o platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
+endif
 obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
 obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o
 obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o mach-imx6sx.o

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

* [PATCH] ARM: imx6: fix SMP compilation again
  2014-07-22  8:30 [PATCH] ARM: imx6: fix SMP compilation again Arnd Bergmann
@ 2014-07-22  8:50 ` Shawn Guo
  2014-07-22 10:26   ` Arnd Bergmann
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Guo @ 2014-07-22  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 22, 2014 at 10:30:50AM +0200, Arnd Bergmann wrote:
> My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions
> only when needed") fixed a problem with building an i.MX5 kernel,
> but missed the corner case of building a kernel for i.MX5 with
> SMP enabled. It is an extremely rare case that has only now
> happened after many thousands of randconfig kernel builds.
> 
> The error message I get is
> arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
> :(.text+0x5124): undefined reference to `v7_invalidate_l1'

I cannot reproduce it, and unsure how it happens.

The v7_invalidate_l1() is defined in arch/arm/mm/cache-v7.S, and should
be available for i.MX5 build.

Shawn

> 
> This puts the code inside of an "ifdef CONFIG_SMP" to hopefully
> do the right thing in all configurations.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
> index ac88599ca080..23c02932bf84 100644
> --- a/arch/arm/mach-imx/Makefile
> +++ b/arch/arm/mach-imx/Makefile
> @@ -93,9 +93,11 @@ obj-$(CONFIG_HAVE_IMX_ANATOP) += anatop.o
>  obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
>  obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
>  obj-$(CONFIG_HAVE_IMX_SRC) += src.o
> +ifdef CONFIG_SOC_IMX6
>  AFLAGS_headsmp.o :=-Wa,-march=armv7-a
>  obj-$(CONFIG_SMP) += headsmp.o platsmp.o
>  obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
> +endif
>  obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
>  obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o
>  obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o mach-imx6sx.o
> 

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

* [PATCH] ARM: imx6: fix SMP compilation again
  2014-07-22  8:50 ` Shawn Guo
@ 2014-07-22 10:26   ` Arnd Bergmann
  2014-07-22 13:48     ` Shawn Guo
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2014-07-22 10:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 22 July 2014 16:50:56 Shawn Guo wrote:
> On Tue, Jul 22, 2014 at 10:30:50AM +0200, Arnd Bergmann wrote:
> > My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions
> > only when needed") fixed a problem with building an i.MX5 kernel,
> > but missed the corner case of building a kernel for i.MX5 with
> > SMP enabled. It is an extremely rare case that has only now
> > happened after many thousands of randconfig kernel builds.
> > 
> > The error message I get is
> > arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
> > :(.text+0x5124): undefined reference to `v7_invalidate_l1'
> 
> I cannot reproduce it, and unsure how it happens.
> 
> The v7_invalidate_l1() is defined in arch/arm/mm/cache-v7.S, and should
> be available for i.MX5 build.
> 

Ah, you are right, I got the text wrong here, and I think I now understand
why it didn't happen earlier. Updated patch below (same patch, new
text).

8<-------------
Subject: [PATCH] ARM: imx6: fix SMP compilation again

My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions
only when needed") fixed a problem with building an i.MX5 kernel,
but now the problem has returned for the case where we allow
ARMv6K SMP builds in multiplatform. With CONFIG_CPU_V7 disabled,
but i.MX3 and SMP enabled, we get this build error:

arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
:(.text+0x5124): undefined reference to `v7_invalidate_l1'

This puts the code inside of an "ifdef CONFIG_SMP" to hopefully
do the right thing in all configurations.

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

diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index ac88599ca080..23c02932bf84 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -93,9 +93,11 @@ obj-$(CONFIG_HAVE_IMX_ANATOP) += anatop.o
 obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
 obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
 obj-$(CONFIG_HAVE_IMX_SRC) += src.o
+ifdef CONFIG_SOC_IMX6
 AFLAGS_headsmp.o :=-Wa,-march=armv7-a
 obj-$(CONFIG_SMP) += headsmp.o platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
+endif
 obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
 obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o
 obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o mach-imx6sx.o

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

* [PATCH] ARM: imx6: fix SMP compilation again
  2014-07-22 10:26   ` Arnd Bergmann
@ 2014-07-22 13:48     ` Shawn Guo
  2014-07-22 14:31       ` Uwe Kleine-König
  2014-07-22 14:37       ` Arnd Bergmann
  0 siblings, 2 replies; 9+ messages in thread
From: Shawn Guo @ 2014-07-22 13:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 22, 2014 at 12:26:31PM +0200, Arnd Bergmann wrote:
> Ah, you are right, I got the text wrong here, and I think I now understand
> why it didn't happen earlier. Updated patch below (same patch, new
> text).
> 
> 8<-------------
> Subject: [PATCH] ARM: imx6: fix SMP compilation again
> 
> My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions
> only when needed") fixed a problem with building an i.MX5 kernel,
> but now the problem has returned for the case where we allow
> ARMv6K SMP builds in multiplatform. With CONFIG_CPU_V7 disabled,
> but i.MX3 and SMP enabled, we get this build error:

Maybe I missed something, but I have problem to get the following three
conditions meet in a single kernel configuration.

 a) CONFIG_CPU_V7 disabled
 b) i.MX3 enabled
 c) SMP enabled

When I get a) and b) in the config, I have no way to get c).  And it
seems that the only way to get a) and c) at the same time is to enable
MACH_REALVIEW_PB11MP, which is not part of multi-platform support.  So
i.MX3 cannot be enabled in there.

I tried both mainline and -next tree.  I really need some help to
reproduce the error first.

> 
> arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
> :(.text+0x5124): undefined reference to `v7_invalidate_l1'
> 
> This puts the code inside of an "ifdef CONFIG_SMP" to hopefully

The code says "ifdef CONFIG_SOC_IMX6"?

Shawn

> do the right thing in all configurations.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
> index ac88599ca080..23c02932bf84 100644
> --- a/arch/arm/mach-imx/Makefile
> +++ b/arch/arm/mach-imx/Makefile
> @@ -93,9 +93,11 @@ obj-$(CONFIG_HAVE_IMX_ANATOP) += anatop.o
>  obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
>  obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
>  obj-$(CONFIG_HAVE_IMX_SRC) += src.o
> +ifdef CONFIG_SOC_IMX6
>  AFLAGS_headsmp.o :=-Wa,-march=armv7-a
>  obj-$(CONFIG_SMP) += headsmp.o platsmp.o
>  obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
> +endif
>  obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
>  obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o mach-imx6sl.o
>  obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o mach-imx6sx.o
> 

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

* [PATCH] ARM: imx6: fix SMP compilation again
  2014-07-22 13:48     ` Shawn Guo
@ 2014-07-22 14:31       ` Uwe Kleine-König
  2014-07-22 14:37       ` Arnd Bergmann
  1 sibling, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2014-07-22 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 22, 2014 at 09:48:16PM +0800, Shawn Guo wrote:
> On Tue, Jul 22, 2014 at 12:26:31PM +0200, Arnd Bergmann wrote:
> > Ah, you are right, I got the text wrong here, and I think I now understand
> > why it didn't happen earlier. Updated patch below (same patch, new
> > text).
> > 
> > 8<-------------
> > Subject: [PATCH] ARM: imx6: fix SMP compilation again
> > 
> > My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions
> > only when needed") fixed a problem with building an i.MX5 kernel,
> > but now the problem has returned for the case where we allow
> > ARMv6K SMP builds in multiplatform. With CONFIG_CPU_V7 disabled,
> > but i.MX3 and SMP enabled, we get this build error:
> 
> Maybe I missed something, but I have problem to get the following three
> conditions meet in a single kernel configuration.
> 
>  a) CONFIG_CPU_V7 disabled
>  b) i.MX3 enabled
>  c) SMP enabled
> 
> When I get a) and b) in the config, I have no way to get c).  And it
> seems that the only way to get a) and c) at the same time is to enable
> MACH_REALVIEW_PB11MP, which is not part of multi-platform support.  So
> i.MX3 cannot be enabled in there.
> 
> I tried both mainline and -next tree.  I really need some help to
> reproduce the error first.
Without even looking at the patch, I think the key here is this part of
Arnd's commit log:

	for the case where we allow ARMv6K SMP builds in multiplatform
	...

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH] ARM: imx6: fix SMP compilation again
  2014-07-22 13:48     ` Shawn Guo
  2014-07-22 14:31       ` Uwe Kleine-König
@ 2014-07-22 14:37       ` Arnd Bergmann
  2014-07-22 14:52         ` Shawn Guo
  1 sibling, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2014-07-22 14:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 22 July 2014 21:48:16 Shawn Guo wrote:
> On Tue, Jul 22, 2014 at 12:26:31PM +0200, Arnd Bergmann wrote:
> > Ah, you are right, I got the text wrong here, and I think I now understand
> > why it didn't happen earlier. Updated patch below (same patch, new
> > text).
> > 
> > 8<-------------
> > Subject: [PATCH] ARM: imx6: fix SMP compilation again
> > 
> > My earlier patch 1fc593feaf8e ("ARM: imx: build i.MX6 functions
> > only when needed") fixed a problem with building an i.MX5 kernel,
> > but now the problem has returned for the case where we allow
> > ARMv6K SMP builds in multiplatform. With CONFIG_CPU_V7 disabled,
> > but i.MX3 and SMP enabled, we get this build error:
> 
> Maybe I missed something, but I have problem to get the following three
> conditions meet in a single kernel configuration.
> 
>  a) CONFIG_CPU_V7 disabled
>  b) i.MX3 enabled
>  c) SMP enabled
> 
> When I get a) and b) in the config, I have no way to get c).  And it
> seems that the only way to get a) and c) at the same time is to enable
> MACH_REALVIEW_PB11MP, which is not part of multi-platform support.  So
> i.MX3 cannot be enabled in there.

I have a patch series to make ARCH_REALVIEW multiplatform-enabled,
and I guess the condition can only be hit with these patches, or any
other that selects HAS_SMP.

> I tried both mainline and -next tree.  I really need some help to
> reproduce the error first.

My branch is at git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
in the randconfig-next branch. Sorry for the inconvenience.

> > arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
> > :(.text+0x5124): undefined reference to `v7_invalidate_l1'
> > 
> > This puts the code inside of an "ifdef CONFIG_SMP" to hopefully
> 
> The code says "ifdef CONFIG_SOC_IMX6"?

It seems I'm having a bad day. I'll fix it up.

	Arnd

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

* [PATCH] ARM: imx6: fix SMP compilation again
  2014-07-22 14:37       ` Arnd Bergmann
@ 2014-07-22 14:52         ` Shawn Guo
  2014-07-22 18:52           ` Arnd Bergmann
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Guo @ 2014-07-22 14:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 22, 2014 at 04:37:55PM +0200, Arnd Bergmann wrote:
> On Tuesday 22 July 2014 21:48:16 Shawn Guo wrote:
> > I tried both mainline and -next tree.  I really need some help to
> > reproduce the error first.
> 
> My branch is at git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
> in the randconfig-next branch. Sorry for the inconvenience.

Okay, I can see the error on your branch with the fixing patch reverted.

> 
> > > arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
> > > :(.text+0x5124): undefined reference to `v7_invalidate_l1'
> > > 
> > > This puts the code inside of an "ifdef CONFIG_SMP" to hopefully
> > 
> > The code says "ifdef CONFIG_SOC_IMX6"?
> 
> It seems I'm having a bad day. I'll fix it up.

With that fixed up,

Acked-by: Shawn Guo <shawn.guo@freescale.com>

Or let me know if you expect me to handle the patch.

Shawn

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

* [PATCH] ARM: imx6: fix SMP compilation again
  2014-07-22 14:52         ` Shawn Guo
@ 2014-07-22 18:52           ` Arnd Bergmann
  2014-07-23  5:02             ` Shawn Guo
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2014-07-22 18:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 22 July 2014 22:52:57 Shawn Guo wrote:
> On Tue, Jul 22, 2014 at 04:37:55PM +0200, Arnd Bergmann wrote:
> > On Tuesday 22 July 2014 21:48:16 Shawn Guo wrote:
> > > I tried both mainline and -next tree.  I really need some help to
> > > reproduce the error first.
> > 
> > My branch is at git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
> > in the randconfig-next branch. Sorry for the inconvenience.
> 
> Okay, I can see the error on your branch with the fixing patch reverted.
> 
> > 
> > > > arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
> > > > :(.text+0x5124): undefined reference to `v7_invalidate_l1'
> > > > 
> > > > This puts the code inside of an "ifdef CONFIG_SMP" to hopefully
> > > 
> > > The code says "ifdef CONFIG_SOC_IMX6"?
> > 
> > It seems I'm having a bad day. I'll fix it up.
> 
> With that fixed up,
> 
> Acked-by: Shawn Guo <shawn.guo@freescale.com>
> 
> Or let me know if you expect me to handle the patch.
> 

If you don't mind, just put it into your tree. I'm currently in the
middle of going through my older patches and don't want to lose this one.

	Arnd

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

* [PATCH] ARM: imx6: fix SMP compilation again
  2014-07-22 18:52           ` Arnd Bergmann
@ 2014-07-23  5:02             ` Shawn Guo
  0 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2014-07-23  5:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 22, 2014 at 08:52:58PM +0200, Arnd Bergmann wrote:
> On Tuesday 22 July 2014 22:52:57 Shawn Guo wrote:
> > On Tue, Jul 22, 2014 at 04:37:55PM +0200, Arnd Bergmann wrote:
> > > On Tuesday 22 July 2014 21:48:16 Shawn Guo wrote:
> > > > I tried both mainline and -next tree.  I really need some help to
> > > > reproduce the error first.
> > > 
> > > My branch is at git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
> > > in the randconfig-next branch. Sorry for the inconvenience.
> > 
> > Okay, I can see the error on your branch with the fixing patch reverted.
> > 
> > > 
> > > > > arch/arm/mach-imx/built-in.o: In function `v7_secondary_startup':
> > > > > :(.text+0x5124): undefined reference to `v7_invalidate_l1'
> > > > > 
> > > > > This puts the code inside of an "ifdef CONFIG_SMP" to hopefully
> > > > 
> > > > The code says "ifdef CONFIG_SOC_IMX6"?
> > > 
> > > It seems I'm having a bad day. I'll fix it up.
> > 
> > With that fixed up,
> > 
> > Acked-by: Shawn Guo <shawn.guo@freescale.com>
> > 
> > Or let me know if you expect me to handle the patch.
> > 
> 
> If you don't mind, just put it into your tree. I'm currently in the
> middle of going through my older patches and don't want to lose this one.

Okay, applied after fixing up the commit log.

Shawn

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

end of thread, other threads:[~2014-07-23  5:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22  8:30 [PATCH] ARM: imx6: fix SMP compilation again Arnd Bergmann
2014-07-22  8:50 ` Shawn Guo
2014-07-22 10:26   ` Arnd Bergmann
2014-07-22 13:48     ` Shawn Guo
2014-07-22 14:31       ` Uwe Kleine-König
2014-07-22 14:37       ` Arnd Bergmann
2014-07-22 14:52         ` Shawn Guo
2014-07-22 18:52           ` Arnd Bergmann
2014-07-23  5:02             ` Shawn Guo

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.