linux-mips
[Top] [All Lists]

icache flushing (Re: Broadcom Swarm support)

To: linux-mips@linux-mips.org
Subject: icache flushing (Re: Broadcom Swarm support)
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Thu, 25 Jun 2009 10:48:24 +0900 (JST)
Cc: KKylheku@zeugmasystems.com, aurelien@aurel32.net, ralf@linux-mips.org
In-reply-to: <DDFD17CC94A9BD49A82147DDF7D545C501C3539B@exchange.ZeugmaSystems.local>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20090624063453.GA16846@volta.aurel32.net> <DDFD17CC94A9BD49A82147DDF7D545C501C3539B@exchange.ZeugmaSystems.local>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 24 Jun 2009 15:18:24 -0700, "Kaz Kylheku" <KKylheku@zeugmasystems.com> 
wrote:
> At some point in the kernel history, Ralfie decided that
> the flush_icache_page function is unnecessary and
> turned it into a MIPS-wide noop. But the SB1 core, which has
> a VIVT instruction cache, it appears that there
> is some kind of issue whereby when it
> is handling a fault for a not-present virtual page,
> it somehow ends up with bad data in the instruction
> cache---perhaps an inconsistent state due to not having
> been able to complete the fetch, but having initiated
> a cache update on the expectation that the fetch
> will complete. It seems that the the fault handler
> is expected to do a flush.

Looking at current code, I also have some questions aboud icache
flushing.

* flush_cache_mm does not flush icache.  Is it OK?

* flush_cache_{vmap,vunmap} does not flush icache.  When icache used
  by modules flushed after unloading?

* __update_cache, copy_user_highpage does not flush icache even if
  !cpu_has_ic_fills_f_dc.  Is it OK?

* free_initmem does not flush icache.  When these init pages are
  reused, how corresponding icache will be flushed?

I suppose flushing icache in flush_icache_page() will hide real bugs
somewhere else...

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>