diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/include/asm/sclp.h | 1 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index abaca2275c7a..2f5e9932b4de 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
@@ -46,6 +46,7 @@ int sclp_cpu_configure(u8 cpu); | |||
46 | int sclp_cpu_deconfigure(u8 cpu); | 46 | int sclp_cpu_deconfigure(u8 cpu); |
47 | unsigned long long sclp_get_rnmax(void); | 47 | unsigned long long sclp_get_rnmax(void); |
48 | unsigned long long sclp_get_rzm(void); | 48 | unsigned long long sclp_get_rzm(void); |
49 | unsigned int sclp_get_max_cpu(void); | ||
49 | int sclp_sdias_blk_count(void); | 50 | int sclp_sdias_blk_count(void); |
50 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); | 51 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); |
51 | int sclp_chp_configure(struct chp_id chpid); | 52 | int sclp_chp_configure(struct chp_id chpid); |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index a7125b62a9a6..8827883310dd 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -773,11 +773,11 @@ void __noreturn cpu_die(void) | |||
773 | 773 | ||
774 | void __init smp_fill_possible_mask(void) | 774 | void __init smp_fill_possible_mask(void) |
775 | { | 775 | { |
776 | unsigned int possible, cpu; | 776 | unsigned int possible, sclp, cpu; |
777 | 777 | ||
778 | possible = setup_possible_cpus; | 778 | sclp = sclp_get_max_cpu() ?: nr_cpu_ids; |
779 | if (!possible) | 779 | possible = setup_possible_cpus ?: nr_cpu_ids; |
780 | possible = MACHINE_IS_VM ? 64 : nr_cpu_ids; | 780 | possible = min(possible, sclp); |
781 | for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++) | 781 | for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++) |
782 | set_cpu_possible(cpu, true); | 782 | set_cpu_possible(cpu, true); |
783 | } | 783 | } |