From: Thomas Weißschuh Date: Thu, 10 Oct 2024 07:01:26 +0000 (+0200) Subject: powerpc/pseries/lparcfg: Use num_possible_cpus() for potential processors X-Git-Tag: v6.13-rc1~172^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e07359f171f2440f4dbc98339b10c8c3cdd48a20;p=thirdparty%2Fkernel%2Flinux.git powerpc/pseries/lparcfg: Use num_possible_cpus() for potential processors The systemcfg processorCount variable tracks currently online variables, not possible ones, so the stored value is wrong. The code preferably tries to use the ibm,lrdr-capacity field 4 which "represents the maximum number of processors that the guest can have." Switch from processorCount to the better matching num_possible_cpus(). Signed-off-by: Thomas Weißschuh Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241010-vdso-generic-base-v1-24-b64f0842d512@linutronix.de --- diff --git a/arch/powerpc/platforms/pseries/lparcfg.c b/arch/powerpc/platforms/pseries/lparcfg.c index acc640fccca17..cc22924f159f5 100644 --- a/arch/powerpc/platforms/pseries/lparcfg.c +++ b/arch/powerpc/platforms/pseries/lparcfg.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -530,7 +529,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) lrdrp = of_get_property(rtas_node, "ibm,lrdr-capacity", NULL); if (lrdrp == NULL) { - partition_potential_processors = vdso_data->processorCount; + partition_potential_processors = num_possible_cpus(); } else { partition_potential_processors = be32_to_cpup(lrdrp + 4); }