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 3/4] iommu: dart: Write to all DART_T8020_STREAM_SELECT
Date: Sat, 28 Jan 2023 20:45:37 +0900 [thread overview]
Message-ID: <defcbb1a-599f-c905-1f4c-5c512d0a67c1@marcan.st> (raw)
In-Reply-To: <20230128111114.4049-4-sven@svenpeter.dev>
On 28/01/2023 20.11, Sven Peter wrote:
> We're about to add support for a DART variant that use more than 16
> streams and requires writing to two separate stream select registers
> when issuing TLB flushes.
>
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
> drivers/iommu/apple-dart.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
> index 7d8b2b90cdb6..7579c97a9062 100644
> --- a/drivers/iommu/apple-dart.c
> +++ b/drivers/iommu/apple-dart.c
> @@ -372,12 +372,14 @@ apple_dart_t8020_hw_stream_command(struct apple_dart_stream_map *stream_map,
> u32 command)
> {
> unsigned long flags;
> - int ret;
> + int ret, i;
> u32 command_reg;
>
> spin_lock_irqsave(&stream_map->dart->lock, flags);
>
> - writel(stream_map->sidmap[0], stream_map->dart->regs + DART_T8020_STREAM_SELECT);
> + for (i = 0; i < BITS_TO_U32(stream_map->dart->num_streams); i++)
> + writel(stream_map->sidmap[i],
> + stream_map->dart->regs + DART_T8020_STREAM_SELECT + 4 * i);
> writel(command, stream_map->dart->regs + DART_T8020_STREAM_COMMAND);
>
> ret = readl_poll_timeout_atomic(
Acked-by: Hector Martin <marcan@marcan.st>
- Hector
next prev parent 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
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 [this message]
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=defcbb1a-599f-c905-1f4c-5c512d0a67c1@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).