diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-11-06 09:20:16 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-11-23 07:01:46 -0500 |
commit | 85f08c17de26f117be6ca7aa260d2ec02a2248ba (patch) | |
tree | 8a3d7091188c77e8fc6534b3db1394a08bba8128 /kernel/irq/chip.c | |
parent | 0cc01abab6412f3a76256bb57ca58dcb94a6edc7 (diff) |
genirq: Introduce helper functions to support stacked irq_chip
Now we already support hierarchy irq_data, so introduce several helpers
to support stacked irq_chips.
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>
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 72a93086216b..dd1d3c4c93a2 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -850,3 +850,31 @@ void irq_cpu_offline(void) | |||
850 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 850 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
851 | } | 851 | } |
852 | } | 852 | } |
853 | |||
854 | #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY | ||
855 | /** | ||
856 | * irq_chip_ack_parent - Acknowledge the parent interrupt | ||
857 | * @data: Pointer to interrupt specific data | ||
858 | */ | ||
859 | void irq_chip_ack_parent(struct irq_data *data) | ||
860 | { | ||
861 | data = data->parent_data; | ||
862 | data->chip->irq_ack(data); | ||
863 | } | ||
864 | |||
865 | /** | ||
866 | * irq_chip_retrigger_hierarchy - Retrigger an interrupt in hardware | ||
867 | * @data: Pointer to interrupt specific data | ||
868 | * | ||
869 | * Iterate through the domain hierarchy of the interrupt and check | ||
870 | * whether a hw retrigger function exists. If yes, invoke it. | ||
871 | */ | ||
872 | int irq_chip_retrigger_hierarchy(struct irq_data *data) | ||
873 | { | ||
874 | for (data = data->parent_data; data; data = data->parent_data) | ||
875 | if (data->chip && data->chip->irq_retrigger) | ||
876 | return data->chip->irq_retrigger(data); | ||
877 | |||
878 | return -ENOSYS; | ||
879 | } | ||
880 | #endif | ||