Go to the documentation of this file. 1 #ifndef _SPARC64_PAGE_H
2 #define _SPARC64_PAGE_H
4 #include <linux/const.h>
8 #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
9 #define PAGE_MASK (~(PAGE_SIZE-1))
15 #define DCACHE_ALIASING_POSSIBLE
18 #define HPAGE_SHIFT 22
20 #if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
21 #define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT)
22 #define HPAGE_MASK (~(HPAGE_SIZE - 1UL))
23 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
24 #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
29 #if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
31 extern void hugetlb_setup(
struct mm_struct *mm);
34 #define WANT_PAGE_VIRTUAL
37 #define clear_page(X) _clear_page((void *)(X))
40 #define copy_page(X,Y) memcpy((void *)(X), (void *)(Y), PAGE_SIZE)
50 #define STRICT_MM_TYPECHECKS
52 #ifdef STRICT_MM_TYPECHECKS
54 typedef struct {
unsigned long pte; }
pte_t;
60 #define pte_val(x) ((x).pte)
61 #define iopte_val(x) ((x).iopte)
62 #define pmd_val(x) ((x).pmd)
63 #define pgd_val(x) ((x).pgd)
64 #define pgprot_val(x) ((x).pgprot)
66 #define __pte(x) ((pte_t) { (x) } )
67 #define __iopte(x) ((iopte_t) { (x) } )
68 #define __pmd(x) ((pmd_t) { (x) } )
69 #define __pgd(x) ((pgd_t) { (x) } )
70 #define __pgprot(x) ((pgprot_t) { (x) } )
74 typedef unsigned long pte_t;
76 typedef unsigned int pmd_t;
77 typedef unsigned int pgd_t;
80 #define pte_val(x) (x)
81 #define iopte_val(x) (x)
82 #define pmd_val(x) (x)
83 #define pgd_val(x) (x)
84 #define pgprot_val(x) (x)
87 #define __iopte(x) (x)
90 #define __pgprot(x) (x)
96 #define TASK_UNMAPPED_BASE (test_thread_flag(TIF_32BIT) ? \
97 (_AC(0x0000000070000000,UL)) : \
98 (_AC(0xfffff80000000000,UL) + (1UL << 32UL)))
107 #define PAGE_OFFSET _AC(0xFFFFF80000000000,UL)
111 #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
112 #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
114 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
116 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr)>>PAGE_SHIFT)
118 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
120 #define virt_to_phys __pa
121 #define phys_to_virt __va
125 #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
126 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)