Go to the documentation of this file.
5 #include <linux/const.h>
9 #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
10 #define PAGE_MASK (~(PAGE_SIZE-1))
12 #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
13 #define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE)
15 #define clear_user_page(page, vaddr, pg) clear_page(page)
16 #define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
18 #define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
19 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr)
20 #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
26 typedef struct {
unsigned long pte; }
pte_t;
27 typedef struct {
unsigned long pgd; }
pgd_t;
32 #define pte_val(x) ((x).pte)
33 #define pgd_val(x) ((x).pgd)
34 #define pgprot_val(x) ((x).pgprot)
36 #define __pte(x) ((pte_t) { (x) } )
37 #define __pgd(x) ((pgd_t) { (x) } )
38 #define __pgprot(x) ((pgprot_t) { (x) } )
42 #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
43 #define pfn_valid(pfn) (((pfn) - (PAGE_OFFSET >> PAGE_SHIFT)) < max_mapnr)
53 #define virt_to_page(kaddr) (mem_map + (((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT))
54 #define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
55 #define virt_addr_valid(kaddr) pfn_valid((unsigned)(kaddr) >> PAGE_SHIFT)
61 #define page_to_phys(page) __pa((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
67 #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
68 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)