1#ifndef _PGTABLE_NOPMD_H
2#define _PGTABLE_NOPMD_H
3
4#ifndef __ASSEMBLY__
5
6#include <asm-generic/pgtable-nopud.h>
7
8struct mm_struct;
9
10#define __PAGETABLE_PMD_FOLDED
11
12
13
14
15
16
17typedef struct { pud_t pud; } pmd_t;
18
19#define PMD_SHIFT PUD_SHIFT
20#define PTRS_PER_PMD 1
21#define PMD_SIZE (1UL << PMD_SHIFT)
22#define PMD_MASK (~(PMD_SIZE-1))
23
24
25
26
27
28
29static inline int pud_none(pud_t pud) { return 0; }
30static inline int pud_bad(pud_t pud) { return 0; }
31static inline int pud_present(pud_t pud) { return 1; }
32static inline void pud_clear(pud_t *pud) { }
33#define pmd_ERROR(pmd) (pud_ERROR((pmd).pud))
34
35#define pud_populate(mm, pmd, pte) do { } while (0)
36
37
38
39
40
41#define set_pud(pudptr, pudval) set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval })
42
43static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address)
44{
45 return (pmd_t *)pud;
46}
47
48#define pmd_val(x) (pud_val((x).pud))
49#define __pmd(x) ((pmd_t) { __pud(x) } )
50
51#define pud_page(pud) (pmd_page((pmd_t){ pud }))
52#define pud_page_vaddr(pud) (pmd_page_vaddr((pmd_t){ pud }))
53
54
55
56
57
58#define pmd_alloc_one(mm, address) NULL
59static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
60{
61}
62#define __pmd_free_tlb(tlb, x, a) do { } while (0)
63
64#undef pmd_addr_end
65#define pmd_addr_end(addr, end) (end)
66
67#endif
68
69#endif
70