cpu_possible_mask is set early during boot based on information from the
firmware. After that it remains read only and is never changed. Therefore
there is no need to acquire the CPU-hotplug lock while reading it.
Remove cpus_read_*() while accessing cpu_possible_mask.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260401121334.xeMOSC1v@linutronix.de
if (resv > minvec)
return 0;
- if (affd->calc_sets) {
+ if (affd->calc_sets)
set_vecs = maxvec - resv;
- } else {
- cpus_read_lock();
+ else
set_vecs = cpumask_weight(cpu_possible_mask);
- cpus_read_unlock();
- }
return resv + min(set_vecs, maxvec - resv);
}