From: Catalin Marinas <catalin.marinas@arm.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Nicolas Pitre <nico@fluxnic.net>,
linux-mmc@vger.kernel.org, Hemanth V <hemanthv@ti.com>,
saeed bishara <saeed.bishara@gmail.com>,
pierre@ossman.eu, linux-arm-kernel@lists.infradead.org
Subject: Re: Highmem issues with MMC filesystem
Date: Fri, 19 Mar 2010 16:46:54 +0000 [thread overview]
Message-ID: <1269017214.31227.117.camel@e102109-lin.cambridge.arm.com> (raw)
In-Reply-To: <20100319145417.GH21280@n2100.arm.linux.org.uk>
On Fri, 2010-03-19 at 14:54 +0000, Russell King - ARM Linux wrote:
> On Fri, Mar 19, 2010 at 02:52:00PM +0000, Catalin Marinas wrote:
> > > On Fri, Mar 19, 2010 at 02:41:17PM +0000, Catalin Marinas wrote:
> > > > On Thu, 2010-03-18 at 13:20 +0000, Nicolas Pitre wrote:
> > > > > The only way a highmem page can be unmapped is through kunmap_atomic()
> > > > > where an explicit __cpuc_flush_dcache_area() is performed, or through
> > > > > flush_all_zero_pkmaps() where flush_cache_kmaps() translates into
> > > > > flush_cache_all().
> > > >
> > > > The thing that I couldn't fully understand with the kunmap_atomic()
> > > > function is that there is a path (when kvaddr < FIXADDR_START) where no
> > > > cache flushing occurs. Can this not happen?
> > >
> > > kunmap interfaces are not for cache flushing; the cache flushing is
> > > only there to ensure consistency when unmapping a mapping on VIVT CPUs.
> >
> > I agree, but then why don't we conditionally call
> > __cpuc_flush_dcache_area() in kunmap_atomic() so that we avoid this
> > flush on non-aliasing VIPT?
>
> Probably because highmem was written at the time for VIVT CPUs. I'm sure
> Nicolas will accept patches to improve performance of highmem for VIPT.
See below for the VIPT case. But my initial question still remains for
VIVT caches - are all the cases covered?
ARM: Do not flush the cache in kunmap_atomic if non-aliasing VIPT
From: Catalin Marinas <catalin.marinas@arm.com>
If the cache is non-aliasing VIPT, there is no need to flush the D-cache
during kunmap_atomic().
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
---
arch/arm/mm/highmem.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
index 2be1ec7..51c01a9 100644
--- a/arch/arm/mm/highmem.c
+++ b/arch/arm/mm/highmem.c
@@ -79,7 +79,8 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
unsigned int idx = type + KM_TYPE_NR * smp_processor_id();
if (kvaddr >= (void *)FIXADDR_START) {
- __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE);
+ if (!cache_is_vipt_nonaliasing())
+ __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE);
#ifdef CONFIG_DEBUG_HIGHMEM
BUG_ON(vaddr != __fix_to_virt(FIX_KMAP_BEGIN + idx));
set_pte_ext(TOP_PTE(vaddr), __pte(0), 0);
--
Catalin
next prev parent reply other threads:[~2010-03-19 16:47 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 13:40 Highmem issues with MMC filesystem Hemanth V
2010-03-17 13:49 ` Nicolas Pitre
2010-03-17 14:40 ` Hemanth V
2010-03-17 14:58 ` Nicolas Pitre
2010-03-18 9:23 ` Russell King - ARM Linux
2010-03-18 11:15 ` saeed bishara
2010-03-18 11:24 ` Russell King - ARM Linux
2010-03-18 13:20 ` Nicolas Pitre
2010-03-18 13:30 ` Shilimkar, Santosh
2010-03-18 14:19 ` Russell King - ARM Linux
2010-03-18 14:41 ` Hemanth V
2010-03-18 16:17 ` Nicolas Pitre
2010-03-18 17:51 ` Russell King - ARM Linux
2010-03-18 19:24 ` Nicolas Pitre
2010-03-19 1:55 ` Jamie Lokier
2010-03-19 13:17 ` Nicolas Pitre
2010-03-19 13:27 ` Russell King - ARM Linux
2010-03-19 17:59 ` Nicolas Pitre
2010-03-19 18:26 ` Catalin Marinas
2010-03-19 18:56 ` Nicolas Pitre
2010-03-19 14:28 ` Hemanth V
2010-03-19 14:36 ` Shilimkar, Santosh
2010-03-19 14:45 ` Russell King - ARM Linux
2010-03-19 14:41 ` Catalin Marinas
2010-03-19 14:46 ` Russell King - ARM Linux
2010-03-19 14:52 ` Catalin Marinas
2010-03-19 14:54 ` Russell King - ARM Linux
2010-03-19 16:46 ` Catalin Marinas [this message]
2010-03-19 16:52 ` Russell King - ARM Linux
2010-03-19 17:47 ` Nicolas Pitre
2010-03-19 18:27 ` Nicolas Pitre
2010-03-19 18:38 ` Russell King - ARM Linux
2010-03-19 18:51 ` Nicolas Pitre
2010-03-22 11:45 ` Russell King - ARM Linux
2010-03-22 12:36 ` Nicolas Pitre
2010-03-19 20:14 ` Nicolas Pitre
2010-03-22 9:05 ` Hemanth V
2010-03-22 12:50 ` Nicolas Pitre
2010-03-18 13:42 ` saeed bishara
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=1269017214.31227.117.camel@e102109-lin.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=hemanthv@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nico@fluxnic.net \
--cc=pierre@ossman.eu \
--cc=saeed.bishara@gmail.com \
/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).