From: saeed.bishara@gmail.com (saeed bishara)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: fix highmem with VIPT cache and DMA
Date: Tue, 13 Apr 2010 10:11:44 +0300 [thread overview]
Message-ID: <o2oc70ff3ad1004130011qb51b90a2p3267a8ab04917b05@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1004121122050.7232@xanadu.home>
thanks. attached fixed version.
On Mon, Apr 12, 2010 at 6:36 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> On Mon, 12 Apr 2010, saeed bishara wrote:
>
>> Nico, thanks for the patch.
>> I've ported it for 2.6.32.9 kernel, can you have a look at the
>> attached patch?
>
> That patch is bad.
>
> |diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> |index b9590a7..5286d71 100644
> |--- a/arch/arm/mm/dma-mapping.c
> |+++ b/arch/arm/mm/dma-mapping.c
> |@@ -602,6 +602,11 @@ static void dma_cache_maint_contiguous(struct page *page, unsigned long offset,
> | ? ? ? ? ? ? ? ? ? ? ? vaddr += offset;
> | ? ? ? ? ? ? ? ? ? ? ? inner_op(vaddr, vaddr + size);
> | ? ? ? ? ? ? ? ? ? ? ? kunmap_high(page);
> |+ ? ? ? ? ? ? ?} else if (cache_is_vipt()) {
> |+ ? ? ? ? ? ? ? ? ? ? ?pte_t saved_pte;
> |+ ? ? ? ? ? ? ? ? ? ? ?vaddr = kmap_high_l1_vipt(page, &saved_pte);
> |+ ? ? ? ? ? ? ? ? ? ? ?inner_op(vaddr, vaddr + size);
> |+ ? ? ? ? ? ? ? ? ? ? ?kunmap_high_l1_vipt(page, saved_pte);
> | ? ? ? ? ? ? ? }
> | ? ? ? }
>
> You should add 'offset' to 'vaddr' before passing it to inner_op(), just
> like it is done 6 lines above it.
>
> Also you left out the addition of the unconditional flush in
> v6_copy_user_highpage_nonaliasing() which is needed now that
> kunmap_atomic() doesn't flush the cache anymore on ARMv6.
>
>
> Nicolas
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-fix-highmem-with-VIPT-cache-and-DMA.patch
Type: text/x-patch
Size: 9460 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100413/aeab5cb4/attachment.bin>
next prev parent reply other threads:[~2010-04-13 7:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 21:02 [PATCH] ARM: fix highmem with VIPT cache and DMA Nicolas Pitre
2010-03-26 13:34 ` Catalin Marinas
2010-03-26 15:51 ` Nicolas Pitre
2010-03-26 23:09 ` Russell King - ARM Linux
2010-04-11 14:42 ` Nicolas Pitre
2010-04-12 7:56 ` saeed bishara
2010-04-12 15:36 ` Nicolas Pitre
2010-04-13 7:11 ` saeed bishara [this message]
2010-04-13 11:50 ` Nicolas Pitre
2010-04-12 19:41 ` Russell King - ARM Linux
2010-05-28 18:56 ` Russell King - ARM Linux
2010-05-28 19:26 ` Nicolas Pitre
2010-05-28 19:45 ` Russell King - ARM Linux
2010-05-28 20:28 ` Russell King - ARM Linux
2010-05-28 20:49 ` Nicolas Pitre
2010-05-28 22:19 ` Russell King - ARM Linux
2010-05-29 0:00 ` Nicolas Pitre
-- strict thread matches above, loose matches on Subject: below --
2010-04-23 6:55 Allen Pais
2010-04-25 14:13 ` Nicolas Pitre
2010-04-25 19:01 ` Allen Pais
2010-04-26 1:07 ` Nicolas Pitre
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=o2oc70ff3ad1004130011qb51b90a2p3267a8ab04917b05@mail.gmail.com \
--to=saeed.bishara@gmail.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).