diff options
author | Michal Simek <monstr@monstr.eu> | 2009-07-15 07:39:35 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-07-27 01:39:54 -0400 |
commit | f14d6f7c31c73a902a6b567dc719128e74603902 (patch) | |
tree | 7c073120349a11abf2c9bfb133c63efd6541373d /arch/microblaze/include/asm/pgtable.h | |
parent | 7bcb63b21327427b130edeb6e6ad44ee260b3043 (diff) |
microblaze: Add _PAGE_FILE macros to pgtable.h
We need to define _PAGE_FILE macro and change pte
functions. Microblaze use the same MMU as PowerPC
that's why we define _PAGE_FILE in the same style.
This change fixed remap_file_pages01 LTP test.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/include/asm/pgtable.h')
-rw-r--r-- | arch/microblaze/include/asm/pgtable.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h index 4c57a586a989..cc3a4dfc3eaa 100644 --- a/arch/microblaze/include/asm/pgtable.h +++ b/arch/microblaze/include/asm/pgtable.h | |||
@@ -185,6 +185,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | |||
185 | 185 | ||
186 | /* Definitions for MicroBlaze. */ | 186 | /* Definitions for MicroBlaze. */ |
187 | #define _PAGE_GUARDED 0x001 /* G: page is guarded from prefetch */ | 187 | #define _PAGE_GUARDED 0x001 /* G: page is guarded from prefetch */ |
188 | #define _PAGE_FILE 0x001 /* when !present: nonlinear file mapping */ | ||
188 | #define _PAGE_PRESENT 0x002 /* software: PTE contains a translation */ | 189 | #define _PAGE_PRESENT 0x002 /* software: PTE contains a translation */ |
189 | #define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */ | 190 | #define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */ |
190 | #define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */ | 191 | #define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */ |
@@ -320,8 +321,7 @@ static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | |||
320 | static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; } | 321 | static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; } |
321 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 322 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
322 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 323 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
323 | /* FIXME */ | 324 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
324 | static inline int pte_file(pte_t pte) { return 0; } | ||
325 | 325 | ||
326 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } | 326 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } |
327 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } | 327 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } |
@@ -488,7 +488,7 @@ static inline pmd_t *pmd_offset(pgd_t *dir, unsigned long address) | |||
488 | /* Encode and decode a nonlinear file mapping entry */ | 488 | /* Encode and decode a nonlinear file mapping entry */ |
489 | #define PTE_FILE_MAX_BITS 29 | 489 | #define PTE_FILE_MAX_BITS 29 |
490 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) | 490 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) |
491 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) }) | 491 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) |
492 | 492 | ||
493 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 493 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
494 | 494 | ||