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