linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
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 <mperttunen@nvidia.com>
Subject: Re: [PATCH v5 5/9] iommu/arm-smmu: Attach to host1x context device bus
Date: Mon, 16 May 2022 11:07:21 +0100	[thread overview]
Message-ID: <20220516100721.GA1927@willie-the-truck> (raw)
In-Reply-To: <20220516085258.1227691-6-cyndis@kapsi.fi>

On Mon, May 16, 2022 at 11:52:54AM +0300, cyndis@kapsi.fi wrote:
> From: Mikko Perttunen <mperttunen@nvidia.com>
> 
> Set itself as the IOMMU for the host1x context device bus, containing
> "dummy" devices used for Host1x context isolation.
> 
> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
> ---
>  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 <linux/amba/bus.h>
>  #include <linux/fsl/mc.h>
> +#include <linux/host1x_context_bus.h>
>  
>  #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
> 

  reply	other threads:[~2022-05-16 10:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  8:52 [PATCH v5 0/9] Host1x context isolation support cyndis
2022-05-16  8:52 ` [PATCH v5 1/9] dt-bindings: host1x: Add iommu-map property cyndis
2022-05-16 16:27   ` Rob Herring
2022-05-16  8:52 ` [PATCH v5 2/9] gpu: host1x: Add context bus cyndis
2022-05-16  8:52 ` [PATCH v5 3/9] gpu: host1x: Add context device management code cyndis
2022-05-16  8:52 ` [PATCH v5 4/9] gpu: host1x: Program context stream ID on submission cyndis
2022-05-16  8:52 ` [PATCH v5 5/9] iommu/arm-smmu: Attach to host1x context device bus cyndis
2022-05-16 10:07   ` Will Deacon [this message]
2022-05-16 10:13     ` Mikko Perttunen
2022-05-16 10:44       ` Robin Murphy
2022-05-16 11:20         ` Mikko Perttunen
2022-05-16 14:07           ` Thierry Reding
2022-05-16  8:52 ` [PATCH v5 6/9] arm64: tegra: Add Host1x context stream IDs on Tegra186+ cyndis
2022-05-16  8:52 ` [PATCH v5 7/9] drm/tegra: falcon: Set DMACTX field on DMA transactions cyndis
2022-05-16  8:52 ` [PATCH v5 8/9] drm/tegra: Support context isolation cyndis
2022-05-16  8:52 ` [PATCH v5 9/9] drm/tegra: Implement stream ID related callbacks on engines cyndis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220516100721.GA1927@willie-the-truck \
    --to=will@kernel.org \
    --cc=cyndis@kapsi.fi \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).