[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <defcbb1a-599f-c905-1f4c-5c512d0a67c1@marcan.st>
Date: Sat, 28 Jan 2023 20:45:37 +0900
From: Hector Martin <marcan@...can.st>
To: Sven Peter <sven@...npeter.dev>, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>
Cc: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
linux-arm-kernel@...ts.infradead.org, asahi@...ts.linux.dev,
iommu@...ts.linux.dev, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] iommu: dart: Write to all DART_T8020_STREAM_SELECT
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@...npeter.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@...can.st>
- Hector
Powered by blists - more mailing lists