From: NIIBE Y. <gn...@m1...> - 2001-08-07 08:32:49
|
SUGIOKA Toshinobu wrote: > It seems that current cvs kernel have some cache handling problem. > When it boots with NFS root file system, user process does not run at all. > > If I remove checking of PG_mapped_with_alias in flush_dcache_page(), > it works. Thanks for your report. Yup, I've found a issue for NFS. It's not that cache alias issue, but I-cache/D-cache coherency issue. We write-back the data in the GD-ROM or IDE driver. However, NFS doesn't do that. This causes problem for the archtecture which has write-back cache and I-cache/D-cache coherency issue. Here's the patch (for me, this is work around). Please try. It works for my environment. * arch/sh/mm/fault.c (update_mmu_cache): Flush the cache when first mapped, even if it has no alias. We need this to use NFS. Index: arch/sh/mm/fault.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/mm/fault.c,v retrieving revision 1.45 diff -u -r1.45 fault.c --- arch/sh/mm/fault.c 2001/08/07 05:20:02 1.45 +++ arch/sh/mm/fault.c 2001/08/07 08:25:41 @@ -290,14 +290,14 @@ return; #if defined(__SH4__) - if ((address ^ pte_val(pte)) & CACHE_ALIAS) { - page = pte_page(pte); - if (VALID_PAGE(page) && - !test_bit(PG_mapped_with_alias, &page->flags)) { - unsigned long phys = pte_val(pte) & PTE_PHYS_MASK; - __flush_cache_page(phys, 1); + page = pte_page(pte); + if (VALID_PAGE(page) && + !test_bit(PG_mapped_with_alias, &page->flags)) { + unsigned long phys = pte_val(pte) & PTE_PHYS_MASK; + + __flush_cache_page(phys, 1); + if ((address ^ pte_val(pte)) & CACHE_ALIAS) set_bit(PG_mapped_with_alias, &page->flags); - } } #endif -- |