From: Nick Piggin Date: Mon, 28 Apr 2008 09:13:03 +0000 (-0700) Subject: s390: implement pte special bit X-Git-Tag: firefly_0821_release~21431 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a08cb629f546d1cecebe955392197f226e58dbe1;p=firefly-linux-kernel-4.4.55.git s390: implement pte special bit Convert XIP to support non-struct page backed memory, using VM_MIXEDMAP for the user mappings. This requires the get_xip_page API to be changed to an address based one. Improve the API layering a little bit too, while we're here. This is required in order to support XIP filesystems on memory that isn't backed with struct page (but memory with struct page is still supported too). Signed-off-by: Nick Piggin Acked-by: Carsten Otte Cc: Jared Hulbert Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 76e8a7904e8a..f8347ce9c5a1 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -220,6 +220,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 @@ -520,7 +522,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 @@ -722,6 +724,7 @@ static inline pte_t pte_mkyoung(pte_t pte) static inline pte_t pte_mkspecial(pte_t pte) { + pte_val(pte) |= _PAGE_SPECIAL; return pte; }