From: grgupta@ti.com (Gupta, Ramesh)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/2] ARM: new cache maintenance api for iommu
Date: Mon, 10 Sep 2012 15:51:35 +0530 [thread overview]
Message-ID: <CADysL2Y7RP1OUthWri2v6cSqk-CRTh2R7urec7P2NdhaZ09KmA@mail.gmail.com> (raw)
In-Reply-To: <20120908101420.GA28448@n2100.arm.linux.org.uk>
Hi Russell,
On Sat, Sep 8, 2012 at 3:44 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Thu, Jul 05, 2012 at 10:50:17AM +0530, Gupta, Ramesh wrote:
>> + * flush_iommu_mem(start, end)
>> + *
>> + * Clean and invalidate the specified virtual address range.
>> + * This is to support the non coherent iommu drivers.
>> + * The iommu driver need to call this api with the page
>> + * table memory address range to ensure the data held in
>> + * the cache is visible to the slave processor MMU.
>> + * - start - virtual start address
>> + * - end - virtual end address
>
> I think:
> iommu_flush_range(start, end)
> or
> iommu_flush_area(start, size)
> Perform CPU specific cache operations are required to
> ensure that the IOMMU page table mappings covering the
> specified block of memory are visiable to the IOMMU.
I prefer iommu_flush_area(start, size).
>
> Notice that it's defined by purpose, not by implementation. Also notice
> the distinction between _range taking two addresses, and _area taking
> a start plus size.
> Also notice that it is defined just for IOMMU page tables, not for general
> data for other processors.
Agree with your comments, may be I can add an explicit comment for not
using these apis other than IOMMU page tables.
> Note that iommu_flush_area is safer if your virt_to_phys() are non-linear.
Agree, I will send an updated patch series with iommu_flush_area.
thank you for the review comments.
Best regards
Ramesh Gupta G
prev parent reply other threads:[~2012-09-10 10:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 5:20 [PATCH v4 1/2] ARM: new cache maintenance api for iommu Gupta, Ramesh
2012-09-08 10:14 ` Russell King - ARM Linux
2012-09-10 10:21 ` Gupta, Ramesh [this message]
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=CADysL2Y7RP1OUthWri2v6cSqk-CRTh2R7urec7P2NdhaZ09KmA@mail.gmail.com \
--to=grgupta@ti.com \
--cc=linux-arm-kernel@lists.infradead.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).