linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sven Peter" <sven@svenpeter.dev>
To: "Hector Martin" <marcan@marcan.st>,
	"Joerg Roedel" <joro@8bytes.org>, "Will Deacon" <will@kernel.org>,
	"Robin Murphy" <robin.murphy@arm.com>
Cc: "Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
	"Janne Grunau" <j@jannau.net>, "Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	devicetree@vger.kernel.org, iommu@lists.linux.dev,
	asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/7] iommu: dart: Support >64 stream IDs
Date: Thu, 05 Jan 2023 10:47:39 +0100	[thread overview]
Message-ID: <7ecde27b-05e9-4727-8441-e17916df237a@app.fastmail.com> (raw)
In-Reply-To: <3af091e9-09b4-53a0-da2d-5b2640040b9d@marcan.st>

Hi,

On Thu, Jan 5, 2023, at 05:43, Hector Martin wrote:
> On 2023/01/04 22:37, Sven Peter wrote:
>>>  #include "dma-iommu.h"
>>>
>>> -#define DART_MAX_STREAMS 16
>>> +#define DART_MAX_STREAMS 256
>> 
>> Feels a bit wasteful to allocate 256-wide sid2group and save_{tcr,ttbr}
>> arrays even for the M1 where 16 are enough. But then again, that's still <100 KiB
>> for all DARTs combined and these machine have >8 GiB of RAM so it probably won't
>> make a difference
>
> Yeah, I don't think this is worth the extra fumbling around with dynamic
> allocation.
>
>>>  	/* enable all streams globally since TCR is used to control isolation */
>>> -	writel(DART_STREAM_ALL, dart->regs + DART_STREAMS_ENABLE);
>>> +	for (i = 0; i < BITS_TO_U32(dart->num_streams); i++)
>>> +		writel(U32_MAX, dart->regs + DART_STREAMS_ENABLE);
>> 
>> This seems weird: this code writes U32_MAX to the same register
>> again and again. 
>
> Whoops, that was supposed to have a `+ 4 * i` in there. Fixed for v2.

Great! Feel free to also add

Reviewed-by: Sven Peter <sven@svenpeter.dev>

then.


Best,

Sven

  reply	other threads:[~2023-01-05  9:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 11:00 [PATCH 0/7] iommu: dart: Apple t8110 DART support Hector Martin
2023-01-04 11:00 ` [PATCH 1/7] dt-bindings: iommu: dart: add t8110 compatible Hector Martin
2023-01-04 13:08   ` Sven Peter
2023-01-06 12:54   ` Krzysztof Kozlowski
2023-01-04 11:00 ` [PATCH 2/7] iommu: dart: Add suspend/resume support Hector Martin
2023-01-04 11:00 ` [PATCH 3/7] iommu: dart: Support >64 stream IDs Hector Martin
2023-01-04 13:37   ` Sven Peter
2023-01-05  4:43     ` Hector Martin
2023-01-05  9:47       ` Sven Peter [this message]
2023-01-04 11:00 ` [PATCH 4/7] iommu: dart: Support a variable number of TTBRs per stream Hector Martin
2023-01-04 13:18   ` Sven Peter
2023-01-05  4:51     ` Hector Martin
2023-01-04 11:00 ` [PATCH 5/7] iommu: dart: Fix DART_PARAMS1/2 bit define names Hector Martin
2023-01-04 13:23   ` Sven Peter
2023-01-04 11:00 ` [PATCH 6/7] iommu: dart: Support different variants with different registers Hector Martin
2023-01-04 13:43   ` Sven Peter
2023-01-05  5:16     ` Hector Martin
2023-01-05  9:46       ` Sven Peter
2023-01-04 11:00 ` [PATCH 7/7] iommu: dart: Add t8110 DART support Hector Martin
2023-01-04 13:50   ` Sven Peter
2023-01-05  5:19     ` Hector Martin
2023-01-05  9:45       ` Sven Peter
2023-01-13 10:50 [PATCH 0/7] iommu: dart: Apple " Hector Martin
2023-01-13 10:50 ` [PATCH 3/7] iommu: dart: Support >64 stream IDs 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=7ecde27b-05e9-4727-8441-e17916df237a@app.fastmail.com \
    --to=sven@svenpeter.dev \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=devicetree@vger.kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=j@jannau.net \
    --cc=joro@8bytes.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --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).