Go to the documentation of this file.
24 #include <linux/const.h>
28 #ifdef CONFIG_PAGE_SIZE_4KB
30 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_4KB
33 #ifdef CONFIG_PAGE_SIZE_16KB
35 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_16KB
38 #ifdef CONFIG_PAGE_SIZE_64KB
40 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_64KB
43 #ifdef CONFIG_PAGE_SIZE_256KB
45 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_256KB
48 #ifdef CONFIG_PAGE_SIZE_1MB
50 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_1MB
58 #ifdef CONFIG_HUGETLB_PAGE
59 #define HPAGE_SHIFT 22
60 #define HPAGE_SIZE (1UL << HPAGE_SHIFT)
61 #define HPAGE_MASK (~(HPAGE_SIZE-1))
62 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT)
63 #define HVM_HUGEPAGE_SIZE 0x5
66 #define PAGE_SIZE (1UL << PAGE_SHIFT)
67 #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
82 typedef struct {
unsigned long pte; }
pte_t;
83 typedef struct {
unsigned long pgd; }
pgd_t;
87 #define pte_val(x) ((x).pte)
88 #define pgd_val(x) ((x).pgd)
89 #define pgprot_val(x) ((x).pgprot)
90 #define __pte(x) ((pte_t) { (x) })
91 #define __pgd(x) ((pgd_t) { (x) })
92 #define __pgprot(x) ((pgprot_t) { (x) })
99 #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
100 #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
106 #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(__pa(kaddr)))
109 #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
110 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
112 #define pfn_valid(pfn) ((pfn) < max_mapnr)
113 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
121 "1: { dczeroa(%0);\n"
122 " %0 = add(%0,#32); }:endloop0\n"
125 :
"lc0",
"sa0",
"memory"
129 #define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
134 #define clear_user_page(page, vaddr, pg) clear_page(page)
135 #define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
141 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
148 #define kern_addr_valid(addr) (1)