public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH RESEND] ARM: trusted_foundations: fix compile error on non-SMP
@ 2014-05-23  0:23 Alexandre Courbot
  2014-05-23 16:58 ` Stephen Warren
  2014-05-23 18:24 ` Sergei Shtylyov
  0 siblings, 2 replies; 5+ messages in thread
From: Alexandre Courbot @ 2014-05-23  0:23 UTC (permalink / raw)
  To: linux-arm-kernel

The setup_max_cpus variable is only defined if CONFIG_SMP is set. Add
a preprocessor condition to avoid the following compilation error if
CONFIG_SMP is not set:

    arch/arm/include/asm/trusted_foundations.h: In function 'register_trusted_foundations':
    arch/arm/include/asm/trusted_foundations.h:57:2: error: 'setup_max_cpus' undeclared (first use in this function)

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
Hi Stephen,

This patch has been originally submitted through Russell's patch tracker,
where it has stayed untouched for ~3 weeks now. Considering that this
fixes a compilation error and should thus be made available quickly, and
that Tegra is the only user of Trusted Foundations, would you agree to take
it into your tree?

 arch/arm/include/asm/trusted_foundations.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/trusted_foundations.h b/arch/arm/include/asm/trusted_foundations.h
index b5f7705..624e1d4 100644
--- a/arch/arm/include/asm/trusted_foundations.h
+++ b/arch/arm/include/asm/trusted_foundations.h
@@ -54,7 +54,9 @@ static inline void register_trusted_foundations(
 	 */
 	pr_err("No support for Trusted Foundations, continuing in degraded mode.\n");
 	pr_err("Secondary processors as well as CPU PM will be disabled.\n");
+#if IS_ENABLED(CONFIG_SMP)
 	setup_max_cpus = 0;
+#endif
 	cpu_idle_poll_ctrl(true);
 }
 
-- 
1.9.2

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

* [PATCH RESEND] ARM: trusted_foundations: fix compile error on non-SMP
  2014-05-23  0:23 [PATCH RESEND] ARM: trusted_foundations: fix compile error on non-SMP Alexandre Courbot
@ 2014-05-23 16:58 ` Stephen Warren
  2014-05-23 19:28   ` Arnd Bergmann
  2014-05-23 18:24 ` Sergei Shtylyov
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2014-05-23 16:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/22/2014 06:23 PM, Alexandre Courbot wrote:
> The setup_max_cpus variable is only defined if CONFIG_SMP is set. Add
> a preprocessor condition to avoid the following compilation error if
> CONFIG_SMP is not set:
> 
>     arch/arm/include/asm/trusted_foundations.h: In function 'register_trusted_foundations':
>     arch/arm/include/asm/trusted_foundations.h:57:2: error: 'setup_max_cpus' undeclared (first use in this function)
> 
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>

I spoke to Olof and IRC, and he said arm-soc would be OK taking this
patch, since they applied the original code this fixes. IIUC, they'll
pick this up directly.

Acked-by: Stephen Warren <swarren@nvidia.com>

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

* [PATCH RESEND] ARM: trusted_foundations: fix compile error on non-SMP
  2014-05-23  0:23 [PATCH RESEND] ARM: trusted_foundations: fix compile error on non-SMP Alexandre Courbot
  2014-05-23 16:58 ` Stephen Warren
@ 2014-05-23 18:24 ` Sergei Shtylyov
  2014-05-23 19:27   ` Arnd Bergmann
  1 sibling, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2014-05-23 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 05/23/2014 04:23 AM, Alexandre Courbot wrote:

> The setup_max_cpus variable is only defined if CONFIG_SMP is set. Add
> a preprocessor condition to avoid the following compilation error if
> CONFIG_SMP is not set:

>      arch/arm/include/asm/trusted_foundations.h: In function 'register_trusted_foundations':
>      arch/arm/include/asm/trusted_foundations.h:57:2: error: 'setup_max_cpus' undeclared (first use in this function)

> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> Hi Stephen,

> This patch has been originally submitted through Russell's patch tracker,
> where it has stayed untouched for ~3 weeks now. Considering that this
> fixes a compilation error and should thus be made available quickly, and
> that Tegra is the only user of Trusted Foundations, would you agree to take
> it into your tree?

>   arch/arm/include/asm/trusted_foundations.h | 2 ++
>   1 file changed, 2 insertions(+)

> diff --git a/arch/arm/include/asm/trusted_foundations.h b/arch/arm/include/asm/trusted_foundations.h
> index b5f7705..624e1d4 100644
> --- a/arch/arm/include/asm/trusted_foundations.h
> +++ b/arch/arm/include/asm/trusted_foundations.h
> @@ -54,7 +54,9 @@ static inline void register_trusted_foundations(
>   	 */
>   	pr_err("No support for Trusted Foundations, continuing in degraded mode.\n");
>   	pr_err("Secondary processors as well as CPU PM will be disabled.\n");
> +#if IS_ENABLED(CONFIG_SMP)

	if (IS_ENABLED(CONFIG_SMP))

>   	setup_max_cpus = 0;
> +#endif

WBR, Sergei

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

* [PATCH RESEND] ARM: trusted_foundations: fix compile error on non-SMP
  2014-05-23 18:24 ` Sergei Shtylyov
@ 2014-05-23 19:27   ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-05-23 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 23 May 2014, Sergei Shtylyov wrote:
> > +#if IS_ENABLED(CONFIG_SMP)
> 
>         if (IS_ENABLED(CONFIG_SMP))
> 
> >       setup_max_cpus = 0;
> > +#endif
> 

That wouldn't help to fix the build error when setup_max_cpus is not declared.

	Arnd

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

* [PATCH RESEND] ARM: trusted_foundations: fix compile error on non-SMP
  2014-05-23 16:58 ` Stephen Warren
@ 2014-05-23 19:28   ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-05-23 19:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 23 May 2014, Stephen Warren wrote:
> On 05/22/2014 06:23 PM, Alexandre Courbot wrote:
> > The setup_max_cpus variable is only defined if CONFIG_SMP is set. Add
> > a preprocessor condition to avoid the following compilation error if
> > CONFIG_SMP is not set:
> > 
> >     arch/arm/include/asm/trusted_foundations.h: In function 'register_trusted_foundations':
> >     arch/arm/include/asm/trusted_foundations.h:57:2: error: 'setup_max_cpus' undeclared (first use in this function)
> > 
> > Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> > Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> I spoke to Olof and IRC, and he said arm-soc would be OK taking this
> patch, since they applied the original code this fixes. IIUC, they'll
> pick this up directly.
> 
> Acked-by: Stephen Warren <swarren@nvidia.com>
> 

Pulled into the fixes branch now, thanks!

	Arnd

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

end of thread, other threads:[~2014-05-23 19:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23  0:23 [PATCH RESEND] ARM: trusted_foundations: fix compile error on non-SMP Alexandre Courbot
2014-05-23 16:58 ` Stephen Warren
2014-05-23 19:28   ` Arnd Bergmann
2014-05-23 18:24 ` Sergei Shtylyov
2014-05-23 19:27   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox