Root/
1 | #ifndef _PGTABLE_NOPMD_H |
2 | #define _PGTABLE_NOPMD_H |
3 | |
4 | #ifndef __ASSEMBLY__ |
5 | |
6 | #include <asm-generic/pgtable-nopud.h> |
7 | |
8 | struct mm_struct; |
9 | |
10 | #define __PAGETABLE_PMD_FOLDED |
11 | |
12 | /* |
13 | * Having the pmd type consist of a pud gets the size right, and allows |
14 | * us to conceptually access the pud entry that this pmd is folded into |
15 | * without casting. |
16 | */ |
17 | typedef 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 | * The "pud_xxx()" functions here are trivial for a folded two-level |
26 | * setup: the pmd is never bad, and a pmd always exists (as it's folded |
27 | * into the pud entry) |
28 | */ |
29 | static inline int pud_none(pud_t pud) { return 0; } |
30 | static inline int pud_bad(pud_t pud) { return 0; } |
31 | static inline int pud_present(pud_t pud) { return 1; } |
32 | static 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 | * (pmds are folded into puds so this doesn't get actually called, |
39 | * but the define is needed for a generic inline function.) |
40 | */ |
41 | #define set_pud(pudptr, pudval) set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval }) |
42 | |
43 | static 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 | * allocating and freeing a pmd is trivial: the 1-entry pmd is |
56 | * inside the pud, so has no extra memory associated with it. |
57 | */ |
58 | #define pmd_alloc_one(mm, address) NULL |
59 | static 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 /* __ASSEMBLY__ */ |
68 | |
69 | #endif /* _PGTABLE_NOPMD_H */ |
70 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9