From: Jiang Liu Required to support non PCI based MSI. [ tglx: Extracted from Jiangs patch series ] Signed-off-by: Jiang Liu Signed-off-by: Thomas Gleixner --- drivers/pci/Kconfig | 1 + drivers/pci/msi.c | 18 ------------------ kernel/irq/msi.c | 13 +++++++++++++ 3 files changed, 14 insertions(+), 18 deletions(-) Index: tip/drivers/pci/Kconfig =================================================================== --- tip.orig/drivers/pci/Kconfig +++ tip/drivers/pci/Kconfig @@ -4,6 +4,7 @@ config PCI_MSI bool "Message Signaled Interrupts (MSI and MSI-X)" depends on PCI + select GENERIC_MSI_IRQ help This allows device drivers to enable MSI (Message Signaled Interrupts). Message Signaled Interrupts enable a device to Index: tip/drivers/pci/msi.c =================================================================== --- tip.orig/drivers/pci/msi.c +++ tip/drivers/pci/msi.c @@ -286,24 +286,6 @@ void read_msi_msg(unsigned int irq, stru __read_msi_msg(entry, msg); } -void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg) -{ - /* Assert that the cache is valid, assuming that - * valid messages are not all-zeroes. */ - BUG_ON(!(entry->msg.address_hi | entry->msg.address_lo | - entry->msg.data)); - - *msg = entry->msg; -} - -void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg) -{ - struct msi_desc *entry = irq_get_msi_desc(irq); - - __get_cached_msi_msg(entry, msg); -} -EXPORT_SYMBOL_GPL(get_cached_msi_msg); - void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) { if (entry->dev->current_state != PCI_D0) { Index: tip/kernel/irq/msi.c =================================================================== --- tip.orig/kernel/irq/msi.c +++ tip/kernel/irq/msi.c @@ -13,6 +13,19 @@ #include #include +void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg) +{ + *msg = entry->msg; +} + +void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg) +{ + struct msi_desc *entry = irq_get_msi_desc(irq); + + __get_cached_msi_msg(entry, msg); +} +EXPORT_SYMBOL_GPL(get_cached_msi_msg); + #ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN int msi_domain_set_affinity(struct irq_data *irq_data, const struct cpumask *mask, bool force) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/