From: Ralf Baechle <ralf@linux-mips.org>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: KKylheku@zeugmasystems.com, aurelien@aurel32.net,
linux-mips@linux-mips.org
Subject: Re: Broadcom Swarm support
Date: Mon, 29 Jun 2009 20:08:10 +0100 [thread overview]
Message-ID: <20090629190809.GC22264@linux-mips.org> (raw)
In-Reply-To: <20090628.010906.115909054.anemo@mba.ocn.ne.jp>
On Sun, Jun 28, 2009 at 01:09:06AM +0900, Atsushi Nemoto wrote:
> > The I-cache for page just being loaded is clean so no flushing needed. It
> > is clean because when the page has been unmapped it was flushed or because
> > the CPU switched to a fresh ASID.
>
> Then, flush_cache_range or flush_cache_page should be called then the
> page was unmmapped, right? How about flush_cache_mm? It does not
> flush icache currently.
If that is being called then we're either about to terminate a process or
to exec a new process. In either case flush_tlb_cache (on VIVT I-cache)
will drop the tlb context which effectively is a full I-cache flush.
> And how about kernel __init code pages? These pages are just freed on
> free_initmem. Also how about code pages used by a module which is to
> be unloaded from kernel?
Init code pages won't be used to store code that will be executed at
KSEG0 or XKPHYS addresses so I-cache coherency is not of interest.
For modules the I-cache is being flushed on loading of the module, see
calls to flush_icache_range() in kernel/module.c so I-cache coherency is
not of concern on module unload.
> > The reason for this bug is that when data is being shoveled around by the
> > processor (as opposed to DMA) as on PIO block devices it'll end up sitting
> > in the D-cache so I-cache refills will grab stale data from S-cache or
> > memory.
>
> Yes, I suppose so on this swarm case, but I'm just thinking of other
> case breaking icache coherency...
Be careful with that - you might succeed ;-)
Ralf
next prev parent reply other threads:[~2009-06-29 19:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 6:34 Broadcom Swarm support Aurelien Jarno
2009-06-24 22:18 ` Kaz Kylheku
2009-06-24 22:18 ` Kaz Kylheku
2009-06-25 1:48 ` icache flushing (Re: Broadcom Swarm support) Atsushi Nemoto
2009-06-26 21:19 ` Broadcom Swarm support Aurelien Jarno
2009-06-26 23:24 ` Ralf Baechle
2009-06-27 5:10 ` Aurelien Jarno
2009-06-27 9:14 ` Ralf Baechle
2009-06-27 13:59 ` Atsushi Nemoto
2009-06-27 15:48 ` Ralf Baechle
2009-06-27 16:09 ` Atsushi Nemoto
2009-06-27 16:11 ` Atsushi Nemoto
2009-06-29 19:08 ` Ralf Baechle [this message]
2009-06-30 14:00 ` Atsushi Nemoto
2009-07-06 13:56 ` Atsushi Nemoto
2009-06-27 15:49 ` Ralf Baechle
2009-06-30 17:10 ` Kaz Kylheku
2009-06-30 17:10 ` Kaz Kylheku
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=20090629190809.GC22264@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=KKylheku@zeugmasystems.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=aurelien@aurel32.net \
--cc=linux-mips@linux-mips.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).