From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 2/2] OMAP:IOMMU:flush L1 and L2 caches
Date: Wed, 12 Sep 2012 17:41:21 +0100 [thread overview]
Message-ID: <20120912164121.GF28448@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CADysL2bb+LC1ySgkp8Hd_VL8GaFJ_gsuMF=WkmWp+YTdJqKJ4A@mail.gmail.com>
On Wed, Sep 12, 2012 at 08:49:16PM +0530, Gupta, Ramesh wrote:
> Thanks to the RMK's suggestions.
I should've made clear the distinction between _range and _area.
A _range function takes start and end. An _area function takes a start
and size. So...
> -static void flush_iopgd_range(u32 *first, u32 *last)
> +static void flush_iopgd_range(u32 *first, size_t size)
This should change to flush_iopgd_area().
> {
> - /* FIXME: L2 cache should be taken care of if it exists */
> - do {
> - asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pgd"
> - : : "r" (first));
> - first += L1_CACHE_BYTES / sizeof(*first);
> - } while (first <= last);
> + phys_addr_t phys = virt_to_phys(first);
> +
> + iommu_flush_area(first, size);
> + outer_flush_range(phys, phys + size);
> }
>
> -static void flush_iopte_range(u32 *first, u32 *last)
> +static void flush_iopte_range(u32 *first, size_t size)
> +
flush_iopte_area(). (And there shouldn't be a blank line between this
and the open curley.)
Otherwise, looks fine.
next prev parent reply other threads:[~2012-09-12 16:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 15:19 [PATCH v5 2/2] OMAP:IOMMU:flush L1 and L2 caches Gupta, Ramesh
2012-09-12 16:41 ` Russell King - ARM Linux [this message]
2012-09-13 4:34 ` Gupta, Ramesh
2012-09-13 7:12 ` [PATCH v6 " Gupta, Ramesh
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=20120912164121.GF28448@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).