Secondary cpus initialization is not yet supported. Thus, we print an
appropriate message and put the secondary cpus in WFE state.
And we introduce to BUILD_BUG_ON to prevent users using from building Xen
on multiprocessor based MPU systems.
In Arm, there is no clean way to disable SMP. As of now, we wish to support
MPU on UNP only. So, we have defined the default range of NR_CPUs to be 1 for
MPU.
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
config NR_CPUS
int "Maximum number of CPUs"
+ range 1 1 if ARM && MPU
range 1 16383
default "256" if X86
+ default "1" if ARM && MPU
default "8" if ARM && RCAR3
default "4" if ARM && QEMU
default "4" if ARM && MPSOC
ret
END(enable_boot_cpu_mm)
+/*
+ * We don't yet support secondary CPUs bring-up. Implement a dummy helper to
+ * please the common code.
+ */
+ENTRY(enable_secondary_cpu_mm)
+ PRINT("- SMP not enabled yet -\r\n")
+1: wfe
+ b 1b
+ENDPROC(enable_secondary_cpu_mm)
+
/*
* Local variables:
* mode: ASM
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <xen/init.h>
#include <xen/mm.h>
#include <asm/system.h>
#include <asm/smp.h>
#include <asm/gic.h>
#include <asm/flushtlb.h>
+static void __init __maybe_unused build_assertions(void)
+{
+#ifdef CONFIG_MPU
+ /*
+ * Currently, SMP is not enabled on MPU based systems.
+ */
+ BUILD_BUG_ON(NR_CPUS > 1);
+#endif
+}
+
void arch_flush_tlb_mask(const cpumask_t *mask)
{
/* No need to IPI other processors on ARM, the processor takes care of it. */