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 include/linux (1 of 10 files). Show all

Unified · Split

include/linux/irq.h+13−0
@@ -213,6 +213,8 @@ struct irq_data { · 212 unmodified lines
213213 * required
214214 * IRQD_HANDLE_ENFORCE_IRQCTX - Enforce that handle_irq_*() is only invoked
215215 * from actual interrupt context.
216+ * IRQD_AFFINITY_ON_ACTIVATE - Affinity is set on activation. Don't call
217+ * irq_chip::irq_set_affinity() when deactivated.
216218 */
217219 enum {
218220 IRQD_TRIGGER_MASK = 0xf,
@@ -237,6 +239,7 @@ enum { · 18 unmodified lines
237239 IRQD_CAN_RESERVE = (1 << 26),
238240 IRQD_MSI_NOMASK_QUIRK = (1 << 27),
239241 IRQD_HANDLE_ENFORCE_IRQCTX = (1 << 28),
242+ IRQD_AFFINITY_ON_ACTIVATE = (1 << 29),
240243 };
241244
242245 #define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
@@ -421,6 +424,16 @@ static inline bool irqd_msi_nomask_quirk(struct irq_data *d) · 178 unmodified lines
421424 return __irqd_to_state(d) & IRQD_MSI_NOMASK_QUIRK;
422425 }
423426
427+static inline void irqd_set_affinity_on_activate(struct irq_data *d)
428+{
429+ __irqd_to_state(d) |= IRQD_AFFINITY_ON_ACTIVATE;
430+}
431+
432+static inline bool irqd_affinity_on_activate(struct irq_data *d)
433+{
434+ return __irqd_to_state(d) & IRQD_AFFINITY_ON_ACTIVATE;
435+}
436+
424437 #undef __irqd_to_state
425438
426439 static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)