Linux on Apple ARM platform development
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>, Joerg Roedel <joro@8bytes.org>,
	Will Deacon <will@kernel.org>, Nicolin Chen <nicolinc@nvidia.com>,
	Krishna Reddy <vdumpa@nvidia.com>,
	Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Janne Grunau <j@jannau.net>, Sameer Pujar <spujar@nvidia.com>,
	devicetree@vger.kernel.org, iommu@lists.linux-foundation.org,
	linux-tegra@vger.kernel.org, asahi@lists.linux.dev,
	Frank Rowand <frowand.list@gmail.com>,
	Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v9 2/5] iommu: Implement of_iommu_get_resv_regions()
Date: Fri, 7 Oct 2022 17:35:24 +0100	[thread overview]
Message-ID: <be053004-2d51-5d06-58b2-00e44dd93034@arm.com> (raw)
In-Reply-To: <Y0BFkudEGLlAqeFj@orome>

On 2022-10-07 16:28, Thierry Reding wrote:
[...]
>>> @@ -172,3 +173,106 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
>>>    	return ops;
>>>    }
>>> +
>>> +static inline bool check_direct_mapping(struct device *dev, struct resource *phys,
>>
>> Where "phys" is the virtual address, right? :(
> 
> No, phys is actually res passed in from of_iommu_get_resv_regions()
> where it is the address read from the "reg" property. So that's the
> physical address of the reserved region. Perhaps it'd be useful to
> rename "res" to "phys" in that function to be a little more consistent.
> It's actually the "start" and "end" values that are passed into this
> function that refer to the I/O virtual addresses from iommu-addresses.

Oh, so it's the phys_addr_t's that aren't physical addresses - well, it 
had to be wrong one way or the other :)

I agree that s/res/phys/ in the main function, and maybe s/start/iova/ 
too, would be helpful.

Thanks,
Robin.

  reply	other threads:[~2022-10-07 16:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 12:35 [PATCH v9 0/5] iommu: Support mappings/reservations in reserved-memory regions Thierry Reding
2022-09-23 12:35 ` [PATCH v9 1/5] dt-bindings: reserved-memory: Document iommu-addresses Thierry Reding
2022-10-07 13:45   ` Robin Murphy
2022-10-07 13:54     ` Thierry Reding
2022-10-07 14:21       ` Robin Murphy
2022-10-07 15:22         ` Thierry Reding
2022-10-07 16:25           ` Robin Murphy
2022-09-23 12:35 ` [PATCH v9 2/5] iommu: Implement of_iommu_get_resv_regions() Thierry Reding
2022-10-07 13:47   ` Robin Murphy
2022-10-07 15:28     ` Thierry Reding
2022-10-07 16:35       ` Robin Murphy [this message]
2022-10-19 18:03   ` Thierry Reding
2022-10-20 14:34     ` Thierry Reding
2022-09-23 12:35 ` [PATCH v9 3/5] iommu: dma: Use of_iommu_get_resv_regions() Thierry Reding
2022-09-23 12:35 ` [PATCH v9 4/5] iommu/tegra-smmu: Add support for reserved regions Thierry Reding
2022-09-23 12:35 ` [PATCH v9 5/5] iommu/tegra-smmu: Support managed domains Thierry Reding
2022-10-07 13:48   ` Robin Murphy
2022-10-07 15:40     ` Thierry Reding
2022-10-07 12:51 ` [PATCH v9 0/5] iommu: Support mappings/reservations in reserved-memory regions Thierry Reding

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=be053004-2d51-5d06-58b2-00e44dd93034@arm.com \
    --to=robin.murphy@arm.com \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=asahi@lists.linux.dev \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=frowand.list@gmail.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=j@jannau.net \
    --cc=joro@8bytes.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=spujar@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=vdumpa@nvidia.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