Re: [PATCH 1/2] MIPS: Add barriers between dcache & icache flushes
From: Paul Burton
Date: Mon Feb 29 2016 - 21:27:46 EST
- Next message: David Gibson: "Re: [3/4] powerpc/mm: Clean up memory hotplug failure paths"
- Previous message: Fengguang Wu: "Re: [kbuild-all] Invalid CPU Type - valid names are: alpha, arm, x86, ia64, m68k, microblaze, mips, mips64, nios2, powerpc, ppc, s390, sh, sparc, sparc64, blackfin, avr32, nds32, or1k"
- In reply to: Paul Burton: "Re: [PATCH 1/2] MIPS: Add barriers between dcache & icache flushes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: David Gibson: "Re: [3/4] powerpc/mm: Clean up memory hotplug failure paths"
- Previous message: Fengguang Wu: "Re: [kbuild-all] Invalid CPU Type - valid names are: alpha, arm, x86, ia64, m68k, microblaze, mips, mips64, nios2, powerpc, ppc, s390, sh, sparc, sparc64, blackfin, avr32, nds32, or1k"
- In reply to: Paul Burton: "Re: [PATCH 1/2] MIPS: Add barriers between dcache & icache flushes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]