diff mbox

ARM: trusted_foundations: only set setup_max_cpus if SMP set

Message ID 1398592890-31301-1-git-send-email-acourbot@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alexandre Courbot April 27, 2014, 10:01 a.m. UTC
The setup_max_cpu 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)

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

This should take care of the trusted foundations issue. Thanks for reporting this.

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

Comments

Alexandre Courbot May 1, 2014, 7:22 a.m. UTC | #1
On Sun, Apr 27, 2014 at 7:01 PM, Alexandre Courbot <acourbot@nvidia.com> wrote:
> The setup_max_cpu 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)
>
> Reported-by: Russell King <rmk@arm.linux.org.uk>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
> Hi Russell,
>
> This should take care of the trusted foundations issue. Thanks for reporting this.

Russell,

Do you mind taking this into your tree? Or do you prefer if the Tegra
folks do it?

>
>  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
>
Stephen Warren May 1, 2014, 4:50 p.m. UTC | #2
On 05/01/2014 01:22 AM, Alexandre Courbot wrote:
> On Sun, Apr 27, 2014 at 7:01 PM, Alexandre Courbot <acourbot@nvidia.com> wrote:
>> The setup_max_cpu 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)
>>
>> Reported-by: Russell King <rmk@arm.linux.org.uk>
>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>> ---
>> Hi Russell,
>>
>> This should take care of the trusted foundations issue. Thanks for reporting this.
> 
> Russell,
> 
> Do you mind taking this into your tree? Or do you prefer if the Tegra
> folks do it?

I /think/ that Russell prefers to pick patches up from his patch tracker:

http://www.arm.linux.org.uk/developer/patches/

and instructions:
http://www.arm.linux.org.uk/developer/patches/info.php

If you add it there and he objects, I expect he'll let you know:-)
Alexandre Courbot May 2, 2014, 1:22 a.m. UTC | #3
On 05/02/2014 01:50 AM, Stephen Warren wrote:
> On 05/01/2014 01:22 AM, Alexandre Courbot wrote:
>> On Sun, Apr 27, 2014 at 7:01 PM, Alexandre Courbot <acourbot@nvidia.com> wrote:
>>> The setup_max_cpu 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)
>>>
>>> Reported-by: Russell King <rmk@arm.linux.org.uk>
>>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>>> ---
>>> Hi Russell,
>>>
>>> This should take care of the trusted foundations issue. Thanks for reporting this.
>>
>> Russell,
>>
>> Do you mind taking this into your tree? Or do you prefer if the Tegra
>> folks do it?
>
> I /think/ that Russell prefers to pick patches up from his patch tracker:
>
> http://www.arm.linux.org.uk/developer/patches/
>
> and instructions:
> http://www.arm.linux.org.uk/developer/patches/info.php
>
> If you add it there and he objects, I expect he'll let you know:-)

Oh, thanks. Submitting this to the right place then.
diff mbox

Patch

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);
 }