From: Carsten Otte Implement pte_special pte bit for s390. s390 has trouble making pfn_valid do exactly what we'd like for VM_MIXEDMAP, because it has a very dynamic memory model, and it would have to take a semaphore and walk a list for each pfn_valid call. Use pte_special instead which is just a single bit test. Signed-off-by: Carsten Otte Signed-off-by: Nick Piggin Cc: Linus Torvalds Cc: Jared Hulbert Cc: Martin Schwidefsky Cc: Heiko Carstens --- include/asm-s390/pgtable.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Index: linux-2.6/include/asm-s390/pgtable.h =================================================================== --- linux-2.6.orig/include/asm-s390/pgtable.h +++ linux-2.6/include/asm-s390/pgtable.h @@ -219,6 +219,8 @@ extern char empty_zero_page[PAGE_SIZE]; /* Software bits in the page table entry */ #define _PAGE_SWT 0x001 /* SW pte type bit t */ #define _PAGE_SWX 0x002 /* SW pte type bit x */ +#define _PAGE_SPECIAL 0x004 /* SW associated with special page */ +#define __HAVE_ARCH_PTE_SPECIAL /* Six different types of pages. */ #define _PAGE_TYPE_EMPTY 0x400 @@ -512,7 +514,7 @@ static inline int pte_file(pte_t pte) static inline int pte_special(pte_t pte) { - return 0; + return (pte_val(pte) & _PAGE_SPECIAL); } #define __HAVE_ARCH_PTE_SAME @@ -670,6 +672,7 @@ static inline pte_t pte_mkyoung(pte_t pt static inline pte_t pte_mkspecial(pte_t pte) { + pte_val(pte) |= _PAGE_SPECIAL; return pte; } -- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org