diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-11-09 23:10:28 +0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-11-23 13:01:47 +0100 |
commit | 9dde55b72dc80bfae4280ddce5dbd69ba8240813 (patch) | |
tree | 1e36e2e0b199d46962ab89111328e34706f4353a /include/linux/irq.h | |
parent | f86eff222fabe30da5c536ef2b51bd98d14cfe3b (diff) |
genirq: Introduce callback irq_chip.irq_write_msi_msg
Introduce callback irq_chip.irq_write_msi_msg, so we can share common
code among MSI alike interrupt controllers, such as HPET and DMAR.
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 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 677482bd8b92..8badf34baf0f 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -322,6 +322,7 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) * @irq_release_resources: optional to release resources acquired with * irq_request_resources * @irq_compose_msi_msg: optional to compose message content for MSI + * @irq_write_msi_msg: optional to write message content for MSI * @flags: chip specific flags */ struct irq_chip { @@ -359,6 +360,7 @@ struct irq_chip { void (*irq_release_resources)(struct irq_data *data); void (*irq_compose_msi_msg)(struct irq_data *data, struct msi_msg *msg); + void (*irq_write_msi_msg)(struct irq_data *data, struct msi_msg *msg); unsigned long flags; }; @@ -459,6 +461,12 @@ extern int irq_chip_set_affinity_parent(struct irq_data *data, bool force); #endif +static inline void irq_chip_write_msi_msg(struct irq_data *data, + struct msi_msg *msg) +{ + data->chip->irq_write_msi_msg(data, msg); +} + /* Handling of unhandled and spurious interrupts: */ extern void note_interrupt(unsigned int irq, struct irq_desc *desc, irqreturn_t action_ret); |