aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2014-11-09 10:10:34 -0500
committerThomas Gleixner <tglx@linutronix.de>2014-11-23 07:01:45 -0500
commit83a18912b0e8d275001bca6fc9c0fe519d98f280 (patch)
treed63c40c62eb6964f84a2200a8ed9710772032b19
parent891d4a48f7da39de2be17a59b47df62dccf0f3d5 (diff)
PCI/MSI: Rename write_msi_msg() to pci_write_msi_msg()
Rename write_msi_msg() to pci_write_msi_msg() to mark it as PCI specific. 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>
-rw-r--r--arch/arm/mach-iop13xx/msi.c2
-rw-r--r--arch/ia64/kernel/msi_ia64.c4
-rw-r--r--arch/ia64/sn/kernel/msi_sn.c4
-rw-r--r--arch/mips/pci/msi-octeon.c2
-rw-r--r--arch/mips/pci/msi-xlp.c4
-rw-r--r--arch/mips/pci/pci-xlr.c2
-rw-r--r--arch/powerpc/platforms/cell/axon_msi.c2
-rw-r--r--arch/powerpc/platforms/powernv/pci.c2
-rw-r--r--arch/powerpc/sysdev/fsl_msi.c2
-rw-r--r--arch/powerpc/sysdev/mpic_pasemi_msi.c2
-rw-r--r--arch/powerpc/sysdev/mpic_u3msi.c2
-rw-r--r--arch/powerpc/sysdev/ppc4xx_hsta_msi.c2
-rw-r--r--arch/powerpc/sysdev/ppc4xx_msi.c2
-rw-r--r--arch/s390/pci/pci.c2
-rw-r--r--arch/sparc/kernel/pci_msi.c2
-rw-r--r--arch/tile/kernel/pci_gx.c2
-rw-r--r--arch/x86/kernel/apic/io_apic.c4
-rw-r--r--arch/x86/pci/xen.c2
-rw-r--r--drivers/irqchip/irq-armada-370-xp.c2
-rw-r--r--drivers/pci/host/pci-tegra.c2
-rw-r--r--drivers/pci/host/pcie-designware.c2
-rw-r--r--drivers/pci/host/pcie-rcar.c2
-rw-r--r--drivers/pci/host/pcie-xilinx.c2
-rw-r--r--drivers/pci/msi.c10
-rw-r--r--drivers/vfio/pci/vfio_pci_intrs.c2
-rw-r--r--include/linux/msi.h14
26 files changed, 45 insertions, 35 deletions
diff --git a/arch/arm/mach-iop13xx/msi.c b/arch/arm/mach-iop13xx/msi.c
index e7730cf9c15d..3f7739cdb85b 100644
--- a/arch/arm/mach-iop13xx/msi.c
+++ b/arch/arm/mach-iop13xx/msi.c
@@ -153,7 +153,7 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
153 id = iop13xx_cpu_id(); 153 id = iop13xx_cpu_id();
154 msg.data = (id << IOP13XX_MU_MIMR_CORE_SELECT) | (irq & 0x7f); 154 msg.data = (id << IOP13XX_MU_MIMR_CORE_SELECT) | (irq & 0x7f);
155 155
156 write_msi_msg(irq, &msg); 156 pci_write_msi_msg(irq, &msg);
157 irq_set_chip_and_handler(irq, &iop13xx_msi_chip, handle_simple_irq); 157 irq_set_chip_and_handler(irq, &iop13xx_msi_chip, handle_simple_irq);
158 158
159 return 0; 159 return 0;
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index 8c3730c3c63d..35b10dd2bb76 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -35,7 +35,7 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata,
35 data |= MSI_DATA_VECTOR(irq_to_vector(irq)); 35 data |= MSI_DATA_VECTOR(irq_to_vector(irq));
36 msg.data = data; 36 msg.data = data;
37 37
38 write_msi_msg(irq, &msg); 38 pci_write_msi_msg(irq, &msg);
39 cpumask_copy(idata->affinity, cpumask_of(cpu)); 39 cpumask_copy(idata->affinity, cpumask_of(cpu));
40 40
41 return 0; 41 return 0;
@@ -71,7 +71,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
71 MSI_DATA_DELIVERY_FIXED | 71 MSI_DATA_DELIVERY_FIXED |
72 MSI_DATA_VECTOR(vector); 72 MSI_DATA_VECTOR(vector);
73 73
74 write_msi_msg(irq, &msg); 74 pci_write_msi_msg(irq, &msg);
75 irq_set_chip_and_handler(irq, &ia64_msi_chip, handle_edge_irq); 75 irq_set_chip_and_handler(irq, &ia64_msi_chip, handle_edge_irq);
76 76
77 return 0; 77 return 0;
diff --git a/arch/ia64/sn/kernel/msi_sn.c b/arch/ia64/sn/kernel/msi_sn.c
index 446e7799928c..433cafed5c3a 100644
--- a/arch/ia64/sn/kernel/msi_sn.c
+++ b/arch/ia64/sn/kernel/msi_sn.c
@@ -145,7 +145,7 @@ int sn_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *entry)
145 msg.data = 0x100 + irq; 145 msg.data = 0x100 + irq;
146 146
147 irq_set_msi_desc(irq, entry); 147 irq_set_msi_desc(irq, entry);
148 write_msi_msg(irq, &msg); 148 pci_write_msi_msg(irq, &msg);
149 irq_set_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq); 149 irq_set_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq);
150 150
151 return 0; 151 return 0;
@@ -205,7 +205,7 @@ static int sn_set_msi_irq_affinity(struct irq_data *data,
205 msg.address_hi = (u32)(bus_addr >> 32); 205 msg.address_hi = (u32)(bus_addr >> 32);
206 msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff); 206 msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff);
207 207
208 write_msi_msg(irq, &msg); 208 pci_write_msi_msg(irq, &msg);
209 cpumask_copy(data->affinity, cpu_mask); 209 cpumask_copy(data->affinity, cpu_mask);
210 210
211 return 0; 211 return 0;
diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c
index 63bbe07a1ccd..cffaaf4aae3c 100644
--- a/arch/mips/pci/msi-octeon.c
+++ b/arch/mips/pci/msi-octeon.c
@@ -178,7 +178,7 @@ msi_irq_allocated:
178 pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, control); 178 pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, control);
179 179
180 irq_set_msi_desc(irq, desc); 180 irq_set_msi_desc(irq, desc);
181 write_msi_msg(irq, &msg); 181 pci_write_msi_msg(irq, &msg);
182 return 0; 182 return 0;
183} 183}
184 184
diff --git a/arch/mips/pci/msi-xlp.c b/arch/mips/pci/msi-xlp.c
index fa374fe3746b..81ea2b40db61 100644
--- a/arch/mips/pci/msi-xlp.c
+++ b/arch/mips/pci/msi-xlp.c
@@ -345,7 +345,7 @@ static int xlp_setup_msi(uint64_t lnkbase, int node, int link,
345 if (ret < 0) 345 if (ret < 0)
346 return ret; 346 return ret;
347 347
348 write_msi_msg(xirq, &msg); 348 pci_write_msi_msg(xirq, &msg);
349 return 0; 349 return 0;
350} 350}
351 351
@@ -448,7 +448,7 @@ static int xlp_setup_msix(uint64_t lnkbase, int node, int link,
448 return ret; 448 return ret;
449 } 449 }
450 450
451 write_msi_msg(xirq, &msg); 451 pci_write_msi_msg(xirq, &msg);
452 return 0; 452 return 0;
453} 453}
454 454
diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c
index 0dde80332d3a..26d2dabef281 100644
--- a/arch/mips/pci/pci-xlr.c
+++ b/arch/mips/pci/pci-xlr.c
@@ -260,7 +260,7 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
260 if (ret < 0) 260 if (ret < 0)
261 return ret; 261 return ret;
262 262
263 write_msi_msg(irq, &msg); 263 pci_write_msi_msg(irq, &msg);
264 return 0; 264 return 0;
265} 265}
266#endif 266#endif
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 862b32702d29..26fa3432352e 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -279,7 +279,7 @@ static int axon_msi_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
279 279
280 irq_set_msi_desc(virq, entry); 280 irq_set_msi_desc(virq, entry);
281 msg.data = virq; 281 msg.data = virq;
282 write_msi_msg(virq, &msg); 282 pci_write_msi_msg(virq, &msg);
283 } 283 }
284 284
285 return 0; 285 return 0;
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index b3ca77ddf36d..e79a38a1df9f 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -91,7 +91,7 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
91 return rc; 91 return rc;
92 } 92 }
93 irq_set_msi_desc(virq, entry); 93 irq_set_msi_desc(virq, entry);
94 write_msi_msg(virq, &msg); 94 pci_write_msi_msg(virq, &msg);
95 } 95 }
96 return 0; 96 return 0;
97} 97}
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index de40b48b460e..bd5a9f7c0029 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -242,7 +242,7 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
242 irq_set_msi_desc(virq, entry); 242 irq_set_msi_desc(virq, entry);
243 243
244 fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data); 244 fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data);
245 write_msi_msg(virq, &msg); 245 pci_write_msi_msg(virq, &msg);
246 } 246 }
247 return 0; 247 return 0;
248 248
diff --git a/arch/powerpc/sysdev/mpic_pasemi_msi.c b/arch/powerpc/sysdev/mpic_pasemi_msi.c
index 15dccd35fa11..45a6f407883c 100644
--- a/arch/powerpc/sysdev/mpic_pasemi_msi.c
+++ b/arch/powerpc/sysdev/mpic_pasemi_msi.c
@@ -136,7 +136,7 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
136 * register to generate MSI [512...1023] 136 * register to generate MSI [512...1023]
137 */ 137 */
138 msg.data = hwirq-0x200; 138 msg.data = hwirq-0x200;
139 write_msi_msg(virq, &msg); 139 pci_write_msi_msg(virq, &msg);
140 } 140 }
141 141
142 return 0; 142 return 0;
diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
index 623d7fba15b4..ac6f1f9d03ce 100644
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -171,7 +171,7 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
171 printk("u3msi: allocated virq 0x%x (hw 0x%x) addr 0x%lx\n", 171 printk("u3msi: allocated virq 0x%x (hw 0x%x) addr 0x%lx\n",
172 virq, hwirq, (unsigned long)addr); 172 virq, hwirq, (unsigned long)addr);
173 msg.data = hwirq; 173 msg.data = hwirq;
174 write_msi_msg(virq, &msg); 174 pci_write_msi_msg(virq, &msg);
175 175
176 hwirq++; 176 hwirq++;
177 } 177 }
diff --git a/arch/powerpc/sysdev/ppc4xx_hsta_msi.c b/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
index a6a4dbda9078..908105f835d1 100644
--- a/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
+++ b/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
@@ -85,7 +85,7 @@ static int hsta_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
85 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1); 85 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1);
86 return -EINVAL; 86 return -EINVAL;
87 } 87 }
88 write_msi_msg(hwirq, &msg); 88 pci_write_msi_msg(hwirq, &msg);
89 } 89 }
90 90
91 return 0; 91 return 0;
diff --git a/arch/powerpc/sysdev/ppc4xx_msi.c b/arch/powerpc/sysdev/ppc4xx_msi.c
index 22b5200636e7..518eabbe0bdc 100644
--- a/arch/powerpc/sysdev/ppc4xx_msi.c
+++ b/arch/powerpc/sysdev/ppc4xx_msi.c
@@ -116,7 +116,7 @@ static int ppc4xx_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
116 116
117 irq_set_msi_desc(virq, entry); 117 irq_set_msi_desc(virq, entry);
118 msg.data = int_no; 118 msg.data = int_no;
119 write_msi_msg(virq, &msg); 119 pci_write_msi_msg(virq, &msg);
120 } 120 }
121 return 0; 121 return 0;
122} 122}
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 552b9908aa77..ad1a9e2a1831 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -403,7 +403,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
403 msg.data = hwirq; 403 msg.data = hwirq;
404 msg.address_lo = zdev->msi_addr & 0xffffffff; 404 msg.address_lo = zdev->msi_addr & 0xffffffff;
405 msg.address_hi = zdev->msi_addr >> 32; 405 msg.address_hi = zdev->msi_addr >> 32;
406 write_msi_msg(irq, &msg); 406 pci_write_msi_msg(irq, &msg);
407 airq_iv_set_data(zdev->aibv, hwirq, irq); 407 airq_iv_set_data(zdev->aibv, hwirq, irq);
408 hwirq++; 408 hwirq++;
409 } 409 }
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c
index 580651af73f2..73db0ed80d83 100644
--- a/arch/sparc/kernel/pci_msi.c
+++ b/arch/sparc/kernel/pci_msi.c
@@ -161,7 +161,7 @@ static int sparc64_setup_msi_irq(unsigned int *irq_p,
161 msg.data = msi; 161 msg.data = msi;
162 162
163 irq_set_msi_desc(*irq_p, entry); 163 irq_set_msi_desc(*irq_p, entry);
164 write_msi_msg(*irq_p, &msg); 164 pci_write_msi_msg(*irq_p, &msg);
165 165
166 return 0; 166 return 0;
167 167
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index e39f9c542807..376d9f1d9951 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -1590,7 +1590,7 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
1590 msg.address_hi = msi_addr >> 32; 1590 msg.address_hi = msi_addr >> 32;
1591 msg.address_lo = msi_addr & 0xffffffff; 1591 msg.address_lo = msi_addr & 0xffffffff;
1592 1592
1593 write_msi_msg(irq, &msg); 1593 pci_write_msi_msg(irq, &msg);
1594 irq_set_chip_and_handler(irq, &tilegx_msi_chip, handle_level_irq); 1594 irq_set_chip_and_handler(irq, &tilegx_msi_chip, handle_level_irq);
1595 irq_set_handler_data(irq, controller); 1595 irq_set_handler_data(irq, controller);
1596 1596
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 1183d545da1e..d775aef42b87 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3158,7 +3158,7 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force)
3158 msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK; 3158 msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
3159 msg.address_lo |= MSI_ADDR_DEST_ID(dest); 3159 msg.address_lo |= MSI_ADDR_DEST_ID(dest);
3160 3160
3161 __write_msi_msg(data->msi_desc, &msg); 3161 __pci_write_msi_msg(data->msi_desc, &msg);
3162 3162
3163 return IRQ_SET_MASK_OK_NOCOPY; 3163 return IRQ_SET_MASK_OK_NOCOPY;
3164} 3164}
@@ -3196,7 +3196,7 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc,
3196 * MSI message denotes a contiguous group of IRQs, written for 0th IRQ. 3196 * MSI message denotes a contiguous group of IRQs, written for 0th IRQ.
3197 */ 3197 */
3198 if (!irq_offset) 3198 if (!irq_offset)
3199 write_msi_msg(irq, &msg); 3199 pci_write_msi_msg(irq, &msg);
3200 3200
3201 setup_remapped_irq(irq, irq_cfg(irq), chip); 3201 setup_remapped_irq(irq, irq_cfg(irq), chip);
3202 3202
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index ff0068b8ce5e..1819a91bbb9f 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -240,7 +240,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
240 goto error; 240 goto error;
241 } 241 }
242 xen_msi_compose_msg(dev, pirq, &msg); 242 xen_msi_compose_msg(dev, pirq, &msg);
243 __write_msi_msg(msidesc, &msg); 243 __pci_write_msi_msg(msidesc, &msg);
244 dev_dbg(&dev->dev, "xen: msi bound to pirq=%d\n", pirq); 244 dev_dbg(&dev->dev, "xen: msi bound to pirq=%d\n", pirq);
245 } else { 245 } else {
246 dev_dbg(&dev->dev, 246 dev_dbg(&dev->dev,
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index 4e202375e027..8c7f077abb09 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -156,7 +156,7 @@ static int armada_370_xp_setup_msi_irq(struct msi_controller *chip,
156 msg.address_hi = 0; 156 msg.address_hi = 0;
157 msg.data = 0xf00 | (hwirq + 16); 157 msg.data = 0xf00 | (hwirq + 16);
158 158
159 write_msi_msg(virq, &msg); 159 pci_write_msi_msg(virq, &msg);
160 return 0; 160 return 0;
161} 161}
162 162
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 1f01faa918cc..31841718bedd 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1299,7 +1299,7 @@ static int tegra_msi_setup_irq(struct msi_controller *chip,
1299 msg.address_hi = 0; 1299 msg.address_hi = 0;
1300 msg.data = hwirq; 1300 msg.data = hwirq;
1301 1301
1302 write_msi_msg(irq, &msg); 1302 pci_write_msi_msg(irq, &msg);
1303 1303
1304 return 0; 1304 return 0;
1305} 1305}
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 5278d3e63070..e03f4e7e1f7d 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -298,7 +298,7 @@ static int dw_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
298 else 298 else
299 msg.data = pos; 299 msg.data = pos;
300 300
301 write_msi_msg(irq, &msg); 301 pci_write_msi_msg(irq, &msg);
302 302
303 return 0; 303 return 0;
304} 304}
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index c2e3fcb55fd4..c1177cd55ce3 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -640,7 +640,7 @@ static int rcar_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
640 msg.address_hi = rcar_pci_read_reg(pcie, PCIEMSIAUR); 640 msg.address_hi = rcar_pci_read_reg(pcie, PCIEMSIAUR);
641 msg.data = hwirq; 641 msg.data = hwirq;
642 642
643 write_msi_msg(irq, &msg); 643 pci_write_msi_msg(irq, &msg);
644 644
645 return 0; 645 return 0;
646} 646}
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index eca292347c69..67683380f0f7 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -375,7 +375,7 @@ static int xilinx_pcie_msi_setup_irq(struct msi_controller *chip,
375 msg.address_lo = msg_addr; 375 msg.address_lo = msg_addr;
376 msg.data = irq; 376 msg.data = irq;
377 377
378 write_msi_msg(irq, &msg); 378 pci_write_msi_msg(irq, &msg);
379 379
380 return 0; 380 return 0;
381} 381}
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index c77adc735f8a..156ba8f809b7 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -130,7 +130,7 @@ static void default_restore_msi_irq(struct pci_dev *dev, int irq)
130 } 130 }
131 131
132 if (entry) 132 if (entry)
133 __write_msi_msg(entry, &entry->msg); 133 __pci_write_msi_msg(entry, &entry->msg);
134} 134}
135 135
136void __weak arch_restore_msi_irqs(struct pci_dev *dev) 136void __weak arch_restore_msi_irqs(struct pci_dev *dev)
@@ -300,7 +300,7 @@ void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg)
300} 300}
301EXPORT_SYMBOL_GPL(get_cached_msi_msg); 301EXPORT_SYMBOL_GPL(get_cached_msi_msg);
302 302
303void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) 303void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
304{ 304{
305 if (entry->dev->current_state != PCI_D0) { 305 if (entry->dev->current_state != PCI_D0) {
306 /* Don't touch the hardware now */ 306 /* Don't touch the hardware now */
@@ -337,13 +337,13 @@ void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
337 entry->msg = *msg; 337 entry->msg = *msg;
338} 338}
339 339
340void write_msi_msg(unsigned int irq, struct msi_msg *msg) 340void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg)
341{ 341{
342 struct msi_desc *entry = irq_get_msi_desc(irq); 342 struct msi_desc *entry = irq_get_msi_desc(irq);
343 343
344 __write_msi_msg(entry, msg); 344 __pci_write_msi_msg(entry, msg);
345} 345}
346EXPORT_SYMBOL_GPL(write_msi_msg); 346EXPORT_SYMBOL_GPL(pci_write_msi_msg);
347 347
348static void free_msi_irqs(struct pci_dev *dev) 348static void free_msi_irqs(struct pci_dev *dev)
349{ 349{
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index 553212f037c3..e8d695b3f54e 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -560,7 +560,7 @@ static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev,
560 struct msi_msg msg; 560 struct msi_msg msg;
561 561
562 get_cached_msi_msg(irq, &msg); 562 get_cached_msi_msg(irq, &msg);
563 write_msi_msg(irq, &msg); 563 pci_write_msi_msg(irq, &msg);
564 } 564 }
565 565
566 ret = request_irq(irq, vfio_msihandler, 0, 566 ret = request_irq(irq, vfio_msihandler, 0,
diff --git a/include/linux/msi.h b/include/linux/msi.h
index f36c37b46f10..301adecbc34d 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -17,9 +17,7 @@ struct 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 __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);
20void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
21void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); 20void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg);
22void write_msi_msg(unsigned int irq, struct msi_msg *msg);
23 21
24u32 __msix_mask_irq(struct msi_desc *desc, u32 flag); 22u32 __msix_mask_irq(struct msi_desc *desc, u32 flag);
25u32 __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag); 23u32 __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag);
@@ -51,6 +49,18 @@ struct msi_desc {
51}; 49};
52 50
53void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); 51void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
52void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
53void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg);
54
55/* Conversion helpers. Should be removed after merging */
56static inline void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
57{
58 __pci_write_msi_msg(entry, msg);
59}
60static inline void write_msi_msg(int irq, struct msi_msg *msg)
61{
62 pci_write_msi_msg(irq, msg);
63}
54 64
55/* 65/*
56 * The arch hooks to setup up msi irqs. Those functions are 66 * The arch hooks to setup up msi irqs. Those functions are