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

Next file: linux-2.4.22/include/asm-s390/qdio.h
Previous file: linux-2.4.22/include/asm-s390/page.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/include/asm-s390/pgtable.h linux-2.4.22/include/asm-s390/pgtable.h
@@ -156,7 +156,6 @@
 
 /* Bits in the page table entry */
 #define _PAGE_PRESENT   0x001          /* Software                         */
-#define _PAGE_MKCLEAN   0x002          /* Software                         */
 #define _PAGE_ISCLEAN   0x004	       /* Software			   */
 #define _PAGE_RO        0x200          /* HW read-only                     */
 #define _PAGE_INVALID   0x400          /* HW invalid                       */
@@ -230,28 +229,9 @@
  */
 extern inline void set_pte(pte_t *pteptr, pte_t pteval)
 {
-	if ((pte_val(pteval) & (_PAGE_MKCLEAN|_PAGE_INVALID))
-	    == _PAGE_MKCLEAN) 
-	{
-		pte_val(pteval) &= ~_PAGE_MKCLEAN;
-               
-		asm volatile ("sske %0,%1" 
-				: : "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))
 
 /*
@@ -362,7 +342,7 @@
 	 * sske instruction is slow. It is faster to let the
 	 * next instruction set the dirty bit.
 	 */
-	pte_val(pte) &= ~(_PAGE_MKCLEAN | _PAGE_ISCLEAN);
+	pte_val(pte) &= ~_PAGE_ISCLEAN;
 	return pte;
 }
 
@@ -404,7 +384,7 @@
 	/* We can't clear the changed bit atomically. For now we
          * clear (!) the page referenced bit. */
 	asm volatile ("sske %0,%1" 
-	              : : "d" (STORAGE_ACC_KEY_MASK), "a" (*ptep));
+	              : : "d" (get_storage_key()), "a" (*ptep));
 	return 1;
 }
 
@@ -443,15 +423,15 @@
 	pgprot_t __pgprot = (pgprot);					  \
 	unsigned long __physpage = __pa((__page-mem_map) << PAGE_SHIFT);  \
 	pte_t __pte = mk_pte_phys(__physpage, __pgprot);                  \
-	                                                                  \
-	if (!(pgprot_val(__pgprot) & _PAGE_ISCLEAN)) {			  \
-		int __users = !!__page->buffers + !!__page->mapping;      \
-		if (__users + page_count(__page) == 1)                    \
-			pte_val(__pte) |= _PAGE_MKCLEAN;                  \
-	}								  \
 	__pte;                                                            \
 })
 
+#define arch_set_page_uptodate(__page)					  \
+	do {								  \
+		asm volatile ("sske %0,%1" : : "d" (get_storage_key()),	  \
+			      "a" (__pa((__page-mem_map) << PAGE_SHIFT)));\
+	} while (0)
+
 #define pte_page(x) (mem_map+(unsigned long)((pte_val(x) >> PAGE_SHIFT)))
 
 #define pmd_page(pmd) \

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