irq fix for 4.13
Linus,
please pull the latest irq-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-for-linus
Fix for a regression caused by the conversion of x86 to the generic hotplug code. Instead of doing a plain single line revert, this adds a pile of comments so the semantics of the force argument are clear.
Thanks,
tglx
------------------>
Thomas Gleixner (1):
genirq/cpuhotplug: Revert "Set force affinity flag on hotplug migration"
include/linux/irq.h | 7 ++++++- kernel/irq/cpuhotplug.c | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-)
include/linux/irq.h +6 -1
@@ -388,7 +388,12 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)* @irq_mask_ack: ack and mask an interrupt source * @irq_unmask: unmask an interrupt source * @irq_eoi: end of interrupt -* @irq_set_affinity: set the CPU affinity on SMP machines +* @irq_set_affinity: Set the CPU affinity on SMP machines. If the force +* argument is true, it tells the driver to +* unconditionally apply the affinity setting. Sanity +* checks against the supplied affinity mask are not +* required. This is used for CPU hotplug where the +* target CPU is not yet set in the cpu_online_mask. * @irq_retrigger: resend an IRQ to the CPU * @irq_set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ * @irq_set_wake: enable/disable power-management wake-on of an IRQ
kernel/irq/cpuhotplug.c +7 -2
@@ -95,8 +95,13 @@ static bool migrate_one_irq(struct irq_desc *desc) affinity = cpu_online_mask; brokeaff = true; } - - err =irq_do_set_affinity (d, affinity, true); +/* +* Do not set the force argument of irq_do_set_affinity() as this +* disables the masking of offline CPUs from the supplied affinity +* mask and therefore might keep/reassign the irq to the outgoing +* CPU. +*/ + err =irq_do_set_affinity (d, affinity, false);if (err) {pr_warn_ratelimited ("IRQ%u: set affinity failed(%d).\n" , d->irq, err);