patch-2.4.0-test6 linux/arch/sh/mm/fault.c
Next file: linux/arch/sh/mm/init.c
Previous file: linux/arch/sh/mm/cache.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Wed Aug 9 13:59:04 2000
- Orig file:
v2.4.0-test5/linux/arch/sh/mm/fault.c
- Orig date:
Thu Jul 27 17:37:59 2000
diff -u --recursive --new-file v2.4.0-test5/linux/arch/sh/mm/fault.c linux/arch/sh/mm/fault.c
@@ -115,7 +115,8 @@
* ITLB is not affected by "ldtlb" instruction.
* So, we need to flush the entry by ourselves.
*/
- __flush_tlb_page(mm, address&PAGE_MASK);
+ if (mm)
+ __flush_tlb_page(mm, address&PAGE_MASK);
#endif
update_mmu_cache(NULL, address, entry);
}
@@ -281,15 +282,14 @@
save_and_cli(flags);
#if defined(__SH4__)
- if ((vma->vm_flags & VM_SHARED)) {
+ if (vma && (vma->vm_flags & VM_SHARED)) {
+ struct page *pg;
+
pteval = pte_val(pte);
pteval &= PAGE_MASK; /* Physicall page address */
-
__flush_tlb_phys(vma->vm_mm, pteval);
-
- /* It would be good we had routine which takes
- physical memory as argument */
- flush_cache_page(vma, address&PAGE_MASK);
+ pg = virt_to_page(__va(pteval));
+ flush_dcache_page(pg);
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)