blob: 928fd66b12712241d100c5f4c9d3a857b9eabf1b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _4LEVEL_FIXUP_H
2#define _4LEVEL_FIXUP_H
3
4#define __ARCH_HAS_4LEVEL_HACK
5#define __PAGETABLE_PUD_FOLDED
6
Kirill A. Shutemov4155b8e2015-02-11 15:26:44 -08007#define PUD_SHIFT PGDIR_SHIFT
Linus Torvalds1da177e2005-04-16 15:20:36 -07008#define PUD_SIZE PGDIR_SIZE
9#define PUD_MASK PGDIR_MASK
10#define PTRS_PER_PUD 1
11
12#define pud_t pgd_t
13
Hugh Dickins1bb36302005-10-29 18:16:22 -070014#define pmd_alloc(mm, pud, address) \
15 ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
16 NULL: pmd_offset(pud, address))
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#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 McCracken46a82b22006-09-25 23:31:48 -070024#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 Torvalds1da177e2005-04-16 15:20:36 -070028
29#undef pud_free_tlb
Benjamin Herrenschmidt9e1b32c2009-07-22 15:44:28 +100030#define pud_free_tlb(tlb, x, addr) do { } while (0)
Benjamin Herrenschmidt5e541972008-02-04 22:29:14 -080031#define pud_free(mm, x) do { } while (0)
Benjamin Herrenschmidt9e1b32c2009-07-22 15:44:28 +100032#define __pud_free_tlb(tlb, x, addr) do { } while (0)
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
34#undef pud_addr_end
35#define pud_addr_end(addr, end) (end)
36
Kirill A. Shutemov505a60e2017-03-09 17:24:03 +030037#include <asm-generic/5level-fixup.h>
38
Linus Torvalds1da177e2005-04-16 15:20:36 -070039#endif