From patchwork Fri Jan 23 15:51:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 5695201 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 535F8C058D for ; Fri, 23 Jan 2015 15:57:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F79F2028D for ; Fri, 23 Jan 2015 15:57:03 +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 A5B42200E5 for ; Fri, 23 Jan 2015 15:57:02 +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 1YEgZB-0006JP-CQ; Fri, 23 Jan 2015 15:54:37 +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 1YEgX4-000532-2b for linux-arm-kernel@lists.infradead.org; Fri, 23 Jan 2015 15:52:31 +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 <0NIN00GRG09N9S10@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 23 Jan 2015 15:56:11 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-ec-54c26d9221b2 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id C5.CB.07834.29D62C45; Fri, 23 Jan 2015 15:49:38 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NIN00D0K02EEX60@eusync2.samsung.com>; Fri, 23 Jan 2015 15:52:03 +0000 (GMT) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 08/18] iommu: exynos: remove useless spinlock Date: Fri, 23 Jan 2015 16:51:18 +0100 Message-id: <1422028288-891-9-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1422028288-891-1-git-send-email-m.szyprowski@samsung.com> References: <1422028288-891-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGLMWRmVeSWpSXmKPExsVy+t/xK7qTcg+FGLRcV7f4O+kYu8XElZOZ LSbdn8BisWC/tUXn7A3sFi/uXWSx6H/8mtnibNMbdovOiUvYLb5cechksenxNVaLGef3MVms PXKX3eLU9c9sFv96DzJa/N+zg93iyMPd7BYzJr9ks1i16w+jxe3ffBYvP55gcRD1eHJwHpPH mnlrGD1+/5rE6LFz1l12j9kdM1k9Nq/Q8ti0qpPNY/OSeo/b/x4ze0y+sZzR48qJJlaP3uZ3 bB59W1YxenzeJBfAF8Vlk5Kak1mWWqRvl8CVMff4AvaCw7wVJxcsZGlg/M/VxcjJISFgInFv 3102CFtM4sK99UA2F4eQwFJGiXW77kI5fUwS8ybsYQSpYhMwlOh62wXWISKQL/Fi718WkCJm gb2sEhsWnGYCSQgLOEhs3fcErIhFQFWiZ903sDivgJvE5SU7mSDWyUn8f7kCzOYUcJf40TqT BcQWAqpZv7iHeQIj7wJGhlWMoqmlyQXFSem5hnrFibnFpXnpesn5uZsYIXHzZQfj4mNWhxgF OBiVeHh3PD0YIsSaWFZcmXuIUYKDWUmENyPlUIgQb0piZVVqUX58UWlOavEhRiYOTqkGxkRb pvl9yjK6L/8lJN09aC1v2mhxT2NaV12aoP3cH4dviQrevV+++ta17b1rCgtMLsowqrtN33xa qFBF8NmRKJ193/1ezlr/fWPR5Isd61L+3b1h/WtDxo0OUSdBC/n4eoOoncsXMio8nL7gU63w hH9zfvOVH/3Cfn6Lkes+lxqpyxfYla9MCVJiKc5INNRiLipOBAA/Y+myeQIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150123_075226_314734_EC0B1CC6 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.0 (-----) Cc: Rob Herring , Thierry Reding , Shaik Ameer Basha , Joonyoung Shim , Arnd Bergmann , Inki Dae , Seung-Woo Kim , Joerg Roedel , Will Deacon , Tomasz Figa , linaro-mm-sig@lists.linaro.org, Kyungmin Park , Kukjin Kim , Laurent Pinchart , Olof Johansson , Cho KyongHo , David Wodhouse , 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 3c82411..aa8c4b0 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -189,9 +189,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 { @@ -477,16 +474,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; } @@ -499,16 +492,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; }