genirq/affinity: Remove cpus_read_lock() while reading cpu_possible_mask

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
This commit is contained in:
Sebastian Andrzej Siewior 2026-04-01 14:13:34 +02:00 committed by Thomas Gleixner
commit 34d85ad426

View file

@ -115,13 +115,10 @@ unsigned int irq_calc_affinity_vectors(unsigned int minvec, unsigned int maxvec,
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);
}