Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3216687iob; Mon, 16 May 2022 16:16:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyayOUU+izPKwkKNkS4buV9Ju2Jt8bXl+sD9qoWL87KHhc9JPoQDaV/nWbJQ6g24k4TJ7CS X-Received: by 2002:a17:907:7781:b0:6fe:4398:47b3 with SMTP id ky1-20020a170907778100b006fe439847b3mr5582101ejc.513.1652742973490; Mon, 16 May 2022 16:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652742973; cv=none; d=google.com; s=arc-20160816; b=ThOHrBJr1Ts4Cg3sudn3zfpcYrSAM81Hj8kbNY5Z1qqyfi1KooOj0EYqSF01b53hfm 2tAH/EHQowPzgPY1C0Xfy3vqMktBvKHH7FPZ+zVjruQGjCPKwUzw9b9Xmmo8HNR9HSMS 5r0p4SFvuNtgNkPoMNyV9lNCE7sUou6DA23VU9r7yBV2jUfm49eEIZeC7MdzQSGMJGEb GGikllmHrOo+Nz3fY9NF+S4h9xL8uspwT63o53kXXHV/2cmYxaMs/NiJj4ff/+bMC6Rr hiLscDX5pW5FUldDiV6vKWMs4Lj6wcC3ZdypgsxhuoGhoo99fovB4XVAizFf/6RTMHaR Zqdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Ei/RxsuDlBAOzdqu4B7HRo5HltyhREHCfv+lfkaTh8o=; b=erZSm6yci94RSwa77p9Y9UtjtTl0ZoqlOhkTHgEcpKLY2eAC3KSdge2/vu47IInkyZ VnNAJUAGiG/QZyyfq7ap3WuKVjKbgDLH8nhdSkRTi9gVgx77nFKzVi48RNK5ttN62Qat PyJuK0q3wJ4JvsGrRkp1BOtqXt95CnODZRb5Z+slb2sS3+KONGO3OkEtV1+2vVBNL8QW 76euyTH7VJzBOqlEQoYzct+D33L6VaV7sjJfjBp0oRrDDkllucLov4y9x3NihZb4/e0E uZjtL66G4l1Ln2y85AWTO4/SLlpUigKMUqsAWxxkARISyLlaW4l9QsgFqkOGl3xeAPqb UWWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eE4yaugp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb33-20020a170907162100b006e86d1b6cbdsi858950ejc.920.2022.05.16.16.15.47; Mon, 16 May 2022 16:16:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eE4yaugp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233188AbiEPKIn (ORCPT + 99 others); Mon, 16 May 2022 06:08:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242337AbiEPKH5 (ORCPT ); Mon, 16 May 2022 06:07:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C865DB7F5; Mon, 16 May 2022 03:07:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 89EE5B81059; Mon, 16 May 2022 10:07:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99A17C385AA; Mon, 16 May 2022 10:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652695648; bh=mJA6rH2uOwpy6kEmoE1DbK00kFgB/tAwaaqw91pYlkA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eE4yaugpdDHU0zxrfSNyKk/ili8tz80jdULz7A/ZOJ9UI0NGfn7Uwt5KhEo/K/oDy xg5dGH/ys6lWSfczp9YDF8FhYD5gUaluWSDAuem1uyzEHQ6Dn3smDXQlC7Jgu7Ex9+ 7cm3P3psGx34ta0T4ZlLQQzUncEVj7p8JmGOhwsM1yH668wjXxI4V/WvJUpeA/WceH VLYp26GHftdCVu7epf9xBTf/VMqtVkMwexcS0cGDqCCsKg/y514NowmtBdr2L5+5mG 8lvqDLI4+bjaXObb1A2eR9fDtMATQrMAZAfxpQB6ELCSRpRpm0d/dPtq6bSUl8pErq nkhwFrw4D/TJw== Date: Mon, 16 May 2022 11:07:21 +0100 From: Will Deacon To: cyndis@kapsi.fi Cc: thierry.reding@gmail.com, jonathanh@nvidia.com, joro@8bytes.org, robin.murphy@arm.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com, linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mikko Perttunen Subject: Re: [PATCH v5 5/9] iommu/arm-smmu: Attach to host1x context device bus Message-ID: <20220516100721.GA1927@willie-the-truck> References: <20220516085258.1227691-1-cyndis@kapsi.fi> <20220516085258.1227691-6-cyndis@kapsi.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220516085258.1227691-6-cyndis@kapsi.fi> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 16, 2022 at 11:52:54AM +0300, cyndis@kapsi.fi wrote: > From: Mikko Perttunen > > Set itself as the IOMMU for the host1x context device bus, containing > "dummy" devices used for Host1x context isolation. > > Signed-off-by: Mikko Perttunen > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c > index 568cce590ccc..9ff54eaecf81 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c > @@ -39,6 +39,7 @@ > > #include > #include > +#include > > #include "arm-smmu.h" > > @@ -2053,8 +2054,20 @@ static int arm_smmu_bus_init(struct iommu_ops *ops) > goto err_reset_pci_ops; > } > #endif > +#ifdef CONFIG_TEGRA_HOST1X_CONTEXT_BUS > + if (!iommu_present(&host1x_context_device_bus_type)) { > + err = bus_set_iommu(&host1x_context_device_bus_type, ops); > + if (err) > + goto err_reset_fsl_mc_ops; > + } > +#endif > + > return 0; > > +err_reset_fsl_mc_ops: __maybe_unused; > +#ifdef CONFIG_FSL_MC_BUS > + bus_set_iommu(&fsl_mc_bus_type, NULL); > +#endif bus_set_iommu() is going away: https://lore.kernel.org/r/cover.1650890638.git.robin.murphy@arm.com Will >