Received: by 10.223.176.46 with SMTP id f43csp571625wra; Wed, 24 Jan 2018 02:40:28 -0800 (PST) X-Google-Smtp-Source: AH8x225O9e07kLNkQdhQ8eQz/XGsbW0ZRmqOsWtabHcMwwAEo3VEJSkOcf6yRdwfFKQ/KD39Sx1B X-Received: by 2002:a17:902:b596:: with SMTP id a22-v6mr7658189pls.60.1516790428710; Wed, 24 Jan 2018 02:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516790428; cv=none; d=google.com; s=arc-20160816; b=kG1uxLHYVtf1GWtYd5GPFu8+fE6CEIn16pY95tNV/2mX+v1ZuXvTVMmtyG+j7+Md44 IsKYfqGKrz6q4i+mBpuC9V52CtLxx5dpvvO/cxtjCAQelpKg9DAWLmWx8Cle8RZTgIho +/lOBO+oIiYgzEkZ6zTAuse7rMH99wxBkokD4sdWYxKZHVoqsMW+xMsgML0qph0H7KDc p0C1tKhGRN5N8qLkavYmeNqCZaqjMDPSwr5Nx48mCcDCx0JpGDvl7pe+T4juvOGZ/WNX OmV0ionnO7WPn7/41VMkY7HM/v5uz9xkXKWxLUafFXt8mjGK/zr3mp7tlQUwFfwJ3DpE ElqQ== 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=jKFVKrJv6fFCIkwMSDDLVXnhTE/tLO4rdTb/ZZkICc8=; b=rVYfS6rn2hCxDnJkox/Wh7n5NeQun+YS9t3K6jqJDSqYDAAqYlEOje7vDMyj0YTEaE V+wkwpjcWtPASH0TbnvQDH9DJ3ce0XS3pNYX32jAP1Nywz1iMGGosvkZ8TKaPIK76uzB m21UQcQiDP55CpIGKPWTjspZ12opzv+WzHvu2orYBoe6KitnEK5Cu5YC17WSMA7ItRly bTK/8b9ttTccOyEGVXWoBkMygrZm0WiJna0e5wZNDE5px0zjoiZQsfvbVgo7SKF1O/+w cG28uEQ95VAxa6EJmaJT/xCVDPsT6UXVkiafA0qfeVBTG9WRUJvG67x9NRIpD8gvhJg1 QdgQ== 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 l1si15986561pgn.324.2018.01.24.02.40.15; Wed, 24 Jan 2018 02:40:28 -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 S933170AbeAXKi5 (ORCPT + 99 others); Wed, 24 Jan 2018 05:38:57 -0500 Received: from regular1.263xmail.com ([211.150.99.138]:54614 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933072AbeAXKfk (ORCPT ); Wed, 24 Jan 2018 05:35:40 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.224]) by regular1.263xmail.com (Postfix) with ESMTP id 851A47997; Wed, 24 Jan 2018 18:35:35 +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 C2008308; Wed, 24 Jan 2018 18:35:33 +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 20162XN5LLC; Wed, 24 Jan 2018 18:35:36 +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 v5 01/13] iommu/rockchip: Prohibit unbind and remove Date: Wed, 24 Jan 2018 18:35:04 +0800 Message-Id: <20180124103516.2571-2-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180124103516.2571-1-jeffy.chen@rock-chips.com> References: <20180124103516.2571-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 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