Commit 7e1777f5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'irq-urgent-2022-04-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Thomas Gleixner:
 "A single fix for the interrupt affinity spreading logic to take into
  account that there can be an imbalance between present and possible
  CPUs, which causes already assigned bits to be overwritten"

* tag 'irq-urgent-2022-04-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq/affinity: Consider that CPUs on nodes can be unbalanced
parents 9a921a6f 08d835df
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -269,8 +269,9 @@ static int __irq_build_affinity_masks(unsigned int startvec,
	 */
	if (numvecs <= nodes) {
		for_each_node_mask(n, nodemsk) {
			cpumask_or(&masks[curvec].mask, &masks[curvec].mask,
				   node_to_cpumask[n]);
			/* Ensure that only CPUs which are in both masks are set */
			cpumask_and(nmsk, cpu_mask, node_to_cpumask[n]);
			cpumask_or(&masks[curvec].mask, &masks[curvec].mask, nmsk);
			if (++curvec == last_affv)
				curvec = firstvec;
		}