提交 2cb62547 编写于 作者: J Jiang Liu 提交者: Thomas Gleixner

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: NJiang 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: NThomas Gleixner <tglx@linutronix.de>
上级 515085ef
...@@ -114,10 +114,14 @@ enum { ...@@ -114,10 +114,14 @@ enum {
* *
* IRQ_SET_MASK_OK - OK, core updates irq_data.affinity * IRQ_SET_MASK_OK - OK, core updates irq_data.affinity
* IRQ_SET_MASK_NOCPY - OK, chip did update irq_data.affinity * IRQ_SET_MASK_NOCPY - OK, chip did update irq_data.affinity
* IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to
* support stacked irqchips, which indicates skipping
* all descendent irqchips.
*/ */
enum { enum {
IRQ_SET_MASK_OK = 0, IRQ_SET_MASK_OK = 0,
IRQ_SET_MASK_OK_NOCOPY, IRQ_SET_MASK_OK_NOCOPY,
IRQ_SET_MASK_OK_DONE,
}; };
struct msi_desc; struct msi_desc;
......
...@@ -183,6 +183,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, ...@@ -183,6 +183,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
ret = chip->irq_set_affinity(data, mask, force); ret = chip->irq_set_affinity(data, mask, force);
switch (ret) { switch (ret) {
case IRQ_SET_MASK_OK: case IRQ_SET_MASK_OK:
case IRQ_SET_MASK_OK_DONE:
cpumask_copy(data->affinity, mask); cpumask_copy(data->affinity, mask);
case IRQ_SET_MASK_OK_NOCOPY: case IRQ_SET_MASK_OK_NOCOPY:
irq_set_thread_affinity(desc); irq_set_thread_affinity(desc);
...@@ -600,6 +601,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, ...@@ -600,6 +601,7 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
switch (ret) { switch (ret) {
case IRQ_SET_MASK_OK: case IRQ_SET_MASK_OK:
case IRQ_SET_MASK_OK_DONE:
irqd_clear(&desc->irq_data, IRQD_TRIGGER_MASK); irqd_clear(&desc->irq_data, IRQD_TRIGGER_MASK);
irqd_set(&desc->irq_data, flags); irqd_set(&desc->irq_data, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册