Go to the documentation of this file.
4 #include <linux/const.h>
9 #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
10 #define PAGE_MASK (~(PAGE_SIZE-1))
14 #define STRICT_MM_TYPECHECKS
17 #define clear_user_page(page, vaddr, pg) clear_page(page)
19 #define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
20 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vmaddr)
21 #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
23 extern void copy_page(
void * _to,
void * _from);
24 #define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
26 #ifdef STRICT_MM_TYPECHECKS
35 #define pte_val(x) ((x).pte)
36 #define pmd_val(x) ((x).pmd)
37 #define pgd_val(x) ((x).pgd)
38 #define pgprot_val(x) ((x).pgprot)
40 #define __pte(x) ((pte_t) { (x) } )
41 #define __pmd(x) ((pmd_t) { (x) } )
42 #define __pgd(x) ((pgd_t) { (x) } )
43 #define __pgprot(x) ((pgprot_t) { (x) } )
49 typedef unsigned long pte_t;
50 typedef unsigned long pmd_t;
51 typedef unsigned long pgd_t;
54 #define pte_val(x) (x)
55 #define pmd_val(x) (x)
56 #define pgd_val(x) (x)
57 #define pgprot_val(x) (x)
61 #define __pgprot(x) (x)
67 #ifdef USE_48_BIT_KSEG
68 #define PAGE_OFFSET 0xffff800000000000UL
70 #define PAGE_OFFSET 0xfffffc0000000000UL
75 #ifdef USE_48_BIT_KSEG
76 #define PAGE_OFFSET 0xffff800000000000
78 #define PAGE_OFFSET 0xfffffc0000000000
83 #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
84 #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
85 #ifndef CONFIG_DISCONTIGMEM
86 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
88 #define pfn_valid(pfn) ((pfn) < max_mapnr)
89 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
92 #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
93 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)