s390/sclp: unify basic sclp access by exposing "struct sclp"
Let's unify basic access to sclp fields by storing the data in an external struct in asm/sclp.h. The values can now directly be accessed by other components, so there is no need for most accessor functions and external variables anymore. The mtid, mtid_max and facility part will be cleaned up separately. 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>
This commit is contained in:

committed by
Martin Schwidefsky

parent
9747bc47b3
commit
37c5f6c86c
@@ -601,7 +601,7 @@ static void __init smp_store_cpu_states(struct sclp_cpu_info *info)
|
||||
/* No previous system present, normal boot. */
|
||||
return;
|
||||
/* Set multi-threading state to the previous system. */
|
||||
pcpu_set_smt(sclp_get_mtid_prev());
|
||||
pcpu_set_smt(sclp.mtid_prev);
|
||||
/* Collect CPU states. */
|
||||
cpu = 0;
|
||||
for (i = 0; i < info->configured; i++) {
|
||||
@@ -883,7 +883,7 @@ void __init smp_fill_possible_mask(void)
|
||||
unsigned int possible, sclp_max, cpu;
|
||||
|
||||
sclp_max = min(smp_max_threads, sclp_get_mtid_max() + 1);
|
||||
sclp_max = sclp_get_max_cpu() * sclp_max ?: nr_cpu_ids;
|
||||
sclp_max = sclp.max_cpu * sclp_max ?: nr_cpu_ids;
|
||||
possible = setup_possible_cpus ?: nr_cpu_ids;
|
||||
possible = min(possible, sclp_max);
|
||||
for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++)
|
||||
|
Reference in New Issue
Block a user