tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cache invalidation in modload
On Sun Jan 04 2009 at 18:27:11 +0000, David Laight wrote:
> On Thu, Jan 01, 2009 at 08:35:41PM +0200, Antti Kantee wrote:
> > Hi,
> >
> > Why is cache invalidation, i.e. kobj_machdep(), required after loading
> > a module? The module loading code doesn't appear to do anything
> > magically mystically mythical which would require a flush. The only
> > reason I could even begin to imagine was to flush the instruction cache.
> > But at least on x86 this is not required according to my interpretation
> > of the Intel manuals.
>
> The intent is probably to flush the data cache - so that when code is
> read the newly loaded data is found.
> I-cache loads probably don't snoop the D-cache.
That's exactly what is not needed according to how I read the Intel
manuals. See the beginning of section 10.6 ("Self-Modifying Code")
of Volume 3A: System Programming Guide.
(I meant to write "invalidate instruction cache" in my original email,
sorry if that confused someone)
Home |
Main Index |
Thread Index |
Old Index