diff options
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index dc4a53465060..958704798f4a 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -721,18 +721,14 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
721 | return 0; | 721 | return 0; |
722 | } | 722 | } |
723 | 723 | ||
724 | static int __init setup_possible_cpus(char *s) | 724 | static unsigned int setup_possible_cpus __initdata; |
725 | { | ||
726 | int max, cpu; | ||
727 | 725 | ||
728 | if (kstrtoint(s, 0, &max) < 0) | 726 | static int __init _setup_possible_cpus(char *s) |
729 | return 0; | 727 | { |
730 | init_cpu_possible(cpumask_of(0)); | 728 | get_option(&s, &setup_possible_cpus); |
731 | for (cpu = 1; cpu < max && cpu < nr_cpu_ids; cpu++) | ||
732 | set_cpu_possible(cpu, true); | ||
733 | return 0; | 729 | return 0; |
734 | } | 730 | } |
735 | early_param("possible_cpus", setup_possible_cpus); | 731 | early_param("possible_cpus", _setup_possible_cpus); |
736 | 732 | ||
737 | #ifdef CONFIG_HOTPLUG_CPU | 733 | #ifdef CONFIG_HOTPLUG_CPU |
738 | 734 | ||
@@ -775,6 +771,17 @@ void __noreturn cpu_die(void) | |||
775 | 771 | ||
776 | #endif /* CONFIG_HOTPLUG_CPU */ | 772 | #endif /* CONFIG_HOTPLUG_CPU */ |
777 | 773 | ||
774 | void __init smp_fill_possible_mask(void) | ||
775 | { | ||
776 | unsigned int possible, cpu; | ||
777 | |||
778 | possible = setup_possible_cpus; | ||
779 | if (!possible) | ||
780 | possible = MACHINE_IS_VM ? 64 : nr_cpu_ids; | ||
781 | for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++) | ||
782 | set_cpu_possible(cpu, true); | ||
783 | } | ||
784 | |||
778 | void __init smp_prepare_cpus(unsigned int max_cpus) | 785 | void __init smp_prepare_cpus(unsigned int max_cpus) |
779 | { | 786 | { |
780 | /* request the 0x1201 emergency signal external interrupt */ | 787 | /* request the 0x1201 emergency signal external interrupt */ |