[PATCH] [yeeloong] Fix ignoring of caching attributes in some code pathes

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Mon Sep 27 11:09:34 UTC 2010


On 09/27/2010 09:26 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> Hello. In some code pathes PTE_C_CACHE is returned when caching is
> already actually handled in another OR which may account either for
> ignored attribute or a caching mode which isn supported by given CPU at all
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

-------------- next part --------------
=== modified file 'mips/mips/pmap.c'
--- mips/mips/pmap.c	2010-08-13 22:16:49 +0000
+++ mips/mips/pmap.c	2010-08-17 11:36:08 +0000
@@ -3252,16 +3252,16 @@
 	int rw;
 
 	if (!(prot & VM_PROT_WRITE))
-		rw =  PTE_V | PTE_RO | PTE_C_CACHE;
+		rw =  PTE_RO;
 	else if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) {
 		if ((m->md.pv_flags & PV_TABLE_MOD) != 0)
-			rw =  PTE_V | PTE_D | PTE_C_CACHE;
+			rw =  PTE_D;
 		else
-			rw = PTE_V | PTE_C_CACHE;
+			rw = 0;
 		vm_page_flag_set(m, PG_WRITEABLE);
 	} else
 		/* Needn't emulate a modified bit for unmanaged pages. */
-		rw =  PTE_V | PTE_D | PTE_C_CACHE;
+		rw = PTE_D;
 	return (rw);
 }
 


More information about the freebsd-mips mailing list