Skip to contentSkip to conversation

ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n

PATCH In review Magnus Damm 4 participants 6 messages Jul 6, 2012

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/1 ARM: mach-shmobile: fix platsmp.c build when ARCH_SH73A0=n

From: Magnus Damm <[email protected]>

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.

---

 arch/arm/mach-shmobile/platsmp.c |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/mach-shmobile/platsmp.c +5 -0
@@ -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
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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

9601e87 ARM: shmobile: fix smp build

Quoted 7 lines

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 :^)

Quoted 2 lines
#2 lore raw
In reply to Magnus Damm
Quoted 13 lines · Simon Horman
Quoted 12 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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".

Quoted 4 lines
Quoted 2 lines

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.

Quoted 4 lines
Quoted 1 line

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

#3 lore raw
In reply to Magnus Damm

Hi,

Quoted 28 lines · Arnd Bergmann
Quoted 13 lines · Simon Horman
Quoted 12 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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".

Quoted 4 lines
Quoted 2 lines

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.

Quoted 4 lines
Quoted 1 line
Quoted 8 lines

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

#4 lore raw
In reply to Magnus Damm
Quoted 7 lines · Rafael J. Wysocki
Quoted 7 lines

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")))
Quoted 5 lines
Quoted 2 lines

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

#5 lore raw
In reply to Magnus Damm
Quoted 11 lines · Arnd Bergmann
Quoted 10 lines · Rafael J. Wysocki
Quoted 9 lines

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.

Quoted 7 lines
Quoted 2 lines

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