Re: [PATCH 2/2] iommu: dma: Use of_iommu_get_resv_regions()

From: Robin Murphy
Date: Wed Nov 27 2019 - 12:09:48 EST


On 27/11/2019 2:16 pm, Thierry Reding wrote:
[...]
Nevermind that, I figured out that I was missingthe initialization of
some of the S2CR variables. I've got something that I think is working
now, though I don't know yet how to go about cleaning up the initial
mapping and "recycling" it.

I'll clean things up a bit, run some more tests and post a new patch
that can serve as a basis for discussion.

I'm a little puzzled by the smmu->identity domain - disregarding the fact that it's not actually used by the given diff ;) - if isolation is the reason for not simply using a bypass S2CR for the window between reset and the relevant .add_device call where the default domain proper comes in[1], then surely exposing the union of memory regions to the union of all associated devices isn't all that desirable either.

Either way, I'll give you the pre-emptive warning that this is the SMMU in the way of my EFI framebuffer ;)

...
arm-smmu 7fb20000.iommu: 1 context banks (1 stage-2 only)
...

Robin.

[1] the fact that it currently depends on probe order whether getting that .add_device call requires a driver probing for the device is an error as discussed elsewhere, and will get fixed separately, I promise.