Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3aae97c8 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Arnd Bergmann
Browse files

ARM: trusted_foundations: fix compile error on non-SMP



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: default avatarAlexandre Courbot <acourbot@nvidia.com>
Reported-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 756abc8d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}