0001
0002 #ifndef _PGTABLE_NOPMD_H
0003 #define _PGTABLE_NOPMD_H
0004
0005 #ifndef __ASSEMBLY__
0006
0007 #include <asm-generic/pgtable-nopud.h>
0008
0009 struct mm_struct;
0010
0011 #define __PAGETABLE_PMD_FOLDED 1
0012
0013
0014
0015
0016
0017
0018 typedef struct { pud_t pud; } pmd_t;
0019
0020 #define PMD_SHIFT PUD_SHIFT
0021 #define PTRS_PER_PMD 1
0022 #define PMD_SIZE (1UL << PMD_SHIFT)
0023 #define PMD_MASK (~(PMD_SIZE-1))
0024
0025
0026
0027
0028
0029
0030 static inline int pud_none(pud_t pud) { return 0; }
0031 static inline int pud_bad(pud_t pud) { return 0; }
0032 static inline int pud_present(pud_t pud) { return 1; }
0033 static inline int pud_user(pud_t pud) { return 0; }
0034 static inline int pud_leaf(pud_t pud) { return 0; }
0035 static inline void pud_clear(pud_t *pud) { }
0036 #define pmd_ERROR(pmd) (pud_ERROR((pmd).pud))
0037
0038 #define pud_populate(mm, pmd, pte) do { } while (0)
0039
0040
0041
0042
0043
0044 #define set_pud(pudptr, pudval) set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval })
0045
0046 static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address)
0047 {
0048 return (pmd_t *)pud;
0049 }
0050 #define pmd_offset pmd_offset
0051
0052 #define pmd_val(x) (pud_val((x).pud))
0053 #define __pmd(x) ((pmd_t) { __pud(x) } )
0054
0055 #define pud_page(pud) (pmd_page((pmd_t){ pud }))
0056 #define pud_pgtable(pud) ((pmd_t *)(pmd_page_vaddr((pmd_t){ pud })))
0057
0058
0059
0060
0061
0062 #define pmd_alloc_one(mm, address) NULL
0063 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
0064 {
0065 }
0066 #define pmd_free_tlb(tlb, x, a) do { } while (0)
0067
0068 #undef pmd_addr_end
0069 #define pmd_addr_end(addr, end) (end)
0070
0071 #endif
0072
0073 #endif