Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

genirq: Add IRQ_SET_MASK_OK_DONE to support stacked irqchip

Add IRQ_SET_MASK_OK_DONE in addition to IRQ_SET_MASK_OK and
IRQ_SET_MASK_OK_NOCOPY to support stacked irqchip. IRQ_SET_MASK_OK_DONE
is the same as IRQ_SET_MASK_OK to irq core. To stacked irqchip, it means
that ascendant irqchips have done all the work and no more handling
needed in descendant irqchips.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Yingjoe Chen <yingjoe.chen@mediatek.com>
Cc: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by

Jiang Liu and committed by
Thomas Gleixner
2cb62547 515085ef

+6
+4
include/linux/irq.h
··· 114 114 * 115 115 * IRQ_SET_MASK_OK - OK, core updates irq_data.affinity 116 116 * IRQ_SET_MASK_NOCPY - OK, chip did update irq_data.affinity 117 + * IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to 118 + * support stacked irqchips, which indicates skipping 119 + * all descendent irqchips. 117 120 */ 118 121 enum { 119 122 IRQ_SET_MASK_OK = 0, 120 123 IRQ_SET_MASK_OK_NOCOPY, 124 + IRQ_SET_MASK_OK_DONE, 121 125 }; 122 126 123 127 struct msi_desc;
+2
kernel/irq/manage.c
··· 183 183 ret = chip->irq_set_affinity(data, mask, force); 184 184 switch (ret) { 185 185 case IRQ_SET_MASK_OK: 186 + case IRQ_SET_MASK_OK_DONE: 186 187 cpumask_copy(data->affinity, mask); 187 188 case IRQ_SET_MASK_OK_NOCOPY: 188 189 irq_set_thread_affinity(desc); ··· 601 600 602 601 switch (ret) { 603 602 case IRQ_SET_MASK_OK: 603 + case IRQ_SET_MASK_OK_DONE: 604 604 irqd_clear(&desc->irq_data, IRQD_TRIGGER_MASK); 605 605 irqd_set(&desc->irq_data, flags); 606 606