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:
parent
56c167a0c0
commit
34d85ad426
1 changed files with 2 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue