patch-2.4.21 linux-2.4.21/include/asm-s390/pgtable.h

Next file: linux-2.4.21/include/asm-s390/processor.h
Previous file: linux-2.4.21/include/asm-s390/pgalloc.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/include/asm-s390/pgtable.h linux-2.4.21/include/asm-s390/pgtable.h
@@ -236,12 +236,22 @@
 		pte_val(pteval) &= ~_PAGE_MKCLEAN;
                
 		asm volatile ("sske %0,%1" 
-				: : "d" (0), "a" (pte_val(pteval)));
+				: : "d" (STORAGE_ACC_KEY_MASK),
+				"a" (pte_val(pteval)));
 	}
 
 	*pteptr = pteval;
 }
 
+extern inline void set_access_key(pte_t pteval)
+{
+	asm volatile ("    iske 0,%1\n"
+		      "    or   0,%0\n"
+		      "    sske 0,%1\n"
+			: : "d" (STORAGE_ACC_KEY_MASK),
+			"a" (pte_val(pteval)) : "0", "cc");
+}
+
 #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
 
 /*
@@ -333,7 +343,7 @@
 
 extern inline pte_t pte_mkwrite(pte_t pte) 
 {
-	pte_val(pte) &= ~_PAGE_RO;
+	pte_val(pte) &= ~(_PAGE_RO | _PAGE_ISCLEAN);
 	return pte;
 }
 
@@ -394,7 +404,7 @@
 	/* We can't clear the changed bit atomically. For now we
          * clear (!) the page referenced bit. */
 	asm volatile ("sske %0,%1" 
-	              : : "d" (0), "a" (*ptep));
+	              : : "d" (STORAGE_ACC_KEY_MASK), "a" (*ptep));
 	return 1;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)