Re: [Linux-ia64] Modifing memory attributes needs cache flush

David Mosberger
2002-01-10T19:17:51Z

>>>>> On Wed, 09 Jan 2002 17:39:38 +0900 (JST), Takanori Kawano <t-kawano@ebina.hitachi.co.jp> said:

Takanori> If software modifies the memory attributes for a page,
Takanori> software must flush any processor cache copies with the
Takanori> Flush Cache(fc) instruction for the following memory
Takanori> attribute changes: speculative/non-speculative,
Takanori> cacheable/uncacheable(for transitions from cacheable to
Takanori> uncacheable), and coherency. Software must flush any
Takanori> coalescing buffers if a page is changes from coalescing to
Takanori> any other attribute.

Takanori> Does anybody know why the current code doesn't flush
Takanori> cache?

Well, the kernel is supposed to use each page in a consistent fashion
(no change of attributes). Though this isn't enforced anywhere (see
earlier discussion about write-coalescing mappings. We need a general
solution for this eventually. For now, it will have to be dealt with
on a case-by-case basis, I think.

--david