PCI/MSI: Rename write_msi_msg() to pci_write_msi_msg()
authorJiang Liu <jiang.liu@linux.intel.com>
Sun, 9 Nov 2014 15:10:34 +0000 (23:10 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 23 Nov 2014 12:01:45 +0000 (13:01 +0100)
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>
26 files changed:
arch/arm/mach-iop13xx/msi.c
arch/ia64/kernel/msi_ia64.c
arch/ia64/sn/kernel/msi_sn.c
arch/mips/pci/msi-octeon.c
arch/mips/pci/msi-xlp.c
arch/mips/pci/pci-xlr.c
arch/powerpc/platforms/cell/axon_msi.c
arch/powerpc/platforms/powernv/pci.c
arch/powerpc/sysdev/fsl_msi.c
arch/powerpc/sysdev/mpic_pasemi_msi.c
arch/powerpc/sysdev/mpic_u3msi.c
arch/powerpc/sysdev/ppc4xx_hsta_msi.c
arch/powerpc/sysdev/ppc4xx_msi.c
arch/s390/pci/pci.c
arch/sparc/kernel/pci_msi.c
arch/tile/kernel/pci_gx.c
arch/x86/kernel/apic/io_apic.c
arch/x86/pci/xen.c
drivers/irqchip/irq-armada-370-xp.c
drivers/pci/host/pci-tegra.c
drivers/pci/host/pcie-designware.c
drivers/pci/host/pcie-rcar.c
drivers/pci/host/pcie-xilinx.c
drivers/pci/msi.c
drivers/vfio/pci/vfio_pci_intrs.c
include/linux/msi.h

index e7730cf9c15d27d7786a2ce441ad7ed6ed829c4c..3f7739cdb85be969c457adffc1e6971bb22500dc 100644 (file)
@@ -153,7 +153,7 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
        id = iop13xx_cpu_id();
        msg.data = (id << IOP13XX_MU_MIMR_CORE_SELECT) | (irq & 0x7f);
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
        irq_set_chip_and_handler(irq, &iop13xx_msi_chip, handle_simple_irq);
 
        return 0;
index 8c3730c3c63d4f51e28e81c780a6ea1ea1aecf8f..35b10dd2bb76a4513e986998554e892aaf8e8488 100644 (file)
@@ -35,7 +35,7 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata,
        data |= MSI_DATA_VECTOR(irq_to_vector(irq));
        msg.data = data;
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
        cpumask_copy(idata->affinity, cpumask_of(cpu));
 
        return 0;
@@ -71,7 +71,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
                MSI_DATA_DELIVERY_FIXED |
                MSI_DATA_VECTOR(vector);
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
        irq_set_chip_and_handler(irq, &ia64_msi_chip, handle_edge_irq);
 
        return 0;
index 446e7799928cd89316ca2384707a468ff8e973b8..433cafed5c3a62a8926a011fcd27ad4103b023f5 100644 (file)
@@ -145,7 +145,7 @@ int sn_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *entry)
        msg.data = 0x100 + irq;
 
        irq_set_msi_desc(irq, entry);
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
        irq_set_chip_and_handler(irq, &sn_msi_chip, handle_edge_irq);
 
        return 0;
@@ -205,7 +205,7 @@ static int sn_set_msi_irq_affinity(struct irq_data *data,
        msg.address_hi = (u32)(bus_addr >> 32);
        msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff);
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
        cpumask_copy(data->affinity, cpu_mask);
 
        return 0;
index 63bbe07a1ccd24afb0857e82d88ea84052a669c3..cffaaf4aae3cb294da6c62c6492e38aba21d2e26 100644 (file)
@@ -178,7 +178,7 @@ msi_irq_allocated:
        pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, control);
 
        irq_set_msi_desc(irq, desc);
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
        return 0;
 }
 
index fa374fe3746ba344f30e2b14b8ff6c3669bc5c88..81ea2b40db6143bf98e0389b602d2377d4311eb0 100644 (file)
@@ -345,7 +345,7 @@ static int xlp_setup_msi(uint64_t lnkbase, int node, int link,
        if (ret < 0)
                return ret;
 
-       write_msi_msg(xirq, &msg);
+       pci_write_msi_msg(xirq, &msg);
        return 0;
 }
 
@@ -448,7 +448,7 @@ static int xlp_setup_msix(uint64_t lnkbase, int node, int link,
                return ret;
        }
 
-       write_msi_msg(xirq, &msg);
+       pci_write_msi_msg(xirq, &msg);
        return 0;
 }
 
index 0dde80332d3a14c18594b673e6aca15f67b4a9b5..26d2dabef28152541b709b11d2257cb563fe0349 100644 (file)
@@ -260,7 +260,7 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
        if (ret < 0)
                return ret;
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
        return 0;
 }
 #endif
index 862b32702d2933d062e33ccf20df8eff7bfc9d41..26fa3432352e0545371bb0df983711a7857584a3 100644 (file)
@@ -279,7 +279,7 @@ static int axon_msi_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 
                irq_set_msi_desc(virq, entry);
                msg.data = virq;
-               write_msi_msg(virq, &msg);
+               pci_write_msi_msg(virq, &msg);
        }
 
        return 0;
index b3ca77ddf36dfbd07de81feb5015b27bd675c009..e79a38a1df9fae512ba467c572f8362bb47752af 100644 (file)
@@ -91,7 +91,7 @@ static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
                        return rc;
                }
                irq_set_msi_desc(virq, entry);
-               write_msi_msg(virq, &msg);
+               pci_write_msi_msg(virq, &msg);
        }
        return 0;
 }
index de40b48b460e83a8aaec5168c8a4a1f025d8dd38..bd5a9f7c0029c0f4c5d1e6dd7a366990d196d573 100644 (file)
@@ -242,7 +242,7 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
                irq_set_msi_desc(virq, entry);
 
                fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data);
-               write_msi_msg(virq, &msg);
+               pci_write_msi_msg(virq, &msg);
        }
        return 0;
 
index 15dccd35fa11a9d1fae5f1ca3fad180983693165..45a6f407883cfd153d9f0712ab39213eca6c8561 100644 (file)
@@ -136,7 +136,7 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
                 * register to generate MSI [512...1023]
                 */
                msg.data = hwirq-0x200;
-               write_msi_msg(virq, &msg);
+               pci_write_msi_msg(virq, &msg);
        }
 
        return 0;
index 623d7fba15b4d3c22d9bba0299bc516a9d85a6be..ac6f1f9d03ce801b11f4e1961d2c8f9d36a37a15 100644 (file)
@@ -171,7 +171,7 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
                printk("u3msi: allocated virq 0x%x (hw 0x%x) addr 0x%lx\n",
                          virq, hwirq, (unsigned long)addr);
                msg.data = hwirq;
-               write_msi_msg(virq, &msg);
+               pci_write_msi_msg(virq, &msg);
 
                hwirq++;
        }
index a6a4dbda9078f59f93ea222493a8aeced3a5e22c..908105f835d16199097e5558a97387800f47457d 100644 (file)
@@ -85,7 +85,7 @@ static int hsta_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
                        msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1);
                        return -EINVAL;
                }
-               write_msi_msg(hwirq, &msg);
+               pci_write_msi_msg(hwirq, &msg);
        }
 
        return 0;
index 22b5200636e7f90299702d64d6b63ea1a5fe228f..518eabbe0bdc6279733eeb6eb541c64cbddc6e60 100644 (file)
@@ -116,7 +116,7 @@ static int ppc4xx_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 
                irq_set_msi_desc(virq, entry);
                msg.data = int_no;
-               write_msi_msg(virq, &msg);
+               pci_write_msi_msg(virq, &msg);
        }
        return 0;
 }
index 552b9908aa77bde8326d23415b46c52407a62a87..ad1a9e2a183152b68f1b7436802ba641e6d687cc 100644 (file)
@@ -403,7 +403,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
                msg.data = hwirq;
                msg.address_lo = zdev->msi_addr & 0xffffffff;
                msg.address_hi = zdev->msi_addr >> 32;
-               write_msi_msg(irq, &msg);
+               pci_write_msi_msg(irq, &msg);
                airq_iv_set_data(zdev->aibv, hwirq, irq);
                hwirq++;
        }
index 580651af73f2bc4a39d78a9e538e66510aa315eb..73db0ed80d831da54dfb3c9c76b21b83cced63ae 100644 (file)
@@ -161,7 +161,7 @@ static int sparc64_setup_msi_irq(unsigned int *irq_p,
        msg.data = msi;
 
        irq_set_msi_desc(*irq_p, entry);
-       write_msi_msg(*irq_p, &msg);
+       pci_write_msi_msg(*irq_p, &msg);
 
        return 0;
 
index e39f9c542807c0cae9e329c4641e6c9429c263f1..376d9f1d99516a0004386b3906d94edec84b4145 100644 (file)
@@ -1590,7 +1590,7 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
        msg.address_hi = msi_addr >> 32;
        msg.address_lo = msi_addr & 0xffffffff;
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
        irq_set_chip_and_handler(irq, &tilegx_msi_chip, handle_level_irq);
        irq_set_handler_data(irq, controller);
 
index 1183d545da1e95a56233f39baf8047a38c77fe22..d775aef42b87ff2889c891663021a56b56b5891b 100644 (file)
@@ -3158,7 +3158,7 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force)
        msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
        msg.address_lo |= MSI_ADDR_DEST_ID(dest);
 
-       __write_msi_msg(data->msi_desc, &msg);
+       __pci_write_msi_msg(data->msi_desc, &msg);
 
        return IRQ_SET_MASK_OK_NOCOPY;
 }
@@ -3196,7 +3196,7 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc,
         * MSI message denotes a contiguous group of IRQs, written for 0th IRQ.
         */
        if (!irq_offset)
-               write_msi_msg(irq, &msg);
+               pci_write_msi_msg(irq, &msg);
 
        setup_remapped_irq(irq, irq_cfg(irq), chip);
 
index ff0068b8ce5e230fc291bac3fc4a74b12e73cab5..1819a91bbb9f42821a76df5a0938304414c2f7e2 100644 (file)
@@ -240,7 +240,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
                                goto error;
                        }
                        xen_msi_compose_msg(dev, pirq, &msg);
-                       __write_msi_msg(msidesc, &msg);
+                       __pci_write_msi_msg(msidesc, &msg);
                        dev_dbg(&dev->dev, "xen: msi bound to pirq=%d\n", pirq);
                } else {
                        dev_dbg(&dev->dev,
index 4e202375e027e57a030ea92bef6511f14a20fe61..8c7f077abb0926929748b0cff699d532d1b839d1 100644 (file)
@@ -156,7 +156,7 @@ static int armada_370_xp_setup_msi_irq(struct msi_controller *chip,
        msg.address_hi = 0;
        msg.data = 0xf00 | (hwirq + 16);
 
-       write_msi_msg(virq, &msg);
+       pci_write_msi_msg(virq, &msg);
        return 0;
 }
 
index 1f01faa918cc20d81d45072f4bf1dfb1336d706f..31841718bedd0d7304338d0867dc781f1361d675 100644 (file)
@@ -1299,7 +1299,7 @@ static int tegra_msi_setup_irq(struct msi_controller *chip,
        msg.address_hi = 0;
        msg.data = hwirq;
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
 
        return 0;
 }
index 5278d3e63070b118537d246b7572047233decddf..e03f4e7e1f7dfb854665d6230b3abac3700bf82f 100644 (file)
@@ -298,7 +298,7 @@ static int dw_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
        else
                msg.data = pos;
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
 
        return 0;
 }
index c2e3fcb55fd4749f5d0cb3543bd4208e495387cf..c1177cd55ce3eb6830c82e52942e0e84e84efda9 100644 (file)
@@ -640,7 +640,7 @@ static int rcar_msi_setup_irq(struct msi_controller *chip, struct pci_dev *pdev,
        msg.address_hi = rcar_pci_read_reg(pcie, PCIEMSIAUR);
        msg.data = hwirq;
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
 
        return 0;
 }
index eca292347c695931c45c10eac1bbfffe30d620c6..67683380f0f72e8044dcee3c37887e3f6c21c716 100644 (file)
@@ -375,7 +375,7 @@ static int xilinx_pcie_msi_setup_irq(struct msi_controller *chip,
        msg.address_lo = msg_addr;
        msg.data = irq;
 
-       write_msi_msg(irq, &msg);
+       pci_write_msi_msg(irq, &msg);
 
        return 0;
 }
index c77adc735f8adb8dbcde63174920ee736019c1bb..156ba8f809b727ed092b1395a87d120c6b3bc1e0 100644 (file)
@@ -130,7 +130,7 @@ static void default_restore_msi_irq(struct pci_dev *dev, int irq)
        }
 
        if (entry)
-               __write_msi_msg(entry, &entry->msg);
+               __pci_write_msi_msg(entry, &entry->msg);
 }
 
 void __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)
 }
 EXPORT_SYMBOL_GPL(get_cached_msi_msg);
 
-void __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) {
                /* Don't touch the hardware now */
@@ -337,13 +337,13 @@ void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
        entry->msg = *msg;
 }
 
-void write_msi_msg(unsigned int irq, struct msi_msg *msg)
+void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg)
 {
        struct msi_desc *entry = irq_get_msi_desc(irq);
 
-       __write_msi_msg(entry, msg);
+       __pci_write_msi_msg(entry, msg);
 }
-EXPORT_SYMBOL_GPL(write_msi_msg);
+EXPORT_SYMBOL_GPL(pci_write_msi_msg);
 
 static void free_msi_irqs(struct pci_dev *dev)
 {
index 553212f037c37304b0a07d6741b9b68d97ed2c54..e8d695b3f54e0fdbf74e567dc5ae109cb8ea5da2 100644 (file)
@@ -560,7 +560,7 @@ static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev,
                struct msi_msg msg;
 
                get_cached_msi_msg(irq, &msg);
-               write_msi_msg(irq, &msg);
+               pci_write_msi_msg(irq, &msg);
        }
 
        ret = request_irq(irq, vfio_msihandler, 0,
index f36c37b46f100660f0887ef011c292c951b7ba95..301adecbc34d66b96f0ea790dec1941cb368d14e 100644 (file)
@@ -17,9 +17,7 @@ struct msi_desc;
 void mask_msi_irq(struct irq_data *data);
 void unmask_msi_irq(struct irq_data *data);
 void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
-void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
 void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg);
-void write_msi_msg(unsigned int irq, struct msi_msg *msg);
 
 u32 __msix_mask_irq(struct msi_desc *desc, u32 flag);
 u32 __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag);
@@ -51,6 +49,18 @@ struct msi_desc {
 };
 
 void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
+void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
+void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg);
+
+/* Conversion helpers. Should be removed after merging */
+static inline void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
+{
+       __pci_write_msi_msg(entry, msg);
+}
+static inline void write_msi_msg(int irq, struct msi_msg *msg)
+{
+       pci_write_msi_msg(irq, msg);
+}
 
 /*
  * The arch hooks to setup up msi irqs. Those functions are