Go to the documentation of this file.
8 #ifndef __ASM_AVR32_PAGE_H
9 #define __ASM_AVR32_PAGE_H
11 #include <linux/const.h>
15 #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
16 #define PAGE_MASK (~(PAGE_SIZE-1))
17 #define PTE_MASK PAGE_MASK
21 #include <asm/addrspace.h>
26 #define clear_user_page(page, vaddr, pg) clear_page(page)
27 #define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
32 typedef struct {
unsigned long pte; }
pte_t;
33 typedef struct {
unsigned long pgd; }
pgd_t;
37 #define pte_val(x) ((x).pte)
38 #define pgd_val(x) ((x).pgd)
39 #define pgprot_val(x) ((x).pgprot)
41 #define __pte(x) ((pte_t) { (x) })
42 #define __pgd(x) ((pgd_t) { (x) })
43 #define __pgprot(x) ((pgprot_t) { (x) })
54 asm(
"clz %0, %1" :
"=r"(lz) :
"r"(size));
66 #define PAGE_OFFSET (0x80000000UL)
76 #define __pa(x) PHYSADDR(x)
77 #define __va(x) ((void *)(P1SEGADDR(x)))
79 #define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT)
81 #define phys_to_page(phys) (pfn_to_page(phys >> PAGE_SHIFT))
82 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
84 #ifndef CONFIG_NEED_MULTIPLE_NODES
86 #define PHYS_PFN_OFFSET (CONFIG_PHYS_OFFSET >> PAGE_SHIFT)
88 #define pfn_to_page(pfn) (mem_map + ((pfn) - PHYS_PFN_OFFSET))
89 #define page_to_pfn(page) ((unsigned long)((page) - mem_map) + PHYS_PFN_OFFSET)
90 #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
93 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
94 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
96 #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
97 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
102 #define HIGHMEM_START 0x20000000UL