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
Showing the changes to kernel (2 of 10 files). Show all
Unified · Split
| @@ -112,6 +112,7 @@ static const struct irq_bit_descr irqdata_states[] = { · 111 unmodified lines | ||
| 112 | 112 | BIT_MASK_DESCR(IRQD_AFFINITY_SET), |
| 113 | 113 | BIT_MASK_DESCR(IRQD_SETAFFINITY_PENDING), |
| 114 | 114 | BIT_MASK_DESCR(IRQD_AFFINITY_MANAGED), |
| 115 | + BIT_MASK_DESCR(IRQD_AFFINITY_ON_ACTIVATE), | |
| 115 | 116 | BIT_MASK_DESCR(IRQD_MANAGED_SHUTDOWN), |
| 116 | 117 | BIT_MASK_DESCR(IRQD_CAN_RESERVE), |
| 117 | 118 | BIT_MASK_DESCR(IRQD_MSI_NOMASK_QUIRK), |
| @@ -120,6 +121,10 @@ static const struct irq_bit_descr irqdata_states[] = { · 2 unmodified lines | ||
| 120 | 121 | |
| 121 | 122 | BIT_MASK_DESCR(IRQD_WAKEUP_STATE), |
| 122 | 123 | BIT_MASK_DESCR(IRQD_WAKEUP_ARMED), |
| 124 | + | |
| 125 | + BIT_MASK_DESCR(IRQD_DEFAULT_TRIGGER_SET), | |
| 126 | + | |
| 127 | + BIT_MASK_DESCR(IRQD_HANDLE_ENFORCE_IRQCTX), | |
| 123 | 128 | }; |
| 124 | 129 | |
| 125 | 130 | static const struct irq_bit_descr irqdesc_states[] = { |
| @@ -320,12 +320,16 @@ static bool irq_set_affinity_deactivated(struct irq_data *data, · 319 unmodified lines | ||
| 320 | 320 | struct irq_desc *desc = irq_data_to_desc(data); |
| 321 | 321 | |
| 322 | 322 | /* |
| 323 | + * Handle irq chips which can handle affinity only in activated | |
| 324 | + * state correctly | |
| 325 | + * | |
| 323 | 326 | * If the interrupt is not yet activated, just store the affinity |
| 324 | 327 | * mask and do not call the chip driver at all. On activation the |
| 325 | 328 | * driver has to make sure anyway that the interrupt is in a |
| 326 | 329 | * useable state so startup works. |
| 327 | 330 | */ |
| 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)) | |
| 329 | 333 | return false; |
| 330 | 334 | |
| 331 | 335 | cpumask_copy(desc->irq_common_data.affinity, mask); |