Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1346302

Re: [PATCH 1/2] MIPS: Add barriers between dcache & icache flushes

From Paul Burton <paul.burton@imgtec.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] MIPS: Add barriers between dcache & icache flushes
Date 2016-03-01 03:30 +0100
Message-ID <r7Ieu-2Sw-3@gated-at.bofh.it> (permalink)
References <r53fs-1nh-5@gated-at.bofh.it> <r58Ia-5AT-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Feb 22, 2016 at 04:02:09PM -0800, Florian Fainelli wrote:
> On 22/02/16 10:09, Paul Burton wrote:
> > Index-based cache operations may be arbitrarily reordered by out of
> > order CPUs. Thus code which writes back the dcache & then invalidates
> > the icache using indexed cache ops must include a barrier between
> > operating on the 2 caches in order to prevent the scenario in which:
> > 
> >   - icache invalidation occurs.
> > 
> >   - icache fetch occurs, due to speculation.
> > 
> >   - dcache writeback occurs.
> > 
> > If the above were allowed to happen then the icache would contain stale
> > data. Forcing the dcache writeback to complete before the icache
> > invalidation avoids this.
> 
> Is that also true for CPUs with have cpu_has_ic_fills_dc?

Hi Florian,

Good question. I imagine not, but probably need to think some more & ask
some questions.

Thanks,
    Paul

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/2] MIPS: Add barriers between dcache & icache flushes Florian Fainelli <f.fainelli@gmail.com> - 2016-02-23 01:10 +0100
  Re: [PATCH 1/2] MIPS: Add barriers between dcache & icache flushes Paul Burton <paul.burton@imgtec.com> - 2016-03-01 03:30 +0100

csiph-web