From patchwork Tue Aug 5 10:47:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 4677711 Return-Path: X-Original-To: patchwork-linux-arm@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 C3260C0338 for ; Tue, 5 Aug 2014 10:54:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D2AC2017A for ; Tue, 5 Aug 2014 10:54:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9321320166 for ; Tue, 5 Aug 2014 10:54:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XEcLD-0002mf-Oi; Tue, 05 Aug 2014 10:51:39 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XEcIy-0007aY-Dp for linux-arm-kernel@lists.infradead.org; Tue, 05 Aug 2014 10:49:21 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9T00DKMY1N7Y00@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 05 Aug 2014 11:49:00 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-d7-53e0b6a1ec77 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 6C.1C.25543.1A6B0E35; Tue, 05 Aug 2014 11:49:05 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N9T0057MY17SE80@eusync3.samsung.com>; Tue, 05 Aug 2014 11:49:05 +0100 (BST) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/29] iommu: exynos: remove useless spinlock Date: Tue, 05 Aug 2014 12:47:47 +0200 Message-id: <1407235677-26324-20-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1407235677-26324-1-git-send-email-m.szyprowski@samsung.com> References: <1407235677-26324-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsVy+t/xq7oLtz0INtg7VcHi76Rj7BbNi9ez WUy6P4HFYsF+a4vO2RvYLXoXXGWzONv0ht2ic+ISdosvVx4yWWx6fI3V4vKuOWwWM87vY7JY e+Quu8Wp65/ZLP71HmS0OHP6EqvF/z072C0Ov2lntTjycDe7xapdfxgtbv/mcxD1eHJwHpPH 71+TGD12zrrL7jG7Yyarx6ZVnWwe++euYffYvKTe4/a/x8wek28sZ/S4cqKJ1aO3+R2bx5ar 7SwefVtWMXp83iQXwBfFZZOSmpNZllqkb5fAlbH/80PGgsO8FV+u3GRpYPzP1cXIySEhYCJx 6ekGRghbTOLCvfVsXYxcHEICSxklFjx6CeX0MUksnniVFaSKTcBQouttF1hCRKCXUaK/6QcT iMMssI5VYn/vdRaQKmEBW4nfl3+DzWURUJX4uRxkBwcHr4CnxMbdghDr5CT+v1zBBGJzAoUP 3zwAtkBIwEPi54Y17BMYeRcwMqxiFE0tTS4oTkrPNdQrTswtLs1L10vOz93ECImcLzsYFx+z OsQowMGoxMNrcPpusBBrYllxZe4hRgkOZiURXok1D4KFeFMSK6tSi/Lji0pzUosPMTJxcEo1 MHoceviVreiNcSlfcGhXrcqT7zfdeNfOT9n9v8ftsPqvO3eSAh43lQh5s064XOHu6Cr3rDST 4dX/mtLa91LM/JkPnKMOm+sKt9ibz/5uOlGqSzCsyXnF5GdH5px3ehK0fXPxsXcx53LkZ2ft mt94mqumjonr853Nhp36rJE2lje/x2ww1JWbrMRSnJFoqMVcVJwIAPlFa2R6AgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140805_034920_626499_E771CAD6 X-CRM114-Status: GOOD ( 10.21 ) X-Spam-Score: -5.7 (-----) Cc: Rob Herring , Thierry Reding , Shaik Ameer Basha , Arnd Bergmann , Inki Dae , Greg Kroah-Hartman , Joerg Roedel , "Rafael J. Wysocki" , Tomasz Figa , linaro-mm-sig@lists.linaro.org, Kyungmin Park , Kukjin Kim , Laurent Pinchart , Sylwester Nawrocki , Olof Johansson , Cho KyongHo , Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,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 This patch removes useless spinlocks and other unused members from struct exynos_iommu_owner. There is no point is protecting this structure by spinlock because content of this structure doesn't change and other structures have their own spinlocks. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index ec3c882..ed8c518 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -190,9 +190,6 @@ struct exynos_iommu_owner { struct list_head client; /* entry of exynos_iommu_domain.clients */ struct device *dev; struct device *sysmmu; - struct iommu_domain *domain; - void *vmm_data; /* IO virtual memory manager's data */ - spinlock_t lock; /* Lock to preserve consistency of System MMU */ }; struct exynos_iommu_domain { @@ -478,16 +475,12 @@ static int __exynos_sysmmu_enable(struct device *dev, phys_addr_t pgtable, BUG_ON(!has_sysmmu(dev)); - spin_lock_irqsave(&owner->lock, flags); - data = dev_get_drvdata(owner->sysmmu); ret = __sysmmu_enable(data, pgtable, domain); if (ret >= 0) data->master = dev; - spin_unlock_irqrestore(&owner->lock, flags); - return ret; } @@ -500,16 +493,12 @@ static bool exynos_sysmmu_disable(struct device *dev) BUG_ON(!has_sysmmu(dev)); - spin_lock_irqsave(&owner->lock, flags); - data = dev_get_drvdata(owner->sysmmu); disabled = __sysmmu_disable(data); if (disabled) data->master = NULL; - spin_unlock_irqrestore(&owner->lock, flags); - return disabled; }