All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n
@ 2012-07-06  8:20 Magnus Damm
  2012-07-06 10:03 ` Simon Horman
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Magnus Damm @ 2012-07-06  8:20 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

Fix build error in the case of SMP=y but ARCH_SH73A0=n
introduced by:

9601e87 ARM: shmobile: fix smp build

The use of of_machine_is_compatible() will link in the
the SoC-specific symbols:
"sh73a0_get_core_count", "sh73a0_smp_prepare_cpus",
"sh73a0_secondary_init" and "sh73a0_boot_secondary".

This patch adds an ugly #ifdef wrapper as a stop-gap
solution.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/platsmp.c |    5 +++++
 1 file changed, 5 insertions(+)

--- 0001/arch/arm/mach-shmobile/platsmp.c
+++ work/arch/arm/mach-shmobile/platsmp.c	2012-07-06 16:37:30.000000000 +0900
@@ -22,8 +22,13 @@
 #include <mach/common.h>
 #include <mach/emev2.h>
 
+#ifdef CONFIG_ARCH_SH73A0
 #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
 			of_machine_is_compatible("renesas,sh73a0"))
+#else
+#define is_sh73a0() (0)
+#endif
+
 #define is_r8a7779() machine_is_marzen()
 
 #ifdef CONFIG_ARCH_EMEV2

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

* Re: [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n
  2012-07-06  8:20 [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n Magnus Damm
@ 2012-07-06 10:03 ` Simon Horman
  2012-07-06 15:35 ` Arnd Bergmann
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2012-07-06 10:03 UTC (permalink / raw)
  To: linux-sh

On Fri, Jul 06, 2012 at 05:20:05PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Fix build error in the case of SMP=y but ARCH_SH73A0=n
> introduced by:
> 
> 9601e87 ARM: shmobile: fix smp build
> 
> The use of of_machine_is_compatible() will link in the
> the SoC-specific symbols:
> "sh73a0_get_core_count", "sh73a0_smp_prepare_cpus",
> "sh73a0_secondary_init" and "sh73a0_boot_secondary".
> 
> This patch adds an ugly #ifdef wrapper as a stop-gap
> solution.

I will be happier once we have a more permanent solution :^)

> 
> Signed-off-by: Magnus Damm <damm@opensource.se>

Tested-by: Simon Horman <horms@verge.net.au>

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

* Re: [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n
  2012-07-06  8:20 [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n Magnus Damm
  2012-07-06 10:03 ` Simon Horman
@ 2012-07-06 15:35 ` Arnd Bergmann
  2012-07-06 18:40 ` Rafael J. Wysocki
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2012-07-06 15:35 UTC (permalink / raw)
  To: linux-sh

On Friday 06 July 2012, Simon Horman wrote:
> On Fri, Jul 06, 2012 at 05:20:05PM +0900, Magnus Damm wrote:
> > From: Magnus Damm <damm@opensource.se>
> > 
> > Fix build error in the case of SMP=y but ARCH_SH73A0=n
> > introduced by:
> > 
> > 9601e87 ARM: shmobile: fix smp build
> > 
> > The use of of_machine_is_compatible() will link in the
> > the SoC-specific symbols:
> > "sh73a0_get_core_count", "sh73a0_smp_prepare_cpus",
> > "sh73a0_secondary_init" and "sh73a0_boot_secondary".
> > 
> > This patch adds an ugly #ifdef wrapper as a stop-gap
> > solution.
> 
> I will be happier once we have a more permanent solution :^)

That should not take too long. Marc Zyngier has posted a number
of versions of his SMP abstraction that will remove the need
for the multiplexer.

> > Signed-off-by: Magnus Damm <damm@opensource.se>
> 
> Tested-by: Simon Horman <horms@verge.net.au>
> 

It can actually be written a little nicer now, like

#define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
                       (IS_ENABLED(CONFIG_ARCH_SH73A0) && \
			of_machine_is_compatible("renesas,sh73a0")))

but that won't work for the backport and it's still a little
ugly.

	Arnd

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

* Re: [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n
  2012-07-06  8:20 [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n Magnus Damm
  2012-07-06 10:03 ` Simon Horman
  2012-07-06 15:35 ` Arnd Bergmann
@ 2012-07-06 18:40 ` Rafael J. Wysocki
  2012-07-06 20:02 ` Arnd Bergmann
  2012-07-06 20:32 ` Rafael J. Wysocki
  4 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2012-07-06 18:40 UTC (permalink / raw)
  To: linux-sh

Hi,

On Friday, July 06, 2012, Arnd Bergmann wrote:
> On Friday 06 July 2012, Simon Horman wrote:
> > On Fri, Jul 06, 2012 at 05:20:05PM +0900, Magnus Damm wrote:
> > > From: Magnus Damm <damm@opensource.se>
> > > 
> > > Fix build error in the case of SMP=y but ARCH_SH73A0=n
> > > introduced by:
> > > 
> > > 9601e87 ARM: shmobile: fix smp build
> > > 
> > > The use of of_machine_is_compatible() will link in the
> > > the SoC-specific symbols:
> > > "sh73a0_get_core_count", "sh73a0_smp_prepare_cpus",
> > > "sh73a0_secondary_init" and "sh73a0_boot_secondary".
> > > 
> > > This patch adds an ugly #ifdef wrapper as a stop-gap
> > > solution.
> > 
> > I will be happier once we have a more permanent solution :^)
> 
> That should not take too long. Marc Zyngier has posted a number
> of versions of his SMP abstraction that will remove the need
> for the multiplexer.
> 
> > > Signed-off-by: Magnus Damm <damm@opensource.se>
> > 
> > Tested-by: Simon Horman <horms@verge.net.au>
> > 
> 
> It can actually be written a little nicer now, like
> 
> #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
>                        (IS_ENABLED(CONFIG_ARCH_SH73A0) && \
> 			of_machine_is_compatible("renesas,sh73a0")))
> 
> but that won't work for the backport and it's still a little
> ugly.

Can you please take the $subject patch directly to the fixes branch?
Or do you want me to generate a pull request with just this one patch?

Rafael

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

* Re: [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n
  2012-07-06  8:20 [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n Magnus Damm
                   ` (2 preceding siblings ...)
  2012-07-06 18:40 ` Rafael J. Wysocki
@ 2012-07-06 20:02 ` Arnd Bergmann
  2012-07-06 20:32 ` Rafael J. Wysocki
  4 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2012-07-06 20:02 UTC (permalink / raw)
  To: linux-sh

On Friday 06 July 2012, Rafael J. Wysocki wrote:
> > 
> > It can actually be written a little nicer now, like
> > 
> > #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
> >                        (IS_ENABLED(CONFIG_ARCH_SH73A0) && \
> > 			of_machine_is_compatible("renesas,sh73a0")))
> > 
> > but that won't work for the backport and it's still a little
> > ugly.
> 
> Can you please take the $subject patch directly to the fixes branch?
> Or do you want me to generate a pull request with just this one patch?

Ok, applied to the fixes branch. My current plan is to send that branch
upstream on Monday.

I've added Simon's Tested-by tag and I'm taking your mail as an Acked-by.

Thanks everyone,

	Arnd

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

* Re: [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n
  2012-07-06  8:20 [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n Magnus Damm
                   ` (3 preceding siblings ...)
  2012-07-06 20:02 ` Arnd Bergmann
@ 2012-07-06 20:32 ` Rafael J. Wysocki
  4 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2012-07-06 20:32 UTC (permalink / raw)
  To: linux-sh

On Friday, July 06, 2012, Arnd Bergmann wrote:
> On Friday 06 July 2012, Rafael J. Wysocki wrote:
> > > 
> > > It can actually be written a little nicer now, like
> > > 
> > > #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
> > >                        (IS_ENABLED(CONFIG_ARCH_SH73A0) && \
> > > 			of_machine_is_compatible("renesas,sh73a0")))
> > > 
> > > but that won't work for the backport and it's still a little
> > > ugly.
> > 
> > Can you please take the $subject patch directly to the fixes branch?
> > Or do you want me to generate a pull request with just this one patch?
> 
> Ok, applied to the fixes branch. My current plan is to send that branch
> upstream on Monday.
> 
> I've added Simon's Tested-by tag and I'm taking your mail as an Acked-by.

Yes, thanks a lot!

Rafael

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

end of thread, other threads:[~2012-07-06 20:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-06  8:20 [PATCH] ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n Magnus Damm
2012-07-06 10:03 ` Simon Horman
2012-07-06 15:35 ` Arnd Bergmann
2012-07-06 18:40 ` Rafael J. Wysocki
2012-07-06 20:02 ` Arnd Bergmann
2012-07-06 20:32 ` Rafael J. Wysocki

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.