Go to the documentation of this file.
4 #include <linux/const.h>
6 #if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
8 #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
10 #elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
11 # define PAGE_SHIFT 16
13 # error "unknown default kernel page size"
15 #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
16 #define PAGE_MASK (~(PAGE_SIZE-1))
21 #include <asm/types.h>
22 #include <asm/cache.h>
24 #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
25 #define copy_page(to,from) copy_user_page_asm((void *)(to), (void *)(from))
37 #define STRICT_MM_TYPECHECKS
38 #ifdef STRICT_MM_TYPECHECKS
39 typedef struct {
unsigned long pte; }
pte_t;
47 #define pte_val(x) ((x).pte)
49 #define pmd_val(x) ((x).pmd + 0)
50 #define pgd_val(x) ((x).pgd + 0)
51 #define pgprot_val(x) ((x).pgprot)
53 #define __pte(x) ((pte_t) { (x) } )
54 #define __pmd(x) ((pmd_t) { (x) } )
55 #define __pgd(x) ((pgd_t) { (x) } )
56 #define __pgprot(x) ((pgprot_t) { (x) } )
58 #define __pmd_val_set(x,n) (x).pmd = (n)
59 #define __pgd_val_set(x,n) (x).pgd = (n)
65 typedef unsigned long pte_t;
70 #define pte_val(x) (x)
71 #define pmd_val(x) (x)
72 #define pgd_val(x) (x)
73 #define pgprot_val(x) (x)
78 #define __pgprot(x) (x)
80 #define __pmd_val_set(x,n) (x) = (n)
81 #define __pgd_val_set(x,n) (x) = (n)
101 #define BITS_PER_PTE_ENTRY 3
102 #define BITS_PER_PMD_ENTRY 2
103 #define BITS_PER_PGD_ENTRY 2
105 #define BITS_PER_PTE_ENTRY 2
106 #define BITS_PER_PMD_ENTRY 2
107 #define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY
109 #define PGD_ENTRY_SIZE (1UL << BITS_PER_PGD_ENTRY)
110 #define PMD_ENTRY_SIZE (1UL << BITS_PER_PMD_ENTRY)
111 #define PTE_ENTRY_SIZE (1UL << BITS_PER_PTE_ENTRY)
113 #define LINUX_GATEWAY_SPACE 0
119 #define __PAGE_OFFSET (0x40000000)
121 #define __PAGE_OFFSET (0x10000000)
124 #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
127 #define GATEWAY_PAGE_SIZE 0x4000
132 #define KERNEL_BINARY_TEXT_START (__PAGE_OFFSET + 0x100000)
136 # define PA(x) ((x)-__PAGE_OFFSET)
137 # define VA(x) ((x)+__PAGE_OFFSET)
139 #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
140 #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
142 #ifndef CONFIG_DISCONTIGMEM
143 #define pfn_valid(pfn) ((pfn) < max_mapnr)
146 #ifdef CONFIG_HUGETLB_PAGE
147 #define HPAGE_SHIFT 22
148 #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT)
149 #define HPAGE_MASK (~(HPAGE_SIZE - 1))
150 #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
153 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
155 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
156 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
158 #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
159 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
165 #define PAGE0 ((struct zeropage *)__PAGE_OFFSET)