From: anfei.zhou@gmail.com (anfei)
To: linux-arm-kernel@lists.infradead.org
Subject: flush icache if VM_EXEC in flush_cache_page
Date: Thu, 25 Mar 2010 23:35:46 +0800 [thread overview]
Message-ID: <20100325153546.GA10306@desktop> (raw)
Hi,
There is a little difference of flushing icache between flush_cache_page
and flush_cache_range, why not make them the same? I think they have
the very similar semantic except the range. If the vma is VM_EXEC, we
should flush the icache no matter what cache type, and if it's not,
then it's not necessary. Is it right?
Signed-off-by: Anfei Zhou <anfei.zhou@gmail.com>
---
arch/arm/mm/flush.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
index e34f095..48a756a 100644
--- a/arch/arm/mm/flush.c
+++ b/arch/arm/mm/flush.c
@@ -80,12 +80,10 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig
return;
}
- if (cache_is_vipt_aliasing()) {
+ if (cache_is_vipt_aliasing())
flush_pfn_alias(pfn, user_addr);
- __flush_icache_all();
- }
- if (vma->vm_flags & VM_EXEC && icache_is_vivt_asid_tagged())
+ if (vma->vm_flags & VM_EXEC)
__flush_icache_all();
}
#else
--
1.6.4.rc1
next reply other threads:[~2010-03-25 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 15:35 anfei [this message]
2010-03-25 16:36 ` flush icache if VM_EXEC in flush_cache_page Russell King - ARM Linux
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=20100325153546.GA10306@desktop \
--to=anfei.zhou@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.