Re: [PATCH] flush icache before set_pte on ia64 take3
From: Zoltan Menyhart
Date: Thu Jul 26 2007 - 11:13:55 EST
I do not think changing the semantics of flush_cache_page()
is a good idea. Please have a look at Documentation/cachetlb.txt.
This is for virtual address tagged caches.
The doc. does not say much about flush_icache_page().
It is used in:
install_page(): can release any previously existing mapping
(similarly: for virtual address tagged I-cache)
On the other hand, I do not see why it is used in these two
cases, I think the virtual address tagged I-cache must have been
flushed when the old PTE of the page was removed:
do_no_page():
if (pte_none(*page_table)) {
flush_icache_page(vma, new_page);
do_swap_page():
flush_icache_page(vma, page);
Anyway, it is a NO-OP on the machines with physical address
tagged caches.
Sure, the names could have been chosen more carefully.
Unless you have a very strong reason, do not change their
semantics (would require updates for the other architectures).
I can agree:
- lazy_mmu_prot_update() is not the right place for a flush
- to flush I-cache before inserting PTE (at least for the
machines with physical address tagged caches)
Can we have a separate, specific exec_flush_phtag_icache_page()
that is to be called before inserting a PTE with the exec bit on
for physical address tagged I-caches) ?
It is defined in asm-generic/cacheflush.h as NO-OP.
Or exec_flush_icache_page_before_set_pte() ?
Thanks,
Zoltan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/