diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2024-10-10 09:01:26 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-11-02 12:37:35 +0100 |
commit | e07359f171f2440f4dbc98339b10c8c3cdd48a20 (patch) | |
tree | d3c961691d4b4c70e42709ac505e09c27f0a5f80 /arch/powerpc | |
parent | af2c15920a114a7acea4dcbf9cd4a7b0ff469780 (diff) |
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 <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241010-vdso-generic-base-v1-24-b64f0842d512@linutronix.de
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/lparcfg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/lparcfg.c b/arch/powerpc/platforms/pseries/lparcfg.c index acc640fccca1..cc22924f159f 100644 --- a/arch/powerpc/platforms/pseries/lparcfg.c +++ b/arch/powerpc/platforms/pseries/lparcfg.c @@ -29,7 +29,6 @@ #include <asm/firmware.h> #include <asm/rtas.h> #include <asm/time.h> -#include <asm/vdso_datapage.h> #include <asm/vio.h> #include <asm/mmu.h> #include <asm/machdep.h> @@ -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); } |