From 1ed01448fbe9c77a610d006602f2bf4606f7f0d9 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 11 Jul 2009 22:27:20 +0000 Subject: [PATCH] On exec(2), when loading the ELF image, pmap_enter_object() is called to prefault pages. This is an obvious place for making sure the I-cache is coherent. It was missing though. As such, execution over NFS and ZFS file systems was failing. NFS was fixed the wrong way (by flushing the D-cache as part of the NFS code) in a previous commit. ZFS problems were encountered after that and indicated that something else was wrong... Approved by: re (kib) --- sys/ia64/ia64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 355aa71fe79..53637713124 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -1733,6 +1733,9 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, pmap_pte_prot(pmap, pte, prot & (VM_PROT_READ | VM_PROT_EXECUTE)); pmap_set_pte(pte, va, VM_PAGE_TO_PHYS(m), FALSE, managed); + + if (prot & VM_PROT_EXECUTE) + ia64_sync_icache(va, PAGE_SIZE); } }