diff options
author | Nick Piggin <npiggin@suse.de> | 2008-07-27 23:28:03 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-28 02:30:52 -0400 |
commit | 83ac6a1ed40bfbe185cf2bac5505d8d97aad8b1d (patch) | |
tree | f29cf4d1b3b6f859ead2598c9d741ffc5a56ec8b /include/asm-powerpc/pgtable-ppc64.h | |
parent | 124c27d375f72dd857eac27f2932f9f01df76bf4 (diff) |
powerpc/mm: Implement _PAGE_SPECIAL & pte_special() for 64-bit
Implement _PAGE_SPECIAL and pte_special() for 64-bit powerpc. This bit will
be used by the fast get_user_pages() to differenciate PTEs that correspond
to a valid struct page from special mappings that don't such as IO mappings
obtained via io_remap_pfn_ranges().
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Reviewed-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc/pgtable-ppc64.h')
-rw-r--r-- | include/asm-powerpc/pgtable-ppc64.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index ba8000352b9a..5fc78c0be302 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -245,7 +245,7 @@ static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW;} | |||
245 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;} | 245 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY;} |
246 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;} | 246 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED;} |
247 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;} | 247 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE;} |
248 | static inline int pte_special(pte_t pte) { return 0; } | 248 | static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; } |
249 | 249 | ||
250 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } | 250 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } |
251 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } | 251 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } |
@@ -265,7 +265,7 @@ static inline pte_t pte_mkyoung(pte_t pte) { | |||
265 | static inline pte_t pte_mkhuge(pte_t pte) { | 265 | static inline pte_t pte_mkhuge(pte_t pte) { |
266 | return pte; } | 266 | return pte; } |
267 | static inline pte_t pte_mkspecial(pte_t pte) { | 267 | static inline pte_t pte_mkspecial(pte_t pte) { |
268 | return pte; } | 268 | pte_val(pte) |= _PAGE_SPECIAL; return pte; } |
269 | static inline unsigned long pte_pgprot(pte_t pte) | 269 | static inline unsigned long pte_pgprot(pte_t pte) |
270 | { | 270 | { |
271 | return __pgprot(pte_val(pte)) & PAGE_PROT_BITS; | 271 | return __pgprot(pte_val(pte)) & PAGE_PROT_BITS; |