Received: by 10.223.148.5 with SMTP id 5csp5955157wrq; Wed, 17 Jan 2018 07:41:47 -0800 (PST) X-Google-Smtp-Source: ACJfBoutC/mq1+PFx3xO/jrbRbq0+V1vdrVCnFy8ogcOubNTjPrsBK6rEG2EOqdRgizIGh67ftIj X-Received: by 10.159.194.195 with SMTP id u3mr36883769plz.416.1516203707830; Wed, 17 Jan 2018 07:41:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516203707; cv=none; d=google.com; s=arc-20160816; b=fDDOKlm2hsF8YtCCROFFZMvcyza4zCFso0jXqL3/xphhBhOdBCqeVJFwn0O0aEOz4O SJvCUw/BTtw0JFn8I2CqIptRaOWcOMp/kkXw5JTW9S9cN4Ooj5jjGmmGCnDHrlhZ2IUm Dozrok8EZGa8JBwQiMvwyGu6LzNyQMGjgtJXw4M9HihqClf4qQXXRVG5rI0G3akbH6/g TjtN3ffMKZSncnJBPVKu/ryV8CB0kWZ6mgag3IvZjd37rUyGJxwxMJWLv+jYqAhdy9fn Gz3DuHBMmO54QYey+CAtgFgm847TyhkjtbVA3BxkbQAG0e59R57n1KX3Cvw6HLPB5KGV +TdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=N15CWDPBZQ2xezgg/tdVBJ6w+OS2f47EcpPPzayuLgI=; b=HfL6tWMk+Vz91OfHqyMmwCG+da0aSEg1CUXitlP2njl97n/EnYuKj+9CAVo8494SBq MMt3kCfAZaXyPm6qjYgZEMSIr/kM17mDnoKnUBoOQnZ/AWNQkM4YmBn/sfRzJc6QhaPj ghUlkviSSUZUQcAcMYrKbkzrgWjrt12lebO3OFs4soH/evnLNhe1PRuLScK3P70TYVHL bVYKVQ6AGBYR0VD+bWtDwTHu10h2girgvS89twY8tWJCFEaKyi9l7h8QtIhXJYmfkG2c 9V6B4jrVQURDpjZkOlgECWE2KIcO4+5ToR7zHUIUp2SATsbgPS3qvkSZG9bG2NN+7F2q m21g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b63si4512530pfe.50.2018.01.17.07.41.33; Wed, 17 Jan 2018 07:41:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753551AbeAQP0Q (ORCPT + 99 others); Wed, 17 Jan 2018 10:26:16 -0500 Received: from regular1.263xmail.com ([211.150.99.138]:60860 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753375AbeAQP0P (ORCPT ); Wed, 17 Jan 2018 10:26:15 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.227]) by regular1.263xmail.com (Postfix) with ESMTP id D2B7E795F; Wed, 17 Jan 2018 23:25:57 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 862C9360; Wed, 17 Jan 2018 23:25:56 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <009067adb460c1c99b7eefbbbaf5835f> X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 10935LZ0EKL; Wed, 17 Jan 2018 23:26:00 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org Cc: jcliang@chromium.org, robin.murphy@arm.com, xxm@rock-chips.com, tfiga@chromium.org, Jeffy Chen , Heiko Stuebner , linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, Joerg Roedel , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 01/12] iommu/rockchip: Prohibiat unbind and remove Date: Wed, 17 Jan 2018 23:25:31 +0800 Message-Id: <20180117152542.26429-2-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180117152542.26429-1-jeffy.chen@rock-chips.com> References: <20180117152542.26429-1-jeffy.chen@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Removal the IOMMUs cannot be done reliably. This is similar to exynos iommu driver. Signed-off-by: Jeffy Chen --- Changes in v3: Also remove remove() and module_exit() as Tomasz suggested. Changes in v2: None drivers/iommu/rockchip-iommu.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 9d991c2d8767..16cd8780c289 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1197,18 +1197,6 @@ static int rk_iommu_probe(struct platform_device *pdev) return err; } -static int rk_iommu_remove(struct platform_device *pdev) -{ - struct rk_iommu *iommu = platform_get_drvdata(pdev); - - if (iommu) { - iommu_device_sysfs_remove(&iommu->iommu); - iommu_device_unregister(&iommu->iommu); - } - - return 0; -} - static const struct of_device_id rk_iommu_dt_ids[] = { { .compatible = "rockchip,iommu" }, { /* sentinel */ } @@ -1217,10 +1205,10 @@ MODULE_DEVICE_TABLE(of, rk_iommu_dt_ids); static struct platform_driver rk_iommu_driver = { .probe = rk_iommu_probe, - .remove = rk_iommu_remove, .driver = { .name = "rk_iommu", .of_match_table = rk_iommu_dt_ids, + .suppress_bind_attrs = true, }, }; @@ -1248,14 +1236,7 @@ static int __init rk_iommu_init(void) platform_driver_unregister(&rk_iommu_domain_driver); return ret; } -static void __exit rk_iommu_exit(void) -{ - platform_driver_unregister(&rk_iommu_driver); - platform_driver_unregister(&rk_iommu_domain_driver); -} - subsys_initcall(rk_iommu_init); -module_exit(rk_iommu_exit); MODULE_DESCRIPTION("IOMMU API for Rockchip"); MODULE_AUTHOR("Simon Xue and Daniel Kurtz "); -- 2.11.0