f98baaec0a1588c433c7221ebe77d62e120e0b2e
2 * arch/arm/include/asm/page.h
4 * Copyright (C) 1995-2003 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #ifndef _ASMARM_PAGE_H
11 #define _ASMARM_PAGE_H
13 /* PAGE_SHIFT determines the page size */
15 #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
16 #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
20 #include <linux/personality.h> /* For READ_IMPLIES_EXEC */
24 #include <asm/page-nommu.h>
34 * This section selects the correct set of functions for dealing with
35 * page-based copying and clearing for user space for the particular
36 * processor(s) we're building for.
38 * We have the following to choose from:
39 * v4wt - ARMv4 with writethrough cache, without minicache
40 * v4wb - ARMv4 with writeback cache, without minicache
41 * v4_mc - ARMv4 with minicache
48 #ifdef CONFIG_CPU_COPY_V4WT
56 #ifdef CONFIG_CPU_COPY_V4WB
64 #ifdef CONFIG_CPU_COPY_FEROCEON
68 # define _USER feroceon
72 #ifdef CONFIG_CPU_COPY_FA
80 #ifdef CONFIG_CPU_SA1100
88 #ifdef CONFIG_CPU_XSCALE
92 # define _USER xscale_mc
96 #ifdef CONFIG_CPU_XSC3
100 # define _USER xsc3_mc
104 #ifdef CONFIG_CPU_COPY_V6
105 # define MULTI_USER 1
108 #if !defined(_USER) && !defined(MULTI_USER)
109 #error Unknown user operations model
113 struct vm_area_struct
;
115 struct cpu_user_fns
{
116 void (*cpu_clear_user_highpage
)(struct page
*page
, unsigned long vaddr
);
117 void (*cpu_copy_user_highpage
)(struct page
*to
, struct page
*from
,
118 unsigned long vaddr
, struct vm_area_struct
*vma
);
122 extern struct cpu_user_fns cpu_user
;
124 #define __cpu_clear_user_highpage cpu_user.cpu_clear_user_highpage
125 #define __cpu_copy_user_highpage cpu_user.cpu_copy_user_highpage
129 #define __cpu_clear_user_highpage __glue(_USER,_clear_user_highpage)
130 #define __cpu_copy_user_highpage __glue(_USER,_copy_user_highpage)
132 extern void __cpu_clear_user_highpage(struct page
*page
, unsigned long vaddr
);
133 extern void __cpu_copy_user_highpage(struct page
*to
, struct page
*from
,
134 unsigned long vaddr
, struct vm_area_struct
*vma
);
137 #define clear_user_highpage(page,vaddr) \
138 __cpu_clear_user_highpage(page, vaddr)
140 #define __HAVE_ARCH_COPY_USER_HIGHPAGE
141 #define copy_user_highpage(to,from,vaddr,vma) \
142 __cpu_copy_user_highpage(to, from, vaddr, vma)
144 #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
145 extern void copy_page(void *to
, const void *from
);
147 #ifdef CONFIG_KUSER_HELPERS
148 #define __HAVE_ARCH_GATE_AREA 1
151 #ifdef CONFIG_ARM_LPAE
152 #include <asm/pgtable-3level-types.h>
154 #include <asm/pgtable-2level-types.h>
157 #endif /* CONFIG_MMU */
159 typedef struct page
*pgtable_t
;
161 #ifdef CONFIG_HAVE_ARCH_PFN_VALID
162 extern int pfn_valid(unsigned long);
165 #include <asm/memory.h>
167 #endif /* !__ASSEMBLY__ */
169 #define VM_DATA_DEFAULT_FLAGS \
170 (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
171 VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
173 #include <asm-generic/getorder.h>
This page took 0.034231 seconds and 5 git commands to generate.