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: 34913 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7630A23B13 for ; Tue, 5 Aug 2014 10:49:18 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id v1sf2484046yhn.0 for ; Tue, 05 Aug 2014 03:49:18 -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=/DZCapytRgFqv1PiOFDL0iKYTO4Z+zB5fDZiwc3IW0s=; b=kXzYYl7SZUsmRlpKPZVWBtWwcOdjzshzdkdY+uxMBB5Tdzte9IYkec9uT6OrMPUg1j LO7AfxsKsgykL9ob3SbyKi+NXndc89UUUZUjdCIDmWdYZWre3jOho/uRsnRjE6oQLj1a a6RgLcfmPfsjYZP9BCK+Jz+xsjwuQtkdk6Lyscr/Cz/Bj8VPBSZgeaDP9MwGmsa8PK+B 5F4Lyiy4wtZMHTHRynds/NTzMe9oAe73ohqhXg0gSG/B9z4pPmNrWkGk9qlKwxJQSJk+ J6V1PfpZLf0pCnjqaxdK3mQI62BvjOCWq7XZkHCo7AIc9U87kpcNxRnS0QYujtgZ6aRW P9Zw== X-Gm-Message-State: ALoCoQn/oiy9CQOeAE0yg0Z3HedAZ1ifagSgciEJeEYBvvGsgT+1bzbvtQW1vON70JlIkyAL/FgO X-Received: by 10.236.101.148 with SMTP id b20mr1522608yhg.46.1407235758286; Tue, 05 Aug 2014 03:49:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.54 with SMTP id 51ls199461qgw.41.gmail; Tue, 05 Aug 2014 03:49:18 -0700 (PDT) X-Received: by 10.220.49.10 with SMTP id t10mr2398051vcf.34.1407235758119; Tue, 05 Aug 2014 03:49:18 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id ts6si771031vdc.84.2014.08.05.03.49.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Aug 2014 03:49:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so1111702vcb.19 for ; Tue, 05 Aug 2014 03:49:18 -0700 (PDT) X-Received: by 10.220.166.9 with SMTP id k9mr2422149vcy.20.1407235758049; Tue, 05 Aug 2014 03:49:18 -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.221.37.5 with SMTP id tc5csp374554vcb; Tue, 5 Aug 2014 03:49:17 -0700 (PDT) X-Received: by 10.70.127.207 with SMTP id ni15mr3100024pdb.129.1407235757175; Tue, 05 Aug 2014 03:49:17 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wq6si1512064pac.94.2014.08.05.03.49.16 for ; Tue, 05 Aug 2014 03:49:17 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S1755125AbaHEKtO (ORCPT + 21 others); Tue, 5 Aug 2014 06:49:14 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:44612 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755015AbaHEKtH (ORCPT ); Tue, 5 Aug 2014 06:49:07 -0400 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>; 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 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 , Greg Kroah-Hartman , "Rafael J. Wysocki" , Inki Dae , Kukjin Kim , Sylwester Nawrocki , Tomasz Figa , Kyungmin Park 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.220.174 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 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; }