aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/s390/include/asm/smp.h2
-rw-r--r--arch/s390/kernel/setup.c1
-rw-r--r--arch/s390/kernel/smp.c25
-rw-r--r--arch/s390/pci/pci_event.c2
5 files changed, 21 insertions, 10 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1e1a03d2d19f..e9f312532526 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -135,7 +135,6 @@ config S390
135 select HAVE_SYSCALL_TRACEPOINTS 135 select HAVE_SYSCALL_TRACEPOINTS
136 select HAVE_UID16 if 32BIT 136 select HAVE_UID16 if 32BIT
137 select HAVE_VIRT_CPU_ACCOUNTING 137 select HAVE_VIRT_CPU_ACCOUNTING
138 select INIT_ALL_POSSIBLE
139 select KTIME_SCALAR if 32BIT 138 select KTIME_SCALAR if 32BIT
140 select MODULES_USE_ELF_RELA 139 select MODULES_USE_ELF_RELA
141 select OLD_SIGACTION 140 select OLD_SIGACTION
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h
index ac9bed8e103f..160779394096 100644
--- a/arch/s390/include/asm/smp.h
+++ b/arch/s390/include/asm/smp.h
@@ -31,6 +31,7 @@ extern void smp_yield(void);
31extern void smp_stop_cpu(void); 31extern void smp_stop_cpu(void);
32extern void smp_cpu_set_polarization(int cpu, int val); 32extern void smp_cpu_set_polarization(int cpu, int val);
33extern int smp_cpu_get_polarization(int cpu); 33extern int smp_cpu_get_polarization(int cpu);
34extern void smp_fill_possible_mask(void);
34 35
35#else /* CONFIG_SMP */ 36#else /* CONFIG_SMP */
36 37
@@ -50,6 +51,7 @@ static inline int smp_vcpu_scheduled(int cpu) { return 1; }
50static inline void smp_yield_cpu(int cpu) { } 51static inline void smp_yield_cpu(int cpu) { }
51static inline void smp_yield(void) { } 52static inline void smp_yield(void) { }
52static inline void smp_stop_cpu(void) { } 53static inline void smp_stop_cpu(void) { }
54static inline void smp_fill_possible_mask(void) { }
53 55
54#endif /* CONFIG_SMP */ 56#endif /* CONFIG_SMP */
55 57
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 4444875266ee..0f3d44ecbfc6 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -1023,6 +1023,7 @@ void __init setup_arch(char **cmdline_p)
1023 setup_vmcoreinfo(); 1023 setup_vmcoreinfo();
1024 setup_lowcore(); 1024 setup_lowcore();
1025 1025
1026 smp_fill_possible_mask();
1026 cpu_init(); 1027 cpu_init();
1027 s390_init_cpu_topology(); 1028 s390_init_cpu_topology();
1028 1029
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
724static int __init setup_possible_cpus(char *s) 724static unsigned int setup_possible_cpus __initdata;
725{
726 int max, cpu;
727 725
728 if (kstrtoint(s, 0, &max) < 0) 726static 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}
735early_param("possible_cpus", setup_possible_cpus); 731early_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
774void __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
778void __init smp_prepare_cpus(unsigned int max_cpus) 785void __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 */
diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c
index 800f064b0da7..069607209a30 100644
--- a/arch/s390/pci/pci_event.c
+++ b/arch/s390/pci/pci_event.c
@@ -75,6 +75,7 @@ void zpci_event_availability(void *data)
75 if (!zdev || zdev->state == ZPCI_FN_STATE_CONFIGURED) 75 if (!zdev || zdev->state == ZPCI_FN_STATE_CONFIGURED)
76 break; 76 break;
77 zdev->state = ZPCI_FN_STATE_CONFIGURED; 77 zdev->state = ZPCI_FN_STATE_CONFIGURED;
78 zdev->fh = ccdf->fh;
78 ret = zpci_enable_device(zdev); 79 ret = zpci_enable_device(zdev);
79 if (ret) 80 if (ret)
80 break; 81 break;
@@ -101,6 +102,7 @@ void zpci_event_availability(void *data)
101 if (pdev) 102 if (pdev)
102 pci_stop_and_remove_bus_device(pdev); 103 pci_stop_and_remove_bus_device(pdev);
103 104
105 zdev->fh = ccdf->fh;
104 zpci_disable_device(zdev); 106 zpci_disable_device(zdev);
105 zdev->state = ZPCI_FN_STATE_STANDBY; 107 zdev->state = ZPCI_FN_STATE_STANDBY;
106 break; 108 break;