]> git.wh0rd.org - ICEs.git/blame - 152840/ice.i.0
initial import
[ICEs.git] / 152840 / ice.i.0
CommitLineData
45516216 1// /usr/libexec/gcc/sh4-unknown-linux-gnu/4.1.1/cc1 -quiet -nostdinc -Iinclude -Iinclude2 -I/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include -I/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc -Idrivers/mmc -D__KERNEL__ -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(mmc_block) -DKBUILD_MODNAME=KBUILD_STR(mmc_block) -isystem /usr/lib/gcc/sh4-unknown-linux-gnu/4.1.1/include -include include/linux/autoconf.h -MD drivers/mmc/.mmc_block.o.d /mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c -quiet -dumpbase mmc_block.c -ml -m4 -m4-nofpu -auxbase-strip drivers/mmc/mmc_block.o -Os -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-aliasing -fno-common -fomit-frame-pointer -fno-stack-protector -o - -frandom-seed=0
2# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c"
3# 1 "<built-in>"
4# 1 "<command line>"
5# 1 "./include/linux/autoconf.h" 1
6# 1 "<command line>" 2
7# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c"
8# 19 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c"
9# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/moduleparam.h" 1
10
11
12
13# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/init.h" 1
14
15
16
17# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/compiler.h" 1
18# 42 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/compiler.h"
19# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/compiler-gcc4.h" 1
20
21
22
23# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/compiler-gcc.h" 1
24# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/compiler-gcc4.h" 2
25# 43 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/compiler.h" 2
26# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/init.h" 2
27# 63 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/init.h"
28typedef int (*initcall_t)(void);
29typedef void (*exitcall_t)(void);
30
31extern initcall_t __con_initcall_start[], __con_initcall_end[];
32extern initcall_t __security_initcall_start[], __security_initcall_end[];
33
34
35extern char saved_command_line[];
36extern unsigned int reset_devices;
37
38
39extern void setup_arch(char **);
40# 114 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/init.h"
41struct obs_kernel_param {
42 const char *str;
43 int (*setup_func)(char *);
44 int early;
45};
46# 149 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/init.h"
47void __attribute__ ((__section__ (".init.text"))) parse_early_param(void);
48# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/moduleparam.h" 2
49# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/stringify.h" 1
50# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/moduleparam.h" 2
51# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h" 1
52# 10 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h"
53# 1 "/usr/lib/gcc/sh4-unknown-linux-gnu/4.1.1/include/stdarg.h" 1 3 4
54# 43 "/usr/lib/gcc/sh4-unknown-linux-gnu/4.1.1/include/stdarg.h" 3 4
55typedef __builtin_va_list __gnuc_va_list;
56# 105 "/usr/lib/gcc/sh4-unknown-linux-gnu/4.1.1/include/stdarg.h" 3 4
57typedef __gnuc_va_list va_list;
58# 11 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h" 2
59# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/linkage.h" 1
60
61
62
63# 1 "include2/asm/linkage.h" 1
64# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/linkage.h" 2
65# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h" 2
66# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/stddef.h" 1
67# 15 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/stddef.h"
68enum {
69 false = 0,
70 true = 1
71};
72# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h" 2
73# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/types.h" 1
74# 14 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/types.h"
75# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/posix_types.h" 1
76# 36 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/posix_types.h"
77typedef struct {
78 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
79} __kernel_fd_set;
80
81
82typedef void (*__kernel_sighandler_t)(int);
83
84
85typedef int __kernel_key_t;
86typedef int __kernel_mqd_t;
87
88# 1 "include2/asm/posix_types.h" 1
89# 10 "include2/asm/posix_types.h"
90typedef unsigned long __kernel_ino_t;
91typedef unsigned short __kernel_mode_t;
92typedef unsigned short __kernel_nlink_t;
93typedef long __kernel_off_t;
94typedef int __kernel_pid_t;
95typedef unsigned short __kernel_ipc_pid_t;
96typedef unsigned short __kernel_uid_t;
97typedef unsigned short __kernel_gid_t;
98typedef unsigned int __kernel_size_t;
99typedef int __kernel_ssize_t;
100typedef int __kernel_ptrdiff_t;
101typedef long __kernel_time_t;
102typedef long __kernel_suseconds_t;
103typedef long __kernel_clock_t;
104typedef int __kernel_timer_t;
105typedef int __kernel_clockid_t;
106typedef int __kernel_daddr_t;
107typedef char * __kernel_caddr_t;
108typedef unsigned short __kernel_uid16_t;
109typedef unsigned short __kernel_gid16_t;
110typedef unsigned int __kernel_uid32_t;
111typedef unsigned int __kernel_gid32_t;
112
113typedef unsigned short __kernel_old_uid_t;
114typedef unsigned short __kernel_old_gid_t;
115typedef unsigned short __kernel_old_dev_t;
116
117
118typedef long long __kernel_loff_t;
119
120
121typedef struct {
122
123 int val[2];
124
125
126
127} __kernel_fsid_t;
128
129
130
131
132static __inline__ __attribute__((always_inline)) void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
133{
134 unsigned long __tmp = __fd / (8 * sizeof(unsigned long));
135 unsigned long __rem = __fd % (8 * sizeof(unsigned long));
136 __fdsetp->fds_bits[__tmp] |= (1UL<<__rem);
137}
138
139
140static __inline__ __attribute__((always_inline)) void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
141{
142 unsigned long __tmp = __fd / (8 * sizeof(unsigned long));
143 unsigned long __rem = __fd % (8 * sizeof(unsigned long));
144 __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem);
145}
146
147
148
149static __inline__ __attribute__((always_inline)) int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p)
150{
151 unsigned long __tmp = __fd / (8 * sizeof(unsigned long));
152 unsigned long __rem = __fd % (8 * sizeof(unsigned long));
153 return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0;
154}
155
156
157
158
159
160
161static __inline__ __attribute__((always_inline)) void __FD_ZERO(__kernel_fd_set *__p)
162{
163 unsigned long *__tmp = __p->fds_bits;
164 int __i;
165
166 if (__builtin_constant_p((1024/(8 * sizeof(unsigned long))))) {
167 switch ((1024/(8 * sizeof(unsigned long)))) {
168 case 16:
169 __tmp[ 0] = 0; __tmp[ 1] = 0;
170 __tmp[ 2] = 0; __tmp[ 3] = 0;
171 __tmp[ 4] = 0; __tmp[ 5] = 0;
172 __tmp[ 6] = 0; __tmp[ 7] = 0;
173 __tmp[ 8] = 0; __tmp[ 9] = 0;
174 __tmp[10] = 0; __tmp[11] = 0;
175 __tmp[12] = 0; __tmp[13] = 0;
176 __tmp[14] = 0; __tmp[15] = 0;
177 return;
178
179 case 8:
180 __tmp[ 0] = 0; __tmp[ 1] = 0;
181 __tmp[ 2] = 0; __tmp[ 3] = 0;
182 __tmp[ 4] = 0; __tmp[ 5] = 0;
183 __tmp[ 6] = 0; __tmp[ 7] = 0;
184 return;
185
186 case 4:
187 __tmp[ 0] = 0; __tmp[ 1] = 0;
188 __tmp[ 2] = 0; __tmp[ 3] = 0;
189 return;
190 }
191 }
192 __i = (1024/(8 * sizeof(unsigned long)));
193 while (__i) {
194 __i--;
195 *__tmp = 0;
196 __tmp++;
197 }
198}
199# 48 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/posix_types.h" 2
200# 15 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/types.h" 2
201# 1 "include2/asm/types.h" 1
202
203
204
205
206
207typedef unsigned short umode_t;
208
209
210
211
212
213
214typedef __signed__ char __s8;
215typedef unsigned char __u8;
216
217typedef __signed__ short __s16;
218typedef unsigned short __u16;
219
220typedef __signed__ int __s32;
221typedef unsigned int __u32;
222
223
224typedef __signed__ long long __s64;
225typedef unsigned long long __u64;
226# 39 "include2/asm/types.h"
227typedef __signed__ char s8;
228typedef unsigned char u8;
229
230typedef __signed__ short s16;
231typedef unsigned short u16;
232
233typedef __signed__ int s32;
234typedef unsigned int u32;
235
236typedef __signed__ long long s64;
237typedef unsigned long long u64;
238
239
240
241typedef u32 dma_addr_t;
242
243
244typedef u64 sector_t;
245
246
247
248
249typedef u64 blkcnt_t;
250# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/types.h" 2
251
252
253
254typedef __u32 __kernel_dev_t;
255
256typedef __kernel_fd_set fd_set;
257typedef __kernel_dev_t dev_t;
258typedef __kernel_ino_t ino_t;
259typedef __kernel_mode_t mode_t;
260typedef __kernel_nlink_t nlink_t;
261typedef __kernel_off_t off_t;
262typedef __kernel_pid_t pid_t;
263typedef __kernel_daddr_t daddr_t;
264typedef __kernel_key_t key_t;
265typedef __kernel_suseconds_t suseconds_t;
266typedef __kernel_timer_t timer_t;
267typedef __kernel_clockid_t clockid_t;
268typedef __kernel_mqd_t mqd_t;
269
270
271typedef _Bool bool;
272
273typedef __kernel_uid32_t uid_t;
274typedef __kernel_gid32_t gid_t;
275typedef __kernel_uid16_t uid16_t;
276typedef __kernel_gid16_t gid16_t;
277
278
279
280typedef __kernel_old_uid_t old_uid_t;
281typedef __kernel_old_gid_t old_gid_t;
282# 58 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/types.h"
283typedef __kernel_loff_t loff_t;
284# 67 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/types.h"
285typedef __kernel_size_t size_t;
286
287
288
289
290typedef __kernel_ssize_t ssize_t;
291
292
293
294
295typedef __kernel_ptrdiff_t ptrdiff_t;
296
297
298
299
300typedef __kernel_time_t time_t;
301
302
303
304
305typedef __kernel_clock_t clock_t;
306
307
308
309
310typedef __kernel_caddr_t caddr_t;
311
312
313
314typedef unsigned char u_char;
315typedef unsigned short u_short;
316typedef unsigned int u_int;
317typedef unsigned long u_long;
318
319
320typedef unsigned char unchar;
321typedef unsigned short ushort;
322typedef unsigned int uint;
323typedef unsigned long ulong;
324
325
326
327
328typedef __u8 u_int8_t;
329typedef __s8 int8_t;
330typedef __u16 u_int16_t;
331typedef __s16 int16_t;
332typedef __u32 u_int32_t;
333typedef __s32 int32_t;
334
335
336
337typedef __u8 uint8_t;
338typedef __u16 uint16_t;
339typedef __u32 uint32_t;
340
341
342typedef __u64 uint64_t;
343typedef __u64 u_int64_t;
344typedef __s64 int64_t;
345# 175 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/types.h"
346typedef __u16 __le16;
347typedef __u16 __be16;
348typedef __u32 __le32;
349typedef __u32 __be32;
350
351typedef __u64 __le64;
352typedef __u64 __be64;
353
354
355
356typedef unsigned gfp_t;
357
358
359
360
361typedef u32 resource_size_t;
362
363
364
365
366struct ustat {
367 __kernel_daddr_t f_tfree;
368 __kernel_ino_t f_tinode;
369 char f_fname[6];
370 char f_fpack[6];
371};
372# 14 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h" 2
373
374# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bitops.h" 1
375# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bitops.h"
376# 1 "include2/asm/bitops.h" 1
377
378
379
380
381# 1 "include2/asm/system.h" 1
382# 66 "include2/asm/system.h"
383static inline __attribute__((always_inline)) void sched_cacheflush(void)
384{
385}
386# 82 "include2/asm/system.h"
387static inline __attribute__((always_inline)) unsigned long tas(volatile int *m)
388{
389 unsigned long retval;
390
391 __asm__ __volatile__ ("tas.b @%1\n\t"
392 "movt %0"
393 : "=r" (retval): "r" (m): "t", "memory");
394 return retval;
395}
396# 136 "include2/asm/system.h"
397static inline __attribute__((always_inline)) void local_irq_enable(void)
398{
399 unsigned long __dummy0, __dummy1;
400
401 __asm__ __volatile__("stc sr, %0\n\t"
402 "and %1, %0\n\t"
403 "stc r6_bank, %1\n\t"
404 "or %1, %0\n\t"
405 "ldc %0, sr"
406 : "=&r" (__dummy0), "=r" (__dummy1)
407 : "1" (~0x000000f0)
408 : "memory");
409}
410# 164 "include2/asm/system.h"
411static inline __attribute__((always_inline)) void local_irq_disable(void)
412{
413 unsigned long __dummy;
414 __asm__ __volatile__("stc sr, %0\n\t"
415 "or #0xf0, %0\n\t"
416 "ldc %0, sr"
417 : "=&z" (__dummy)
418 :
419 : "memory");
420}
421
422static inline __attribute__((always_inline)) void set_bl_bit(void)
423{
424 unsigned long __dummy0, __dummy1;
425
426 __asm__ __volatile__ ("stc sr, %0\n\t"
427 "or %2, %0\n\t"
428 "and %3, %0\n\t"
429 "ldc %0, sr"
430 : "=&r" (__dummy0), "=r" (__dummy1)
431 : "r" (0x10000000), "r" (0xffffff0f)
432 : "memory");
433}
434
435static inline __attribute__((always_inline)) void clear_bl_bit(void)
436{
437 unsigned long __dummy0, __dummy1;
438
439 __asm__ __volatile__ ("stc sr, %0\n\t"
440 "and %2, %0\n\t"
441 "ldc %0, sr"
442 : "=&r" (__dummy0), "=r" (__dummy1)
443 : "1" (~0x10000000)
444 : "memory");
445}
446# 210 "include2/asm/system.h"
447static inline __attribute__((always_inline)) unsigned long local_irq_save(void)
448{
449 unsigned long flags, __dummy;
450
451 __asm__ __volatile__("stc sr, %1\n\t"
452 "mov %1, %0\n\t"
453 "or #0xf0, %0\n\t"
454 "ldc %0, sr\n\t"
455 "mov %1, %0\n\t"
456 "and #0xf0, %0"
457 : "=&z" (flags), "=&r" (__dummy)
458 :
459 : "memory" );
460 return flags;
461}
462# 270 "include2/asm/system.h"
463static inline __attribute__((always_inline)) unsigned long xchg_u32(volatile u32 *m, unsigned long val)
464{
465 unsigned long flags, retval;
466
467 flags = local_irq_save();
468 retval = *m;
469 *m = val;
470 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
471 return retval;
472}
473
474static inline __attribute__((always_inline)) unsigned long xchg_u8(volatile u8 *m, unsigned long val)
475{
476 unsigned long flags, retval;
477
478 flags = local_irq_save();
479 retval = *m;
480 *m = val & 0xff;
481 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
482 return retval;
483}
484
485extern void __xchg_called_with_bad_pointer(void);
486# 317 "include2/asm/system.h"
487static inline __attribute__((always_inline)) unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
488 unsigned long new)
489{
490 __u32 retval;
491 unsigned long flags;
492
493 flags = local_irq_save();
494 retval = *m;
495 if (retval == old)
496 *m = new;
497 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
498 return retval;
499}
500
501
502
503extern void __cmpxchg_called_with_bad_pointer(void);
504
505
506
507static inline __attribute__((always_inline)) unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
508 unsigned long new, int size)
509{
510 switch (size) {
511 case 4:
512 return __cmpxchg_u32(ptr, old, new);
513 }
514 __cmpxchg_called_with_bad_pointer();
515 return old;
516}
517# 360 "include2/asm/system.h"
518void disable_hlt(void);
519void enable_hlt(void);
520# 6 "include2/asm/bitops.h" 2
521
522# 1 "include2/asm/byteorder.h" 1
523# 11 "include2/asm/byteorder.h"
524static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swab32(__u32 x)
525{
526 __asm__("swap.b %0, %0\n\t"
527 "swap.w %0, %0\n\t"
528 "swap.b %0, %0"
529 : "=r" (x)
530 : "0" (x));
531 return x;
532}
533
534static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 ___arch__swab16(__u16 x)
535{
536 __asm__("swap.b %0, %0"
537 : "=r" (x)
538 : "0" (x));
539 return x;
540}
541
542static inline __attribute__((always_inline)) __u64 ___arch__swab64(__u64 val)
543{
544 union {
545 struct { __u32 a,b; } s;
546 __u64 u;
547 } v, w;
548 v.u = val;
549 w.s.b = ___arch__swab32(v.s.a);
550 w.s.a = ___arch__swab32(v.s.b);
551 return w.u;
552}
553# 51 "include2/asm/byteorder.h"
554# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/little_endian.h" 1
555# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/little_endian.h"
556# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/swab.h" 1
557# 133 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/swab.h"
558static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 x)
559{
560 return ___arch__swab16(x);
561}
562static __inline__ __attribute__((always_inline)) __u16 __swab16p(const __u16 *x)
563{
564 return ___arch__swab16(*(x));
565}
566static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr)
567{
568 do { *(addr) = ___arch__swab16(*((addr))); } while (0);
569}
570
571static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 x)
572{
573 return ___arch__swab32(x);
574}
575static __inline__ __attribute__((always_inline)) __u32 __swab32p(const __u32 *x)
576{
577 return ___arch__swab32(*(x));
578}
579static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr)
580{
581 do { *(addr) = ___arch__swab32(*((addr))); } while (0);
582}
583
584
585static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 x)
586{
587
588 __u32 h = x >> 32;
589 __u32 l = x & ((1ULL<<32)-1);
590 return (((__u64)(__builtin_constant_p((__u32)(l)) ? ({ __u32 __x = ((l)); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }) : __fswab32((l)))) << 32) | ((__u64)((__builtin_constant_p((__u32)(h)) ? ({ __u32 __x = ((h)); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }) : __fswab32((h)))));
591
592
593
594}
595static __inline__ __attribute__((always_inline)) __u64 __swab64p(const __u64 *x)
596{
597 return ___arch__swab64(*(x));
598}
599static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr)
600{
601 do { *(addr) = ___arch__swab64(*((addr))); } while (0);
602}
603# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/little_endian.h" 2
604# 43 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/little_endian.h"
605static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p)
606{
607 return ( __le64)*p;
608}
609static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p)
610{
611 return ( __u64)*p;
612}
613static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p)
614{
615 return ( __le32)*p;
616}
617static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p)
618{
619 return ( __u32)*p;
620}
621static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p)
622{
623 return ( __le16)*p;
624}
625static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p)
626{
627 return ( __u16)*p;
628}
629static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p)
630{
631 return ( __be64)__swab64p(p);
632}
633static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p)
634{
635 return __swab64p((__u64 *)p);
636}
637static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p)
638{
639 return ( __be32)__swab32p(p);
640}
641static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p)
642{
643 return __swab32p((__u32 *)p);
644}
645static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p)
646{
647 return ( __be16)__swab16p(p);
648}
649static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p)
650{
651 return __swab16p((__u16 *)p);
652}
653# 104 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/little_endian.h"
654# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/generic.h" 1
655# 154 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/generic.h"
656extern __u32 ntohl(__be32);
657extern __be32 htonl(__u32);
658extern __u16 ntohs(__be16);
659extern __be16 htons(__u16);
660# 105 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/byteorder/little_endian.h" 2
661# 52 "include2/asm/byteorder.h" 2
662# 8 "include2/asm/bitops.h" 2
663
664static inline __attribute__((always_inline)) void set_bit(int nr, volatile void * addr)
665{
666 int mask;
667 volatile unsigned int *a = addr;
668 unsigned long flags;
669
670 a += nr >> 5;
671 mask = 1 << (nr & 0x1f);
672 flags = local_irq_save();
673 *a |= mask;
674 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
675}
676
677
678
679
680
681
682static inline __attribute__((always_inline)) void clear_bit(int nr, volatile void * addr)
683{
684 int mask;
685 volatile unsigned int *a = addr;
686 unsigned long flags;
687
688 a += nr >> 5;
689 mask = 1 << (nr & 0x1f);
690 flags = local_irq_save();
691 *a &= ~mask;
692 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
693}
694
695static inline __attribute__((always_inline)) void change_bit(int nr, volatile void * addr)
696{
697 int mask;
698 volatile unsigned int *a = addr;
699 unsigned long flags;
700
701 a += nr >> 5;
702 mask = 1 << (nr & 0x1f);
703 flags = local_irq_save();
704 *a ^= mask;
705 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
706}
707
708static inline __attribute__((always_inline)) int test_and_set_bit(int nr, volatile void * addr)
709{
710 int mask, retval;
711 volatile unsigned int *a = addr;
712 unsigned long flags;
713
714 a += nr >> 5;
715 mask = 1 << (nr & 0x1f);
716 flags = local_irq_save();
717 retval = (mask & *a) != 0;
718 *a |= mask;
719 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
720
721 return retval;
722}
723
724static inline __attribute__((always_inline)) int test_and_clear_bit(int nr, volatile void * addr)
725{
726 int mask, retval;
727 volatile unsigned int *a = addr;
728 unsigned long flags;
729
730 a += nr >> 5;
731 mask = 1 << (nr & 0x1f);
732 flags = local_irq_save();
733 retval = (mask & *a) != 0;
734 *a &= ~mask;
735 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
736
737 return retval;
738}
739
740static inline __attribute__((always_inline)) int test_and_change_bit(int nr, volatile void * addr)
741{
742 int mask, retval;
743 volatile unsigned int *a = addr;
744 unsigned long flags;
745
746 a += nr >> 5;
747 mask = 1 << (nr & 0x1f);
748 flags = local_irq_save();
749 retval = (mask & *a) != 0;
750 *a ^= mask;
751 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
752
753 return retval;
754}
755
756# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/non-atomic.h" 1
757# 18 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/non-atomic.h"
758static inline __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long *addr)
759{
760 unsigned long mask = (1UL << ((nr) % 32));
761 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
762
763 *p |= mask;
764}
765
766static inline __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *addr)
767{
768 unsigned long mask = (1UL << ((nr) % 32));
769 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
770
771 *p &= ~mask;
772}
773# 43 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/non-atomic.h"
774static inline __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *addr)
775{
776 unsigned long mask = (1UL << ((nr) % 32));
777 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
778
779 *p ^= mask;
780}
781# 60 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/non-atomic.h"
782static inline __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long *addr)
783{
784 unsigned long mask = (1UL << ((nr) % 32));
785 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
786 unsigned long old = *p;
787
788 *p = old | mask;
789 return (old & mask) != 0;
790}
791# 79 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/non-atomic.h"
792static inline __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *addr)
793{
794 unsigned long mask = (1UL << ((nr) % 32));
795 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
796 unsigned long old = *p;
797
798 *p = old & ~mask;
799 return (old & mask) != 0;
800}
801
802
803static inline __attribute__((always_inline)) int __test_and_change_bit(int nr,
804 volatile unsigned long *addr)
805{
806 unsigned long mask = (1UL << ((nr) % 32));
807 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
808 unsigned long old = *p;
809
810 *p = old ^ mask;
811 return (old & mask) != 0;
812}
813
814
815
816
817
818
819static inline __attribute__((always_inline)) int test_bit(int nr, const volatile unsigned long *addr)
820{
821 return 1UL & (addr[((nr) / 32)] >> (nr & (32 -1)));
822}
823# 102 "include2/asm/bitops.h" 2
824
825static inline __attribute__((always_inline)) unsigned long ffz(unsigned long word)
826{
827 unsigned long result;
828
829 __asm__("1:\n\t"
830 "shlr %1\n\t"
831 "bt/s 1b\n\t"
832 " add #1, %0"
833 : "=r" (result), "=r" (word)
834 : "0" (~0L), "1" (word)
835 : "t");
836 return result;
837}
838
839
840
841
842
843
844
845static inline __attribute__((always_inline)) unsigned long __ffs(unsigned long word)
846{
847 unsigned long result;
848
849 __asm__("1:\n\t"
850 "shlr %1\n\t"
851 "bf/s 1b\n\t"
852 " add #1, %0"
853 : "=r" (result), "=r" (word)
854 : "0" (~0L), "1" (word)
855 : "t");
856 return result;
857}
858
859# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/find.h" 1
860
861
862
863extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
864 size, unsigned long offset);
865
866extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
867 long size, unsigned long offset);
868# 138 "include2/asm/bitops.h" 2
869# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/ffs.h" 1
870# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/ffs.h"
871static inline __attribute__((always_inline)) int ffs(int x)
872{
873 int r = 1;
874
875 if (!x)
876 return 0;
877 if (!(x & 0xffff)) {
878 x >>= 16;
879 r += 16;
880 }
881 if (!(x & 0xff)) {
882 x >>= 8;
883 r += 8;
884 }
885 if (!(x & 0xf)) {
886 x >>= 4;
887 r += 4;
888 }
889 if (!(x & 3)) {
890 x >>= 2;
891 r += 2;
892 }
893 if (!(x & 1)) {
894 x >>= 1;
895 r += 1;
896 }
897 return r;
898}
899# 139 "include2/asm/bitops.h" 2
900# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/hweight.h" 1
901
902
903
904
905
906extern unsigned int hweight32(unsigned int w);
907extern unsigned int hweight16(unsigned int w);
908extern unsigned int hweight8(unsigned int w);
909extern unsigned long hweight64(__u64 w);
910# 140 "include2/asm/bitops.h" 2
911# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/sched.h" 1
912# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/sched.h"
913static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b)
914{
915
916
917
918
919
920
921
922 if (__builtin_expect(!!(b[0]), 0))
923 return __ffs(b[0]);
924 if (__builtin_expect(!!(b[1]), 0))
925 return __ffs(b[1]) + 32;
926 if (__builtin_expect(!!(b[2]), 0))
927 return __ffs(b[2]) + 64;
928 if (b[3])
929 return __ffs(b[3]) + 96;
930 return __ffs(b[4]) + 128;
931
932
933
934}
935# 141 "include2/asm/bitops.h" 2
936# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/ext2-non-atomic.h" 1
937
938
939
940# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/le.h" 1
941# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/ext2-non-atomic.h" 2
942# 142 "include2/asm/bitops.h" 2
943# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/ext2-atomic.h" 1
944# 143 "include2/asm/bitops.h" 2
945# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/minix.h" 1
946# 144 "include2/asm/bitops.h" 2
947# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/fls.h" 1
948# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/fls.h"
949static inline __attribute__((always_inline)) int fls(int x)
950{
951 int r = 32;
952
953 if (!x)
954 return 0;
955 if (!(x & 0xffff0000u)) {
956 x <<= 16;
957 r -= 16;
958 }
959 if (!(x & 0xff000000u)) {
960 x <<= 8;
961 r -= 8;
962 }
963 if (!(x & 0xf0000000u)) {
964 x <<= 4;
965 r -= 4;
966 }
967 if (!(x & 0xc0000000u)) {
968 x <<= 2;
969 r -= 2;
970 }
971 if (!(x & 0x80000000u)) {
972 x <<= 1;
973 r -= 1;
974 }
975 return r;
976}
977# 145 "include2/asm/bitops.h" 2
978# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bitops/fls64.h" 1
979
980
981
982
983
984static inline __attribute__((always_inline)) int fls64(__u64 x)
985{
986 __u32 h = x >> 32;
987 if (h)
988 return fls(h) + 32;
989 return fls(x);
990}
991# 146 "include2/asm/bitops.h" 2
992# 10 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bitops.h" 2
993
994static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count)
995{
996 int order;
997
998 order = fls(count);
999 return order;
1000}
1001
1002static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count)
1003{
1004 int order;
1005
1006 order = fls(count) - 1;
1007 if (count & (count - 1))
1008 order++;
1009 return order;
1010}
1011
1012static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
1013{
1014 return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
1015}
1016
1017
1018
1019
1020
1021
1022
1023static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift)
1024{
1025 return (word << shift) | (word >> (32 - shift));
1026}
1027
1028
1029
1030
1031
1032
1033
1034static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift)
1035{
1036 return (word >> shift) | (word << (32 - shift));
1037}
1038
1039static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l)
1040{
1041 if (sizeof(l) == 4)
1042 return fls(l);
1043 return fls64(l);
1044}
1045# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h" 2
1046
1047# 1 "include2/asm/bug.h" 1
1048# 17 "include2/asm/bug.h"
1049# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/bug.h" 1
1050# 18 "include2/asm/bug.h" 2
1051# 18 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h" 2
1052
1053extern const char linux_banner[];
1054# 48 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h"
1055extern int console_printk[];
1056
1057
1058
1059
1060
1061
1062struct completion;
1063struct pt_regs;
1064struct user;
1065# 96 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h"
1066extern struct atomic_notifier_head panic_notifier_list;
1067extern long (*panic_blink)(long time);
1068 void panic(const char * fmt, ...)
1069 __attribute__ ((noreturn, format (printf, 1, 2)));
1070extern void oops_enter(void);
1071extern void oops_exit(void);
1072extern int oops_may_print(void);
1073 void do_exit(long error_code)
1074 __attribute__((noreturn));
1075 void complete_and_exit(struct completion *, long)
1076 __attribute__((noreturn));
1077extern unsigned long simple_strtoul(const char *,char **,unsigned int);
1078extern long simple_strtol(const char *,char **,unsigned int);
1079extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
1080extern long long simple_strtoll(const char *,char **,unsigned int);
1081extern int sprintf(char * buf, const char * fmt, ...)
1082 __attribute__ ((format (printf, 2, 3)));
1083extern int vsprintf(char *buf, const char *, va_list)
1084 __attribute__ ((format (printf, 2, 0)));
1085extern int snprintf(char * buf, size_t size, const char * fmt, ...)
1086 __attribute__ ((format (printf, 3, 4)));
1087extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
1088 __attribute__ ((format (printf, 3, 0)));
1089extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
1090 __attribute__ ((format (printf, 3, 4)));
1091extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
1092 __attribute__ ((format (printf, 3, 0)));
1093extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
1094 __attribute__ ((format (printf, 2, 3)));
1095
1096extern int sscanf(const char *, const char *, ...)
1097 __attribute__ ((format (scanf, 2, 3)));
1098extern int vsscanf(const char *, const char *, va_list)
1099 __attribute__ ((format (scanf, 2, 0)));
1100
1101extern int get_option(char **str, int *pint);
1102extern char *get_options(const char *str, int nints, int *ints);
1103extern unsigned long long memparse(char *ptr, char **retptr);
1104
1105extern int core_kernel_text(unsigned long addr);
1106extern int __kernel_text_address(unsigned long addr);
1107extern int kernel_text_address(unsigned long addr);
1108extern int session_of_pgrp(int pgrp);
1109
1110extern void dump_thread(struct pt_regs *regs, struct user *dump);
1111
1112
1113 int vprintk(const char *fmt, va_list args)
1114 __attribute__ ((format (printf, 1, 0)));
1115 int printk(const char * fmt, ...)
1116 __attribute__ ((format (printf, 1, 2)));
1117# 156 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h"
1118unsigned long int_sqrt(unsigned long);
1119
1120static inline __attribute__((always_inline)) int __attribute__((pure)) long_log2(unsigned long x)
1121{
1122 int r = 0;
1123 for (x >>= 1; x > 0; x >>= 1)
1124 r++;
1125 return r;
1126}
1127
1128static inline __attribute__((always_inline)) unsigned long
1129__attribute__((__const__)) roundup_pow_of_two(unsigned long x)
1130{
1131 return 1UL << fls_long(x - 1);
1132}
1133
1134extern int printk_ratelimit(void);
1135extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
1136
1137static inline __attribute__((always_inline)) void console_silent(void)
1138{
1139 (console_printk[0]) = 0;
1140}
1141
1142static inline __attribute__((always_inline)) void console_verbose(void)
1143{
1144 if ((console_printk[0]))
1145 (console_printk[0]) = 15;
1146}
1147
1148extern void bust_spinlocks(int yes);
1149extern int oops_in_progress;
1150extern int panic_timeout;
1151extern int panic_on_oops;
1152extern int panic_on_unrecovered_nmi;
1153extern int tainted;
1154extern const char *print_tainted(void);
1155extern void add_taint(unsigned);
1156
1157
1158extern enum system_states {
1159 SYSTEM_BOOTING,
1160 SYSTEM_RUNNING,
1161 SYSTEM_HALT,
1162 SYSTEM_POWER_OFF,
1163 SYSTEM_RESTART,
1164 SYSTEM_SUSPEND_DISK,
1165} system_state;
1166# 212 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h"
1167extern void dump_stack(void);
1168
1169
1170
1171
1172
1173
1174static inline __attribute__((always_inline)) int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...)
1175{
1176 return 0;
1177}
1178# 326 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kernel.h"
1179struct sysinfo {
1180 long uptime;
1181 unsigned long loads[3];
1182 unsigned long totalram;
1183 unsigned long freeram;
1184 unsigned long sharedram;
1185 unsigned long bufferram;
1186 unsigned long totalswap;
1187 unsigned long freeswap;
1188 unsigned short procs;
1189 unsigned short pad;
1190 unsigned long totalhigh;
1191 unsigned long freehigh;
1192 unsigned int mem_unit;
1193 char _f[20-2*sizeof(long)-sizeof(int)];
1194};
1195# 7 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/moduleparam.h" 2
1196# 29 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/moduleparam.h"
1197struct kernel_param;
1198
1199
1200typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
1201
1202typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
1203
1204struct kernel_param {
1205 const char *name;
1206 unsigned int perm;
1207 param_set_fn set;
1208 param_get_fn get;
1209 void *arg;
1210};
1211
1212
1213struct kparam_string {
1214 unsigned int maxlen;
1215 char *string;
1216};
1217
1218
1219struct kparam_array
1220{
1221 unsigned int max;
1222 unsigned int *num;
1223 param_set_fn set;
1224 param_get_fn get;
1225 unsigned int elemsize;
1226 void *elem;
1227};
1228# 95 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/moduleparam.h"
1229extern int parse_args(const char *name,
1230 char *args,
1231 struct kernel_param *params,
1232 unsigned num,
1233 int (*unknown)(char *param, char *val));
1234
1235
1236
1237
1238
1239
1240
1241extern int param_set_byte(const char *val, struct kernel_param *kp);
1242extern int param_get_byte(char *buffer, struct kernel_param *kp);
1243
1244
1245extern int param_set_short(const char *val, struct kernel_param *kp);
1246extern int param_get_short(char *buffer, struct kernel_param *kp);
1247
1248
1249extern int param_set_ushort(const char *val, struct kernel_param *kp);
1250extern int param_get_ushort(char *buffer, struct kernel_param *kp);
1251
1252
1253extern int param_set_int(const char *val, struct kernel_param *kp);
1254extern int param_get_int(char *buffer, struct kernel_param *kp);
1255
1256
1257extern int param_set_uint(const char *val, struct kernel_param *kp);
1258extern int param_get_uint(char *buffer, struct kernel_param *kp);
1259
1260
1261extern int param_set_long(const char *val, struct kernel_param *kp);
1262extern int param_get_long(char *buffer, struct kernel_param *kp);
1263
1264
1265extern int param_set_ulong(const char *val, struct kernel_param *kp);
1266extern int param_get_ulong(char *buffer, struct kernel_param *kp);
1267
1268
1269extern int param_set_charp(const char *val, struct kernel_param *kp);
1270extern int param_get_charp(char *buffer, struct kernel_param *kp);
1271
1272
1273extern int param_set_bool(const char *val, struct kernel_param *kp);
1274extern int param_get_bool(char *buffer, struct kernel_param *kp);
1275
1276
1277extern int param_set_invbool(const char *val, struct kernel_param *kp);
1278extern int param_get_invbool(char *buffer, struct kernel_param *kp);
1279# 159 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/moduleparam.h"
1280extern int param_array_set(const char *val, struct kernel_param *kp);
1281extern int param_array_get(char *buffer, struct kernel_param *kp);
1282
1283extern int param_set_copystring(const char *val, struct kernel_param *kp);
1284extern int param_get_string(char *buffer, struct kernel_param *kp);
1285
1286
1287
1288struct module;
1289
1290extern int module_param_sysfs_setup(struct module *mod,
1291 struct kernel_param *kparam,
1292 unsigned int num_params);
1293
1294extern void module_param_sysfs_remove(struct module *mod);
1295# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
1296# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h" 1
1297# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h"
1298# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 1
1299
1300
1301
1302# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/auxvec.h" 1
1303
1304
1305
1306# 1 "include2/asm/auxvec.h" 1
1307# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/auxvec.h" 2
1308# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
1309# 40 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
1310struct sched_param {
1311 int sched_priority;
1312};
1313
1314# 1 "include2/asm/param.h" 1
1315# 45 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
1316
1317# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/capability.h" 1
1318# 32 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/capability.h"
1319typedef struct __user_cap_header_struct {
1320 __u32 version;
1321 int pid;
1322} *cap_user_header_t;
1323
1324typedef struct __user_cap_data_struct {
1325 __u32 effective;
1326 __u32 permitted;
1327 __u32 inheritable;
1328} *cap_user_data_t;
1329
1330
1331
1332# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h" 1
1333# 49 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h"
1334# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/preempt.h" 1
1335# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/preempt.h"
1336# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/thread_info.h" 1
1337# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/thread_info.h"
1338struct restart_block {
1339 long (*fn)(struct restart_block *);
1340 unsigned long arg0, arg1, arg2, arg3;
1341};
1342
1343extern long do_no_restart_syscall(struct restart_block *parm);
1344
1345
1346# 1 "include2/asm/thread_info.h" 1
1347# 13 "include2/asm/thread_info.h"
1348# 1 "include2/asm/page.h" 1
1349# 44 "include2/asm/page.h"
1350extern void (*clear_page)(void *to);
1351extern void (*copy_page)(void *to, void *from);
1352
1353extern unsigned long shm_align_mask;
1354
1355
1356extern void clear_page_slow(void *to);
1357extern void copy_page_slow(void *to, void *from);
1358
1359
1360
1361
1362
1363
1364
1365struct page;
1366extern void clear_user_page(void *to, unsigned long address, struct page *pg);
1367extern void copy_user_page(void *to, void *from, unsigned long address, struct page *pg);
1368extern void __clear_user_page(void *to, void *orig_to);
1369extern void __copy_user_page(void *to, void *from, void *orig_to);
1370# 72 "include2/asm/page.h"
1371typedef struct { unsigned long pte; } pte_t;
1372typedef struct { unsigned long pgd; } pgd_t;
1373typedef struct { unsigned long pgprot; } pgprot_t;
1374# 119 "include2/asm/page.h"
1375# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/memory_model.h" 1
1376# 120 "include2/asm/page.h" 2
1377# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/page.h" 1
1378# 10 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/page.h"
1379static __inline__ __attribute__((always_inline)) __attribute__((__const__)) int get_order(unsigned long size)
1380{
1381 int order;
1382
1383 size = (size - 1) >> (12 - 1);
1384 order = -1;
1385 do {
1386 size >>= 1;
1387 order++;
1388 } while (size);
1389 return order;
1390}
1391# 121 "include2/asm/page.h" 2
1392# 14 "include2/asm/thread_info.h" 2
1393
1394
1395# 1 "include2/asm/processor.h" 1
1396# 15 "include2/asm/processor.h"
1397# 1 "include2/asm/cache.h" 1
1398# 12 "include2/asm/cache.h"
1399# 1 "include/asm/cpu/cache.h" 1
1400# 13 "include2/asm/cache.h" 2
1401# 24 "include2/asm/cache.h"
1402struct cache_info {
1403 unsigned int ways;
1404 unsigned int sets;
1405 unsigned int linesz;
1406
1407 unsigned int way_size;
1408
1409
1410
1411
1412
1413 unsigned int way_incr;
1414 unsigned int entry_shift;
1415 unsigned int entry_mask;
1416
1417
1418
1419
1420
1421
1422 unsigned int alias_mask;
1423
1424 unsigned int n_aliases;
1425
1426 unsigned long flags;
1427};
1428# 16 "include2/asm/processor.h" 2
1429# 1 "include2/asm/ptrace.h" 1
1430# 52 "include2/asm/ptrace.h"
1431struct pt_regs {
1432 unsigned long regs[16];
1433 unsigned long pc;
1434 unsigned long pr;
1435 unsigned long sr;
1436 unsigned long gbr;
1437 unsigned long mach;
1438 unsigned long macl;
1439 long tra;
1440};
1441
1442
1443
1444
1445
1446struct pt_dspregs {
1447 unsigned long a1;
1448 unsigned long a0g;
1449 unsigned long a1g;
1450 unsigned long m0;
1451 unsigned long m1;
1452 unsigned long a0;
1453 unsigned long x0;
1454 unsigned long x1;
1455 unsigned long y0;
1456 unsigned long y1;
1457 unsigned long dsr;
1458 unsigned long rs;
1459 unsigned long re;
1460 unsigned long mod;
1461};
1462
1463
1464
1465
1466
1467
1468
1469extern void show_regs(struct pt_regs *);
1470# 102 "include2/asm/ptrace.h"
1471static inline __attribute__((always_inline)) unsigned long profile_pc(struct pt_regs *regs)
1472{
1473 unsigned long pc = ((regs)->pc);
1474
1475 if (pc >= 0xa0000000UL && pc < 0xc0000000UL)
1476 pc -= 0x20000000;
1477 return pc;
1478}
1479# 17 "include2/asm/processor.h" 2
1480# 1 "include2/asm/cpu-features.h" 1
1481# 18 "include2/asm/processor.h" 2
1482# 37 "include2/asm/processor.h"
1483enum cpu_type {
1484
1485 CPU_SH7604,
1486
1487
1488 CPU_SH7705, CPU_SH7706, CPU_SH7707,
1489 CPU_SH7708, CPU_SH7708S, CPU_SH7708R,
1490 CPU_SH7709, CPU_SH7709A, CPU_SH7710,
1491 CPU_SH7729, CPU_SH7300,
1492
1493
1494 CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R,
1495 CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501,
1496 CPU_SH73180, CPU_SH7343, CPU_SH7770, CPU_SH7780, CPU_SH7781,
1497
1498
1499 CPU_SH_NONE
1500};
1501
1502struct sh_cpuinfo {
1503 unsigned int type;
1504 unsigned long loops_per_jiffy;
1505
1506 struct cache_info icache;
1507 struct cache_info dcache;
1508 struct cache_info scache;
1509
1510 unsigned long flags;
1511} __attribute__ ((aligned((1 << 5))));
1512
1513extern struct sh_cpuinfo boot_cpu_data;
1514# 107 "include2/asm/processor.h"
1515struct sh_fpu_hard_struct {
1516 unsigned long fp_regs[16];
1517 unsigned long xfp_regs[16];
1518 unsigned long fpscr;
1519 unsigned long fpul;
1520
1521 long status;
1522};
1523
1524
1525struct sh_fpu_soft_struct {
1526 unsigned long fp_regs[16];
1527 unsigned long xfp_regs[16];
1528 unsigned long fpscr;
1529 unsigned long fpul;
1530
1531 unsigned char lookahead;
1532 unsigned long entry_pc;
1533};
1534
1535union sh_fpu_union {
1536 struct sh_fpu_hard_struct hard;
1537 struct sh_fpu_soft_struct soft;
1538};
1539
1540struct thread_struct {
1541 unsigned long sp;
1542 unsigned long pc;
1543
1544 unsigned long trap_no, error_code;
1545 unsigned long address;
1546
1547 unsigned long ubc_pc;
1548
1549
1550 union sh_fpu_union fpu;
1551};
1552
1553typedef struct {
1554 unsigned long seg;
1555} mm_segment_t;
1556
1557
1558extern int ubc_usercnt;
1559# 172 "include2/asm/processor.h"
1560struct task_struct;
1561struct mm_struct;
1562
1563
1564extern void release_thread(struct task_struct *);
1565
1566
1567
1568
1569
1570
1571
1572extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
1573# 194 "include2/asm/processor.h"
1574static __inline__ __attribute__((always_inline)) void disable_fpu(void)
1575{
1576 unsigned long __dummy;
1577
1578
1579 __asm__ __volatile__("stc sr, %0\n\t"
1580 "or %1, %0\n\t"
1581 "ldc %0, sr"
1582 : "=&r" (__dummy)
1583 : "r" (0x00008000));
1584}
1585
1586static __inline__ __attribute__((always_inline)) void enable_fpu(void)
1587{
1588 unsigned long __dummy;
1589
1590
1591 __asm__ __volatile__("stc sr, %0\n\t"
1592 "and %1, %0\n\t"
1593 "ldc %0, sr"
1594 : "=&r" (__dummy)
1595 : "r" (~0x00008000));
1596}
1597
1598static __inline__ __attribute__((always_inline)) void release_fpu(struct pt_regs *regs)
1599{
1600 regs->sr |= 0x00008000;
1601}
1602
1603static __inline__ __attribute__((always_inline)) void grab_fpu(struct pt_regs *regs)
1604{
1605 regs->sr &= ~0x00008000;
1606}
1607
1608
1609extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs);
1610# 258 "include2/asm/processor.h"
1611extern unsigned long get_wchan(struct task_struct *p);
1612# 271 "include2/asm/processor.h"
1613static inline __attribute__((always_inline)) void prefetch(void *x)
1614{
1615 __asm__ __volatile__ ("pref @%0\n\t" : : "r" (x) : "memory");
1616}
1617
1618
1619
1620
1621
1622extern int vsyscall_init(void);
1623# 17 "include2/asm/thread_info.h" 2
1624
1625struct thread_info {
1626 struct task_struct *task;
1627 struct exec_domain *exec_domain;
1628 unsigned long flags;
1629 __u32 cpu;
1630 int preempt_count;
1631 mm_segment_t addr_limit;
1632 struct restart_block restart_block;
1633 unsigned long previous_sp;
1634
1635 __u8 supervisor_stack[0];
1636};
1637# 63 "include2/asm/thread_info.h"
1638register unsigned long current_stack_pointer asm("r15") __attribute__((__used__));
1639
1640
1641static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
1642{
1643 struct thread_info *ti;
1644
1645 __asm__("stc r7_bank, %0" : "=r" (ti));
1646# 82 "include2/asm/thread_info.h"
1647 return ti;
1648}
1649# 22 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/thread_info.h" 2
1650# 30 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/thread_info.h"
1651static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag)
1652{
1653 set_bit(flag,&ti->flags);
1654}
1655
1656static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag)
1657{
1658 clear_bit(flag,&ti->flags);
1659}
1660
1661static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
1662{
1663 return test_and_set_bit(flag,&ti->flags);
1664}
1665
1666static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
1667{
1668 return test_and_clear_bit(flag,&ti->flags);
1669}
1670
1671static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag)
1672{
1673 return test_bit(flag,&ti->flags);
1674}
1675# 10 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/preempt.h" 2
1676# 50 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h" 2
1677# 78 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h"
1678# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_types.h" 1
1679# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_types.h"
1680# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/lockdep.h" 1
1681# 243 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/lockdep.h"
1682static inline __attribute__((always_inline)) void lockdep_off(void)
1683{
1684}
1685
1686static inline __attribute__((always_inline)) void lockdep_on(void)
1687{
1688}
1689
1690static inline __attribute__((always_inline)) int lockdep_internal(void)
1691{
1692 return 0;
1693}
1694# 270 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/lockdep.h"
1695struct lock_class_key { };
1696# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_types.h" 2
1697
1698
1699
1700
1701# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_types_up.h" 1
1702# 29 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_types_up.h"
1703typedef struct { } raw_spinlock_t;
1704
1705
1706
1707
1708
1709typedef struct {
1710
1711
1712
1713
1714} raw_rwlock_t;
1715# 18 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_types.h" 2
1716
1717
1718typedef struct {
1719 raw_spinlock_t raw_lock;
1720# 32 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_types.h"
1721} spinlock_t;
1722
1723
1724
1725typedef struct {
1726 raw_rwlock_t raw_lock;
1727# 48 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_types.h"
1728} rwlock_t;
1729# 79 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h" 2
1730
1731extern int __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock);
1732
1733
1734
1735
1736
1737
1738
1739# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_up.h" 1
1740# 89 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h" 2
1741# 134 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h"
1742# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock_api_up.h" 1
1743# 135 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h" 2
1744# 259 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h"
1745# 1 "include2/asm/atomic.h" 1
1746# 10 "include2/asm/atomic.h"
1747typedef struct { volatile int counter; } atomic_t;
1748# 25 "include2/asm/atomic.h"
1749static inline __attribute__((always_inline)) void atomic_add(int i, atomic_t *v)
1750{
1751# 39 "include2/asm/atomic.h"
1752 unsigned long flags;
1753
1754 flags = local_irq_save();
1755 *(long *)v += i;
1756 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
1757
1758}
1759
1760static inline __attribute__((always_inline)) void atomic_sub(int i, atomic_t *v)
1761{
1762# 61 "include2/asm/atomic.h"
1763 unsigned long flags;
1764
1765 flags = local_irq_save();
1766 *(long *)v -= i;
1767 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
1768
1769}
1770# 77 "include2/asm/atomic.h"
1771static inline __attribute__((always_inline)) int atomic_add_return(int i, atomic_t *v)
1772{
1773 unsigned long temp;
1774# 92 "include2/asm/atomic.h"
1775 unsigned long flags;
1776
1777 flags = local_irq_save();
1778 temp = *(long *)v;
1779 temp += i;
1780 *(long *)v = temp;
1781 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
1782
1783
1784 return temp;
1785}
1786
1787
1788
1789static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t *v)
1790{
1791 unsigned long temp;
1792# 121 "include2/asm/atomic.h"
1793 unsigned long flags;
1794
1795 flags = local_irq_save();
1796 temp = *(long *)v;
1797 temp -= i;
1798 *(long *)v = temp;
1799 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
1800
1801
1802 return temp;
1803}
1804# 152 "include2/asm/atomic.h"
1805static inline __attribute__((always_inline)) int atomic_cmpxchg(atomic_t *v, int old, int new)
1806{
1807 int ret;
1808 unsigned long flags;
1809
1810 flags = local_irq_save();
1811 ret = v->counter;
1812 if (__builtin_expect(!!(ret == old), 1))
1813 v->counter = new;
1814 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
1815
1816 return ret;
1817}
1818
1819
1820
1821static inline __attribute__((always_inline)) int atomic_add_unless(atomic_t *v, int a, int u)
1822{
1823 int ret;
1824 unsigned long flags;
1825
1826 flags = local_irq_save();
1827 ret = v->counter;
1828 if (ret != u)
1829 v->counter += a;
1830 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
1831
1832 return ret != u;
1833}
1834
1835
1836static inline __attribute__((always_inline)) void atomic_clear_mask(unsigned int mask, atomic_t *v)
1837{
1838# 197 "include2/asm/atomic.h"
1839 unsigned long flags;
1840
1841 flags = local_irq_save();
1842 *(long *)v &= ~mask;
1843 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
1844
1845}
1846
1847static inline __attribute__((always_inline)) void atomic_set_mask(unsigned int mask, atomic_t *v)
1848{
1849# 219 "include2/asm/atomic.h"
1850 unsigned long flags;
1851
1852 flags = local_irq_save();
1853 *(long *)v |= mask;
1854 do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
1855
1856}
1857
1858
1859
1860
1861
1862
1863
1864# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/atomic.h" 1
1865# 71 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/atomic.h"
1866typedef atomic_t atomic_long_t;
1867
1868
1869static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l)
1870{
1871 atomic_t *v = (atomic_t *)l;
1872
1873 return (long)((v)->counter);
1874}
1875
1876static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i)
1877{
1878 atomic_t *v = (atomic_t *)l;
1879
1880 ((v)->counter = (i));
1881}
1882
1883static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l)
1884{
1885 atomic_t *v = (atomic_t *)l;
1886
1887 atomic_add(1,(v));
1888}
1889
1890static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l)
1891{
1892 atomic_t *v = (atomic_t *)l;
1893
1894 atomic_sub(1,(v));
1895}
1896
1897static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l)
1898{
1899 atomic_t *v = (atomic_t *)l;
1900
1901 atomic_add(i, v);
1902}
1903
1904static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l)
1905{
1906 atomic_t *v = (atomic_t *)l;
1907
1908 atomic_sub(i, v);
1909}
1910# 234 "include2/asm/atomic.h" 2
1911# 260 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/spinlock.h" 2
1912
1913
1914
1915
1916
1917extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
1918# 46 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/capability.h" 2
1919# 1 "include2/asm/current.h" 1
1920# 11 "include2/asm/current.h"
1921struct task_struct;
1922
1923static __inline__ __attribute__((always_inline)) struct task_struct * get_current(void)
1924{
1925 return current_thread_info()->task;
1926}
1927# 47 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/capability.h" 2
1928# 58 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/capability.h"
1929typedef __u32 kernel_cap_t;
1930# 295 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/capability.h"
1931extern kernel_cap_t cap_bset;
1932# 323 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/capability.h"
1933static inline __attribute__((always_inline)) kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
1934{
1935 kernel_cap_t dest;
1936 (dest) = (a) | (b);
1937 return dest;
1938}
1939
1940static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b)
1941{
1942 kernel_cap_t dest;
1943 (dest) = (a) & (b);
1944 return dest;
1945}
1946
1947static inline __attribute__((always_inline)) kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop)
1948{
1949 kernel_cap_t dest;
1950 (dest) = (a) & ~(drop);
1951 return dest;
1952}
1953
1954static inline __attribute__((always_inline)) kernel_cap_t cap_invert(kernel_cap_t c)
1955{
1956 kernel_cap_t dest;
1957 (dest) = ~(c);
1958 return dest;
1959}
1960# 360 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/capability.h"
1961int capable(int cap);
1962int __capable(struct task_struct *t, int cap);
1963# 47 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
1964# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/threads.h" 1
1965# 48 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
1966
1967
1968# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timex.h" 1
1969# 57 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timex.h"
1970# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/time.h" 1
1971
1972
1973
1974
1975
1976
1977# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/seqlock.h" 1
1978# 32 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/seqlock.h"
1979typedef struct {
1980 unsigned sequence;
1981 spinlock_t lock;
1982} seqlock_t;
1983# 57 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/seqlock.h"
1984static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl)
1985{
1986 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1987 ++sl->sequence;
1988 __asm__ __volatile__("": : :"memory");
1989}
1990
1991static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl)
1992{
1993 __asm__ __volatile__("": : :"memory");
1994 sl->sequence++;
1995 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1996}
1997
1998static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl)
1999{
2000 int ret = (({ do { do { } while (0); (void)0; (void)(&sl->lock); } while (0); 1; }));
2001
2002 if (ret) {
2003 ++sl->sequence;
2004 __asm__ __volatile__("": : :"memory");
2005 }
2006 return ret;
2007}
2008
2009
2010static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl)
2011{
2012 unsigned ret = sl->sequence;
2013 __asm__ __volatile__("": : :"memory");
2014 return ret;
2015}
2016# 98 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/seqlock.h"
2017static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned iv)
2018{
2019 __asm__ __volatile__("": : :"memory");
2020 return (iv & 1) | (sl->sequence ^ iv);
2021}
2022# 112 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/seqlock.h"
2023typedef struct seqcount {
2024 unsigned sequence;
2025} seqcount_t;
2026
2027
2028
2029
2030
2031static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s)
2032{
2033 unsigned ret = s->sequence;
2034 __asm__ __volatile__("": : :"memory");
2035 return ret;
2036}
2037
2038
2039
2040
2041
2042
2043static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned iv)
2044{
2045 __asm__ __volatile__("": : :"memory");
2046 return (iv & 1) | (s->sequence ^ iv);
2047}
2048
2049
2050
2051
2052
2053
2054static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s)
2055{
2056 s->sequence++;
2057 __asm__ __volatile__("": : :"memory");
2058}
2059
2060static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s)
2061{
2062 __asm__ __volatile__("": : :"memory");
2063 s->sequence++;
2064}
2065# 8 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/time.h" 2
2066
2067
2068
2069
2070struct timespec {
2071 time_t tv_sec;
2072 long tv_nsec;
2073};
2074
2075
2076struct timeval {
2077 time_t tv_sec;
2078 suseconds_t tv_usec;
2079};
2080
2081struct timezone {
2082 int tz_minuteswest;
2083 int tz_dsttime;
2084};
2085# 39 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/time.h"
2086static inline __attribute__((always_inline)) int timespec_equal(struct timespec *a, struct timespec *b)
2087{
2088 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
2089}
2090
2091
2092
2093
2094
2095
2096static inline __attribute__((always_inline)) int timespec_compare(struct timespec *lhs, struct timespec *rhs)
2097{
2098 if (lhs->tv_sec < rhs->tv_sec)
2099 return -1;
2100 if (lhs->tv_sec > rhs->tv_sec)
2101 return 1;
2102 return lhs->tv_nsec - rhs->tv_nsec;
2103}
2104
2105static inline __attribute__((always_inline)) int timeval_compare(struct timeval *lhs, struct timeval *rhs)
2106{
2107 if (lhs->tv_sec < rhs->tv_sec)
2108 return -1;
2109 if (lhs->tv_sec > rhs->tv_sec)
2110 return 1;
2111 return lhs->tv_usec - rhs->tv_usec;
2112}
2113
2114extern unsigned long mktime(const unsigned int year, const unsigned int mon,
2115 const unsigned int day, const unsigned int hour,
2116 const unsigned int min, const unsigned int sec);
2117
2118extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
2119
2120
2121
2122
2123static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs,
2124 struct timespec rhs)
2125{
2126 struct timespec ts_delta;
2127 set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
2128 lhs.tv_nsec - rhs.tv_nsec);
2129 return ts_delta;
2130}
2131
2132
2133
2134
2135
2136
2137
2138extern struct timespec xtime;
2139extern struct timespec wall_to_monotonic;
2140extern seqlock_t xtime_lock;
2141
2142void timekeeping_init(void);
2143
2144static inline __attribute__((always_inline)) unsigned long get_seconds(void)
2145{
2146 return xtime.tv_sec;
2147}
2148
2149struct timespec current_kernel_time(void);
2150
2151
2152
2153
2154extern void do_gettimeofday(struct timeval *tv);
2155extern int do_settimeofday(struct timespec *tv);
2156extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
2157
2158extern long do_utimes(int dfd, char *filename, struct timeval *times);
2159struct itimerval;
2160extern int do_setitimer(int which, struct itimerval *value,
2161 struct itimerval *ovalue);
2162extern unsigned int alarm_setitimer(unsigned int seconds);
2163extern int do_getitimer(int which, struct itimerval *value);
2164extern void getnstimeofday(struct timespec *tv);
2165
2166extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
2167extern int timekeeping_is_continuous(void);
2168# 129 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/time.h"
2169static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts)
2170{
2171 return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
2172}
2173# 141 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/time.h"
2174static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv)
2175{
2176 return ((s64) tv->tv_sec * 1000000000L) +
2177 tv->tv_usec * 1000L;
2178}
2179
2180
2181
2182
2183
2184
2185
2186extern struct timespec ns_to_timespec(const s64 nsec);
2187
2188
2189
2190
2191
2192
2193
2194extern struct timeval ns_to_timeval(const s64 nsec);
2195
2196
2197
2198
2199
2200
2201static inline __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns)
2202{
2203 ns += a->tv_nsec;
2204 while(__builtin_expect(!!(ns >= 1000000000L), 0)) {
2205 ns -= 1000000000L;
2206 a->tv_sec++;
2207 }
2208 a->tv_nsec = ns;
2209}
2210# 195 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/time.h"
2211struct itimerspec {
2212 struct timespec it_interval;
2213 struct timespec it_value;
2214};
2215
2216struct itimerval {
2217 struct timeval it_interval;
2218 struct timeval it_value;
2219};
2220# 58 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timex.h" 2
2221# 100 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timex.h"
2222struct timex {
2223 unsigned int modes;
2224 long offset;
2225 long freq;
2226 long maxerror;
2227 long esterror;
2228 int status;
2229 long constant;
2230 long precision;
2231 long tolerance;
2232
2233
2234 struct timeval time;
2235 long tick;
2236
2237 long ppsfreq;
2238 long jitter;
2239 int shift;
2240 long stabil;
2241 long jitcnt;
2242 long calcnt;
2243 long errcnt;
2244 long stbcnt;
2245
2246 int :32; int :32; int :32; int :32;
2247 int :32; int :32; int :32; int :32;
2248 int :32; int :32; int :32; int :32;
2249};
2250# 187 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timex.h"
2251# 1 "include2/asm/timex.h" 1
2252# 11 "include2/asm/timex.h"
2253typedef unsigned long long cycles_t;
2254
2255static __inline__ __attribute__((always_inline)) cycles_t get_cycles (void)
2256{
2257 return 0;
2258}
2259# 188 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timex.h" 2
2260
2261
2262
2263
2264
2265
2266extern unsigned long tick_usec;
2267extern unsigned long tick_nsec;
2268extern int tickadj;
2269
2270
2271
2272
2273extern int time_status;
2274extern long time_maxerror;
2275extern long time_esterror;
2276
2277extern long time_freq;
2278
2279extern long time_adjust;
2280
2281extern void ntp_clear(void);
2282
2283
2284
2285
2286
2287static inline __attribute__((always_inline)) int ntp_synced(void)
2288{
2289 return !(time_status & 0x0040);
2290}
2291# 277 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timex.h"
2292static inline __attribute__((always_inline)) void time_interpolator_reset(void)
2293{
2294}
2295
2296static inline __attribute__((always_inline)) void time_interpolator_update(long delta_nsec)
2297{
2298}
2299
2300
2301
2302
2303
2304
2305extern u64 current_tick_length(void);
2306
2307extern void second_overflow(void);
2308extern void update_ntp_one_tick(void);
2309extern int do_adjtimex(struct timex *);
2310# 51 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
2311# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h" 1
2312
2313
2314
2315# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/calc64.h" 1
2316
2317
2318
2319
2320# 1 "include2/asm/div64.h" 1
2321# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/div64.h" 1
2322# 35 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/div64.h"
2323extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
2324# 1 "include2/asm/div64.h" 2
2325# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/calc64.h" 2
2326# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/calc64.h"
2327static inline __attribute__((always_inline)) unsigned long do_div_llr(const long long dividend,
2328 const long divisor, long *remainder)
2329{
2330 u64 result = dividend;
2331
2332 *(remainder) = ({ uint32_t __base = (divisor); uint32_t __rem; (void)(((typeof((result)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((result) >> 32) == 0), 1)) { __rem = (uint32_t)(result) % __base; (result) = (uint32_t)(result) / __base; } else __rem = __div64_32(&(result), __base); __rem; });
2333 return (unsigned long) result;
2334}
2335
2336
2337
2338
2339
2340
2341
2342static inline __attribute__((always_inline)) long div_long_long_rem_signed(const long long dividend,
2343 const long divisor, long *remainder)
2344{
2345 long res;
2346
2347 if (__builtin_expect(!!(dividend < 0), 0)) {
2348 res = -do_div_llr((-dividend), divisor, remainder);
2349 *remainder = -(*remainder);
2350 } else
2351 res = do_div_llr((dividend), divisor, remainder);
2352
2353 return res;
2354}
2355# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h" 2
2356# 81 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h"
2357extern u64 __attribute__((section(".data"))) jiffies_64;
2358extern unsigned long volatile __attribute__((section(".data"))) jiffies;
2359
2360
2361u64 get_jiffies_64(void);
2362# 267 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h"
2363static inline __attribute__((always_inline)) unsigned int jiffies_to_msecs(const unsigned long j)
2364{
2365
2366 return (1000L / 100) * j;
2367
2368
2369
2370
2371
2372}
2373
2374static inline __attribute__((always_inline)) unsigned int jiffies_to_usecs(const unsigned long j)
2375{
2376
2377 return (1000000L / 100) * j;
2378
2379
2380
2381
2382
2383}
2384
2385static inline __attribute__((always_inline)) unsigned long msecs_to_jiffies(const unsigned int m)
2386{
2387 if (m > jiffies_to_msecs(((~0UL >> 1)-1)))
2388 return ((~0UL >> 1)-1);
2389
2390 return (m + (1000L / 100) - 1) / (1000L / 100);
2391
2392
2393
2394
2395
2396}
2397
2398static inline __attribute__((always_inline)) unsigned long usecs_to_jiffies(const unsigned int u)
2399{
2400 if (u > jiffies_to_usecs(((~0UL >> 1)-1)))
2401 return ((~0UL >> 1)-1);
2402
2403 return (u + (1000000L / 100) - 1) / (1000000L / 100);
2404
2405
2406
2407
2408
2409}
2410# 326 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h"
2411static __inline__ __attribute__((always_inline)) unsigned long
2412timespec_to_jiffies(const struct timespec *value)
2413{
2414 unsigned long sec = value->tv_sec;
2415 long nsec = value->tv_nsec + (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))))) - 1;
2416
2417 if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))))) / 1000000000L)){
2418 sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))))) / 1000000000L);
2419 nsec = 0;
2420 }
2421 return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 7)) + (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))))))) +
2422 (((u64)nsec * ((unsigned long)((((u64)1 << ((32 - 7) + 29)) + (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))))))) >>
2423 (((32 - 7) + 29) - (32 - 7)))) >> (32 - 7);
2424
2425}
2426
2427static __inline__ __attribute__((always_inline)) void
2428jiffies_to_timespec(const unsigned long jiffies, struct timespec *value)
2429{
2430
2431
2432
2433
2434 u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))));
2435 value->tv_sec = do_div_llr((nsec), 1000000000L, &value->tv_nsec);
2436}
2437# 365 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h"
2438static __inline__ __attribute__((always_inline)) unsigned long
2439timeval_to_jiffies(const struct timeval *value)
2440{
2441 unsigned long sec = value->tv_sec;
2442 long usec = value->tv_usec;
2443
2444 if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))))) / 1000000000L)){
2445 sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))))) / 1000000000L);
2446 usec = 0;
2447 }
2448 return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 7)) + (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))))))) +
2449 (((u64)usec * ((unsigned long)((((u64)1000L << ((32 - 7) + 19)) + (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))))))) + (u64)(((u64)1 << ((32 - 7) + 19)) - 1)) >>
2450 (((32 - 7) + 19) - (32 - 7)))) >> (32 - 7);
2451}
2452
2453static __inline__ __attribute__((always_inline)) void
2454jiffies_to_timeval(const unsigned long jiffies, struct timeval *value)
2455{
2456
2457
2458
2459
2460 u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))) << (8)) + ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100))))) / 2) / ((( ((((33000000 / 4)) / ((((33000000 / 4) + 100/2) / 100))) << (8)) + (((((33000000 / 4)) % ((((33000000 / 4) + 100/2) / 100))) << (8)) + ((((33000000 / 4) + 100/2) / 100)) / 2) / ((((33000000 / 4) + 100/2) / 100)))))));
2461 long tv_usec;
2462
2463 value->tv_sec = do_div_llr((nsec), 1000000000L, &tv_usec);
2464 tv_usec /= 1000L;
2465 value->tv_usec = tv_usec;
2466}
2467
2468
2469
2470
2471static inline __attribute__((always_inline)) clock_t jiffies_to_clock_t(long x)
2472{
2473
2474 return x / (100 / 100);
2475
2476
2477
2478
2479
2480}
2481
2482static inline __attribute__((always_inline)) unsigned long clock_t_to_jiffies(unsigned long x)
2483{
2484
2485 if (x >= ~0UL / (100 / 100))
2486 return ~0UL;
2487 return x * (100 / 100);
2488# 427 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h"
2489}
2490
2491static inline __attribute__((always_inline)) u64 jiffies_64_to_clock_t(u64 x)
2492{
2493
2494 ({ uint32_t __base = (100 / 100); uint32_t __rem; (void)(((typeof((x)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((x) >> 32) == 0), 1)) { __rem = (uint32_t)(x) % __base; (x) = (uint32_t)(x) / __base; } else __rem = __div64_32(&(x), __base); __rem; });
2495# 442 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h"
2496 return x;
2497}
2498
2499static inline __attribute__((always_inline)) u64 nsec_to_clock_t(u64 x)
2500{
2501
2502 ({ uint32_t __base = ((1000000000L / 100)); uint32_t __rem; (void)(((typeof((x)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((x) >> 32) == 0), 1)) { __rem = (uint32_t)(x) % __base; (x) = (uint32_t)(x) / __base; } else __rem = __div64_32(&(x), __base); __rem; });
2503# 462 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/jiffies.h"
2504 return x;
2505}
2506# 52 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
2507# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rbtree.h" 1
2508# 100 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rbtree.h"
2509struct rb_node
2510{
2511 unsigned long rb_parent_color;
2512
2513
2514 struct rb_node *rb_right;
2515 struct rb_node *rb_left;
2516} __attribute__((aligned(sizeof(long))));
2517
2518
2519struct rb_root
2520{
2521 struct rb_node *rb_node;
2522};
2523# 123 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rbtree.h"
2524static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p)
2525{
2526 rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
2527}
2528static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color)
2529{
2530 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
2531}
2532# 139 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rbtree.h"
2533extern void rb_insert_color(struct rb_node *, struct rb_root *);
2534extern void rb_erase(struct rb_node *, struct rb_root *);
2535
2536
2537extern struct rb_node *rb_next(struct rb_node *);
2538extern struct rb_node *rb_prev(struct rb_node *);
2539extern struct rb_node *rb_first(struct rb_root *);
2540extern struct rb_node *rb_last(struct rb_root *);
2541
2542
2543extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
2544 struct rb_root *root);
2545
2546static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent,
2547 struct rb_node ** rb_link)
2548{
2549 node->rb_parent_color = (unsigned long )parent;
2550 node->rb_left = node->rb_right = ((void *)0);
2551
2552 *rb_link = node;
2553}
2554# 53 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
2555
2556# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/cpumask.h" 1
2557# 86 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/cpumask.h"
2558# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bitmap.h" 1
2559
2560
2561
2562
2563
2564
2565
2566# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/string.h" 1
2567# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/string.h"
2568extern char *strndup_user(const char *, long);
2569
2570
2571
2572
2573# 1 "include2/asm/string.h" 1
2574# 12 "include2/asm/string.h"
2575static inline __attribute__((always_inline)) char *strcpy(char *__dest, const char *__src)
2576{
2577 register char *__xdest = __dest;
2578 unsigned long __dummy;
2579
2580 __asm__ __volatile__("1:\n\t"
2581 "mov.b @%1+, %2\n\t"
2582 "mov.b %2, @%0\n\t"
2583 "cmp/eq #0, %2\n\t"
2584 "bf/s 1b\n\t"
2585 " add #1, %0\n\t"
2586 : "=r" (__dest), "=r" (__src), "=&z" (__dummy)
2587 : "0" (__dest), "1" (__src)
2588 : "memory", "t");
2589
2590 return __xdest;
2591}
2592
2593
2594static inline __attribute__((always_inline)) char *strncpy(char *__dest, const char *__src, size_t __n)
2595{
2596 register char *__xdest = __dest;
2597 unsigned long __dummy;
2598
2599 if (__n == 0)
2600 return __xdest;
2601
2602 __asm__ __volatile__(
2603 "1:\n"
2604 "mov.b @%1+, %2\n\t"
2605 "mov.b %2, @%0\n\t"
2606 "cmp/eq #0, %2\n\t"
2607 "bt/s 2f\n\t"
2608 " cmp/eq %5,%1\n\t"
2609 "bf/s 1b\n\t"
2610 " add #1, %0\n"
2611 "2:"
2612 : "=r" (__dest), "=r" (__src), "=&z" (__dummy)
2613 : "0" (__dest), "1" (__src), "r" (__src+__n)
2614 : "memory", "t");
2615
2616 return __xdest;
2617}
2618
2619
2620static inline __attribute__((always_inline)) int strcmp(const char *__cs, const char *__ct)
2621{
2622 register int __res;
2623 unsigned long __dummy;
2624
2625 __asm__ __volatile__(
2626 "mov.b @%1+, %3\n"
2627 "1:\n\t"
2628 "mov.b @%0+, %2\n\t"
2629 "cmp/eq #0, %3\n\t"
2630 "bt 2f\n\t"
2631 "cmp/eq %2, %3\n\t"
2632 "bt/s 1b\n\t"
2633 " mov.b @%1+, %3\n\t"
2634 "add #-2, %1\n\t"
2635 "mov.b @%1, %3\n\t"
2636 "sub %3, %2\n"
2637 "2:"
2638 : "=r" (__cs), "=r" (__ct), "=&r" (__res), "=&z" (__dummy)
2639 : "0" (__cs), "1" (__ct)
2640 : "t");
2641
2642 return __res;
2643}
2644
2645
2646static inline __attribute__((always_inline)) int strncmp(const char *__cs, const char *__ct, size_t __n)
2647{
2648 register int __res;
2649 unsigned long __dummy;
2650
2651 if (__n == 0)
2652 return 0;
2653
2654 __asm__ __volatile__(
2655 "mov.b @%1+, %3\n"
2656 "1:\n\t"
2657 "mov.b @%0+, %2\n\t"
2658 "cmp/eq %6, %0\n\t"
2659 "bt/s 2f\n\t"
2660 " cmp/eq #0, %3\n\t"
2661 "bt/s 3f\n\t"
2662 " cmp/eq %3, %2\n\t"
2663 "bt/s 1b\n\t"
2664 " mov.b @%1+, %3\n\t"
2665 "add #-2, %1\n\t"
2666 "mov.b @%1, %3\n"
2667 "2:\n\t"
2668 "sub %3, %2\n"
2669 "3:"
2670 :"=r" (__cs), "=r" (__ct), "=&r" (__res), "=&z" (__dummy)
2671 : "0" (__cs), "1" (__ct), "r" (__cs+__n)
2672 : "t");
2673
2674 return __res;
2675}
2676
2677
2678extern void *memset(void *__s, int __c, size_t __count);
2679
2680
2681extern void *memcpy(void *__to, __const__ void *__from, size_t __n);
2682
2683
2684extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
2685
2686
2687extern void *memchr(const void *__s, int __c, size_t __n);
2688
2689
2690extern size_t strlen(const char *);
2691
2692
2693extern int strcasecmp(const char *, const char *);
2694# 22 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/string.h" 2
2695# 30 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/string.h"
2696size_t strlcpy(char *, const char *, size_t);
2697
2698
2699extern char * strcat(char *, const char *);
2700
2701
2702extern char * strncat(char *, const char *, __kernel_size_t);
2703
2704
2705extern size_t strlcat(char *, const char *, __kernel_size_t);
2706# 48 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/string.h"
2707extern int strnicmp(const char *, const char *, __kernel_size_t);
2708
2709
2710extern char * strchr(const char *,int);
2711
2712
2713extern char * strnchr(const char *, size_t, int);
2714
2715
2716extern char * strrchr(const char *,int);
2717
2718extern char * strstrip(char *);
2719
2720extern char * strstr(const char *,const char *);
2721
2722
2723
2724
2725
2726extern __kernel_size_t strnlen(const char *,__kernel_size_t);
2727
2728
2729extern char * strpbrk(const char *,const char *);
2730
2731
2732extern char * strsep(char **,const char *);
2733
2734
2735extern __kernel_size_t strspn(const char *,const char *);
2736
2737
2738extern __kernel_size_t strcspn(const char *,const char *);
2739# 92 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/string.h"
2740extern void * memscan(void *,int,__kernel_size_t);
2741
2742
2743extern int memcmp(const void *,const void *,__kernel_size_t);
2744
2745
2746
2747
2748
2749extern char *kstrdup(const char *s, gfp_t gfp);
2750extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
2751# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bitmap.h" 2
2752# 84 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bitmap.h"
2753extern int __bitmap_empty(const unsigned long *bitmap, int bits);
2754extern int __bitmap_full(const unsigned long *bitmap, int bits);
2755extern int __bitmap_equal(const unsigned long *bitmap1,
2756 const unsigned long *bitmap2, int bits);
2757extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
2758 int bits);
2759extern void __bitmap_shift_right(unsigned long *dst,
2760 const unsigned long *src, int shift, int bits);
2761extern void __bitmap_shift_left(unsigned long *dst,
2762 const unsigned long *src, int shift, int bits);
2763extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
2764 const unsigned long *bitmap2, int bits);
2765extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
2766 const unsigned long *bitmap2, int bits);
2767extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
2768 const unsigned long *bitmap2, int bits);
2769extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
2770 const unsigned long *bitmap2, int bits);
2771extern int __bitmap_intersects(const unsigned long *bitmap1,
2772 const unsigned long *bitmap2, int bits);
2773extern int __bitmap_subset(const unsigned long *bitmap1,
2774 const unsigned long *bitmap2, int bits);
2775extern int __bitmap_weight(const unsigned long *bitmap, int bits);
2776
2777extern int bitmap_scnprintf(char *buf, unsigned int len,
2778 const unsigned long *src, int nbits);
2779extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
2780 unsigned long *dst, int nbits);
2781extern int bitmap_parse_user(const char *ubuf, unsigned int ulen,
2782 unsigned long *dst, int nbits);
2783extern int bitmap_scnlistprintf(char *buf, unsigned int len,
2784 const unsigned long *src, int nbits);
2785extern int bitmap_parselist(const char *buf, unsigned long *maskp,
2786 int nmaskbits);
2787extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
2788 const unsigned long *old, const unsigned long *new, int bits);
2789extern int bitmap_bitremap(int oldbit,
2790 const unsigned long *old, const unsigned long *new, int bits);
2791extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
2792extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
2793extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
2794
2795
2796
2797
2798
2799
2800
2801static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits)
2802{
2803 if (nbits <= 32)
2804 *dst = 0UL;
2805 else {
2806 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2807 memset(dst, 0, len);
2808 }
2809}
2810
2811static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits)
2812{
2813 size_t nlongs = (((nbits)+32 -1)/32);
2814 if (nlongs > 1) {
2815 int len = (nlongs - 1) * sizeof(unsigned long);
2816 memset(dst, 0xff, len);
2817 }
2818 dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2819}
2820
2821static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src,
2822 int nbits)
2823{
2824 if (nbits <= 32)
2825 *dst = *src;
2826 else {
2827 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2828 memcpy(dst, src, len);
2829 }
2830}
2831
2832static inline __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *src1,
2833 const unsigned long *src2, int nbits)
2834{
2835 if (nbits <= 32)
2836 *dst = *src1 & *src2;
2837 else
2838 __bitmap_and(dst, src1, src2, nbits);
2839}
2840
2841static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1,
2842 const unsigned long *src2, int nbits)
2843{
2844 if (nbits <= 32)
2845 *dst = *src1 | *src2;
2846 else
2847 __bitmap_or(dst, src1, src2, nbits);
2848}
2849
2850static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1,
2851 const unsigned long *src2, int nbits)
2852{
2853 if (nbits <= 32)
2854 *dst = *src1 ^ *src2;
2855 else
2856 __bitmap_xor(dst, src1, src2, nbits);
2857}
2858
2859static inline __attribute__((always_inline)) void bitmap_andnot(unsigned long *dst, const unsigned long *src1,
2860 const unsigned long *src2, int nbits)
2861{
2862 if (nbits <= 32)
2863 *dst = *src1 & ~(*src2);
2864 else
2865 __bitmap_andnot(dst, src1, src2, nbits);
2866}
2867
2868static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src,
2869 int nbits)
2870{
2871 if (nbits <= 32)
2872 *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2873 else
2874 __bitmap_complement(dst, src, nbits);
2875}
2876
2877static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1,
2878 const unsigned long *src2, int nbits)
2879{
2880 if (nbits <= 32)
2881 return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2882 else
2883 return __bitmap_equal(src1, src2, nbits);
2884}
2885
2886static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1,
2887 const unsigned long *src2, int nbits)
2888{
2889 if (nbits <= 32)
2890 return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0;
2891 else
2892 return __bitmap_intersects(src1, src2, nbits);
2893}
2894
2895static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1,
2896 const unsigned long *src2, int nbits)
2897{
2898 if (nbits <= 32)
2899 return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2900 else
2901 return __bitmap_subset(src1, src2, nbits);
2902}
2903
2904static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits)
2905{
2906 if (nbits <= 32)
2907 return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2908 else
2909 return __bitmap_empty(src, nbits);
2910}
2911
2912static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits)
2913{
2914 if (nbits <= 32)
2915 return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2916 else
2917 return __bitmap_full(src, nbits);
2918}
2919
2920static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits)
2921{
2922 if (nbits <= 32)
2923 return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2924 return __bitmap_weight(src, nbits);
2925}
2926
2927static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst,
2928 const unsigned long *src, int n, int nbits)
2929{
2930 if (nbits <= 32)
2931 *dst = *src >> n;
2932 else
2933 __bitmap_shift_right(dst, src, n, nbits);
2934}
2935
2936static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst,
2937 const unsigned long *src, int n, int nbits)
2938{
2939 if (nbits <= 32)
2940 *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2941 else
2942 __bitmap_shift_left(dst, src, n, nbits);
2943}
2944
2945static inline __attribute__((always_inline)) int bitmap_parse(const char *buf, unsigned int buflen,
2946 unsigned long *maskp, int nmaskbits)
2947{
2948 return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
2949}
2950# 87 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/cpumask.h" 2
2951
2952typedef struct { unsigned long bits[(((1)+32 -1)/32)]; } cpumask_t;
2953extern cpumask_t _unused_cpumask_arg_;
2954
2955
2956static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp)
2957{
2958 set_bit(cpu, dstp->bits);
2959}
2960
2961
2962static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp)
2963{
2964 clear_bit(cpu, dstp->bits);
2965}
2966
2967
2968static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits)
2969{
2970 bitmap_fill(dstp->bits, nbits);
2971}
2972
2973
2974static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits)
2975{
2976 bitmap_zero(dstp->bits, nbits);
2977}
2978
2979
2980
2981
2982
2983static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr)
2984{
2985 return test_and_set_bit(cpu, addr->bits);
2986}
2987
2988
2989static inline __attribute__((always_inline)) void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
2990 const cpumask_t *src2p, int nbits)
2991{
2992 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
2993}
2994
2995
2996static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
2997 const cpumask_t *src2p, int nbits)
2998{
2999 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
3000}
3001
3002
3003static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
3004 const cpumask_t *src2p, int nbits)
3005{
3006 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
3007}
3008
3009
3010
3011static inline __attribute__((always_inline)) void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
3012 const cpumask_t *src2p, int nbits)
3013{
3014 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
3015}
3016
3017
3018static inline __attribute__((always_inline)) void __cpus_complement(cpumask_t *dstp,
3019 const cpumask_t *srcp, int nbits)
3020{
3021 bitmap_complement(dstp->bits, srcp->bits, nbits);
3022}
3023
3024
3025static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p,
3026 const cpumask_t *src2p, int nbits)
3027{
3028 return bitmap_equal(src1p->bits, src2p->bits, nbits);
3029}
3030
3031
3032static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p,
3033 const cpumask_t *src2p, int nbits)
3034{
3035 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
3036}
3037
3038
3039static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p,
3040 const cpumask_t *src2p, int nbits)
3041{
3042 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3043}
3044
3045
3046static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits)
3047{
3048 return bitmap_empty(srcp->bits, nbits);
3049}
3050
3051
3052static inline __attribute__((always_inline)) int __cpus_full(const cpumask_t *srcp, int nbits)
3053{
3054 return bitmap_full(srcp->bits, nbits);
3055}
3056
3057
3058static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits)
3059{
3060 return bitmap_weight(srcp->bits, nbits);
3061}
3062
3063
3064
3065static inline __attribute__((always_inline)) void __cpus_shift_right(cpumask_t *dstp,
3066 const cpumask_t *srcp, int n, int nbits)
3067{
3068 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3069}
3070
3071
3072
3073static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp,
3074 const cpumask_t *srcp, int n, int nbits)
3075{
3076 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3077}
3078# 270 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/cpumask.h"
3079static inline __attribute__((always_inline)) int __cpumask_scnprintf(char *buf, int len,
3080 const cpumask_t *srcp, int nbits)
3081{
3082 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3083}
3084
3085
3086
3087static inline __attribute__((always_inline)) int __cpumask_parse_user(const char *buf, int len,
3088 cpumask_t *dstp, int nbits)
3089{
3090 return bitmap_parse_user(buf, len, dstp->bits, nbits);
3091}
3092
3093
3094
3095static inline __attribute__((always_inline)) int __cpulist_scnprintf(char *buf, int len,
3096 const cpumask_t *srcp, int nbits)
3097{
3098 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3099}
3100
3101
3102static inline __attribute__((always_inline)) int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
3103{
3104 return bitmap_parselist(buf, dstp->bits, nbits);
3105}
3106
3107
3108
3109static inline __attribute__((always_inline)) int __cpu_remap(int oldbit,
3110 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
3111{
3112 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3113}
3114
3115
3116
3117static inline __attribute__((always_inline)) void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp,
3118 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
3119{
3120 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3121}
3122# 380 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/cpumask.h"
3123extern cpumask_t cpu_possible_map;
3124extern cpumask_t cpu_online_map;
3125extern cpumask_t cpu_present_map;
3126# 55 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
3127# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/errno.h" 1
3128
3129
3130
3131# 1 "include2/asm/errno.h" 1
3132
3133
3134
3135# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/errno.h" 1
3136
3137
3138
3139# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/errno-base.h" 1
3140# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/errno.h" 2
3141# 5 "include2/asm/errno.h" 2
3142# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/errno.h" 2
3143# 56 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
3144# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nodemask.h" 1
3145# 86 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nodemask.h"
3146# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/numa.h" 1
3147# 87 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nodemask.h" 2
3148
3149typedef struct { unsigned long bits[((((1 << 0))+32 -1)/32)]; } nodemask_t;
3150extern nodemask_t _unused_nodemask_arg_;
3151
3152
3153static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp)
3154{
3155 set_bit(node, dstp->bits);
3156}
3157
3158
3159static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp)
3160{
3161 clear_bit(node, dstp->bits);
3162}
3163
3164
3165static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits)
3166{
3167 bitmap_fill(dstp->bits, nbits);
3168}
3169
3170
3171static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits)
3172{
3173 bitmap_zero(dstp->bits, nbits);
3174}
3175
3176
3177
3178
3179
3180
3181static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr)
3182{
3183 return test_and_set_bit(node, addr->bits);
3184}
3185
3186
3187
3188static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
3189 const nodemask_t *src2p, int nbits)
3190{
3191 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
3192}
3193
3194
3195
3196static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
3197 const nodemask_t *src2p, int nbits)
3198{
3199 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
3200}
3201
3202
3203
3204static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
3205 const nodemask_t *src2p, int nbits)
3206{
3207 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
3208}
3209
3210
3211
3212static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
3213 const nodemask_t *src2p, int nbits)
3214{
3215 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
3216}
3217
3218
3219
3220static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp,
3221 const nodemask_t *srcp, int nbits)
3222{
3223 bitmap_complement(dstp->bits, srcp->bits, nbits);
3224}
3225
3226
3227
3228static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p,
3229 const nodemask_t *src2p, int nbits)
3230{
3231 return bitmap_equal(src1p->bits, src2p->bits, nbits);
3232}
3233
3234
3235
3236static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p,
3237 const nodemask_t *src2p, int nbits)
3238{
3239 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
3240}
3241
3242
3243
3244static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p,
3245 const nodemask_t *src2p, int nbits)
3246{
3247 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3248}
3249
3250
3251static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits)
3252{
3253 return bitmap_empty(srcp->bits, nbits);
3254}
3255
3256
3257static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits)
3258{
3259 return bitmap_full(srcp->bits, nbits);
3260}
3261
3262
3263static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits)
3264{
3265 return bitmap_weight(srcp->bits, nbits);
3266}
3267
3268
3269
3270static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp,
3271 const nodemask_t *srcp, int n, int nbits)
3272{
3273 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3274}
3275
3276
3277
3278static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp,
3279 const nodemask_t *srcp, int n, int nbits)
3280{
3281 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3282}
3283
3284
3285
3286
3287
3288static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp)
3289{
3290 return ({ int __x = ((1 << 0)); int __y = (find_next_bit((srcp->bits), ((1 << 0)), 0)); __x < __y ? __x: __y; });
3291}
3292
3293
3294static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp)
3295{
3296 return ({ int __x = ((1 << 0)); int __y = (find_next_bit(srcp->bits, (1 << 0), n+1)); __x < __y ? __x: __y; });
3297}
3298# 251 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nodemask.h"
3299static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp)
3300{
3301 return ({ int __x = ((1 << 0)); int __y = (find_next_zero_bit((maskp->bits), ((1 << 0)), 0)); __x < __y ? __x: __y; });
3302
3303}
3304# 285 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nodemask.h"
3305static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len,
3306 const nodemask_t *srcp, int nbits)
3307{
3308 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3309}
3310
3311
3312
3313static inline __attribute__((always_inline)) int __nodemask_parse_user(const char *buf, int len,
3314 nodemask_t *dstp, int nbits)
3315{
3316 return bitmap_parse_user(buf, len, dstp->bits, nbits);
3317}
3318
3319
3320
3321static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len,
3322 const nodemask_t *srcp, int nbits)
3323{
3324 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3325}
3326
3327
3328static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
3329{
3330 return bitmap_parselist(buf, dstp->bits, nbits);
3331}
3332
3333
3334
3335static inline __attribute__((always_inline)) int __node_remap(int oldbit,
3336 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3337{
3338 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3339}
3340
3341
3342
3343static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp,
3344 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3345{
3346 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3347}
3348# 345 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nodemask.h"
3349extern nodemask_t node_online_map;
3350extern nodemask_t node_possible_map;
3351# 57 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
3352
3353
3354# 1 "include2/asm/semaphore.h" 1
3355# 17 "include2/asm/semaphore.h"
3356# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem.h" 1
3357# 19 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem.h"
3358struct rw_semaphore;
3359
3360
3361# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem-spinlock.h" 1
3362# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem-spinlock.h"
3363# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h" 1
3364
3365
3366
3367
3368
3369
3370# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/poison.h" 1
3371# 8 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h" 2
3372# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/prefetch.h" 1
3373# 58 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/prefetch.h"
3374static inline __attribute__((always_inline)) void prefetch_range(void *addr, size_t len)
3375{
3376
3377 char *cp;
3378 char *end = addr + len;
3379
3380 for (cp = addr; cp < end; cp += (1 << 5))
3381 prefetch(cp);
3382
3383}
3384# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h" 2
3385# 21 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3386struct list_head {
3387 struct list_head *next, *prev;
3388};
3389
3390
3391
3392
3393
3394
3395static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list)
3396{
3397 list->next = list;
3398 list->prev = list;
3399}
3400# 43 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3401static inline __attribute__((always_inline)) void __list_add(struct list_head *new,
3402 struct list_head *prev,
3403 struct list_head *next)
3404{
3405 next->prev = new;
3406 new->next = next;
3407 new->prev = prev;
3408 prev->next = new;
3409}
3410# 67 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3411static inline __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head)
3412{
3413 __list_add(new, head, head->next);
3414}
3415# 84 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3416static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head)
3417{
3418 __list_add(new, head->prev, head);
3419}
3420
3421
3422
3423
3424
3425
3426
3427static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head * new,
3428 struct list_head * prev, struct list_head * next)
3429{
3430 new->next = next;
3431 new->prev = prev;
3432 __asm__ __volatile__("": : :"memory");
3433 next->prev = new;
3434 prev->next = new;
3435}
3436# 121 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3437static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head)
3438{
3439 __list_add_rcu(new, head, head->next);
3440}
3441# 142 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3442static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new,
3443 struct list_head *head)
3444{
3445 __list_add_rcu(new, head->prev, head);
3446}
3447# 155 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3448static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next)
3449{
3450 next->prev = prev;
3451 prev->next = next;
3452}
3453# 168 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3454static inline __attribute__((always_inline)) void list_del(struct list_head *entry)
3455{
3456 __list_del(entry->prev, entry->next);
3457 entry->next = ((void *) 0x00100100);
3458 entry->prev = ((void *) 0x00200200);
3459}
3460# 202 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3461static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry)
3462{
3463 __list_del(entry->prev, entry->next);
3464 entry->prev = ((void *) 0x00200200);
3465}
3466
3467
3468
3469
3470
3471
3472
3473static inline __attribute__((always_inline)) void list_replace(struct list_head *old,
3474 struct list_head *new)
3475{
3476 new->next = old->next;
3477 new->next->prev = new;
3478 new->prev = old->prev;
3479 new->prev->next = new;
3480}
3481
3482static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old,
3483 struct list_head *new)
3484{
3485 list_replace(old, new);
3486 INIT_LIST_HEAD(old);
3487}
3488# 238 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3489static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old,
3490 struct list_head *new)
3491{
3492 new->next = old->next;
3493 new->prev = old->prev;
3494 __asm__ __volatile__("": : :"memory");
3495 new->next->prev = new;
3496 new->prev->next = new;
3497 old->prev = ((void *) 0x00200200);
3498}
3499
3500
3501
3502
3503
3504static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry)
3505{
3506 __list_del(entry->prev, entry->next);
3507 INIT_LIST_HEAD(entry);
3508}
3509
3510
3511
3512
3513
3514
3515static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head)
3516{
3517 __list_del(list->prev, list->next);
3518 list_add(list, head);
3519}
3520
3521
3522
3523
3524
3525
3526static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list,
3527 struct list_head *head)
3528{
3529 __list_del(list->prev, list->next);
3530 list_add_tail(list, head);
3531}
3532
3533
3534
3535
3536
3537
3538static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list,
3539 const struct list_head *head)
3540{
3541 return list->next == head;
3542}
3543
3544
3545
3546
3547
3548static inline __attribute__((always_inline)) int list_empty(const struct list_head *head)
3549{
3550 return head->next == head;
3551}
3552# 315 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3553static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head)
3554{
3555 struct list_head *next = head->next;
3556 return (next == head) && (next == head->prev);
3557}
3558
3559static inline __attribute__((always_inline)) void __list_splice(struct list_head *list,
3560 struct list_head *head)
3561{
3562 struct list_head *first = list->next;
3563 struct list_head *last = list->prev;
3564 struct list_head *at = head->next;
3565
3566 first->prev = head;
3567 head->next = first;
3568
3569 last->next = at;
3570 at->prev = last;
3571}
3572
3573
3574
3575
3576
3577
3578static inline __attribute__((always_inline)) void list_splice(struct list_head *list, struct list_head *head)
3579{
3580 if (!list_empty(list))
3581 __list_splice(list, head);
3582}
3583# 353 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3584static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list,
3585 struct list_head *head)
3586{
3587 if (!list_empty(list)) {
3588 __list_splice(list, head);
3589 INIT_LIST_HEAD(list);
3590 }
3591}
3592# 607 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3593struct hlist_head {
3594 struct hlist_node *first;
3595};
3596
3597struct hlist_node {
3598 struct hlist_node *next, **pprev;
3599};
3600
3601
3602
3603
3604static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h)
3605{
3606 h->next = ((void *)0);
3607 h->pprev = ((void *)0);
3608}
3609
3610static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h)
3611{
3612 return !h->pprev;
3613}
3614
3615static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h)
3616{
3617 return !h->first;
3618}
3619
3620static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n)
3621{
3622 struct hlist_node *next = n->next;
3623 struct hlist_node **pprev = n->pprev;
3624 *pprev = next;
3625 if (next)
3626 next->pprev = pprev;
3627}
3628
3629static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n)
3630{
3631 __hlist_del(n);
3632 n->next = ((void *) 0x00100100);
3633 n->pprev = ((void *) 0x00200200);
3634}
3635# 669 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3636static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n)
3637{
3638 __hlist_del(n);
3639 n->pprev = ((void *) 0x00200200);
3640}
3641
3642static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n)
3643{
3644 if (!hlist_unhashed(n)) {
3645 __hlist_del(n);
3646 INIT_HLIST_NODE(n);
3647 }
3648}
3649# 690 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3650static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old,
3651 struct hlist_node *new)
3652{
3653 struct hlist_node *next = old->next;
3654
3655 new->next = next;
3656 new->pprev = old->pprev;
3657 __asm__ __volatile__("": : :"memory");
3658 if (next)
3659 new->next->pprev = &new->next;
3660 *new->pprev = new;
3661 old->pprev = ((void *) 0x00200200);
3662}
3663
3664static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
3665{
3666 struct hlist_node *first = h->first;
3667 n->next = first;
3668 if (first)
3669 first->pprev = &n->next;
3670 h->first = n;
3671 n->pprev = &h->first;
3672}
3673# 734 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3674static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n,
3675 struct hlist_head *h)
3676{
3677 struct hlist_node *first = h->first;
3678 n->next = first;
3679 n->pprev = &h->first;
3680 __asm__ __volatile__("": : :"memory");
3681 if (first)
3682 first->pprev = &n->next;
3683 h->first = n;
3684}
3685
3686
3687static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n,
3688 struct hlist_node *next)
3689{
3690 n->pprev = next->pprev;
3691 n->next = next;
3692 next->pprev = &n->next;
3693 *(n->pprev) = n;
3694}
3695
3696static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n,
3697 struct hlist_node *next)
3698{
3699 next->next = n->next;
3700 n->next = next;
3701 next->pprev = &n->next;
3702
3703 if(next->next)
3704 next->next->pprev = &next->next;
3705}
3706# 785 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3707static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n,
3708 struct hlist_node *next)
3709{
3710 n->pprev = next->pprev;
3711 n->next = next;
3712 __asm__ __volatile__("": : :"memory");
3713 next->pprev = &n->next;
3714 *(n->pprev) = n;
3715}
3716# 813 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/list.h"
3717static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev,
3718 struct hlist_node *n)
3719{
3720 n->next = prev->next;
3721 n->pprev = &prev->next;
3722 __asm__ __volatile__("": : :"memory");
3723 prev->next = n;
3724 if (n->next)
3725 n->next->pprev = &n->next;
3726}
3727# 17 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem-spinlock.h" 2
3728
3729
3730
3731
3732
3733struct rwsem_waiter;
3734# 31 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem-spinlock.h"
3735struct rw_semaphore {
3736 __s32 activity;
3737 spinlock_t wait_lock;
3738 struct list_head wait_list;
3739
3740
3741
3742};
3743# 52 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem-spinlock.h"
3744extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
3745 struct lock_class_key *key);
3746# 62 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem-spinlock.h"
3747extern void __down_read(struct rw_semaphore *sem);
3748extern int __down_read_trylock(struct rw_semaphore *sem);
3749extern void __down_write(struct rw_semaphore *sem);
3750extern void __down_write_nested(struct rw_semaphore *sem, int subclass);
3751extern int __down_write_trylock(struct rw_semaphore *sem);
3752extern void __up_read(struct rw_semaphore *sem);
3753extern void __up_write(struct rw_semaphore *sem);
3754extern void __downgrade_write(struct rw_semaphore *sem);
3755
3756static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem)
3757{
3758 return (sem->activity != 0);
3759}
3760# 23 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rwsem.h" 2
3761
3762
3763
3764
3765
3766
3767
3768extern void down_read(struct rw_semaphore *sem);
3769
3770
3771
3772
3773extern int down_read_trylock(struct rw_semaphore *sem);
3774
3775
3776
3777
3778extern void down_write(struct rw_semaphore *sem);
3779
3780
3781
3782
3783extern int down_write_trylock(struct rw_semaphore *sem);
3784
3785
3786
3787
3788extern void up_read(struct rw_semaphore *sem);
3789
3790
3791
3792
3793extern void up_write(struct rw_semaphore *sem);
3794
3795
3796
3797
3798extern void downgrade_write(struct rw_semaphore *sem);
3799# 18 "include2/asm/semaphore.h" 2
3800# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/wait.h" 1
3801# 28 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/wait.h"
3802typedef struct __wait_queue wait_queue_t;
3803typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key);
3804int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3805
3806struct __wait_queue {
3807 unsigned int flags;
3808
3809 void *private;
3810 wait_queue_func_t func;
3811 struct list_head task_list;
3812};
3813
3814struct wait_bit_key {
3815 void *flags;
3816 int bit_nr;
3817};
3818
3819struct wait_bit_queue {
3820 struct wait_bit_key key;
3821 wait_queue_t wait;
3822};
3823
3824struct __wait_queue_head {
3825 spinlock_t lock;
3826 struct list_head task_list;
3827};
3828typedef struct __wait_queue_head wait_queue_head_t;
3829
3830struct task_struct;
3831# 80 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/wait.h"
3832extern void init_waitqueue_head(wait_queue_head_t *q);
3833
3834static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
3835{
3836 q->flags = 0;
3837 q->private = p;
3838 q->func = default_wake_function;
3839}
3840
3841static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q,
3842 wait_queue_func_t func)
3843{
3844 q->flags = 0;
3845 q->private = ((void *)0);
3846 q->func = func;
3847}
3848
3849static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q)
3850{
3851 return !list_empty(&q->task_list);
3852}
3853# 111 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/wait.h"
3854extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
3855extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait);
3856extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
3857
3858static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
3859{
3860 list_add(&new->task_list, &head->task_list);
3861}
3862
3863
3864
3865
3866static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head,
3867 wait_queue_t *new)
3868{
3869 list_add_tail(&new->task_list, &head->task_list);
3870}
3871
3872static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head,
3873 wait_queue_t *old)
3874{
3875 list_del(&old->task_list);
3876}
3877
3878void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
3879extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
3880extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
3881void __wake_up_bit(wait_queue_head_t *, void *, int);
3882int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
3883int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
3884void wake_up_bit(void *, int);
3885int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned);
3886int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned);
3887wait_queue_head_t *bit_waitqueue(void *, int);
3888# 342 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/wait.h"
3889static inline __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
3890 wait_queue_t * wait)
3891{
3892 wait->flags |= 0x01;
3893 __add_wait_queue_tail(q, wait);
3894}
3895
3896
3897
3898
3899static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q,
3900 wait_queue_t * wait)
3901{
3902 __remove_wait_queue(q, wait);
3903}
3904
3905
3906
3907
3908
3909
3910extern void sleep_on(wait_queue_head_t *q);
3911extern long sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3912
3913extern void interruptible_sleep_on(wait_queue_head_t *q);
3914extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3915
3916
3917
3918
3919
3920void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
3921
3922void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
3923
3924void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
3925int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3926int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3927# 420 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/wait.h"
3928static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit,
3929 int (*action)(void *), unsigned mode)
3930{
3931 if (!test_bit(bit, word))
3932 return 0;
3933 return out_of_line_wait_on_bit(word, bit, action, mode);
3934}
3935# 444 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/wait.h"
3936static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit,
3937 int (*action)(void *), unsigned mode)
3938{
3939 if (!test_and_set_bit(bit, word))
3940 return 0;
3941 return out_of_line_wait_on_bit_lock(word, bit, action, mode);
3942}
3943# 19 "include2/asm/semaphore.h" 2
3944
3945
3946
3947
3948struct semaphore {
3949 atomic_t count;
3950 int sleepers;
3951 wait_queue_head_t wait;
3952};
3953# 42 "include2/asm/semaphore.h"
3954static inline __attribute__((always_inline)) void sema_init (struct semaphore *sem, int val)
3955{
3956
3957
3958
3959
3960
3961
3962 ((&sem->count)->counter = (val));
3963 sem->sleepers = 0;
3964 init_waitqueue_head(&sem->wait);
3965}
3966
3967static inline __attribute__((always_inline)) void init_MUTEX (struct semaphore *sem)
3968{
3969 sema_init(sem, 1);
3970}
3971
3972static inline __attribute__((always_inline)) void init_MUTEX_LOCKED (struct semaphore *sem)
3973{
3974 sema_init(sem, 0);
3975}
3976# 72 "include2/asm/semaphore.h"
3977 void __down(struct semaphore * sem);
3978 int __down_interruptible(struct semaphore * sem);
3979 int __down_trylock(struct semaphore * sem);
3980 void __up(struct semaphore * sem);
3981
3982extern spinlock_t semaphore_wake_lock;
3983
3984static inline __attribute__((always_inline)) void down(struct semaphore * sem)
3985{
3986 do { do { } while (0); } while (0);
3987 if (atomic_sub_return(1,(&sem->count)) < 0)
3988 __down(sem);
3989}
3990
3991static inline __attribute__((always_inline)) int down_interruptible(struct semaphore * sem)
3992{
3993 int ret = 0;
3994
3995 do { do { } while (0); } while (0);
3996 if (atomic_sub_return(1,(&sem->count)) < 0)
3997 ret = __down_interruptible(sem);
3998 return ret;
3999}
4000
4001static inline __attribute__((always_inline)) int down_trylock(struct semaphore * sem)
4002{
4003 int ret = 0;
4004
4005 if (atomic_sub_return(1,(&sem->count)) < 0)
4006 ret = __down_trylock(sem);
4007 return ret;
4008}
4009
4010
4011
4012
4013
4014static inline __attribute__((always_inline)) void up(struct semaphore * sem)
4015{
4016 if (atomic_add_return(1,(&sem->count)) <= 0)
4017 __up(sem);
4018}
4019# 60 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4020
4021
4022# 1 "include2/asm/mmu.h" 1
4023# 14 "include2/asm/mmu.h"
4024typedef unsigned long mm_context_id_t;
4025
4026typedef struct {
4027 mm_context_id_t id;
4028 void *vdso;
4029} mm_context_t;
4030# 47 "include2/asm/mmu.h"
4031struct pmb_entry;
4032
4033struct pmb_entry {
4034 unsigned long vpn;
4035 unsigned long ppn;
4036 unsigned long flags;
4037
4038
4039
4040
4041
4042 int entry;
4043
4044 struct pmb_entry *next;
4045
4046 struct pmb_entry *link;
4047};
4048
4049
4050int __set_pmb_entry(unsigned long vpn, unsigned long ppn,
4051 unsigned long flags, int *entry);
4052int set_pmb_entry(struct pmb_entry *pmbe);
4053void clear_pmb_entry(struct pmb_entry *pmbe);
4054struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
4055 unsigned long flags);
4056void pmb_free(struct pmb_entry *pmbe);
4057long pmb_remap(unsigned long virt, unsigned long phys,
4058 unsigned long size, unsigned long flags);
4059void pmb_unmap(unsigned long addr);
4060# 63 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4061# 1 "include2/asm/cputime.h" 1
4062
4063
4064
4065# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/cputime.h" 1
4066
4067
4068
4069
4070
4071
4072typedef unsigned long cputime_t;
4073# 23 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/cputime.h"
4074typedef u64 cputime64_t;
4075# 5 "include2/asm/cputime.h" 2
4076# 64 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4077
4078# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/smp.h" 1
4079# 10 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/smp.h"
4080extern void cpu_idle(void);
4081# 87 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/smp.h"
4082static inline __attribute__((always_inline)) int up_smp_call_function(void)
4083{
4084 return 0;
4085}
4086# 99 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/smp.h"
4087static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) { }
4088# 131 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/smp.h"
4089void smp_setup_processor_id(void);
4090# 66 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4091# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sem.h" 1
4092
4093
4094
4095# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ipc.h" 1
4096# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ipc.h"
4097struct ipc_perm
4098{
4099 __kernel_key_t key;
4100 __kernel_uid_t uid;
4101 __kernel_gid_t gid;
4102 __kernel_uid_t cuid;
4103 __kernel_gid_t cgid;
4104 __kernel_mode_t mode;
4105 unsigned short seq;
4106};
4107
4108
4109# 1 "include2/asm/ipcbuf.h" 1
4110# 14 "include2/asm/ipcbuf.h"
4111struct ipc64_perm
4112{
4113 __kernel_key_t key;
4114 __kernel_uid32_t uid;
4115 __kernel_gid32_t gid;
4116 __kernel_uid32_t cuid;
4117 __kernel_gid32_t cgid;
4118 __kernel_mode_t mode;
4119 unsigned short __pad1;
4120 unsigned short seq;
4121 unsigned short __pad2;
4122 unsigned long __unused1;
4123 unsigned long __unused2;
4124};
4125# 22 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ipc.h" 2
4126# 54 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ipc.h"
4127# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kref.h" 1
4128# 23 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kref.h"
4129struct kref {
4130 atomic_t refcount;
4131};
4132
4133void kref_init(struct kref *kref);
4134void kref_get(struct kref *kref);
4135int kref_put(struct kref *kref, void (*release) (struct kref *kref));
4136# 55 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ipc.h" 2
4137
4138
4139
4140
4141struct kern_ipc_perm
4142{
4143 spinlock_t lock;
4144 int deleted;
4145 key_t key;
4146 uid_t uid;
4147 gid_t gid;
4148 uid_t cuid;
4149 gid_t cgid;
4150 mode_t mode;
4151 unsigned long seq;
4152 void *security;
4153};
4154
4155struct ipc_ids;
4156struct ipc_namespace {
4157 struct kref kref;
4158 struct ipc_ids *ids[3];
4159
4160 int sem_ctls[4];
4161 int used_sems;
4162
4163 int msg_ctlmax;
4164 int msg_ctlmnb;
4165 int msg_ctlmni;
4166
4167 size_t shm_ctlmax;
4168 size_t shm_ctlall;
4169 int shm_ctlmni;
4170 int shm_tot;
4171};
4172
4173extern struct ipc_namespace init_ipc_ns;
4174# 104 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ipc.h"
4175static inline __attribute__((always_inline)) int copy_ipcs(unsigned long flags, struct task_struct *tsk)
4176{
4177 return 0;
4178}
4179
4180
4181static inline __attribute__((always_inline)) struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
4182{
4183
4184
4185
4186
4187 return ns;
4188}
4189
4190static inline __attribute__((always_inline)) void put_ipc_ns(struct ipc_namespace *ns)
4191{
4192
4193
4194
4195}
4196# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sem.h" 2
4197# 23 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sem.h"
4198struct semid_ds {
4199 struct ipc_perm sem_perm;
4200 __kernel_time_t sem_otime;
4201 __kernel_time_t sem_ctime;
4202 struct sem *sem_base;
4203 struct sem_queue *sem_pending;
4204 struct sem_queue **sem_pending_last;
4205 struct sem_undo *undo;
4206 unsigned short sem_nsems;
4207};
4208
4209
4210# 1 "include2/asm/sembuf.h" 1
4211# 14 "include2/asm/sembuf.h"
4212struct semid64_ds {
4213 struct ipc64_perm sem_perm;
4214 __kernel_time_t sem_otime;
4215 unsigned long __unused1;
4216 __kernel_time_t sem_ctime;
4217 unsigned long __unused2;
4218 unsigned long sem_nsems;
4219 unsigned long __unused3;
4220 unsigned long __unused4;
4221};
4222# 36 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sem.h" 2
4223
4224
4225struct sembuf {
4226 unsigned short sem_num;
4227 short sem_op;
4228 short sem_flg;
4229};
4230
4231
4232union semun {
4233 int val;
4234 struct semid_ds *buf;
4235 unsigned short *array;
4236 struct seminfo *__buf;
4237 void *__pad;
4238};
4239
4240struct seminfo {
4241 int semmap;
4242 int semmni;
4243 int semmns;
4244 int semmnu;
4245 int semmsl;
4246 int semopm;
4247 int semume;
4248 int semusz;
4249 int semvmx;
4250 int semaem;
4251};
4252# 82 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sem.h"
4253struct task_struct;
4254
4255
4256struct sem {
4257 int semval;
4258 int sempid;
4259};
4260
4261
4262struct sem_array {
4263 struct kern_ipc_perm sem_perm;
4264 int sem_id;
4265 time_t sem_otime;
4266 time_t sem_ctime;
4267 struct sem *sem_base;
4268 struct sem_queue *sem_pending;
4269 struct sem_queue **sem_pending_last;
4270 struct sem_undo *undo;
4271 unsigned long sem_nsems;
4272};
4273
4274
4275struct sem_queue {
4276 struct sem_queue * next;
4277 struct sem_queue ** prev;
4278 struct task_struct* sleeper;
4279 struct sem_undo * undo;
4280 int pid;
4281 int status;
4282 struct sem_array * sma;
4283 int id;
4284 struct sembuf * sops;
4285 int nsops;
4286 int alter;
4287};
4288
4289
4290
4291
4292struct sem_undo {
4293 struct sem_undo * proc_next;
4294 struct sem_undo * id_next;
4295 int semid;
4296 short * semadj;
4297};
4298
4299
4300
4301
4302struct sem_undo_list {
4303 atomic_t refcnt;
4304 spinlock_t lock;
4305 struct sem_undo *proc_list;
4306};
4307
4308struct sysv_sem {
4309 struct sem_undo_list *undo_list;
4310};
4311
4312
4313
4314extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
4315extern void exit_sem(struct task_struct *tsk);
4316# 67 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4317# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/signal.h" 1
4318
4319
4320
4321# 1 "include2/asm/signal.h" 1
4322
4323
4324
4325
4326
4327
4328struct pt_regs;
4329struct siginfo;
4330# 18 "include2/asm/signal.h"
4331typedef unsigned long old_sigset_t;
4332
4333typedef struct {
4334 unsigned long sig[(64 / 32)];
4335} sigset_t;
4336# 109 "include2/asm/signal.h"
4337# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/signal.h" 1
4338# 17 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/signal.h"
4339typedef void __signalfn_t(int);
4340typedef __signalfn_t *__sighandler_t;
4341
4342typedef void __restorefn_t(void);
4343typedef __restorefn_t *__sigrestore_t;
4344# 110 "include2/asm/signal.h" 2
4345
4346
4347struct old_sigaction {
4348 __sighandler_t sa_handler;
4349 old_sigset_t sa_mask;
4350 unsigned long sa_flags;
4351 void (*sa_restorer)(void);
4352};
4353
4354struct sigaction {
4355 __sighandler_t sa_handler;
4356 unsigned long sa_flags;
4357 void (*sa_restorer)(void);
4358 sigset_t sa_mask;
4359};
4360
4361struct k_sigaction {
4362 struct sigaction sa;
4363};
4364# 147 "include2/asm/signal.h"
4365typedef struct sigaltstack {
4366 void *ss_sp;
4367 int ss_flags;
4368 size_t ss_size;
4369} stack_t;
4370
4371
4372# 1 "include2/asm/sigcontext.h" 1
4373
4374
4375
4376struct sigcontext {
4377 unsigned long oldmask;
4378
4379
4380 unsigned long sc_regs[16];
4381 unsigned long sc_pc;
4382 unsigned long sc_pr;
4383 unsigned long sc_sr;
4384 unsigned long sc_gbr;
4385 unsigned long sc_mach;
4386 unsigned long sc_macl;
4387
4388
4389
4390 unsigned long sc_fpregs[16];
4391 unsigned long sc_xfpregs[16];
4392 unsigned int sc_fpscr;
4393 unsigned int sc_fpul;
4394 unsigned int sc_ownedfp;
4395
4396};
4397# 155 "include2/asm/signal.h" 2
4398# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/signal.h" 2
4399# 1 "include2/asm/siginfo.h" 1
4400
4401
4402
4403# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/siginfo.h" 1
4404
4405
4406
4407
4408
4409
4410typedef union sigval {
4411 int sival_int;
4412 void *sival_ptr;
4413} sigval_t;
4414# 40 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/siginfo.h"
4415typedef struct siginfo {
4416 int si_signo;
4417 int si_errno;
4418 int si_code;
4419
4420 union {
4421 int _pad[((128 - (3 * sizeof(int))) / sizeof(int))];
4422
4423
4424 struct {
4425 pid_t _pid;
4426 uid_t _uid;
4427 } _kill;
4428
4429
4430 struct {
4431 timer_t _tid;
4432 int _overrun;
4433 char _pad[sizeof( uid_t) - sizeof(int)];
4434 sigval_t _sigval;
4435 int _sys_private;
4436 } _timer;
4437
4438
4439 struct {
4440 pid_t _pid;
4441 uid_t _uid;
4442 sigval_t _sigval;
4443 } _rt;
4444
4445
4446 struct {
4447 pid_t _pid;
4448 uid_t _uid;
4449 int _status;
4450 clock_t _utime;
4451 clock_t _stime;
4452 } _sigchld;
4453
4454
4455 struct {
4456 void *_addr;
4457
4458
4459
4460 } _sigfault;
4461
4462
4463 struct {
4464 long _band;
4465 int _fd;
4466 } _sigpoll;
4467 } _sifields;
4468} siginfo_t;
4469# 251 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/siginfo.h"
4470typedef struct sigevent {
4471 sigval_t sigev_value;
4472 int sigev_signo;
4473 int sigev_notify;
4474 union {
4475 int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))];
4476 int _tid;
4477
4478 struct {
4479 void (*_function)(sigval_t);
4480 void *_attribute;
4481 } _sigev_thread;
4482 } _sigev_un;
4483} sigevent_t;
4484
4485
4486
4487
4488
4489
4490
4491struct siginfo;
4492void do_schedule_next_timer(struct siginfo *info);
4493
4494
4495
4496
4497
4498static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from)
4499{
4500 if (from->si_code < 0)
4501 memcpy(to, from, sizeof(*to));
4502 else
4503
4504 memcpy(to, from, (3 * sizeof(int)) + sizeof(from->_sifields._sigchld));
4505}
4506
4507
4508
4509extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from);
4510# 5 "include2/asm/siginfo.h" 2
4511# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/signal.h" 2
4512# 15 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/signal.h"
4513struct sigqueue {
4514 struct list_head list;
4515 int flags;
4516 siginfo_t info;
4517 struct user_struct *user;
4518};
4519
4520
4521
4522
4523struct sigpending {
4524 struct list_head list;
4525 sigset_t signal;
4526};
4527# 39 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/signal.h"
4528static inline __attribute__((always_inline)) void sigaddset(sigset_t *set, int _sig)
4529{
4530 unsigned long sig = _sig - 1;
4531 if ((64 / 32) == 1)
4532 set->sig[0] |= 1UL << sig;
4533 else
4534 set->sig[sig / 32] |= 1UL << (sig % 32);
4535}
4536
4537static inline __attribute__((always_inline)) void sigdelset(sigset_t *set, int _sig)
4538{
4539 unsigned long sig = _sig - 1;
4540 if ((64 / 32) == 1)
4541 set->sig[0] &= ~(1UL << sig);
4542 else
4543 set->sig[sig / 32] &= ~(1UL << (sig % 32));
4544}
4545
4546static inline __attribute__((always_inline)) int sigismember(sigset_t *set, int _sig)
4547{
4548 unsigned long sig = _sig - 1;
4549 if ((64 / 32) == 1)
4550 return 1 & (set->sig[0] >> sig);
4551 else
4552 return 1 & (set->sig[sig / 32] >> (sig % 32));
4553}
4554
4555static inline __attribute__((always_inline)) int sigfindinword(unsigned long word)
4556{
4557 return ffz(~word);
4558}
4559
4560
4561
4562static inline __attribute__((always_inline)) int sigisemptyset(sigset_t *set)
4563{
4564 extern void _NSIG_WORDS_is_unsupported_size(void);
4565 switch ((64 / 32)) {
4566 case 4:
4567 return (set->sig[3] | set->sig[2] |
4568 set->sig[1] | set->sig[0]) == 0;
4569 case 2:
4570 return (set->sig[1] | set->sig[0]) == 0;
4571 case 1:
4572 return set->sig[0] == 0;
4573 default:
4574 _NSIG_WORDS_is_unsupported_size();
4575 return 0;
4576 }
4577}
4578# 120 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/signal.h"
4579static inline __attribute__((always_inline)) void sigorsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) | (b3)); r->sig[2] = ((a2) | (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) | (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) | (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
4580
4581
4582static inline __attribute__((always_inline)) void sigandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & (b3)); r->sig[2] = ((a2) & (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
4583
4584
4585static inline __attribute__((always_inline)) void signandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & ~(b3)); r->sig[2] = ((a2) & ~(b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & ~(b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & ~(b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
4586# 150 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/signal.h"
4587static inline __attribute__((always_inline)) void signotset(sigset_t *set) { extern void _NSIG_WORDS_is_unsupported_size(void); switch ((64 / 32)) { case 4: set->sig[3] = (~(set->sig[3])); set->sig[2] = (~(set->sig[2])); case 2: set->sig[1] = (~(set->sig[1])); case 1: set->sig[0] = (~(set->sig[0])); break; default: _NSIG_WORDS_is_unsupported_size(); } }
4588
4589
4590
4591
4592static inline __attribute__((always_inline)) void sigemptyset(sigset_t *set)
4593{
4594 switch ((64 / 32)) {
4595 default:
4596 memset(set, 0, sizeof(sigset_t));
4597 break;
4598 case 2: set->sig[1] = 0;
4599 case 1: set->sig[0] = 0;
4600 break;
4601 }
4602}
4603
4604static inline __attribute__((always_inline)) void sigfillset(sigset_t *set)
4605{
4606 switch ((64 / 32)) {
4607 default:
4608 memset(set, -1, sizeof(sigset_t));
4609 break;
4610 case 2: set->sig[1] = -1;
4611 case 1: set->sig[0] = -1;
4612 break;
4613 }
4614}
4615
4616
4617
4618static inline __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask)
4619{
4620 set->sig[0] |= mask;
4621}
4622
4623static inline __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask)
4624{
4625 set->sig[0] &= ~mask;
4626}
4627
4628static inline __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask)
4629{
4630 return (set->sig[0] & mask) != 0;
4631}
4632
4633static inline __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask)
4634{
4635 set->sig[0] = mask;
4636 switch ((64 / 32)) {
4637 default:
4638 memset(&set->sig[1], 0, sizeof(long)*((64 / 32)-1));
4639 break;
4640 case 2: set->sig[1] = 0;
4641 case 1: ;
4642 }
4643}
4644
4645static inline __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask)
4646{
4647 set->sig[0] = ~mask;
4648 switch ((64 / 32)) {
4649 default:
4650 memset(&set->sig[1], -1, sizeof(long)*((64 / 32)-1));
4651 break;
4652 case 2: set->sig[1] = -1;
4653 case 1: ;
4654 }
4655}
4656
4657
4658
4659static inline __attribute__((always_inline)) void init_sigpending(struct sigpending *sig)
4660{
4661 sigemptyset(&sig->signal);
4662 INIT_LIST_HEAD(&sig->list);
4663}
4664
4665extern void flush_sigqueue(struct sigpending *queue);
4666
4667
4668static inline __attribute__((always_inline)) int valid_signal(unsigned long sig)
4669{
4670 return sig <= 64 ? 1 : 0;
4671}
4672
4673extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
4674extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
4675extern long do_sigpending(void *, unsigned long);
4676extern int sigprocmask(int, sigset_t *, sigset_t *);
4677
4678struct pt_regs;
4679extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
4680# 68 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4681# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/securebits.h" 1
4682
4683
4684
4685
4686
4687extern unsigned securebits;
4688# 69 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4689# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs_struct.h" 1
4690
4691
4692
4693struct dentry;
4694struct vfsmount;
4695
4696struct fs_struct {
4697 atomic_t count;
4698 rwlock_t lock;
4699 int umask;
4700 struct dentry * root, * pwd, * altroot;
4701 struct vfsmount * rootmnt, * pwdmnt, * altrootmnt;
4702};
4703
4704
4705
4706
4707
4708
4709
4710extern void exit_fs(struct task_struct *);
4711extern void set_fs_altroot(void);
4712extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *);
4713extern void set_fs_pwd(struct fs_struct *, struct vfsmount *, struct dentry *);
4714extern struct fs_struct *copy_fs_struct(struct fs_struct *);
4715extern void put_fs_struct(struct fs_struct *);
4716# 70 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4717
4718# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/completion.h" 1
4719# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/completion.h"
4720struct completion {
4721 unsigned int done;
4722 wait_queue_head_t wait;
4723};
4724# 39 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/completion.h"
4725static inline __attribute__((always_inline)) void init_completion(struct completion *x)
4726{
4727 x->done = 0;
4728 init_waitqueue_head(&x->wait);
4729}
4730
4731extern void wait_for_completion(struct completion *);
4732extern int wait_for_completion_interruptible(struct completion *x);
4733extern unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout);
4734
4735extern unsigned long wait_for_completion_interruptible_timeout( struct completion *x, unsigned long timeout);
4736
4737
4738extern void complete(struct completion *);
4739extern void complete_all(struct completion *);
4740# 72 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
4741# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pid.h" 1
4742
4743
4744
4745# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rcupdate.h" 1
4746# 38 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rcupdate.h"
4747# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/cache.h" 1
4748# 39 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rcupdate.h" 2
4749
4750
4751# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/percpu.h" 1
4752
4753
4754
4755
4756# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h" 1
4757# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h"
4758typedef struct kmem_cache kmem_cache_t;
4759
4760# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/gfp.h" 1
4761
4762
4763
4764# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h" 1
4765# 27 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4766struct free_area {
4767 struct list_head free_list;
4768 unsigned long nr_free;
4769};
4770
4771struct pglist_data;
4772# 49 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4773enum zone_stat_item {
4774 NR_ANON_PAGES,
4775 NR_FILE_MAPPED,
4776
4777 NR_FILE_PAGES,
4778 NR_SLAB_RECLAIMABLE,
4779 NR_SLAB_UNRECLAIMABLE,
4780 NR_PAGETABLE,
4781 NR_FILE_DIRTY,
4782 NR_WRITEBACK,
4783 NR_UNSTABLE_NFS,
4784 NR_BOUNCE,
4785 NR_VMSCAN_WRITE,
4786# 70 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4787 NR_VM_ZONE_STAT_ITEMS };
4788
4789struct per_cpu_pages {
4790 int count;
4791 int high;
4792 int batch;
4793 struct list_head list;
4794};
4795
4796struct per_cpu_pageset {
4797 struct per_cpu_pages pcp[2];
4798
4799
4800
4801
4802} ;
4803
4804
4805
4806
4807
4808
4809
4810enum zone_type {
4811# 113 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4812 ZONE_DMA,
4813# 127 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4814 ZONE_NORMAL,
4815# 139 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4816 MAX_NR_ZONES
4817};
4818# 156 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4819struct zone {
4820
4821 unsigned long free_pages;
4822 unsigned long pages_min, pages_low, pages_high;
4823# 168 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4824 unsigned long lowmem_reserve[MAX_NR_ZONES];
4825# 179 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4826 struct per_cpu_pageset pageset[1];
4827
4828
4829
4830
4831 spinlock_t lock;
4832
4833
4834
4835
4836 struct free_area free_area[11];
4837
4838
4839
4840
4841
4842 spinlock_t lru_lock;
4843 struct list_head active_list;
4844 struct list_head inactive_list;
4845 unsigned long nr_scan_active;
4846 unsigned long nr_scan_inactive;
4847 unsigned long nr_active;
4848 unsigned long nr_inactive;
4849 unsigned long pages_scanned;
4850 int all_unreclaimable;
4851
4852
4853 atomic_t reclaim_in_progress;
4854
4855
4856 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
4857# 227 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4858 int temp_priority;
4859 int prev_priority;
4860
4861
4862
4863# 258 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4864 wait_queue_head_t * wait_table;
4865 unsigned long wait_table_hash_nr_entries;
4866 unsigned long wait_table_bits;
4867
4868
4869
4870
4871 struct pglist_data *zone_pgdat;
4872
4873 unsigned long zone_start_pfn;
4874# 279 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4875 unsigned long spanned_pages;
4876 unsigned long present_pages;
4877
4878
4879
4880
4881 char *name;
4882} ;
4883# 306 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4884struct zonelist {
4885 struct zone *zones[(1 << 0) * MAX_NR_ZONES + 1];
4886};
4887# 320 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4888extern struct page *mem_map;
4889# 334 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4890struct bootmem_data;
4891typedef struct pglist_data {
4892 struct zone node_zones[MAX_NR_ZONES];
4893 struct zonelist node_zonelists[MAX_NR_ZONES];
4894 int nr_zones;
4895
4896 struct page *node_mem_map;
4897
4898 struct bootmem_data *bdata;
4899# 353 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4900 unsigned long node_start_pfn;
4901 unsigned long node_present_pages;
4902 unsigned long node_spanned_pages;
4903
4904 int node_id;
4905 wait_queue_head_t kswapd_wait;
4906 struct task_struct *kswapd;
4907 int kswapd_max_order;
4908} pg_data_t;
4909# 372 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
4910# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/memory_hotplug.h" 1
4911
4912
4913
4914# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h" 1
4915# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/memory_hotplug.h" 2
4916
4917
4918# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/notifier.h" 1
4919# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/notifier.h"
4920# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mutex.h" 1
4921# 47 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mutex.h"
4922struct mutex {
4923
4924 atomic_t count;
4925 spinlock_t wait_lock;
4926 struct list_head wait_list;
4927# 60 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mutex.h"
4928};
4929
4930
4931
4932
4933
4934struct mutex_waiter {
4935 struct list_head list;
4936 struct task_struct *task;
4937
4938
4939
4940
4941};
4942# 105 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mutex.h"
4943extern void __mutex_init(struct mutex *lock, const char *name,
4944 struct lock_class_key *key);
4945
4946
4947
4948
4949
4950
4951
4952static inline __attribute__((always_inline)) int mutex_is_locked(struct mutex *lock)
4953{
4954 return ((&lock->count)->counter) != 1;
4955}
4956
4957
4958
4959
4960
4961extern void mutex_lock(struct mutex *lock);
4962extern int mutex_lock_interruptible(struct mutex *lock);
4963# 136 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mutex.h"
4964extern int mutex_trylock(struct mutex *lock);
4965extern void mutex_unlock(struct mutex *lock);
4966# 14 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/notifier.h" 2
4967
4968# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/srcu.h" 1
4969# 30 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/srcu.h"
4970struct srcu_struct_array {
4971 int c[2];
4972};
4973
4974struct srcu_struct {
4975 int completed;
4976 struct srcu_struct_array *per_cpu_ref;
4977 struct mutex mutex;
4978};
4979
4980
4981
4982
4983
4984
4985
4986int init_srcu_struct(struct srcu_struct *sp);
4987void cleanup_srcu_struct(struct srcu_struct *sp);
4988int srcu_read_lock(struct srcu_struct *sp) ;
4989void srcu_read_unlock(struct srcu_struct *sp, int idx) ;
4990void synchronize_srcu(struct srcu_struct *sp);
4991long srcu_batches_completed(struct srcu_struct *sp);
4992# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/notifier.h" 2
4993# 50 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/notifier.h"
4994struct notifier_block {
4995 int (*notifier_call)(struct notifier_block *, unsigned long, void *);
4996 struct notifier_block *next;
4997 int priority;
4998};
4999
5000struct atomic_notifier_head {
5001 spinlock_t lock;
5002 struct notifier_block *head;
5003};
5004
5005struct blocking_notifier_head {
5006 struct rw_semaphore rwsem;
5007 struct notifier_block *head;
5008};
5009
5010struct raw_notifier_head {
5011 struct notifier_block *head;
5012};
5013
5014struct srcu_notifier_head {
5015 struct mutex mutex;
5016 struct srcu_struct srcu;
5017 struct notifier_block *head;
5018};
5019# 89 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/notifier.h"
5020extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
5021# 115 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/notifier.h"
5022extern int atomic_notifier_chain_register(struct atomic_notifier_head *,
5023 struct notifier_block *);
5024extern int blocking_notifier_chain_register(struct blocking_notifier_head *,
5025 struct notifier_block *);
5026extern int raw_notifier_chain_register(struct raw_notifier_head *,
5027 struct notifier_block *);
5028extern int srcu_notifier_chain_register(struct srcu_notifier_head *,
5029 struct notifier_block *);
5030
5031extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *,
5032 struct notifier_block *);
5033extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *,
5034 struct notifier_block *);
5035extern int raw_notifier_chain_unregister(struct raw_notifier_head *,
5036 struct notifier_block *);
5037extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *,
5038 struct notifier_block *);
5039
5040extern int atomic_notifier_call_chain(struct atomic_notifier_head *,
5041 unsigned long val, void *v);
5042extern int blocking_notifier_call_chain(struct blocking_notifier_head *,
5043 unsigned long val, void *v);
5044extern int raw_notifier_call_chain(struct raw_notifier_head *,
5045 unsigned long val, void *v);
5046extern int srcu_notifier_call_chain(struct srcu_notifier_head *,
5047 unsigned long val, void *v);
5048# 8 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/memory_hotplug.h" 2
5049
5050struct page;
5051struct zone;
5052struct pglist_data;
5053# 140 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/memory_hotplug.h"
5054static inline __attribute__((always_inline)) void pgdat_resize_lock(struct pglist_data *p, unsigned long *f) {}
5055static inline __attribute__((always_inline)) void pgdat_resize_unlock(struct pglist_data *p, unsigned long *f) {}
5056static inline __attribute__((always_inline)) void pgdat_resize_init(struct pglist_data *pgdat) {}
5057
5058static inline __attribute__((always_inline)) unsigned zone_span_seqbegin(struct zone *zone)
5059{
5060 return 0;
5061}
5062static inline __attribute__((always_inline)) int zone_span_seqretry(struct zone *zone, unsigned iv)
5063{
5064 return 0;
5065}
5066static inline __attribute__((always_inline)) void zone_span_writelock(struct zone *zone) {}
5067static inline __attribute__((always_inline)) void zone_span_writeunlock(struct zone *zone) {}
5068static inline __attribute__((always_inline)) void zone_seqlock_init(struct zone *zone) {}
5069
5070static inline __attribute__((always_inline)) int mhp_notimplemented(const char *func)
5071{
5072 printk("<4>" "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
5073 dump_stack();
5074 return -38;
5075}
5076
5077
5078static inline __attribute__((always_inline)) int __remove_pages(struct zone *zone, unsigned long start_pfn,
5079 unsigned long nr_pages)
5080{
5081 printk("<4>" "%s() called, not yet supported\n", (__func__));
5082 dump_stack();
5083 return -38;
5084}
5085
5086extern int add_memory(int nid, u64 start, u64 size);
5087extern int arch_add_memory(int nid, u64 start, u64 size);
5088extern int remove_memory(u64 start, u64 size);
5089extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
5090 int nr_pages);
5091# 373 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h" 2
5092
5093void __get_zone_counts(unsigned long *active, unsigned long *inactive,
5094 unsigned long *free, struct pglist_data *pgdat);
5095void get_zone_counts(unsigned long *active, unsigned long *inactive,
5096 unsigned long *free);
5097void build_all_zonelists(void);
5098void wakeup_kswapd(struct zone *zone, int order);
5099int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
5100 int classzone_idx, int alloc_flags);
5101
5102extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
5103 unsigned long size);
5104
5105
5106
5107
5108static inline __attribute__((always_inline)) void memory_present(int nid, unsigned long start, unsigned long end) {}
5109# 401 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
5110static inline __attribute__((always_inline)) int populated_zone(struct zone *zone)
5111{
5112 return (!!zone->present_pages);
5113}
5114
5115static inline __attribute__((always_inline)) int is_highmem_idx(enum zone_type idx)
5116{
5117
5118
5119
5120 return 0;
5121
5122}
5123
5124static inline __attribute__((always_inline)) int is_normal_idx(enum zone_type idx)
5125{
5126 return (idx == ZONE_NORMAL);
5127}
5128
5129
5130
5131
5132
5133
5134
5135static inline __attribute__((always_inline)) int is_highmem(struct zone *zone)
5136{
5137
5138
5139
5140 return 0;
5141
5142}
5143
5144static inline __attribute__((always_inline)) int is_normal(struct zone *zone)
5145{
5146 return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL;
5147}
5148
5149static inline __attribute__((always_inline)) int is_dma32(struct zone *zone)
5150{
5151
5152
5153
5154 return 0;
5155
5156}
5157
5158static inline __attribute__((always_inline)) int is_dma(struct zone *zone)
5159{
5160 return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
5161}
5162
5163
5164struct ctl_table;
5165struct file;
5166int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *,
5167 void *, size_t *, loff_t *);
5168extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];
5169int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,
5170 void *, size_t *, loff_t *);
5171int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *,
5172 void *, size_t *, loff_t *);
5173int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
5174 struct file *, void *, size_t *, loff_t *);
5175int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
5176 struct file *, void *, size_t *, loff_t *);
5177
5178# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/topology.h" 1
5179# 34 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/topology.h"
5180# 1 "include2/asm/topology.h" 1
5181
5182
5183
5184# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/topology.h" 1
5185# 5 "include2/asm/topology.h" 2
5186# 35 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/topology.h" 2
5187# 470 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h" 2
5188
5189
5190
5191
5192
5193
5194
5195extern struct pglist_data contig_page_data;
5196# 488 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
5197extern struct pglist_data *first_online_pgdat(void);
5198extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
5199extern struct zone *next_zone(struct zone *zone);
5200# 681 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmzone.h"
5201void memory_present(int nid, unsigned long start, unsigned long end);
5202unsigned long __attribute__ ((__section__ (".init.text"))) node_memmap_size_bytes(int, unsigned long, unsigned long);
5203# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/gfp.h" 2
5204
5205
5206
5207struct vm_area_struct;
5208# 86 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/gfp.h"
5209static inline __attribute__((always_inline)) enum zone_type gfp_zone(gfp_t flags)
5210{
5211 if (flags & (( gfp_t)0x01u))
5212 return ZONE_DMA;
5213# 98 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/gfp.h"
5214 return ZONE_NORMAL;
5215}
5216# 117 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/gfp.h"
5217static inline __attribute__((always_inline)) void arch_free_page(struct page *page, int order) { }
5218
5219
5220extern struct page *
5221__alloc_pages(gfp_t, unsigned int, struct zonelist *);
5222
5223static inline __attribute__((always_inline)) struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
5224 unsigned int order)
5225{
5226 if (__builtin_expect(!!(order >= 11), 0))
5227 return ((void *)0);
5228
5229
5230 if (nid < 0)
5231 nid = ((0));
5232
5233 return __alloc_pages(gfp_mask, order,
5234 (&contig_page_data)->node_zonelists + gfp_zone(gfp_mask));
5235}
5236# 157 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/gfp.h"
5237extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
5238extern unsigned long get_zeroed_page(gfp_t gfp_mask);
5239
5240
5241
5242
5243
5244
5245
5246extern void __free_pages(struct page *page, unsigned int order);
5247extern void free_pages(unsigned long addr, unsigned int order);
5248extern void free_hot_page(struct page *page);
5249extern void free_cold_page(struct page *page);
5250
5251
5252
5253
5254void page_alloc_init(void);
5255
5256
5257
5258static inline __attribute__((always_inline)) void drain_node_pages(int node) { };
5259# 15 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h" 2
5260# 58 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h"
5261extern void __attribute__ ((__section__ (".init.text"))) kmem_cache_init(void);
5262
5263extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
5264 void (*)(void *, kmem_cache_t *, unsigned long),
5265 void (*)(void *, kmem_cache_t *, unsigned long));
5266extern void kmem_cache_destroy(kmem_cache_t *);
5267extern int kmem_cache_shrink(kmem_cache_t *);
5268extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
5269extern void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
5270extern void kmem_cache_free(kmem_cache_t *, void *);
5271extern unsigned int kmem_cache_size(kmem_cache_t *);
5272extern const char *kmem_cache_name(kmem_cache_t *);
5273
5274
5275struct cache_sizes {
5276 size_t cs_size;
5277 kmem_cache_t *cs_cachep;
5278 kmem_cache_t *cs_dmacachep;
5279};
5280extern struct cache_sizes malloc_sizes[];
5281
5282extern void *__kmalloc(size_t, gfp_t);
5283# 126 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h"
5284static inline __attribute__((always_inline)) void *kmalloc(size_t size, gfp_t flags)
5285{
5286 if (__builtin_constant_p(size)) {
5287 int i = 0;
5288
5289
5290
5291
5292
5293# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kmalloc_sizes.h" 1
5294
5295 if (size <= 32) goto found; else i++;
5296
5297 if (size <= 64) goto found; else i++;
5298
5299 if (size <= 96) goto found; else i++;
5300
5301 if (size <= 128) goto found; else i++;
5302
5303 if (size <= 192) goto found; else i++;
5304
5305 if (size <= 256) goto found; else i++;
5306 if (size <= 512) goto found; else i++;
5307 if (size <= 1024) goto found; else i++;
5308 if (size <= 2048) goto found; else i++;
5309 if (size <= 4096) goto found; else i++;
5310 if (size <= 8192) goto found; else i++;
5311 if (size <= 16384) goto found; else i++;
5312 if (size <= 32768) goto found; else i++;
5313 if (size <= 65536) goto found; else i++;
5314 if (size <= 131072) goto found; else i++;
5315# 136 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h" 2
5316
5317 {
5318 extern void __you_cannot_kmalloc_that_much(void);
5319 __you_cannot_kmalloc_that_much();
5320 }
5321found:
5322 return kmem_cache_alloc((flags & (( gfp_t)0x01u)) ?
5323 malloc_sizes[i].cs_dmacachep :
5324 malloc_sizes[i].cs_cachep, flags);
5325 }
5326 return __kmalloc(size, flags);
5327}
5328# 166 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h"
5329extern void *__kzalloc(size_t, gfp_t);
5330
5331
5332
5333
5334
5335
5336static inline __attribute__((always_inline)) void *kzalloc(size_t size, gfp_t flags)
5337{
5338 if (__builtin_constant_p(size)) {
5339 int i = 0;
5340
5341
5342
5343
5344
5345# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kmalloc_sizes.h" 1
5346
5347 if (size <= 32) goto found; else i++;
5348
5349 if (size <= 64) goto found; else i++;
5350
5351 if (size <= 96) goto found; else i++;
5352
5353 if (size <= 128) goto found; else i++;
5354
5355 if (size <= 192) goto found; else i++;
5356
5357 if (size <= 256) goto found; else i++;
5358 if (size <= 512) goto found; else i++;
5359 if (size <= 1024) goto found; else i++;
5360 if (size <= 2048) goto found; else i++;
5361 if (size <= 4096) goto found; else i++;
5362 if (size <= 8192) goto found; else i++;
5363 if (size <= 16384) goto found; else i++;
5364 if (size <= 32768) goto found; else i++;
5365 if (size <= 65536) goto found; else i++;
5366 if (size <= 131072) goto found; else i++;
5367# 183 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h" 2
5368
5369 {
5370 extern void __you_cannot_kzalloc_that_much(void);
5371 __you_cannot_kzalloc_that_much();
5372 }
5373found:
5374 return kmem_cache_zalloc((flags & (( gfp_t)0x01u)) ?
5375 malloc_sizes[i].cs_dmacachep :
5376 malloc_sizes[i].cs_cachep, flags);
5377 }
5378 return __kzalloc(size, flags);
5379}
5380
5381
5382
5383
5384
5385
5386
5387static inline __attribute__((always_inline)) void *kcalloc(size_t n, size_t size, gfp_t flags)
5388{
5389 if (n != 0 && size > (~0UL) / n)
5390 return ((void *)0);
5391 return kzalloc(n * size, flags);
5392}
5393
5394extern void kfree(const void *);
5395extern unsigned int ksize(const void *);
5396extern int slab_is_available(void);
5397# 240 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h"
5398static inline __attribute__((always_inline)) void *kmem_cache_alloc_node(kmem_cache_t *cachep, gfp_t flags, int node)
5399{
5400 return kmem_cache_alloc(cachep, flags);
5401}
5402static inline __attribute__((always_inline)) void *kmalloc_node(size_t size, gfp_t flags, int node)
5403{
5404 return kmalloc(size, flags);
5405}
5406
5407
5408extern int kmem_cache_reap(int);
5409extern int kmem_ptr_validate(kmem_cache_t *cachep, void *ptr);
5410# 289 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/slab.h"
5411extern kmem_cache_t *vm_area_cachep;
5412extern kmem_cache_t *names_cachep;
5413extern kmem_cache_t *files_cachep;
5414extern kmem_cache_t *filp_cachep;
5415extern kmem_cache_t *fs_cachep;
5416extern kmem_cache_t *sighand_cachep;
5417extern kmem_cache_t *bio_cachep;
5418# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/percpu.h" 2
5419
5420
5421
5422
5423# 1 "include2/asm/percpu.h" 1
5424
5425
5426
5427# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/percpu.h" 1
5428# 5 "include2/asm/percpu.h" 2
5429# 11 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/percpu.h" 2
5430# 57 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/percpu.h"
5431static inline __attribute__((always_inline)) void percpu_depopulate(void *__pdata, int cpu)
5432{
5433}
5434
5435static inline __attribute__((always_inline)) void __percpu_depopulate_mask(void *__pdata, cpumask_t *mask)
5436{
5437}
5438
5439static inline __attribute__((always_inline)) void *percpu_populate(void *__pdata, size_t size, gfp_t gfp,
5440 int cpu)
5441{
5442 return ({ (void)(cpu); (__pdata); });
5443}
5444
5445static inline __attribute__((always_inline)) int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp,
5446 cpumask_t *mask)
5447{
5448 return 0;
5449}
5450
5451static inline __attribute__((always_inline)) __attribute__((always_inline)) void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask)
5452{
5453 return kzalloc(size, gfp);
5454}
5455
5456static inline __attribute__((always_inline)) void percpu_free(void *__pdata)
5457{
5458 kfree(__pdata);
5459}
5460# 42 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rcupdate.h" 2
5461# 50 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rcupdate.h"
5462struct rcu_head {
5463 struct rcu_head *next;
5464 void (*func)(struct rcu_head *head);
5465};
5466# 64 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rcupdate.h"
5467struct rcu_ctrlblk {
5468 long cur;
5469 long completed;
5470 int next_pending;
5471
5472 int signaled;
5473
5474 spinlock_t lock ;
5475 cpumask_t cpumask;
5476
5477} ;
5478
5479
5480static inline __attribute__((always_inline)) int rcu_batch_before(long a, long b)
5481{
5482 return (a - b) < 0;
5483}
5484
5485
5486static inline __attribute__((always_inline)) int rcu_batch_after(long a, long b)
5487{
5488 return (a - b) > 0;
5489}
5490
5491
5492
5493
5494
5495
5496struct rcu_data {
5497
5498 long quiescbatch;
5499 int passed_quiesc;
5500 int qs_pending;
5501
5502
5503 long batch;
5504 struct rcu_head *nxtlist;
5505 struct rcu_head **nxttail;
5506 long qlen;
5507 struct rcu_head *curlist;
5508 struct rcu_head **curtail;
5509 struct rcu_head *donelist;
5510 struct rcu_head **donetail;
5511 long blimit;
5512 int cpu;
5513 struct rcu_head barrier;
5514};
5515
5516extern __typeof__(struct rcu_data) per_cpu__rcu_data;
5517extern __typeof__(struct rcu_data) per_cpu__rcu_bh_data;
5518
5519
5520
5521
5522
5523
5524
5525static inline __attribute__((always_inline)) void rcu_qsctr_inc(int cpu)
5526{
5527 struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_data));
5528 rdp->passed_quiesc = 1;
5529}
5530static inline __attribute__((always_inline)) void rcu_bh_qsctr_inc(int cpu)
5531{
5532 struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_bh_data));
5533 rdp->passed_quiesc = 1;
5534}
5535
5536extern int rcu_pending(int cpu);
5537extern int rcu_needs_cpu(int cpu);
5538# 272 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rcupdate.h"
5539extern void rcu_init(void);
5540extern void rcu_check_callbacks(int cpu, int user);
5541extern void rcu_restart_cpu(int cpu);
5542extern long rcu_batches_completed(void);
5543extern long rcu_batches_completed_bh(void);
5544
5545
5546extern void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head));
5547
5548extern void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *head));
5549
5550extern void synchronize_rcu(void);
5551void synchronize_idle(void);
5552extern void rcu_barrier(void);
5553# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pid.h" 2
5554
5555enum pid_type
5556{
5557 PIDTYPE_PID,
5558 PIDTYPE_PGID,
5559 PIDTYPE_SID,
5560 PIDTYPE_MAX
5561};
5562# 42 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pid.h"
5563struct pid
5564{
5565 atomic_t count;
5566
5567 int nr;
5568 struct hlist_node pid_chain;
5569
5570 struct hlist_head tasks[PIDTYPE_MAX];
5571 struct rcu_head rcu;
5572};
5573
5574struct pid_link
5575{
5576 struct hlist_node node;
5577 struct pid *pid;
5578};
5579
5580static inline __attribute__((always_inline)) struct pid *get_pid(struct pid *pid)
5581{
5582 if (pid)
5583 atomic_add(1,(&pid->count));
5584 return pid;
5585}
5586
5587extern void put_pid(struct pid *pid);
5588extern struct task_struct *pid_task(struct pid *pid, enum pid_type);
5589extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type);
5590
5591
5592extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
5593
5594
5595
5596
5597
5598extern int attach_pid(struct task_struct *task, enum pid_type type, int nr);
5599
5600
5601extern void detach_pid(struct task_struct *task, enum pid_type);
5602extern void transfer_pid(struct task_struct *old, struct task_struct *new, enum pid_type);
5603
5604
5605
5606
5607
5608
5609extern struct pid *find_pid(int nr);
5610
5611
5612
5613
5614extern struct pid *find_get_pid(int nr);
5615extern struct pid *find_ge_pid(int nr);
5616
5617extern struct pid *alloc_pid(void);
5618extern void free_pid(struct pid *pid);
5619
5620static inline __attribute__((always_inline)) pid_t pid_nr(struct pid *pid)
5621{
5622 pid_t nr = 0;
5623 if (pid)
5624 nr = pid->nr;
5625 return nr;
5626}
5627# 73 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
5628
5629
5630# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/seccomp.h" 1
5631# 28 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/seccomp.h"
5632typedef struct { } seccomp_t;
5633
5634
5635
5636static inline __attribute__((always_inline)) int has_secure_computing(struct thread_info *ti)
5637{
5638 return 0;
5639}
5640# 76 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
5641
5642# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/futex.h" 1
5643
5644
5645
5646# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 1
5647# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/futex.h" 2
5648# 33 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/futex.h"
5649struct robust_list {
5650 struct robust_list *next;
5651};
5652# 45 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/futex.h"
5653struct robust_list_head {
5654
5655
5656
5657 struct robust_list list;
5658
5659
5660
5661
5662
5663
5664
5665 long futex_offset;
5666# 69 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/futex.h"
5667 struct robust_list *list_op_pending;
5668};
5669# 96 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/futex.h"
5670long do_futex(u32 *uaddr, int op, u32 val, unsigned long timeout,
5671 u32 *uaddr2, u32 val2, u32 val3);
5672
5673extern int
5674handle_futex_death(u32 *uaddr, struct task_struct *curr, int pi);
5675
5676
5677extern void exit_robust_list(struct task_struct *curr);
5678extern void exit_pi_state_list(struct task_struct *curr);
5679# 78 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
5680# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rtmutex.h" 1
5681# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rtmutex.h"
5682# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/plist.h" 1
5683# 80 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/plist.h"
5684struct plist_head {
5685 struct list_head prio_list;
5686 struct list_head node_list;
5687
5688
5689
5690};
5691
5692struct plist_node {
5693 int prio;
5694 struct plist_head plist;
5695};
5696# 128 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/plist.h"
5697static inline __attribute__((always_inline)) void
5698plist_head_init(struct plist_head *head, spinlock_t *lock)
5699{
5700 INIT_LIST_HEAD(&head->prio_list);
5701 INIT_LIST_HEAD(&head->node_list);
5702
5703
5704
5705}
5706
5707
5708
5709
5710
5711
5712
5713static inline __attribute__((always_inline)) void plist_node_init(struct plist_node *node, int prio)
5714{
5715 node->prio = prio;
5716 plist_head_init(&node->plist, ((void *)0));
5717}
5718
5719extern void plist_add(struct plist_node *node, struct plist_head *head);
5720extern void plist_del(struct plist_node *node, struct plist_head *head);
5721# 200 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/plist.h"
5722static inline __attribute__((always_inline)) int plist_head_empty(const struct plist_head *head)
5723{
5724 return list_empty(&head->node_list);
5725}
5726
5727
5728
5729
5730
5731
5732static inline __attribute__((always_inline)) int plist_node_empty(const struct plist_node *node)
5733{
5734 return plist_head_empty(&node->plist);
5735}
5736# 242 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/plist.h"
5737static inline __attribute__((always_inline)) struct plist_node* plist_first(const struct plist_head *head)
5738{
5739 return ({ const typeof( ((struct plist_node *)0)->plist.node_list ) *__mptr = (head->node_list.next); (struct plist_node *)( (char *)__mptr - __builtin_offsetof(struct plist_node,plist.node_list) );});
5740
5741}
5742# 17 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rtmutex.h" 2
5743# 26 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rtmutex.h"
5744struct rt_mutex {
5745 spinlock_t wait_lock;
5746 struct plist_head wait_list;
5747 struct task_struct *owner;
5748
5749
5750
5751
5752
5753
5754};
5755
5756struct rt_mutex_waiter;
5757struct hrtimer_sleeper;
5758
5759
5760
5761
5762
5763
5764 static inline __attribute__((always_inline)) int rt_mutex_debug_check_no_locks_freed(const void *from,
5765 unsigned long len)
5766 {
5767 return 0;
5768 }
5769# 80 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/rtmutex.h"
5770static inline __attribute__((always_inline)) int rt_mutex_is_locked(struct rt_mutex *lock)
5771{
5772 return lock->owner != ((void *)0);
5773}
5774
5775extern void __rt_mutex_init(struct rt_mutex *lock, const char *name);
5776extern void rt_mutex_destroy(struct rt_mutex *lock);
5777
5778extern void rt_mutex_lock(struct rt_mutex *lock);
5779extern int rt_mutex_lock_interruptible(struct rt_mutex *lock,
5780 int detect_deadlock);
5781extern int rt_mutex_timed_lock(struct rt_mutex *lock,
5782 struct hrtimer_sleeper *timeout,
5783 int detect_deadlock);
5784
5785extern int rt_mutex_trylock(struct rt_mutex *lock);
5786
5787extern void rt_mutex_unlock(struct rt_mutex *lock);
5788# 79 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
5789
5790
5791# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/param.h" 1
5792# 82 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
5793# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/resource.h" 1
5794
5795
5796
5797
5798
5799struct task_struct;
5800# 23 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/resource.h"
5801struct rusage {
5802 struct timeval ru_utime;
5803 struct timeval ru_stime;
5804 long ru_maxrss;
5805 long ru_ixrss;
5806 long ru_idrss;
5807 long ru_isrss;
5808 long ru_minflt;
5809 long ru_majflt;
5810 long ru_nswap;
5811 long ru_inblock;
5812 long ru_oublock;
5813 long ru_msgsnd;
5814 long ru_msgrcv;
5815 long ru_nsignals;
5816 long ru_nvcsw;
5817 long ru_nivcsw;
5818};
5819
5820struct rlimit {
5821 unsigned long rlim_cur;
5822 unsigned long rlim_max;
5823};
5824# 70 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/resource.h"
5825# 1 "include2/asm/resource.h" 1
5826
5827
5828
5829# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/resource.h" 1
5830# 5 "include2/asm/resource.h" 2
5831# 71 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/resource.h" 2
5832
5833int getrusage(struct task_struct *p, int who, struct rusage *ru);
5834# 83 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
5835# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timer.h" 1
5836
5837
5838
5839
5840
5841
5842
5843struct tvec_t_base_s;
5844
5845struct timer_list {
5846 struct list_head entry;
5847 unsigned long expires;
5848
5849 void (*function)(unsigned long);
5850 unsigned long data;
5851
5852 struct tvec_t_base_s *base;
5853};
5854
5855extern struct tvec_t_base_s boot_tvec_bases;
5856# 33 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timer.h"
5857void init_timer(struct timer_list * timer);
5858
5859static inline __attribute__((always_inline)) void setup_timer(struct timer_list * timer,
5860 void (*function)(unsigned long),
5861 unsigned long data)
5862{
5863 timer->function = function;
5864 timer->data = data;
5865 init_timer(timer);
5866}
5867# 54 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timer.h"
5868static inline __attribute__((always_inline)) int timer_pending(const struct timer_list * timer)
5869{
5870 return timer->entry.next != ((void *)0);
5871}
5872
5873extern void add_timer_on(struct timer_list *timer, int cpu);
5874extern int del_timer(struct timer_list * timer);
5875extern int __mod_timer(struct timer_list *timer, unsigned long expires);
5876extern int mod_timer(struct timer_list *timer, unsigned long expires);
5877
5878extern unsigned long next_timer_interrupt(void);
5879# 80 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timer.h"
5880static inline __attribute__((always_inline)) void add_timer(struct timer_list *timer)
5881{
5882 do { if (__builtin_expect(!!((timer_pending(timer))!=0), 0)) do { printk("kernel BUG at %s:%d!\n", "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timer.h", 82); *(volatile int *)0 = 0; } while (0); } while(0);
5883 __mod_timer(timer, timer->expires);
5884}
5885# 96 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/timer.h"
5886extern void init_timers(void);
5887extern void run_local_timers(void);
5888struct hrtimer;
5889extern int it_real_fn(struct hrtimer *);
5890# 84 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
5891# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hrtimer.h" 1
5892# 19 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hrtimer.h"
5893# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ktime.h" 1
5894# 46 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ktime.h"
5895typedef union {
5896 s64 tv64;
5897
5898 struct {
5899
5900
5901
5902 s32 nsec, sec;
5903
5904 } tv;
5905
5906} ktime_t;
5907# 138 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ktime.h"
5908static inline __attribute__((always_inline)) ktime_t ktime_set(const long secs, const unsigned long nsecs)
5909{
5910 return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } };
5911}
5912# 150 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ktime.h"
5913static inline __attribute__((always_inline)) ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
5914{
5915 ktime_t res;
5916
5917 res.tv64 = lhs.tv64 - rhs.tv64;
5918 if (res.tv.nsec < 0)
5919 res.tv.nsec += 1000000000L;
5920
5921 return res;
5922}
5923# 168 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ktime.h"
5924static inline __attribute__((always_inline)) ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
5925{
5926 ktime_t res;
5927
5928 res.tv64 = add1.tv64 + add2.tv64;
5929# 181 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ktime.h"
5930 if (res.tv.nsec >= 1000000000L)
5931 res.tv64 += (u32)-1000000000L;
5932
5933 return res;
5934}
5935# 194 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ktime.h"
5936extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
5937
5938
5939
5940
5941
5942
5943
5944static inline __attribute__((always_inline)) ktime_t timespec_to_ktime(const struct timespec ts)
5945{
5946 return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec,
5947 .nsec = (s32)ts.tv_nsec } };
5948}
5949
5950
5951
5952
5953
5954
5955
5956static inline __attribute__((always_inline)) ktime_t timeval_to_ktime(const struct timeval tv)
5957{
5958 return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec,
5959 .nsec = (s32)tv.tv_usec * 1000 } };
5960}
5961
5962
5963
5964
5965
5966
5967
5968static inline __attribute__((always_inline)) struct timespec ktime_to_timespec(const ktime_t kt)
5969{
5970 return (struct timespec) { .tv_sec = (time_t) kt.tv.sec,
5971 .tv_nsec = (long) kt.tv.nsec };
5972}
5973
5974
5975
5976
5977
5978
5979
5980static inline __attribute__((always_inline)) struct timeval ktime_to_timeval(const ktime_t kt)
5981{
5982 return (struct timeval) {
5983 .tv_sec = (time_t) kt.tv.sec,
5984 .tv_usec = (suseconds_t) (kt.tv.nsec / 1000L) };
5985}
5986
5987
5988
5989
5990
5991
5992
5993static inline __attribute__((always_inline)) u64 ktime_to_ns(const ktime_t kt)
5994{
5995 return (u64) kt.tv.sec * 1000000000L + kt.tv.nsec;
5996}
5997# 268 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ktime.h"
5998extern void ktime_get_ts(struct timespec *ts);
5999# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hrtimer.h" 2
6000
6001
6002
6003
6004
6005
6006
6007enum hrtimer_mode {
6008 HRTIMER_ABS,
6009 HRTIMER_REL,
6010};
6011
6012enum hrtimer_restart {
6013 HRTIMER_NORESTART,
6014 HRTIMER_RESTART,
6015};
6016
6017
6018
6019struct hrtimer_base;
6020# 52 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hrtimer.h"
6021struct hrtimer {
6022 struct rb_node node;
6023 ktime_t expires;
6024 int (*function)(struct hrtimer *);
6025 struct hrtimer_base *base;
6026};
6027# 66 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hrtimer.h"
6028struct hrtimer_sleeper {
6029 struct hrtimer timer;
6030 struct task_struct *task;
6031};
6032# 85 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hrtimer.h"
6033struct hrtimer_base {
6034 clockid_t index;
6035 spinlock_t lock;
6036 struct rb_root active;
6037 struct rb_node *first;
6038 ktime_t resolution;
6039 ktime_t (*get_time)(void);
6040 ktime_t (*get_softirq_time)(void);
6041 struct hrtimer *curr_timer;
6042 ktime_t softirq_time;
6043 struct lock_class_key lock_key;
6044};
6045# 108 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hrtimer.h"
6046extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock,
6047 enum hrtimer_mode mode);
6048
6049
6050extern int hrtimer_start(struct hrtimer *timer, ktime_t tim,
6051 const enum hrtimer_mode mode);
6052extern int hrtimer_cancel(struct hrtimer *timer);
6053extern int hrtimer_try_to_cancel(struct hrtimer *timer);
6054
6055
6056
6057
6058extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer);
6059extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp);
6060
6061
6062
6063
6064
6065static inline __attribute__((always_inline)) int hrtimer_active(const struct hrtimer *timer)
6066{
6067 return ((struct rb_node *)((&timer->node)->rb_parent_color & ~3)) != &timer->node;
6068}
6069
6070
6071extern unsigned long
6072hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
6073
6074
6075extern long hrtimer_nanosleep(struct timespec *rqtp,
6076 struct timespec *rmtp,
6077 const enum hrtimer_mode mode,
6078 const clockid_t clockid);
6079extern long hrtimer_nanosleep_restart(struct restart_block *restart_block);
6080
6081extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
6082 struct task_struct *tsk);
6083
6084
6085extern void hrtimer_run_queues(void);
6086
6087
6088extern void __attribute__ ((__section__ (".init.text"))) hrtimers_init(void);
6089# 85 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
6090
6091
6092
6093struct exec_domain;
6094struct futex_pi_state;
6095# 107 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6096extern unsigned long avenrun[];
6097# 121 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6098extern unsigned long total_forks;
6099extern int nr_threads;
6100extern __typeof__(unsigned long) per_cpu__process_counts;
6101extern int nr_processes(void);
6102extern unsigned long nr_running(void);
6103extern unsigned long nr_uninterruptible(void);
6104extern unsigned long nr_active(void);
6105extern unsigned long nr_iowait(void);
6106extern unsigned long weighted_cpuload(const int cpu);
6107# 186 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6108extern rwlock_t tasklist_lock;
6109extern spinlock_t mmlist_lock;
6110
6111struct task_struct;
6112
6113extern void sched_init(void);
6114extern void sched_init_smp(void);
6115extern void init_idle(struct task_struct *idle, int cpu);
6116
6117extern cpumask_t nohz_cpu_mask;
6118
6119extern void show_state(void);
6120extern void show_regs(struct pt_regs *);
6121
6122
6123
6124
6125
6126
6127extern void show_stack(struct task_struct *task, unsigned long *sp);
6128
6129void io_schedule(void);
6130long io_schedule_timeout(long timeout);
6131
6132extern void cpu_init (void);
6133extern void trap_init(void);
6134extern void update_process_times(int user);
6135extern void scheduler_tick(void);
6136
6137
6138
6139
6140
6141
6142static inline __attribute__((always_inline)) void softlockup_tick(void)
6143{
6144}
6145static inline __attribute__((always_inline)) void spawn_softlockup_task(void)
6146{
6147}
6148static inline __attribute__((always_inline)) void touch_softlockup_watchdog(void)
6149{
6150}
6151
6152
6153
6154
6155
6156
6157extern int in_sched_functions(unsigned long addr);
6158
6159
6160extern signed long schedule_timeout(signed long timeout);
6161extern signed long schedule_timeout_interruptible(signed long timeout);
6162extern signed long schedule_timeout_uninterruptible(signed long timeout);
6163 void schedule(void);
6164
6165struct nsproxy;
6166
6167
6168
6169
6170extern int sysctl_max_map_count;
6171
6172# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio.h" 1
6173
6174
6175
6176
6177# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/workqueue.h" 1
6178# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/workqueue.h"
6179struct workqueue_struct;
6180
6181struct work_struct {
6182 unsigned long pending;
6183 struct list_head entry;
6184 void (*func)(void *);
6185 void *data;
6186 void *wq_data;
6187 struct timer_list timer;
6188};
6189
6190struct execute_work {
6191 struct work_struct work;
6192};
6193# 57 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/workqueue.h"
6194extern struct workqueue_struct *__create_workqueue(const char *name,
6195 int singlethread);
6196
6197
6198
6199extern void destroy_workqueue(struct workqueue_struct *wq);
6200
6201extern int queue_work(struct workqueue_struct *wq, struct work_struct *work);
6202extern int queue_delayed_work(struct workqueue_struct *wq, struct work_struct *work, unsigned long delay);
6203extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
6204 struct work_struct *work, unsigned long delay);
6205extern void flush_workqueue(struct workqueue_struct *wq);
6206
6207extern int schedule_work(struct work_struct *work);
6208extern int schedule_delayed_work(struct work_struct *work, unsigned long delay);
6209
6210extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay);
6211extern int schedule_on_each_cpu(void (*func)(void *info), void *info);
6212extern void flush_scheduled_work(void);
6213extern int current_is_keventd(void);
6214extern int keventd_up(void);
6215
6216extern void init_workqueues(void);
6217void cancel_rearming_delayed_work(struct work_struct *work);
6218void cancel_rearming_delayed_workqueue(struct workqueue_struct *,
6219 struct work_struct *);
6220int execute_in_process_context(void (*fn)(void *), void *,
6221 struct execute_work *);
6222
6223
6224
6225
6226
6227
6228static inline __attribute__((always_inline)) int cancel_delayed_work(struct work_struct *work)
6229{
6230 int ret;
6231
6232 ret = del_timer(&work->timer);
6233 if (ret)
6234 clear_bit(0, &work->pending);
6235 return ret;
6236}
6237# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio.h" 2
6238# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio_abi.h" 1
6239# 32 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio_abi.h"
6240typedef unsigned long aio_context_t;
6241
6242enum {
6243 IOCB_CMD_PREAD = 0,
6244 IOCB_CMD_PWRITE = 1,
6245 IOCB_CMD_FSYNC = 2,
6246 IOCB_CMD_FDSYNC = 3,
6247
6248
6249
6250
6251 IOCB_CMD_NOOP = 6,
6252 IOCB_CMD_PREADV = 7,
6253 IOCB_CMD_PWRITEV = 8,
6254};
6255
6256
6257struct io_event {
6258 __u64 data;
6259 __u64 obj;
6260 __s64 res;
6261 __s64 res2;
6262};
6263# 70 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio_abi.h"
6264struct iocb {
6265
6266 __u64 aio_data;
6267 __u32 aio_key, aio_reserved1;
6268
6269
6270
6271 __u16 aio_lio_opcode;
6272 __s16 aio_reqprio;
6273 __u32 aio_fildes;
6274
6275 __u64 aio_buf;
6276 __u64 aio_nbytes;
6277 __s64 aio_offset;
6278
6279
6280 __u64 aio_reserved2;
6281 __u64 aio_reserved3;
6282};
6283# 7 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio.h" 2
6284# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/uio.h" 1
6285# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/uio.h"
6286struct iovec
6287{
6288 void *iov_base;
6289 __kernel_size_t iov_len;
6290};
6291
6292
6293
6294struct kvec {
6295 void *iov_base;
6296 size_t iov_len;
6297};
6298# 54 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/uio.h"
6299static inline __attribute__((always_inline)) size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
6300{
6301 unsigned long seg;
6302 size_t ret = 0;
6303
6304 for (seg = 0; seg < nr_segs; seg++)
6305 ret += iov[seg].iov_len;
6306 return ret;
6307}
6308
6309unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
6310# 8 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio.h" 2
6311
6312
6313
6314
6315
6316
6317
6318struct kioctx;
6319# 87 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio.h"
6320struct kiocb {
6321 struct list_head ki_run_list;
6322 long ki_flags;
6323 int ki_users;
6324 unsigned ki_key;
6325
6326 struct file *ki_filp;
6327 struct kioctx *ki_ctx;
6328 int (*ki_cancel)(struct kiocb *, struct io_event *);
6329 ssize_t (*ki_retry)(struct kiocb *);
6330 void (*ki_dtor)(struct kiocb *);
6331
6332 union {
6333 void *user;
6334 struct task_struct *tsk;
6335 } ki_obj;
6336
6337 __u64 ki_user_data;
6338 wait_queue_t ki_wait;
6339 loff_t ki_pos;
6340
6341 void *private;
6342
6343 unsigned short ki_opcode;
6344 size_t ki_nbytes;
6345 char *ki_buf;
6346 size_t ki_left;
6347 long ki_retried;
6348 struct iovec ki_inline_vec;
6349 struct iovec *ki_iovec;
6350 unsigned long ki_nr_segs;
6351 unsigned long ki_cur_seg;
6352
6353 struct list_head ki_list;
6354
6355};
6356# 144 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio.h"
6357struct aio_ring {
6358 unsigned id;
6359 unsigned nr;
6360 unsigned head;
6361 unsigned tail;
6362
6363 unsigned magic;
6364 unsigned compat_features;
6365 unsigned incompat_features;
6366 unsigned header_length;
6367
6368
6369 struct io_event io_events[0];
6370};
6371
6372
6373
6374
6375struct aio_ring_info {
6376 unsigned long mmap_base;
6377 unsigned long mmap_size;
6378
6379 struct page **ring_pages;
6380 spinlock_t ring_lock;
6381 long nr_pages;
6382
6383 unsigned nr, tail;
6384
6385 struct page *internal_pages[8];
6386};
6387
6388struct kioctx {
6389 atomic_t users;
6390 int dead;
6391 struct mm_struct *mm;
6392
6393
6394 unsigned long user_id;
6395 struct kioctx *next;
6396
6397 wait_queue_head_t wait;
6398
6399 spinlock_t ctx_lock;
6400
6401 int reqs_active;
6402 struct list_head active_reqs;
6403 struct list_head run_list;
6404
6405
6406 unsigned max_reqs;
6407
6408 struct aio_ring_info ring_info;
6409
6410 struct work_struct wq;
6411};
6412
6413
6414extern unsigned aio_max_size;
6415
6416extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
6417extern int aio_put_req(struct kiocb *iocb);
6418extern void kick_iocb(struct kiocb *iocb);
6419extern int aio_complete(struct kiocb *iocb, long res, long res2);
6420extern void __put_ioctx(struct kioctx *ctx);
6421struct mm_struct;
6422extern void exit_aio(struct mm_struct *mm);
6423extern struct kioctx *lookup_ioctx(unsigned long ctx_id);
6424extern int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb);
6425
6426
6427
6428struct kioctx *lookup_ioctx(unsigned long ctx_id);
6429int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb);
6430# 245 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/aio.h"
6431static inline __attribute__((always_inline)) struct kiocb *list_kiocb(struct list_head *h)
6432{
6433 return ({ const typeof( ((struct kiocb *)0)->ki_list ) *__mptr = (h); (struct kiocb *)( (char *)__mptr - __builtin_offsetof(struct kiocb,ki_list) );});
6434}
6435
6436
6437extern unsigned long aio_nr;
6438extern unsigned long aio_max_nr;
6439# 251 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
6440
6441extern unsigned long
6442arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
6443 unsigned long, unsigned long);
6444extern unsigned long
6445arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
6446 unsigned long len, unsigned long pgoff,
6447 unsigned long flags);
6448extern void arch_unmap_area(struct mm_struct *, unsigned long);
6449extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
6450# 284 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6451typedef unsigned long mm_counter_t;
6452# 300 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6453struct mm_struct {
6454 struct vm_area_struct * mmap;
6455 struct rb_root mm_rb;
6456 struct vm_area_struct * mmap_cache;
6457 unsigned long (*get_unmapped_area) (struct file *filp,
6458 unsigned long addr, unsigned long len,
6459 unsigned long pgoff, unsigned long flags);
6460 void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
6461 unsigned long mmap_base;
6462 unsigned long task_size;
6463 unsigned long cached_hole_size;
6464 unsigned long free_area_cache;
6465 pgd_t * pgd;
6466 atomic_t mm_users;
6467 atomic_t mm_count;
6468 int map_count;
6469 struct rw_semaphore mmap_sem;
6470 spinlock_t page_table_lock;
6471
6472 struct list_head mmlist;
6473
6474
6475
6476
6477
6478
6479
6480 mm_counter_t _file_rss;
6481 mm_counter_t _anon_rss;
6482
6483 unsigned long hiwater_rss;
6484 unsigned long hiwater_vm;
6485
6486 unsigned long total_vm, locked_vm, shared_vm, exec_vm;
6487 unsigned long stack_vm, reserved_vm, def_flags, nr_ptes;
6488 unsigned long start_code, end_code, start_data, end_data;
6489 unsigned long start_brk, brk, start_stack;
6490 unsigned long arg_start, arg_end, env_start, env_end;
6491
6492 unsigned long saved_auxv[44];
6493
6494 unsigned dumpable:2;
6495 cpumask_t cpu_vm_mask;
6496
6497
6498 mm_context_t context;
6499
6500
6501 unsigned long swap_token_time;
6502 char recent_pagein;
6503
6504
6505 int core_waiters;
6506 struct completion *core_startup_done, core_done;
6507
6508
6509 rwlock_t ioctx_list_lock;
6510 struct kioctx *ioctx_list;
6511};
6512
6513struct sighand_struct {
6514 atomic_t count;
6515 struct k_sigaction action[64];
6516 spinlock_t siglock;
6517};
6518
6519struct pacct_struct {
6520 int ac_flag;
6521 long ac_exitcode;
6522 unsigned long ac_mem;
6523 cputime_t ac_utime, ac_stime;
6524 unsigned long ac_minflt, ac_majflt;
6525};
6526# 381 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6527struct signal_struct {
6528 atomic_t count;
6529 atomic_t live;
6530
6531 wait_queue_head_t wait_chldexit;
6532
6533
6534 struct task_struct *curr_target;
6535
6536
6537 struct sigpending shared_pending;
6538
6539
6540 int group_exit_code;
6541
6542
6543
6544
6545
6546 struct task_struct *group_exit_task;
6547 int notify_count;
6548
6549
6550 int group_stop_count;
6551 unsigned int flags;
6552
6553
6554 struct list_head posix_timers;
6555
6556
6557 struct hrtimer real_timer;
6558 struct task_struct *tsk;
6559 ktime_t it_real_incr;
6560
6561
6562 cputime_t it_prof_expires, it_virt_expires;
6563 cputime_t it_prof_incr, it_virt_incr;
6564
6565
6566 pid_t pgrp;
6567 pid_t tty_old_pgrp;
6568 pid_t session;
6569
6570 int leader;
6571
6572 struct tty_struct *tty;
6573
6574
6575
6576
6577
6578
6579
6580 cputime_t utime, stime, cutime, cstime;
6581 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
6582 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
6583
6584
6585
6586
6587
6588
6589
6590 unsigned long long sched_time;
6591# 455 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6592 struct rlimit rlim[15];
6593
6594 struct list_head cpu_timers[3];
6595# 472 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6596};
6597# 515 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6598struct user_struct {
6599 atomic_t __count;
6600 atomic_t processes;
6601 atomic_t files;
6602 atomic_t sigpending;
6603
6604 atomic_t inotify_watches;
6605 atomic_t inotify_devs;
6606
6607
6608 unsigned long mq_bytes;
6609 unsigned long locked_shm;
6610
6611
6612
6613
6614
6615
6616
6617 struct list_head uidhash_list;
6618 uid_t uid;
6619};
6620
6621extern struct user_struct *find_user(uid_t);
6622
6623extern struct user_struct root_user;
6624
6625
6626struct backing_dev_info;
6627struct reclaim_state;
6628# 593 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6629static inline __attribute__((always_inline)) int sched_info_on(void)
6630{
6631
6632
6633
6634
6635
6636
6637 return 0;
6638
6639}
6640
6641enum idle_type
6642{
6643 SCHED_IDLE,
6644 NOT_IDLE,
6645 NEWLY_IDLE,
6646 MAX_IDLE_TYPES
6647};
6648# 722 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6649struct io_context;
6650struct cpuset;
6651
6652
6653
6654struct group_info {
6655 int ngroups;
6656 atomic_t usage;
6657 gid_t small_block[32];
6658 int nblocks;
6659 gid_t *blocks[0];
6660};
6661# 750 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6662extern struct group_info *groups_alloc(int gidsetsize);
6663extern void groups_free(struct group_info *group_info);
6664extern int set_current_groups(struct group_info *group_info);
6665extern int groups_search(struct group_info *group_info, gid_t grp);
6666
6667
6668
6669
6670
6671
6672
6673static inline __attribute__((always_inline)) void prefetch_stack(struct task_struct *t) { }
6674
6675
6676struct audit_context;
6677struct mempolicy;
6678struct pipe_inode_info;
6679struct uts_namespace;
6680
6681enum sleep_type {
6682 SLEEP_NORMAL,
6683 SLEEP_NONINTERACTIVE,
6684 SLEEP_INTERACTIVE,
6685 SLEEP_INTERRUPTED,
6686};
6687
6688struct prio_array;
6689
6690struct task_struct {
6691 volatile long state;
6692 struct thread_info *thread_info;
6693 atomic_t usage;
6694 unsigned long flags;
6695 unsigned long ptrace;
6696
6697 int lock_depth;
6698
6699
6700
6701
6702
6703
6704 int load_weight;
6705 int prio, static_prio, normal_prio;
6706 struct list_head run_list;
6707 struct prio_array *array;
6708
6709 unsigned short ioprio;
6710
6711
6712
6713 unsigned long sleep_avg;
6714 unsigned long long timestamp, last_ran;
6715 unsigned long long sched_time;
6716 enum sleep_type sleep_type;
6717
6718 unsigned long policy;
6719 cpumask_t cpus_allowed;
6720 unsigned int time_slice, first_time_slice;
6721
6722
6723
6724
6725
6726 struct list_head tasks;
6727
6728
6729
6730
6731 struct list_head ptrace_children;
6732 struct list_head ptrace_list;
6733
6734 struct mm_struct *mm, *active_mm;
6735
6736
6737 struct linux_binfmt *binfmt;
6738 long exit_state;
6739 int exit_code, exit_signal;
6740 int pdeath_signal;
6741
6742 unsigned long personality;
6743 unsigned did_exec:1;
6744 pid_t pid;
6745 pid_t tgid;
6746# 844 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6747 struct task_struct *real_parent;
6748 struct task_struct *parent;
6749
6750
6751
6752
6753 struct list_head children;
6754 struct list_head sibling;
6755 struct task_struct *group_leader;
6756
6757
6758 struct pid_link pids[PIDTYPE_MAX];
6759 struct list_head thread_group;
6760
6761 struct completion *vfork_done;
6762 int *set_child_tid;
6763 int *clear_child_tid;
6764
6765 unsigned long rt_priority;
6766 cputime_t utime, stime;
6767 unsigned long nvcsw, nivcsw;
6768 struct timespec start_time;
6769
6770 unsigned long min_flt, maj_flt;
6771
6772 cputime_t it_prof_expires, it_virt_expires;
6773 unsigned long long it_sched_expires;
6774 struct list_head cpu_timers[3];
6775
6776
6777 uid_t uid,euid,suid,fsuid;
6778 gid_t gid,egid,sgid,fsgid;
6779 struct group_info *group_info;
6780 kernel_cap_t cap_effective, cap_inheritable, cap_permitted;
6781 unsigned keep_capabilities:1;
6782 struct user_struct *user;
6783# 893 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6784 unsigned char fpu_counter;
6785 int oomkilladj;
6786 char comm[16];
6787
6788
6789
6790
6791 int link_count, total_link_count;
6792
6793
6794 struct sysv_sem sysvsem;
6795
6796
6797 struct thread_struct thread;
6798
6799 struct fs_struct *fs;
6800
6801 struct files_struct *files;
6802
6803 struct nsproxy *nsproxy;
6804
6805 struct signal_struct *signal;
6806 struct sighand_struct *sighand;
6807
6808 sigset_t blocked, real_blocked;
6809 sigset_t saved_sigmask;
6810 struct sigpending pending;
6811
6812 unsigned long sas_ss_sp;
6813 size_t sas_ss_size;
6814 int (*notifier)(void *priv);
6815 void *notifier_data;
6816 sigset_t *notifier_mask;
6817
6818 void *security;
6819 struct audit_context *audit_context;
6820 seccomp_t seccomp;
6821
6822
6823 u32 parent_exec_id;
6824 u32 self_exec_id;
6825
6826 spinlock_t alloc_lock;
6827
6828
6829 spinlock_t pi_lock;
6830
6831
6832
6833 struct plist_head pi_waiters;
6834
6835 struct rt_mutex_waiter *pi_blocked_on;
6836# 975 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6837 void *journal_info;
6838
6839
6840 struct reclaim_state *reclaim_state;
6841
6842 struct backing_dev_info *backing_dev_info;
6843
6844 struct io_context *io_context;
6845
6846 unsigned long ptrace_message;
6847 siginfo_t *last_siginfo;
6848
6849
6850
6851
6852
6853
6854 wait_queue_t *io_wait;
6855
6856 u64 rchar, wchar, syscr, syscw;
6857# 1010 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6858 struct robust_list_head *robust_list;
6859
6860
6861
6862 struct list_head pi_state_list;
6863 struct futex_pi_state *pi_state_cache;
6864
6865 atomic_t fs_excl;
6866 struct rcu_head rcu;
6867
6868
6869
6870
6871 struct pipe_inode_info *splice_pipe;
6872
6873
6874
6875};
6876
6877static inline __attribute__((always_inline)) pid_t process_group(struct task_struct *tsk)
6878{
6879 return tsk->signal->pgrp;
6880}
6881
6882static inline __attribute__((always_inline)) struct pid *task_pid(struct task_struct *task)
6883{
6884 return task->pids[PIDTYPE_PID].pid;
6885}
6886
6887static inline __attribute__((always_inline)) struct pid *task_tgid(struct task_struct *task)
6888{
6889 return task->group_leader->pids[PIDTYPE_PID].pid;
6890}
6891
6892static inline __attribute__((always_inline)) struct pid *task_pgrp(struct task_struct *task)
6893{
6894 return task->group_leader->pids[PIDTYPE_PGID].pid;
6895}
6896
6897static inline __attribute__((always_inline)) struct pid *task_session(struct task_struct *task)
6898{
6899 return task->group_leader->pids[PIDTYPE_SID].pid;
6900}
6901# 1062 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6902static inline __attribute__((always_inline)) int pid_alive(struct task_struct *p)
6903{
6904 return p->pids[PIDTYPE_PID].pid != ((void *)0);
6905}
6906
6907
6908
6909
6910
6911
6912
6913static inline __attribute__((always_inline)) int is_init(struct task_struct *tsk)
6914{
6915 return tsk->pid == 1;
6916}
6917
6918extern struct pid *cad_pid;
6919
6920extern void free_task(struct task_struct *tsk);
6921
6922
6923extern void __put_task_struct(struct task_struct *t);
6924
6925static inline __attribute__((always_inline)) void put_task_struct(struct task_struct *t)
6926{
6927 if ((atomic_sub_return(1, (&t->usage)) == 0))
6928 __put_task_struct(t);
6929}
6930# 1148 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6931static inline __attribute__((always_inline)) int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
6932{
6933 if (!test_bit((0), (new_mask).bits))
6934 return -22;
6935 return 0;
6936}
6937
6938
6939extern unsigned long long sched_clock(void);
6940extern unsigned long long
6941current_sched_time(const struct task_struct *current_task);
6942# 1170 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6943static inline __attribute__((always_inline)) void idle_task_exit(void) {}
6944
6945
6946extern void sched_idle_next(void);
6947
6948
6949extern int rt_mutex_getprio(struct task_struct *p);
6950extern void rt_mutex_setprio(struct task_struct *p, int prio);
6951extern void rt_mutex_adjust_pi(struct task_struct *p);
6952# 1187 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
6953extern void set_user_nice(struct task_struct *p, long nice);
6954extern int task_prio(const struct task_struct *p);
6955extern int task_nice(const struct task_struct *p);
6956extern int can_nice(const struct task_struct *p, const int nice);
6957extern int task_curr(const struct task_struct *p);
6958extern int idle_cpu(int cpu);
6959extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
6960extern struct task_struct *idle_task(int cpu);
6961extern struct task_struct *curr_task(int cpu);
6962extern void set_curr_task(int cpu, struct task_struct *p);
6963
6964void yield(void);
6965
6966
6967
6968
6969extern struct exec_domain default_exec_domain;
6970
6971union thread_union {
6972 struct thread_info thread_info;
6973 unsigned long stack[((1UL << 12) * 2)/sizeof(long)];
6974};
6975
6976
6977static inline __attribute__((always_inline)) int kstack_end(void *addr)
6978{
6979
6980
6981
6982 return !(((unsigned long)addr+sizeof(void*)-1) & (((1UL << 12) * 2)-sizeof(void*)));
6983}
6984
6985
6986extern union thread_union init_thread_union;
6987extern struct task_struct init_task;
6988
6989extern struct mm_struct init_mm;
6990
6991
6992extern struct task_struct *find_task_by_pid_type(int type, int pid);
6993extern void set_special_pids(pid_t session, pid_t pgrp);
6994extern void __set_special_pids(pid_t session, pid_t pgrp);
6995
6996
6997extern struct user_struct * alloc_uid(uid_t);
6998static inline __attribute__((always_inline)) struct user_struct *get_uid(struct user_struct *u)
6999{
7000 atomic_add(1,(&u->__count));
7001 return u;
7002}
7003extern void free_uid(struct user_struct *);
7004extern void switch_uid(struct user_struct *);
7005
7006
7007
7008extern void do_timer(unsigned long ticks);
7009
7010extern int wake_up_state(struct task_struct * tsk, unsigned int state);
7011extern int wake_up_process(struct task_struct * tsk);
7012extern void wake_up_new_task(struct task_struct * tsk, unsigned long clone_flags);
7013
7014
7015
7016
7017 static inline __attribute__((always_inline)) void kick_process(struct task_struct *tsk) { }
7018
7019extern void sched_fork(struct task_struct * p, int clone_flags);
7020extern void sched_exit(struct task_struct * p);
7021
7022extern int in_group_p(gid_t);
7023extern int in_egroup_p(gid_t);
7024
7025extern void proc_caches_init(void);
7026extern void flush_signals(struct task_struct *);
7027extern void flush_signal_handlers(struct task_struct *, int force_default);
7028extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
7029
7030static inline __attribute__((always_inline)) int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
7031{
7032 unsigned long flags;
7033 int ret;
7034
7035 do { flags = local_irq_save(); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
7036 ret = dequeue_signal(tsk, mask, info);
7037 do { do { if ((flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
7038
7039 return ret;
7040}
7041
7042extern void block_all_signals(int (*notifier)(void *priv), void *priv,
7043 sigset_t *mask);
7044extern void unblock_all_signals(void);
7045extern void release_task(struct task_struct * p);
7046extern int send_sig_info(int, struct siginfo *, struct task_struct *);
7047extern int send_group_sig_info(int, struct siginfo *, struct task_struct *);
7048extern int force_sigsegv(int, struct task_struct *);
7049extern int force_sig_info(int, struct siginfo *, struct task_struct *);
7050extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
7051extern int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
7052extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid);
7053extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32);
7054extern int kill_pgrp(struct pid *pid, int sig, int priv);
7055extern int kill_pid(struct pid *pid, int sig, int priv);
7056extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
7057extern int kill_pg_info(int, struct siginfo *, pid_t);
7058extern int kill_proc_info(int, struct siginfo *, pid_t);
7059extern void do_notify_parent(struct task_struct *, int);
7060extern void force_sig(int, struct task_struct *);
7061extern void force_sig_specific(int, struct task_struct *);
7062extern int send_sig(int, struct task_struct *, int);
7063extern void zap_other_threads(struct task_struct *p);
7064extern int kill_pg(pid_t, int, int);
7065extern int kill_proc(pid_t, int, int);
7066extern struct sigqueue *sigqueue_alloc(void);
7067extern void sigqueue_free(struct sigqueue *);
7068extern int send_sigqueue(int, struct sigqueue *, struct task_struct *);
7069extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *);
7070extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *);
7071extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long);
7072
7073static inline __attribute__((always_inline)) int kill_cad_pid(int sig, int priv)
7074{
7075 return kill_pid(cad_pid, sig, priv);
7076}
7077
7078
7079
7080
7081
7082
7083static inline __attribute__((always_inline)) int is_si_special(const struct siginfo *info)
7084{
7085 return info <= ((struct siginfo *) 2);
7086}
7087
7088
7089
7090static inline __attribute__((always_inline)) int on_sig_stack(unsigned long sp)
7091{
7092 return (sp - get_current()->sas_ss_sp < get_current()->sas_ss_size);
7093}
7094
7095static inline __attribute__((always_inline)) int sas_ss_flags(unsigned long sp)
7096{
7097 return (get_current()->sas_ss_size == 0 ? 2
7098 : on_sig_stack(sp) ? 1 : 0);
7099}
7100
7101
7102
7103
7104extern struct mm_struct * mm_alloc(void);
7105
7106
7107extern void __mmdrop(struct mm_struct *);
7108static inline __attribute__((always_inline)) void mmdrop(struct mm_struct * mm)
7109{
7110 if ((atomic_sub_return(1, (&mm->mm_count)) == 0))
7111 __mmdrop(mm);
7112}
7113
7114
7115extern void mmput(struct mm_struct *);
7116
7117extern struct mm_struct *get_task_mm(struct task_struct *task);
7118
7119extern void mm_release(struct task_struct *, struct mm_struct *);
7120
7121extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
7122extern void flush_thread(void);
7123extern void exit_thread(void);
7124
7125extern void exit_files(struct task_struct *);
7126extern void __cleanup_signal(struct signal_struct *);
7127extern void __cleanup_sighand(struct sighand_struct *);
7128extern void exit_itimers(struct signal_struct *);
7129
7130extern void do_group_exit(int);
7131
7132extern void daemonize(const char *, ...);
7133extern int allow_signal(int);
7134extern int disallow_signal(int);
7135extern struct task_struct *child_reaper;
7136
7137extern int do_execve(char *, char * *, char * *, struct pt_regs *);
7138extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *);
7139struct task_struct *fork_idle(int);
7140
7141extern void set_task_comm(struct task_struct *tsk, char *from);
7142extern void get_task_comm(char *to, struct task_struct *tsk);
7143# 1411 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
7144static inline __attribute__((always_inline)) int has_group_leader_pid(struct task_struct *p)
7145{
7146 return p->pid == p->tgid;
7147}
7148
7149static inline __attribute__((always_inline)) struct task_struct *next_thread(const struct task_struct *p)
7150{
7151 return ({ const typeof( ((struct task_struct *)0)->thread_group ) *__mptr = (({ typeof(p->thread_group.next) _________p1 = p->thread_group.next; do { } while(0); (_________p1); })); (struct task_struct *)( (char *)__mptr - __builtin_offsetof(struct task_struct,thread_group) );});
7152
7153}
7154
7155static inline __attribute__((always_inline)) int thread_group_empty(struct task_struct *p)
7156{
7157 return list_empty(&p->thread_group);
7158}
7159# 1439 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
7160static inline __attribute__((always_inline)) void task_lock(struct task_struct *p)
7161{
7162 do { do { } while (0); (void)0; (void)(&p->alloc_lock); } while (0);
7163}
7164
7165static inline __attribute__((always_inline)) void task_unlock(struct task_struct *p)
7166{
7167 do { do { } while (0); (void)0; (void)(&p->alloc_lock); } while (0);
7168}
7169
7170extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk,
7171 unsigned long *flags);
7172
7173static inline __attribute__((always_inline)) void unlock_task_sighand(struct task_struct *tsk,
7174 unsigned long *flags)
7175{
7176 do { do { if ((*flags & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
7177}
7178
7179
7180
7181
7182
7183
7184static inline __attribute__((always_inline)) void setup_thread_stack(struct task_struct *p, struct task_struct *org)
7185{
7186 *(p)->thread_info = *(org)->thread_info;
7187 (p)->thread_info->task = p;
7188}
7189
7190static inline __attribute__((always_inline)) unsigned long *end_of_stack(struct task_struct *p)
7191{
7192 return (unsigned long *)(p->thread_info + 1);
7193}
7194
7195
7196
7197
7198
7199
7200static inline __attribute__((always_inline)) void set_tsk_thread_flag(struct task_struct *tsk, int flag)
7201{
7202 set_ti_thread_flag((tsk)->thread_info, flag);
7203}
7204
7205static inline __attribute__((always_inline)) void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
7206{
7207 clear_ti_thread_flag((tsk)->thread_info, flag);
7208}
7209
7210static inline __attribute__((always_inline)) int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
7211{
7212 return test_and_set_ti_thread_flag((tsk)->thread_info, flag);
7213}
7214
7215static inline __attribute__((always_inline)) int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
7216{
7217 return test_and_clear_ti_thread_flag((tsk)->thread_info, flag);
7218}
7219
7220static inline __attribute__((always_inline)) int test_tsk_thread_flag(struct task_struct *tsk, int flag)
7221{
7222 return test_ti_thread_flag((tsk)->thread_info, flag);
7223}
7224
7225static inline __attribute__((always_inline)) void set_tsk_need_resched(struct task_struct *tsk)
7226{
7227 set_tsk_thread_flag(tsk,3);
7228}
7229
7230static inline __attribute__((always_inline)) void clear_tsk_need_resched(struct task_struct *tsk)
7231{
7232 clear_tsk_thread_flag(tsk,3);
7233}
7234
7235static inline __attribute__((always_inline)) int signal_pending(struct task_struct *p)
7236{
7237 return __builtin_expect(!!(test_tsk_thread_flag(p,2)), 0);
7238}
7239
7240static inline __attribute__((always_inline)) int need_resched(void)
7241{
7242 return __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 0);
7243}
7244# 1531 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
7245extern int cond_resched(void);
7246extern int cond_resched_lock(spinlock_t * lock);
7247extern int cond_resched_softirq(void);
7248# 1549 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
7249static inline __attribute__((always_inline)) int lock_need_resched(spinlock_t *lock)
7250{
7251 if (0 || need_resched())
7252 return 1;
7253 return 0;
7254}
7255
7256
7257
7258
7259
7260extern void recalc_sigpending_tsk(struct task_struct *t);
7261extern void recalc_sigpending(void);
7262
7263extern void signal_wake_up(struct task_struct *t, int resume_stopped);
7264# 1582 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
7265static inline __attribute__((always_inline)) unsigned int task_cpu(const struct task_struct *p)
7266{
7267 return 0;
7268}
7269
7270static inline __attribute__((always_inline)) void set_task_cpu(struct task_struct *p, unsigned int cpu)
7271{
7272}
7273
7274
7275
7276
7277
7278
7279static inline __attribute__((always_inline)) void arch_pick_mmap_layout(struct mm_struct *mm)
7280{
7281 mm->mmap_base = (0x7c000000UL / 3);
7282 mm->get_unmapped_area = arch_get_unmapped_area;
7283 mm->unmap_area = arch_unmap_area;
7284}
7285
7286
7287extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
7288extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
7289
7290# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysdev.h" 1
7291# 24 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysdev.h"
7292# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kobject.h" 1
7293# 22 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kobject.h"
7294# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysfs.h" 1
7295# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysfs.h"
7296struct kobject;
7297struct module;
7298
7299struct attribute {
7300 const char * name;
7301 struct module * owner;
7302 mode_t mode;
7303};
7304
7305struct attribute_group {
7306 const char * name;
7307 struct attribute ** attrs;
7308};
7309# 52 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysfs.h"
7310struct vm_area_struct;
7311
7312struct bin_attribute {
7313 struct attribute attr;
7314 size_t size;
7315 void *private;
7316 ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
7317 ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
7318 int (*mmap)(struct kobject *, struct bin_attribute *attr,
7319 struct vm_area_struct *vma);
7320};
7321
7322struct sysfs_ops {
7323 ssize_t (*show)(struct kobject *, struct attribute *,char *);
7324 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
7325};
7326
7327struct sysfs_dirent {
7328 atomic_t s_count;
7329 struct list_head s_sibling;
7330 struct list_head s_children;
7331 void * s_element;
7332 int s_type;
7333 umode_t s_mode;
7334 struct dentry * s_dentry;
7335 struct iattr * s_iattr;
7336 atomic_t s_event;
7337};
7338# 90 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysfs.h"
7339extern int __attribute__((warn_unused_result))
7340sysfs_create_dir(struct kobject *);
7341
7342extern void
7343sysfs_remove_dir(struct kobject *);
7344
7345extern int __attribute__((warn_unused_result))
7346sysfs_rename_dir(struct kobject *, const char *new_name);
7347
7348extern int __attribute__((warn_unused_result))
7349sysfs_create_file(struct kobject *, const struct attribute *);
7350
7351extern int __attribute__((warn_unused_result))
7352sysfs_update_file(struct kobject *, const struct attribute *);
7353
7354extern int __attribute__((warn_unused_result))
7355sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode);
7356
7357extern void
7358sysfs_remove_file(struct kobject *, const struct attribute *);
7359
7360extern int __attribute__((warn_unused_result))
7361sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name);
7362
7363extern void
7364sysfs_remove_link(struct kobject *, const char * name);
7365
7366int __attribute__((warn_unused_result)) sysfs_create_bin_file(struct kobject *kobj,
7367 struct bin_attribute *attr);
7368void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr);
7369
7370int __attribute__((warn_unused_result)) sysfs_create_group(struct kobject *,
7371 const struct attribute_group *);
7372void sysfs_remove_group(struct kobject *, const struct attribute_group *);
7373void sysfs_notify(struct kobject * k, char *dir, char *attr);
7374
7375extern int __attribute__((warn_unused_result)) sysfs_init(void);
7376# 23 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kobject.h" 2
7377# 35 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kobject.h"
7378extern char uevent_helper[];
7379
7380
7381extern u64 uevent_seqnum;
7382
7383
7384typedef int kobject_action_t;
7385enum kobject_action {
7386 KOBJ_ADD = ( kobject_action_t) 0x01,
7387 KOBJ_REMOVE = ( kobject_action_t) 0x02,
7388 KOBJ_CHANGE = ( kobject_action_t) 0x03,
7389 KOBJ_MOUNT = ( kobject_action_t) 0x04,
7390 KOBJ_UMOUNT = ( kobject_action_t) 0x05,
7391 KOBJ_OFFLINE = ( kobject_action_t) 0x06,
7392 KOBJ_ONLINE = ( kobject_action_t) 0x07,
7393};
7394
7395struct kobject {
7396 const char * k_name;
7397 char name[20];
7398 struct kref kref;
7399 struct list_head entry;
7400 struct kobject * parent;
7401 struct kset * kset;
7402 struct kobj_type * ktype;
7403 struct dentry * dentry;
7404 wait_queue_head_t poll;
7405};
7406
7407extern int kobject_set_name(struct kobject *, const char *, ...)
7408 __attribute__((format(printf,2,3)));
7409
7410static inline __attribute__((always_inline)) const char * kobject_name(const struct kobject * kobj)
7411{
7412 return kobj->k_name;
7413}
7414
7415extern void kobject_init(struct kobject *);
7416extern void kobject_cleanup(struct kobject *);
7417
7418extern int __attribute__((warn_unused_result)) kobject_add(struct kobject *);
7419extern void kobject_del(struct kobject *);
7420
7421extern int __attribute__((warn_unused_result)) kobject_rename(struct kobject *, const char *new_name);
7422
7423extern int __attribute__((warn_unused_result)) kobject_register(struct kobject *);
7424extern void kobject_unregister(struct kobject *);
7425
7426extern struct kobject * kobject_get(struct kobject *);
7427extern void kobject_put(struct kobject *);
7428
7429extern struct kobject *kobject_add_dir(struct kobject *, const char *);
7430
7431extern char * kobject_get_path(struct kobject *, gfp_t);
7432
7433struct kobj_type {
7434 void (*release)(struct kobject *);
7435 struct sysfs_ops * sysfs_ops;
7436 struct attribute ** default_attrs;
7437};
7438# 114 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kobject.h"
7439struct kset_uevent_ops {
7440 int (*filter)(struct kset *kset, struct kobject *kobj);
7441 const char *(*name)(struct kset *kset, struct kobject *kobj);
7442 int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp,
7443 int num_envp, char *buffer, int buffer_size);
7444};
7445
7446struct kset {
7447 struct subsystem * subsys;
7448 struct kobj_type * ktype;
7449 struct list_head list;
7450 spinlock_t list_lock;
7451 struct kobject kobj;
7452 struct kset_uevent_ops * uevent_ops;
7453};
7454
7455
7456extern void kset_init(struct kset * k);
7457extern int __attribute__((warn_unused_result)) kset_add(struct kset * k);
7458extern int __attribute__((warn_unused_result)) kset_register(struct kset * k);
7459extern void kset_unregister(struct kset * k);
7460
7461static inline __attribute__((always_inline)) struct kset * to_kset(struct kobject * kobj)
7462{
7463 return kobj ? ({ const typeof( ((struct kset *)0)->kobj ) *__mptr = (kobj); (struct kset *)( (char *)__mptr - __builtin_offsetof(struct kset,kobj) );}) : ((void *)0);
7464}
7465
7466static inline __attribute__((always_inline)) struct kset * kset_get(struct kset * k)
7467{
7468 return k ? to_kset(kobject_get(&k->kobj)) : ((void *)0);
7469}
7470
7471static inline __attribute__((always_inline)) void kset_put(struct kset * k)
7472{
7473 kobject_put(&k->kobj);
7474}
7475
7476static inline __attribute__((always_inline)) struct kobj_type * get_ktype(struct kobject * k)
7477{
7478 if (k->kset && k->kset->ktype)
7479 return k->kset->ktype;
7480 else
7481 return k->ktype;
7482}
7483
7484extern struct kobject * kset_find_obj(struct kset *, const char *);
7485# 170 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kobject.h"
7486struct subsystem {
7487 struct kset kset;
7488 struct rw_semaphore rwsem;
7489};
7490# 193 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kobject.h"
7491extern struct subsystem kernel_subsys;
7492
7493extern struct subsystem hypervisor_subsys;
7494# 242 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kobject.h"
7495extern void subsystem_init(struct subsystem *);
7496extern int __attribute__((warn_unused_result)) subsystem_register(struct subsystem *);
7497extern void subsystem_unregister(struct subsystem *);
7498
7499static inline __attribute__((always_inline)) struct subsystem * subsys_get(struct subsystem * s)
7500{
7501 return s ? ({ const typeof( ((struct subsystem *)0)->kset ) *__mptr = (kset_get(&s->kset)); (struct subsystem *)( (char *)__mptr - __builtin_offsetof(struct subsystem,kset) );}) : ((void *)0);
7502}
7503
7504static inline __attribute__((always_inline)) void subsys_put(struct subsystem * s)
7505{
7506 kset_put(&s->kset);
7507}
7508
7509struct subsys_attribute {
7510 struct attribute attr;
7511 ssize_t (*show)(struct subsystem *, char *);
7512 ssize_t (*store)(struct subsystem *, const char *, size_t);
7513};
7514
7515extern int __attribute__((warn_unused_result)) subsys_create_file(struct subsystem * ,
7516 struct subsys_attribute *);
7517
7518
7519void kobject_uevent(struct kobject *kobj, enum kobject_action action);
7520
7521int add_uevent_var(char **envp, int num_envp, int *cur_index,
7522 char *buffer, int buffer_size, int *cur_len,
7523 const char *format, ...)
7524 __attribute__((format (printf, 7, 8)));
7525# 25 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysdev.h" 2
7526# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pm.h" 1
7527# 34 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pm.h"
7528typedef int pm_request_t;
7529# 43 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pm.h"
7530typedef int pm_dev_t;
7531# 56 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pm.h"
7532enum
7533{
7534 PM_SYS_UNKNOWN = 0x00000000,
7535 PM_SYS_KBC = 0x41d00303,
7536 PM_SYS_COM = 0x41d00500,
7537 PM_SYS_IRDA = 0x41d00510,
7538 PM_SYS_FDC = 0x41d00700,
7539 PM_SYS_VGA = 0x41d00900,
7540 PM_SYS_PCMCIA = 0x41d00e00,
7541};
7542# 75 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pm.h"
7543struct pm_dev;
7544
7545typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data);
7546
7547
7548
7549
7550struct pm_dev
7551{
7552 pm_dev_t type;
7553 unsigned long id;
7554 pm_callback callback;
7555 void *data;
7556
7557 unsigned long flags;
7558 unsigned long state;
7559 unsigned long prev_state;
7560
7561 struct list_head entry;
7562};
7563
7564
7565
7566
7567
7568
7569
7570extern void (*pm_idle)(void);
7571extern void (*pm_power_off)(void);
7572
7573typedef int suspend_state_t;
7574
7575
7576
7577
7578
7579
7580
7581typedef int suspend_disk_method_t;
7582
7583
7584
7585
7586
7587
7588
7589struct pm_ops {
7590 suspend_disk_method_t pm_disk_mode;
7591 int (*valid)(suspend_state_t state);
7592 int (*prepare)(suspend_state_t state);
7593 int (*enter)(suspend_state_t state);
7594 int (*finish)(suspend_state_t state);
7595};
7596
7597extern void pm_set_ops(struct pm_ops *);
7598extern struct pm_ops *pm_ops;
7599extern int pm_suspend(suspend_state_t state);
7600
7601
7602
7603
7604
7605
7606struct device;
7607
7608typedef struct pm_message {
7609 int event;
7610} pm_message_t;
7611# 203 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pm.h"
7612struct dev_pm_info {
7613 pm_message_t power_state;
7614 unsigned can_wakeup:1;
7615
7616
7617
7618
7619
7620
7621
7622};
7623
7624extern void device_pm_set_parent(struct device * dev, struct device * parent);
7625
7626extern int device_power_down(pm_message_t state);
7627extern void device_power_up(void);
7628extern void device_resume(void);
7629# 243 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pm.h"
7630static inline __attribute__((always_inline)) int device_suspend(pm_message_t state)
7631{
7632 return 0;
7633}
7634
7635
7636
7637
7638static inline __attribute__((always_inline)) int dpm_runtime_suspend(struct device * dev, pm_message_t state)
7639{
7640 return 0;
7641}
7642
7643static inline __attribute__((always_inline)) void dpm_runtime_resume(struct device * dev)
7644{
7645}
7646# 26 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysdev.h" 2
7647
7648
7649struct sys_device;
7650
7651struct sysdev_class {
7652 struct list_head drivers;
7653
7654
7655 int (*shutdown)(struct sys_device *);
7656 int (*suspend)(struct sys_device *, pm_message_t state);
7657 int (*resume)(struct sys_device *);
7658 struct kset kset;
7659};
7660
7661struct sysdev_class_attribute {
7662 struct attribute attr;
7663 ssize_t (*show)(struct sysdev_class *, char *);
7664 ssize_t (*store)(struct sysdev_class *, const char *, size_t);
7665};
7666# 54 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysdev.h"
7667extern int sysdev_class_register(struct sysdev_class *);
7668extern void sysdev_class_unregister(struct sysdev_class *);
7669
7670extern int sysdev_class_create_file(struct sysdev_class *,
7671 struct sysdev_class_attribute *);
7672extern void sysdev_class_remove_file(struct sysdev_class *,
7673 struct sysdev_class_attribute *);
7674
7675
7676
7677
7678struct sysdev_driver {
7679 struct list_head entry;
7680 int (*add)(struct sys_device *);
7681 int (*remove)(struct sys_device *);
7682 int (*shutdown)(struct sys_device *);
7683 int (*suspend)(struct sys_device *, pm_message_t state);
7684 int (*resume)(struct sys_device *);
7685};
7686
7687
7688extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *);
7689extern void sysdev_driver_unregister(struct sysdev_class *, struct sysdev_driver *);
7690
7691
7692
7693
7694
7695
7696
7697struct sys_device {
7698 u32 id;
7699 struct sysdev_class * cls;
7700 struct kobject kobj;
7701};
7702
7703extern int sysdev_register(struct sys_device *);
7704extern void sysdev_unregister(struct sys_device *);
7705
7706
7707struct sysdev_attribute {
7708 struct attribute attr;
7709 ssize_t (*show)(struct sys_device *, char *);
7710 ssize_t (*store)(struct sys_device *, const char *, size_t);
7711};
7712# 108 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sysdev.h"
7713extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *);
7714extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);
7715# 1608 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h" 2
7716extern int sched_mc_power_savings, sched_smt_power_savings;
7717extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings;
7718extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
7719
7720extern void normalize_rt_tasks(void);
7721# 1682 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h"
7722static inline __attribute__((always_inline)) int frozen(struct task_struct *p) { return 0; }
7723static inline __attribute__((always_inline)) int freezing(struct task_struct *p) { return 0; }
7724static inline __attribute__((always_inline)) void freeze(struct task_struct *p) { do { printk("kernel BUG at %s:%d!\n", "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h", 1684); *(volatile int *)0 = 0; } while (0); }
7725static inline __attribute__((always_inline)) int thaw_process(struct task_struct *p) { return 1; }
7726static inline __attribute__((always_inline)) void frozen_process(struct task_struct *p) { do { printk("kernel BUG at %s:%d!\n", "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h", 1686); *(volatile int *)0 = 0; } while (0); }
7727
7728static inline __attribute__((always_inline)) void refrigerator(void) {}
7729static inline __attribute__((always_inline)) int freeze_processes(void) { do { printk("kernel BUG at %s:%d!\n", "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sched.h", 1689); *(volatile int *)0 = 0; } while (0); return 0; }
7730static inline __attribute__((always_inline)) void thaw_processes(void) {}
7731
7732static inline __attribute__((always_inline)) int try_to_freeze(void) { return 0; }
7733# 10 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h" 2
7734
7735
7736# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/stat.h" 1
7737
7738
7739
7740
7741
7742# 1 "include2/asm/stat.h" 1
7743
7744
7745
7746struct __old_kernel_stat {
7747 unsigned short st_dev;
7748 unsigned short st_ino;
7749 unsigned short st_mode;
7750 unsigned short st_nlink;
7751 unsigned short st_uid;
7752 unsigned short st_gid;
7753 unsigned short st_rdev;
7754 unsigned long st_size;
7755 unsigned long st_atime;
7756 unsigned long st_mtime;
7757 unsigned long st_ctime;
7758};
7759
7760struct stat {
7761 unsigned short st_dev;
7762 unsigned short __pad1;
7763 unsigned long st_ino;
7764 unsigned short st_mode;
7765 unsigned short st_nlink;
7766 unsigned short st_uid;
7767 unsigned short st_gid;
7768 unsigned short st_rdev;
7769 unsigned short __pad2;
7770 unsigned long st_size;
7771 unsigned long st_blksize;
7772 unsigned long st_blocks;
7773 unsigned long st_atime;
7774 unsigned long st_atime_nsec;
7775 unsigned long st_mtime;
7776 unsigned long st_mtime_nsec;
7777 unsigned long st_ctime;
7778 unsigned long st_ctime_nsec;
7779 unsigned long __unused4;
7780 unsigned long __unused5;
7781};
7782
7783
7784
7785
7786
7787
7788struct stat64 {
7789 unsigned long long st_dev;
7790 unsigned char __pad0[4];
7791
7792 unsigned long st_ino;
7793 unsigned int st_mode;
7794 unsigned int st_nlink;
7795
7796 unsigned long st_uid;
7797 unsigned long st_gid;
7798
7799 unsigned long long st_rdev;
7800 unsigned char __pad3[4];
7801
7802 long long st_size;
7803 unsigned long st_blksize;
7804
7805 unsigned long long st_blocks;
7806
7807 unsigned long st_atime;
7808 unsigned long st_atime_nsec;
7809
7810 unsigned long st_mtime;
7811 unsigned long st_mtime_nsec;
7812
7813 unsigned long st_ctime;
7814 unsigned long st_ctime_nsec;
7815
7816 unsigned long __unused1;
7817 unsigned long __unused2;
7818};
7819# 7 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/stat.h" 2
7820# 59 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/stat.h"
7821struct kstat {
7822 u64 ino;
7823 dev_t dev;
7824 umode_t mode;
7825 unsigned int nlink;
7826 uid_t uid;
7827 gid_t gid;
7828 dev_t rdev;
7829 loff_t size;
7830 struct timespec atime;
7831 struct timespec mtime;
7832 struct timespec ctime;
7833 unsigned long blksize;
7834 unsigned long long blocks;
7835};
7836# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h" 2
7837
7838
7839# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kmod.h" 1
7840# 33 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kmod.h"
7841static inline __attribute__((always_inline)) int request_module(const char * name, ...) { return -38; }
7842
7843
7844
7845
7846struct key;
7847extern int call_usermodehelper_keys(char *path, char *argv[], char *envp[],
7848 struct key *session_keyring, int wait);
7849
7850static inline __attribute__((always_inline)) int
7851call_usermodehelper(char *path, char **argv, char **envp, int wait)
7852{
7853 return call_usermodehelper_keys(path, argv, envp, ((void *)0), wait);
7854}
7855
7856extern void usermodehelper_init(void);
7857
7858struct file;
7859extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[],
7860 struct file **filp);
7861# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h" 2
7862# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf.h" 1
7863
7864
7865
7866
7867
7868# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf-em.h" 1
7869# 7 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf.h" 2
7870# 1 "include2/asm/elf.h" 1
7871
7872
7873
7874
7875
7876# 1 "include2/asm/user.h" 1
7877# 30 "include2/asm/user.h"
7878struct user_fpu_struct {
7879 unsigned long fp_regs[16];
7880 unsigned long xfp_regs[16];
7881 unsigned long fpscr;
7882 unsigned long fpul;
7883};
7884
7885struct user {
7886 struct pt_regs regs;
7887 struct user_fpu_struct fpu;
7888 int u_fpvalid;
7889 size_t u_tsize;
7890 size_t u_dsize;
7891 size_t u_ssize;
7892 unsigned long start_code;
7893 unsigned long start_data;
7894 unsigned long start_stack;
7895 long int signal;
7896 struct regs * u_ar0;
7897 struct user_fpu_struct* u_fpstate;
7898 unsigned long magic;
7899 char u_comm[32];
7900};
7901# 7 "include2/asm/elf.h" 2
7902# 53 "include2/asm/elf.h"
7903typedef unsigned long elf_greg_t;
7904
7905
7906typedef elf_greg_t elf_gregset_t[(sizeof (struct pt_regs) / sizeof(elf_greg_t))];
7907
7908typedef struct user_fpu_struct elf_fpregset_t;
7909# 115 "include2/asm/elf.h"
7910struct task_struct;
7911extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
7912extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
7913# 126 "include2/asm/elf.h"
7914struct linux_binprm;
7915extern int arch_setup_additional_pages(struct linux_binprm *bprm,
7916 int executable_stack);
7917
7918extern unsigned int vdso_enabled;
7919extern void __kernel_vsyscall;
7920# 8 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf.h" 2
7921# 17 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf.h"
7922typedef __u32 Elf32_Addr;
7923typedef __u16 Elf32_Half;
7924typedef __u32 Elf32_Off;
7925typedef __s32 Elf32_Sword;
7926typedef __u32 Elf32_Word;
7927
7928
7929typedef __u64 Elf64_Addr;
7930typedef __u16 Elf64_Half;
7931typedef __s16 Elf64_SHalf;
7932typedef __u64 Elf64_Off;
7933typedef __s32 Elf64_Sword;
7934typedef __u32 Elf64_Word;
7935typedef __u64 Elf64_Xword;
7936typedef __s64 Elf64_Sxword;
7937# 107 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf.h"
7938typedef struct dynamic{
7939 Elf32_Sword d_tag;
7940 union{
7941 Elf32_Sword d_val;
7942 Elf32_Addr d_ptr;
7943 } d_un;
7944} Elf32_Dyn;
7945
7946typedef struct {
7947 Elf64_Sxword d_tag;
7948 union {
7949 Elf64_Xword d_val;
7950 Elf64_Addr d_ptr;
7951 } d_un;
7952} Elf64_Dyn;
7953# 130 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf.h"
7954typedef struct elf32_rel {
7955 Elf32_Addr r_offset;
7956 Elf32_Word r_info;
7957} Elf32_Rel;
7958
7959typedef struct elf64_rel {
7960 Elf64_Addr r_offset;
7961 Elf64_Xword r_info;
7962} Elf64_Rel;
7963
7964typedef struct elf32_rela{
7965 Elf32_Addr r_offset;
7966 Elf32_Word r_info;
7967 Elf32_Sword r_addend;
7968} Elf32_Rela;
7969
7970typedef struct elf64_rela {
7971 Elf64_Addr r_offset;
7972 Elf64_Xword r_info;
7973 Elf64_Sxword r_addend;
7974} Elf64_Rela;
7975
7976typedef struct elf32_sym{
7977 Elf32_Word st_name;
7978 Elf32_Addr st_value;
7979 Elf32_Word st_size;
7980 unsigned char st_info;
7981 unsigned char st_other;
7982 Elf32_Half st_shndx;
7983} Elf32_Sym;
7984
7985typedef struct elf64_sym {
7986 Elf64_Word st_name;
7987 unsigned char st_info;
7988 unsigned char st_other;
7989 Elf64_Half st_shndx;
7990 Elf64_Addr st_value;
7991 Elf64_Xword st_size;
7992} Elf64_Sym;
7993
7994
7995
7996
7997typedef struct elf32_hdr{
7998 unsigned char e_ident[16];
7999 Elf32_Half e_type;
8000 Elf32_Half e_machine;
8001 Elf32_Word e_version;
8002 Elf32_Addr e_entry;
8003 Elf32_Off e_phoff;
8004 Elf32_Off e_shoff;
8005 Elf32_Word e_flags;
8006 Elf32_Half e_ehsize;
8007 Elf32_Half e_phentsize;
8008 Elf32_Half e_phnum;
8009 Elf32_Half e_shentsize;
8010 Elf32_Half e_shnum;
8011 Elf32_Half e_shstrndx;
8012} Elf32_Ehdr;
8013
8014typedef struct elf64_hdr {
8015 unsigned char e_ident[16];
8016 Elf64_Half e_type;
8017 Elf64_Half e_machine;
8018 Elf64_Word e_version;
8019 Elf64_Addr e_entry;
8020 Elf64_Off e_phoff;
8021 Elf64_Off e_shoff;
8022 Elf64_Word e_flags;
8023 Elf64_Half e_ehsize;
8024 Elf64_Half e_phentsize;
8025 Elf64_Half e_phnum;
8026 Elf64_Half e_shentsize;
8027 Elf64_Half e_shnum;
8028 Elf64_Half e_shstrndx;
8029} Elf64_Ehdr;
8030
8031
8032
8033
8034
8035
8036
8037typedef struct elf32_phdr{
8038 Elf32_Word p_type;
8039 Elf32_Off p_offset;
8040 Elf32_Addr p_vaddr;
8041 Elf32_Addr p_paddr;
8042 Elf32_Word p_filesz;
8043 Elf32_Word p_memsz;
8044 Elf32_Word p_flags;
8045 Elf32_Word p_align;
8046} Elf32_Phdr;
8047
8048typedef struct elf64_phdr {
8049 Elf64_Word p_type;
8050 Elf64_Word p_flags;
8051 Elf64_Off p_offset;
8052 Elf64_Addr p_vaddr;
8053 Elf64_Addr p_paddr;
8054 Elf64_Xword p_filesz;
8055 Elf64_Xword p_memsz;
8056 Elf64_Xword p_align;
8057} Elf64_Phdr;
8058# 269 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf.h"
8059typedef struct {
8060 Elf32_Word sh_name;
8061 Elf32_Word sh_type;
8062 Elf32_Word sh_flags;
8063 Elf32_Addr sh_addr;
8064 Elf32_Off sh_offset;
8065 Elf32_Word sh_size;
8066 Elf32_Word sh_link;
8067 Elf32_Word sh_info;
8068 Elf32_Word sh_addralign;
8069 Elf32_Word sh_entsize;
8070} Elf32_Shdr;
8071
8072typedef struct elf64_shdr {
8073 Elf64_Word sh_name;
8074 Elf64_Word sh_type;
8075 Elf64_Xword sh_flags;
8076 Elf64_Addr sh_addr;
8077 Elf64_Off sh_offset;
8078 Elf64_Xword sh_size;
8079 Elf64_Word sh_link;
8080 Elf64_Word sh_info;
8081 Elf64_Xword sh_addralign;
8082 Elf64_Xword sh_entsize;
8083} Elf64_Shdr;
8084# 342 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elf.h"
8085typedef struct elf32_note {
8086 Elf32_Word n_namesz;
8087 Elf32_Word n_descsz;
8088 Elf32_Word n_type;
8089} Elf32_Nhdr;
8090
8091
8092typedef struct elf64_note {
8093 Elf64_Word n_namesz;
8094 Elf64_Word n_descsz;
8095 Elf64_Word n_type;
8096} Elf64_Nhdr;
8097
8098
8099
8100extern Elf32_Dyn _DYNAMIC [];
8101# 17 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h" 2
8102
8103
8104
8105# 1 "include2/asm/local.h" 1
8106
8107
8108
8109# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/local.h" 1
8110
8111
8112
8113
8114# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hardirq.h" 1
8115
8116
8117
8118
8119# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/smp_lock.h" 1
8120# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hardirq.h" 2
8121
8122# 1 "include2/asm/hardirq.h" 1
8123
8124
8125
8126
8127# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h" 1
8128# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8129# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irqreturn.h" 1
8130# 19 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irqreturn.h"
8131typedef int irqreturn_t;
8132# 21 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h" 2
8133
8134# 1 "include2/asm/irq.h" 1
8135# 14 "include2/asm/irq.h"
8136# 1 "include2/asm/machvec.h" 1
8137# 15 "include2/asm/machvec.h"
8138# 1 "include/asm/machtypes.h" 1
8139# 16 "include2/asm/machvec.h" 2
8140# 1 "include2/asm/machvec_init.h" 1
8141# 17 "include2/asm/machvec.h" 2
8142
8143struct device;
8144
8145struct sh_machine_vector {
8146 void (*mv_setup)(char **cmdline_p);
8147 const char *mv_name;
8148 int mv_nr_irqs;
8149
8150 u8 (*mv_inb)(unsigned long);
8151 u16 (*mv_inw)(unsigned long);
8152 u32 (*mv_inl)(unsigned long);
8153 void (*mv_outb)(u8, unsigned long);
8154 void (*mv_outw)(u16, unsigned long);
8155 void (*mv_outl)(u32, unsigned long);
8156
8157 u8 (*mv_inb_p)(unsigned long);
8158 u16 (*mv_inw_p)(unsigned long);
8159 u32 (*mv_inl_p)(unsigned long);
8160 void (*mv_outb_p)(u8, unsigned long);
8161 void (*mv_outw_p)(u16, unsigned long);
8162 void (*mv_outl_p)(u32, unsigned long);
8163
8164 void (*mv_insb)(unsigned long, void *dst, unsigned long count);
8165 void (*mv_insw)(unsigned long, void *dst, unsigned long count);
8166 void (*mv_insl)(unsigned long, void *dst, unsigned long count);
8167 void (*mv_outsb)(unsigned long, const void *src, unsigned long count);
8168 void (*mv_outsw)(unsigned long, const void *src, unsigned long count);
8169 void (*mv_outsl)(unsigned long, const void *src, unsigned long count);
8170
8171 u8 (*mv_readb)(void *);
8172 u16 (*mv_readw)(void *);
8173 u32 (*mv_readl)(void *);
8174 void (*mv_writeb)(u8, void *);
8175 void (*mv_writew)(u16, void *);
8176 void (*mv_writel)(u32, void *);
8177
8178 int (*mv_irq_demux)(int irq);
8179
8180 void (*mv_init_irq)(void);
8181 void (*mv_init_pci)(void);
8182
8183 void (*mv_heartbeat)(void);
8184
8185 void *(*mv_consistent_alloc)(struct device *, size_t, dma_addr_t *, gfp_t);
8186 int (*mv_consistent_free)(struct device *, size_t, void *, dma_addr_t);
8187
8188 void *(*mv_ioport_map)(unsigned long port, unsigned int size);
8189 void (*mv_ioport_unmap)(void *);
8190};
8191
8192extern struct sh_machine_vector sh_mv;
8193# 15 "include2/asm/irq.h" 2
8194# 340 "include2/asm/irq.h"
8195extern void disable_irq(unsigned int);
8196extern void disable_irq_nosync(unsigned int);
8197extern void enable_irq(unsigned int);
8198
8199
8200
8201
8202extern void make_maskreg_irq(unsigned int irq);
8203extern unsigned short *irq_mask_register;
8204
8205
8206
8207
8208void init_IRQ_pint(void);
8209
8210
8211
8212
8213extern void make_ipr_irq(unsigned int irq, unsigned int addr,
8214 int pos, int priority);
8215extern void make_imask_irq(unsigned int irq);
8216# 706 "include2/asm/irq.h"
8217struct intc2_data {
8218 unsigned short irq;
8219 unsigned char ipr_offset, ipr_shift;
8220 unsigned char msk_offset, msk_shift;
8221 unsigned char priority;
8222};
8223
8224void make_intc2_irq(struct intc2_data *);
8225void init_IRQ_intc2(void);
8226
8227
8228extern int shmse_irq_demux(int irq);
8229
8230static inline __attribute__((always_inline)) int generic_irq_demux(int irq)
8231{
8232 return irq;
8233}
8234# 23 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h" 2
8235
8236# 1 "include2/asm/irq_regs.h" 1
8237# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/irq_regs.h" 1
8238# 21 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/irq_regs.h"
8239extern __typeof__(struct pt_regs *) per_cpu____irq_regs;
8240
8241static inline __attribute__((always_inline)) struct pt_regs *get_irq_regs(void)
8242{
8243 return per_cpu____irq_regs;
8244}
8245
8246static inline __attribute__((always_inline)) struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
8247{
8248 struct pt_regs *old_regs, **pp_regs = &per_cpu____irq_regs;
8249
8250 old_regs = *pp_regs;
8251 *pp_regs = new_regs;
8252 return old_regs;
8253}
8254# 1 "include2/asm/irq_regs.h" 2
8255# 25 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h" 2
8256
8257struct irq_desc;
8258typedef void (*irq_flow_handler_t)(unsigned int irq,
8259 struct irq_desc *desc);
8260# 70 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8261struct proc_dir_entry;
8262# 94 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8263struct irq_chip {
8264 const char *name;
8265 unsigned int (*startup)(unsigned int irq);
8266 void (*shutdown)(unsigned int irq);
8267 void (*enable)(unsigned int irq);
8268 void (*disable)(unsigned int irq);
8269
8270 void (*ack)(unsigned int irq);
8271 void (*mask)(unsigned int irq);
8272 void (*mask_ack)(unsigned int irq);
8273 void (*unmask)(unsigned int irq);
8274 void (*eoi)(unsigned int irq);
8275
8276 void (*end)(unsigned int irq);
8277 void (*set_affinity)(unsigned int irq, cpumask_t dest);
8278 int (*retrigger)(unsigned int irq);
8279 int (*set_type)(unsigned int irq, unsigned int flow_type);
8280 int (*set_wake)(unsigned int irq, unsigned int on);
8281# 121 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8282 const char *typename;
8283};
8284# 147 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8285struct irq_desc {
8286 irq_flow_handler_t handle_irq;
8287 struct irq_chip *chip;
8288 void *handler_data;
8289 void *chip_data;
8290 struct irqaction *action;
8291 unsigned int status;
8292
8293 unsigned int depth;
8294 unsigned int wake_depth;
8295 unsigned int irq_count;
8296 unsigned int irqs_unhandled;
8297 spinlock_t lock;
8298# 168 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8299 struct proc_dir_entry *dir;
8300
8301} __attribute__((__aligned__((1 << 5))));
8302
8303extern struct irq_desc irq_desc[(112 + 0 + 122)];
8304
8305
8306
8307
8308
8309typedef struct irq_chip hw_irq_controller;
8310
8311typedef struct irq_desc irq_desc_t;
8312
8313
8314
8315
8316# 1 "include2/asm/hw_irq.h" 1
8317
8318
8319
8320
8321
8322extern atomic_t irq_err_count;
8323# 186 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h" 2
8324
8325extern int setup_irq(unsigned int irq, struct irqaction *new);
8326# 201 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8327static inline __attribute__((always_inline)) void set_native_irq_info(int irq, cpumask_t mask)
8328{
8329}
8330# 244 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8331static inline __attribute__((always_inline)) void set_balance_irq_affinity(unsigned int irq, cpumask_t mask)
8332{
8333}
8334
8335
8336
8337
8338
8339static inline __attribute__((always_inline)) int select_smp_affinity(unsigned int irq)
8340{
8341 return 1;
8342}
8343
8344
8345extern int no_irq_affinity;
8346
8347
8348extern int handle_IRQ_event(unsigned int irq, struct irqaction *action);
8349
8350
8351
8352
8353
8354extern void handle_level_irq(unsigned int irq, struct irq_desc *desc);
8355extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc);
8356extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc);
8357extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc);
8358extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc);
8359extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc);
8360
8361
8362
8363
8364
8365extern const char *handle_irq_name(irq_flow_handler_t handle);
8366
8367
8368
8369
8370
8371
8372extern unsigned int __do_IRQ(unsigned int irq);
8373# 294 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq.h"
8374static inline __attribute__((always_inline)) void generic_handle_irq(unsigned int irq)
8375{
8376 struct irq_desc *desc = irq_desc + irq;
8377
8378
8379
8380
8381 if (__builtin_expect(!!(desc->handle_irq), 1))
8382 desc->handle_irq(irq, desc);
8383 else
8384 __do_IRQ(irq);
8385
8386}
8387
8388
8389extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
8390 int action_ret);
8391
8392
8393void check_irq_resend(struct irq_desc *desc, unsigned int irq);
8394
8395
8396extern void init_irq_proc(void);
8397
8398
8399extern int noirqdebug_setup(char *str);
8400
8401
8402extern int can_request_irq(unsigned int irq, unsigned long irqflags);
8403
8404
8405extern struct irq_chip no_irq_chip;
8406extern struct irq_chip dummy_irq_chip;
8407
8408extern void
8409set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
8410 irq_flow_handler_t handle);
8411extern void
8412__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained);
8413
8414
8415
8416
8417static inline __attribute__((always_inline)) void
8418set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
8419{
8420 __set_irq_handler(irq, handle, 0);
8421}
8422
8423
8424
8425
8426
8427
8428static inline __attribute__((always_inline)) void
8429set_irq_chained_handler(unsigned int irq,
8430 irq_flow_handler_t handle)
8431{
8432 __set_irq_handler(irq, handle, 1);
8433}
8434
8435
8436extern int create_irq(void);
8437extern void destroy_irq(unsigned int irq);
8438
8439
8440static inline __attribute__((always_inline)) int irq_has_action(unsigned int irq)
8441{
8442 struct irq_desc *desc = irq_desc + irq;
8443 return desc->action != ((void *)0);
8444}
8445
8446
8447extern void dynamic_irq_init(unsigned int irq);
8448extern void dynamic_irq_cleanup(unsigned int irq);
8449
8450
8451extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
8452extern int set_irq_data(unsigned int irq, void *data);
8453extern int set_irq_chip_data(unsigned int irq, void *data);
8454extern int set_irq_type(unsigned int irq, unsigned int type);
8455# 6 "include2/asm/hardirq.h" 2
8456
8457
8458typedef struct {
8459 unsigned int __softirq_pending;
8460} __attribute__((__aligned__((1 << 5)))) irq_cpustat_t;
8461
8462# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq_cpustat.h" 1
8463# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irq_cpustat.h"
8464extern irq_cpustat_t irq_stat[];
8465# 13 "include2/asm/hardirq.h" 2
8466
8467extern void ack_bad_irq(unsigned int irq);
8468# 8 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hardirq.h" 2
8469# 95 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hardirq.h"
8470struct task_struct;
8471
8472
8473static inline __attribute__((always_inline)) void account_system_vtime(struct task_struct *tsk)
8474{
8475}
8476# 129 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hardirq.h"
8477extern void irq_exit(void);
8478# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/local.h" 2
8479# 22 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/local.h"
8480typedef struct
8481{
8482 atomic_long_t a;
8483} local_t;
8484# 5 "include2/asm/local.h" 2
8485# 21 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h" 2
8486
8487# 1 "include2/asm/module.h" 1
8488
8489
8490
8491
8492
8493
8494
8495struct mod_arch_specific {
8496
8497};
8498# 23 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h" 2
8499# 34 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h"
8500struct kernel_symbol
8501{
8502 unsigned long value;
8503 const char *name;
8504};
8505
8506struct modversion_info
8507{
8508 unsigned long crc;
8509 char name[(64 - sizeof(unsigned long))];
8510};
8511
8512struct module;
8513
8514struct module_attribute {
8515 struct attribute attr;
8516 ssize_t (*show)(struct module_attribute *, struct module *, char *);
8517 ssize_t (*store)(struct module_attribute *, struct module *,
8518 const char *, size_t count);
8519 void (*setup)(struct module *, const char *);
8520 int (*test)(struct module *);
8521 void (*free)(struct module *);
8522};
8523
8524struct module_kobject
8525{
8526 struct kobject kobj;
8527 struct module *mod;
8528};
8529
8530
8531extern int init_module(void);
8532extern void cleanup_module(void);
8533
8534
8535struct exception_table_entry;
8536
8537const struct exception_table_entry *
8538search_extable(const struct exception_table_entry *first,
8539 const struct exception_table_entry *last,
8540 unsigned long value);
8541void sort_extable(struct exception_table_entry *start,
8542 struct exception_table_entry *finish);
8543void sort_main_extable(void);
8544
8545extern struct subsystem module_subsys;
8546# 165 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h"
8547const struct exception_table_entry *search_exception_tables(unsigned long add);
8548
8549struct notifier_block;
8550# 484 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/module.h"
8551static inline __attribute__((always_inline)) const struct exception_table_entry *
8552search_module_extables(unsigned long addr)
8553{
8554 return ((void *)0);
8555}
8556
8557
8558static inline __attribute__((always_inline)) struct module *module_text_address(unsigned long addr)
8559{
8560 return ((void *)0);
8561}
8562
8563
8564static inline __attribute__((always_inline)) struct module *__module_text_address(unsigned long addr)
8565{
8566 return ((void *)0);
8567}
8568
8569static inline __attribute__((always_inline)) int is_module_address(unsigned long addr)
8570{
8571 return 0;
8572}
8573
8574
8575
8576
8577
8578
8579static inline __attribute__((always_inline)) void __module_get(struct module *module)
8580{
8581}
8582
8583static inline __attribute__((always_inline)) int try_module_get(struct module *module)
8584{
8585 return 1;
8586}
8587
8588static inline __attribute__((always_inline)) void module_put(struct module *module)
8589{
8590}
8591
8592
8593
8594
8595
8596
8597static inline __attribute__((always_inline)) const char *module_address_lookup(unsigned long addr,
8598 unsigned long *symbolsize,
8599 unsigned long *offset,
8600 char **modname)
8601{
8602 return ((void *)0);
8603}
8604
8605static inline __attribute__((always_inline)) struct module *module_get_kallsym(unsigned int symnum,
8606 unsigned long *value,
8607 char *type, char *name,
8608 size_t namelen)
8609{
8610 return ((void *)0);
8611}
8612
8613static inline __attribute__((always_inline)) unsigned long module_kallsyms_lookup_name(const char *name)
8614{
8615 return 0;
8616}
8617
8618static inline __attribute__((always_inline)) int is_exported(const char *name, const struct module *mod)
8619{
8620 return 0;
8621}
8622
8623static inline __attribute__((always_inline)) int register_module_notifier(struct notifier_block * nb)
8624{
8625
8626 return 0;
8627}
8628
8629static inline __attribute__((always_inline)) int unregister_module_notifier(struct notifier_block * nb)
8630{
8631 return 0;
8632}
8633
8634
8635
8636static inline __attribute__((always_inline)) void print_modules(void)
8637{
8638}
8639
8640struct device_driver;
8641struct module;
8642
8643static inline __attribute__((always_inline)) void module_add_driver(struct module *module, struct device_driver *driver)
8644{
8645}
8646
8647static inline __attribute__((always_inline)) void module_remove_driver(struct device_driver *driver)
8648{
8649}
8650# 21 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
8651
8652
8653
8654
8655# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 1
8656# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
8657# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/limits.h" 1
8658# 10 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
8659# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ioctl.h" 1
8660
8661
8662
8663# 1 "include2/asm/ioctl.h" 1
8664# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/ioctl.h" 1
8665# 51 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/ioctl.h"
8666extern unsigned int __invalid_size_argument_for_IOC;
8667# 1 "include2/asm/ioctl.h" 2
8668# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ioctl.h" 2
8669# 11 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
8670# 35 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
8671struct files_stat_struct {
8672 int nr_files;
8673 int nr_free_files;
8674 int max_files;
8675};
8676extern struct files_stat_struct files_stat;
8677extern int get_max_files(void);
8678
8679struct inodes_stat_t {
8680 int nr_inodes;
8681 int nr_unused;
8682 int dummy[5];
8683};
8684extern struct inodes_stat_t inodes_stat;
8685
8686extern int leases_enable, lease_break_time;
8687
8688
8689extern int dir_notify_enable;
8690# 270 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
8691# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kdev_t.h" 1
8692# 21 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/kdev_t.h"
8693static inline __attribute__((always_inline)) int old_valid_dev(dev_t dev)
8694{
8695 return ((unsigned int) ((dev) >> 20)) < 256 && ((unsigned int) ((dev) & ((1U << 20) - 1))) < 256;
8696}
8697
8698static inline __attribute__((always_inline)) u16 old_encode_dev(dev_t dev)
8699{
8700 return (((unsigned int) ((dev) >> 20)) << 8) | ((unsigned int) ((dev) & ((1U << 20) - 1)));
8701}
8702
8703static inline __attribute__((always_inline)) dev_t old_decode_dev(u16 val)
8704{
8705 return ((((val >> 8) & 255) << 20) | (val & 255));
8706}
8707
8708static inline __attribute__((always_inline)) int new_valid_dev(dev_t dev)
8709{
8710 return 1;
8711}
8712
8713static inline __attribute__((always_inline)) u32 new_encode_dev(dev_t dev)
8714{
8715 unsigned major = ((unsigned int) ((dev) >> 20));
8716 unsigned minor = ((unsigned int) ((dev) & ((1U << 20) - 1)));
8717 return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
8718}
8719
8720static inline __attribute__((always_inline)) dev_t new_decode_dev(u32 dev)
8721{
8722 unsigned major = (dev & 0xfff00) >> 8;
8723 unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00);
8724 return (((major) << 20) | (minor));
8725}
8726
8727static inline __attribute__((always_inline)) int huge_valid_dev(dev_t dev)
8728{
8729 return 1;
8730}
8731
8732static inline __attribute__((always_inline)) u64 huge_encode_dev(dev_t dev)
8733{
8734 return new_encode_dev(dev);
8735}
8736
8737static inline __attribute__((always_inline)) dev_t huge_decode_dev(u64 dev)
8738{
8739 return new_decode_dev(dev);
8740}
8741
8742static inline __attribute__((always_inline)) int sysv_valid_dev(dev_t dev)
8743{
8744 return ((unsigned int) ((dev) >> 20)) < (1<<14) && ((unsigned int) ((dev) & ((1U << 20) - 1))) < (1<<18);
8745}
8746
8747static inline __attribute__((always_inline)) u32 sysv_encode_dev(dev_t dev)
8748{
8749 return ((unsigned int) ((dev) & ((1U << 20) - 1))) | (((unsigned int) ((dev) >> 20)) << 18);
8750}
8751
8752static inline __attribute__((always_inline)) unsigned sysv_major(u32 dev)
8753{
8754 return (dev >> 18) & 0x3fff;
8755}
8756
8757static inline __attribute__((always_inline)) unsigned sysv_minor(u32 dev)
8758{
8759 return dev & 0x3ffff;
8760}
8761# 271 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
8762# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h" 1
8763# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h"
8764struct nameidata;
8765struct vfsmount;
8766# 33 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h"
8767struct qstr {
8768 unsigned int hash;
8769 unsigned int len;
8770 const unsigned char *name;
8771};
8772
8773struct dentry_stat_t {
8774 int nr_dentry;
8775 int nr_unused;
8776 int age_limit;
8777 int want_pages;
8778 int dummy[2];
8779};
8780extern struct dentry_stat_t dentry_stat;
8781
8782
8783
8784
8785
8786
8787static inline __attribute__((always_inline)) unsigned long
8788partial_name_hash(unsigned long c, unsigned long prevhash)
8789{
8790 return (prevhash + (c << 4) + (c >> 4)) * 11;
8791}
8792
8793
8794
8795
8796
8797static inline __attribute__((always_inline)) unsigned long end_name_hash(unsigned long hash)
8798{
8799 return (unsigned int) hash;
8800}
8801
8802
8803static inline __attribute__((always_inline)) unsigned int
8804full_name_hash(const unsigned char *name, unsigned int len)
8805{
8806 unsigned long hash = 0;
8807 while (len--)
8808 hash = partial_name_hash(*name++, hash);
8809 return end_name_hash(hash);
8810}
8811
8812struct dcookie_struct;
8813
8814
8815
8816struct dentry {
8817 atomic_t d_count;
8818 unsigned int d_flags;
8819 spinlock_t d_lock;
8820 struct inode *d_inode;
8821
8822
8823
8824
8825
8826 struct hlist_node d_hash;
8827 struct dentry *d_parent;
8828 struct qstr d_name;
8829
8830 struct list_head d_lru;
8831
8832
8833
8834 union {
8835 struct list_head d_child;
8836 struct rcu_head d_rcu;
8837 } d_u;
8838 struct list_head d_subdirs;
8839 struct list_head d_alias;
8840 unsigned long d_time;
8841 struct dentry_operations *d_op;
8842 struct super_block *d_sb;
8843 void *d_fsdata;
8844
8845
8846
8847 int d_mounted;
8848 unsigned char d_iname[36];
8849};
8850
8851
8852
8853
8854
8855
8856
8857enum dentry_d_lock_class
8858{
8859 DENTRY_D_LOCK_NORMAL,
8860 DENTRY_D_LOCK_NESTED
8861};
8862
8863struct dentry_operations {
8864 int (*d_revalidate)(struct dentry *, struct nameidata *);
8865 int (*d_hash) (struct dentry *, struct qstr *);
8866 int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
8867 int (*d_delete)(struct dentry *);
8868 void (*d_release)(struct dentry *);
8869 void (*d_iput)(struct dentry *, struct inode *);
8870};
8871# 179 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h"
8872extern spinlock_t dcache_lock;
8873# 197 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h"
8874static inline __attribute__((always_inline)) void __d_drop(struct dentry *dentry)
8875{
8876 if (!(dentry->d_flags & 0x0010)) {
8877 dentry->d_flags |= 0x0010;
8878 hlist_del_rcu(&dentry->d_hash);
8879 }
8880}
8881
8882static inline __attribute__((always_inline)) void d_drop(struct dentry *dentry)
8883{
8884 do { do { } while (0); (void)0; (void)(&dcache_lock); } while (0);
8885 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8886 __d_drop(dentry);
8887 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8888 do { do { } while (0); (void)0; (void)(&dcache_lock); } while (0);
8889}
8890
8891static inline __attribute__((always_inline)) int dname_external(struct dentry *dentry)
8892{
8893 return dentry->d_name.name != dentry->d_iname;
8894}
8895
8896
8897
8898
8899extern void d_instantiate(struct dentry *, struct inode *);
8900extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
8901extern struct dentry * d_materialise_unique(struct dentry *, struct inode *);
8902extern void d_delete(struct dentry *);
8903
8904
8905extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
8906extern struct dentry * d_alloc_anon(struct inode *);
8907extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
8908extern void shrink_dcache_sb(struct super_block *);
8909extern void shrink_dcache_parent(struct dentry *);
8910extern void shrink_dcache_for_umount(struct super_block *);
8911extern int d_invalidate(struct dentry *);
8912
8913
8914extern struct dentry * d_alloc_root(struct inode *);
8915
8916
8917extern void d_genocide(struct dentry *);
8918
8919extern struct dentry *d_find_alias(struct inode *);
8920extern void d_prune_aliases(struct inode *);
8921
8922
8923extern int have_submounts(struct dentry *);
8924
8925
8926
8927
8928extern void d_rehash(struct dentry *);
8929# 262 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h"
8930static inline __attribute__((always_inline)) void d_add(struct dentry *entry, struct inode *inode)
8931{
8932 d_instantiate(entry, inode);
8933 d_rehash(entry);
8934}
8935# 276 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h"
8936static inline __attribute__((always_inline)) struct dentry *d_add_unique(struct dentry *entry, struct inode *inode)
8937{
8938 struct dentry *res;
8939
8940 res = d_instantiate_unique(entry, inode);
8941 d_rehash(res != ((void *)0) ? res : entry);
8942 return res;
8943}
8944
8945
8946extern void d_move(struct dentry *, struct dentry *);
8947
8948
8949extern struct dentry * d_lookup(struct dentry *, struct qstr *);
8950extern struct dentry * __d_lookup(struct dentry *, struct qstr *);
8951extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *);
8952
8953
8954extern int d_validate(struct dentry *, struct dentry *);
8955
8956extern char * d_path(struct dentry *, struct vfsmount *, char *, int);
8957# 313 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h"
8958static inline __attribute__((always_inline)) struct dentry *dget(struct dentry *dentry)
8959{
8960 if (dentry) {
8961 do { if (__builtin_expect(!!((!((&dentry->d_count)->counter))!=0), 0)) do { printk("kernel BUG at %s:%d!\n", "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h", 316); *(volatile int *)0 = 0; } while (0); } while(0);
8962 atomic_add(1,(&dentry->d_count));
8963 }
8964 return dentry;
8965}
8966
8967extern struct dentry * dget_locked(struct dentry *);
8968# 331 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dcache.h"
8969static inline __attribute__((always_inline)) int d_unhashed(struct dentry *dentry)
8970{
8971 return (dentry->d_flags & 0x0010);
8972}
8973
8974static inline __attribute__((always_inline)) struct dentry *dget_parent(struct dentry *dentry)
8975{
8976 struct dentry *ret;
8977
8978 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8979 ret = dget(dentry->d_parent);
8980 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8981 return ret;
8982}
8983
8984extern void dput(struct dentry *);
8985
8986static inline __attribute__((always_inline)) int d_mountpoint(struct dentry *dentry)
8987{
8988 return dentry->d_mounted;
8989}
8990
8991extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
8992extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
8993extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
8994
8995extern int sysctl_vfs_cache_pressure;
8996# 272 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
8997
8998
8999
9000
9001# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/radix-tree.h" 1
9002# 29 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/radix-tree.h"
9003struct radix_tree_root {
9004 unsigned int height;
9005 gfp_t gfp_mask;
9006 struct radix_tree_node *rnode;
9007};
9008# 51 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/radix-tree.h"
9009int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
9010void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
9011void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long);
9012void *radix_tree_delete(struct radix_tree_root *, unsigned long);
9013unsigned int
9014radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
9015 unsigned long first_index, unsigned int max_items);
9016int radix_tree_preload(gfp_t gfp_mask);
9017void radix_tree_init(void);
9018void *radix_tree_tag_set(struct radix_tree_root *root,
9019 unsigned long index, unsigned int tag);
9020void *radix_tree_tag_clear(struct radix_tree_root *root,
9021 unsigned long index, unsigned int tag);
9022int radix_tree_tag_get(struct radix_tree_root *root,
9023 unsigned long index, unsigned int tag);
9024unsigned int
9025radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results,
9026 unsigned long first_index, unsigned int max_items,
9027 unsigned int tag);
9028int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag);
9029
9030static inline __attribute__((always_inline)) void radix_tree_preload_end(void)
9031{
9032 do { } while (0);
9033}
9034# 277 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
9035# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/prio_tree.h" 1
9036# 14 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/prio_tree.h"
9037struct raw_prio_tree_node {
9038 struct prio_tree_node *left;
9039 struct prio_tree_node *right;
9040 struct prio_tree_node *parent;
9041};
9042
9043struct prio_tree_node {
9044 struct prio_tree_node *left;
9045 struct prio_tree_node *right;
9046 struct prio_tree_node *parent;
9047 unsigned long start;
9048 unsigned long last;
9049};
9050
9051struct prio_tree_root {
9052 struct prio_tree_node *prio_tree_node;
9053 unsigned short index_bits;
9054 unsigned short raw;
9055
9056
9057
9058
9059};
9060
9061struct prio_tree_iter {
9062 struct prio_tree_node *cur;
9063 unsigned long mask;
9064 unsigned long value;
9065 int size_level;
9066
9067 struct prio_tree_root *root;
9068 unsigned long r_index;
9069 unsigned long h_index;
9070};
9071
9072static inline __attribute__((always_inline)) void prio_tree_iter_init(struct prio_tree_iter *iter,
9073 struct prio_tree_root *root, unsigned long r_index, unsigned long h_index)
9074{
9075 iter->root = root;
9076 iter->r_index = r_index;
9077 iter->h_index = h_index;
9078 iter->cur = ((void *)0);
9079}
9080# 84 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/prio_tree.h"
9081static inline __attribute__((always_inline)) int prio_tree_empty(const struct prio_tree_root *root)
9082{
9083 return root->prio_tree_node == ((void *)0);
9084}
9085
9086static inline __attribute__((always_inline)) int prio_tree_root(const struct prio_tree_node *node)
9087{
9088 return node->parent == node;
9089}
9090
9091static inline __attribute__((always_inline)) int prio_tree_left_empty(const struct prio_tree_node *node)
9092{
9093 return node->left == node;
9094}
9095
9096static inline __attribute__((always_inline)) int prio_tree_right_empty(const struct prio_tree_node *node)
9097{
9098 return node->right == node;
9099}
9100
9101
9102struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
9103 struct prio_tree_node *old, struct prio_tree_node *node);
9104struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
9105 struct prio_tree_node *node);
9106void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node);
9107struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter);
9108# 278 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
9109# 286 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9110struct hd_geometry;
9111struct iovec;
9112struct nameidata;
9113struct kiocb;
9114struct pipe_inode_info;
9115struct poll_table_struct;
9116struct kstatfs;
9117struct vm_area_struct;
9118struct vfsmount;
9119
9120extern void __attribute__ ((__section__ (".init.text"))) inode_init(unsigned long);
9121extern void __attribute__ ((__section__ (".init.text"))) inode_init_early(void);
9122extern void __attribute__ ((__section__ (".init.text"))) mnt_init(unsigned long);
9123extern void __attribute__ ((__section__ (".init.text"))) files_init(unsigned long);
9124
9125struct buffer_head;
9126typedef int (get_block_t)(struct inode *inode, sector_t iblock,
9127 struct buffer_head *bh_result, int create);
9128typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
9129 ssize_t bytes, void *private);
9130# 335 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9131struct iattr {
9132 unsigned int ia_valid;
9133 umode_t ia_mode;
9134 uid_t ia_uid;
9135 gid_t ia_gid;
9136 loff_t ia_size;
9137 struct timespec ia_atime;
9138 struct timespec ia_mtime;
9139 struct timespec ia_ctime;
9140
9141
9142
9143
9144
9145
9146 struct file *ia_file;
9147};
9148
9149
9150
9151
9152# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h" 1
9153# 44 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h"
9154typedef __kernel_uid32_t qid_t;
9155typedef __u64 qsize_t;
9156
9157extern spinlock_t dq_data_lock;
9158# 105 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h"
9159struct if_dqblk {
9160 __u64 dqb_bhardlimit;
9161 __u64 dqb_bsoftlimit;
9162 __u64 dqb_curspace;
9163 __u64 dqb_ihardlimit;
9164 __u64 dqb_isoftlimit;
9165 __u64 dqb_curinodes;
9166 __u64 dqb_btime;
9167 __u64 dqb_itime;
9168 __u32 dqb_valid;
9169};
9170# 126 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h"
9171struct if_dqinfo {
9172 __u64 dqi_bgrace;
9173 __u64 dqi_igrace;
9174 __u32 dqi_flags;
9175 __u32 dqi_valid;
9176};
9177
9178
9179
9180
9181
9182# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dqblk_xfs.h" 1
9183# 50 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dqblk_xfs.h"
9184typedef struct fs_disk_quota {
9185 __s8 d_version;
9186 __s8 d_flags;
9187 __u16 d_fieldmask;
9188 __u32 d_id;
9189 __u64 d_blk_hardlimit;
9190 __u64 d_blk_softlimit;
9191 __u64 d_ino_hardlimit;
9192 __u64 d_ino_softlimit;
9193 __u64 d_bcount;
9194 __u64 d_icount;
9195 __s32 d_itimer;
9196
9197 __s32 d_btimer;
9198 __u16 d_iwarns;
9199 __u16 d_bwarns;
9200 __s32 d_padding2;
9201 __u64 d_rtb_hardlimit;
9202 __u64 d_rtb_softlimit;
9203 __u64 d_rtbcount;
9204 __s32 d_rtbtimer;
9205 __u16 d_rtbwarns;
9206 __s16 d_padding3;
9207 char d_padding4[8];
9208} fs_disk_quota_t;
9209# 137 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dqblk_xfs.h"
9210typedef struct fs_qfilestat {
9211 __u64 qfs_ino;
9212 __u64 qfs_nblks;
9213 __u32 qfs_nextents;
9214} fs_qfilestat_t;
9215
9216typedef struct fs_quota_stat {
9217 __s8 qs_version;
9218 __u16 qs_flags;
9219 __s8 qs_pad;
9220 fs_qfilestat_t qs_uquota;
9221 fs_qfilestat_t qs_gquota;
9222 __u32 qs_incoredqs;
9223 __s32 qs_btimelimit;
9224 __s32 qs_itimelimit;
9225 __s32 qs_rtbtimelimit;
9226 __u16 qs_bwarnlimit;
9227 __u16 qs_iwarnlimit;
9228} fs_quota_stat_t;
9229# 138 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h" 2
9230# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dqblk_v1.h" 1
9231# 21 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dqblk_v1.h"
9232struct v1_mem_dqinfo {
9233};
9234# 139 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h" 2
9235# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dqblk_v2.h" 1
9236# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/dqblk_v2.h"
9237struct v2_mem_dqinfo {
9238 unsigned int dqi_blocks;
9239 unsigned int dqi_free_blk;
9240 unsigned int dqi_free_entry;
9241};
9242# 140 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h" 2
9243# 151 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h"
9244struct mem_dqblk {
9245 __u32 dqb_bhardlimit;
9246 __u32 dqb_bsoftlimit;
9247 qsize_t dqb_curspace;
9248 __u32 dqb_ihardlimit;
9249 __u32 dqb_isoftlimit;
9250 __u32 dqb_curinodes;
9251 time_t dqb_btime;
9252 time_t dqb_itime;
9253};
9254
9255
9256
9257
9258struct quota_format_type;
9259
9260struct mem_dqinfo {
9261 struct quota_format_type *dqi_format;
9262 struct list_head dqi_dirty_list;
9263 unsigned long dqi_flags;
9264 unsigned int dqi_bgrace;
9265 unsigned int dqi_igrace;
9266 union {
9267 struct v1_mem_dqinfo v1_i;
9268 struct v2_mem_dqinfo v2_i;
9269 } u;
9270};
9271
9272struct super_block;
9273
9274
9275
9276
9277
9278extern void mark_info_dirty(struct super_block *sb, int type);
9279
9280
9281
9282
9283
9284
9285
9286struct dqstats {
9287 int lookups;
9288 int drops;
9289 int reads;
9290 int writes;
9291 int cache_hits;
9292 int allocated_dquots;
9293 int free_dquots;
9294 int syncs;
9295};
9296
9297extern struct dqstats dqstats;
9298# 213 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h"
9299struct dquot {
9300 struct hlist_node dq_hash;
9301 struct list_head dq_inuse;
9302 struct list_head dq_free;
9303 struct list_head dq_dirty;
9304 struct mutex dq_lock;
9305 atomic_t dq_count;
9306 wait_queue_head_t dq_wait_unused;
9307 struct super_block *dq_sb;
9308 unsigned int dq_id;
9309 loff_t dq_off;
9310 unsigned long dq_flags;
9311 short dq_type;
9312 struct mem_dqblk dq_dqb;
9313};
9314
9315
9316
9317
9318
9319
9320
9321struct quota_format_ops {
9322 int (*check_quota_file)(struct super_block *sb, int type);
9323 int (*read_file_info)(struct super_block *sb, int type);
9324 int (*write_file_info)(struct super_block *sb, int type);
9325 int (*free_file_info)(struct super_block *sb, int type);
9326 int (*read_dqblk)(struct dquot *dquot);
9327 int (*commit_dqblk)(struct dquot *dquot);
9328 int (*release_dqblk)(struct dquot *dquot);
9329};
9330
9331
9332struct dquot_operations {
9333 int (*initialize) (struct inode *, int);
9334 int (*drop) (struct inode *);
9335 int (*alloc_space) (struct inode *, qsize_t, int);
9336 int (*alloc_inode) (const struct inode *, unsigned long);
9337 int (*free_space) (struct inode *, qsize_t);
9338 int (*free_inode) (const struct inode *, unsigned long);
9339 int (*transfer) (struct inode *, struct iattr *);
9340 int (*write_dquot) (struct dquot *);
9341 int (*acquire_dquot) (struct dquot *);
9342 int (*release_dquot) (struct dquot *);
9343 int (*mark_dirty) (struct dquot *);
9344 int (*write_info) (struct super_block *, int);
9345};
9346
9347
9348struct quotactl_ops {
9349 int (*quota_on)(struct super_block *, int, int, char *);
9350 int (*quota_off)(struct super_block *, int);
9351 int (*quota_sync)(struct super_block *, int);
9352 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
9353 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
9354 int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
9355 int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
9356 int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
9357 int (*set_xstate)(struct super_block *, unsigned int, int);
9358 int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
9359 int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
9360};
9361
9362struct quota_format_type {
9363 int qf_fmt_id;
9364 struct quota_format_ops *qf_ops;
9365 struct module *qf_owner;
9366 struct quota_format_type *qf_next;
9367};
9368
9369
9370
9371
9372struct quota_info {
9373 unsigned int flags;
9374 struct mutex dqio_mutex;
9375 struct mutex dqonoff_mutex;
9376 struct rw_semaphore dqptr_sem;
9377 struct inode *files[2];
9378 struct mem_dqinfo info[2];
9379 struct quota_format_ops *ops[2];
9380};
9381
9382
9383int mark_dquot_dirty(struct dquot *dquot);
9384# 307 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/quota.h"
9385int register_quota_format(struct quota_format_type *fmt);
9386void unregister_quota_format(struct quota_format_type *fmt);
9387
9388struct quota_module_name {
9389 int qm_fmt_id;
9390 char *qm_mod_name;
9391};
9392# 357 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
9393# 384 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9394enum positive_aop_returns {
9395 AOP_WRITEPAGE_ACTIVATE = 0x80000,
9396 AOP_TRUNCATED_PAGE = 0x80001,
9397};
9398
9399
9400
9401
9402struct page;
9403struct address_space;
9404struct writeback_control;
9405
9406struct address_space_operations {
9407 int (*writepage)(struct page *page, struct writeback_control *wbc);
9408 int (*readpage)(struct file *, struct page *);
9409 void (*sync_page)(struct page *);
9410
9411
9412 int (*writepages)(struct address_space *, struct writeback_control *);
9413
9414
9415 int (*set_page_dirty)(struct page *page);
9416
9417 int (*readpages)(struct file *filp, struct address_space *mapping,
9418 struct list_head *pages, unsigned nr_pages);
9419
9420
9421
9422
9423
9424 int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
9425 int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
9426
9427 sector_t (*bmap)(struct address_space *, sector_t);
9428 void (*invalidatepage) (struct page *, unsigned long);
9429 int (*releasepage) (struct page *, gfp_t);
9430 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
9431 loff_t offset, unsigned long nr_segs);
9432 struct page* (*get_xip_page)(struct address_space *, sector_t,
9433 int);
9434
9435 int (*migratepage) (struct address_space *,
9436 struct page *, struct page *);
9437};
9438
9439struct backing_dev_info;
9440struct address_space {
9441 struct inode *host;
9442 struct radix_tree_root page_tree;
9443 rwlock_t tree_lock;
9444 unsigned int i_mmap_writable;
9445 struct prio_tree_root i_mmap;
9446 struct list_head i_mmap_nonlinear;
9447 spinlock_t i_mmap_lock;
9448 unsigned int truncate_count;
9449 unsigned long nrpages;
9450 unsigned long writeback_index;
9451 const struct address_space_operations *a_ops;
9452 unsigned long flags;
9453 struct backing_dev_info *backing_dev_info;
9454 spinlock_t private_lock;
9455 struct list_head private_list;
9456 struct address_space *assoc_mapping;
9457} __attribute__((aligned(sizeof(long))));
9458
9459
9460
9461
9462
9463
9464struct block_device {
9465 dev_t bd_dev;
9466 struct inode * bd_inode;
9467 int bd_openers;
9468 struct mutex bd_mutex;
9469 struct mutex bd_mount_mutex;
9470 struct list_head bd_inodes;
9471 void * bd_holder;
9472 int bd_holders;
9473
9474 struct list_head bd_holder_list;
9475
9476 struct block_device * bd_contains;
9477 unsigned bd_block_size;
9478 struct hd_struct * bd_part;
9479
9480 unsigned bd_part_count;
9481 int bd_invalidated;
9482 struct gendisk * bd_disk;
9483 struct list_head bd_list;
9484 struct backing_dev_info *bd_inode_backing_dev_info;
9485
9486
9487
9488
9489
9490
9491 unsigned long bd_private;
9492};
9493# 491 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9494enum bdev_bd_mutex_lock_class
9495{
9496 BD_MUTEX_NORMAL,
9497 BD_MUTEX_WHOLE,
9498 BD_MUTEX_PARTITION
9499};
9500# 506 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9501int mapping_tagged(struct address_space *mapping, int tag);
9502
9503
9504
9505
9506static inline __attribute__((always_inline)) int mapping_mapped(struct address_space *mapping)
9507{
9508 return !prio_tree_empty(&mapping->i_mmap) ||
9509 !list_empty(&mapping->i_mmap_nonlinear);
9510}
9511
9512
9513
9514
9515
9516
9517
9518static inline __attribute__((always_inline)) int mapping_writably_mapped(struct address_space *mapping)
9519{
9520 return mapping->i_mmap_writable != 0;
9521}
9522# 539 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9523struct inode {
9524 struct hlist_node i_hash;
9525 struct list_head i_list;
9526 struct list_head i_sb_list;
9527 struct list_head i_dentry;
9528 unsigned long i_ino;
9529 atomic_t i_count;
9530 umode_t i_mode;
9531 unsigned int i_nlink;
9532 uid_t i_uid;
9533 gid_t i_gid;
9534 dev_t i_rdev;
9535 loff_t i_size;
9536 struct timespec i_atime;
9537 struct timespec i_mtime;
9538 struct timespec i_ctime;
9539 unsigned int i_blkbits;
9540 unsigned long i_version;
9541 blkcnt_t i_blocks;
9542 unsigned short i_bytes;
9543 spinlock_t i_lock;
9544 struct mutex i_mutex;
9545 struct rw_semaphore i_alloc_sem;
9546 struct inode_operations *i_op;
9547 const struct file_operations *i_fop;
9548 struct super_block *i_sb;
9549 struct file_lock *i_flock;
9550 struct address_space *i_mapping;
9551 struct address_space i_data;
9552
9553
9554
9555 struct list_head i_devices;
9556 union {
9557 struct pipe_inode_info *i_pipe;
9558 struct block_device *i_bdev;
9559 struct cdev *i_cdev;
9560 };
9561 int i_cindex;
9562
9563 __u32 i_generation;
9564
9565
9566 unsigned long i_dnotify_mask;
9567 struct dnotify_struct *i_dnotify;
9568
9569
9570
9571 struct list_head inotify_watches;
9572 struct mutex inotify_mutex;
9573
9574
9575 unsigned long i_state;
9576 unsigned long dirtied_when;
9577
9578 unsigned int i_flags;
9579
9580 atomic_t i_writecount;
9581
9582
9583
9584 void *i_private;
9585
9586
9587
9588};
9589# 617 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9590enum inode_i_mutex_lock_class
9591{
9592 I_MUTEX_NORMAL,
9593 I_MUTEX_PARENT,
9594 I_MUTEX_CHILD,
9595 I_MUTEX_XATTR,
9596 I_MUTEX_QUOTA
9597};
9598# 636 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9599static inline __attribute__((always_inline)) loff_t i_size_read(struct inode *inode)
9600{
9601# 655 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9602 return inode->i_size;
9603
9604}
9605
9606
9607static inline __attribute__((always_inline)) void i_size_write(struct inode *inode, loff_t i_size)
9608{
9609# 671 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9610 inode->i_size = i_size;
9611
9612}
9613
9614static inline __attribute__((always_inline)) unsigned iminor(struct inode *inode)
9615{
9616 return ((unsigned int) ((inode->i_rdev) & ((1U << 20) - 1)));
9617}
9618
9619static inline __attribute__((always_inline)) unsigned imajor(struct inode *inode)
9620{
9621 return ((unsigned int) ((inode->i_rdev) >> 20));
9622}
9623
9624extern struct block_device *I_BDEV(struct inode *inode);
9625
9626struct fown_struct {
9627 rwlock_t lock;
9628 struct pid *pid;
9629 enum pid_type pid_type;
9630 uid_t uid, euid;
9631 int signum;
9632};
9633
9634
9635
9636
9637struct file_ra_state {
9638 unsigned long start;
9639 unsigned long size;
9640 unsigned long flags;
9641 unsigned long cache_hit;
9642 unsigned long prev_page;
9643 unsigned long ahead_start;
9644 unsigned long ahead_size;
9645 unsigned long ra_pages;
9646 unsigned long mmap_hit;
9647 unsigned long mmap_miss;
9648};
9649
9650
9651
9652struct file {
9653
9654
9655
9656
9657 union {
9658 struct list_head fu_list;
9659 struct rcu_head fu_rcuhead;
9660 } f_u;
9661 struct dentry *f_dentry;
9662 struct vfsmount *f_vfsmnt;
9663 const struct file_operations *f_op;
9664 atomic_t f_count;
9665 unsigned int f_flags;
9666 mode_t f_mode;
9667 loff_t f_pos;
9668 struct fown_struct f_owner;
9669 unsigned int f_uid, f_gid;
9670 struct file_ra_state f_ra;
9671
9672 unsigned long f_version;
9673
9674
9675
9676
9677 void *private_data;
9678
9679
9680
9681 struct list_head f_ep_links;
9682 spinlock_t f_ep_lock;
9683
9684 struct address_space *f_mapping;
9685};
9686extern spinlock_t files_lock;
9687# 779 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9688typedef struct files_struct *fl_owner_t;
9689
9690struct file_lock_operations {
9691 void (*fl_insert)(struct file_lock *);
9692 void (*fl_remove)(struct file_lock *);
9693 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
9694 void (*fl_release_private)(struct file_lock *);
9695};
9696
9697struct lock_manager_operations {
9698 int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
9699 void (*fl_notify)(struct file_lock *);
9700 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
9701 void (*fl_release_private)(struct file_lock *);
9702 void (*fl_break)(struct file_lock *);
9703 int (*fl_mylease)(struct file_lock *, struct file_lock *);
9704 int (*fl_change)(struct file_lock **, int);
9705};
9706
9707
9708# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nfs_fs_i.h" 1
9709
9710
9711
9712
9713
9714# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nfs.h" 1
9715# 39 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nfs.h"
9716 enum nfs_stat {
9717 NFS_OK = 0,
9718 NFSERR_PERM = 1,
9719 NFSERR_NOENT = 2,
9720 NFSERR_IO = 5,
9721 NFSERR_NXIO = 6,
9722 NFSERR_EAGAIN = 11,
9723 NFSERR_ACCES = 13,
9724 NFSERR_EXIST = 17,
9725 NFSERR_XDEV = 18,
9726 NFSERR_NODEV = 19,
9727 NFSERR_NOTDIR = 20,
9728 NFSERR_ISDIR = 21,
9729 NFSERR_INVAL = 22,
9730 NFSERR_FBIG = 27,
9731 NFSERR_NOSPC = 28,
9732 NFSERR_ROFS = 30,
9733 NFSERR_MLINK = 31,
9734 NFSERR_OPNOTSUPP = 45,
9735 NFSERR_NAMETOOLONG = 63,
9736 NFSERR_NOTEMPTY = 66,
9737 NFSERR_DQUOT = 69,
9738 NFSERR_STALE = 70,
9739 NFSERR_REMOTE = 71,
9740 NFSERR_WFLUSH = 99,
9741 NFSERR_BADHANDLE = 10001,
9742 NFSERR_NOT_SYNC = 10002,
9743 NFSERR_BAD_COOKIE = 10003,
9744 NFSERR_NOTSUPP = 10004,
9745 NFSERR_TOOSMALL = 10005,
9746 NFSERR_SERVERFAULT = 10006,
9747 NFSERR_BADTYPE = 10007,
9748 NFSERR_JUKEBOX = 10008,
9749 NFSERR_SAME = 10009,
9750 NFSERR_DENIED = 10010,
9751 NFSERR_EXPIRED = 10011,
9752 NFSERR_LOCKED = 10012,
9753 NFSERR_GRACE = 10013,
9754 NFSERR_FHEXPIRED = 10014,
9755 NFSERR_SHARE_DENIED = 10015,
9756 NFSERR_WRONGSEC = 10016,
9757 NFSERR_CLID_INUSE = 10017,
9758 NFSERR_RESOURCE = 10018,
9759 NFSERR_MOVED = 10019,
9760 NFSERR_NOFILEHANDLE = 10020,
9761 NFSERR_MINOR_VERS_MISMATCH = 10021,
9762 NFSERR_STALE_CLIENTID = 10022,
9763 NFSERR_STALE_STATEID = 10023,
9764 NFSERR_OLD_STATEID = 10024,
9765 NFSERR_BAD_STATEID = 10025,
9766 NFSERR_BAD_SEQID = 10026,
9767 NFSERR_NOT_SAME = 10027,
9768 NFSERR_LOCK_RANGE = 10028,
9769 NFSERR_SYMLINK = 10029,
9770 NFSERR_RESTOREFH = 10030,
9771 NFSERR_LEASE_MOVED = 10031,
9772 NFSERR_ATTRNOTSUPP = 10032,
9773 NFSERR_NO_GRACE = 10033,
9774 NFSERR_RECLAIM_BAD = 10034,
9775 NFSERR_RECLAIM_CONFLICT = 10035,
9776 NFSERR_BAD_XDR = 10036,
9777 NFSERR_LOCKS_HELD = 10037,
9778 NFSERR_OPENMODE = 10038,
9779 NFSERR_BADOWNER = 10039,
9780 NFSERR_BADCHAR = 10040,
9781 NFSERR_BADNAME = 10041,
9782 NFSERR_BAD_RANGE = 10042,
9783 NFSERR_LOCK_NOTSUPP = 10043,
9784 NFSERR_OP_ILLEGAL = 10044,
9785 NFSERR_DEADLOCK = 10045,
9786 NFSERR_FILE_OPEN = 10046,
9787 NFSERR_ADMIN_REVOKED = 10047,
9788 NFSERR_CB_PATH_DOWN = 10048,
9789 NFSERR_REPLAY_ME = 10049
9790};
9791
9792
9793
9794enum nfs_ftype {
9795 NFNON = 0,
9796 NFREG = 1,
9797 NFDIR = 2,
9798 NFBLK = 3,
9799 NFCHR = 4,
9800 NFLNK = 5,
9801 NFSOCK = 6,
9802 NFBAD = 7,
9803 NFFIFO = 8
9804};
9805
9806
9807# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sunrpc/msg_prot.h" 1
9808# 18 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sunrpc/msg_prot.h"
9809typedef u32 rpc_authflavor_t;
9810
9811enum rpc_auth_flavors {
9812 RPC_AUTH_NULL = 0,
9813 RPC_AUTH_UNIX = 1,
9814 RPC_AUTH_SHORT = 2,
9815 RPC_AUTH_DES = 3,
9816 RPC_AUTH_KRB = 4,
9817 RPC_AUTH_GSS = 6,
9818 RPC_AUTH_MAXFLAVOR = 8,
9819
9820 RPC_AUTH_GSS_KRB5 = 390003,
9821 RPC_AUTH_GSS_KRB5I = 390004,
9822 RPC_AUTH_GSS_KRB5P = 390005,
9823 RPC_AUTH_GSS_LKEY = 390006,
9824 RPC_AUTH_GSS_LKEYI = 390007,
9825 RPC_AUTH_GSS_LKEYP = 390008,
9826 RPC_AUTH_GSS_SPKM = 390009,
9827 RPC_AUTH_GSS_SPKMI = 390010,
9828 RPC_AUTH_GSS_SPKMP = 390011,
9829};
9830
9831
9832
9833
9834enum rpc_msg_type {
9835 RPC_CALL = 0,
9836 RPC_REPLY = 1
9837};
9838
9839enum rpc_reply_stat {
9840 RPC_MSG_ACCEPTED = 0,
9841 RPC_MSG_DENIED = 1
9842};
9843
9844enum rpc_accept_stat {
9845 RPC_SUCCESS = 0,
9846 RPC_PROG_UNAVAIL = 1,
9847 RPC_PROG_MISMATCH = 2,
9848 RPC_PROC_UNAVAIL = 3,
9849 RPC_GARBAGE_ARGS = 4,
9850 RPC_SYSTEM_ERR = 5
9851};
9852
9853enum rpc_reject_stat {
9854 RPC_MISMATCH = 0,
9855 RPC_AUTH_ERROR = 1
9856};
9857
9858enum rpc_auth_stat {
9859 RPC_AUTH_OK = 0,
9860 RPC_AUTH_BADCRED = 1,
9861 RPC_AUTH_REJECTEDCRED = 2,
9862 RPC_AUTH_BADVERF = 3,
9863 RPC_AUTH_REJECTEDVERF = 4,
9864 RPC_AUTH_TOOWEAK = 5,
9865
9866 RPCSEC_GSS_CREDPROBLEM = 13,
9867 RPCSEC_GSS_CTXPROBLEM = 14
9868};
9869# 104 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/sunrpc/msg_prot.h"
9870typedef __be32 rpc_fraghdr;
9871# 131 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nfs.h" 2
9872
9873
9874
9875
9876
9877
9878struct nfs_fh {
9879 unsigned short size;
9880 unsigned char data[128];
9881};
9882
9883
9884
9885
9886
9887static inline __attribute__((always_inline)) int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
9888{
9889 return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
9890}
9891
9892static inline __attribute__((always_inline)) void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
9893{
9894 target->size = source->size;
9895 memcpy(target->data, source->data, source->size);
9896}
9897# 165 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nfs.h"
9898enum nfs3_stable_how {
9899 NFS_UNSTABLE = 0,
9900 NFS_DATA_SYNC = 1,
9901 NFS_FILE_SYNC = 2
9902};
9903# 7 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/nfs_fs_i.h" 2
9904
9905struct nlm_lockowner;
9906
9907
9908
9909
9910struct nfs_lock_info {
9911 u32 state;
9912 struct nlm_lockowner *owner;
9913 struct list_head list;
9914};
9915
9916struct nfs4_lock_state;
9917struct nfs4_lock_info {
9918 struct nfs4_lock_state *owner;
9919};
9920# 800 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
9921
9922struct file_lock {
9923 struct file_lock *fl_next;
9924 struct list_head fl_link;
9925 struct list_head fl_block;
9926 fl_owner_t fl_owner;
9927 unsigned int fl_pid;
9928 wait_queue_head_t fl_wait;
9929 struct file *fl_file;
9930 unsigned char fl_flags;
9931 unsigned char fl_type;
9932 loff_t fl_start;
9933 loff_t fl_end;
9934
9935 struct fasync_struct * fl_fasync;
9936 unsigned long fl_break_time;
9937
9938 struct file_lock_operations *fl_ops;
9939 struct lock_manager_operations *fl_lmops;
9940 union {
9941 struct nfs_lock_info nfs_fl;
9942 struct nfs4_lock_info nfs4_fl;
9943 } fl_u;
9944};
9945# 832 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
9946# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fcntl.h" 1
9947
9948
9949
9950# 1 "include2/asm/fcntl.h" 1
9951# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/fcntl.h" 1
9952# 114 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/fcntl.h"
9953struct flock {
9954 short l_type;
9955 short l_whence;
9956 off_t l_start;
9957 off_t l_len;
9958 pid_t l_pid;
9959
9960};
9961# 137 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/fcntl.h"
9962struct flock64 {
9963 short l_type;
9964 short l_whence;
9965 loff_t l_start;
9966 loff_t l_len;
9967 pid_t l_pid;
9968
9969};
9970# 1 "include2/asm/fcntl.h" 2
9971# 5 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fcntl.h" 2
9972# 833 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
9973
9974extern int fcntl_getlk(struct file *, struct flock *);
9975extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
9976 struct flock *);
9977
9978
9979extern int fcntl_getlk64(struct file *, struct flock64 *);
9980extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
9981 struct flock64 *);
9982
9983
9984extern void send_sigio(struct fown_struct *fown, int fd, int band);
9985extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg);
9986extern int fcntl_getlease(struct file *filp);
9987
9988
9989extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
9990 unsigned int flags);
9991
9992
9993extern void locks_init_lock(struct file_lock *);
9994extern void locks_copy_lock(struct file_lock *, struct file_lock *);
9995extern void locks_remove_posix(struct file *, fl_owner_t);
9996extern void locks_remove_flock(struct file *);
9997extern int posix_test_lock(struct file *, struct file_lock *, struct file_lock *);
9998extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_lock *);
9999extern int posix_lock_file(struct file *, struct file_lock *);
10000extern int posix_lock_file_wait(struct file *, struct file_lock *);
10001extern int posix_unblock_lock(struct file *, struct file_lock *);
10002extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
10003extern int __break_lease(struct inode *inode, unsigned int flags);
10004extern void lease_get_mtime(struct inode *, struct timespec *time);
10005extern int setlease(struct file *, long, struct file_lock **);
10006extern int lease_modify(struct file_lock **, int);
10007extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
10008extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
10009
10010struct fasync_struct {
10011 int magic;
10012 int fa_fd;
10013 struct fasync_struct *fa_next;
10014 struct file *fa_file;
10015};
10016
10017
10018
10019
10020extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
10021
10022extern void kill_fasync(struct fasync_struct **, int, int);
10023
10024extern void __kill_fasync(struct fasync_struct *, int, int);
10025
10026extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
10027extern int f_setown(struct file *filp, unsigned long arg, int force);
10028extern void f_delown(struct file *filp);
10029extern pid_t f_getown(struct file *filp);
10030extern int send_sigurg(struct fown_struct *fown);
10031# 900 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10032extern struct list_head super_blocks;
10033extern spinlock_t sb_lock;
10034
10035
10036
10037struct super_block {
10038 struct list_head s_list;
10039 dev_t s_dev;
10040 unsigned long s_blocksize;
10041 unsigned char s_blocksize_bits;
10042 unsigned char s_dirt;
10043 unsigned long long s_maxbytes;
10044 struct file_system_type *s_type;
10045 struct super_operations *s_op;
10046 struct dquot_operations *dq_op;
10047 struct quotactl_ops *s_qcop;
10048 struct export_operations *s_export_op;
10049 unsigned long s_flags;
10050 unsigned long s_magic;
10051 struct dentry *s_root;
10052 struct rw_semaphore s_umount;
10053 struct mutex s_lock;
10054 int s_count;
10055 int s_syncing;
10056 int s_need_sync_fs;
10057 atomic_t s_active;
10058
10059
10060
10061 struct xattr_handler **s_xattr;
10062
10063 struct list_head s_inodes;
10064 struct list_head s_dirty;
10065 struct list_head s_io;
10066 struct hlist_head s_anon;
10067 struct list_head s_files;
10068
10069 struct block_device *s_bdev;
10070 struct list_head s_instances;
10071 struct quota_info s_dquot;
10072
10073 int s_frozen;
10074 wait_queue_head_t s_wait_unfrozen;
10075
10076 char s_id[32];
10077
10078 void *s_fs_info;
10079
10080
10081
10082
10083
10084 struct mutex s_vfs_rename_mutex;
10085
10086
10087
10088 u32 s_time_gran;
10089};
10090
10091extern struct timespec current_fs_time(struct super_block *sb);
10092
10093
10094
10095
10096enum {
10097 SB_UNFROZEN = 0,
10098 SB_FREEZE_WRITE = 1,
10099 SB_FREEZE_TRANS = 2,
10100};
10101
10102
10103
10104
10105static inline __attribute__((always_inline)) void get_fs_excl(void)
10106{
10107 atomic_add(1,(&get_current()->fs_excl));
10108}
10109
10110static inline __attribute__((always_inline)) void put_fs_excl(void)
10111{
10112 atomic_sub(1,(&get_current()->fs_excl));
10113}
10114
10115static inline __attribute__((always_inline)) int has_fs_excl(void)
10116{
10117 return ((&get_current()->fs_excl)->counter);
10118}
10119
10120
10121
10122
10123
10124static inline __attribute__((always_inline)) void lock_super(struct super_block * sb)
10125{
10126 get_fs_excl();
10127 mutex_lock(&sb->s_lock);
10128}
10129
10130static inline __attribute__((always_inline)) void unlock_super(struct super_block * sb)
10131{
10132 put_fs_excl();
10133 mutex_unlock(&sb->s_lock);
10134}
10135
10136
10137
10138
10139extern int vfs_permission(struct nameidata *, int);
10140extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
10141extern int vfs_mkdir(struct inode *, struct dentry *, int);
10142extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
10143extern int vfs_symlink(struct inode *, struct dentry *, const char *, int);
10144extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
10145extern int vfs_rmdir(struct inode *, struct dentry *);
10146extern int vfs_unlink(struct inode *, struct dentry *);
10147extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
10148
10149
10150
10151
10152extern void dentry_unhash(struct dentry *dentry);
10153
10154
10155
10156
10157extern int file_permission(struct file *, int);
10158# 1046 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10159int generic_osync_inode(struct inode *, struct address_space *, int);
10160
10161
10162
10163
10164
10165
10166
10167typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
10168
10169struct block_device_operations {
10170 int (*open) (struct inode *, struct file *);
10171 int (*release) (struct inode *, struct file *);
10172 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
10173 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
10174 long (*compat_ioctl) (struct file *, unsigned, unsigned long);
10175 int (*direct_access) (struct block_device *, sector_t, unsigned long *);
10176 int (*media_changed) (struct gendisk *);
10177 int (*revalidate_disk) (struct gendisk *);
10178 int (*getgeo)(struct block_device *, struct hd_geometry *);
10179 struct module *owner;
10180};
10181# 1078 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10182typedef struct {
10183 size_t written;
10184 size_t count;
10185 union {
10186 char * buf;
10187 void *data;
10188 } arg;
10189 int error;
10190} read_descriptor_t;
10191
10192typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long);
10193# 1101 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10194struct file_operations {
10195 struct module *owner;
10196 loff_t (*llseek) (struct file *, loff_t, int);
10197 ssize_t (*read) (struct file *, char *, size_t, loff_t *);
10198 ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
10199 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
10200 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
10201 int (*readdir) (struct file *, void *, filldir_t);
10202 unsigned int (*poll) (struct file *, struct poll_table_struct *);
10203 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
10204 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
10205 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
10206 int (*mmap) (struct file *, struct vm_area_struct *);
10207 int (*open) (struct inode *, struct file *);
10208 int (*flush) (struct file *, fl_owner_t id);
10209 int (*release) (struct inode *, struct file *);
10210 int (*fsync) (struct file *, struct dentry *, int datasync);
10211 int (*aio_fsync) (struct kiocb *, int datasync);
10212 int (*fasync) (int, struct file *, int);
10213 int (*lock) (struct file *, int, struct file_lock *);
10214 ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *);
10215 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
10216 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
10217 int (*check_flags)(int);
10218 int (*dir_notify)(struct file *filp, unsigned long arg);
10219 int (*flock) (struct file *, int, struct file_lock *);
10220 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
10221 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
10222};
10223
10224struct inode_operations {
10225 int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
10226 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
10227 int (*link) (struct dentry *,struct inode *,struct dentry *);
10228 int (*unlink) (struct inode *,struct dentry *);
10229 int (*symlink) (struct inode *,struct dentry *,const char *);
10230 int (*mkdir) (struct inode *,struct dentry *,int);
10231 int (*rmdir) (struct inode *,struct dentry *);
10232 int (*mknod) (struct inode *,struct dentry *,int,dev_t);
10233 int (*rename) (struct inode *, struct dentry *,
10234 struct inode *, struct dentry *);
10235 int (*readlink) (struct dentry *, char *,int);
10236 void * (*follow_link) (struct dentry *, struct nameidata *);
10237 void (*put_link) (struct dentry *, struct nameidata *, void *);
10238 void (*truncate) (struct inode *);
10239 int (*permission) (struct inode *, int, struct nameidata *);
10240 int (*setattr) (struct dentry *, struct iattr *);
10241 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
10242 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
10243 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
10244 ssize_t (*listxattr) (struct dentry *, char *, size_t);
10245 int (*removexattr) (struct dentry *, const char *);
10246 void (*truncate_range)(struct inode *, loff_t, loff_t);
10247};
10248
10249struct seq_file;
10250
10251ssize_t rw_copy_check_uvector(int type, const struct iovec * uvector,
10252 unsigned long nr_segs, unsigned long fast_segs,
10253 struct iovec *fast_pointer,
10254 struct iovec **ret_pointer);
10255
10256extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *);
10257extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *);
10258extern ssize_t vfs_readv(struct file *, const struct iovec *,
10259 unsigned long, loff_t *);
10260extern ssize_t vfs_writev(struct file *, const struct iovec *,
10261 unsigned long, loff_t *);
10262
10263
10264
10265
10266
10267struct super_operations {
10268 struct inode *(*alloc_inode)(struct super_block *sb);
10269 void (*destroy_inode)(struct inode *);
10270
10271 void (*read_inode) (struct inode *);
10272
10273 void (*dirty_inode) (struct inode *);
10274 int (*write_inode) (struct inode *, int);
10275 void (*put_inode) (struct inode *);
10276 void (*drop_inode) (struct inode *);
10277 void (*delete_inode) (struct inode *);
10278 void (*put_super) (struct super_block *);
10279 void (*write_super) (struct super_block *);
10280 int (*sync_fs)(struct super_block *sb, int wait);
10281 void (*write_super_lockfs) (struct super_block *);
10282 void (*unlockfs) (struct super_block *);
10283 int (*statfs) (struct dentry *, struct kstatfs *);
10284 int (*remount_fs) (struct super_block *, int *, char *);
10285 void (*clear_inode) (struct inode *);
10286 void (*umount_begin) (struct vfsmount *, int);
10287
10288 int (*show_options)(struct seq_file *, struct vfsmount *);
10289 int (*show_stats)(struct seq_file *, struct vfsmount *);
10290
10291
10292
10293
10294};
10295# 1216 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10296extern void __mark_inode_dirty(struct inode *, int);
10297static inline __attribute__((always_inline)) void mark_inode_dirty(struct inode *inode)
10298{
10299 __mark_inode_dirty(inode, (1 | 2 | 4));
10300}
10301
10302static inline __attribute__((always_inline)) void mark_inode_dirty_sync(struct inode *inode)
10303{
10304 __mark_inode_dirty(inode, 1);
10305}
10306
10307static inline __attribute__((always_inline)) void inc_nlink(struct inode *inode)
10308{
10309 inode->i_nlink++;
10310}
10311
10312static inline __attribute__((always_inline)) void inode_inc_link_count(struct inode *inode)
10313{
10314 inc_nlink(inode);
10315 mark_inode_dirty(inode);
10316}
10317
10318static inline __attribute__((always_inline)) void drop_nlink(struct inode *inode)
10319{
10320 inode->i_nlink--;
10321}
10322
10323static inline __attribute__((always_inline)) void clear_nlink(struct inode *inode)
10324{
10325 inode->i_nlink = 0;
10326}
10327
10328static inline __attribute__((always_inline)) void inode_dec_link_count(struct inode *inode)
10329{
10330 drop_nlink(inode);
10331 mark_inode_dirty(inode);
10332}
10333
10334extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
10335static inline __attribute__((always_inline)) void file_accessed(struct file *file)
10336{
10337 if (!(file->f_flags & 01000000))
10338 touch_atime(file->f_vfsmnt, file->f_dentry);
10339}
10340
10341int sync_inode(struct inode *inode, struct writeback_control *wbc);
10342# 1349 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10343struct export_operations {
10344 struct dentry *(*decode_fh)(struct super_block *sb, __u32 *fh, int fh_len, int fh_type,
10345 int (*acceptable)(void *context, struct dentry *de),
10346 void *context);
10347 int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len,
10348 int connectable);
10349
10350
10351 int (*get_name)(struct dentry *parent, char *name,
10352 struct dentry *child);
10353 struct dentry * (*get_parent)(struct dentry *child);
10354 struct dentry * (*get_dentry)(struct super_block *sb, void *inump);
10355
10356
10357 struct dentry * (*find_exported_dentry)(
10358 struct super_block *sb, void *obj, void *parent,
10359 int (*acceptable)(void *context, struct dentry *de),
10360 void *context);
10361
10362
10363};
10364
10365extern struct dentry *
10366find_exported_dentry(struct super_block *sb, void *obj, void *parent,
10367 int (*acceptable)(void *context, struct dentry *de),
10368 void *context);
10369
10370struct file_system_type {
10371 const char *name;
10372 int fs_flags;
10373 int (*get_sb) (struct file_system_type *, int,
10374 const char *, void *, struct vfsmount *);
10375 void (*kill_sb) (struct super_block *);
10376 struct module *owner;
10377 struct file_system_type * next;
10378 struct list_head fs_supers;
10379 struct lock_class_key s_lock_key;
10380 struct lock_class_key s_umount_key;
10381};
10382
10383extern int get_sb_bdev(struct file_system_type *fs_type,
10384 int flags, const char *dev_name, void *data,
10385 int (*fill_super)(struct super_block *, void *, int),
10386 struct vfsmount *mnt);
10387extern int get_sb_single(struct file_system_type *fs_type,
10388 int flags, void *data,
10389 int (*fill_super)(struct super_block *, void *, int),
10390 struct vfsmount *mnt);
10391extern int get_sb_nodev(struct file_system_type *fs_type,
10392 int flags, void *data,
10393 int (*fill_super)(struct super_block *, void *, int),
10394 struct vfsmount *mnt);
10395void generic_shutdown_super(struct super_block *sb);
10396void kill_block_super(struct super_block *sb);
10397void kill_anon_super(struct super_block *sb);
10398void kill_litter_super(struct super_block *sb);
10399void deactivate_super(struct super_block *sb);
10400int set_anon_super(struct super_block *s, void *data);
10401struct super_block *sget(struct file_system_type *type,
10402 int (*test)(struct super_block *,void *),
10403 int (*set)(struct super_block *,void *),
10404 void *data);
10405extern int get_sb_pseudo(struct file_system_type *, char *,
10406 struct super_operations *ops, unsigned long,
10407 struct vfsmount *mnt);
10408extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
10409int __put_super(struct super_block *sb);
10410int __put_super_and_need_restart(struct super_block *sb);
10411void unnamed_dev_init(void);
10412
10413
10414
10415
10416
10417
10418
10419extern int register_filesystem(struct file_system_type *);
10420extern int unregister_filesystem(struct file_system_type *);
10421extern struct vfsmount *kern_mount(struct file_system_type *);
10422extern int may_umount_tree(struct vfsmount *);
10423extern int may_umount(struct vfsmount *);
10424extern void umount_tree(struct vfsmount *, int, struct list_head *);
10425extern void release_mounts(struct list_head *);
10426extern long do_mount(char *, char *, char *, unsigned long, void *);
10427extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
10428extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
10429 struct vfsmount *);
10430
10431extern int vfs_statfs(struct dentry *, struct kstatfs *);
10432
10433
10434extern struct subsystem fs_subsys;
10435
10436
10437
10438
10439extern int locks_mandatory_locked(struct inode *);
10440extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
10441# 1455 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10442static inline __attribute__((always_inline)) int locks_verify_locked(struct inode *inode)
10443{
10444 if ((((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000))
10445 return locks_mandatory_locked(inode);
10446 return 0;
10447}
10448
10449extern int rw_verify_area(int, struct file *, loff_t *, size_t);
10450
10451static inline __attribute__((always_inline)) int locks_verify_truncate(struct inode *inode,
10452 struct file *filp,
10453 loff_t size)
10454{
10455 if (inode->i_flock && (((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000))
10456 return locks_mandatory_area(
10457 2, inode, filp,
10458 size < inode->i_size ? size : inode->i_size,
10459 (size < inode->i_size ? inode->i_size - size
10460 : size - inode->i_size)
10461 );
10462 return 0;
10463}
10464
10465static inline __attribute__((always_inline)) int break_lease(struct inode *inode, unsigned int mode)
10466{
10467 if (inode->i_flock)
10468 return __break_lease(inode, mode);
10469 return 0;
10470}
10471
10472
10473
10474extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
10475 struct file *filp);
10476extern long do_sys_open(int fdf, const char *filename, int flags,
10477 int mode);
10478extern struct file *filp_open(const char *, int, int);
10479extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
10480extern int filp_close(struct file *, fl_owner_t id);
10481extern char * getname(const char *);
10482
10483
10484extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init_early(void);
10485extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init(unsigned long);
10486# 1509 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10487extern int register_blkdev(unsigned int, const char *);
10488extern int unregister_blkdev(unsigned int, const char *);
10489extern struct block_device *bdget(dev_t);
10490extern void bd_set_size(struct block_device *, loff_t size);
10491extern void bd_forget(struct inode *inode);
10492extern void bdput(struct block_device *);
10493extern struct block_device *open_by_devnum(dev_t, unsigned);
10494extern struct block_device *open_partition_by_devnum(dev_t, unsigned);
10495extern const struct address_space_operations def_blk_aops;
10496
10497
10498
10499extern const struct file_operations def_blk_fops;
10500extern const struct file_operations def_chr_fops;
10501extern const struct file_operations bad_sock_fops;
10502extern const struct file_operations def_fifo_fops;
10503
10504extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
10505extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
10506extern int blkdev_driver_ioctl(struct inode *inode, struct file *file,
10507 struct gendisk *disk, unsigned cmd,
10508 unsigned long arg);
10509extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
10510extern int blkdev_get(struct block_device *, mode_t, unsigned);
10511extern int blkdev_put(struct block_device *);
10512extern int blkdev_put_partition(struct block_device *);
10513extern int bd_claim(struct block_device *, void *);
10514extern void bd_release(struct block_device *);
10515
10516extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
10517extern void bd_release_from_disk(struct block_device *, struct gendisk *);
10518# 1548 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10519extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
10520extern int register_chrdev_region(dev_t, unsigned, const char *);
10521extern int register_chrdev(unsigned int, const char *,
10522 const struct file_operations *);
10523extern int unregister_chrdev(unsigned int, const char *);
10524extern void unregister_chrdev_region(dev_t, unsigned);
10525extern int chrdev_open(struct inode *, struct file *);
10526extern void chrdev_show(struct seq_file *,off_t);
10527
10528
10529
10530
10531
10532
10533extern const char *__bdevname(dev_t, char *buffer);
10534extern const char *bdevname(struct block_device *bdev, char *buffer);
10535extern struct block_device *lookup_bdev(const char *);
10536extern struct block_device *open_bdev_excl(const char *, int, void *);
10537extern void close_bdev_excl(struct block_device *);
10538extern void blkdev_show(struct seq_file *,off_t);
10539
10540
10541
10542
10543extern void init_special_inode(struct inode *, umode_t, dev_t);
10544
10545
10546extern void make_bad_inode(struct inode *);
10547extern int is_bad_inode(struct inode *);
10548
10549extern const struct file_operations read_fifo_fops;
10550extern const struct file_operations write_fifo_fops;
10551extern const struct file_operations rdwr_fifo_fops;
10552
10553extern int fs_may_remount_ro(struct super_block *);
10554# 1595 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10555extern int check_disk_change(struct block_device *);
10556extern int __invalidate_device(struct block_device *);
10557extern int invalidate_partition(struct gendisk *, int);
10558
10559extern int invalidate_inodes(struct super_block *);
10560unsigned long invalidate_mapping_pages(struct address_space *mapping,
10561 unsigned long start, unsigned long end);
10562unsigned long invalidate_inode_pages(struct address_space *mapping);
10563static inline __attribute__((always_inline)) void invalidate_remote_inode(struct inode *inode)
10564{
10565 if ((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) ||
10566 (((inode->i_mode) & 00170000) == 0120000))
10567 invalidate_inode_pages(inode->i_mapping);
10568}
10569extern int invalidate_inode_pages2(struct address_space *mapping);
10570extern int invalidate_inode_pages2_range(struct address_space *mapping,
10571 unsigned long start, unsigned long end);
10572extern int write_inode_now(struct inode *, int);
10573extern int filemap_fdatawrite(struct address_space *);
10574extern int filemap_flush(struct address_space *);
10575extern int filemap_fdatawait(struct address_space *);
10576extern int filemap_write_and_wait(struct address_space *mapping);
10577extern int filemap_write_and_wait_range(struct address_space *mapping,
10578 loff_t lstart, loff_t lend);
10579extern int wait_on_page_writeback_range(struct address_space *mapping,
10580 unsigned long start, unsigned long end);
10581extern int __filemap_fdatawrite_range(struct address_space *mapping,
10582 loff_t start, loff_t end, int sync_mode);
10583
10584extern long do_fsync(struct file *file, int datasync);
10585extern void sync_supers(void);
10586extern void sync_filesystems(int wait);
10587extern void __fsync_super(struct super_block *sb);
10588extern void emergency_sync(void);
10589extern void emergency_remount(void);
10590extern int do_remount_sb(struct super_block *sb, int flags,
10591 void *data, int force);
10592
10593extern sector_t bmap(struct inode *, sector_t);
10594
10595extern int notify_change(struct dentry *, struct iattr *);
10596extern int permission(struct inode *, int, struct nameidata *);
10597extern int generic_permission(struct inode *, int,
10598 int (*check_acl)(struct inode *, int));
10599
10600extern int get_write_access(struct inode *);
10601extern int deny_write_access(struct file *);
10602static inline __attribute__((always_inline)) void put_write_access(struct inode * inode)
10603{
10604 atomic_sub(1,(&inode->i_writecount));
10605}
10606static inline __attribute__((always_inline)) void allow_write_access(struct file *file)
10607{
10608 if (file)
10609 atomic_add(1,(&file->f_dentry->d_inode->i_writecount));
10610}
10611extern int do_pipe(int *);
10612extern struct file *create_read_pipe(struct file *f);
10613extern struct file *create_write_pipe(void);
10614extern void free_write_pipe(struct file *);
10615
10616extern int open_namei(int dfd, const char *, int, int, struct nameidata *);
10617extern int may_open(struct nameidata *, int, int);
10618
10619extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
10620extern struct file * open_exec(const char *);
10621
10622
10623extern int is_subdir(struct dentry *, struct dentry *);
10624extern ino_t find_inode_number(struct dentry *, struct qstr *);
10625
10626# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/err.h" 1
10627# 22 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/err.h"
10628static inline __attribute__((always_inline)) void *ERR_PTR(long error)
10629{
10630 return (void *) error;
10631}
10632
10633static inline __attribute__((always_inline)) long PTR_ERR(const void *ptr)
10634{
10635 return (long) ptr;
10636}
10637
10638static inline __attribute__((always_inline)) long IS_ERR(const void *ptr)
10639{
10640 return __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0);
10641}
10642# 1667 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h" 2
10643
10644
10645extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
10646
10647extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
10648
10649extern void inode_init_once(struct inode *);
10650extern void iput(struct inode *);
10651extern struct inode * igrab(struct inode *);
10652extern ino_t iunique(struct super_block *, ino_t);
10653extern int inode_needs_sync(struct inode *inode);
10654extern void generic_delete_inode(struct inode *inode);
10655extern void generic_drop_inode(struct inode *inode);
10656
10657extern struct inode *ilookup5_nowait(struct super_block *sb,
10658 unsigned long hashval, int (*test)(struct inode *, void *),
10659 void *data);
10660extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
10661 int (*test)(struct inode *, void *), void *data);
10662extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
10663
10664extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
10665extern struct inode * iget_locked(struct super_block *, unsigned long);
10666extern void unlock_new_inode(struct inode *);
10667
10668static inline __attribute__((always_inline)) struct inode *iget(struct super_block *sb, unsigned long ino)
10669{
10670 struct inode *inode = iget_locked(sb, ino);
10671
10672 if (inode && (inode->i_state & 64)) {
10673 sb->s_op->read_inode(inode);
10674 unlock_new_inode(inode);
10675 }
10676
10677 return inode;
10678}
10679
10680extern void __iget(struct inode * inode);
10681extern void clear_inode(struct inode *);
10682extern void destroy_inode(struct inode *);
10683extern struct inode *new_inode(struct super_block *);
10684extern int remove_suid(struct dentry *);
10685extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
10686
10687extern void __insert_inode_hash(struct inode *, unsigned long hashval);
10688extern void remove_inode_hash(struct inode *);
10689static inline __attribute__((always_inline)) void insert_inode_hash(struct inode *inode) {
10690 __insert_inode_hash(inode, inode->i_ino);
10691}
10692
10693extern struct file * get_empty_filp(void);
10694extern void file_move(struct file *f, struct list_head *list);
10695extern void file_kill(struct file *f);
10696
10697struct bio;
10698extern void submit_bio(int, struct bio *);
10699extern int bdev_read_only(struct block_device *);
10700
10701extern int set_blocksize(struct block_device *, int);
10702extern int sb_set_blocksize(struct super_block *, int);
10703extern int sb_min_blocksize(struct super_block *, int);
10704
10705extern int generic_file_mmap(struct file *, struct vm_area_struct *);
10706extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
10707extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
10708extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
10709int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
10710extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
10711extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
10712extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *,
10713 unsigned long, loff_t);
10714extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
10715 unsigned long *, loff_t, loff_t *, size_t, size_t);
10716extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
10717 unsigned long, loff_t, loff_t *, size_t, ssize_t);
10718extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos);
10719extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos);
10720extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
10721extern void do_generic_mapping_read(struct address_space *mapping,
10722 struct file_ra_state *, struct file *,
10723 loff_t *, read_descriptor_t *, read_actor_t);
10724
10725
10726extern ssize_t generic_file_splice_read(struct file *, loff_t *,
10727 struct pipe_inode_info *, size_t, unsigned int);
10728extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
10729 struct file *, loff_t *, size_t, unsigned int);
10730extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
10731 struct file *out, loff_t *, size_t len, unsigned int flags);
10732extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
10733 size_t len, unsigned int flags);
10734
10735extern void
10736file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
10737extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
10738extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
10739extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
10740extern int generic_file_open(struct inode * inode, struct file * filp);
10741extern int nonseekable_open(struct inode * inode, struct file * filp);
10742# 1778 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10743static inline __attribute__((always_inline)) int xip_truncate_page(struct address_space *mapping, loff_t from)
10744{
10745 return 0;
10746}
10747
10748
10749static inline __attribute__((always_inline)) void do_generic_file_read(struct file * filp, loff_t *ppos,
10750 read_descriptor_t * desc,
10751 read_actor_t actor)
10752{
10753 do_generic_mapping_read(filp->f_mapping,
10754 &filp->f_ra,
10755 filp,
10756 ppos,
10757 desc,
10758 actor);
10759}
10760
10761
10762ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
10763 struct block_device *bdev, const struct iovec *iov, loff_t offset,
10764 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
10765 int lock_type);
10766
10767enum {
10768 DIO_LOCKING = 1,
10769 DIO_NO_LOCKING,
10770 DIO_OWN_LOCKING,
10771};
10772
10773static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
10774 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
10775 loff_t offset, unsigned long nr_segs, get_block_t get_block,
10776 dio_iodone_t end_io)
10777{
10778 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
10779 nr_segs, get_block, end_io, DIO_LOCKING);
10780}
10781
10782static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
10783 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
10784 loff_t offset, unsigned long nr_segs, get_block_t get_block,
10785 dio_iodone_t end_io)
10786{
10787 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
10788 nr_segs, get_block, end_io, DIO_NO_LOCKING);
10789}
10790
10791static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb,
10792 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
10793 loff_t offset, unsigned long nr_segs, get_block_t get_block,
10794 dio_iodone_t end_io)
10795{
10796 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
10797 nr_segs, get_block, end_io, DIO_OWN_LOCKING);
10798}
10799
10800
10801extern const struct file_operations generic_ro_fops;
10802
10803
10804
10805extern int vfs_readlink(struct dentry *, char *, int, const char *);
10806extern int vfs_follow_link(struct nameidata *, const char *);
10807extern int page_readlink(struct dentry *, char *, int);
10808extern void *page_follow_link_light(struct dentry *, struct nameidata *);
10809extern void page_put_link(struct dentry *, struct nameidata *, void *);
10810extern int __page_symlink(struct inode *inode, const char *symname, int len,
10811 gfp_t gfp_mask);
10812extern int page_symlink(struct inode *inode, const char *symname, int len);
10813extern struct inode_operations page_symlink_inode_operations;
10814extern int generic_readlink(struct dentry *, char *, int);
10815extern void generic_fillattr(struct inode *, struct kstat *);
10816extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
10817void inode_add_bytes(struct inode *inode, loff_t bytes);
10818void inode_sub_bytes(struct inode *inode, loff_t bytes);
10819loff_t inode_get_bytes(struct inode *inode);
10820void inode_set_bytes(struct inode *inode, loff_t bytes);
10821
10822extern int vfs_readdir(struct file *, filldir_t, void *);
10823
10824extern int vfs_stat(char *, struct kstat *);
10825extern int vfs_lstat(char *, struct kstat *);
10826extern int vfs_stat_fd(int dfd, char *, struct kstat *);
10827extern int vfs_lstat_fd(int dfd, char *, struct kstat *);
10828extern int vfs_fstat(unsigned int, struct kstat *);
10829
10830extern int vfs_ioctl(struct file *, unsigned int, unsigned int, unsigned long);
10831
10832extern struct file_system_type *get_fs_type(const char *name);
10833extern struct super_block *get_super(struct block_device *);
10834extern struct super_block *user_get_super(dev_t);
10835extern void drop_super(struct super_block *sb);
10836
10837extern int dcache_dir_open(struct inode *, struct file *);
10838extern int dcache_dir_close(struct inode *, struct file *);
10839extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
10840extern int dcache_readdir(struct file *, void *, filldir_t);
10841extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
10842extern int simple_statfs(struct dentry *, struct kstatfs *);
10843extern int simple_link(struct dentry *, struct inode *, struct dentry *);
10844extern int simple_unlink(struct inode *, struct dentry *);
10845extern int simple_rmdir(struct inode *, struct dentry *);
10846extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
10847extern int simple_sync_file(struct file *, struct dentry *, int);
10848extern int simple_empty(struct dentry *);
10849extern int simple_readpage(struct file *file, struct page *page);
10850extern int simple_prepare_write(struct file *file, struct page *page,
10851 unsigned offset, unsigned to);
10852extern int simple_commit_write(struct file *file, struct page *page,
10853 unsigned offset, unsigned to);
10854
10855extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
10856extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
10857extern const struct file_operations simple_dir_operations;
10858extern struct inode_operations simple_dir_inode_operations;
10859struct tree_descr { char *name; const struct file_operations *ops; int mode; };
10860struct dentry *d_alloc_name(struct dentry *, const char *);
10861extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
10862extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
10863extern void simple_release_fs(struct vfsmount **mount, int *count);
10864
10865extern ssize_t simple_read_from_buffer(void *, size_t, loff_t *, const void *, size_t);
10866# 1909 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10867extern int inode_change_ok(struct inode *, struct iattr *);
10868extern int __attribute__((warn_unused_result)) inode_setattr(struct inode *, struct iattr *);
10869
10870extern void file_update_time(struct file *file);
10871
10872static inline __attribute__((always_inline)) ino_t parent_ino(struct dentry *dentry)
10873{
10874 ino_t res;
10875
10876 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
10877 res = dentry->d_parent->d_inode->i_ino;
10878 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
10879 return res;
10880}
10881
10882
10883extern int unshare_files(void);
10884
10885
10886
10887
10888
10889
10890
10891struct simple_transaction_argresp {
10892 ssize_t size;
10893 char data[0];
10894};
10895
10896
10897
10898char *simple_transaction_get(struct file *file, const char *buf,
10899 size_t size);
10900ssize_t simple_transaction_read(struct file *file, char *buf,
10901 size_t size, loff_t *pos);
10902int simple_transaction_release(struct inode *inode, struct file *file);
10903
10904static inline __attribute__((always_inline)) void simple_transaction_set(struct file *file, size_t n)
10905{
10906 struct simple_transaction_argresp *ar = file->private_data;
10907
10908 do { if (__builtin_expect(!!((n > ((1UL << 12) - sizeof(struct simple_transaction_argresp)))!=0), 0)) do { printk("kernel BUG at %s:%d!\n", "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h", 1950); *(volatile int *)0 = 0; } while (0); } while(0);
10909
10910
10911
10912
10913
10914 __asm__ __volatile__("": : :"memory");
10915 ar->size = n;
10916}
10917# 1990 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10918static inline __attribute__((always_inline)) void __attribute__((format(printf, 1, 2)))
10919__simple_attr_check_format(const char *fmt, ...)
10920{
10921
10922}
10923
10924int simple_attr_open(struct inode *inode, struct file *file,
10925 u64 (*get)(void *), void (*set)(void *, u64),
10926 const char *fmt);
10927int simple_attr_close(struct inode *inode, struct file *file);
10928ssize_t simple_attr_read(struct file *file, char *buf,
10929 size_t len, loff_t *ppos);
10930ssize_t simple_attr_write(struct file *file, const char *buf,
10931 size_t len, loff_t *ppos);
10932# 2017 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/fs.h"
10933static inline __attribute__((always_inline)) char *alloc_secdata(void)
10934{
10935 return (char *)1;
10936}
10937
10938static inline __attribute__((always_inline)) void free_secdata(void *secdata)
10939{ }
10940# 26 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
10941
10942# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h" 1
10943
10944
10945
10946
10947# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ata.h" 1
10948# 38 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ata.h"
10949enum {
10950
10951 ATA_MAX_DEVICES = 2,
10952 ATA_MAX_PRD = 256,
10953 ATA_SECT_SIZE = 512,
10954 ATA_MAX_SECTORS = 256,
10955 ATA_MAX_SECTORS_LBA48 = 65535,
10956
10957 ATA_ID_WORDS = 256,
10958 ATA_ID_SERNO_OFS = 10,
10959 ATA_ID_FW_REV_OFS = 23,
10960 ATA_ID_PROD_OFS = 27,
10961 ATA_ID_OLD_PIO_MODES = 51,
10962 ATA_ID_FIELD_VALID = 53,
10963 ATA_ID_MWDMA_MODES = 63,
10964 ATA_ID_PIO_MODES = 64,
10965 ATA_ID_EIDE_DMA_MIN = 65,
10966 ATA_ID_EIDE_PIO = 67,
10967 ATA_ID_EIDE_PIO_IORDY = 68,
10968 ATA_ID_UDMA_MODES = 88,
10969 ATA_ID_MAJOR_VER = 80,
10970 ATA_ID_PIO4 = (1 << 1),
10971
10972 ATA_PCI_CTL_OFS = 2,
10973 ATA_SERNO_LEN = 20,
10974 ATA_UDMA0 = (1 << 0),
10975 ATA_UDMA1 = ATA_UDMA0 | (1 << 1),
10976 ATA_UDMA2 = ATA_UDMA1 | (1 << 2),
10977 ATA_UDMA3 = ATA_UDMA2 | (1 << 3),
10978 ATA_UDMA4 = ATA_UDMA3 | (1 << 4),
10979 ATA_UDMA5 = ATA_UDMA4 | (1 << 5),
10980 ATA_UDMA6 = ATA_UDMA5 | (1 << 6),
10981 ATA_UDMA7 = ATA_UDMA6 | (1 << 7),
10982
10983
10984 ATA_UDMA_MASK_40C = ATA_UDMA2,
10985
10986
10987 ATA_PRD_SZ = 8,
10988 ATA_PRD_TBL_SZ = (ATA_MAX_PRD * ATA_PRD_SZ),
10989 ATA_PRD_EOT = (1 << 31),
10990
10991 ATA_DMA_TABLE_OFS = 4,
10992 ATA_DMA_STATUS = 2,
10993 ATA_DMA_CMD = 0,
10994 ATA_DMA_WR = (1 << 3),
10995 ATA_DMA_START = (1 << 0),
10996 ATA_DMA_INTR = (1 << 2),
10997 ATA_DMA_ERR = (1 << 1),
10998 ATA_DMA_ACTIVE = (1 << 0),
10999
11000
11001 ATA_HOB = (1 << 7),
11002 ATA_NIEN = (1 << 1),
11003 ATA_LBA = (1 << 6),
11004 ATA_DEV1 = (1 << 4),
11005 ATA_DEVICE_OBS = (1 << 7) | (1 << 5),
11006 ATA_DEVCTL_OBS = (1 << 3),
11007 ATA_BUSY = (1 << 7),
11008 ATA_DRDY = (1 << 6),
11009 ATA_DF = (1 << 5),
11010 ATA_DRQ = (1 << 3),
11011 ATA_ERR = (1 << 0),
11012 ATA_SRST = (1 << 2),
11013 ATA_ICRC = (1 << 7),
11014 ATA_UNC = (1 << 6),
11015 ATA_IDNF = (1 << 4),
11016 ATA_ABORTED = (1 << 2),
11017
11018
11019 ATA_REG_DATA = 0x00,
11020 ATA_REG_ERR = 0x01,
11021 ATA_REG_NSECT = 0x02,
11022 ATA_REG_LBAL = 0x03,
11023 ATA_REG_LBAM = 0x04,
11024 ATA_REG_LBAH = 0x05,
11025 ATA_REG_DEVICE = 0x06,
11026 ATA_REG_STATUS = 0x07,
11027
11028 ATA_REG_FEATURE = ATA_REG_ERR,
11029 ATA_REG_CMD = ATA_REG_STATUS,
11030 ATA_REG_BYTEL = ATA_REG_LBAM,
11031 ATA_REG_BYTEH = ATA_REG_LBAH,
11032 ATA_REG_DEVSEL = ATA_REG_DEVICE,
11033 ATA_REG_IRQ = ATA_REG_NSECT,
11034
11035
11036 ATA_CMD_CHK_POWER = 0xE5,
11037 ATA_CMD_STANDBY = 0xE2,
11038 ATA_CMD_IDLE = 0xE3,
11039 ATA_CMD_EDD = 0x90,
11040 ATA_CMD_FLUSH = 0xE7,
11041 ATA_CMD_FLUSH_EXT = 0xEA,
11042 ATA_CMD_ID_ATA = 0xEC,
11043 ATA_CMD_ID_ATAPI = 0xA1,
11044 ATA_CMD_READ = 0xC8,
11045 ATA_CMD_READ_EXT = 0x25,
11046 ATA_CMD_WRITE = 0xCA,
11047 ATA_CMD_WRITE_EXT = 0x35,
11048 ATA_CMD_WRITE_FUA_EXT = 0x3D,
11049 ATA_CMD_FPDMA_READ = 0x60,
11050 ATA_CMD_FPDMA_WRITE = 0x61,
11051 ATA_CMD_PIO_READ = 0x20,
11052 ATA_CMD_PIO_READ_EXT = 0x24,
11053 ATA_CMD_PIO_WRITE = 0x30,
11054 ATA_CMD_PIO_WRITE_EXT = 0x34,
11055 ATA_CMD_READ_MULTI = 0xC4,
11056 ATA_CMD_READ_MULTI_EXT = 0x29,
11057 ATA_CMD_WRITE_MULTI = 0xC5,
11058 ATA_CMD_WRITE_MULTI_EXT = 0x39,
11059 ATA_CMD_WRITE_MULTI_FUA_EXT = 0xCE,
11060 ATA_CMD_SET_FEATURES = 0xEF,
11061 ATA_CMD_PACKET = 0xA0,
11062 ATA_CMD_VERIFY = 0x40,
11063 ATA_CMD_VERIFY_EXT = 0x42,
11064 ATA_CMD_STANDBYNOW1 = 0xE0,
11065 ATA_CMD_IDLEIMMEDIATE = 0xE1,
11066 ATA_CMD_INIT_DEV_PARAMS = 0x91,
11067 ATA_CMD_READ_NATIVE_MAX = 0xF8,
11068 ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
11069 ATA_CMD_READ_LOG_EXT = 0x2f,
11070
11071
11072 ATA_LOG_SATA_NCQ = 0x10,
11073
11074
11075 SETFEATURES_XFER = 0x03,
11076 XFER_UDMA_7 = 0x47,
11077 XFER_UDMA_6 = 0x46,
11078 XFER_UDMA_5 = 0x45,
11079 XFER_UDMA_4 = 0x44,
11080 XFER_UDMA_3 = 0x43,
11081 XFER_UDMA_2 = 0x42,
11082 XFER_UDMA_1 = 0x41,
11083 XFER_UDMA_0 = 0x40,
11084 XFER_MW_DMA_4 = 0x24,
11085 XFER_MW_DMA_3 = 0x23,
11086 XFER_MW_DMA_2 = 0x22,
11087 XFER_MW_DMA_1 = 0x21,
11088 XFER_MW_DMA_0 = 0x20,
11089 XFER_SW_DMA_2 = 0x12,
11090 XFER_SW_DMA_1 = 0x11,
11091 XFER_SW_DMA_0 = 0x10,
11092 XFER_PIO_6 = 0x0E,
11093 XFER_PIO_5 = 0x0D,
11094 XFER_PIO_4 = 0x0C,
11095 XFER_PIO_3 = 0x0B,
11096 XFER_PIO_2 = 0x0A,
11097 XFER_PIO_1 = 0x09,
11098 XFER_PIO_0 = 0x08,
11099 XFER_PIO_SLOW = 0x00,
11100
11101 SETFEATURES_WC_ON = 0x02,
11102 SETFEATURES_WC_OFF = 0x82,
11103
11104
11105 ATAPI_PKT_DMA = (1 << 0),
11106 ATAPI_DMADIR = (1 << 2),
11107
11108 ATAPI_CDB_LEN = 16,
11109
11110
11111 ATA_CBL_NONE = 0,
11112 ATA_CBL_PATA40 = 1,
11113 ATA_CBL_PATA80 = 2,
11114 ATA_CBL_PATA_UNK = 3,
11115 ATA_CBL_SATA = 4,
11116
11117
11118 SCR_STATUS = 0,
11119 SCR_ERROR = 1,
11120 SCR_CONTROL = 2,
11121 SCR_ACTIVE = 3,
11122 SCR_NOTIFICATION = 4,
11123
11124
11125 SERR_DATA_RECOVERED = (1 << 0),
11126 SERR_COMM_RECOVERED = (1 << 1),
11127 SERR_DATA = (1 << 8),
11128 SERR_PERSISTENT = (1 << 9),
11129 SERR_PROTOCOL = (1 << 10),
11130 SERR_INTERNAL = (1 << 11),
11131 SERR_PHYRDY_CHG = (1 << 16),
11132 SERR_DEV_XCHG = (1 << 26),
11133
11134
11135 ATA_TFLAG_LBA48 = (1 << 0),
11136 ATA_TFLAG_ISADDR = (1 << 1),
11137 ATA_TFLAG_DEVICE = (1 << 2),
11138 ATA_TFLAG_WRITE = (1 << 3),
11139 ATA_TFLAG_LBA = (1 << 4),
11140 ATA_TFLAG_FUA = (1 << 5),
11141 ATA_TFLAG_POLLING = (1 << 6),
11142};
11143
11144enum ata_tf_protocols {
11145
11146 ATA_PROT_UNKNOWN,
11147 ATA_PROT_NODATA,
11148 ATA_PROT_PIO,
11149 ATA_PROT_DMA,
11150 ATA_PROT_NCQ,
11151 ATA_PROT_ATAPI,
11152 ATA_PROT_ATAPI_NODATA,
11153 ATA_PROT_ATAPI_DMA,
11154};
11155
11156enum ata_ioctls {
11157 ATA_IOC_GET_IO32 = 0x309,
11158 ATA_IOC_SET_IO32 = 0x324,
11159};
11160
11161
11162
11163struct ata_prd {
11164 u32 addr;
11165 u32 flags_len;
11166};
11167
11168struct ata_taskfile {
11169 unsigned long flags;
11170 u8 protocol;
11171
11172 u8 ctl;
11173
11174 u8 hob_feature;
11175 u8 hob_nsect;
11176 u8 hob_lbal;
11177 u8 hob_lbam;
11178 u8 hob_lbah;
11179
11180 u8 feature;
11181 u8 nsect;
11182 u8 lbal;
11183 u8 lbam;
11184 u8 lbah;
11185
11186 u8 device;
11187
11188 u8 command;
11189};
11190# 308 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ata.h"
11191static inline __attribute__((always_inline)) unsigned int ata_id_major_version(const u16 *id)
11192{
11193 unsigned int mver;
11194
11195 if (id[ATA_ID_MAJOR_VER] == 0xFFFF)
11196 return 0;
11197
11198 for (mver = 14; mver >= 1; mver--)
11199 if (id[ATA_ID_MAJOR_VER] & (1 << mver))
11200 break;
11201 return mver;
11202}
11203
11204static inline __attribute__((always_inline)) int ata_id_current_chs_valid(const u16 *id)
11205{
11206
11207
11208
11209 return (id[53] & 0x01) &&
11210 id[54] &&
11211 id[55] &&
11212 id[55] <= 16 &&
11213 id[56];
11214}
11215
11216static inline __attribute__((always_inline)) int ata_id_is_cfa(const u16 *id)
11217{
11218 u16 v = id[0];
11219 if (v == 0x848A)
11220 return 1;
11221
11222 if (ata_id_major_version(id) >= 3 && id[82] != 0xFFFF &&
11223 (id[82] & ( 1 << 2)))
11224 return 1;
11225 return 0;
11226}
11227
11228static inline __attribute__((always_inline)) int atapi_cdb_len(const u16 *dev_id)
11229{
11230 u16 tmp = dev_id[0] & 0x3;
11231 switch (tmp) {
11232 case 0: return 12;
11233 case 1: return 16;
11234 default: return -1;
11235 }
11236}
11237
11238static inline __attribute__((always_inline)) int is_atapi_taskfile(const struct ata_taskfile *tf)
11239{
11240 return (tf->protocol == ATA_PROT_ATAPI) ||
11241 (tf->protocol == ATA_PROT_ATAPI_NODATA) ||
11242 (tf->protocol == ATA_PROT_ATAPI_DMA);
11243}
11244
11245static inline __attribute__((always_inline)) int is_multi_taskfile(struct ata_taskfile *tf)
11246{
11247 return (tf->command == ATA_CMD_READ_MULTI) ||
11248 (tf->command == ATA_CMD_WRITE_MULTI) ||
11249 (tf->command == ATA_CMD_READ_MULTI_EXT) ||
11250 (tf->command == ATA_CMD_WRITE_MULTI_EXT) ||
11251 (tf->command == ATA_CMD_WRITE_MULTI_FUA_EXT);
11252}
11253
11254static inline __attribute__((always_inline)) int ata_ok(u8 status)
11255{
11256 return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR))
11257 == ATA_DRDY);
11258}
11259
11260static inline __attribute__((always_inline)) int lba_28_ok(u64 block, u32 n_block)
11261{
11262
11263 return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256);
11264}
11265
11266static inline __attribute__((always_inline)) int lba_48_ok(u64 block, u32 n_block)
11267{
11268
11269 return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536);
11270}
11271# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h" 2
11272# 90 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11273typedef unsigned char task_ioreg_t;
11274typedef unsigned long sata_ioreg_t;
11275
11276typedef union ide_reg_valid_s {
11277 unsigned all : 16;
11278 struct {
11279 unsigned data : 1;
11280 unsigned error_feature : 1;
11281 unsigned sector : 1;
11282 unsigned nsector : 1;
11283 unsigned lcyl : 1;
11284 unsigned hcyl : 1;
11285 unsigned select : 1;
11286 unsigned status_command : 1;
11287
11288 unsigned data_hob : 1;
11289 unsigned error_feature_hob : 1;
11290 unsigned sector_hob : 1;
11291 unsigned nsector_hob : 1;
11292 unsigned lcyl_hob : 1;
11293 unsigned hcyl_hob : 1;
11294 unsigned select_hob : 1;
11295 unsigned control_hob : 1;
11296 } b;
11297} ide_reg_valid_t;
11298
11299typedef struct ide_task_request_s {
11300 task_ioreg_t io_ports[8];
11301 task_ioreg_t hob_ports[8];
11302 ide_reg_valid_t out_flags;
11303 ide_reg_valid_t in_flags;
11304 int data_phase;
11305 int req_cmd;
11306 unsigned long out_size;
11307 unsigned long in_size;
11308} ide_task_request_t;
11309
11310typedef struct ide_ioctl_request_s {
11311 ide_task_request_t *task_request;
11312 unsigned char *out_buffer;
11313 unsigned char *in_buffer;
11314} ide_ioctl_request_t;
11315
11316struct hd_drive_cmd_hdr {
11317 task_ioreg_t command;
11318 task_ioreg_t sector_number;
11319 task_ioreg_t feature;
11320 task_ioreg_t sector_count;
11321};
11322
11323typedef struct hd_drive_task_hdr {
11324 task_ioreg_t data;
11325 task_ioreg_t feature;
11326 task_ioreg_t sector_count;
11327 task_ioreg_t sector_number;
11328 task_ioreg_t low_cylinder;
11329 task_ioreg_t high_cylinder;
11330 task_ioreg_t device_head;
11331 task_ioreg_t command;
11332} task_struct_t;
11333
11334typedef struct hd_drive_hob_hdr {
11335 task_ioreg_t data;
11336 task_ioreg_t feature;
11337 task_ioreg_t sector_count;
11338 task_ioreg_t sector_number;
11339 task_ioreg_t low_cylinder;
11340 task_ioreg_t high_cylinder;
11341 task_ioreg_t device_head;
11342 task_ioreg_t control;
11343} hob_struct_t;
11344# 375 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11345struct hd_geometry {
11346 unsigned char heads;
11347 unsigned char sectors;
11348 unsigned short cylinders;
11349 unsigned long start;
11350};
11351# 427 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11352enum {
11353 BUSSTATE_OFF = 0,
11354 BUSSTATE_ON,
11355 BUSSTATE_TRISTATE
11356};
11357# 447 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11358struct hd_driveid {
11359 unsigned short config;
11360 unsigned short cyls;
11361 unsigned short reserved2;
11362 unsigned short heads;
11363 unsigned short track_bytes;
11364 unsigned short sector_bytes;
11365 unsigned short sectors;
11366 unsigned short vendor0;
11367 unsigned short vendor1;
11368 unsigned short vendor2;
11369 unsigned char serial_no[20];
11370 unsigned short buf_type;
11371 unsigned short buf_size;
11372
11373
11374 unsigned short ecc_bytes;
11375 unsigned char fw_rev[8];
11376 unsigned char model[40];
11377 unsigned char max_multsect;
11378 unsigned char vendor3;
11379 unsigned short dword_io;
11380 unsigned char vendor4;
11381 unsigned char capability;
11382
11383
11384
11385
11386
11387 unsigned short reserved50;
11388 unsigned char vendor5;
11389 unsigned char tPIO;
11390 unsigned char vendor6;
11391 unsigned char tDMA;
11392 unsigned short field_valid;
11393
11394
11395
11396
11397 unsigned short cur_cyls;
11398 unsigned short cur_heads;
11399 unsigned short cur_sectors;
11400 unsigned short cur_capacity0;
11401 unsigned short cur_capacity1;
11402 unsigned char multsect;
11403 unsigned char multsect_valid;
11404 unsigned int lba_capacity;
11405 unsigned short dma_1word;
11406 unsigned short dma_mword;
11407 unsigned short eide_pio_modes;
11408 unsigned short eide_dma_min;
11409 unsigned short eide_dma_time;
11410 unsigned short eide_pio;
11411 unsigned short eide_pio_iordy;
11412 unsigned short words69_70[2];
11413
11414
11415
11416 unsigned short words71_74[4];
11417
11418
11419 unsigned short queue_depth;
11420
11421
11422
11423 unsigned short words76_79[4];
11424 unsigned short major_rev_num;
11425 unsigned short minor_rev_num;
11426 unsigned short command_set_1;
11427# 533 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11428 unsigned short command_set_2;
11429# 551 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11430 unsigned short cfsse;
11431# 563 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11432 unsigned short cfs_enable_1;
11433# 582 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11434 unsigned short cfs_enable_2;
11435# 601 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11436 unsigned short csf_default;
11437# 613 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11438 unsigned short dma_ultra;
11439 unsigned short trseuc;
11440 unsigned short trsEuc;
11441 unsigned short CurAPMvalues;
11442 unsigned short mprc;
11443 unsigned short hw_config;
11444# 636 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11445 unsigned short acoustic;
11446
11447
11448
11449 unsigned short msrqs;
11450 unsigned short sxfert;
11451 unsigned short sal;
11452 unsigned int spg;
11453 unsigned long long lba_capacity_2;
11454 unsigned short words104_125[22];
11455 unsigned short last_lun;
11456 unsigned short word127;
11457
11458
11459
11460
11461
11462
11463
11464 unsigned short dlf;
11465# 667 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/hdreg.h"
11466 unsigned short csfo;
11467
11468
11469
11470
11471
11472
11473
11474 unsigned short words130_155[26];
11475 unsigned short word156;
11476 unsigned short words157_159[3];
11477 unsigned short cfa_power;
11478
11479
11480
11481
11482
11483
11484 unsigned short words161_175[15];
11485 unsigned short words176_205[30];
11486 unsigned short words206_254[49];
11487 unsigned short integrity_word;
11488
11489
11490
11491};
11492# 28 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
11493
11494# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 1
11495
11496
11497
11498
11499# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/major.h" 1
11500# 6 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 2
11501# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/genhd.h" 1
11502# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/genhd.h"
11503enum {
11504
11505
11506 DOS_EXTENDED_PARTITION = 5,
11507 LINUX_EXTENDED_PARTITION = 0x85,
11508 WIN98_EXTENDED_PARTITION = 0x0f,
11509
11510 LINUX_SWAP_PARTITION = 0x82,
11511 LINUX_RAID_PARTITION = 0xfd,
11512
11513 SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
11514 NEW_SOLARIS_X86_PARTITION = 0xbf,
11515
11516 DM6_AUX1PARTITION = 0x51,
11517 DM6_AUX3PARTITION = 0x53,
11518 DM6_PARTITION = 0x54,
11519 EZD_PARTITION = 0x55,
11520
11521 FREEBSD_PARTITION = 0xa5,
11522 OPENBSD_PARTITION = 0xa6,
11523 NETBSD_PARTITION = 0xa9,
11524 BSDI_PARTITION = 0xb7,
11525 MINIX_PARTITION = 0x81,
11526 UNIXWARE_PARTITION = 0x63,
11527};
11528# 61 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/genhd.h"
11529# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/device.h" 1
11530# 14 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/device.h"
11531# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ioport.h" 1
11532# 17 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ioport.h"
11533struct resource {
11534 resource_size_t start;
11535 resource_size_t end;
11536 const char *name;
11537 unsigned long flags;
11538 struct resource *parent, *sibling, *child;
11539};
11540
11541struct resource_list {
11542 struct resource_list *next;
11543 struct resource *res;
11544 struct pci_dev *dev;
11545};
11546# 94 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ioport.h"
11547extern struct resource ioport_resource;
11548extern struct resource iomem_resource;
11549
11550extern int request_resource(struct resource *root, struct resource *new);
11551extern struct resource * ____request_resource(struct resource *root, struct resource *new);
11552extern int release_resource(struct resource *new);
11553extern int insert_resource(struct resource *parent, struct resource *new);
11554extern int allocate_resource(struct resource *root, struct resource *new,
11555 resource_size_t size, resource_size_t min,
11556 resource_size_t max, resource_size_t align,
11557 void (*alignf)(void *, struct resource *,
11558 resource_size_t, resource_size_t),
11559 void *alignf_data);
11560int adjust_resource(struct resource *res, resource_size_t start,
11561 resource_size_t size);
11562
11563
11564extern int find_next_system_ram(struct resource *res);
11565
11566
11567
11568
11569
11570
11571extern struct resource * __request_region(struct resource *,
11572 resource_size_t start,
11573 resource_size_t n, const char *name);
11574
11575
11576
11577
11578
11579
11580extern int __check_region(struct resource *, resource_size_t, resource_size_t);
11581extern void __release_region(struct resource *, resource_size_t,
11582 resource_size_t);
11583
11584static inline __attribute__((always_inline)) int __attribute__((deprecated)) check_region(resource_size_t s,
11585 resource_size_t n)
11586{
11587 return __check_region(&ioport_resource, s, n);
11588}
11589# 15 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/device.h" 2
11590
11591# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/klist.h" 1
11592# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/klist.h"
11593struct klist_node;
11594struct klist {
11595 spinlock_t k_lock;
11596 struct list_head k_list;
11597 void (*get)(struct klist_node *);
11598 void (*put)(struct klist_node *);
11599};
11600
11601
11602extern void klist_init(struct klist * k, void (*get)(struct klist_node *),
11603 void (*put)(struct klist_node *));
11604
11605struct klist_node {
11606 struct klist * n_klist;
11607 struct list_head n_node;
11608 struct kref n_ref;
11609 struct completion n_removed;
11610};
11611
11612extern void klist_add_tail(struct klist_node * n, struct klist * k);
11613extern void klist_add_head(struct klist_node * n, struct klist * k);
11614
11615extern void klist_del(struct klist_node * n);
11616extern void klist_remove(struct klist_node * n);
11617
11618extern int klist_node_attached(struct klist_node * n);
11619
11620
11621struct klist_iter {
11622 struct klist * i_klist;
11623 struct list_head * i_head;
11624 struct klist_node * i_cur;
11625};
11626
11627
11628extern void klist_iter_init(struct klist * k, struct klist_iter * i);
11629extern void klist_iter_init_node(struct klist * k, struct klist_iter * i,
11630 struct klist_node * n);
11631extern void klist_iter_exit(struct klist_iter * i);
11632extern struct klist_node * klist_next(struct klist_iter * i);
11633# 17 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/device.h" 2
11634# 31 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/device.h"
11635struct device;
11636struct device_driver;
11637struct class;
11638struct class_device;
11639
11640struct bus_type {
11641 const char * name;
11642
11643 struct subsystem subsys;
11644 struct kset drivers;
11645 struct kset devices;
11646 struct klist klist_devices;
11647 struct klist klist_drivers;
11648
11649 struct bus_attribute * bus_attrs;
11650 struct device_attribute * dev_attrs;
11651 struct driver_attribute * drv_attrs;
11652
11653 int (*match)(struct device * dev, struct device_driver * drv);
11654 int (*uevent)(struct device *dev, char **envp,
11655 int num_envp, char *buffer, int buffer_size);
11656 int (*probe)(struct device * dev);
11657 int (*remove)(struct device * dev);
11658 void (*shutdown)(struct device * dev);
11659
11660 int (*suspend)(struct device * dev, pm_message_t state);
11661 int (*suspend_late)(struct device * dev, pm_message_t state);
11662 int (*resume_early)(struct device * dev);
11663 int (*resume)(struct device * dev);
11664};
11665
11666extern int __attribute__((warn_unused_result)) bus_register(struct bus_type * bus);
11667extern void bus_unregister(struct bus_type * bus);
11668
11669extern int __attribute__((warn_unused_result)) bus_rescan_devices(struct bus_type * bus);
11670
11671
11672
11673int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data,
11674 int (*fn)(struct device *, void *));
11675struct device * bus_find_device(struct bus_type *bus, struct device *start,
11676 void *data, int (*match)(struct device *, void *));
11677
11678int __attribute__((warn_unused_result)) bus_for_each_drv(struct bus_type *bus,
11679 struct device_driver *start, void *data,
11680 int (*fn)(struct device_driver *, void *));
11681
11682
11683
11684struct bus_attribute {
11685 struct attribute attr;
11686 ssize_t (*show)(struct bus_type *, char * buf);
11687 ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
11688};
11689
11690
11691
11692
11693extern int __attribute__((warn_unused_result)) bus_create_file(struct bus_type *,
11694 struct bus_attribute *);
11695extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
11696
11697struct device_driver {
11698 const char * name;
11699 struct bus_type * bus;
11700
11701 struct completion unloaded;
11702 struct kobject kobj;
11703 struct klist klist_devices;
11704 struct klist_node knode_bus;
11705
11706 struct module * owner;
11707
11708 int (*probe) (struct device * dev);
11709 int (*remove) (struct device * dev);
11710 void (*shutdown) (struct device * dev);
11711 int (*suspend) (struct device * dev, pm_message_t state);
11712 int (*resume) (struct device * dev);
11713
11714 unsigned int multithread_probe:1;
11715};
11716
11717
11718extern int __attribute__((warn_unused_result)) driver_register(struct device_driver * drv);
11719extern void driver_unregister(struct device_driver * drv);
11720
11721extern struct device_driver * get_driver(struct device_driver * drv);
11722extern void put_driver(struct device_driver * drv);
11723extern struct device_driver *driver_find(const char *name, struct bus_type *bus);
11724extern int driver_probe_done(void);
11725
11726
11727
11728struct driver_attribute {
11729 struct attribute attr;
11730 ssize_t (*show)(struct device_driver *, char * buf);
11731 ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
11732};
11733
11734
11735
11736
11737extern int __attribute__((warn_unused_result)) driver_create_file(struct device_driver *,
11738 struct driver_attribute *);
11739extern void driver_remove_file(struct device_driver *, struct driver_attribute *);
11740
11741extern int __attribute__((warn_unused_result)) driver_for_each_device(struct device_driver * drv,
11742 struct device *start, void *data,
11743 int (*fn)(struct device *, void *));
11744struct device * driver_find_device(struct device_driver *drv,
11745 struct device *start, void *data,
11746 int (*match)(struct device *, void *));
11747
11748
11749
11750
11751struct class {
11752 const char * name;
11753 struct module * owner;
11754
11755 struct subsystem subsys;
11756 struct list_head children;
11757 struct list_head devices;
11758 struct list_head interfaces;
11759 struct semaphore sem;
11760
11761 struct kobject *virtual_dir;
11762
11763 struct class_attribute * class_attrs;
11764 struct class_device_attribute * class_dev_attrs;
11765 struct device_attribute * dev_attrs;
11766
11767 int (*uevent)(struct class_device *dev, char **envp,
11768 int num_envp, char *buffer, int buffer_size);
11769 int (*dev_uevent)(struct device *dev, char **envp, int num_envp,
11770 char *buffer, int buffer_size);
11771
11772 void (*release)(struct class_device *dev);
11773 void (*class_release)(struct class *class);
11774 void (*dev_release)(struct device *dev);
11775
11776 int (*suspend)(struct device *, pm_message_t state);
11777 int (*resume)(struct device *);
11778};
11779
11780extern int __attribute__((warn_unused_result)) class_register(struct class *);
11781extern void class_unregister(struct class *);
11782
11783
11784struct class_attribute {
11785 struct attribute attr;
11786 ssize_t (*show)(struct class *, char * buf);
11787 ssize_t (*store)(struct class *, const char * buf, size_t count);
11788};
11789
11790
11791
11792
11793extern int __attribute__((warn_unused_result)) class_create_file(struct class *,
11794 const struct class_attribute *);
11795extern void class_remove_file(struct class *, const struct class_attribute *);
11796
11797struct class_device_attribute {
11798 struct attribute attr;
11799 ssize_t (*show)(struct class_device *, char * buf);
11800 ssize_t (*store)(struct class_device *, const char * buf, size_t count);
11801};
11802
11803
11804
11805
11806
11807extern int __attribute__((warn_unused_result)) class_device_create_file(struct class_device *,
11808 const struct class_device_attribute *);
11809# 231 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/device.h"
11810struct class_device {
11811 struct list_head node;
11812
11813 struct kobject kobj;
11814 struct class * class;
11815 dev_t devt;
11816 struct class_device_attribute *devt_attr;
11817 struct class_device_attribute uevent_attr;
11818 struct device * dev;
11819 void * class_data;
11820 struct class_device *parent;
11821 struct attribute_group ** groups;
11822
11823 void (*release)(struct class_device *dev);
11824 int (*uevent)(struct class_device *dev, char **envp,
11825 int num_envp, char *buffer, int buffer_size);
11826 char class_id[20];
11827};
11828
11829static inline __attribute__((always_inline)) void *
11830class_get_devdata (struct class_device *dev)
11831{
11832 return dev->class_data;
11833}
11834
11835static inline __attribute__((always_inline)) void
11836class_set_devdata (struct class_device *dev, void *data)
11837{
11838 dev->class_data = data;
11839}
11840
11841
11842extern int __attribute__((warn_unused_result)) class_device_register(struct class_device *);
11843extern void class_device_unregister(struct class_device *);
11844extern void class_device_initialize(struct class_device *);
11845extern int __attribute__((warn_unused_result)) class_device_add(struct class_device *);
11846extern void class_device_del(struct class_device *);
11847
11848extern int class_device_rename(struct class_device *, char *);
11849
11850extern struct class_device * class_device_get(struct class_device *);
11851extern void class_device_put(struct class_device *);
11852
11853extern void class_device_remove_file(struct class_device *,
11854 const struct class_device_attribute *);
11855extern int __attribute__((warn_unused_result)) class_device_create_bin_file(struct class_device *,
11856 struct bin_attribute *);
11857extern void class_device_remove_bin_file(struct class_device *,
11858 struct bin_attribute *);
11859
11860struct class_interface {
11861 struct list_head node;
11862 struct class *class;
11863
11864 int (*add) (struct class_device *, struct class_interface *);
11865 void (*remove) (struct class_device *, struct class_interface *);
11866 int (*add_dev) (struct device *, struct class_interface *);
11867 void (*remove_dev) (struct device *, struct class_interface *);
11868};
11869
11870extern int __attribute__((warn_unused_result)) class_interface_register(struct class_interface *);
11871extern void class_interface_unregister(struct class_interface *);
11872
11873extern struct class *class_create(struct module *owner, const char *name);
11874extern void class_destroy(struct class *cls);
11875extern struct class_device *class_device_create(struct class *cls,
11876 struct class_device *parent,
11877 dev_t devt,
11878 struct device *device,
11879 const char *fmt, ...)
11880 __attribute__((format(printf,5,6)));
11881extern void class_device_destroy(struct class *cls, dev_t devt);
11882
11883
11884struct device_attribute {
11885 struct attribute attr;
11886 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
11887 char *buf);
11888 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
11889 const char *buf, size_t count);
11890};
11891
11892
11893
11894
11895extern int __attribute__((warn_unused_result)) device_create_file(struct device *device,
11896 struct device_attribute * entry);
11897extern void device_remove_file(struct device * dev, struct device_attribute * attr);
11898extern int __attribute__((warn_unused_result)) device_create_bin_file(struct device *dev,
11899 struct bin_attribute *attr);
11900extern void device_remove_bin_file(struct device *dev,
11901 struct bin_attribute *attr);
11902struct device {
11903 struct klist klist_children;
11904 struct klist_node knode_parent;
11905 struct klist_node knode_driver;
11906 struct klist_node knode_bus;
11907 struct device * parent;
11908
11909 struct kobject kobj;
11910 char bus_id[20];
11911 unsigned is_registered:1;
11912 struct device_attribute uevent_attr;
11913 struct device_attribute *devt_attr;
11914
11915 struct semaphore sem;
11916
11917
11918
11919 struct bus_type * bus;
11920 struct device_driver *driver;
11921
11922 void *driver_data;
11923 void *platform_data;
11924
11925 void *firmware_data;
11926
11927 struct dev_pm_info power;
11928
11929 u64 *dma_mask;
11930 u64 coherent_dma_mask;
11931
11932
11933
11934
11935
11936 struct list_head dma_pools;
11937
11938 struct dma_coherent_mem *dma_mem;
11939
11940
11941
11942 struct list_head node;
11943 struct class *class;
11944 dev_t devt;
11945 struct attribute_group **groups;
11946
11947 void (*release)(struct device * dev);
11948};
11949
11950static inline __attribute__((always_inline)) void *
11951dev_get_drvdata (struct device *dev)
11952{
11953 return dev->driver_data;
11954}
11955
11956static inline __attribute__((always_inline)) void
11957dev_set_drvdata (struct device *dev, void *data)
11958{
11959 dev->driver_data = data;
11960}
11961
11962static inline __attribute__((always_inline)) int device_is_registered(struct device *dev)
11963{
11964 return dev->is_registered;
11965}
11966
11967
11968
11969
11970extern int __attribute__((warn_unused_result)) device_register(struct device * dev);
11971extern void device_unregister(struct device * dev);
11972extern void device_initialize(struct device * dev);
11973extern int __attribute__((warn_unused_result)) device_add(struct device * dev);
11974extern void device_del(struct device * dev);
11975extern int __attribute__((warn_unused_result)) device_for_each_child(struct device *, void *,
11976 int (*fn)(struct device *, void *));
11977extern int device_rename(struct device *dev, char *new_name);
11978
11979
11980
11981
11982
11983extern int __attribute__((warn_unused_result)) device_bind_driver(struct device *dev);
11984extern void device_release_driver(struct device * dev);
11985extern int __attribute__((warn_unused_result)) device_attach(struct device * dev);
11986extern int __attribute__((warn_unused_result)) driver_attach(struct device_driver *drv);
11987extern int __attribute__((warn_unused_result)) device_reprobe(struct device *dev);
11988
11989
11990
11991
11992extern struct device *device_create(struct class *cls, struct device *parent,
11993 dev_t devt, const char *fmt, ...)
11994 __attribute__((format(printf,4,5)));
11995extern void device_destroy(struct class *cls, dev_t devt);
11996
11997extern int virtual_device_parent(struct device *dev);
11998
11999
12000
12001
12002
12003
12004
12005extern int (*platform_notify)(struct device * dev);
12006
12007extern int (*platform_notify_remove)(struct device * dev);
12008
12009
12010
12011
12012
12013
12014extern struct device * get_device(struct device * dev);
12015extern void put_device(struct device * dev);
12016
12017
12018
12019extern void device_shutdown(void);
12020
12021
12022
12023extern int __attribute__((warn_unused_result)) firmware_register(struct subsystem *);
12024extern void firmware_unregister(struct subsystem *);
12025
12026
12027extern const char *dev_driver_string(struct device *dev);
12028# 62 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/genhd.h" 2
12029
12030
12031
12032
12033struct partition {
12034 unsigned char boot_ind;
12035 unsigned char head;
12036 unsigned char sector;
12037 unsigned char cyl;
12038 unsigned char sys_ind;
12039 unsigned char end_head;
12040 unsigned char end_sector;
12041 unsigned char end_cyl;
12042 __le32 start_sect;
12043 __le32 nr_sects;
12044} __attribute__((packed));
12045
12046struct hd_struct {
12047 sector_t start_sect;
12048 sector_t nr_sects;
12049 struct kobject kobj;
12050 struct kobject *holder_dir;
12051 unsigned ios[2], sectors[2];
12052 int policy, partno;
12053};
12054
12055
12056
12057
12058
12059
12060
12061struct disk_stats {
12062 unsigned long sectors[2];
12063 unsigned long ios[2];
12064 unsigned long merges[2];
12065 unsigned long ticks[2];
12066 unsigned long io_ticks;
12067 unsigned long time_in_queue;
12068};
12069
12070struct gendisk {
12071 int major;
12072 int first_minor;
12073 int minors;
12074
12075 char disk_name[32];
12076 struct hd_struct **part;
12077 int part_uevent_suppress;
12078 struct block_device_operations *fops;
12079 struct request_queue *queue;
12080 void *private_data;
12081 sector_t capacity;
12082
12083 int flags;
12084 struct device *driverfs_dev;
12085 struct kobject kobj;
12086 struct kobject *holder_dir;
12087 struct kobject *slave_dir;
12088
12089 struct timer_rand_state *random;
12090 int policy;
12091
12092 atomic_t sync_io;
12093 unsigned long stamp;
12094 int in_flight;
12095
12096
12097
12098 struct disk_stats dkstats;
12099
12100};
12101
12102
12103struct disk_attribute {
12104 struct attribute attr;
12105 ssize_t (*show)(struct gendisk *, char *);
12106 ssize_t (*store)(struct gendisk *, const char *, size_t);
12107};
12108# 173 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/genhd.h"
12109static inline __attribute__((always_inline)) void disk_stat_set_all(struct gendisk *gendiskp, int value) {
12110 memset(&gendiskp->dkstats, value, sizeof (struct disk_stats));
12111}
12112# 212 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/genhd.h"
12113static inline __attribute__((always_inline)) int init_disk_stats(struct gendisk *disk)
12114{
12115 return 1;
12116}
12117
12118static inline __attribute__((always_inline)) void free_disk_stats(struct gendisk *disk)
12119{
12120}
12121
12122
12123
12124extern void disk_round_stats(struct gendisk *disk);
12125
12126
12127extern int get_blkdev_list(char *, int);
12128extern void add_disk(struct gendisk *disk);
12129extern void del_gendisk(struct gendisk *gp);
12130extern void unlink_gendisk(struct gendisk *gp);
12131extern struct gendisk *get_gendisk(dev_t dev, int *part);
12132
12133extern void set_device_ro(struct block_device *bdev, int flag);
12134extern void set_disk_ro(struct gendisk *disk, int flag);
12135
12136
12137extern void add_disk_randomness(struct gendisk *disk);
12138extern void rand_initialize_disk(struct gendisk *disk);
12139
12140static inline __attribute__((always_inline)) sector_t get_start_sect(struct block_device *bdev)
12141{
12142 return bdev->bd_contains == bdev ? 0 : bdev->bd_part->start_sect;
12143}
12144static inline __attribute__((always_inline)) sector_t get_capacity(struct gendisk *disk)
12145{
12146 return disk->capacity;
12147}
12148static inline __attribute__((always_inline)) void set_capacity(struct gendisk *disk, sector_t size)
12149{
12150 disk->capacity = size;
12151}
12152# 399 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/genhd.h"
12153char *disk_name (struct gendisk *hd, int part, char *buf);
12154
12155extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
12156extern void add_partition(struct gendisk *, int, sector_t, sector_t);
12157extern void delete_partition(struct gendisk *, int);
12158
12159extern struct gendisk *alloc_disk_node(int minors, int node_id);
12160extern struct gendisk *alloc_disk(int minors);
12161extern struct kobject *get_disk(struct gendisk *disk);
12162extern void put_disk(struct gendisk *disk);
12163
12164extern void blk_register_region(dev_t dev, unsigned long range,
12165 struct module *module,
12166 struct kobject *(*probe)(dev_t, int *, void *),
12167 int (*lock)(dev_t, void *),
12168 void *data);
12169extern void blk_unregister_region(dev_t dev, unsigned long range);
12170
12171static inline __attribute__((always_inline)) struct block_device *bdget_disk(struct gendisk *disk, int index)
12172{
12173 return bdget((((disk->major) << 20) | (disk->first_minor)) + index);
12174}
12175# 7 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 2
12176
12177
12178
12179# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pagemap.h" 1
12180
12181
12182
12183
12184
12185
12186# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h" 1
12187# 17 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12188# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/debug_locks.h" 1
12189
12190
12191
12192struct task_struct;
12193
12194extern int debug_locks;
12195extern int debug_locks_silent;
12196
12197
12198
12199
12200extern int debug_locks_off(void);
12201# 46 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/debug_locks.h"
12202struct task_struct;
12203
12204
12205
12206
12207
12208
12209
12210static inline __attribute__((always_inline)) void debug_show_all_locks(void)
12211{
12212}
12213
12214static inline __attribute__((always_inline)) void debug_show_held_locks(struct task_struct *task)
12215{
12216}
12217
12218static inline __attribute__((always_inline)) void
12219debug_check_no_locks_freed(const void *from, unsigned long len)
12220{
12221}
12222
12223static inline __attribute__((always_inline)) void
12224debug_check_no_locks_held(struct task_struct *task)
12225{
12226}
12227# 18 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h" 2
12228# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/backing-dev.h" 1
12229# 16 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/backing-dev.h"
12230enum bdi_state {
12231 BDI_pdflush,
12232 BDI_write_congested,
12233 BDI_read_congested,
12234 BDI_unused,
12235};
12236
12237typedef int (congested_fn)(void *, int);
12238
12239struct backing_dev_info {
12240 unsigned long ra_pages;
12241 unsigned long state;
12242 unsigned int capabilities;
12243 congested_fn *congested_fn;
12244 void *congested_data;
12245 void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
12246 void *unplug_io_data;
12247};
12248# 61 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/backing-dev.h"
12249extern struct backing_dev_info default_backing_dev_info;
12250void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page);
12251
12252int writeback_acquire(struct backing_dev_info *bdi);
12253int writeback_in_progress(struct backing_dev_info *bdi);
12254void writeback_release(struct backing_dev_info *bdi);
12255
12256static inline __attribute__((always_inline)) int bdi_congested(struct backing_dev_info *bdi, int bdi_bits)
12257{
12258 if (bdi->congested_fn)
12259 return bdi->congested_fn(bdi->congested_data, bdi_bits);
12260 return (bdi->state & bdi_bits);
12261}
12262
12263static inline __attribute__((always_inline)) int bdi_read_congested(struct backing_dev_info *bdi)
12264{
12265 return bdi_congested(bdi, 1 << BDI_read_congested);
12266}
12267
12268static inline __attribute__((always_inline)) int bdi_write_congested(struct backing_dev_info *bdi)
12269{
12270 return bdi_congested(bdi, 1 << BDI_write_congested);
12271}
12272
12273static inline __attribute__((always_inline)) int bdi_rw_congested(struct backing_dev_info *bdi)
12274{
12275 return bdi_congested(bdi, (1 << BDI_read_congested)|
12276 (1 << BDI_write_congested));
12277}
12278# 19 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h" 2
12279# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm_types.h" 1
12280# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm_types.h"
12281struct address_space;
12282# 18 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm_types.h"
12283struct page {
12284 unsigned long flags;
12285
12286 atomic_t _count;
12287 atomic_t _mapcount;
12288
12289
12290
12291 union {
12292 struct {
12293 unsigned long private;
12294
12295
12296
12297
12298
12299
12300 struct address_space *mapping;
12301
12302
12303
12304
12305
12306
12307 };
12308
12309
12310
12311 };
12312 unsigned long index;
12313 struct list_head lru;
12314# 65 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm_types.h"
12315};
12316# 20 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h" 2
12317
12318struct mempolicy;
12319struct anon_vma;
12320
12321
12322extern unsigned long max_mapnr;
12323
12324
12325extern unsigned long num_physpages;
12326extern void * high_memory;
12327extern unsigned long vmalloc_earlyreserve;
12328extern int page_cluster;
12329
12330
12331extern int sysctl_legacy_va_layout;
12332
12333
12334
12335
12336
12337# 1 "include2/asm/pgtable.h" 1
12338# 15 "include2/asm/pgtable.h"
12339# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopmd.h" 1
12340
12341
12342
12343
12344
12345# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopud.h" 1
12346# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopud.h"
12347typedef struct { pgd_t pgd; } pud_t;
12348# 25 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopud.h"
12349static inline __attribute__((always_inline)) int pgd_none(pgd_t pgd) { return 0; }
12350static inline __attribute__((always_inline)) int pgd_bad(pgd_t pgd) { return 0; }
12351static inline __attribute__((always_inline)) int pgd_present(pgd_t pgd) { return 1; }
12352static inline __attribute__((always_inline)) void pgd_clear(pgd_t *pgd) { }
12353# 38 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopud.h"
12354static inline __attribute__((always_inline)) pud_t * pud_offset(pgd_t * pgd, unsigned long address)
12355{
12356 return (pud_t *)pgd;
12357}
12358# 7 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopmd.h" 2
12359# 15 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopmd.h"
12360typedef struct { pud_t pud; } pmd_t;
12361# 27 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopmd.h"
12362static inline __attribute__((always_inline)) int pud_none(pud_t pud) { return 0; }
12363static inline __attribute__((always_inline)) int pud_bad(pud_t pud) { return 0; }
12364static inline __attribute__((always_inline)) int pud_present(pud_t pud) { return 1; }
12365static inline __attribute__((always_inline)) void pud_clear(pud_t *pud) { }
12366# 41 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable-nopmd.h"
12367static inline __attribute__((always_inline)) pmd_t * pmd_offset(pud_t * pud, unsigned long address)
12368{
12369 return (pmd_t *)pud;
12370}
12371# 16 "include2/asm/pgtable.h" 2
12372
12373
12374
12375
12376
12377# 1 "include2/asm/addrspace.h" 1
12378# 14 "include2/asm/addrspace.h"
12379# 1 "include/asm/cpu/addrspace.h" 1
12380# 15 "include2/asm/addrspace.h" 2
12381# 22 "include2/asm/pgtable.h" 2
12382# 1 "include2/asm/fixmap.h" 1
12383# 48 "include2/asm/fixmap.h"
12384enum fixed_addresses {
12385
12386
12387
12388
12389 __end_of_fixed_addresses
12390};
12391
12392extern void __set_fixmap (enum fixed_addresses idx,
12393 unsigned long phys, pgprot_t flags);
12394# 80 "include2/asm/fixmap.h"
12395extern void __this_fixmap_does_not_exist(void);
12396
12397
12398
12399
12400
12401
12402static inline __attribute__((always_inline)) unsigned long fix_to_virt(const unsigned int idx)
12403{
12404# 98 "include2/asm/fixmap.h"
12405 if (idx >= __end_of_fixed_addresses)
12406 __this_fixmap_does_not_exist();
12407
12408 return ((0xe0000000 - (1UL << 12)) - ((idx) << 12));
12409}
12410
12411static inline __attribute__((always_inline)) unsigned long virt_to_fix(const unsigned long vaddr)
12412{
12413 do { if (__builtin_expect(!!((vaddr >= (0xe0000000 - (1UL << 12)) || vaddr < ((0xe0000000 - (1UL << 12)) - (__end_of_fixed_addresses << 12)))!=0), 0)) do { printk("kernel BUG at %s:%d!\n", "include2/asm/fixmap.h", 106); *(volatile int *)0 = 0; } while (0); } while(0);
12414 return (((0xe0000000 - (1UL << 12)) - ((vaddr)&(~((1UL << 12)-1)))) >> 12);
12415}
12416# 23 "include2/asm/pgtable.h" 2
12417
12418extern pgd_t swapper_pg_dir[1024];
12419extern void paging_init(void);
12420
12421
12422
12423
12424
12425extern unsigned long empty_zero_page[(1UL << 12) / sizeof(unsigned long)];
12426# 215 "include2/asm/pgtable.h"
12427static inline __attribute__((always_inline)) int pte_read(pte_t pte) { return ((pte).pte) & 0x040; }
12428static inline __attribute__((always_inline)) int pte_exec(pte_t pte) { return ((pte).pte) & 0x040; }
12429static inline __attribute__((always_inline)) int pte_dirty(pte_t pte){ return ((pte).pte) & 0x004; }
12430static inline __attribute__((always_inline)) int pte_young(pte_t pte){ return ((pte).pte) & 0x400; }
12431static inline __attribute__((always_inline)) int pte_file(pte_t pte) { return ((pte).pte) & 0x001; }
12432static inline __attribute__((always_inline)) int pte_write(pte_t pte){ return ((pte).pte) & 0x020; }
12433static inline __attribute__((always_inline)) int pte_not_present(pte_t pte){ return !(((pte).pte) & 0x100); }
12434
12435static inline __attribute__((always_inline)) pte_t pte_rdprotect(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) & ~0x040) } )); return pte; }
12436static inline __attribute__((always_inline)) pte_t pte_exprotect(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) & ~0x040) } )); return pte; }
12437static inline __attribute__((always_inline)) pte_t pte_mkclean(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) & ~0x004) } )); return pte; }
12438static inline __attribute__((always_inline)) pte_t pte_mkold(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) & ~0x400) } )); return pte; }
12439static inline __attribute__((always_inline)) pte_t pte_wrprotect(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) & ~0x020) } )); return pte; }
12440static inline __attribute__((always_inline)) pte_t pte_mkread(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) | 0x040) } )); return pte; }
12441static inline __attribute__((always_inline)) pte_t pte_mkexec(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) | 0x040) } )); return pte; }
12442static inline __attribute__((always_inline)) pte_t pte_mkdirty(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) | 0x004) } )); return pte; }
12443static inline __attribute__((always_inline)) pte_t pte_mkyoung(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) | 0x400) } )); return pte; }
12444static inline __attribute__((always_inline)) pte_t pte_mkwrite(pte_t pte) { (*(&pte) = ((pte_t) { (((pte).pte) | 0x020) } )); return pte; }
12445# 242 "include2/asm/pgtable.h"
12446static inline __attribute__((always_inline)) pgprot_t pgprot_noncached(pgprot_t _prot)
12447{
12448 unsigned long prot = ((_prot).pgprot);
12449
12450 prot &= ~0x008;
12451 return ((pgprot_t) { (prot) } );
12452}
12453# 260 "include2/asm/pgtable.h"
12454static inline __attribute__((always_inline)) pte_t pte_modify(pte_t pte, pgprot_t newprot)
12455{ (*(&pte) = ((pte_t) { ((((pte).pte) & ((~((1UL << 12)-1)) | 0x400 | 0x008 | 0x004)) | ((newprot).pgprot)) } )); return pte; }
12456# 291 "include2/asm/pgtable.h"
12457struct vm_area_struct;
12458extern void update_mmu_cache(struct vm_area_struct * vma,
12459 unsigned long address, pte_t pte);
12460# 313 "include2/asm/pgtable.h"
12461typedef pte_t *pte_addr_t;
12462# 324 "include2/asm/pgtable.h"
12463struct mm_struct;
12464# 337 "include2/asm/pgtable.h"
12465extern pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
12466
12467
12468# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable.h" 1
12469# 130 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable.h"
12470struct mm_struct;
12471static inline __attribute__((always_inline)) void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep)
12472{
12473 pte_t old_pte = *ptep;
12474 (*(ptep) = pte_wrprotect(old_pte));
12475}
12476# 215 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/pgtable.h"
12477void pgd_clear_bad(pgd_t *);
12478void pud_clear_bad(pud_t *);
12479void pmd_clear_bad(pmd_t *);
12480
12481static inline __attribute__((always_inline)) int pgd_none_or_clear_bad(pgd_t *pgd)
12482{
12483 if (pgd_none(*pgd))
12484 return 1;
12485 if (__builtin_expect(!!(pgd_bad(*pgd)), 0)) {
12486 pgd_clear_bad(pgd);
12487 return 1;
12488 }
12489 return 0;
12490}
12491
12492static inline __attribute__((always_inline)) int pud_none_or_clear_bad(pud_t *pud)
12493{
12494 if (pud_none(*pud))
12495 return 1;
12496 if (__builtin_expect(!!(pud_bad(*pud)), 0)) {
12497 pud_clear_bad(pud);
12498 return 1;
12499 }
12500 return 0;
12501}
12502
12503static inline __attribute__((always_inline)) int pmd_none_or_clear_bad(pmd_t *pmd)
12504{
12505 if ((!((((((*pmd).pud).pgd).pgd)))))
12506 return 1;
12507 if (__builtin_expect(!!(((((((((*pmd).pud).pgd).pgd))) & (~(~((1UL << 12)-1)) & ~0x040)) != (0x100 | 0x020 | 0x400 | 0x004))), 0)) {
12508 pmd_clear_bad(pmd);
12509 return 1;
12510 }
12511 return 0;
12512}
12513# 341 "include2/asm/pgtable.h" 2
12514# 41 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h" 2
12515# 60 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12516struct vm_area_struct {
12517 struct mm_struct * vm_mm;
12518 unsigned long vm_start;
12519 unsigned long vm_end;
12520
12521
12522
12523 struct vm_area_struct *vm_next;
12524
12525 pgprot_t vm_page_prot;
12526 unsigned long vm_flags;
12527
12528 struct rb_node vm_rb;
12529
12530
12531
12532
12533
12534
12535
12536 union {
12537 struct {
12538 struct list_head list;
12539 void *parent;
12540 struct vm_area_struct *head;
12541 } vm_set;
12542
12543 struct raw_prio_tree_node prio_tree_node;
12544 } shared;
12545
12546
12547
12548
12549
12550
12551
12552 struct list_head anon_vma_node;
12553 struct anon_vma *anon_vma;
12554
12555
12556 struct vm_operations_struct * vm_ops;
12557
12558
12559 unsigned long vm_pgoff;
12560
12561 struct file * vm_file;
12562 void * vm_private_data;
12563 unsigned long vm_truncate_count;
12564
12565
12566
12567
12568
12569
12570
12571};
12572
12573
12574
12575
12576
12577
12578struct vm_list_struct {
12579 struct vm_list_struct *next;
12580 struct vm_area_struct *vma;
12581};
12582# 190 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12583extern pgprot_t protection_map[16];
12584
12585
12586
12587
12588
12589
12590
12591struct vm_operations_struct {
12592 void (*open)(struct vm_area_struct * area);
12593 void (*close)(struct vm_area_struct * area);
12594 struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type);
12595 unsigned long (*nopfn)(struct vm_area_struct * area, unsigned long address);
12596 int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
12597
12598
12599
12600 int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
12601
12602
12603
12604
12605
12606
12607
12608};
12609
12610struct mmu_gather;
12611struct inode;
12612# 227 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12613# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/page-flags.h" 1
12614# 254 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/page-flags.h"
12615struct page;
12616
12617int test_clear_page_dirty(struct page *page);
12618int test_clear_page_writeback(struct page *page);
12619int test_set_page_writeback(struct page *page);
12620
12621static inline __attribute__((always_inline)) void clear_page_dirty(struct page *page)
12622{
12623 test_clear_page_dirty(page);
12624}
12625
12626static inline __attribute__((always_inline)) void set_page_writeback(struct page *page)
12627{
12628 test_set_page_writeback(page);
12629}
12630# 228 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h" 2
12631# 251 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12632static inline __attribute__((always_inline)) int put_page_testzero(struct page *page)
12633{
12634 do { } while(0);
12635 return (atomic_sub_return(1, (&page->_count)) == 0);
12636}
12637
12638
12639
12640
12641
12642static inline __attribute__((always_inline)) int get_page_unless_zero(struct page *page)
12643{
12644 do { } while(0);
12645 return atomic_add_unless((&page->_count), 1, 0);
12646}
12647
12648static inline __attribute__((always_inline)) int page_count(struct page *page)
12649{
12650 if (__builtin_expect(!!(test_bit(14, &(page)->flags)), 0))
12651 page = (struct page *)((page)->private);
12652 return ((&page->_count)->counter);
12653}
12654
12655static inline __attribute__((always_inline)) void get_page(struct page *page)
12656{
12657 if (__builtin_expect(!!(test_bit(14, &(page)->flags)), 0))
12658 page = (struct page *)((page)->private);
12659 do { } while(0);
12660 atomic_add(1,(&page->_count));
12661}
12662
12663
12664
12665
12666
12667static inline __attribute__((always_inline)) void init_page_count(struct page *page)
12668{
12669 ((&page->_count)->counter = (1));
12670}
12671
12672void put_page(struct page *page);
12673void put_pages_list(struct list_head *pages);
12674
12675void split_page(struct page *page, unsigned int order);
12676# 431 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12677static inline __attribute__((always_inline)) enum zone_type page_zonenum(struct page *page)
12678{
12679 return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0))) & ((1UL << 1) - 1);
12680}
12681
12682struct zone;
12683extern struct zone *zone_table[];
12684
12685static inline __attribute__((always_inline)) int page_zone_id(struct page *page)
12686{
12687 return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0))) & ((1UL << (0 + 1)) - 1);
12688}
12689static inline __attribute__((always_inline)) struct zone *page_zone(struct page *page)
12690{
12691 return zone_table[page_zone_id(page)];
12692}
12693
12694static inline __attribute__((always_inline)) unsigned long zone_to_nid(struct zone *zone)
12695{
12696
12697
12698
12699 return 0;
12700
12701}
12702
12703static inline __attribute__((always_inline)) unsigned long page_to_nid(struct page *page)
12704{
12705 if ((0 > 0 || 0 == 0))
12706 return (page->flags >> ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))) & ((1UL << 0) - 1);
12707 else
12708 return zone_to_nid(page_zone(page));
12709}
12710static inline __attribute__((always_inline)) unsigned long page_to_section(struct page *page)
12711{
12712 return (page->flags >> (((sizeof(unsigned long)*8) - 0) * (0 != 0))) & ((1UL << 0) - 1);
12713}
12714
12715static inline __attribute__((always_inline)) void set_page_zone(struct page *page, enum zone_type zone)
12716{
12717 page->flags &= ~(((1UL << 1) - 1) << (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0)));
12718 page->flags |= (zone & ((1UL << 1) - 1)) << (((((sizeof(unsigned long)*8) - 0) - 0) - 1) * (1 != 0));
12719}
12720
12721static inline __attribute__((always_inline)) void set_page_node(struct page *page, unsigned long node)
12722{
12723 page->flags &= ~(((1UL << 0) - 1) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0)));
12724 page->flags |= (node & ((1UL << 0) - 1)) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0));
12725}
12726static inline __attribute__((always_inline)) void set_page_section(struct page *page, unsigned long section)
12727{
12728 page->flags &= ~(((1UL << 0) - 1) << (((sizeof(unsigned long)*8) - 0) * (0 != 0)));
12729 page->flags |= (section & ((1UL << 0) - 1)) << (((sizeof(unsigned long)*8) - 0) * (0 != 0));
12730}
12731
12732static inline __attribute__((always_inline)) void set_page_links(struct page *page, enum zone_type zone,
12733 unsigned long node, unsigned long pfn)
12734{
12735 set_page_zone(page, zone);
12736 set_page_node(page, node);
12737 set_page_section(page, ((pfn) >> 0));
12738}
12739
12740
12741
12742
12743# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/vmstat.h" 1
12744# 34 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/vmstat.h"
12745enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
12746 PGALLOC_DMA, PGALLOC_NORMAL ,
12747 PGFREE, PGACTIVATE, PGDEACTIVATE,
12748 PGFAULT, PGMAJFAULT,
12749 PGREFILL_DMA, PGREFILL_NORMAL ,
12750 PGSTEAL_DMA, PGSTEAL_NORMAL ,
12751 PGSCAN_KSWAPD_DMA, PGSCAN_KSWAPD_NORMAL ,
12752 PGSCAN_DIRECT_DMA, PGSCAN_DIRECT_NORMAL ,
12753 PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL,
12754 PAGEOUTRUN, ALLOCSTALL, PGROTATED,
12755 NR_VM_EVENT_ITEMS
12756};
12757
12758struct vm_event_state {
12759 unsigned long event[NR_VM_EVENT_ITEMS];
12760};
12761
12762extern __typeof__(struct vm_event_state) per_cpu__vm_event_states;
12763
12764static inline __attribute__((always_inline)) void __count_vm_event(enum vm_event_item item)
12765{
12766 per_cpu__vm_event_states.event[item]++;
12767}
12768
12769static inline __attribute__((always_inline)) void count_vm_event(enum vm_event_item item)
12770{
12771 (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &per_cpu__vm_event_states; })).event[item]++;
12772 do { } while (0);
12773}
12774
12775static inline __attribute__((always_inline)) void __count_vm_events(enum vm_event_item item, long delta)
12776{
12777 per_cpu__vm_event_states.event[item] += delta;
12778}
12779
12780static inline __attribute__((always_inline)) void count_vm_events(enum vm_event_item item, long delta)
12781{
12782 (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &per_cpu__vm_event_states; })).event[item] += delta;
12783 do { } while (0);
12784}
12785
12786extern void all_vm_events(unsigned long *);
12787extern void vm_events_fold_cpu(int cpu);
12788# 96 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/vmstat.h"
12789extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
12790
12791static inline __attribute__((always_inline)) void zone_page_state_add(long x, struct zone *zone,
12792 enum zone_stat_item item)
12793{
12794 atomic_long_add(x, &zone->vm_stat[item]);
12795 atomic_long_add(x, &vm_stat[item]);
12796}
12797
12798static inline __attribute__((always_inline)) unsigned long global_page_state(enum zone_stat_item item)
12799{
12800 long x = atomic_long_read(&vm_stat[item]);
12801
12802
12803
12804
12805 return x;
12806}
12807
12808static inline __attribute__((always_inline)) unsigned long zone_page_state(struct zone *zone,
12809 enum zone_stat_item item)
12810{
12811 long x = atomic_long_read(&zone->vm_stat[item]);
12812
12813
12814
12815
12816 return x;
12817}
12818# 165 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/vmstat.h"
12819static inline __attribute__((always_inline)) void zap_zone_vm_stats(struct zone *zone)
12820{
12821 memset(zone->vm_stat, 0, sizeof(zone->vm_stat));
12822}
12823
12824extern void inc_zone_state(struct zone *, enum zone_stat_item);
12825# 192 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/vmstat.h"
12826static inline __attribute__((always_inline)) void __mod_zone_page_state(struct zone *zone,
12827 enum zone_stat_item item, int delta)
12828{
12829 zone_page_state_add(delta, zone, item);
12830}
12831
12832static inline __attribute__((always_inline)) void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
12833{
12834 atomic_long_inc(&zone->vm_stat[item]);
12835 atomic_long_inc(&vm_stat[item]);
12836}
12837
12838static inline __attribute__((always_inline)) void __inc_zone_page_state(struct page *page,
12839 enum zone_stat_item item)
12840{
12841 __inc_zone_state(page_zone(page), item);
12842}
12843
12844static inline __attribute__((always_inline)) void __dec_zone_page_state(struct page *page,
12845 enum zone_stat_item item)
12846{
12847 atomic_long_dec(&page_zone(page)->vm_stat[item]);
12848 atomic_long_dec(&vm_stat[item]);
12849}
12850# 225 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/vmstat.h"
12851static inline __attribute__((always_inline)) void refresh_cpu_vm_stats(int cpu) { }
12852static inline __attribute__((always_inline)) void refresh_vm_stats(void) { }
12853# 498 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h" 2
12854
12855static inline __attribute__((always_inline)) __attribute__((always_inline)) void *lowmem_page_address(struct page *page)
12856{
12857 return ((void *)((unsigned long)(((unsigned long)((page) - mem_map) + ((0x0C000000 >> 12))) << 12)+0x80000000));
12858}
12859# 540 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12860extern struct address_space swapper_space;
12861static inline __attribute__((always_inline)) struct address_space *page_mapping(struct page *page)
12862{
12863 struct address_space *mapping = page->mapping;
12864
12865 if (__builtin_expect(!!(0), 0))
12866 mapping = &swapper_space;
12867 else if (__builtin_expect(!!((unsigned long)mapping & 1), 0))
12868 mapping = ((void *)0);
12869 return mapping;
12870}
12871
12872static inline __attribute__((always_inline)) int PageAnon(struct page *page)
12873{
12874 return ((unsigned long)page->mapping & 1) != 0;
12875}
12876
12877
12878
12879
12880
12881static inline __attribute__((always_inline)) unsigned long page_index(struct page *page)
12882{
12883 if (__builtin_expect(!!(0), 0))
12884 return ((page)->private);
12885 return page->index;
12886}
12887
12888
12889
12890
12891
12892
12893static inline __attribute__((always_inline)) void reset_page_mapcount(struct page *page)
12894{
12895 ((&(page)->_mapcount)->counter = (-1));
12896}
12897
12898static inline __attribute__((always_inline)) int page_mapcount(struct page *page)
12899{
12900 return ((&(page)->_mapcount)->counter) + 1;
12901}
12902
12903
12904
12905
12906static inline __attribute__((always_inline)) int page_mapped(struct page *page)
12907{
12908 return ((&(page)->_mapcount)->counter) >= 0;
12909}
12910# 622 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12911extern void show_free_areas(void);
12912
12913
12914struct page *shmem_nopage(struct vm_area_struct *vma,
12915 unsigned long address, int *type);
12916int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
12917struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
12918 unsigned long addr);
12919int shmem_lock(struct file *file, int lock, struct user_struct *user);
12920# 652 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12921struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
12922extern int shmem_mmap(struct file *file, struct vm_area_struct *vma);
12923
12924int shmem_zero_setup(struct vm_area_struct *);
12925# 665 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12926static inline __attribute__((always_inline)) int can_do_mlock(void)
12927{
12928 if (capable(14))
12929 return 1;
12930 if (get_current()->signal->rlim[8].rlim_cur != 0)
12931 return 1;
12932 return 0;
12933}
12934extern int user_shm_lock(size_t, struct user_struct *);
12935extern void user_shm_unlock(size_t, struct user_struct *);
12936
12937
12938
12939
12940struct zap_details {
12941 struct vm_area_struct *nonlinear_vma;
12942 struct address_space *check_mapping;
12943 unsigned long first_index;
12944 unsigned long last_index;
12945 spinlock_t *i_mmap_lock;
12946 unsigned long truncate_count;
12947};
12948
12949struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t);
12950unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address,
12951 unsigned long size, struct zap_details *);
12952unsigned long unmap_vmas(struct mmu_gather **tlb,
12953 struct vm_area_struct *start_vma, unsigned long start_addr,
12954 unsigned long end_addr, unsigned long *nr_accounted,
12955 struct zap_details *);
12956void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
12957 unsigned long end, unsigned long floor, unsigned long ceiling);
12958void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
12959 unsigned long floor, unsigned long ceiling);
12960int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
12961 struct vm_area_struct *vma);
12962int zeromap_page_range(struct vm_area_struct *vma, unsigned long from,
12963 unsigned long size, pgprot_t prot);
12964void unmap_mapping_range(struct address_space *mapping,
12965 loff_t const holebegin, loff_t const holelen, int even_cows);
12966
12967static inline __attribute__((always_inline)) void unmap_shared_mapping_range(struct address_space *mapping,
12968 loff_t const holebegin, loff_t const holelen)
12969{
12970 unmap_mapping_range(mapping, holebegin, holelen, 0);
12971}
12972
12973extern int vmtruncate(struct inode * inode, loff_t offset);
12974extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end);
12975extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot);
12976extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot);
12977
12978
12979extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma,
12980 unsigned long address, int write_access);
12981
12982static inline __attribute__((always_inline)) int handle_mm_fault(struct mm_struct *mm,
12983 struct vm_area_struct *vma, unsigned long address,
12984 int write_access)
12985{
12986 return __handle_mm_fault(mm, vma, address, write_access) &
12987 (~0x10);
12988}
12989# 739 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
12990extern int make_pages_present(unsigned long addr, unsigned long end);
12991extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
12992void install_arg_page(struct vm_area_struct *, struct page *, unsigned long);
12993
12994int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
12995 int len, int write, int force, struct page **pages, struct vm_area_struct **vmas);
12996void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long);
12997
12998extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
12999extern void do_invalidatepage(struct page *page, unsigned long offset);
13000
13001int __set_page_dirty_nobuffers(struct page *page);
13002int redirty_page_for_writepage(struct writeback_control *wbc,
13003 struct page *page);
13004int set_page_dirty(struct page *page);
13005int set_page_dirty_lock(struct page *page);
13006int clear_page_dirty_for_io(struct page *page);
13007
13008extern unsigned long do_mremap(unsigned long addr,
13009 unsigned long old_len, unsigned long new_len,
13010 unsigned long flags, unsigned long new_addr);
13011# 772 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
13012typedef int (*shrinker_t)(int nr_to_scan, gfp_t gfp_mask);
13013
13014
13015
13016
13017
13018
13019
13020struct shrinker;
13021extern struct shrinker *set_shrinker(int, shrinker_t);
13022extern void remove_shrinker(struct shrinker *shrinker);
13023
13024
13025
13026
13027
13028
13029
13030static inline __attribute__((always_inline)) int vma_wants_writenotify(struct vm_area_struct *vma)
13031{
13032 unsigned int vm_flags = vma->vm_flags;
13033
13034
13035 if ((vm_flags & (0x00000002|0x00000008)) != ((0x00000002|0x00000008)))
13036 return 0;
13037
13038
13039 if (vma->vm_ops && vma->vm_ops->page_mkwrite)
13040 return 1;
13041
13042
13043 if (((vma->vm_page_prot).pgprot) !=
13044 ((protection_map[vm_flags & (0x00000001|0x00000002|0x00000004|0x00000008)]).pgprot))
13045
13046 return 0;
13047
13048
13049 if (vm_flags & (0x00000400|0x02000000))
13050 return 0;
13051
13052
13053 return vma->vm_file && vma->vm_file->f_mapping &&
13054 (!(((vma->vm_file->f_mapping)->backing_dev_info)->capabilities & 0x00000001));
13055}
13056
13057extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl);
13058
13059int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address);
13060int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address);
13061int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address);
13062int __pte_alloc_kernel(pmd_t *pmd, unsigned long address);
13063
13064
13065
13066
13067
13068
13069static inline __attribute__((always_inline)) pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
13070{
13071 return (__builtin_expect(!!(pgd_none(*pgd)), 0) && __pud_alloc(mm, pgd, address))?
13072 ((void *)0): pud_offset(pgd, address);
13073}
13074
13075static inline __attribute__((always_inline)) pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
13076{
13077 return (__builtin_expect(!!(pud_none(*pud)), 0) && __pmd_alloc(mm, pud, address))?
13078 ((void *)0): pmd_offset(pud, address);
13079}
13080# 890 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
13081extern void free_area_init(unsigned long * zones_size);
13082extern void free_area_init_node(int nid, pg_data_t *pgdat,
13083 unsigned long * zones_size, unsigned long zone_start_pfn,
13084 unsigned long *zholes_size);
13085# 943 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
13086extern void set_dma_reserve(unsigned long new_dma_reserve);
13087extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long);
13088extern void setup_per_zone_pages_min(void);
13089extern void mem_init(void);
13090extern void show_mem(void);
13091extern void si_meminfo(struct sysinfo * val);
13092extern void si_meminfo_node(struct sysinfo *val, int nid);
13093extern void zonetable_add(struct zone *zone, int nid, enum zone_type zid,
13094 unsigned long pfn, unsigned long size);
13095
13096
13097
13098
13099static inline __attribute__((always_inline)) void setup_per_cpu_pageset(void) {}
13100
13101
13102
13103void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
13104void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);
13105void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *);
13106struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma,
13107 struct prio_tree_iter *iter);
13108
13109
13110
13111
13112
13113static inline __attribute__((always_inline)) void vma_nonlinear_insert(struct vm_area_struct *vma,
13114 struct list_head *list)
13115{
13116 vma->shared.vm_set.parent = ((void *)0);
13117 list_add_tail(&vma->shared.vm_set.list, list);
13118}
13119
13120
13121extern int __vm_enough_memory(long pages, int cap_sys_admin);
13122extern void vma_adjust(struct vm_area_struct *vma, unsigned long start,
13123 unsigned long end, unsigned long pgoff, struct vm_area_struct *insert);
13124extern struct vm_area_struct *vma_merge(struct mm_struct *,
13125 struct vm_area_struct *prev, unsigned long addr, unsigned long end,
13126 unsigned long vm_flags, struct anon_vma *, struct file *, unsigned long,
13127 struct mempolicy *);
13128extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
13129extern int split_vma(struct mm_struct *,
13130 struct vm_area_struct *, unsigned long addr, int new_below);
13131extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
13132extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
13133 struct rb_node **, struct rb_node *);
13134extern void unlink_file_vma(struct vm_area_struct *);
13135extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
13136 unsigned long addr, unsigned long len, unsigned long pgoff);
13137extern void exit_mmap(struct mm_struct *);
13138extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
13139
13140extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
13141
13142extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
13143 unsigned long len, unsigned long prot,
13144 unsigned long flag, unsigned long pgoff);
13145
13146static inline __attribute__((always_inline)) unsigned long do_mmap(struct file *file, unsigned long addr,
13147 unsigned long len, unsigned long prot,
13148 unsigned long flag, unsigned long offset)
13149{
13150 unsigned long ret = -22;
13151 if ((offset + (((len)+(1UL << 12)-1)&(~((1UL << 12)-1)))) < offset)
13152 goto out;
13153 if (!(offset & ~(~((1UL << 12)-1))))
13154 ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> 12);
13155out:
13156 return ret;
13157}
13158
13159extern int do_munmap(struct mm_struct *, unsigned long, size_t);
13160
13161extern unsigned long do_brk(unsigned long, unsigned long);
13162
13163
13164extern unsigned long page_unuse(struct page *);
13165extern void truncate_inode_pages(struct address_space *, loff_t);
13166extern void truncate_inode_pages_range(struct address_space *,
13167 loff_t lstart, loff_t lend);
13168
13169
13170extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *);
13171extern int filemap_populate(struct vm_area_struct *, unsigned long,
13172 unsigned long, pgprot_t, unsigned long, int);
13173
13174
13175int write_one_page(struct page *page, int wait);
13176
13177
13178
13179
13180
13181
13182
13183int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
13184 unsigned long offset, unsigned long nr_to_read);
13185int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
13186 unsigned long offset, unsigned long nr_to_read);
13187unsigned long page_cache_readahead(struct address_space *mapping,
13188 struct file_ra_state *ra,
13189 struct file *filp,
13190 unsigned long offset,
13191 unsigned long size);
13192void handle_ra_miss(struct address_space *mapping,
13193 struct file_ra_state *ra, unsigned long offset);
13194unsigned long max_sane_readahead(unsigned long nr);
13195
13196
13197extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
13198
13199
13200
13201
13202
13203extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
13204extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
13205 struct vm_area_struct **pprev);
13206
13207
13208
13209static inline __attribute__((always_inline)) struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
13210{
13211 struct vm_area_struct * vma = find_vma(mm,start_addr);
13212
13213 if (vma && end_addr <= vma->vm_start)
13214 vma = ((void *)0);
13215 return vma;
13216}
13217
13218static inline __attribute__((always_inline)) unsigned long vma_pages(struct vm_area_struct *vma)
13219{
13220 return (vma->vm_end - vma->vm_start) >> 12;
13221}
13222
13223pgprot_t vm_get_page_prot(unsigned long vm_flags);
13224struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
13225struct page *vmalloc_to_page(void *addr);
13226unsigned long vmalloc_to_pfn(void *addr);
13227int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
13228 unsigned long pfn, unsigned long size, pgprot_t);
13229int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
13230
13231struct page *follow_page(struct vm_area_struct *, unsigned long address,
13232 unsigned int foll_flags);
13233
13234
13235
13236
13237
13238
13239void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
13240# 1105 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
13241static inline __attribute__((always_inline)) void
13242kernel_map_pages(struct page *page, int numpages, int enable) {}
13243
13244
13245extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
13246
13247int in_gate_area_no_task(unsigned long addr);
13248int in_gate_area(struct task_struct *task, unsigned long addr);
13249# 1121 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mm.h"
13250int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
13251 void *, size_t *, loff_t *);
13252unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
13253 unsigned long lru_pages);
13254void drop_pagecache(void);
13255void drop_slab(void);
13256
13257
13258
13259
13260extern int randomize_va_space;
13261
13262
13263__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
13264# 8 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pagemap.h" 2
13265
13266
13267# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/highmem.h" 1
13268
13269
13270
13271
13272
13273
13274# 1 "include2/asm/cacheflush.h" 1
13275
13276
13277
13278
13279
13280# 1 "include/asm/cpu/cacheflush.h" 1
13281# 19 "include/asm/cpu/cacheflush.h"
13282void flush_cache_all(void);
13283void flush_cache_mm(struct mm_struct *mm);
13284void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
13285 unsigned long end);
13286void flush_cache_page(struct vm_area_struct *vma, unsigned long addr,
13287 unsigned long pfn);
13288void flush_dcache_page(struct page *pg);
13289
13290
13291
13292
13293void flush_icache_range(unsigned long start, unsigned long end);
13294void flush_cache_sigtramp(unsigned long addr);
13295void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
13296 unsigned long addr, int len);
13297
13298
13299
13300
13301void p3_cache_init(void);
13302
13303
13304
13305
13306extern int remap_area_pages(unsigned long addr, unsigned long phys_addr,
13307 unsigned long size, unsigned long flags);
13308# 7 "include2/asm/cacheflush.h" 2
13309
13310
13311extern void __flush_wback_region(void *start, int size);
13312
13313extern void __flush_purge_region(void *start, int size);
13314
13315extern void __flush_invalidate_region(void *start, int size);
13316# 8 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/highmem.h" 2
13317
13318
13319static inline __attribute__((always_inline)) void flush_anon_page(struct page *page, unsigned long vmaddr)
13320{
13321}
13322
13323
13324
13325static inline __attribute__((always_inline)) void flush_kernel_dcache_page(struct page *page)
13326{
13327}
13328# 31 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/highmem.h"
13329static inline __attribute__((always_inline)) unsigned int nr_free_highpages(void) { return 0; }
13330
13331
13332
13333
13334static inline __attribute__((always_inline)) void *kmap(struct page *page)
13335{
13336 do { do { } while (0); } while (0);
13337 return lowmem_page_address(page);
13338}
13339# 53 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/highmem.h"
13340static inline __attribute__((always_inline)) void clear_user_highpage(struct page *page, unsigned long vaddr)
13341{
13342 void *addr = lowmem_page_address(page);
13343 clear_user_page(addr, vaddr, page);
13344 do { } while (0);
13345
13346 __asm__ __volatile__("": : :"memory");
13347}
13348
13349
13350static inline __attribute__((always_inline)) struct page *
13351alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr)
13352{
13353 struct page *page = alloc_pages_node(((0)), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u) | (( gfp_t)0x02u)), 0);
13354
13355 if (page)
13356 clear_user_highpage(page, vaddr);
13357
13358 return page;
13359}
13360
13361
13362static inline __attribute__((always_inline)) void clear_highpage(struct page *page)
13363{
13364 void *kaddr = lowmem_page_address(page);
13365 clear_page(kaddr);
13366 do { } while (0);
13367}
13368
13369
13370
13371
13372static inline __attribute__((always_inline)) void memclear_highpage_flush(struct page *page, unsigned int offset, unsigned int size)
13373{
13374 void *kaddr;
13375
13376 do { if (__builtin_expect(!!((offset + size > (1UL << 12))!=0), 0)) do { printk("kernel BUG at %s:%d!\n", "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/highmem.h", 89); *(volatile int *)0 = 0; } while (0); } while(0);
13377
13378 kaddr = lowmem_page_address(page);
13379 memset((char *)kaddr + offset, 0, size);
13380 flush_dcache_page(page);
13381 do { } while (0);
13382}
13383
13384static inline __attribute__((always_inline)) void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr)
13385{
13386 char *vfrom, *vto;
13387
13388 vfrom = lowmem_page_address(from);
13389 vto = lowmem_page_address(to);
13390 copy_user_page(vto, vfrom, vaddr, to);
13391 do { } while (0);
13392 do { } while (0);
13393
13394 __asm__ __volatile__("": : :"memory");
13395}
13396
13397static inline __attribute__((always_inline)) void copy_highpage(struct page *to, struct page *from)
13398{
13399 char *vfrom, *vto;
13400
13401 vfrom = lowmem_page_address(from);
13402 vto = lowmem_page_address(to);
13403 copy_page(vto, vfrom);
13404 do { } while (0);
13405 do { } while (0);
13406}
13407# 11 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pagemap.h" 2
13408
13409# 1 "include2/asm/uaccess.h" 1
13410# 93 "include2/asm/uaccess.h"
13411static inline __attribute__((always_inline)) int __access_ok(unsigned long addr, unsigned long size)
13412{
13413 unsigned long flag, tmp;
13414
13415 __asm__("stc r7_bank, %0\n\t"
13416 "mov.l @(8,%0), %0\n\t"
13417 "clrt\n\t"
13418 "addc %2, %1\n\t"
13419 "and %1, %0\n\t"
13420 "rotcl %0\n\t"
13421 "rotcl %0\n\t"
13422 "and #3, %0"
13423 : "=&z" (flag), "=r" (tmp)
13424 : "r" (addr), "1" (size)
13425 : "t");
13426
13427 return flag == 0;
13428}
13429
13430
13431static inline __attribute__((always_inline)) int access_ok(int type, const void *p, unsigned long size)
13432{
13433 unsigned long addr = (unsigned long)p;
13434 return __access_ok(addr, size);
13435}
13436# 144 "include2/asm/uaccess.h"
13437struct __large_struct { unsigned long buf[100]; };
13438# 298 "include2/asm/uaccess.h"
13439extern void __get_user_unknown(void);
13440# 408 "include2/asm/uaccess.h"
13441extern void __put_user_unknown(void);
13442
13443
13444
13445extern __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n);
13446# 449 "include2/asm/uaccess.h"
13447extern __kernel_size_t __clear_user(void *addr, __kernel_size_t size);
13448# 458 "include2/asm/uaccess.h"
13449static __inline__ __attribute__((always_inline)) int
13450__strncpy_from_user(unsigned long __dest, unsigned long __src, int __count)
13451{
13452 __kernel_size_t res;
13453 unsigned long __dummy, _d, _s;
13454
13455 __asm__ __volatile__(
13456 "9:\n"
13457 "mov.b @%2+, %1\n\t"
13458 "cmp/eq #0, %1\n\t"
13459 "bt/s 2f\n"
13460 "1:\n"
13461 "mov.b %1, @%3\n\t"
13462 "dt %7\n\t"
13463 "bf/s 9b\n\t"
13464 " add #1, %3\n\t"
13465 "2:\n\t"
13466 "sub %7, %0\n"
13467 "3:\n"
13468 ".section .fixup,\"ax\"\n"
13469 "4:\n\t"
13470 "mov.l 5f, %1\n\t"
13471 "jmp @%1\n\t"
13472 " mov %8, %0\n\t"
13473 ".balign 4\n"
13474 "5: .long 3b\n"
13475 ".previous\n"
13476 ".section __ex_table,\"a\"\n"
13477 " .balign 4\n"
13478 " .long 9b,4b\n"
13479 ".previous"
13480 : "=r" (res), "=&z" (__dummy), "=r" (_s), "=r" (_d)
13481 : "0" (__count), "2" (__src), "3" (__dest), "r" (__count),
13482 "i" (-14)
13483 : "memory", "t");
13484
13485 return res;
13486}
13487# 508 "include2/asm/uaccess.h"
13488static __inline__ __attribute__((always_inline)) long __strnlen_user(const char *__s, long __n)
13489{
13490 unsigned long res;
13491 unsigned long __dummy;
13492
13493 __asm__ __volatile__(
13494 "9:\n"
13495 "cmp/eq %4, %0\n\t"
13496 "bt 2f\n"
13497 "1:\t"
13498 "mov.b @(%0,%3), %1\n\t"
13499 "tst %1, %1\n\t"
13500 "bf/s 9b\n\t"
13501 " add #1, %0\n"
13502 "2:\n"
13503 ".section .fixup,\"ax\"\n"
13504 "3:\n\t"
13505 "mov.l 4f, %1\n\t"
13506 "jmp @%1\n\t"
13507 " mov #0, %0\n"
13508 ".balign 4\n"
13509 "4: .long 2b\n"
13510 ".previous\n"
13511 ".section __ex_table,\"a\"\n"
13512 " .balign 4\n"
13513 " .long 1b,3b\n"
13514 ".previous"
13515 : "=z" (res), "=&r" (__dummy)
13516 : "0" (0), "r" (__s), "r" (__n)
13517 : "t");
13518 return res;
13519}
13520
13521static __inline__ __attribute__((always_inline)) long strnlen_user(const char *s, long n)
13522{
13523 if (!((unsigned long)(s) < (current_thread_info()->addr_limit.seg)))
13524 return 0;
13525 else
13526 return __strnlen_user(s, n);
13527}
13528# 564 "include2/asm/uaccess.h"
13529struct exception_table_entry
13530{
13531 unsigned long insn, fixup;
13532};
13533
13534extern int fixup_exception(struct pt_regs *regs);
13535# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pagemap.h" 2
13536# 22 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pagemap.h"
13537static inline __attribute__((always_inline)) gfp_t mapping_gfp_mask(struct address_space * mapping)
13538{
13539 return ( gfp_t)mapping->flags & (( gfp_t)((1 << 20) - 1));
13540}
13541
13542
13543
13544
13545
13546static inline __attribute__((always_inline)) void mapping_set_gfp_mask(struct address_space *m, gfp_t mask)
13547{
13548 m->flags = (m->flags & ~( unsigned long)(( gfp_t)((1 << 20) - 1))) |
13549 ( unsigned long)mask;
13550}
13551# 52 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pagemap.h"
13552void release_pages(struct page **pages, int nr, int cold);
13553
13554
13555
13556
13557
13558static inline __attribute__((always_inline)) struct page *page_cache_alloc(struct address_space *x)
13559{
13560 return alloc_pages_node(((0)), mapping_gfp_mask(x), 0);
13561}
13562
13563static inline __attribute__((always_inline)) struct page *page_cache_alloc_cold(struct address_space *x)
13564{
13565 return alloc_pages_node(((0)), mapping_gfp_mask(x)|(( gfp_t)0x100u), 0);
13566}
13567
13568
13569typedef int filler_t(void *, struct page *);
13570
13571extern struct page * find_get_page(struct address_space *mapping,
13572 unsigned long index);
13573extern struct page * find_lock_page(struct address_space *mapping,
13574 unsigned long index);
13575extern struct page * find_trylock_page(
13576 struct address_space *mapping, unsigned long index);
13577extern struct page * find_or_create_page(struct address_space *mapping,
13578 unsigned long index, gfp_t gfp_mask);
13579unsigned find_get_pages(struct address_space *mapping, unsigned long start,
13580 unsigned int nr_pages, struct page **pages);
13581unsigned find_get_pages_contig(struct address_space *mapping, unsigned long start,
13582 unsigned int nr_pages, struct page **pages);
13583unsigned find_get_pages_tag(struct address_space *mapping, unsigned long *index,
13584 int tag, unsigned int nr_pages, struct page **pages);
13585
13586
13587
13588
13589static inline __attribute__((always_inline)) struct page *grab_cache_page(struct address_space *mapping, unsigned long index)
13590{
13591 return find_or_create_page(mapping, index, mapping_gfp_mask(mapping));
13592}
13593
13594extern struct page * grab_cache_page_nowait(struct address_space *mapping,
13595 unsigned long index);
13596extern struct page * read_cache_page(struct address_space *mapping,
13597 unsigned long index, filler_t *filler,
13598 void *data);
13599extern int read_cache_pages(struct address_space *mapping,
13600 struct list_head *pages, filler_t *filler, void *data);
13601
13602static inline __attribute__((always_inline)) struct page *read_mapping_page(struct address_space *mapping,
13603 unsigned long index, void *data)
13604{
13605 filler_t *filler = (filler_t *)mapping->a_ops->readpage;
13606 return read_cache_page(mapping, index, filler, data);
13607}
13608
13609int add_to_page_cache(struct page *page, struct address_space *mapping,
13610 unsigned long index, gfp_t gfp_mask);
13611int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
13612 unsigned long index, gfp_t gfp_mask);
13613extern void remove_from_page_cache(struct page *page);
13614extern void __remove_from_page_cache(struct page *page);
13615
13616
13617
13618
13619static inline __attribute__((always_inline)) loff_t page_offset(struct page *page)
13620{
13621 return ((loff_t)page->index) << 12;
13622}
13623
13624static inline __attribute__((always_inline)) unsigned long linear_page_index(struct vm_area_struct *vma,
13625 unsigned long address)
13626{
13627 unsigned long pgoff = (address - vma->vm_start) >> 12;
13628 pgoff += vma->vm_pgoff;
13629 return pgoff >> (12 - 12);
13630}
13631
13632extern void __lock_page(struct page *page);
13633extern void __lock_page_nosync(struct page *page);
13634extern void unlock_page(struct page *page);
13635
13636
13637
13638
13639static inline __attribute__((always_inline)) void lock_page(struct page *page)
13640{
13641 do { do { } while (0); } while (0);
13642 if (test_and_set_bit(0, &(page)->flags))
13643 __lock_page(page);
13644}
13645
13646
13647
13648
13649
13650static inline __attribute__((always_inline)) void lock_page_nosync(struct page *page)
13651{
13652 do { do { } while (0); } while (0);
13653 if (test_and_set_bit(0, &(page)->flags))
13654 __lock_page_nosync(page);
13655}
13656
13657
13658
13659
13660
13661extern void wait_on_page_bit(struct page *page, int bit_nr);
13662# 170 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/pagemap.h"
13663static inline __attribute__((always_inline)) void wait_on_page_locked(struct page *page)
13664{
13665 if (test_bit(0, &(page)->flags))
13666 wait_on_page_bit(page, 0);
13667}
13668
13669
13670
13671
13672static inline __attribute__((always_inline)) void wait_on_page_writeback(struct page *page)
13673{
13674 if (test_bit(12, &(page)->flags))
13675 wait_on_page_bit(page, 12);
13676}
13677
13678extern void end_page_writeback(struct page *page);
13679
13680
13681
13682
13683
13684
13685
13686static inline __attribute__((always_inline)) int fault_in_pages_writeable(char *uaddr, int size)
13687{
13688 int ret;
13689
13690
13691
13692
13693
13694 ret = ({ long __pu_err; do { __pu_err = 0; switch ((sizeof(*(uaddr)))) { case 1: ({ __asm__ __volatile__( "1:\n\t" "mov." "b" " %1, %2\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "nop\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" "mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__pu_err) :"r" (((__typeof__(*(uaddr)))(0))), "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14) :"memory"); }); break; case 2: ({ __asm__ __volatile__( "1:\n\t" "mov." "w" " %1, %2\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "nop\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" "mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__pu_err) :"r" (((__typeof__(*(uaddr)))(0))), "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14) :"memory"); }); break; case 4: ({ __asm__ __volatile__( "1:\n\t" "mov." "l" " %1, %2\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "nop\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" "mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__pu_err) :"r" (((__typeof__(*(uaddr)))(0))), "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14) :"memory"); }); break; case 8: ({ __asm__ __volatile__( "1:\n\t" "mov.l %R1,%2\n\t" "mov.l %S1,%T2\n\t" "mov #0,%0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "nop\n\t" "mov.l 4f,%0\n\t" "jmp @%0\n\t" " mov %3,%0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" : "=r" (__pu_err) : "r" (((__typeof__(*(uaddr)))(0))), "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14) : "memory"); }); break; default: __put_user_unknown(); } } while (0); __pu_err; });
13695 if (ret == 0) {
13696 char *end = uaddr + size - 1;
13697
13698
13699
13700
13701
13702 if (((unsigned long)uaddr & (~((1UL << 12)-1))) !=
13703 ((unsigned long)end & (~((1UL << 12)-1))))
13704 ret = ({ long __pu_err; do { __pu_err = 0; switch ((sizeof(*(end)))) { case 1: ({ __asm__ __volatile__( "1:\n\t" "mov." "b" " %1, %2\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "nop\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" "mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__pu_err) :"r" (((__typeof__(*(end)))(0))), "m" ((*(struct __large_struct *)(((end))))), "i" (-14) :"memory"); }); break; case 2: ({ __asm__ __volatile__( "1:\n\t" "mov." "w" " %1, %2\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "nop\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" "mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__pu_err) :"r" (((__typeof__(*(end)))(0))), "m" ((*(struct __large_struct *)(((end))))), "i" (-14) :"memory"); }); break; case 4: ({ __asm__ __volatile__( "1:\n\t" "mov." "l" " %1, %2\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "nop\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" "mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__pu_err) :"r" (((__typeof__(*(end)))(0))), "m" ((*(struct __large_struct *)(((end))))), "i" (-14) :"memory"); }); break; case 8: ({ __asm__ __volatile__( "1:\n\t" "mov.l %R1,%2\n\t" "mov.l %S1,%T2\n\t" "mov #0,%0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "nop\n\t" "mov.l 4f,%0\n\t" "jmp @%0\n\t" " mov %3,%0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" : "=r" (__pu_err) : "r" (((__typeof__(*(end)))(0))), "m" ((*(struct __large_struct *)(((end))))), "i" (-14) : "memory"); }); break; default: __put_user_unknown(); } } while (0); __pu_err; });
13705 }
13706 return ret;
13707}
13708
13709static inline __attribute__((always_inline)) void fault_in_pages_readable(const char *uaddr, int size)
13710{
13711 volatile char c;
13712 int ret;
13713
13714 ret = ({ long __gu_err, __gu_val; do { __gu_err = 0; switch ((sizeof(*(uaddr)))) { case 1: ({ __asm__ __volatile__( "1:\n\t" "mov." "b" " %2, %1\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov #0, %1\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" " mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__gu_err), "=&r" (__gu_val) :"m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14)); }); break; case 2: ({ __asm__ __volatile__( "1:\n\t" "mov." "w" " %2, %1\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov #0, %1\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" " mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__gu_err), "=&r" (__gu_val) :"m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14)); }); break; case 4: ({ __asm__ __volatile__( "1:\n\t" "mov." "l" " %2, %1\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov #0, %1\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" " mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__gu_err), "=&r" (__gu_val) :"m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14)); }); break; default: __get_user_unknown(); break; } } while (0); ((c)) = (__typeof__(*((uaddr))))__gu_val; __gu_err; });
13715 if (ret == 0) {
13716 const char *end = uaddr + size - 1;
13717
13718 if (((unsigned long)uaddr & (~((1UL << 12)-1))) !=
13719 ((unsigned long)end & (~((1UL << 12)-1))))
13720 ({ long __gu_err, __gu_val; do { __gu_err = 0; switch ((sizeof(*(end)))) { case 1: ({ __asm__ __volatile__( "1:\n\t" "mov." "b" " %2, %1\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov #0, %1\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" " mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__gu_err), "=&r" (__gu_val) :"m" ((*(struct __large_struct *)(((end))))), "i" (-14)); }); break; case 2: ({ __asm__ __volatile__( "1:\n\t" "mov." "w" " %2, %1\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov #0, %1\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" " mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__gu_err), "=&r" (__gu_val) :"m" ((*(struct __large_struct *)(((end))))), "i" (-14)); }); break; case 4: ({ __asm__ __volatile__( "1:\n\t" "mov." "l" " %2, %1\n\t" "mov #0, %0\n" "2:\n" ".section .fixup,\"ax\"\n" "3:\n\t" "mov #0, %1\n\t" "mov.l 4f, %0\n\t" "jmp @%0\n\t" " mov %3, %0\n" "4: .long 2b\n\t" ".previous\n" ".section __ex_table,\"a\"\n\t" ".long 1b, 3b\n\t" ".previous" :"=&r" (__gu_err), "=&r" (__gu_val) :"m" ((*(struct __large_struct *)(((end))))), "i" (-14)); }); break; default: __get_user_unknown(); break; } } while (0); ((c)) = (__typeof__(*((end))))__gu_val; __gu_err; });
13721 }
13722}
13723# 11 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 2
13724
13725
13726# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mempool.h" 1
13727# 9 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mempool.h"
13728struct kmem_cache;
13729
13730typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
13731typedef void (mempool_free_t)(void *element, void *pool_data);
13732
13733typedef struct mempool_s {
13734 spinlock_t lock;
13735 int min_nr;
13736 int curr_nr;
13737 void **elements;
13738
13739 void *pool_data;
13740 mempool_alloc_t *alloc;
13741 mempool_free_t *free;
13742 wait_queue_head_t wait;
13743} mempool_t;
13744
13745extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
13746 mempool_free_t *free_fn, void *pool_data);
13747extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
13748 mempool_free_t *free_fn, void *pool_data, int nid);
13749
13750extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask);
13751extern void mempool_destroy(mempool_t *pool);
13752extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask);
13753extern void mempool_free(void *element, mempool_t *pool);
13754
13755
13756
13757
13758
13759void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
13760void mempool_free_slab(void *element, void *pool_data);
13761static inline __attribute__((always_inline)) mempool_t *
13762mempool_create_slab_pool(int min_nr, struct kmem_cache *kc)
13763{
13764 return mempool_create(min_nr, mempool_alloc_slab, mempool_free_slab,
13765 (void *) kc);
13766}
13767
13768
13769
13770
13771
13772void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data);
13773void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data);
13774void mempool_kfree(void *element, void *pool_data);
13775static inline __attribute__((always_inline)) mempool_t *mempool_create_kmalloc_pool(int min_nr, size_t size)
13776{
13777 return mempool_create(min_nr, mempool_kmalloc, mempool_kfree,
13778 (void *) size);
13779}
13780static inline __attribute__((always_inline)) mempool_t *mempool_create_kzalloc_pool(int min_nr, size_t size)
13781{
13782 return mempool_create(min_nr, mempool_kzalloc, mempool_kfree,
13783 (void *) size);
13784}
13785
13786
13787
13788
13789
13790void *mempool_alloc_pages(gfp_t gfp_mask, void *pool_data);
13791void mempool_free_pages(void *element, void *pool_data);
13792static inline __attribute__((always_inline)) mempool_t *mempool_create_page_pool(int min_nr, int order)
13793{
13794 return mempool_create(min_nr, mempool_alloc_pages, mempool_free_pages,
13795 (void *)(long)order);
13796}
13797# 14 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 2
13798# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bio.h" 1
13799# 25 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bio.h"
13800# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ioprio.h" 1
13801# 25 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ioprio.h"
13802enum {
13803 IOPRIO_CLASS_NONE,
13804 IOPRIO_CLASS_RT,
13805 IOPRIO_CLASS_BE,
13806 IOPRIO_CLASS_IDLE,
13807};
13808
13809
13810
13811
13812
13813
13814enum {
13815 IOPRIO_WHO_PROCESS = 1,
13816 IOPRIO_WHO_PGRP,
13817 IOPRIO_WHO_USER,
13818};
13819
13820
13821
13822
13823
13824
13825static inline __attribute__((always_inline)) int task_ioprio(struct task_struct *task)
13826{
13827 ({ typeof(!((((task->ioprio)) >> (13)) != IOPRIO_CLASS_NONE)) __ret_warn_on = (!((((task->ioprio)) >> (13)) != IOPRIO_CLASS_NONE)); if (__builtin_expect(!!(__ret_warn_on), 0)) { printk("BUG: warning at %s:%d/%s()\n", "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/ioprio.h", 50, (__func__)); dump_stack(); } __builtin_expect(!!(__ret_warn_on), 0); });
13828 return ((task->ioprio) & ((1UL << (13)) - 1));
13829}
13830
13831static inline __attribute__((always_inline)) int task_nice_ioprio(struct task_struct *task)
13832{
13833 return (task_nice(task) + 20) / 5;
13834}
13835
13836
13837
13838
13839extern int ioprio_best(unsigned short aprio, unsigned short bprio);
13840# 26 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bio.h" 2
13841
13842
13843# 1 "include2/asm/io.h" 1
13844# 31 "include2/asm/io.h"
13845# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/iomap.h" 1
13846# 28 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/iomap.h"
13847extern unsigned int ioread8(void *);
13848extern unsigned int ioread16(void *);
13849extern unsigned int ioread16be(void *);
13850extern unsigned int ioread32(void *);
13851extern unsigned int ioread32be(void *);
13852
13853extern void iowrite8(u8, void *);
13854extern void iowrite16(u16, void *);
13855extern void iowrite16be(u16, void *);
13856extern void iowrite32(u32, void *);
13857extern void iowrite32be(u32, void *);
13858# 51 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/asm-generic/iomap.h"
13859extern void ioread8_rep(void *port, void *buf, unsigned long count);
13860extern void ioread16_rep(void *port, void *buf, unsigned long count);
13861extern void ioread32_rep(void *port, void *buf, unsigned long count);
13862
13863extern void iowrite8_rep(void *port, const void *buf, unsigned long count);
13864extern void iowrite16_rep(void *port, const void *buf, unsigned long count);
13865extern void iowrite32_rep(void *port, const void *buf, unsigned long count);
13866
13867
13868extern void *ioport_map(unsigned long port, unsigned int nr);
13869extern void ioport_unmap(void *);
13870
13871
13872struct pci_dev;
13873extern void *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
13874extern void pci_iounmap(struct pci_dev *dev, void *);
13875# 32 "include2/asm/io.h" 2
13876# 40 "include2/asm/io.h"
13877# 1 "include2/asm/io_generic.h" 1
13878# 14 "include2/asm/io_generic.h"
13879u8 generic_inb(unsigned long);
13880u16 generic_inw(unsigned long);
13881u32 generic_inl(unsigned long);
13882
13883void generic_outb(u8, unsigned long);
13884void generic_outw(u16, unsigned long);
13885void generic_outl(u32, unsigned long);
13886
13887u8 generic_inb_p(unsigned long);
13888u16 generic_inw_p(unsigned long);
13889u32 generic_inl_p(unsigned long);
13890void generic_outb_p(u8, unsigned long);
13891void generic_outw_p(u16, unsigned long);
13892void generic_outl_p(u32, unsigned long);
13893
13894void generic_insb(unsigned long, void *dst, unsigned long count);
13895void generic_insw(unsigned long, void *dst, unsigned long count);
13896void generic_insl(unsigned long, void *dst, unsigned long count);
13897void generic_outsb(unsigned long, const void *src, unsigned long count);
13898void generic_outsw(unsigned long, const void *src, unsigned long count);
13899void generic_outsl(unsigned long, const void *src, unsigned long count);
13900
13901u8 generic_readb(void *);
13902u16 generic_readw(void *);
13903u32 generic_readl(void *);
13904void generic_writeb(u8, void *);
13905void generic_writew(u16, void *);
13906void generic_writel(u32, void *);
13907
13908void *generic_ioremap(unsigned long offset, unsigned long size);
13909void generic_iounmap(void *addr);
13910
13911void *generic_ioport_map(unsigned long addr, unsigned int size);
13912void generic_ioport_unmap(void *addr);
13913# 41 "include2/asm/io.h" 2
13914# 110 "include2/asm/io.h"
13915void __raw_writesl(unsigned long addr, const void *data, int longlen);
13916void __raw_readsl(unsigned long addr, void *data, int longlen);
13917# 175 "include2/asm/io.h"
13918static inline __attribute__((always_inline)) void __set_io_port_base(unsigned long pbase)
13919{
13920 extern unsigned long generic_io_base;
13921
13922 generic_io_base = pbase;
13923}
13924
13925
13926extern void memcpy_fromio(void *, volatile void *, unsigned long);
13927extern void memcpy_toio(volatile void *, const void *, unsigned long);
13928extern void memset_io(volatile void *, int, unsigned long);
13929
13930
13931static inline __attribute__((always_inline)) unsigned char ctrl_inb(unsigned long addr)
13932{
13933 return *(volatile unsigned char*)addr;
13934}
13935
13936static inline __attribute__((always_inline)) unsigned short ctrl_inw(unsigned long addr)
13937{
13938 return *(volatile unsigned short*)addr;
13939}
13940
13941static inline __attribute__((always_inline)) unsigned int ctrl_inl(unsigned long addr)
13942{
13943 return *(volatile unsigned long*)addr;
13944}
13945
13946static inline __attribute__((always_inline)) void ctrl_outb(unsigned char b, unsigned long addr)
13947{
13948 *(volatile unsigned char*)addr = b;
13949}
13950
13951static inline __attribute__((always_inline)) void ctrl_outw(unsigned short b, unsigned long addr)
13952{
13953 *(volatile unsigned short*)addr = b;
13954}
13955
13956static inline __attribute__((always_inline)) void ctrl_outl(unsigned int b, unsigned long addr)
13957{
13958 *(volatile unsigned long*)addr = b;
13959}
13960
13961static inline __attribute__((always_inline)) void ctrl_delay(void)
13962{
13963 ctrl_inw(0xa0000000);
13964}
13965# 230 "include2/asm/io.h"
13966static inline __attribute__((always_inline)) unsigned long virt_to_phys(volatile void *address)
13967{
13968 return (((unsigned long)(address)) & 0x1fffffff);
13969}
13970
13971static inline __attribute__((always_inline)) void *phys_to_virt(unsigned long address)
13972{
13973 return (void *)((__typeof__(address))(((unsigned long)(address) & 0x1fffffff) | 0x80000000));
13974}
13975# 267 "include2/asm/io.h"
13976void *__ioremap(unsigned long offset, unsigned long size,
13977 unsigned long flags);
13978void __iounmap(void *addr);
13979
13980
13981
13982
13983
13984static inline __attribute__((always_inline)) void *
13985__ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
13986{
13987 unsigned long last_addr = offset + size - 1;
13988
13989
13990
13991
13992
13993
13994
13995 if (__builtin_expect(!!((((unsigned long)(offset)) & 0xe0000000) < 0xc0000000 && (((unsigned long)(last_addr)) & 0xe0000000) < 0xc0000000), 1)) {
13996 if (__builtin_expect(!!(flags & 0x008), 0))
13997 return (void *)((__typeof__(offset))(((unsigned long)(offset) & 0x1fffffff) | 0x80000000));
13998
13999 return (void *)((__typeof__(offset))(((unsigned long)(offset) & 0x1fffffff) | 0xa0000000));
14000 }
14001
14002 return __ioremap(offset, size, flags);
14003}
14004# 29 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bio.h" 2
14005# 57 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bio.h"
14006struct bio_vec {
14007 struct page *bv_page;
14008 unsigned int bv_len;
14009 unsigned int bv_offset;
14010};
14011
14012struct bio_set;
14013struct bio;
14014typedef int (bio_end_io_t) (struct bio *, unsigned int, int);
14015typedef void (bio_destructor_t) (struct bio *);
14016
14017
14018
14019
14020
14021struct bio {
14022 sector_t bi_sector;
14023
14024 struct bio *bi_next;
14025 struct block_device *bi_bdev;
14026 unsigned long bi_flags;
14027 unsigned long bi_rw;
14028
14029
14030
14031 unsigned short bi_vcnt;
14032 unsigned short bi_idx;
14033
14034
14035
14036
14037 unsigned short bi_phys_segments;
14038
14039
14040
14041
14042 unsigned short bi_hw_segments;
14043
14044 unsigned int bi_size;
14045
14046
14047
14048
14049
14050
14051 unsigned int bi_hw_front_size;
14052 unsigned int bi_hw_back_size;
14053
14054 unsigned int bi_max_vecs;
14055
14056 struct bio_vec *bi_io_vec;
14057
14058 bio_end_io_t *bi_end_io;
14059 atomic_t bi_cnt;
14060
14061 void *bi_private;
14062
14063 bio_destructor_t *bi_destructor;
14064};
14065# 268 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bio.h"
14066struct bio_pair {
14067 struct bio bio1, bio2;
14068 struct bio_vec bv1, bv2;
14069 atomic_t cnt;
14070 int error;
14071};
14072extern struct bio_pair *bio_split(struct bio *bi, mempool_t *pool,
14073 int first_sectors);
14074extern mempool_t *bio_split_pool;
14075extern void bio_pair_release(struct bio_pair *dbio);
14076
14077extern struct bio_set *bioset_create(int, int, int);
14078extern void bioset_free(struct bio_set *);
14079
14080extern struct bio *bio_alloc(gfp_t, int);
14081extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
14082extern void bio_put(struct bio *);
14083extern void bio_free(struct bio *, struct bio_set *);
14084
14085extern void bio_endio(struct bio *, unsigned int, int);
14086struct request_queue;
14087extern int bio_phys_segments(struct request_queue *, struct bio *);
14088extern int bio_hw_segments(struct request_queue *, struct bio *);
14089
14090extern void __bio_clone(struct bio *, struct bio *);
14091extern struct bio *bio_clone(struct bio *, gfp_t);
14092
14093extern void bio_init(struct bio *);
14094
14095extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
14096extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
14097 unsigned int, unsigned int);
14098extern int bio_get_nr_vecs(struct block_device *);
14099extern struct bio *bio_map_user(struct request_queue *, struct block_device *,
14100 unsigned long, unsigned int, int);
14101struct sg_iovec;
14102extern struct bio *bio_map_user_iov(struct request_queue *,
14103 struct block_device *,
14104 struct sg_iovec *, int, int);
14105extern void bio_unmap_user(struct bio *);
14106extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int,
14107 gfp_t);
14108extern void bio_set_pages_dirty(struct bio *bio);
14109extern void bio_check_pages_dirty(struct bio *bio);
14110extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int);
14111extern int bio_uncopy_user(struct bio *);
14112void zero_fill_bio(struct bio *bio);
14113# 352 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/bio.h"
14114static inline __attribute__((always_inline)) char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
14115 unsigned long *flags)
14116{
14117 return (lowmem_page_address(((&((bio)->bi_io_vec[(idx)])))->bv_page) + ((&((bio)->bi_io_vec[(idx)])))->bv_offset);
14118}
14119# 15 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 2
14120
14121
14122
14123# 1 "include2/asm/scatterlist.h" 1
14124
14125
14126
14127struct scatterlist {
14128 struct page * page;
14129 unsigned int offset;
14130 dma_addr_t dma_address;
14131 unsigned int length;
14132};
14133# 19 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 2
14134
14135
14136# 1 "include2/asm/div64.h" 1
14137# 22 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 2
14138# 36 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14139struct scsi_ioctl_command;
14140
14141struct request_queue;
14142typedef struct request_queue request_queue_t;
14143struct elevator_queue;
14144typedef struct elevator_queue elevator_t;
14145struct request_pm_state;
14146struct blk_trace;
14147
14148
14149
14150
14151
14152
14153
14154struct as_io_context {
14155 spinlock_t lock;
14156
14157 void (*dtor)(struct as_io_context *aic);
14158 void (*exit)(struct as_io_context *aic);
14159
14160 unsigned long state;
14161 atomic_t nr_queued;
14162 atomic_t nr_dispatched;
14163
14164
14165
14166 unsigned long last_end_request;
14167 unsigned long ttime_total;
14168 unsigned long ttime_samples;
14169 unsigned long ttime_mean;
14170
14171 unsigned int seek_samples;
14172 sector_t last_request_pos;
14173 u64 seek_total;
14174 sector_t seek_mean;
14175};
14176
14177struct cfq_queue;
14178struct cfq_io_context {
14179 struct rb_node rb_node;
14180 void *key;
14181
14182 struct cfq_queue *cfqq[2];
14183
14184 struct io_context *ioc;
14185
14186 unsigned long last_end_request;
14187 sector_t last_request_pos;
14188 unsigned long last_queue;
14189
14190 unsigned long ttime_total;
14191 unsigned long ttime_samples;
14192 unsigned long ttime_mean;
14193
14194 unsigned int seek_samples;
14195 u64 seek_total;
14196 sector_t seek_mean;
14197
14198 struct list_head queue_list;
14199
14200 void (*dtor)(struct io_context *);
14201 void (*exit)(struct io_context *);
14202};
14203
14204
14205
14206
14207
14208
14209struct io_context {
14210 atomic_t refcount;
14211 struct task_struct *task;
14212
14213 unsigned int ioprio_changed;
14214
14215
14216
14217
14218 unsigned long last_waited;
14219 int nr_batch_requests;
14220
14221 struct as_io_context *aic;
14222 struct rb_root cic_root;
14223};
14224
14225void put_io_context(struct io_context *ioc);
14226void exit_io_context(void);
14227struct io_context *get_io_context(gfp_t gfp_flags, int node);
14228void copy_io_context(struct io_context **pdst, struct io_context **psrc);
14229void swap_io_context(struct io_context **ioc1, struct io_context **ioc2);
14230
14231struct request;
14232typedef void (rq_end_io_fn)(struct request *, int);
14233
14234struct request_list {
14235 int count[2];
14236 int starved[2];
14237 int elvpriv;
14238 mempool_t *rq_pool;
14239 wait_queue_head_t wait[2];
14240};
14241
14242
14243
14244
14245enum rq_cmd_type_bits {
14246 REQ_TYPE_FS = 1,
14247 REQ_TYPE_BLOCK_PC,
14248 REQ_TYPE_SENSE,
14249 REQ_TYPE_PM_SUSPEND,
14250 REQ_TYPE_PM_RESUME,
14251 REQ_TYPE_PM_SHUTDOWN,
14252 REQ_TYPE_FLUSH,
14253 REQ_TYPE_SPECIAL,
14254 REQ_TYPE_LINUX_BLOCK,
14255
14256
14257
14258
14259
14260 REQ_TYPE_ATA_CMD,
14261 REQ_TYPE_ATA_TASK,
14262 REQ_TYPE_ATA_TASKFILE,
14263 REQ_TYPE_ATA_PC,
14264};
14265# 172 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14266enum {
14267
14268
14269
14270 REQ_LB_OP_EJECT = 0x40,
14271 REQ_LB_OP_FLUSH = 0x41,
14272};
14273
14274
14275
14276
14277enum rq_flag_bits {
14278 __REQ_RW,
14279 __REQ_FAILFAST,
14280 __REQ_SORTED,
14281 __REQ_SOFTBARRIER,
14282 __REQ_HARDBARRIER,
14283 __REQ_FUA,
14284 __REQ_NOMERGE,
14285 __REQ_STARTED,
14286 __REQ_DONTPREP,
14287 __REQ_QUEUED,
14288 __REQ_ELVPRIV,
14289 __REQ_FAILED,
14290 __REQ_QUIET,
14291 __REQ_PREEMPT,
14292 __REQ_ORDERED_COLOR,
14293 __REQ_RW_SYNC,
14294 __REQ_ALLOCED,
14295 __REQ_RW_META,
14296 __REQ_NR_BITS,
14297};
14298# 229 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14299struct request {
14300 struct list_head queuelist;
14301 struct list_head donelist;
14302
14303 request_queue_t *q;
14304
14305 unsigned int cmd_flags;
14306 enum rq_cmd_type_bits cmd_type;
14307
14308
14309
14310
14311
14312 sector_t sector;
14313 sector_t hard_sector;
14314 unsigned long nr_sectors;
14315 unsigned long hard_nr_sectors;
14316
14317 unsigned int current_nr_sectors;
14318
14319
14320 unsigned int hard_cur_sectors;
14321
14322 struct bio *bio;
14323 struct bio *biotail;
14324
14325 struct hlist_node hash;
14326
14327
14328
14329
14330
14331 union {
14332 struct rb_node rb_node;
14333 void *completion_data;
14334 };
14335
14336
14337
14338
14339
14340 void *elevator_private;
14341 void *elevator_private2;
14342
14343 struct gendisk *rq_disk;
14344 unsigned long start_time;
14345
14346
14347
14348
14349 unsigned short nr_phys_segments;
14350
14351
14352
14353
14354
14355
14356 unsigned short nr_hw_segments;
14357
14358 unsigned short ioprio;
14359
14360 void *special;
14361 char *buffer;
14362
14363 int tag;
14364 int errors;
14365
14366 int ref_count;
14367
14368
14369
14370
14371 unsigned int cmd_len;
14372 unsigned char cmd[16];
14373
14374 unsigned int data_len;
14375 unsigned int sense_len;
14376 void *data;
14377 void *sense;
14378
14379 unsigned int timeout;
14380 int retries;
14381
14382
14383
14384
14385 rq_end_io_fn *end_io;
14386 void *end_io_data;
14387};
14388
14389
14390
14391
14392
14393struct request_pm_state
14394{
14395
14396 int pm_step;
14397
14398 u32 pm_state;
14399 void* data;
14400};
14401
14402# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elevator.h" 1
14403
14404
14405
14406
14407
14408
14409
14410typedef int (elevator_merge_fn) (request_queue_t *, struct request **,
14411 struct bio *);
14412
14413typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *);
14414
14415typedef void (elevator_merged_fn) (request_queue_t *, struct request *, int);
14416
14417typedef int (elevator_dispatch_fn) (request_queue_t *, int);
14418
14419typedef void (elevator_add_req_fn) (request_queue_t *, struct request *);
14420typedef int (elevator_queue_empty_fn) (request_queue_t *);
14421typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *);
14422typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
14423typedef int (elevator_may_queue_fn) (request_queue_t *, int);
14424
14425typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t);
14426typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
14427typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
14428typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
14429
14430typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *);
14431typedef void (elevator_exit_fn) (elevator_t *);
14432
14433struct elevator_ops
14434{
14435 elevator_merge_fn *elevator_merge_fn;
14436 elevator_merged_fn *elevator_merged_fn;
14437 elevator_merge_req_fn *elevator_merge_req_fn;
14438
14439 elevator_dispatch_fn *elevator_dispatch_fn;
14440 elevator_add_req_fn *elevator_add_req_fn;
14441 elevator_activate_req_fn *elevator_activate_req_fn;
14442 elevator_deactivate_req_fn *elevator_deactivate_req_fn;
14443
14444 elevator_queue_empty_fn *elevator_queue_empty_fn;
14445 elevator_completed_req_fn *elevator_completed_req_fn;
14446
14447 elevator_request_list_fn *elevator_former_req_fn;
14448 elevator_request_list_fn *elevator_latter_req_fn;
14449
14450 elevator_set_req_fn *elevator_set_req_fn;
14451 elevator_put_req_fn *elevator_put_req_fn;
14452
14453 elevator_may_queue_fn *elevator_may_queue_fn;
14454
14455 elevator_init_fn *elevator_init_fn;
14456 elevator_exit_fn *elevator_exit_fn;
14457 void (*trim)(struct io_context *);
14458};
14459
14460
14461
14462struct elv_fs_entry {
14463 struct attribute attr;
14464 ssize_t (*show)(elevator_t *, char *);
14465 ssize_t (*store)(elevator_t *, const char *, size_t);
14466};
14467
14468
14469
14470
14471struct elevator_type
14472{
14473 struct list_head list;
14474 struct elevator_ops ops;
14475 struct elv_fs_entry *elevator_attrs;
14476 char elevator_name[(16)];
14477 struct module *elevator_owner;
14478};
14479
14480
14481
14482
14483struct elevator_queue
14484{
14485 struct elevator_ops *ops;
14486 void *elevator_data;
14487 struct kobject kobj;
14488 struct elevator_type *elevator_type;
14489 struct mutex sysfs_lock;
14490 struct hlist_head *hash;
14491};
14492
14493
14494
14495
14496extern void elv_dispatch_sort(request_queue_t *, struct request *);
14497extern void elv_dispatch_add_tail(request_queue_t *, struct request *);
14498extern void elv_add_request(request_queue_t *, struct request *, int, int);
14499extern void __elv_add_request(request_queue_t *, struct request *, int, int);
14500extern void elv_insert(request_queue_t *, struct request *, int);
14501extern int elv_merge(request_queue_t *, struct request **, struct bio *);
14502extern void elv_merge_requests(request_queue_t *, struct request *,
14503 struct request *);
14504extern void elv_merged_request(request_queue_t *, struct request *, int);
14505extern void elv_dequeue_request(request_queue_t *, struct request *);
14506extern void elv_requeue_request(request_queue_t *, struct request *);
14507extern int elv_queue_empty(request_queue_t *);
14508extern struct request *elv_next_request(struct request_queue *q);
14509extern struct request *elv_former_request(request_queue_t *, struct request *);
14510extern struct request *elv_latter_request(request_queue_t *, struct request *);
14511extern int elv_register_queue(request_queue_t *q);
14512extern void elv_unregister_queue(request_queue_t *q);
14513extern int elv_may_queue(request_queue_t *, int);
14514extern void elv_completed_request(request_queue_t *, struct request *);
14515extern int elv_set_request(request_queue_t *, struct request *, gfp_t);
14516extern void elv_put_request(request_queue_t *, struct request *);
14517
14518
14519
14520
14521extern int elv_register(struct elevator_type *);
14522extern void elv_unregister(struct elevator_type *);
14523
14524
14525
14526
14527extern ssize_t elv_iosched_show(request_queue_t *, char *);
14528extern ssize_t elv_iosched_store(request_queue_t *, const char *, size_t);
14529
14530extern int elevator_init(request_queue_t *, char *);
14531extern void elevator_exit(elevator_t *);
14532extern int elv_rq_merge_ok(struct request *, struct bio *);
14533
14534
14535
14536
14537extern struct request *elv_rb_former_request(request_queue_t *, struct request *);
14538extern struct request *elv_rb_latter_request(request_queue_t *, struct request *);
14539
14540
14541
14542
14543extern struct request *elv_rb_add(struct rb_root *, struct request *);
14544extern void elv_rb_del(struct rb_root *, struct request *);
14545extern struct request *elv_rb_find(struct rb_root *, sector_t);
14546# 163 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/elevator.h"
14547enum {
14548 ELV_MQUEUE_MAY,
14549 ELV_MQUEUE_NO,
14550 ELV_MQUEUE_MUST,
14551};
14552# 333 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h" 2
14553
14554typedef int (merge_request_fn) (request_queue_t *, struct request *,
14555 struct bio *);
14556typedef int (merge_requests_fn) (request_queue_t *, struct request *,
14557 struct request *);
14558typedef void (request_fn_proc) (request_queue_t *q);
14559typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);
14560typedef int (prep_rq_fn) (request_queue_t *, struct request *);
14561typedef void (unplug_fn) (request_queue_t *);
14562
14563struct bio_vec;
14564typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *);
14565typedef void (activity_fn) (void *data, int rw);
14566typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *);
14567typedef void (prepare_flush_fn) (request_queue_t *, struct request *);
14568typedef void (softirq_done_fn)(struct request *);
14569
14570enum blk_queue_state {
14571 Queue_down,
14572 Queue_up,
14573};
14574
14575struct blk_queue_tag {
14576 struct request **tag_index;
14577 unsigned long *tag_map;
14578 struct list_head busy_list;
14579 int busy;
14580 int max_depth;
14581 int real_max_depth;
14582 atomic_t refcnt;
14583};
14584
14585struct request_queue
14586{
14587
14588
14589
14590 struct list_head queue_head;
14591 struct request *last_merge;
14592 elevator_t *elevator;
14593
14594
14595
14596
14597 struct request_list rq;
14598
14599 request_fn_proc *request_fn;
14600 merge_request_fn *back_merge_fn;
14601 merge_request_fn *front_merge_fn;
14602 merge_requests_fn *merge_requests_fn;
14603 make_request_fn *make_request_fn;
14604 prep_rq_fn *prep_rq_fn;
14605 unplug_fn *unplug_fn;
14606 merge_bvec_fn *merge_bvec_fn;
14607 activity_fn *activity_fn;
14608 issue_flush_fn *issue_flush_fn;
14609 prepare_flush_fn *prepare_flush_fn;
14610 softirq_done_fn *softirq_done_fn;
14611
14612
14613
14614
14615 sector_t end_sector;
14616 struct request *boundary_rq;
14617
14618
14619
14620
14621 struct timer_list unplug_timer;
14622 int unplug_thresh;
14623 unsigned long unplug_delay;
14624 struct work_struct unplug_work;
14625
14626 struct backing_dev_info backing_dev_info;
14627
14628
14629
14630
14631
14632 void *queuedata;
14633
14634 void *activity_data;
14635
14636
14637
14638
14639 unsigned long bounce_pfn;
14640 gfp_t bounce_gfp;
14641
14642
14643
14644
14645 unsigned long queue_flags;
14646
14647
14648
14649
14650
14651
14652 spinlock_t __queue_lock;
14653 spinlock_t *queue_lock;
14654
14655
14656
14657
14658 struct kobject kobj;
14659
14660
14661
14662
14663 unsigned long nr_requests;
14664 unsigned int nr_congestion_on;
14665 unsigned int nr_congestion_off;
14666 unsigned int nr_batching;
14667
14668 unsigned int max_sectors;
14669 unsigned int max_hw_sectors;
14670 unsigned short max_phys_segments;
14671 unsigned short max_hw_segments;
14672 unsigned short hardsect_size;
14673 unsigned int max_segment_size;
14674
14675 unsigned long seg_boundary_mask;
14676 unsigned int dma_alignment;
14677
14678 struct blk_queue_tag *queue_tags;
14679
14680 unsigned int nr_sorted;
14681 unsigned int in_flight;
14682
14683
14684
14685
14686 unsigned int sg_timeout;
14687 unsigned int sg_reserved_size;
14688 int node;
14689
14690
14691
14692
14693
14694
14695 unsigned int ordered, next_ordered, ordseq;
14696 int orderr, ordcolor;
14697 struct request pre_flush_rq, bar_rq, post_flush_rq;
14698 struct request *orig_bar_rq;
14699 unsigned int bi_size;
14700
14701 struct mutex sysfs_lock;
14702};
14703# 494 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14704enum {
14705# 506 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14706 QUEUE_ORDERED_NONE = 0x00,
14707 QUEUE_ORDERED_DRAIN = 0x01,
14708 QUEUE_ORDERED_TAG = 0x02,
14709
14710 QUEUE_ORDERED_PREFLUSH = 0x10,
14711 QUEUE_ORDERED_POSTFLUSH = 0x20,
14712 QUEUE_ORDERED_FUA = 0x40,
14713
14714 QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN |
14715 QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
14716 QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN |
14717 QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
14718 QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG |
14719 QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
14720 QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG |
14721 QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
14722
14723
14724
14725
14726 QUEUE_ORDSEQ_STARTED = 0x01,
14727 QUEUE_ORDSEQ_DRAIN = 0x02,
14728 QUEUE_ORDSEQ_PREFLUSH = 0x04,
14729 QUEUE_ORDSEQ_BAR = 0x08,
14730 QUEUE_ORDSEQ_POSTFLUSH = 0x10,
14731 QUEUE_ORDSEQ_DONE = 0x20,
14732};
14733# 568 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14734static inline __attribute__((always_inline)) int blk_queue_full(struct request_queue *q, int rw)
14735{
14736 if (rw == 0)
14737 return test_bit(3, &q->queue_flags);
14738 return test_bit(4, &q->queue_flags);
14739}
14740
14741static inline __attribute__((always_inline)) void blk_set_queue_full(struct request_queue *q, int rw)
14742{
14743 if (rw == 0)
14744 set_bit(3, &q->queue_flags);
14745 else
14746 set_bit(4, &q->queue_flags);
14747}
14748
14749static inline __attribute__((always_inline)) void blk_clear_queue_full(struct request_queue *q, int rw)
14750{
14751 if (rw == 0)
14752 clear_bit(3, &q->queue_flags);
14753 else
14754 clear_bit(4, &q->queue_flags);
14755}
14756# 608 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14757extern unsigned long blk_max_low_pfn, blk_max_pfn;
14758# 622 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14759extern int init_emergency_isa_pool(void);
14760extern void blk_queue_bounce(request_queue_t *q, struct bio **bio);
14761# 638 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14762extern int blk_register_queue(struct gendisk *disk);
14763extern void blk_unregister_queue(struct gendisk *disk);
14764extern void register_disk(struct gendisk *dev);
14765extern void generic_make_request(struct bio *bio);
14766extern void blk_put_request(struct request *);
14767extern void __blk_put_request(request_queue_t *, struct request *);
14768extern void blk_end_sync_rq(struct request *rq, int error);
14769extern struct request *blk_get_request(request_queue_t *, int, gfp_t);
14770extern void blk_insert_request(request_queue_t *, struct request *, int, void *);
14771extern void blk_requeue_request(request_queue_t *, struct request *);
14772extern void blk_plug_device(request_queue_t *);
14773extern int blk_remove_plug(request_queue_t *);
14774extern void blk_recount_segments(request_queue_t *, struct bio *);
14775extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void *);
14776extern int sg_scsi_ioctl(struct file *, struct request_queue *,
14777 struct gendisk *, struct scsi_ioctl_command *);
14778extern void blk_start_queue(request_queue_t *q);
14779extern void blk_stop_queue(request_queue_t *q);
14780extern void blk_sync_queue(struct request_queue *q);
14781extern void __blk_stop_queue(request_queue_t *q);
14782extern void blk_run_queue(request_queue_t *);
14783extern void blk_start_queueing(request_queue_t *);
14784extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
14785extern int blk_rq_map_user(request_queue_t *, struct request *, void *, unsigned int);
14786extern int blk_rq_unmap_user(struct bio *, unsigned int);
14787extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t);
14788extern int blk_rq_map_user_iov(request_queue_t *, struct request *, struct sg_iovec *, int);
14789extern int blk_execute_rq(request_queue_t *, struct gendisk *,
14790 struct request *, int);
14791extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *,
14792 struct request *, int, rq_end_io_fn *);
14793
14794static inline __attribute__((always_inline)) request_queue_t *bdev_get_queue(struct block_device *bdev)
14795{
14796 return bdev->bd_disk->queue;
14797}
14798
14799static inline __attribute__((always_inline)) void blk_run_backing_dev(struct backing_dev_info *bdi,
14800 struct page *page)
14801{
14802 if (bdi && bdi->unplug_io_fn)
14803 bdi->unplug_io_fn(bdi, page);
14804}
14805
14806static inline __attribute__((always_inline)) void blk_run_address_space(struct address_space *mapping)
14807{
14808 if (mapping)
14809 blk_run_backing_dev(mapping->backing_dev_info, ((void *)0));
14810}
14811# 697 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14812extern int end_that_request_first(struct request *, int, int);
14813extern int end_that_request_chunk(struct request *, int, int);
14814extern void end_that_request_last(struct request *, int);
14815extern void end_request(struct request *req, int uptodate);
14816extern void blk_complete_request(struct request *);
14817# 711 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14818static inline __attribute__((always_inline)) void blkdev_dequeue_request(struct request *req)
14819{
14820 elv_dequeue_request(req->q, req);
14821}
14822
14823
14824
14825
14826extern request_queue_t *blk_init_queue_node(request_fn_proc *rfn,
14827 spinlock_t *lock, int node_id);
14828extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *);
14829extern void blk_cleanup_queue(request_queue_t *);
14830extern void blk_queue_make_request(request_queue_t *, make_request_fn *);
14831extern void blk_queue_bounce_limit(request_queue_t *, u64);
14832extern void blk_queue_max_sectors(request_queue_t *, unsigned int);
14833extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short);
14834extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short);
14835extern void blk_queue_max_segment_size(request_queue_t *, unsigned int);
14836extern void blk_queue_hardsect_size(request_queue_t *, unsigned short);
14837extern void blk_queue_stack_limits(request_queue_t *t, request_queue_t *b);
14838extern void blk_queue_segment_boundary(request_queue_t *, unsigned long);
14839extern void blk_queue_prep_rq(request_queue_t *, prep_rq_fn *pfn);
14840extern void blk_queue_merge_bvec(request_queue_t *, merge_bvec_fn *);
14841extern void blk_queue_dma_alignment(request_queue_t *, int);
14842extern void blk_queue_softirq_done(request_queue_t *, softirq_done_fn *);
14843extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
14844extern int blk_queue_ordered(request_queue_t *, unsigned, prepare_flush_fn *);
14845extern void blk_queue_issue_flush_fn(request_queue_t *, issue_flush_fn *);
14846extern int blk_do_ordered(request_queue_t *, struct request **);
14847extern unsigned blk_ordered_cur_seq(request_queue_t *);
14848extern unsigned blk_ordered_req_seq(struct request *);
14849extern void blk_ordered_complete_seq(request_queue_t *, unsigned, int);
14850
14851extern int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *);
14852extern void blk_dump_rq_flags(struct request *, char *);
14853extern void generic_unplug_device(request_queue_t *);
14854extern void __generic_unplug_device(request_queue_t *);
14855extern long nr_blockdev_pages(void);
14856
14857int blk_get_queue(request_queue_t *);
14858request_queue_t *blk_alloc_queue(gfp_t);
14859request_queue_t *blk_alloc_queue_node(gfp_t, int);
14860extern void blk_put_queue(request_queue_t *);
14861
14862
14863
14864
14865
14866
14867
14868extern int blk_queue_start_tag(request_queue_t *, struct request *);
14869extern struct request *blk_queue_find_tag(request_queue_t *, int);
14870extern void blk_queue_end_tag(request_queue_t *, struct request *);
14871extern int blk_queue_init_tags(request_queue_t *, int, struct blk_queue_tag *);
14872extern void blk_queue_free_tags(request_queue_t *);
14873extern int blk_queue_resize_tags(request_queue_t *, int);
14874extern void blk_queue_invalidate_tags(request_queue_t *);
14875extern long blk_congestion_wait(int rw, long timeout);
14876extern struct blk_queue_tag *blk_init_tags(int);
14877extern void blk_free_tags(struct blk_queue_tag *);
14878extern void blk_congestion_end(int rw);
14879
14880static inline __attribute__((always_inline)) struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt,
14881 int tag)
14882{
14883 if (__builtin_expect(!!(bqt == ((void *)0) || tag >= bqt->real_max_depth), 0))
14884 return ((void *)0);
14885 return bqt->tag_index[tag];
14886}
14887
14888extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *);
14889extern int blkdev_issue_flush(struct block_device *, sector_t *);
14890# 793 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/blkdev.h"
14891static inline __attribute__((always_inline)) int queue_hardsect_size(request_queue_t *q)
14892{
14893 int retval = 512;
14894
14895 if (q && q->hardsect_size)
14896 retval = q->hardsect_size;
14897
14898 return retval;
14899}
14900
14901static inline __attribute__((always_inline)) int bdev_hardsect_size(struct block_device *bdev)
14902{
14903 return queue_hardsect_size(bdev_get_queue(bdev));
14904}
14905
14906static inline __attribute__((always_inline)) int queue_dma_alignment(request_queue_t *q)
14907{
14908 int retval = 511;
14909
14910 if (q && q->dma_alignment)
14911 retval = q->dma_alignment;
14912
14913 return retval;
14914}
14915
14916
14917static inline __attribute__((always_inline)) unsigned int blksize_bits(unsigned int size)
14918{
14919 unsigned int bits = 8;
14920 do {
14921 bits++;
14922 size >>= 1;
14923 } while (size > 256);
14924 return bits;
14925}
14926
14927static inline __attribute__((always_inline)) unsigned int block_size(struct block_device *bdev)
14928{
14929 return bdev->bd_block_size;
14930}
14931
14932typedef struct {struct page *v;} Sector;
14933
14934unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *);
14935
14936static inline __attribute__((always_inline)) void put_dev_sector(Sector p)
14937{
14938 put_page(p.v);
14939}
14940
14941struct work_struct;
14942int kblockd_schedule_work(struct work_struct *work);
14943void kblockd_flush(void);
14944# 30 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
14945
14946# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/scatterlist.h" 1
14947
14948
14949
14950
14951
14952
14953
14954static inline __attribute__((always_inline)) void sg_set_buf(struct scatterlist *sg, const void *buf,
14955 unsigned int buflen)
14956{
14957 sg->page = (mem_map + ((((unsigned long)(buf)-0x80000000) >> 12) - ((0x0C000000 >> 12))));
14958 sg->offset = ((unsigned long)(buf) & ~(~((1UL << 12)-1)));
14959 sg->length = buflen;
14960}
14961
14962static inline __attribute__((always_inline)) void sg_init_one(struct scatterlist *sg, const void *buf,
14963 unsigned int buflen)
14964{
14965 memset(sg, 0, sizeof(*sg));
14966 sg_set_buf(sg, buf, buflen);
14967}
14968# 32 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
14969
14970# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/card.h" 1
14971# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/card.h"
14972# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/mmc.h" 1
14973# 12 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/mmc.h"
14974# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h" 1
14975# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
14976# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/irqflags.h" 1
14977# 14 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h" 2
14978# 67 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
14979typedef irqreturn_t (*irq_handler_t)(int, void *);
14980
14981struct irqaction {
14982 irq_handler_t handler;
14983 unsigned long flags;
14984 cpumask_t mask;
14985 const char *name;
14986 void *dev_id;
14987 struct irqaction *next;
14988 int irq;
14989 struct proc_dir_entry *dir;
14990};
14991
14992extern irqreturn_t no_action(int cpl, void *dev_id);
14993extern int request_irq(unsigned int, irq_handler_t handler,
14994 unsigned long, const char *, void *);
14995extern void free_irq(unsigned int, void *);
14996# 104 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
14997extern void disable_irq_nosync(unsigned int irq);
14998extern void disable_irq(unsigned int irq);
14999extern void enable_irq(unsigned int irq);
15000# 119 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
15001static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep(unsigned int irq)
15002{
15003 disable_irq_nosync(irq);
15004
15005
15006
15007}
15008
15009static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags)
15010{
15011 disable_irq_nosync(irq);
15012
15013
15014
15015}
15016
15017static inline __attribute__((always_inline)) void disable_irq_lockdep(unsigned int irq)
15018{
15019 disable_irq(irq);
15020
15021
15022
15023}
15024
15025static inline __attribute__((always_inline)) void enable_irq_lockdep(unsigned int irq)
15026{
15027
15028
15029
15030 enable_irq(irq);
15031}
15032
15033static inline __attribute__((always_inline)) void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags)
15034{
15035
15036
15037
15038 enable_irq(irq);
15039}
15040
15041
15042extern int set_irq_wake(unsigned int irq, unsigned int on);
15043
15044static inline __attribute__((always_inline)) int enable_irq_wake(unsigned int irq)
15045{
15046 return set_irq_wake(irq, 1);
15047}
15048
15049static inline __attribute__((always_inline)) int disable_irq_wake(unsigned int irq)
15050{
15051 return set_irq_wake(irq, 0);
15052}
15053# 195 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
15054static inline __attribute__((always_inline)) void __attribute__((deprecated)) cli(void)
15055{
15056 local_irq_disable();
15057}
15058static inline __attribute__((always_inline)) void __attribute__((deprecated)) sti(void)
15059{
15060 local_irq_enable();
15061}
15062static inline __attribute__((always_inline)) void __attribute__((deprecated)) save_flags(unsigned long *x)
15063{
15064 __asm__("stc sr, %0; and #0xf0, %0" : "=&z" (*x) : : "memory" );
15065}
15066
15067static inline __attribute__((always_inline)) void __attribute__((deprecated)) restore_flags(unsigned long x)
15068{
15069 do { if ((x & 0x000000f0) != 0x000000f0) local_irq_enable(); } while (0);
15070}
15071
15072static inline __attribute__((always_inline)) void __attribute__((deprecated)) save_and_cli(unsigned long *x)
15073{
15074 *x = local_irq_save();
15075}
15076
15077
15078
15079extern void local_bh_disable(void);
15080extern void __local_bh_enable(void);
15081extern void _local_bh_enable(void);
15082extern void local_bh_enable(void);
15083extern void local_bh_enable_ip(unsigned long ip);
15084
15085
15086
15087
15088
15089
15090
15091enum
15092{
15093 HI_SOFTIRQ=0,
15094 TIMER_SOFTIRQ,
15095 NET_TX_SOFTIRQ,
15096 NET_RX_SOFTIRQ,
15097 BLOCK_SOFTIRQ,
15098 TASKLET_SOFTIRQ
15099};
15100
15101
15102
15103
15104
15105struct softirq_action
15106{
15107 void (*action)(struct softirq_action *);
15108 void *data;
15109};
15110
15111 void do_softirq(void);
15112extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data);
15113extern void softirq_init(void);
15114
15115extern void raise_softirq_irqoff(unsigned int nr);
15116extern void raise_softirq(unsigned int nr);
15117# 280 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
15118struct tasklet_struct
15119{
15120 struct tasklet_struct *next;
15121 unsigned long state;
15122 atomic_t count;
15123 void (*func)(unsigned long);
15124 unsigned long data;
15125};
15126# 296 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
15127enum
15128{
15129 TASKLET_STATE_SCHED,
15130 TASKLET_STATE_RUN
15131};
15132# 324 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
15133extern void __tasklet_schedule(struct tasklet_struct *t);
15134
15135static inline __attribute__((always_inline)) void tasklet_schedule(struct tasklet_struct *t)
15136{
15137 if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))
15138 __tasklet_schedule(t);
15139}
15140
15141extern void __tasklet_hi_schedule(struct tasklet_struct *t);
15142
15143static inline __attribute__((always_inline)) void tasklet_hi_schedule(struct tasklet_struct *t)
15144{
15145 if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))
15146 __tasklet_hi_schedule(t);
15147}
15148
15149
15150static inline __attribute__((always_inline)) void tasklet_disable_nosync(struct tasklet_struct *t)
15151{
15152 atomic_add(1,(&t->count));
15153 __asm__ __volatile__("": : :"memory");
15154}
15155
15156static inline __attribute__((always_inline)) void tasklet_disable(struct tasklet_struct *t)
15157{
15158 tasklet_disable_nosync(t);
15159 do { } while (0);
15160 __asm__ __volatile__("": : :"memory");
15161}
15162
15163static inline __attribute__((always_inline)) void tasklet_enable(struct tasklet_struct *t)
15164{
15165 __asm__ __volatile__("": : :"memory");
15166 atomic_sub(1,(&t->count));
15167}
15168
15169static inline __attribute__((always_inline)) void tasklet_hi_enable(struct tasklet_struct *t)
15170{
15171 __asm__ __volatile__("": : :"memory");
15172 atomic_sub(1,(&t->count));
15173}
15174
15175extern void tasklet_kill(struct tasklet_struct *t);
15176extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu);
15177extern void tasklet_init(struct tasklet_struct *t,
15178 void (*func)(unsigned long), unsigned long data);
15179# 413 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/interrupt.h"
15180extern unsigned long probe_irq_on(void);
15181extern int probe_irq_off(unsigned long);
15182extern unsigned int probe_irq_mask(unsigned long);
15183# 13 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/mmc.h" 2
15184
15185
15186struct request;
15187struct mmc_data;
15188struct mmc_request;
15189
15190struct mmc_command {
15191 u32 opcode;
15192 u32 arg;
15193 u32 resp[4];
15194 unsigned int flags;
15195# 54 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/mmc.h"
15196 unsigned int retries;
15197 unsigned int error;
15198# 64 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/mmc.h"
15199 struct mmc_data *data;
15200 struct mmc_request *mrq;
15201};
15202
15203struct mmc_data {
15204 unsigned int timeout_ns;
15205 unsigned int timeout_clks;
15206 unsigned int blksz;
15207 unsigned int blocks;
15208 unsigned int error;
15209 unsigned int flags;
15210
15211
15212
15213
15214
15215
15216 unsigned int bytes_xfered;
15217
15218 struct mmc_command *stop;
15219 struct mmc_request *mrq;
15220
15221 unsigned int sg_len;
15222 struct scatterlist *sg;
15223};
15224
15225struct mmc_request {
15226 struct mmc_command *cmd;
15227 struct mmc_data *data;
15228 struct mmc_command *stop;
15229
15230 void *done_data;
15231 void (*done)(struct mmc_request *);
15232};
15233
15234struct mmc_host;
15235struct mmc_card;
15236
15237extern int mmc_wait_for_req(struct mmc_host *, struct mmc_request *);
15238extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int);
15239extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int,
15240 struct mmc_command *, int);
15241
15242extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int);
15243
15244extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card);
15245
15246static inline __attribute__((always_inline)) void mmc_claim_host(struct mmc_host *host)
15247{
15248 __mmc_claim_host(host, (struct mmc_card *)-1);
15249}
15250
15251extern void mmc_release_host(struct mmc_host *host);
15252# 14 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/card.h" 2
15253
15254struct mmc_cid {
15255 unsigned int manfid;
15256 char prod_name[8];
15257 unsigned int serial;
15258 unsigned short oemid;
15259 unsigned short year;
15260 unsigned char hwrev;
15261 unsigned char fwrev;
15262 unsigned char month;
15263};
15264
15265struct mmc_csd {
15266 unsigned char mmca_vsn;
15267 unsigned short cmdclass;
15268 unsigned short tacc_clks;
15269 unsigned int tacc_ns;
15270 unsigned int r2w_factor;
15271 unsigned int max_dtr;
15272 unsigned int read_blkbits;
15273 unsigned int write_blkbits;
15274 unsigned int capacity;
15275 unsigned int read_partial:1,
15276 read_misalign:1,
15277 write_partial:1,
15278 write_misalign:1;
15279};
15280
15281struct sd_scr {
15282 unsigned char sda_vsn;
15283 unsigned char bus_widths;
15284
15285
15286};
15287
15288struct mmc_host;
15289
15290
15291
15292
15293struct mmc_card {
15294 struct list_head node;
15295 struct mmc_host *host;
15296 struct device dev;
15297 unsigned int rca;
15298 unsigned int state;
15299
15300
15301
15302
15303
15304 u32 raw_cid[4];
15305 u32 raw_csd[4];
15306 u32 raw_scr[2];
15307 struct mmc_cid cid;
15308 struct mmc_csd csd;
15309 struct sd_scr scr;
15310};
15311# 95 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/card.h"
15312struct mmc_driver {
15313 struct device_driver drv;
15314 int (*probe)(struct mmc_card *);
15315 void (*remove)(struct mmc_card *);
15316 int (*suspend)(struct mmc_card *, pm_message_t);
15317 int (*resume)(struct mmc_card *);
15318};
15319
15320extern int mmc_register_driver(struct mmc_driver *);
15321extern void mmc_unregister_driver(struct mmc_driver *);
15322
15323static inline __attribute__((always_inline)) int mmc_card_claim_host(struct mmc_card *card)
15324{
15325 return __mmc_claim_host(card->host, card);
15326}
15327# 34 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
15328# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/host.h" 1
15329# 15 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/host.h"
15330struct mmc_ios {
15331 unsigned int clock;
15332 unsigned short vdd;
15333# 44 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/host.h"
15334 unsigned char bus_mode;
15335
15336
15337
15338
15339 unsigned char chip_select;
15340
15341
15342
15343
15344
15345 unsigned char power_mode;
15346
15347
15348
15349
15350
15351 unsigned char bus_width;
15352
15353
15354
15355};
15356
15357struct mmc_host_ops {
15358 void (*request)(struct mmc_host *host, struct mmc_request *req);
15359 void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
15360 int (*get_ro)(struct mmc_host *host);
15361};
15362
15363struct mmc_card;
15364struct device;
15365
15366struct mmc_host {
15367 struct device *dev;
15368 struct class_device class_dev;
15369 int index;
15370 const struct mmc_host_ops *ops;
15371 unsigned int f_min;
15372 unsigned int f_max;
15373 u32 ocr_avail;
15374
15375 unsigned long caps;
15376
15377
15378
15379
15380
15381
15382 unsigned int max_seg_size;
15383 unsigned short max_hw_segs;
15384 unsigned short max_phys_segs;
15385 unsigned short max_sectors;
15386 unsigned short unused;
15387
15388
15389 struct mmc_ios ios;
15390 u32 ocr;
15391
15392 unsigned int mode;
15393
15394
15395
15396 struct list_head cards;
15397
15398 wait_queue_head_t wq;
15399 spinlock_t lock;
15400 struct mmc_card *card_busy;
15401 struct mmc_card *card_selected;
15402
15403 struct work_struct detect;
15404
15405 unsigned long private[0] __attribute__((__aligned__((1 << 5))));
15406};
15407
15408extern struct mmc_host *mmc_alloc_host(int extra, struct device *);
15409extern int mmc_add_host(struct mmc_host *);
15410extern void mmc_remove_host(struct mmc_host *);
15411extern void mmc_free_host(struct mmc_host *);
15412
15413static inline __attribute__((always_inline)) void *mmc_priv(struct mmc_host *host)
15414{
15415 return (void *)host->private;
15416}
15417
15418
15419
15420
15421extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
15422extern int mmc_resume_host(struct mmc_host *);
15423
15424extern void mmc_detect_change(struct mmc_host *, unsigned long delay);
15425extern void mmc_request_done(struct mmc_host *, struct mmc_request *);
15426# 35 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
15427# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/protocol.h" 1
15428# 131 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/include/linux/mmc/protocol.h"
15429struct _mmc_csd {
15430 u8 csd_structure;
15431 u8 spec_vers;
15432 u8 taac;
15433 u8 nsac;
15434 u8 tran_speed;
15435 u16 ccc;
15436 u8 read_bl_len;
15437 u8 read_bl_partial;
15438 u8 write_blk_misalign;
15439 u8 read_blk_misalign;
15440 u8 dsr_imp;
15441 u16 c_size;
15442 u8 vdd_r_curr_min;
15443 u8 vdd_r_curr_max;
15444 u8 vdd_w_curr_min;
15445 u8 vdd_w_curr_max;
15446 u8 c_size_mult;
15447 union {
15448 struct {
15449 u8 erase_grp_size;
15450 u8 erase_grp_mult;
15451 } v31;
15452 struct {
15453 u8 sector_size;
15454 u8 erase_grp_size;
15455 } v22;
15456 } erase;
15457 u8 wp_grp_size;
15458 u8 wp_grp_enable;
15459 u8 default_ecc;
15460 u8 r2w_factor;
15461 u8 write_bl_len;
15462 u8 write_bl_partial;
15463 u8 file_format_grp;
15464 u8 copy;
15465 u8 perm_write_protect;
15466 u8 tmp_write_protect;
15467 u8 file_format;
15468 u8 ecc;
15469};
15470# 36 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
15471
15472
15473
15474
15475
15476# 1 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_queue.h" 1
15477
15478
15479
15480struct request;
15481struct task_struct;
15482
15483struct mmc_queue {
15484 struct mmc_card *card;
15485 struct completion thread_complete;
15486 wait_queue_head_t thread_wq;
15487 struct semaphore thread_sem;
15488 unsigned int flags;
15489 struct request *req;
15490 int (*prep_fn)(struct mmc_queue *, struct request *);
15491 int (*issue_fn)(struct mmc_queue *, struct request *);
15492 void *data;
15493 struct request_queue *queue;
15494 struct scatterlist *sg;
15495};
15496
15497struct mmc_io_request {
15498 struct request *rq;
15499 int num;
15500 struct mmc_command selcmd;
15501 struct mmc_command cmd[4];
15502};
15503
15504extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *);
15505extern void mmc_cleanup_queue(struct mmc_queue *);
15506extern void mmc_queue_suspend(struct mmc_queue *);
15507extern void mmc_queue_resume(struct mmc_queue *);
15508# 42 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c" 2
15509
15510
15511
15512
15513
15514
15515static int major;
15516
15517
15518
15519
15520struct mmc_blk_data {
15521 spinlock_t lock;
15522 struct gendisk *disk;
15523 struct mmc_queue queue;
15524
15525 unsigned int usage;
15526 unsigned int block_bits;
15527 unsigned int read_only;
15528};
15529
15530static struct mutex open_lock = { .count = ( (atomic_t) { (1) } ) , .wait_lock = (spinlock_t) { .raw_lock = { }, } , .wait_list = { &(open_lock.wait_list), &(open_lock.wait_list) } };
15531
15532static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
15533{
15534 struct mmc_blk_data *md;
15535
15536 mutex_lock(&open_lock);
15537 md = disk->private_data;
15538 if (md && md->usage == 0)
15539 md = ((void *)0);
15540 if (md)
15541 md->usage++;
15542 mutex_unlock(&open_lock);
15543
15544 return md;
15545}
15546
15547static void mmc_blk_put(struct mmc_blk_data *md)
15548{
15549 mutex_lock(&open_lock);
15550 md->usage--;
15551 if (md->usage == 0) {
15552 put_disk(md->disk);
15553 mmc_cleanup_queue(&md->queue);
15554 kfree(md);
15555 }
15556 mutex_unlock(&open_lock);
15557}
15558
15559static int mmc_blk_open(struct inode *inode, struct file *filp)
15560{
15561 struct mmc_blk_data *md;
15562 int ret = -6;
15563
15564 md = mmc_blk_get(inode->i_bdev->bd_disk);
15565 if (md) {
15566 if (md->usage == 2)
15567 check_disk_change(inode->i_bdev);
15568 ret = 0;
15569
15570 if ((filp->f_mode & 2) && md->read_only)
15571 ret = -30;
15572 }
15573
15574 return ret;
15575}
15576
15577static int mmc_blk_release(struct inode *inode, struct file *filp)
15578{
15579 struct mmc_blk_data *md = inode->i_bdev->bd_disk->private_data;
15580
15581 mmc_blk_put(md);
15582 return 0;
15583}
15584
15585static int
15586mmc_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
15587{
15588 geo->cylinders = get_capacity(bdev->bd_disk) / (4 * 16);
15589 geo->heads = 4;
15590 geo->sectors = 16;
15591 return 0;
15592}
15593
15594static struct block_device_operations mmc_bdops = {
15595 .open = mmc_blk_open,
15596 .release = mmc_blk_release,
15597 .getgeo = mmc_blk_getgeo,
15598 .owner = ((struct module *)0),
15599};
15600
15601struct mmc_blk_request {
15602 struct mmc_request mrq;
15603 struct mmc_command cmd;
15604 struct mmc_command stop;
15605 struct mmc_data data;
15606};
15607
15608static int mmc_blk_prep_rq(struct mmc_queue *mq, struct request *req)
15609{
15610 struct mmc_blk_data *md = mq->data;
15611 int stat = 0;
15612
15613
15614
15615
15616 if (!md || !mq->card) {
15617 printk("<3>" "%s: killing request - no device/host\n",
15618 req->rq_disk->disk_name);
15619 stat = 1;
15620 }
15621
15622 return stat;
15623}
15624
15625static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
15626{
15627 int err;
15628 u32 blocks;
15629
15630 struct mmc_request mrq;
15631 struct mmc_command cmd;
15632 struct mmc_data data;
15633 unsigned int timeout_us;
15634
15635 struct scatterlist sg;
15636
15637 memset(&cmd, 0, sizeof(struct mmc_command));
15638
15639 cmd.opcode = 55;
15640 cmd.arg = card->rca << 16;
15641 cmd.flags = ((1 << 0)|(1 << 2)|(1 << 4)) | (0 << 5);
15642
15643 err = mmc_wait_for_cmd(card->host, &cmd, 0);
15644 if ((err != 0) || !(cmd.resp[0] & (1 << 5)))
15645 return (u32)-1;
15646
15647 memset(&cmd, 0, sizeof(struct mmc_command));
15648
15649 cmd.opcode = 22;
15650 cmd.arg = 0;
15651 cmd.flags = ((1 << 0)|(1 << 2)|(1 << 4)) | (1 << 5);
15652
15653 memset(&data, 0, sizeof(struct mmc_data));
15654
15655 data.timeout_ns = card->csd.tacc_ns * 100;
15656 data.timeout_clks = card->csd.tacc_clks * 100;
15657
15658 timeout_us = data.timeout_ns / 1000;
15659 timeout_us += data.timeout_clks * 1000 /
15660 (card->host->ios.clock / 1000);
15661
15662 if (timeout_us > 100000) {
15663 data.timeout_ns = 100000000;
15664 data.timeout_clks = 0;
15665 }
15666
15667 data.blksz = 4;
15668 data.blocks = 1;
15669 data.flags = (1 << 9);
15670 data.sg = &sg;
15671 data.sg_len = 1;
15672
15673 memset(&mrq, 0, sizeof(struct mmc_request));
15674
15675 mrq.cmd = &cmd;
15676 mrq.data = &data;
15677
15678 sg_init_one(&sg, &blocks, 4);
15679
15680 mmc_wait_for_req(card->host, &mrq);
15681
15682 if (cmd.error != 0 || data.error != 0)
15683 return (u32)-1;
15684
15685 blocks = (__builtin_constant_p((__u32)(( __u32)(__be32)(blocks))) ? ({ __u32 __x = ((( __u32)(__be32)(blocks))); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }) : __fswab32((( __u32)(__be32)(blocks))));
15686
15687 return blocks;
15688}
15689
15690static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
15691{
15692 struct mmc_blk_data *md = mq->data;
15693 struct mmc_card *card = md->queue.card;
15694 struct mmc_blk_request brq;
15695 int ret;
15696
15697 if (mmc_card_claim_host(card))
15698 goto cmd_err;
15699
15700 do {
15701 struct mmc_command cmd;
15702 u32 readcmd, writecmd;
15703
15704 memset(&brq, 0, sizeof(struct mmc_blk_request));
15705 brq.mrq.cmd = &brq.cmd;
15706 brq.mrq.data = &brq.data;
15707
15708 brq.cmd.arg = req->sector << 9;
15709 brq.cmd.flags = ((1 << 0)|(1 << 2)|(1 << 4)) | (1 << 5);
15710 brq.data.blksz = 1 << md->block_bits;
15711 brq.data.blocks = req->nr_sectors >> (md->block_bits - 9);
15712 brq.stop.opcode = 12;
15713 brq.stop.arg = 0;
15714 brq.stop.flags = ((1 << 0)|(1 << 2)|(1 << 4)|(1 << 3)) | (0 << 5);
15715
15716 mmc_set_data_timeout(&brq.data, card, ((req)->cmd_flags & 1) != 0);
15717
15718
15719
15720
15721
15722
15723
15724 if (((req)->cmd_flags & 1) != 0 &&
15725 !(card->host->caps & (1 << 1)) &&
15726 !((card)->state & (1<<3)))
15727 brq.data.blocks = 1;
15728
15729 if (brq.data.blocks > 1) {
15730 brq.data.flags |= (1 << 11);
15731 brq.mrq.stop = &brq.stop;
15732 readcmd = 18;
15733 writecmd = 25;
15734 } else {
15735 brq.mrq.stop = ((void *)0);
15736 readcmd = 17;
15737 writecmd = 24;
15738 }
15739
15740 if (((req)->cmd_flags & 1) == 0) {
15741 brq.cmd.opcode = readcmd;
15742 brq.data.flags |= (1 << 9);
15743 } else {
15744 brq.cmd.opcode = writecmd;
15745 brq.data.flags |= (1 << 8);
15746 }
15747
15748 brq.data.sg = mq->sg;
15749 brq.data.sg_len = blk_rq_map_sg(req->q, req, brq.data.sg);
15750
15751 mmc_wait_for_req(card->host, &brq.mrq);
15752 if (brq.cmd.error) {
15753 printk("<3>" "%s: error %d sending read/write command\n",
15754 req->rq_disk->disk_name, brq.cmd.error);
15755 goto cmd_err;
15756 }
15757
15758 if (brq.data.error) {
15759 printk("<3>" "%s: error %d transferring data\n",
15760 req->rq_disk->disk_name, brq.data.error);
15761 goto cmd_err;
15762 }
15763
15764 if (brq.stop.error) {
15765 printk("<3>" "%s: error %d sending stop command\n",
15766 req->rq_disk->disk_name, brq.stop.error);
15767 goto cmd_err;
15768 }
15769
15770 if (((req)->cmd_flags & 1) != 0) {
15771 do {
15772 int err;
15773
15774 cmd.opcode = 13;
15775 cmd.arg = card->rca << 16;
15776 cmd.flags = ((1 << 0)|(1 << 2)|(1 << 4)) | (0 << 5);
15777 err = mmc_wait_for_cmd(card->host, &cmd, 5);
15778 if (err) {
15779 printk("<3>" "%s: error %d requesting status\n",
15780 req->rq_disk->disk_name, err);
15781 goto cmd_err;
15782 }
15783 } while (!(cmd.resp[0] & (1 << 8)));
15784# 325 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c"
15785 }
15786
15787
15788
15789
15790 do { local_irq_disable(); do { do { } while (0); (void)0; (void)(&md->lock); } while (0); } while (0);
15791 ret = end_that_request_chunk(req, 1, brq.data.bytes_xfered);
15792 if (!ret) {
15793
15794
15795
15796 add_disk_randomness(req->rq_disk);
15797 blkdev_dequeue_request(req);
15798 end_that_request_last(req, 1);
15799 }
15800 do { local_irq_enable(); do { do { } while (0); (void)0; (void)(&md->lock); } while (0); } while (0);
15801 } while (ret);
15802
15803 mmc_release_host((card)->host);
15804
15805 return 1;
15806
15807 cmd_err:
15808 ret = 1;
15809# 360 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c"
15810 if (((req)->cmd_flags & 1) != 0 && ((card)->state & (1<<3))) {
15811 u32 blocks;
15812 unsigned int bytes;
15813
15814 blocks = mmc_sd_num_wr_blocks(card);
15815 if (blocks != (u32)-1) {
15816 if (card->csd.write_partial)
15817 bytes = blocks << md->block_bits;
15818 else
15819 bytes = blocks << 9;
15820 do { local_irq_disable(); do { do { } while (0); (void)0; (void)(&md->lock); } while (0); } while (0);
15821 ret = end_that_request_chunk(req, 1, bytes);
15822 do { local_irq_enable(); do { do { } while (0); (void)0; (void)(&md->lock); } while (0); } while (0);
15823 }
15824 } else if (((req)->cmd_flags & 1) != 0 &&
15825 (card->host->caps & (1 << 1))) {
15826 do { local_irq_disable(); do { do { } while (0); (void)0; (void)(&md->lock); } while (0); } while (0);
15827 ret = end_that_request_chunk(req, 1, brq.data.bytes_xfered);
15828 do { local_irq_enable(); do { do { } while (0); (void)0; (void)(&md->lock); } while (0); } while (0);
15829 }
15830
15831 mmc_release_host((card)->host);
15832
15833 do { local_irq_disable(); do { do { } while (0); (void)0; (void)(&md->lock); } while (0); } while (0);
15834 while (ret) {
15835 ret = end_that_request_chunk(req, 0,
15836 req->current_nr_sectors << 9);
15837 }
15838
15839 add_disk_randomness(req->rq_disk);
15840 blkdev_dequeue_request(req);
15841 end_that_request_last(req, 0);
15842 do { local_irq_enable(); do { do { } while (0); (void)0; (void)(&md->lock); } while (0); } while (0);
15843
15844 return 0;
15845}
15846
15847
15848
15849static unsigned long dev_use[(256 >> 3)/(8*sizeof(unsigned long))];
15850
15851static inline __attribute__((always_inline)) int mmc_blk_readonly(struct mmc_card *card)
15852{
15853 return ((card)->state & (1<<4)) ||
15854 !(card->csd.cmdclass & (1<<4));
15855}
15856
15857static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
15858{
15859 struct mmc_blk_data *md;
15860 int devidx, ret;
15861
15862 devidx = find_next_zero_bit((dev_use), ((256 >> 3)), 0);
15863 if (devidx >= (256 >> 3))
15864 return ERR_PTR(-28);
15865 __set_bit(devidx, dev_use);
15866
15867 md = kmalloc(sizeof(struct mmc_blk_data), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)));
15868 if (!md) {
15869 ret = -12;
15870 goto out;
15871 }
15872
15873 memset(md, 0, sizeof(struct mmc_blk_data));
15874
15875
15876
15877
15878
15879 md->read_only = mmc_blk_readonly(card);
15880
15881
15882
15883
15884
15885
15886 md->block_bits = 9;
15887
15888 md->disk = alloc_disk(1 << 3);
15889 if (md->disk == ((void *)0)) {
15890 ret = -12;
15891 goto err_kfree;
15892 }
15893
15894 do { *(&md->lock) = (spinlock_t) { .raw_lock = { }, }; } while (0);
15895 md->usage = 1;
15896
15897 ret = mmc_init_queue(&md->queue, card, &md->lock);
15898 if (ret)
15899 goto err_putdisk;
15900
15901 md->queue.prep_fn = mmc_blk_prep_rq;
15902 md->queue.issue_fn = mmc_blk_issue_rq;
15903 md->queue.data = md;
15904
15905 md->disk->major = major;
15906 md->disk->first_minor = devidx << 3;
15907 md->disk->fops = &mmc_bdops;
15908 md->disk->private_data = md;
15909 md->disk->queue = md->queue.queue;
15910 md->disk->driverfs_dev = &card->dev;
15911# 474 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c"
15912 sprintf(md->disk->disk_name, "mmcblk%d", devidx);
15913
15914 blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits);
15915
15916
15917
15918
15919
15920 set_capacity(md->disk, card->csd.capacity << (card->csd.read_blkbits - 9));
15921 return md;
15922
15923 err_putdisk:
15924 put_disk(md->disk);
15925 err_kfree:
15926 kfree(md);
15927 out:
15928 return ERR_PTR(ret);
15929}
15930
15931static int
15932mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card)
15933{
15934 struct mmc_command cmd;
15935 int err;
15936
15937 mmc_card_claim_host(card);
15938 cmd.opcode = 16;
15939 cmd.arg = 1 << md->block_bits;
15940 cmd.flags = ((1 << 0)|(1 << 2)|(1 << 4)) | (0 << 5);
15941 err = mmc_wait_for_cmd(card->host, &cmd, 5);
15942 mmc_release_host((card)->host);
15943
15944 if (err) {
15945 printk("<3>" "%s: unable to set block size to %d: %d\n",
15946 md->disk->disk_name, cmd.arg, err);
15947 return -22;
15948 }
15949
15950 return 0;
15951}
15952
15953static int mmc_blk_probe(struct mmc_card *card)
15954{
15955 struct mmc_blk_data *md;
15956 int err;
15957
15958
15959
15960
15961 if (!(card->csd.cmdclass & (1<<2)))
15962 return -19;
15963
15964 md = mmc_blk_alloc(card);
15965 if (IS_ERR(md))
15966 return PTR_ERR(md);
15967
15968 err = mmc_blk_set_blksize(md, card);
15969 if (err)
15970 goto out;
15971
15972 printk("<6>" "%s: %s %s %lluKiB %s\n",
15973 md->disk->disk_name, ((card)->dev.bus_id), ((card)->cid.prod_name),
15974 (unsigned long long)(get_capacity(md->disk) >> 1),
15975 md->read_only ? "(ro)" : "");
15976
15977 dev_set_drvdata(&(card)->dev, md);
15978 add_disk(md->disk);
15979 return 0;
15980
15981 out:
15982 mmc_blk_put(md);
15983
15984 return err;
15985}
15986
15987static void mmc_blk_remove(struct mmc_card *card)
15988{
15989 struct mmc_blk_data *md = dev_get_drvdata(&(card)->dev);
15990
15991 if (md) {
15992 int devidx;
15993
15994 del_gendisk(md->disk);
15995
15996
15997
15998
15999 md->disk->queue = ((void *)0);
16000
16001 devidx = md->disk->first_minor >> 3;
16002 __clear_bit(devidx, dev_use);
16003
16004 mmc_blk_put(md);
16005 }
16006 dev_set_drvdata(&(card)->dev, ((void *)0));
16007}
16008# 597 "/mnt/data/_home/mano/linuxsh/kernel/linux-2.6.19-rc2-work/drivers/mmc/mmc_block.c"
16009static struct mmc_driver mmc_driver = {
16010 .drv = {
16011 .name = "mmcblk",
16012 },
16013 .probe = mmc_blk_probe,
16014 .remove = mmc_blk_remove,
16015 .suspend = ((void *)0),
16016 .resume = ((void *)0),
16017};
16018
16019static int __attribute__ ((__section__ (".init.text"))) mmc_blk_init(void)
16020{
16021 int res = -12;
16022
16023 res = register_blkdev(major, "mmc");
16024 if (res < 0) {
16025 printk("<4>" "Unable to get major %d for MMC media: %d\n",
16026 major, res);
16027 goto out;
16028 }
16029 if (major == 0)
16030 major = res;
16031
16032 return mmc_register_driver(&mmc_driver);
16033
16034 out:
16035 return res;
16036}
16037
16038static void __attribute__((__used__)) __attribute__ ((__section__(".exit.text"))) mmc_blk_exit(void)
16039{
16040 mmc_unregister_driver(&mmc_driver);
16041 unregister_blkdev(major, "mmc");
16042}
16043
16044static initcall_t __initcall_mmc_blk_init __attribute__((__used__)) __attribute__((__section__(".initcall" "6" ".init"))) = mmc_blk_init;;
16045static exitcall_t __exitcall_mmc_blk_exit __attribute__((__used__)) __attribute__ ((__section__ (".exitcall.exit"))) = mmc_blk_exit;;
16046
16047;
16048;
16049
16050static inline __attribute__((always_inline)) int *__check_major(void) { return(&(major)); }; static char __param_str_major[] = "mmc_block" "." "major"; static struct kernel_param const __param_major __attribute__((__used__)) __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) = { __param_str_major, 0444, param_set_int, param_get_int, &major }; ;
16051;