From patchwork Tue Sep 16 11:54:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 37454 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B9670206A5 for ; Tue, 16 Sep 2014 11:55:29 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id mc6sf3135473lab.6 for ; Tue, 16 Sep 2014 04:55:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=q0SQjmZlkGOECMYNNjJyFQm1mrtWIKgLYmf/TDrL9jA=; b=VfJgJvmE5rdtMAo67NQCPhQ0hhytFFFhzYRuCS9Du/h//HnB+HLZz8y+vUlVAqpu74 G9MClG0Ii3ApfwezXpKJU1bfT4Z7LvsajlIBHEt59fGdGHJXQ8aNHHUlAozqDsFxG2Tg T+h3gFeeKqmLIdKF76+HzEpVb5HVghK2H/K8Y0Wc8GWNKKuvq6ezDpUke+p0ojLnDr5w Vnn/r0pN0Rn6i9EU7mK6nVNDlbUNBwzLcZKH7dFyUNtfOz+i8MuPiWCPe+k4Kp6ovyN7 7fhrge/pUnuXaZJ91aBEsBUsIfEHICWSAbGNoEb1bbETf6VaLUSRtCfNVERV/vL/C/cV hmcw== X-Gm-Message-State: ALoCoQlrh90K4CKGwvri3sC8xpyPkJr9b0/M1xgTfu1DFua3EUy5b+/iODxvIc1svqeJTM6Mw/2d X-Received: by 10.180.73.79 with SMTP id j15mr6578021wiv.4.1410868525935; Tue, 16 Sep 2014 04:55:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.104 with SMTP id lf8ls324662lac.87.gmail; Tue, 16 Sep 2014 04:55:25 -0700 (PDT) X-Received: by 10.112.13.132 with SMTP id h4mr6722630lbc.45.1410868525812; Tue, 16 Sep 2014 04:55:25 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) by mx.google.com with ESMTPS id cy2si23873291lac.26.2014.09.16.04.55.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Sep 2014 04:55:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id b17so6703239lan.18 for ; Tue, 16 Sep 2014 04:55:25 -0700 (PDT) X-Received: by 10.152.246.6 with SMTP id xs6mr36254117lac.56.1410868524003; Tue, 16 Sep 2014 04:55:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp374308lbb; Tue, 16 Sep 2014 04:55:23 -0700 (PDT) X-Received: by 10.68.221.102 with SMTP id qd6mr22731078pbc.123.1410868521017; Tue, 16 Sep 2014 04:55:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zp8si29178866pac.130.2014.09.16.04.55.20 for ; Tue, 16 Sep 2014 04:55:20 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754319AbaIPLzO (ORCPT + 6 others); Tue, 16 Sep 2014 07:55:14 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:62696 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754329AbaIPLzC (ORCPT ); Tue, 16 Sep 2014 07:55:02 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NBZ0099BT8BIBB0@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Tue, 16 Sep 2014 12:57:47 +0100 (BST) X-AuditID: cbfec7f5-b7f776d000003e54-ec-541825131764 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id FA.8C.15956.31528145; Tue, 16 Sep 2014 12:54:59 +0100 (BST) 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 <0NBZ00CMIT3CL960@eusync2.samsung.com>; Tue, 16 Sep 2014 12:54:59 +0100 (BST) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , linaro-mm-sig@lists.linaro.org, Arnd Bergmann , Shaik Ameer Basha , Cho KyongHo , Joerg Roedel , Thierry Reding , Olof Johansson , Laurent Pinchart , Rob Herring , Will Deacon , David Wodhouse , Inki Dae , Kukjin Kim , Tomasz Figa , Kyungmin Park Subject: [PATCH v2 08/18] iommu: exynos: remove useless spinlock Date: Tue, 16 Sep 2014 13:54:35 +0200 Message-id: <1410868485-4143-9-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1410868485-4143-1-git-send-email-m.szyprowski@samsung.com> References: <1410868485-4143-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsVy+t/xK7rCqhIhBh+/ilv8nXSM3WLiysnM FpPuT2CxWLDf2qJz9gZ2i94FV9kszja9YbfonLiE3eLLlYdMFpseX2O1mHF+H5PF2iN32S1O Xf/MZvGv9yCjxf89O9gtjjzczW6xatcfRovbv/ksXn48weIg7PHk4DwmjzXz1jB6/P41idFj 56y77B6zO2ayemxeoeWxaVUnm8fmJfUet/89ZvaYfGM5o8eVE02sHr3N79g8+rasYvT4vEku gC+KyyYlNSezLLVI3y6BK+PvhBvsBWd5KxZOsm1g7OTuYuTkkBAwkTi0fzUjhC0mceHeerYu Ri4OIYGljBL7989kgnD6mCS+3f7IDFLFJmAo0fW2iw3EFhHIl3ix9y8LiM0s8IZF4t4mQxBb WMBB4tmX3UA1HBwsAqoS+76kgIR5Bdwlnk2dyA6xTE7i/8sVTCA2p4CHxOS2J2DjhYBqPn47 xTSBkXcBI8MqRtHU0uSC4qT0XCO94sTc4tK8dL3k/NxNjJDo+LqDcekxq0OMAhyMSjy8Gf/E Q4RYE8uKK3MPMUpwMCuJ8GooSoQI8aYkVlalFuXHF5XmpBYfYmTi4JRqYMz6Mzv47p7is4fc Nomeab6rf189Lu4J+4Obbt2BbVwumtGLt6/33VC18ZD90fa8bfJ229JCA3Y1haixbhQ0TV/H 1nYvesn1rqS5c65ydGona6r9DxGZqnsgY42RkeaDxX0bUp8xpxn1G8vdT76oY7e5UuL62viP Jl/nMXDdee7HYPrY+cHpm0osxRmJhlrMRcWJANS71FtsAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 91feeca56abc..ae2703ed91d8 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; }