]> git.ipfire.org Git - thirdparty/linux.git/commit
genirq/cpuhotplug: Notify about affinity changes breaking the affinity mask
authorImran Khan <imran.f.khan@oracle.com>
Tue, 13 Jan 2026 14:37:27 +0000 (22:37 +0800)
committerThomas Gleixner <tglx@kernel.org>
Tue, 13 Jan 2026 20:18:16 +0000 (21:18 +0100)
commitdd9f6d30c64001ca4dde973ac04d8d155e856743
tree37ee50c5ccfdf0b4c306baedecc048f033479ba6
parentfb11a2493e685d0b733c2346f5b26f2e372584fb
genirq/cpuhotplug: Notify about affinity changes breaking the affinity mask

During CPU offlining the interrupts affined to that CPU are moved to other
online CPUs, which might break the original affinity mask if the outgoing
CPU was the last online CPU in that mask. This change is not propagated to
irq_desc::affinity_notify(), which leaves users of the affinity notifier
mechanism with stale information.

Avoid this by scheduling affinity change notification work for interrupts
that were affined to the CPU being offlined, if the new target CPU is not
part of the original affinity mask.

Since irq_set_affinity_locked() uses the same logic to schedule affinity
change notification work, split out this logic into a dedicated function
and use that at both places.

[ tglx: Removed the EXPORT(), removed the !SMP stub, moved the prototype,
   added a lockdep assert instead of a comment, fixed up coding style
   and name space. Polished and clarified the change log ]

Signed-off-by: Imran Khan <imran.f.khan@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260113143727.1041265-1-imran.f.khan@oracle.com
kernel/irq/cpuhotplug.c
kernel/irq/internals.h
kernel/irq/manage.c