提交 38b6a1cf 编写于 作者: J Jiang Liu 提交者: Thomas Gleixner

PCI/MSI: Move cached entry functions to irq core

Required to support non PCI based MSI.

[ tglx: Extracted from Jiangs patch series ]
Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 aeeb5965
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
config PCI_MSI config PCI_MSI
bool "Message Signaled Interrupts (MSI and MSI-X)" bool "Message Signaled Interrupts (MSI and MSI-X)"
depends on PCI depends on PCI
select GENERIC_MSI_IRQ
help help
This allows device drivers to enable MSI (Message Signaled This allows device drivers to enable MSI (Message Signaled
Interrupts). Message Signaled Interrupts enable a device to Interrupts). Message Signaled Interrupts enable a device to
......
...@@ -290,24 +290,6 @@ void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) ...@@ -290,24 +290,6 @@ void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *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 __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
{ {
if (entry->dev->current_state != PCI_D0) { if (entry->dev->current_state != PCI_D0) {
......
...@@ -18,6 +18,19 @@ ...@@ -18,6 +18,19 @@
/* Temparory solution for building, will be removed later */ /* Temparory solution for building, will be removed later */
#include <linux/pci.h> #include <linux/pci.h>
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 #ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
/** /**
* msi_domain_set_affinity - Generic affinity setter function for MSI domains * msi_domain_set_affinity - Generic affinity setter function for MSI domains
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册