History

Merge tag 'irq-urgent-2020-08-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar: "Fix a recent IRQ affinities regression, add in a missing debugfs printout that helps the debugging of IRQ affinity logic bugs, and fix a memory leak" * tag 'irq-urgent-2020-08-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/debugfs: Add missing irqchip flags genirq/affinity: Make affinity setting if activated opt-in irqdomain/treewide: Free firmware node after domain removal

Linus Torvalds committed 6 years ago

Commit 3b4b84b2 parents 145ff1e aa251fc10 files · +56 −2Browse files

Showing the changes to kernel (2 of 10 files). Show all

Unified · Split

2 files
  1. kernel/irq/debugfs.c +5 −0
  2. kernel/irq/manage.c +5 −1
kernel/irq/debugfs.c+5−0
@@ -112,6 +112,7 @@ static const struct irq_bit_descr irqdata_states[] = { · 111 unmodified lines
112112 BIT_MASK_DESCR(IRQD_AFFINITY_SET),
113113 BIT_MASK_DESCR(IRQD_SETAFFINITY_PENDING),
114114 BIT_MASK_DESCR(IRQD_AFFINITY_MANAGED),
115+ BIT_MASK_DESCR(IRQD_AFFINITY_ON_ACTIVATE),
115116 BIT_MASK_DESCR(IRQD_MANAGED_SHUTDOWN),
116117 BIT_MASK_DESCR(IRQD_CAN_RESERVE),
117118 BIT_MASK_DESCR(IRQD_MSI_NOMASK_QUIRK),
@@ -120,6 +121,10 @@ static const struct irq_bit_descr irqdata_states[] = { · 2 unmodified lines
120121
121122 BIT_MASK_DESCR(IRQD_WAKEUP_STATE),
122123 BIT_MASK_DESCR(IRQD_WAKEUP_ARMED),
124+
125+ BIT_MASK_DESCR(IRQD_DEFAULT_TRIGGER_SET),
126+
127+ BIT_MASK_DESCR(IRQD_HANDLE_ENFORCE_IRQCTX),
123128 };
124129
125130 static const struct irq_bit_descr irqdesc_states[] = {
kernel/irq/manage.c+5−1
@@ -320,12 +320,16 @@ static bool irq_set_affinity_deactivated(struct irq_data *data, · 319 unmodified lines
320320 struct irq_desc *desc = irq_data_to_desc(data);
321321
322322 /*
323+ * Handle irq chips which can handle affinity only in activated
324+ * state correctly
325+ *
323326 * If the interrupt is not yet activated, just store the affinity
324327 * mask and do not call the chip driver at all. On activation the
325328 * driver has to make sure anyway that the interrupt is in a
326329 * useable state so startup works.
327330 */
328− if (!IS_ENABLED(CONFIG_IRQ_DOMAIN_HIERARCHY) || irqd_is_activated(data))
331+ if (!IS_ENABLED(CONFIG_IRQ_DOMAIN_HIERARCHY) ||
332+ irqd_is_activated(data) || !irqd_affinity_on_activate(data))
329333 return false;
330334
331335 cpumask_copy(desc->irq_common_data.affinity, mask);