devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hector Martin <marcan@marcan.st>
To: Sven Peter <sven@svenpeter.dev>, Joerg Roedel <joro@8bytes.org>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	linux-arm-kernel@lists.infradead.org, asahi@lists.linux.dev,
	iommu@lists.linux.dev, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] iommu: dart: Add flag to override bypass support
Date: Sat, 28 Jan 2023 20:44:50 +0900	[thread overview]
Message-ID: <b4428d3b-bcad-cea0-7364-753b050faa78@marcan.st> (raw)
In-Reply-To: <20230128111114.4049-3-sven@svenpeter.dev>

On 28/01/2023 20.11, Sven Peter wrote:
> The USB4 PCIe DARTs claim to support bypass but we never want to allow
> that on externally facing ports.
> 
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
>  drivers/iommu/apple-dart.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
> index 42666617803d..7d8b2b90cdb6 100644
> --- a/drivers/iommu/apple-dart.c
> +++ b/drivers/iommu/apple-dart.c
> @@ -182,6 +182,8 @@ struct apple_dart_hw {
>  	u64 ttbr_addr_field_shift;
>  	u64 ttbr_shift;
>  	int ttbr_count;
> +
> +	bool disable_bypass;
>  };
>  
>  /*
> @@ -1075,6 +1077,9 @@ static int apple_dart_probe(struct platform_device *pdev)
>  	dart->pgsize = 1 << FIELD_GET(DART_PARAMS1_PAGE_SHIFT, dart_params[0]);
>  	dart->supports_bypass = dart_params[1] & DART_PARAMS2_BYPASS_SUPPORT;
>  
> +	if (dart->hw->disable_bypass)
> +		dart->supports_bypass = 0;
> +
>  	switch (dart->hw->type) {
>  	case DART_T8020:
>  	case DART_T6000:


Acked-by: Hector Martin <marcan@marcan.st>

- Hector

  reply	other threads:[~2023-01-28 11:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28 11:11 [PATCH 0/4] Apple M1 USB4/Thunderbolt DART support Sven Peter
2023-01-28 11:11 ` [PATCH 1/4] dt-bindings: iommu: dart: Add t8103-usb4-dart compatible Sven Peter
2023-01-28 11:44   ` Hector Martin
2023-01-30 21:41   ` Rob Herring
2023-01-28 11:11 ` [PATCH 2/4] iommu: dart: Add flag to override bypass support Sven Peter
2023-01-28 11:44   ` Hector Martin [this message]
2023-01-28 11:11 ` [PATCH 3/4] iommu: dart: Write to all DART_T8020_STREAM_SELECT Sven Peter
2023-01-28 11:45   ` Hector Martin
2023-01-28 11:11 ` [PATCH 4/4] iommu: dart: Add support for M1 USB4 PCIe DART Sven Peter
2023-01-28 11:46   ` Hector Martin

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=b4428d3b-bcad-cea0-7364-753b050faa78@marcan.st \
    --to=marcan@marcan.st \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=devicetree@vger.kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sven@svenpeter.dev \
    --cc=will@kernel.org \
    /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).