4level-fixup.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _4LEVEL_FIXUP_H
  2. #define _4LEVEL_FIXUP_H
  3. #define __ARCH_HAS_4LEVEL_HACK
  4. #define __PAGETABLE_PUD_FOLDED
  5. #define PUD_SIZE PGDIR_SIZE
  6. #define PUD_MASK PGDIR_MASK
  7. #define PTRS_PER_PUD 1
  8. #define pud_t pgd_t
  9. #define pmd_alloc(mm, pud, address) \
  10. ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
  11. NULL: pmd_offset(pud, address))
  12. #define pud_alloc(mm, pgd, address) (pgd)
  13. #define pud_offset(pgd, start) (pgd)
  14. #define pud_none(pud) 0
  15. #define pud_bad(pud) 0
  16. #define pud_present(pud) 1
  17. #define pud_ERROR(pud) do { } while (0)
  18. #define pud_clear(pud) pgd_clear(pud)
  19. #define pud_val(pud) pgd_val(pud)
  20. #define pud_populate(mm, pud, pmd) pgd_populate(mm, pud, pmd)
  21. #define pud_page(pud) pgd_page(pud)
  22. #define pud_page_vaddr(pud) pgd_page_vaddr(pud)
  23. #undef pud_free_tlb
  24. #define pud_free_tlb(tlb, x, addr) do { } while (0)
  25. #define pud_free(mm, x) do { } while (0)
  26. #define __pud_free_tlb(tlb, x, addr) do { } while (0)
  27. #undef pud_addr_end
  28. #define pud_addr_end(addr, end) (end)
  29. #endif