RE: [PATCH] PCI: designware: Remove unnecessary use of 'conf_lock' spinlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Best Regards
Richard Zhu

> -----Original Message-----
> From: linux-pci-owner@xxxxxxxxxxxxxxx [mailto:linux-pci-owner@xxxxxxxxxxxxxxx]
> On Behalf Of Jingoo Han
> Sent: Friday, February 21, 2014 9:53 AM
> To: Andrew Murray
> Cc: linux-pci@xxxxxxxxxxxxxxx; mohit.kumar@xxxxxx; Zhu Richard-R65037;
> shawn.guo@xxxxxxxxxx; Jingoo Han
> Subject: Re: [PATCH] PCI: designware: Remove unnecessary use of 'conf_lock'
> spinlock
> 
> On Friday, February 21, 2014 6:42 AM, Andrew Murray wrote:
> >
> > 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@xxxxxxxxxxxxxxxxxxx>
> 
> (+cc Richard Zhu, Shawn Guo)
> 
> Acked-by: Jingoo Han <jg1.han@xxxxxxxxxxx>
> 
> Right, thank you for sending the patch. :-)

Acked-by: Richard Zhu <r65037@xxxxxxxxxxxxx>
Thanks.
Best Regards
Richard
> 
> Best regards,
> Jingoo Han
> 
> > ---
> >  drivers/pci/host/pci-exynos.c      | 1 -
> >  drivers/pci/host/pci-imx6.c        | 1 -
> >  drivers/pci/host/pcie-designware.c | 6 ------
> > drivers/pci/host/pcie-designware.h | 1 -
> >  4 files changed, 9 deletions(-)
> >
> > diff --git a/drivers/pci/host/pci-exynos.c
> > b/drivers/pci/host/pci-exynos.c index 3de6bfb..32c6d56 100644
> > --- a/drivers/pci/host/pci-exynos.c
> > +++ b/drivers/pci/host/pci-exynos.c
> > @@ -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"); diff --git
> > a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index
> > e8663a8..77588f1 100644
> > --- a/drivers/pci/host/pci-imx6.c
> > +++ b/drivers/pci/host/pci-imx6.c
> > @@ -480,7 +480,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"); diff --git
> > a/drivers/pci/host/pcie-designware.c
> > b/drivers/pci/host/pcie-designware.c
> > index 17ce88f..b25adb8 100644
> > --- a/drivers/pci/host/pcie-designware.c
> > +++ b/drivers/pci/host/pcie-designware.c
> > @@ -640,7 +640,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) {
> > @@ -653,13 +652,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;
> >  }
> > @@ -668,7 +665,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) {
> > @@ -679,13 +675,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;
> >  }
> > diff --git a/drivers/pci/host/pcie-designware.h
> > b/drivers/pci/host/pcie-designware.h
> > index 3063b35..a10747d 100644
> > --- a/drivers/pci/host/pcie-designware.h
> > +++ b/drivers/pci/host/pcie-designware.h
> > @@ -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;
> > --
> > 1.8.3.2
> 翁{.n?‰?‰†+%Š?zwm…?留꿩??zX㎉\Š)?鍊w*jgП??šŽŠ孵j/兪z받–Š?Š?②??
> 傘?뛴?G???:+v‰?w?明
��.n��������+%������w��{.n�����{���"�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux