Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9747bc47 authored by David Hildenbrand's avatar David Hildenbrand Committed by Martin Schwidefsky
Browse files

s390/sclp: prepare smp_fill_possible_mask for global "struct sclp"



We need to rename sclp -> sclp_max to prepare for using the global variable
"sclp" for sclp access later in this function.

Acked-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent c431761d
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -880,12 +880,12 @@ void __noreturn cpu_die(void)


void __init smp_fill_possible_mask(void)
void __init smp_fill_possible_mask(void)
{
{
	unsigned int possible, sclp, cpu;
	unsigned int possible, sclp_max, cpu;


	sclp = min(smp_max_threads, sclp_get_mtid_max() + 1);
	sclp_max = min(smp_max_threads, sclp_get_mtid_max() + 1);
	sclp = sclp_get_max_cpu()*sclp ?: nr_cpu_ids;
	sclp_max = sclp_get_max_cpu() * sclp_max ?: nr_cpu_ids;
	possible = setup_possible_cpus ?: nr_cpu_ids;
	possible = setup_possible_cpus ?: nr_cpu_ids;
	possible = min(possible, sclp);
	possible = min(possible, sclp_max);
	for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++)
	for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++)
		set_cpu_possible(cpu, true);
		set_cpu_possible(cpu, true);
}
}