* [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled
@ 2012-06-07 1:40 Nobuhiro Iwamatsu
2012-06-07 1:59 ` Simon Horman
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Nobuhiro Iwamatsu @ 2012-06-07 1:40 UTC (permalink / raw)
To: linux-sh
Build failed, when SMP is enabled and EMEV2 is not enabled.
-----
arch/arm/mach-shmobile/built-in.o: In function `shmobile_platform_cpu_kill':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:62: undefined reference to `emev2_platform_cpu_kill'
arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_get_core_count':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:39: undefined reference to `emev2_get_core_count'
arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_prepare_cpus':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:53: undefined reference to `emev2_smp_prepare_cpus'
arch/arm/mach-shmobile/built-in.o: In function `platform_secondary_init':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:78: undefined reference to `emev2_secondary_init'
arch/arm/mach-shmobile/built-in.o: In function `boot_secondary':
/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:90: undefined reference to `emev2_boot_secondary
-----
This is the cause by when EMEV2 is disabled, that the check by OF of EMEV2 is
performed in platsmp.c.
This patch revise what the function about EMEV2 may not be used in this file,
when EMEV2 is not enabled.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
---
arch/arm/mach-shmobile/platsmp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
index bacdd66..e859fcd 100644
--- a/arch/arm/mach-shmobile/platsmp.c
+++ b/arch/arm/mach-shmobile/platsmp.c
@@ -25,7 +25,12 @@
#define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
of_machine_is_compatible("renesas,sh73a0"))
#define is_r8a7779() machine_is_marzen()
+
+#ifdef CONFIG_ARCH_EMEV2
#define is_emev2() of_machine_is_compatible("renesas,emev2")
+#else
+#define is_emev2() (0)
+#endif
static unsigned int __init shmobile_smp_get_core_count(void)
{
--
1.7.10
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled
2012-06-07 1:40 [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled Nobuhiro Iwamatsu
@ 2012-06-07 1:59 ` Simon Horman
2012-06-07 3:25 ` Nobuhiro Iwamatsu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2012-06-07 1:59 UTC (permalink / raw)
To: linux-sh
Hi Iwamatsu-san,
On Thu, Jun 07, 2012 at 10:40:55AM +0900, Nobuhiro Iwamatsu wrote:
> Build failed, when SMP is enabled and EMEV2 is not enabled.
>
> -----
> arch/arm/mach-shmobile/built-in.o: In function `shmobile_platform_cpu_kill':
> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:62: undefined reference to `emev2_platform_cpu_kill'
> arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_get_core_count':
> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:39: undefined reference to `emev2_get_core_count'
> arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_prepare_cpus':
> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:53: undefined reference to `emev2_smp_prepare_cpus'
> arch/arm/mach-shmobile/built-in.o: In function `platform_secondary_init':
> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:78: undefined reference to `emev2_secondary_init'
> arch/arm/mach-shmobile/built-in.o: In function `boot_secondary':
> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:90: undefined reference to `emev2_boot_secondary
> -----
>
> This is the cause by when EMEV2 is disabled, that the check by OF of EMEV2 is
> performed in platsmp.c.
> This patch revise what the function about EMEV2 may not be used in this file,
> when EMEV2 is not enabled.
I am curious to know why, for example, sh73a0_smp_prepare_cpus() and
r8a7779_smp_prepare_cpus() do not have similar problems. Is it because
they are guarded by machine_if_* rather than of_machine_is_compatible() ?
>
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> ---
> arch/arm/mach-shmobile/platsmp.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
> index bacdd66..e859fcd 100644
> --- a/arch/arm/mach-shmobile/platsmp.c
> +++ b/arch/arm/mach-shmobile/platsmp.c
> @@ -25,7 +25,12 @@
> #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
> of_machine_is_compatible("renesas,sh73a0"))
> #define is_r8a7779() machine_is_marzen()
Which tree does this version of platsmp.c appear in?
The use of of_machine_is_compatible() is new to me.
> +
> +#ifdef CONFIG_ARCH_EMEV2
> #define is_emev2() of_machine_is_compatible("renesas,emev2")
> +#else
> +#define is_emev2() (0)
> +#endif
It would be nice to avoid a journey to ifdef hell :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled
2012-06-07 1:40 [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled Nobuhiro Iwamatsu
2012-06-07 1:59 ` Simon Horman
@ 2012-06-07 3:25 ` Nobuhiro Iwamatsu
2012-06-20 1:49 ` Simon Horman
2012-06-20 10:35 ` Rafael J. Wysocki
3 siblings, 0 replies; 5+ messages in thread
From: Nobuhiro Iwamatsu @ 2012-06-07 3:25 UTC (permalink / raw)
To: linux-sh
Hi,
Simon Horman さんは書きました:
> Hi Iwamatsu-san,
>
> On Thu, Jun 07, 2012 at 10:40:55AM +0900, Nobuhiro Iwamatsu wrote:
>> Build failed, when SMP is enabled and EMEV2 is not enabled.
>>
>> -----
>> arch/arm/mach-shmobile/built-in.o: In function `shmobile_platform_cpu_kill':
>> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:62: undefined reference to `emev2_platform_cpu_kill'
>> arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_get_core_count':
>> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:39: undefined reference to `emev2_get_core_count'
>> arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_prepare_cpus':
>> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:53: undefined reference to `emev2_smp_prepare_cpus'
>> arch/arm/mach-shmobile/built-in.o: In function `platform_secondary_init':
>> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:78: undefined reference to `emev2_secondary_init'
>> arch/arm/mach-shmobile/built-in.o: In function `boot_secondary':
>> /home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:90: undefined reference to `emev2_boot_secondary
>> -----
>>
>> This is the cause by when EMEV2 is disabled, that the check by OF of EMEV2 is
>> performed in platsmp.c.
>> This patch revise what the function about EMEV2 may not be used in this file,
>> when EMEV2 is not enabled.
>
> I am curious to know why, for example, sh73a0_smp_prepare_cpus() and
> r8a7779_smp_prepare_cpus() do not have similar problems. Is it because
> they are guarded by machine_if_* rather than of_machine_is_compatible() ?
Yes. for example, If machine_is_marzen() was set to (0), if line of is_r8a7779()
was deleted by cpp.
>
>> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
>> ---
>> arch/arm/mach-shmobile/platsmp.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
>> index bacdd66..e859fcd 100644
>> --- a/arch/arm/mach-shmobile/platsmp.c
>> +++ b/arch/arm/mach-shmobile/platsmp.c
>> @@ -25,7 +25,12 @@
>> #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
>> of_machine_is_compatible("renesas,sh73a0"))
>> #define is_r8a7779() machine_is_marzen()
>
> Which tree does this version of platsmp.c appear in?
> The use of of_machine_is_compatible() is new to me.
I confirmed by linus/HEAD and next branch/HEAD of rafael's.
>
>> +
>> +#ifdef CONFIG_ARCH_EMEV2
>> #define is_emev2() of_machine_is_compatible("renesas,emev2")
>> +#else
>> +#define is_emev2() (0)
>> +#endif
>
> It would be nice to avoid a journey to ifdef hell :)
>
I think too.
But currentry, mechanism in which we judge CPU seems not to spread on CONFIG.
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled
2012-06-07 1:40 [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled Nobuhiro Iwamatsu
2012-06-07 1:59 ` Simon Horman
2012-06-07 3:25 ` Nobuhiro Iwamatsu
@ 2012-06-20 1:49 ` Simon Horman
2012-06-20 10:35 ` Rafael J. Wysocki
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2012-06-20 1:49 UTC (permalink / raw)
To: linux-sh
On Thu, Jun 07, 2012 at 12:25:48PM +0900, Nobuhiro Iwamatsu wrote:
> Hi,
>
> Simon Horman さんは書きました:
> >Hi Iwamatsu-san,
> >
> >On Thu, Jun 07, 2012 at 10:40:55AM +0900, Nobuhiro Iwamatsu wrote:
> >>Build failed, when SMP is enabled and EMEV2 is not enabled.
> >>
> >>-----
> >>arch/arm/mach-shmobile/built-in.o: In function `shmobile_platform_cpu_kill':
> >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:62: undefined reference to `emev2_platform_cpu_kill'
> >>arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_get_core_count':
> >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:39: undefined reference to `emev2_get_core_count'
> >>arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_prepare_cpus':
> >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:53: undefined reference to `emev2_smp_prepare_cpus'
> >>arch/arm/mach-shmobile/built-in.o: In function `platform_secondary_init':
> >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:78: undefined reference to `emev2_secondary_init'
> >>arch/arm/mach-shmobile/built-in.o: In function `boot_secondary':
> >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:90: undefined reference to `emev2_boot_secondary
> >>-----
> >>
> >>This is the cause by when EMEV2 is disabled, that the check by OF of EMEV2 is
> >>performed in platsmp.c.
> >>This patch revise what the function about EMEV2 may not be used in this file,
> >>when EMEV2 is not enabled.
> >
> >I am curious to know why, for example, sh73a0_smp_prepare_cpus() and
> >r8a7779_smp_prepare_cpus() do not have similar problems. Is it because
> >they are guarded by machine_if_* rather than of_machine_is_compatible() ?
>
> Yes. for example, If machine_is_marzen() was set to (0), if line of is_r8a7779()
> was deleted by cpp.
>
> >
> >>Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> >>---
> >> arch/arm/mach-shmobile/platsmp.c | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >>diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
> >>index bacdd66..e859fcd 100644
> >>--- a/arch/arm/mach-shmobile/platsmp.c
> >>+++ b/arch/arm/mach-shmobile/platsmp.c
> >>@@ -25,7 +25,12 @@
> >> #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
> >> of_machine_is_compatible("renesas,sh73a0"))
> >> #define is_r8a7779() machine_is_marzen()
> >
> >Which tree does this version of platsmp.c appear in?
> >The use of of_machine_is_compatible() is new to me.
>
> I confirmed by linus/HEAD and next branch/HEAD of rafael's.
> >
> >>+
> >>+#ifdef CONFIG_ARCH_EMEV2
> >> #define is_emev2() of_machine_is_compatible("renesas,emev2")
> >>+#else
> >>+#define is_emev2() (0)
> >>+#endif
> >
> >It would be nice to avoid a journey to ifdef hell :)
> >
>
> I think too.
> But currentry, mechanism in which we judge CPU seems not to spread on CONFIG.
Ok, reluctantly I think we should add your patch as we are already
at 3.5-rc3 and it would be nice for the board's default config to actually
built in 3.5.
Acked-by: Simon Horman <horms@verge.net.au>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled
2012-06-07 1:40 [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled Nobuhiro Iwamatsu
` (2 preceding siblings ...)
2012-06-20 1:49 ` Simon Horman
@ 2012-06-20 10:35 ` Rafael J. Wysocki
3 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2012-06-20 10:35 UTC (permalink / raw)
To: linux-sh
On Wednesday, June 20, 2012, Simon Horman wrote:
> On Thu, Jun 07, 2012 at 12:25:48PM +0900, Nobuhiro Iwamatsu wrote:
> > Hi,
> >
> > Simon Horman さんは書きました:
> > >Hi Iwamatsu-san,
> > >
> > >On Thu, Jun 07, 2012 at 10:40:55AM +0900, Nobuhiro Iwamatsu wrote:
> > >>Build failed, when SMP is enabled and EMEV2 is not enabled.
> > >>
> > >>-----
> > >>arch/arm/mach-shmobile/built-in.o: In function `shmobile_platform_cpu_kill':
> > >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:62: undefined reference to `emev2_platform_cpu_kill'
> > >>arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_get_core_count':
> > >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:39: undefined reference to `emev2_get_core_count'
> > >>arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_prepare_cpus':
> > >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:53: undefined reference to `emev2_smp_prepare_cpus'
> > >>arch/arm/mach-shmobile/built-in.o: In function `platform_secondary_init':
> > >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:78: undefined reference to `emev2_secondary_init'
> > >>arch/arm/mach-shmobile/built-in.o: In function `boot_secondary':
> > >>/home/iwamatsu/work/kernel/sh-2.6-devel/arch/arm/mach-shmobile/platsmp.c:90: undefined reference to `emev2_boot_secondary
> > >>-----
> > >>
> > >>This is the cause by when EMEV2 is disabled, that the check by OF of EMEV2 is
> > >>performed in platsmp.c.
> > >>This patch revise what the function about EMEV2 may not be used in this file,
> > >>when EMEV2 is not enabled.
> > >
> > >I am curious to know why, for example, sh73a0_smp_prepare_cpus() and
> > >r8a7779_smp_prepare_cpus() do not have similar problems. Is it because
> > >they are guarded by machine_if_* rather than of_machine_is_compatible() ?
> >
> > Yes. for example, If machine_is_marzen() was set to (0), if line of is_r8a7779()
> > was deleted by cpp.
> >
> > >
> > >>Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> > >>---
> > >> arch/arm/mach-shmobile/platsmp.c | 5 +++++
> > >> 1 file changed, 5 insertions(+)
> > >>
> > >>diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
> > >>index bacdd66..e859fcd 100644
> > >>--- a/arch/arm/mach-shmobile/platsmp.c
> > >>+++ b/arch/arm/mach-shmobile/platsmp.c
> > >>@@ -25,7 +25,12 @@
> > >> #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \
> > >> of_machine_is_compatible("renesas,sh73a0"))
> > >> #define is_r8a7779() machine_is_marzen()
> > >
> > >Which tree does this version of platsmp.c appear in?
> > >The use of of_machine_is_compatible() is new to me.
> >
> > I confirmed by linus/HEAD and next branch/HEAD of rafael's.
> > >
> > >>+
> > >>+#ifdef CONFIG_ARCH_EMEV2
> > >> #define is_emev2() of_machine_is_compatible("renesas,emev2")
> > >>+#else
> > >>+#define is_emev2() (0)
> > >>+#endif
> > >
> > >It would be nice to avoid a journey to ifdef hell :)
> > >
> >
> > I think too.
> > But currentry, mechanism in which we judge CPU seems not to spread on CONFIG.
>
> Ok, reluctantly I think we should add your patch as we are already
> at 3.5-rc3 and it would be nice for the board's default config to actually
> built in 3.5.
>
> Acked-by: Simon Horman <horms@verge.net.au>
Applied to the fixes branch of the renesas.git tree.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-20 10:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 1:40 [PATCH] ARM: mach-shmobile: Fix build when SMP is enabled and EMEV2 is not enabled Nobuhiro Iwamatsu
2012-06-07 1:59 ` Simon Horman
2012-06-07 3:25 ` Nobuhiro Iwamatsu
2012-06-20 1:49 ` Simon Horman
2012-06-20 10:35 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).