From patchwork Mon Jul 17 13:05:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 9844909 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 669E46037F for ; Mon, 17 Jul 2017 13:09:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58F9026E4A for ; Mon, 17 Jul 2017 13:09:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DCFD28505; Mon, 17 Jul 2017 13:09:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE89226E4A for ; Mon, 17 Jul 2017 13:09:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751314AbdGQNJQ (ORCPT ); Mon, 17 Jul 2017 09:09:16 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34914 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751309AbdGQNJO (ORCPT ); Mon, 17 Jul 2017 09:09:14 -0400 Received: by mail-pf0-f196.google.com with SMTP id q85so19571515pfq.2; Mon, 17 Jul 2017 06:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=IVumY5H7O2r+p3XVGaQr6yVcRDbDDgHaQvA2HsPNiHY=; b=JJQVxpmcrzM2cwAEDO0heH2OM5EJe8I4Ppqg56WUpgx8evRp/f3Ui1xDDDHT1a4QUZ BWCbLgktxawGaye/4dYADHmYdCntlpbB9LPjmJGQnbTwRyytNpqtrbV48crwiApU63Is Xhc/0AeEDQxZ8xfsF+7Dry7iybOUqh4onIrc3Dn80ExqUe834rKVCRayl+Ul2POwvS4Y AQs0NIE7qBxed61Jzb2VL3zpwpZFk8L+Hmxqh/U8A86FDzx/dVc2rgTRDVFcKgKcU+p9 n0YwuwcbrCS/QgNrkuTtRnSsQY5SZEIm7KJxd6HFAJDofBEaVs54dVJo6GLqyVVksqaj 0ZGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:date:message-id:in-reply-to :references:subject; bh=IVumY5H7O2r+p3XVGaQr6yVcRDbDDgHaQvA2HsPNiHY=; b=AYmYRMCzhVC2VnklnPQKPW8XuvZzC3qHVIm9X5KWwzolt5ZNTjjXWJD7VMhjTkStia Sylig6dR6uJMISmHiJBBsF9K3Qnz/KrDi1eIAFZ7W3Qz2O8nOgxGniqX+7J7j9ifL7fx yL6Kv7GCTyaBJmV6wUG12ATZsUe+5/ET6R0rkhmMRhLrNYEiNzC9yN249+RcAqU75BEs wPqH0GKWQIKTHcgceyovWHpjDBfrPynjzuCalZc/T4JpjCJLhIjA+Gaj9eGlzpELs7jK DTZ8G+Bd1TYTAuSTaManIlNM0U5V9AlVZ/UTIzQQ+J//xvHAVYN4Z7dIQWIi0m6QOWnC HgGg== X-Gm-Message-State: AIVw111y3g50d7fbSmoIq/COAEMD0yQ69FvbYJFSzMIvzns9q1eMnmT6 qOJutXRXO1KodQ== X-Received: by 10.99.95.133 with SMTP id t127mr2675180pgb.142.1500296954403; Mon, 17 Jul 2017 06:09:14 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id j27sm30150499pgn.63.2017.07.17.06.09.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 06:09:12 -0700 (PDT) From: Magnus Damm To: joro@8bytes.org Cc: laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be, robin.murphy@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, iommu@lists.linux-foundation.org, horms+renesas@verge.net.au, Magnus Damm , sricharan@codeaurora.org, m.szyprowski@samsung.com Date: Mon, 17 Jul 2017 22:05:51 +0900 Message-Id: <150029675199.22030.3050963235267091212.sendpatchset@little-apple> In-Reply-To: <150029669967.22030.8059216113725566341.sendpatchset@little-apple> References: <150029669967.22030.8059216113725566341.sendpatchset@little-apple> Subject: [PATCH v2 05/05] iommu/ipmmu-vmsa: Clean up device tracking Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Robin Murphy Get rid of now unused device tracking code. Future code should instead be able to use driver_for_each_device() for this purpose. This is a simplified version of the following patch from Robin [PATCH] iommu/ipmmu-vmsa: Clean up group allocation Signed-off-by: Robin Murphy Signed-off-by: Magnus Damm --- Change since V1: - New patch drivers/iommu/ipmmu-vmsa.c | 12 ------------ 1 file changed, 12 deletions(-) --- 0008/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2017-07-17 21:35:26.690607110 +0900 @@ -37,7 +37,6 @@ struct ipmmu_vmsa_device { struct device *dev; void __iomem *base; struct iommu_device iommu; - struct list_head list; unsigned int num_utlbs; spinlock_t lock; /* Protects ctx and domains[] */ @@ -64,9 +63,6 @@ struct ipmmu_vmsa_iommu_priv { struct list_head list; }; -static DEFINE_SPINLOCK(ipmmu_devices_lock); -static LIST_HEAD(ipmmu_devices); - static struct ipmmu_vmsa_domain *to_vmsa_domain(struct iommu_domain *dom) { return container_of(dom, struct ipmmu_vmsa_domain, io_domain); @@ -970,10 +966,6 @@ static int ipmmu_probe(struct platform_d * ipmmu_init() after the probe function returns. */ - spin_lock(&ipmmu_devices_lock); - list_add(&mmu->list, &ipmmu_devices); - spin_unlock(&ipmmu_devices_lock); - platform_set_drvdata(pdev, mmu); return 0; @@ -983,10 +975,6 @@ static int ipmmu_remove(struct platform_ { struct ipmmu_vmsa_device *mmu = platform_get_drvdata(pdev); - spin_lock(&ipmmu_devices_lock); - list_del(&mmu->list); - spin_unlock(&ipmmu_devices_lock); - iommu_device_unregister(&mmu->iommu); #if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)