>>>>> On Wed, 28 Sep 2005 20:34:29 +0900 (JST), Atsushi Nemoto <anemo@xxxxxxxxxxxxx> said: anemo> If I used indexed-flush for executable page in anemo> flush_cache_page(), the problem disappear. Is this a right anemo> fix? Sorry, this would corrupt cpu_has_ic_fills_f_dc case. Revised. diff -u linux-mips/arch/mips/mm/c-r4k.c linux/arch/mips/mm/c-r4k.c --- linux-mips/arch/mips/mm/c-r4k.c 2005-09-22 10:38:23.000000000 +0900 +++ linux/arch/mips/mm/c-r4k.c 2005-09-28 20:55:55.000000000 +0900 @@ -409,8 +409,9 @@ * for every cache flush operation. So we do indexed flushes * in that case, which doesn't overly flush the cache too much. */ - if ((mm == current->active_mm) && (pte_val(*ptep) & _PAGE_VALID)) { - if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { + if ((mm == current->active_mm) && (pte_val(*ptep) & _PAGE_VALID) && + !(exec && !cpu_has_ic_fills_f_dc)) { + if (cpu_has_dc_aliases) { r4k_blast_dcache_page(page); if (exec && !cpu_icache_snoops_remote_store) r4k_blast_scache_page(page); diff -u linux-mips/arch/mips/mm/c-tx39.c linux/arch/mips/mm/c-tx39.c --- linux-mips/arch/mips/mm/c-tx39.c 2005-09-05 10:16:59.000000000 +0900 +++ linux/arch/mips/mm/c-tx39.c 2005-09-28 18:51:43.000000000 +0900 @@ -213,12 +213,10 @@ * for every cache flush operation. So we do indexed flushes * in that case, which doesn't overly flush the cache too much. */ - if ((mm == current->active_mm) && (pte_val(*ptep) & _PAGE_VALID)) { - if (cpu_has_dc_aliases || exec) + if ((mm == current->active_mm) && (pte_val(*ptep) & _PAGE_VALID) && + !exec) { + if (cpu_has_dc_aliases) tx39_blast_dcache_page(page); - if (exec) - tx39_blast_icache_page(page); - return; } --- Atsushi Nemoto