diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2015-05-06 07:19:29 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-05-13 03:58:17 -0400 |
commit | 3a9f3fe69eab40d9de948230a6789bd7ea68d5e9 (patch) | |
tree | 3e188db992126e20ef2082f2808c7560f46f1965 /arch/s390/kernel/smp.c | |
parent | 37c5f6c86cf5cda66c71c3bb1672e3b09d81c6da (diff) |
s390/sclp: get rid of sclp_get_mtid() and sclp_get_mtid_max()
As all relevant sclp data is now directly accessible, let's move the
logic of these two functions to the single caller.
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index ac7dda556a7d..0d9d59d4710e 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -740,7 +740,7 @@ static void __init smp_detect_cpus(void) | |||
740 | #endif | 740 | #endif |
741 | 741 | ||
742 | /* Set multi-threading state for the current system */ | 742 | /* Set multi-threading state for the current system */ |
743 | mtid = sclp_get_mtid(boot_cpu_type); | 743 | mtid = boot_cpu_type ? sclp.mtid : sclp.mtid_cp; |
744 | mtid = (mtid < smp_max_threads) ? mtid : smp_max_threads - 1; | 744 | mtid = (mtid < smp_max_threads) ? mtid : smp_max_threads - 1; |
745 | pcpu_set_smt(mtid); | 745 | pcpu_set_smt(mtid); |
746 | 746 | ||
@@ -882,7 +882,8 @@ void __init smp_fill_possible_mask(void) | |||
882 | { | 882 | { |
883 | unsigned int possible, sclp_max, cpu; | 883 | unsigned int possible, sclp_max, cpu; |
884 | 884 | ||
885 | sclp_max = min(smp_max_threads, sclp_get_mtid_max() + 1); | 885 | sclp_max = max(sclp.mtid, sclp.mtid_cp) + 1; |
886 | sclp_max = min(smp_max_threads, sclp_max); | ||
886 | sclp_max = sclp.max_cpu * sclp_max ?: nr_cpu_ids; | 887 | sclp_max = sclp.max_cpu * sclp_max ?: nr_cpu_ids; |
887 | possible = setup_possible_cpus ?: nr_cpu_ids; | 888 | possible = setup_possible_cpus ?: nr_cpu_ids; |
888 | possible = min(possible, sclp_max); | 889 | possible = min(possible, sclp_max); |