Skip to content

Commit e07359f

Browse files
t-8chKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent af2c159 commit e07359f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/powerpc/platforms/pseries/lparcfg.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <asm/firmware.h>
3030
#include <asm/rtas.h>
3131
#include <asm/time.h>
32-
#include <asm/vdso_datapage.h>
3332
#include <asm/vio.h>
3433
#include <asm/mmu.h>
3534
#include <asm/machdep.h>
@@ -530,7 +529,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
530529
lrdrp = of_get_property(rtas_node, "ibm,lrdr-capacity", NULL);
531530

532531
if (lrdrp == NULL) {
533-
partition_potential_processors = vdso_data->processorCount;
532+
partition_potential_processors = num_possible_cpus();
534533
} else {
535534
partition_potential_processors = be32_to_cpup(lrdrp + 4);
536535
}

0 commit comments

Comments
 (0)