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

Commit d3f3fb0c authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Simon Horman
Browse files

ARM: shmobile: apmu: Move #ifdef CONFIG_SMP to cover more functions



shmobile_smp_apmu_prepare_cpus() is used only if CONFIG_SMP=y.

Hence move the #ifdef to cover shmobile_smp_apmu_prepare_cpus() and all
functions only called by it (apmu_init_cpu() and apmu_parse_cfg()).

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarUlrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 2477a356
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -74,6 +74,7 @@ static int __maybe_unused apmu_wrap(int cpu, int (*fn)(void __iomem *p, int cpu)
	return p ? fn(p, apmu_cpus[cpu].bit) : -EINVAL;
	return p ? fn(p, apmu_cpus[cpu].bit) : -EINVAL;
}
}


#ifdef CONFIG_SMP
static void apmu_init_cpu(struct resource *res, int cpu, int bit)
static void apmu_init_cpu(struct resource *res, int cpu, int bit)
{
{
	if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem)
	if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem)
@@ -128,7 +129,6 @@ void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus,
	apmu_parse_cfg(apmu_init_cpu, apmu_config, num);
	apmu_parse_cfg(apmu_init_cpu, apmu_config, num);
}
}


#ifdef CONFIG_SMP
int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
{
	/* For this particular CPU register boot vector */
	/* For this particular CPU register boot vector */