Received: by 10.223.185.116 with SMTP id b49csp7248607wrg; Thu, 1 Mar 2018 02:20:42 -0800 (PST) X-Google-Smtp-Source: AG47ELshQnEiWyMFdVAnjuJxuNLOsAGBtkhlsOtQfKndbsKFxwP3l2hXcZjUn4+xO9XkuEs1+asj X-Received: by 2002:a17:902:684:: with SMTP id 4-v6mr1439344plh.262.1519899642234; Thu, 01 Mar 2018 02:20:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519899642; cv=none; d=google.com; s=arc-20160816; b=aq7MeWwSZOcYke76xhlagOVS7gRNtePjb1W/O8iyeOmqB3EjayUSxdesyW7ch5qaPw ba5m+tDoqGH9CZDnD+/QJls5i9ywVMQRsvfIMKvnwqoLEk8oiIV04ycK0Ud17njwSu4d dgCsR93tP5KDU2U3vBN5qgO7Xwxh1NlO9S1L3rWTIQ4zMDyAV+bHkX5Sr04Cv/sP0/Jf q9LQaRnq8nxmIU0EfmjFySkOYE2Q301oztwNYF5ATRatUsEfPCL9/jiaBvNtsGs1S+6i rn5p85TTPLq0AJaIOob9sLJAACEvIPtAt9dP2tUPQWOqfyuX+vWrSh0vjKASQ6LXBV6h st0Q== 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=cAhHkoEKNxhyp5EVu+Lk8qM9tblebm9lBOp9VfYSdg4=; b=0xj2kSHcmNKgVLf4t/PstnYteBy0GH3ytLhGSkBVJCa1YtUCO4ppNbxC4ZTtB6bc8U mhVFgC/BJ8F8yVDdvemcj8Wu9jl0aZg2N7sf8ibMu3sbXOLzYn4hGS80MwuTtA3cYCaC wIewrLvs/pWDZxnXQCtAzFdGS3jVk+6bjep2FS4bDFMZiXHfuUZ7hcotmVtxWxOeAADl rkVOahU4JIWQSWxlhebQ3ayJQQWw9k6VCfaPQtHjien0AW/ABqZcMpM0EOb307u6tm+S R1cxBohUFujPLO3GjVv1Z0kLve2wfJK0INrUH+cyJR6QElo+MXc5kgvD2Kn/0VVZd5jp ZIDA== 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 o11si2248957pgp.624.2018.03.01.02.20.27; Thu, 01 Mar 2018 02:20:42 -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 S965971AbeCAKTQ (ORCPT + 99 others); Thu, 1 Mar 2018 05:19:16 -0500 Received: from regular1.263xmail.com ([211.150.99.133]:39337 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935840AbeCAKTL (ORCPT ); Thu, 1 Mar 2018 05:19:11 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.174]) by regular1.263xmail.com (Postfix) with ESMTP id 2F9FB9021; Thu, 1 Mar 2018 18:19:06 +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 EFDD6323; Thu, 1 Mar 2018 18:19:02 +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: 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 1349166Q2J5; Thu, 01 Mar 2018 18:19:07 +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: [RESEND PATCH v6 01/14] iommu/rockchip: Prohibit unbind and remove Date: Thu, 1 Mar 2018 18:18:24 +0800 Message-Id: <20180301101837.27969-2-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180301101837.27969-1-jeffy.chen@rock-chips.com> References: <20180301101837.27969-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 of IOMMUs cannot be done reliably. This is similar to exynos iommu driver. Signed-off-by: Jeffy Chen Reviewed-by: Tomasz Figa --- Changes in v6: None Changes in v5: None Changes in v4: Rewrite commit message. 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