diff options
Diffstat (limited to 'include/asm-um/pgtable-2level.h')
-rw-r--r-- | include/asm-um/pgtable-2level.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/include/asm-um/pgtable-2level.h b/include/asm-um/pgtable-2level.h index 9b3abc01d60e..ffe017f6b64b 100644 --- a/include/asm-um/pgtable-2level.h +++ b/include/asm-um/pgtable-2level.h | |||
@@ -35,35 +35,8 @@ | |||
35 | static inline int pgd_newpage(pgd_t pgd) { return 0; } | 35 | static inline int pgd_newpage(pgd_t pgd) { return 0; } |
36 | static inline void pgd_mkuptodate(pgd_t pgd) { } | 36 | static inline void pgd_mkuptodate(pgd_t pgd) { } |
37 | 37 | ||
38 | #define pte_present(x) (pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
39 | |||
40 | static inline pte_t pte_mknewprot(pte_t pte) | ||
41 | { | ||
42 | pte_val(pte) |= _PAGE_NEWPROT; | ||
43 | return(pte); | ||
44 | } | ||
45 | |||
46 | static inline pte_t pte_mknewpage(pte_t pte) | ||
47 | { | ||
48 | pte_val(pte) |= _PAGE_NEWPAGE; | ||
49 | return(pte); | ||
50 | } | ||
51 | |||
52 | static inline void set_pte(pte_t *pteptr, pte_t pteval) | ||
53 | { | ||
54 | /* If it's a swap entry, it needs to be marked _PAGE_NEWPAGE so | ||
55 | * fix_range knows to unmap it. _PAGE_NEWPROT is specific to | ||
56 | * mapped pages. | ||
57 | */ | ||
58 | *pteptr = pte_mknewpage(pteval); | ||
59 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); | ||
60 | } | ||
61 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
62 | |||
63 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) | 38 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) |
64 | 39 | ||
65 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
66 | #define pte_none(x) !(pte_val(x) & ~_PAGE_NEWPAGE) | ||
67 | #define pte_pfn(x) phys_to_pfn(pte_val(x)) | 40 | #define pte_pfn(x) phys_to_pfn(pte_val(x)) |
68 | #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) | 41 | #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) |
69 | #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) | 42 | #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) |