Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _4LEVEL_FIXUP_H |
| 2 | #define _4LEVEL_FIXUP_H |
| 3 | |
| 4 | #define __ARCH_HAS_4LEVEL_HACK |
| 5 | #define __PAGETABLE_PUD_FOLDED |
| 6 | |
| 7 | #define PUD_SIZE PGDIR_SIZE |
| 8 | #define PUD_MASK PGDIR_MASK |
| 9 | #define PTRS_PER_PUD 1 |
| 10 | |
| 11 | #define pud_t pgd_t |
| 12 | |
Hugh Dickins | 1bb3630 | 2005-10-29 18:16:22 -0700 | [diff] [blame] | 13 | #define pmd_alloc(mm, pud, address) \ |
| 14 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \ |
| 15 | NULL: pmd_offset(pud, address)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
| 17 | #define pud_alloc(mm, pgd, address) (pgd) |
| 18 | #define pud_offset(pgd, start) (pgd) |
| 19 | #define pud_none(pud) 0 |
| 20 | #define pud_bad(pud) 0 |
| 21 | #define pud_present(pud) 1 |
| 22 | #define pud_ERROR(pud) do { } while (0) |
| 23 | #define pud_clear(pud) pgd_clear(pud) |
Dave McCracken | 46a82b2 | 2006-09-25 23:31:48 -0700 | [diff] [blame] | 24 | #define pud_val(pud) pgd_val(pud) |
| 25 | #define pud_populate(mm, pud, pmd) pgd_populate(mm, pud, pmd) |
| 26 | #define pud_page(pud) pgd_page(pud) |
| 27 | #define pud_page_vaddr(pud) pgd_page_vaddr(pud) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | |
| 29 | #undef pud_free_tlb |
| 30 | #define pud_free_tlb(tlb, x) do { } while (0) |
Benjamin Herrenschmidt | 5e54197 | 2008-02-04 22:29:14 -0800 | [diff] [blame] | 31 | #define pud_free(mm, x) do { } while (0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | #define __pud_free_tlb(tlb, x) do { } while (0) |
| 33 | |
| 34 | #undef pud_addr_end |
| 35 | #define pud_addr_end(addr, end) (end) |
| 36 | |
| 37 | #endif |