Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Sebastian Andrzej Siewior and committed by
Thomas Gleixner
34d85ad4 56c167a0

+2 -5
+2 -5
kernel/irq/affinity.c
··· 115 115 if (resv > minvec) 116 116 return 0; 117 117 118 - if (affd->calc_sets) { 118 + if (affd->calc_sets) 119 119 set_vecs = maxvec - resv; 120 - } else { 121 - cpus_read_lock(); 120 + else 122 121 set_vecs = cpumask_weight(cpu_possible_mask); 123 - cpus_read_unlock(); 124 - } 125 122 126 123 return resv + min(set_vecs, maxvec - resv); 127 124 }