Received: by 10.223.185.116 with SMTP id b49csp5003454wrg; Wed, 7 Mar 2018 04:57:06 -0800 (PST) X-Google-Smtp-Source: AG47ELsJ4AllckFAccfsWNpCLo8B6xsPTcpk5DDaJLzIOHC7xBVIDDyGFI1MB/3D1zZP1C7m5m0b X-Received: by 10.101.75.199 with SMTP id p7mr18633247pgr.0.1520427426479; Wed, 07 Mar 2018 04:57:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520427426; cv=none; d=google.com; s=arc-20160816; b=xVsXYXC1y6XF71ARdgOTXbhbG39Fu+cYbL/5Mn09PsA/IWl+VRVj9JSvOFpSHDDEI7 3gNYlTMh80G6hoIV9uyL0Wpg+g8Ko2obKCUfzc8toey7TpajbujcxatwaL1V2Toq7V9C HcuUNG0dNX9XwMZgUP2z0Fd12e0IqwsSejHzbH3nb8+eHluyHlmzMu4cUIAB1VoAeoYU JDRtGl/kyBi8/S1Lcu0tHLWTMx26CFAAFQTDNTeaRvoSqssX3GIg5rdoOD5eXi+Uqlx9 LQyH2+T34ZDY2+aIBCprmUjPU7mq3HP8z13+AMzclo1PDzbEIKzcbl2DvwmFNaIalLBO DamA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=QqG8nlQQ7ZJr0LwiY8DmG2pK3CuXiU2XrdiDjqFTl38=; b=0TgsuiU3pO0mHZLh3ekcQnGD/dql5MCVpki1LKTKFZ1EFRKENKuRYfNg5L2mZY4C66 dIZnlvYY8ZIBok32GhrCaHmy5XhStGcXOiq2968ppLB9FZ6gA2HWojnfft8sOmEVXI0t sQAsVTV+KdRQ7rQ1Pnlh4EeZT7WI5mm/9FR5SgCvWeCbzdWIsriKYUQboAsKo9hXExMP Z7RHWOsxmVo6VqpzIVi0PNvbMR7eOmkVzn4n9IlnNEcOPf8Dx6kDNF1dP0xds9KvB93H 8KsfblMBIVk/o7DujhUO48g06YYmcRcCkbJ3iV8ECyHVcrS5kNmSdYs/LgyQ/s4Ck6Oo C0lg== 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 j7-v6si9267765plk.627.2018.03.07.04.56.52; Wed, 07 Mar 2018 04:57:06 -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 S1754102AbeCGMz7 (ORCPT + 99 others); Wed, 7 Mar 2018 07:55:59 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50220 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbeCGMz6 (ORCPT ); Wed, 7 Mar 2018 07:55:58 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 959F11435; Wed, 7 Mar 2018 04:55:57 -0800 (PST) Received: from [10.1.210.88] (e110467-lin.cambridge.arm.com [10.1.210.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DFCB63F487; Wed, 7 Mar 2018 04:55:55 -0800 (PST) Subject: Re: [PATCH v7 01/14] iommu/rockchip: Prohibit unbind and remove To: Jeffy Chen , linux-kernel@vger.kernel.org Cc: jcliang@chromium.org, xxm@rock-chips.com, tfiga@chromium.org, Heiko Stuebner , linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, Joerg Roedel , linux-arm-kernel@lists.infradead.org References: <20180306030252.3197-1-jeffy.chen@rock-chips.com> <20180306030252.3197-2-jeffy.chen@rock-chips.com> From: Robin Murphy Message-ID: <713e01c9-4850-dd03-841f-060c1eec1cbd@arm.com> Date: Wed, 7 Mar 2018 12:55:54 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180306030252.3197-2-jeffy.chen@rock-chips.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/03/18 03:02, Jeffy Chen wrote: > Removal of IOMMUs cannot be done reliably. > > This is similar to exynos iommu driver. Acked-by: Robin Murphy > Signed-off-by: Jeffy Chen > Reviewed-by: Tomasz Figa > --- > > Changes in v7: None > 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 "); >