From 73a7aca2a53d4dbb62909c5741830eee9eac5ee8 Mon Sep 17 00:00:00 2001 From: Evgeny Iakovlev Date: Tue, 4 Apr 2023 19:41:52 +0200 Subject: [PATCH] feat(qemu): increase max cpus per cluster to 16 Qemu-tcg with GICv3 emulation enabled will by default configure MPIDR topology to report up to 16 cpus per cluster. This is NOT overriden by qemu's -smp setting, e.g. -smp 8,clusters=2,cores=4,threads=1 will still generate MPIDR reads as if all 8 CPUs were within one cluster. Increase the hardcoded limit to reflect that so that we accept PSCI calls that provide MPIDRs based on what was actually read from the emulated CPU. Change-Id: Ia321d555f885c96a9a94ae053b340e3a9e300e6d Signed-off-by: Evgeny Iakovlev --- plat/qemu/qemu/include/platform_def.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plat/qemu/qemu/include/platform_def.h b/plat/qemu/qemu/include/platform_def.h index 803f8e2c5..98b8254d2 100644 --- a/plat/qemu/qemu/include/platform_def.h +++ b/plat/qemu/qemu/include/platform_def.h @@ -23,15 +23,14 @@ #define PLATFORM_CLUSTER0_CORE_COUNT PLATFORM_MAX_CPUS_PER_CLUSTER #define PLATFORM_CLUSTER1_CORE_COUNT U(0) #else -#define PLATFORM_MAX_CPUS_PER_CLUSTER U(4) /* * Define the number of cores per cluster used in calculating core position. * The cluster number is shifted by this value and added to the core ID, * so its value represents log2(cores/cluster). - * Default is 2**(2) = 4 cores per cluster. + * Default is 2**(4) = 16 cores per cluster. */ -#define PLATFORM_CPU_PER_CLUSTER_SHIFT U(2) - +#define PLATFORM_CPU_PER_CLUSTER_SHIFT U(4) +#define PLATFORM_MAX_CPUS_PER_CLUSTER (U(1) << PLATFORM_CPU_PER_CLUSTER_SHIFT) #define PLATFORM_CLUSTER_COUNT U(2) #define PLATFORM_CLUSTER0_CORE_COUNT PLATFORM_MAX_CPUS_PER_CLUSTER #define PLATFORM_CLUSTER1_CORE_COUNT PLATFORM_MAX_CPUS_PER_CLUSTER -- 2.39.5