From dfeca18773e2496197aba82520375552c78b7800 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Wed, 31 Mar 2010 02:43:58 +0000 Subject: MFC rev 198341 and 198342: o Introduce vm_sync_icache() for making the I-cache coherent with the memory or D-cache, depending on the semantics of the platform. vm_sync_icache() is basically a wrapper around pmap_sync_icache(), that translates the vm_map_t argumument to pmap_t. o Introduce pmap_sync_icache() to all PMAP implementation. For powerpc it replaces the pmap_page_executable() function, added to solve the I-cache problem in uiomove_fromphys(). o In proc_rwmem() call vm_sync_icache() when writing to a page that has execute permissions. This assures that when breakpoints are written, the I-cache will be coherent and the process will actually hit the breakpoint. o This also fixes the Book-E PMAP implementation that was missing necessary locking while trying to deal with the I-cache coherency in pmap_enter() (read: mmu_booke_enter_locked). --- sys/mips/mips/pmap.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/mips') diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 7b106dc4a4ac..25b0b3a7bbd1 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -2903,6 +2903,11 @@ pmap_activate(struct thread *td) critical_exit(); } +void +pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) +{ +} + /* * Increase the starting virtual address of the given mapping if a * different alignment might result in more superpage mappings. -- cgit v1.3