From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [Question] flush_dcache_page() need to flush icache?
Date: Tue, 30 Apr 2013 16:26:35 +0100 [thread overview]
Message-ID: <20130430152635.GH29766@arm.com> (raw)
In-Reply-To: <CACVXFVPz-rMiPyW2EE==v58LF6uTD1M1fKTNcF5a5+Z6-5u+Gg@mail.gmail.com>
On Tue, Apr 30, 2013 at 11:02:36AM +0100, Ming Lei wrote:
> On Tue, Apr 30, 2013 at 5:05 PM, Catalin Marinas
> <catalin.marinas@arm.com> wrote:
> > On Tue, Apr 30, 2013 at 09:16:16AM +0100, Ming Lei wrote:
> >> Looks flush_dcache_page() need to deal with both dcache alias and I/D
> >> cache coherency, but set_pte_at() has already run __sync_icache_dcache()
> >> to make I/D cache coherency in the path of executable page fault.
> >>
> >> So could the flushing icache be removed in flush_dcache_page()?
> >
> > That's the case for (mapping && mapping_mapped(mapping)) where the
> > kernel modifies a page cache page which is already mapped in user space
> > and we won't get a subsequent set_pte_at() call.
>
> OK, I got it, so looks it is only needed in self-modifying-code case,
> but I am wondering why it is always done for all cases of (mapping &&
> mapping_mapped(mapping))......
It's not self-modifying code, this would be code running in user space
which modifies some other code and it would invoke the ARM-specific
syscall for flushing.
Here it is about kernel modifying a page which is already mapped in user
space, hence the check for mapping && mapping_mapped.
--
Catalin
next prev parent reply other threads:[~2013-04-30 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 8:16 [Question] flush_dcache_page() need to flush icache? Ming Lei
2013-04-30 9:05 ` Catalin Marinas
2013-04-30 10:02 ` Ming Lei
2013-04-30 15:26 ` Catalin Marinas [this message]
2013-05-01 8:11 ` Ming Lei
2013-05-01 8:22 ` Catalin Marinas
2013-05-01 8:53 ` Ming Lei
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=20130430152635.GH29766@arm.com \
--to=catalin.marinas@arm.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).