PCI: designware: Remove unnecessary use of 'conf_lock' spinlock
authorAndrew Murray <amurray@embedded-bits.co.uk>
Mon, 14 Apr 2014 20:22:54 +0000 (14:22 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 16 Apr 2014 16:20:48 +0000 (10:20 -0600)
Serialization of configuration accesses is provided by 'pci_lock' in
drivers/pci/access.c thus making the driver's 'conf_lock' superfluous.

Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Richard Zhu <r65037@freescale.com>
drivers/pci/host/pci-exynos.c
drivers/pci/host/pci-imx6.c
drivers/pci/host/pcie-designware.c
drivers/pci/host/pcie-designware.h

index 3de6bfbbe8e95b4805b216662a013f03ee8a7367..32c6d567e12a06b6cf74050a24c5adb359a52a7b 100644 (file)
@@ -546,7 +546,6 @@ static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev)
        pp->root_bus_nr = -1;
        pp->ops = &exynos_pcie_host_ops;
 
-       spin_lock_init(&pp->conf_lock);
        ret = dw_pcie_host_init(pp);
        if (ret) {
                dev_err(&pdev->dev, "failed to initialize host\n");
index ee082509b0baa730b90a6c0111673214889604dd..821a01878f59499426d2f5d39fe327fd518cc045 100644 (file)
@@ -501,7 +501,6 @@ static int imx6_add_pcie_port(struct pcie_port *pp,
        pp->root_bus_nr = -1;
        pp->ops = &imx6_pcie_host_ops;
 
-       spin_lock_init(&pp->conf_lock);
        ret = dw_pcie_host_init(pp);
        if (ret) {
                dev_err(&pdev->dev, "failed to initialize host\n");
index c4e373294476a701278c93b4619610a9ed181f70..495846037ca7dae172ba92b59e74db242f43a932 100644 (file)
@@ -639,7 +639,6 @@ static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
                        int size, u32 *val)
 {
        struct pcie_port *pp = sys_to_pcie(bus->sysdata);
-       unsigned long flags;
        int ret;
 
        if (!pp) {
@@ -652,13 +651,11 @@ static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
                return PCIBIOS_DEVICE_NOT_FOUND;
        }
 
-       spin_lock_irqsave(&pp->conf_lock, flags);
        if (bus->number != pp->root_bus_nr)
                ret = dw_pcie_rd_other_conf(pp, bus, devfn,
                                                where, size, val);
        else
                ret = dw_pcie_rd_own_conf(pp, where, size, val);
-       spin_unlock_irqrestore(&pp->conf_lock, flags);
 
        return ret;
 }
@@ -667,7 +664,6 @@ static int dw_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
                        int where, int size, u32 val)
 {
        struct pcie_port *pp = sys_to_pcie(bus->sysdata);
-       unsigned long flags;
        int ret;
 
        if (!pp) {
@@ -678,13 +674,11 @@ static int dw_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
        if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0)
                return PCIBIOS_DEVICE_NOT_FOUND;
 
-       spin_lock_irqsave(&pp->conf_lock, flags);
        if (bus->number != pp->root_bus_nr)
                ret = dw_pcie_wr_other_conf(pp, bus, devfn,
                                                where, size, val);
        else
                ret = dw_pcie_wr_own_conf(pp, where, size, val);
-       spin_unlock_irqrestore(&pp->conf_lock, flags);
 
        return ret;
 }
index 3063b3594d8875c9f38b76780045e640ddc61e4a..a10747d58cd7ae350a3dc03ab0965e868524df66 100644 (file)
@@ -41,7 +41,6 @@ struct pcie_port {
        void __iomem            *va_cfg1_base;
        u64                     io_base;
        u64                     mem_base;
-       spinlock_t              conf_lock;
        struct resource         cfg;
        struct resource         io;
        struct resource         mem;
This page took 0.619878 seconds and 5 git commands to generate.