aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/pseries/msi.c2
-rw-r--r--arch/x86/pci/xen.c2
-rw-r--r--drivers/pci/msi.c9
-rw-r--r--include/linux/msi.h5
4 files changed, 6 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 8ab5add4ac82..90f756d0f58f 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -476,7 +476,7 @@ again:
476 irq_set_msi_desc(virq, entry); 476 irq_set_msi_desc(virq, entry);
477 477
478 /* Read config space back so we can restore after reset */ 478 /* Read config space back so we can restore after reset */
479 __read_msi_msg(entry, &msg); 479 __pci_read_msi_msg(entry, &msg);
480 entry->msg = msg; 480 entry->msg = msg;
481 } 481 }
482 482
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 466b978e13a5..ff0068b8ce5e 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -229,7 +229,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
229 return 1; 229 return 1;
230 230
231 list_for_each_entry(msidesc, &dev->msi_list, list) { 231 list_for_each_entry(msidesc, &dev->msi_list, list) {
232 __read_msi_msg(msidesc, &msg); 232 __pci_read_msi_msg(msidesc, &msg);
233 pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) | 233 pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) |
234 ((msg.address_lo >> MSI_ADDR_DEST_ID_SHIFT) & 0xff); 234 ((msg.address_lo >> MSI_ADDR_DEST_ID_SHIFT) & 0xff);
235 if (msg.data != XEN_PIRQ_MSI_DATA || 235 if (msg.data != XEN_PIRQ_MSI_DATA ||
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 5cb471ec3e61..c77adc735f8a 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -252,7 +252,7 @@ void default_restore_msi_irqs(struct pci_dev *dev)
252 default_restore_msi_irq(dev, entry->irq); 252 default_restore_msi_irq(dev, entry->irq);
253} 253}
254 254
255void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) 255void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
256{ 256{
257 BUG_ON(entry->dev->current_state != PCI_D0); 257 BUG_ON(entry->dev->current_state != PCI_D0);
258 258
@@ -282,13 +282,6 @@ void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
282 } 282 }
283} 283}
284 284
285void read_msi_msg(unsigned int irq, struct msi_msg *msg)
286{
287 struct msi_desc *entry = irq_get_msi_desc(irq);
288
289 __read_msi_msg(entry, msg);
290}
291
292void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg) 285void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
293{ 286{
294 /* Assert that the cache is valid, assuming that 287 /* Assert that the cache is valid, assuming that
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 6704991b0174..f36c37b46f10 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -16,12 +16,11 @@ struct irq_data;
16struct msi_desc; 16struct msi_desc;
17void mask_msi_irq(struct irq_data *data); 17void mask_msi_irq(struct irq_data *data);
18void unmask_msi_irq(struct irq_data *data); 18void unmask_msi_irq(struct irq_data *data);
19void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
20void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); 19void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
21void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); 20void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
22void read_msi_msg(unsigned int irq, struct msi_msg *msg);
23void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); 21void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg);
24void write_msi_msg(unsigned int irq, struct msi_msg *msg); 22void write_msi_msg(unsigned int irq, struct msi_msg *msg);
23
25u32 __msix_mask_irq(struct msi_desc *desc, u32 flag); 24u32 __msix_mask_irq(struct msi_desc *desc, u32 flag);
26u32 __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag); 25u32 __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag);
27 26
@@ -51,6 +50,8 @@ struct msi_desc {
51 struct msi_msg msg; 50 struct msi_msg msg;
52}; 51};
53 52
53void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
54
54/* 55/*
55 * The arch hooks to setup up msi irqs. Those functions are 56 * The arch hooks to setup up msi irqs. Those functions are
56 * implemented as weak symbols so that they /can/ be overriden by 57 * implemented as weak symbols so that they /can/ be overriden by