From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM DMA: Fix in dma_cache_maint_page
Date: Wed, 16 Jan 2013 13:08:38 +0000 [thread overview]
Message-ID: <20130116130838.GS23505@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1358340715.2384.23.camel@dabdike.int.hansenpartnership.com>
On Wed, Jan 16, 2013 at 12:51:55PM +0000, James Bottomley wrote:
> On Wed, 2013-01-16 at 18:17 +0530, Subhash Jadavani wrote:
> > Is it possible to pick up James patch below? Thread here:
> > http://comments.gmane.org/gmane.linux.kernel.mmc/18670, have the details
> > on the motivation behind this fix.
>
> Someone should also audit the arm kernel code for more of these linear
> page array assumptions. I'm guessing that when sparsemem was added to
> arm over a year ago, whoever did it either didn't audit or missed a few.
No, that's a bad assumption. We've had discontigmem for years - maybe
something like 12 years. I switched everything over to sparsemem, and
sparsemem has been used on ARM for years too:
commit 05944d74bc28fffbcce159cb915d0acff82f30a1
Author: Russell King <rmk@dyn-67.arm.linux.org.uk>
Date: Thu Nov 30 20:43:51 2006 +0000
[ARM] Add initial sparsemem support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
However, there's a big problem with this: very few of the lead people
have machines which suffer from this disability, so there's very little
testing of it - and there's very little testing of new code with it.
The patch which originally introduced this code which your patch
touches was part of adding highmem support to ARM:
commit 43377453af83b8ff8c1c731da1508bd6b84ebfea
Author: Nicolas Pitre <nico@cam.org>
Date: Thu Mar 12 22:52:09 2009 -0400
[ARM] introduce dma_cache_maint_page()
This is a helper to be used by the DMA mapping API to handle cache
maintenance for memory identified by a page structure instead of a
virtual address. Those pages may or may not be highmem pages, and
when they're highmem pages, they may or may not be virtually mapped.
When they're not mapped then there is no L1 cache to worry about. But
even in that case the L2 cache must be processed since unmapped highmem
pages can still be L2 cached.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
some three years later, and has been through a number of revisions since.
I'd really like to get rid of sparsemem so it's one less failure case, but
alas there's a relatively small bunch of folk who rely upon it. That
means it's always going to be more buggy.
next prev parent reply other threads:[~2013-01-16 13:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1358265681-25671-1-git-send-email-subhashj@codeaurora.org>
[not found] ` <1358266794.10591.8.camel@dabdike.int.hansenpartnership.com>
[not found] ` <50F64AC1.3040304@codeaurora.org>
2013-01-16 10:32 ` [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors James Bottomley
2013-01-16 12:39 ` Subhash Jadavani
2013-01-16 12:47 ` ARM DMA: Fix in dma_cache_maint_page Subhash Jadavani
2013-01-16 12:51 ` James Bottomley
2013-01-16 13:08 ` Russell King - ARM Linux [this message]
2013-01-16 15:50 ` James Bottomley
2013-01-16 23:14 ` [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors Russell King - ARM Linux
2013-01-17 8:54 ` James Bottomley
2013-01-16 23:18 ` Tejun Heo
2013-01-17 9:11 ` James Bottomley
2013-01-17 10:37 ` Russell King - ARM Linux
2013-01-17 10:47 ` Russell King - ARM Linux
2013-01-17 11:01 ` James Bottomley
2013-01-17 11:04 ` Russell King - ARM Linux
2013-01-17 11:19 ` James Bottomley
2013-01-17 11:40 ` Russell King - ARM Linux
2013-01-17 14:58 ` Subhash Jadavani
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=20130116130838.GS23505@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).