]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers-pagesize.patch
This commit was manufactured by cvs2git to create branch 'KERNEL'.
[packages/linux-libc-headers.git] / linux-libc-headers-pagesize.patch
1 --- linux-2.6.20/include/asm-alpha/page.h.orig  2007-02-04 19:44:54.000000000 +0100
2 +++ linux-2.6.20/include/asm-alpha/page.h       2007-04-02 21:58:18.576624812 +0200
3 @@ -1,15 +1,15 @@
4  #ifndef _ALPHA_PAGE_H
5  #define _ALPHA_PAGE_H
6  
7 -#ifdef __KERNEL__
8 -
9 -#include <asm/pal.h>
10 -
11  /* PAGE_SHIFT determines the page size */
12  #define PAGE_SHIFT     13
13  #define PAGE_SIZE      (1UL << PAGE_SHIFT)
14  #define PAGE_MASK      (~(PAGE_SIZE-1))
15  
16 +#ifdef __KERNEL__
17 +
18 +#include <asm/pal.h>
19 +
20  #ifndef __ASSEMBLY__
21  
22  #define STRICT_MM_TYPECHECKS
23 --- linux-2.6.20/include/asm-arm/page.h.orig    2007-02-04 19:44:54.000000000 +0100
24 +++ linux-2.6.20/include/asm-arm/page.h 2007-04-02 21:58:44.914125701 +0200
25 @@ -11,13 +11,13 @@
26  #define _ASMARM_PAGE_H
27  
28  
29 -#ifdef __KERNEL__
30 -
31  /* PAGE_SHIFT determines the page size */
32  #define PAGE_SHIFT             12
33  #define PAGE_SIZE              (1UL << PAGE_SHIFT)
34  #define PAGE_MASK              (~(PAGE_SIZE-1))
35  
36 +#ifdef __KERNEL__
37 +
38  /* to align the pointer to the (next) page boundary */
39  #define PAGE_ALIGN(addr)       (((addr)+PAGE_SIZE-1)&PAGE_MASK)
40  
41 --- linux-2.6.20/include/asm-avr32/page.h.orig  2007-02-04 19:44:54.000000000 +0100
42 +++ linux-2.6.20/include/asm-avr32/page.h       2007-04-02 21:59:35.677018513 +0200
43 @@ -8,8 +8,6 @@
44  #ifndef __ASM_AVR32_PAGE_H
45  #define __ASM_AVR32_PAGE_H
46  
47 -#ifdef __KERNEL__
48 -
49  /* PAGE_SHIFT determines the page size */
50  #define PAGE_SHIFT     12
51  #ifdef __ASSEMBLY__
52 @@ -18,6 +16,9 @@
53  #define PAGE_SIZE      (1UL << PAGE_SHIFT)
54  #endif
55  #define PAGE_MASK      (~(PAGE_SIZE-1))
56 +
57 +#ifdef __KERNEL__
58 +
59  #define PTE_MASK       PAGE_MASK
60  
61  #ifndef __ASSEMBLY__
62 --- linux-2.6.20/include/asm-cris/page.h.orig   2007-02-04 19:44:54.000000000 +0100
63 +++ linux-2.6.20/include/asm-cris/page.h        2007-04-02 21:59:53.650042737 +0200
64 @@ -1,10 +1,6 @@
65  #ifndef _CRIS_PAGE_H
66  #define _CRIS_PAGE_H
67  
68 -#ifdef __KERNEL__
69 -
70 -#include <asm/arch/page.h>
71 -
72  /* PAGE_SHIFT determines the page size */
73  #define PAGE_SHIFT     13
74  #ifndef __ASSEMBLY__
75 @@ -14,6 +10,10 @@
76  #endif
77  #define PAGE_MASK      (~(PAGE_SIZE-1))
78  
79 +#ifdef __KERNEL__
80 +
81 +#include <asm/arch/page.h>
82 +
83  #define clear_page(page)        memset((void *)(page), 0, PAGE_SIZE)
84  #define copy_page(to,from)      memcpy((void *)(to), (void *)(from), PAGE_SIZE)
85  
86 --- linux-2.6.20/include/asm-h8300/page.h.orig  2007-02-04 19:44:54.000000000 +0100
87 +++ linux-2.6.20/include/asm-h8300/page.h       2007-04-02 22:00:40.604718532 +0200
88 @@ -1,14 +1,14 @@
89  #ifndef _H8300_PAGE_H
90  #define _H8300_PAGE_H
91  
92 -#ifdef __KERNEL__
93 -
94  /* PAGE_SHIFT determines the page size */
95  
96  #define PAGE_SHIFT     (12)
97  #define PAGE_SIZE      (1UL << PAGE_SHIFT)
98  #define PAGE_MASK      (~(PAGE_SIZE-1))
99  
100 +#ifdef __KERNEL__
101 +
102  #include <asm/setup.h>
103  
104  #ifndef __ASSEMBLY__
105 --- linux-2.6.20/include/asm-ia64/page.h.orig   2007-02-04 19:44:54.000000000 +0100
106 +++ linux-2.6.20/include/asm-ia64/page.h        2007-04-02 22:04:08.544568348 +0200
107 @@ -7,7 +7,26 @@
108   *     David Mosberger-Tang <davidm@hpl.hp.com>
109   */
110  
111 -# ifdef __KERNEL__
112 +# ifndef __KERNEL__
113 +
114 +#include <unistd.h>
115 +
116 +#define PAGE_SIZE (getpagesize())
117 +static __inline__ int __getpageshift()
118 +{
119 +    int pagesize = getpagesize();
120 +#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
121 +    return (__builtin_clz(pagesize) ^ 31);
122 +#else
123 +    register int pageshift = -1;
124 +    while (pagesize) { pagesize >>= 1; pageshift++; }
125 +    return pageshift;
126 +#endif
127 +}
128 +#define PAGE_SHIFT (__getpageshift())
129 +#define PAGE_MASK    (~(PAGE_SIZE-1))
130 +
131 +# else
132  
133  #include <asm/intrinsics.h>
134  #include <asm/types.h>
135 --- linux-2.6.20/include/asm-mips/page.h.orig   2007-04-02 22:05:30.645246999 +0200
136 +++ linux-2.6.20/include/asm-mips/page.h        2007-04-02 22:05:16.792457574 +0200
137 @@ -10,7 +10,26 @@
138  #define _ASM_PAGE_H
139  
140  
141 -#ifdef __KERNEL__
142 +#ifndef __KERNEL__
143 +
144 +#include <unistd.h>
145 +
146 +#define PAGE_SIZE (getpagesize())
147 +static __inline__ int __getpageshift()
148 +{
149 +    int pagesize = getpagesize();
150 +#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
151 +    return (__builtin_clz(pagesize) ^ 31);
152 +#else
153 +    register int pageshift = -1;
154 +    while (pagesize) { pagesize >>= 1; pageshift++; }
155 +    return pageshift;
156 +#endif
157 +}
158 +#define PAGE_SHIFT (__getpageshift())
159 +#define PAGE_MASK    (~(PAGE_SIZE-1))
160 +
161 +#else
162  
163  #include <spaces.h>
164  
165 --- linux-2.6.20/include/asm-powerpc/page.h.orig        2007-02-04 19:44:54.000000000 +0100
166 +++ linux-2.6.20/include/asm-powerpc/page.h     2007-04-02 22:08:03.321947549 +0200
167 @@ -10,7 +10,26 @@
168   * 2 of the License, or (at your option) any later version.
169   */
170  
171 -#ifdef __KERNEL__
172 +#ifndef __KERNEL__
173 +
174 +#include <unistd.h>
175 +
176 +#define PAGE_SIZE (getpagesize())
177 +static __inline__ int __getpageshift()
178 +{
179 +    int pagesize = getpagesize();
180 +#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
181 +    return (__builtin_clz(pagesize) ^ 31);
182 +#else
183 +    register int pageshift = -1;
184 +    while (pagesize) { pagesize >>= 1; pageshift++; }
185 +    return pageshift;
186 +#endif
187 +}
188 +#define PAGE_SHIFT (__getpageshift())
189 +#define PAGE_MASK    (~(PAGE_SIZE-1))
190 +
191 +#else
192  #include <asm/asm-compat.h>
193  #include <asm/kdump.h>
194  
195 --- linux-2.6.20/include/asm-sparc/page.h.orig  2007-02-04 19:44:54.000000000 +0100
196 +++ linux-2.6.20/include/asm-sparc/page.h       2007-04-02 22:09:00.405200538 +0200
197 @@ -8,7 +8,26 @@
198  #ifndef _SPARC_PAGE_H
199  #define _SPARC_PAGE_H
200  
201 -#ifdef __KERNEL__
202 +#ifndef __KERNEL__
203 +
204 +#include <unistd.h>
205 +
206 +#define PAGE_SIZE (getpagesize())
207 +static __inline__ int __getpageshift()
208 +{
209 +    int pagesize = getpagesize();
210 +#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
211 +    return (__builtin_clz(pagesize) ^ 31);
212 +#else
213 +    register int pageshift = -1;
214 +    while (pagesize) { pagesize >>= 1; pageshift++; }
215 +    return pageshift;
216 +#endif
217 +}
218 +#define PAGE_SHIFT (__getpageshift())
219 +#define PAGE_MASK    (~(PAGE_SIZE-1))
220 +
221 +#else
222  
223  #ifdef CONFIG_SUN4
224  #define PAGE_SHIFT   13
225 --- linux-2.6.20/include/asm-sparc64/page.h.orig        2007-02-04 19:44:54.000000000 +0100
226 +++ linux-2.6.20/include/asm-sparc64/page.h     2007-04-02 22:09:30.722928247 +0200
227 @@ -3,7 +3,26 @@
228  #ifndef _SPARC64_PAGE_H
229  #define _SPARC64_PAGE_H
230  
231 -#ifdef __KERNEL__
232 +#ifndef __KERNEL__
233 +
234 +#include <unistd.h>
235 +
236 +#define PAGE_SIZE (getpagesize())
237 +static __inline__ int __getpageshift()
238 +{
239 +    int pagesize = getpagesize();
240 +#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
241 +    return (__builtin_clz(pagesize) ^ 31);
242 +#else
243 +    register int pageshift = -1;
244 +    while (pagesize) { pagesize >>= 1; pageshift++; }
245 +    return pageshift;
246 +#endif
247 +}
248 +#define PAGE_SHIFT (__getpageshift())
249 +#define PAGE_MASK    (~(PAGE_SIZE-1))
250 +
251 +#else
252  
253  #include <asm/const.h>
254  
This page took 0.0513 seconds and 4 git commands to generate.