From patchwork Thu Feb 20 21:32:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Murray X-Patchwork-Id: 3690011 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AE55CBF13A for ; Thu, 20 Feb 2014 21:32:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D951220114 for ; Thu, 20 Feb 2014 21:32:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C23B20107 for ; Thu, 20 Feb 2014 21:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751640AbaBTVcg (ORCPT ); Thu, 20 Feb 2014 16:32:36 -0500 Received: from mail-wg0-f50.google.com ([74.125.82.50]:50678 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbaBTVcf (ORCPT ); Thu, 20 Feb 2014 16:32:35 -0500 Received: by mail-wg0-f50.google.com with SMTP id z12so1887296wgg.17 for ; Thu, 20 Feb 2014 13:32:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LazUM1C6DamHKGtDMdfgAMnUEJY4Tak5tqoOUI50QOM=; b=byX7/lstvWl2NEWmYV5hAK5M/EVKKSEYYKI4+wyqBLOc1cGLuH9YYhWVjX0b1EKUnA XfBGpTc3lUL2DAxag5dYA68IhhGV35cUnGS2jDIiHOWUzez/VuDgwRRZGqmYQnRFdIEa KT96msj41SwpidJ2xb7X7HYhAHlXlcI0QpZbPj0H9soijjH8FQj2j2VTyF4USheQfrmW X4qW5NY4pGf4KKznhfE2kuRm3TIlnjD1ZaBRuSSGhzMe4sM6WawAs7MPsW3vavLxW+AU df+CBWqkIxiM6qftbM1tINNK+0ihJC15Q+2cZlY4OV2yd9gBd6hZNJ2aCcJCFfLCEldt 9VjQ== X-Gm-Message-State: ALoCoQkG5SynKNEcgN5cq9XjiYBuebhFdu75AjyDknYSE7rDQogAUtOkxYbd9zZGJaYVHVSGp5wH X-Received: by 10.180.9.51 with SMTP id w19mr307371wia.27.1392931954486; Thu, 20 Feb 2014 13:32:34 -0800 (PST) Received: from localhost.localdomain (host-78-145-137-174.as13285.net. [78.145.137.174]) by mx.google.com with ESMTPSA id ee5sm1832123wib.8.2014.02.20.13.32.32 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 13:32:33 -0800 (PST) From: Andrew Murray To: linux-pci@vger.kernel.org Cc: thomas.petazzoni@free-electrons.com, jason@lakedaemon.net, Andrew Murray Subject: [PATCH] PCI: mvebu: Remove unnecessary use of 'conf_lock' spinlock Date: Thu, 20 Feb 2014 21:32:15 +0000 Message-Id: <1392931935-21313-1-git-send-email-amurray@embedded-bits.co.uk> X-Mailer: git-send-email 1.8.3.2 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Jason Cooper --- drivers/pci/host/pci-mvebu.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 13478ec..1d61182 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -119,7 +119,6 @@ struct mvebu_pcie { struct mvebu_pcie_port { char *name; void __iomem *base; - spinlock_t conf_lock; u32 port; u32 lane; int devfn; @@ -590,7 +589,6 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn, { struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata); struct mvebu_pcie_port *port; - unsigned long flags; int ret; port = mvebu_pcie_find_port(pcie, bus, devfn); @@ -616,10 +614,8 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn, return PCIBIOS_DEVICE_NOT_FOUND; /* Access the real PCIe interface */ - spin_lock_irqsave(&port->conf_lock, flags); ret = mvebu_pcie_hw_wr_conf(port, bus, devfn, where, size, val); - spin_unlock_irqrestore(&port->conf_lock, flags); return ret; } @@ -630,7 +626,6 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, { struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata); struct mvebu_pcie_port *port; - unsigned long flags; int ret; port = mvebu_pcie_find_port(pcie, bus, devfn); @@ -662,10 +657,8 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, } /* Access the real PCIe interface */ - spin_lock_irqsave(&port->conf_lock, flags); ret = mvebu_pcie_hw_rd_conf(port, bus, devfn, where, size, val); - spin_unlock_irqrestore(&port->conf_lock, flags); return ret; } @@ -985,7 +978,6 @@ static int mvebu_pcie_probe(struct platform_device *pdev) mvebu_pcie_set_local_dev_nr(port, 1); port->dn = child; - spin_lock_init(&port->conf_lock); mvebu_sw_pci_bridge_init(port); i++; }