1 // /usr/libexec/gcc/arm-unknown-linux-gnu/4.1.1/cc1 -quiet -nostdinc -Iinclude -D__KERNEL__ -D__LINUX_ARM_ARCH__=5 -Uarm -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(dev) -DKBUILD_MODNAME=KBUILD_STR(dev) -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.1.1/include -include include/linux/autoconf.h -MD arch/arm/mach-iop13xx/imu/.dev.o.d arch/arm/mach-iop13xx/imu/dev.c -quiet -dumpbase dev.c -mlittle-endian -mapcs -mno-sched-prolog -mabi=apcs-gnu -mno-thumb-interwork -march=armv5te -mtune=xscale -msoft-float -auxbase-strip arch/arm/mach-iop13xx/imu/dev.o -Os -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-aliasing -fno-common -fno-omit-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-protector -o - -frandom-seed=0
2 # 1 "arch/arm/mach-iop13xx/imu/dev.c"
5 # 1 "./include/linux/autoconf.h" 1
7 # 1 "arch/arm/mach-iop13xx/imu/dev.c"
8 # 25 "arch/arm/mach-iop13xx/imu/dev.c"
9 # 1 "include/linux/module.h" 1
10 # 9 "include/linux/module.h"
11 # 1 "include/linux/sched.h" 1
15 # 1 "include/linux/auxvec.h" 1
19 # 1 "include/asm/auxvec.h" 1
20 # 5 "include/linux/auxvec.h" 2
21 # 5 "include/linux/sched.h" 2
22 # 38 "include/linux/sched.h"
27 # 1 "include/asm/param.h" 1
28 # 43 "include/linux/sched.h" 2
30 # 1 "include/linux/capability.h" 1
31 # 16 "include/linux/capability.h"
32 # 1 "include/linux/types.h" 1
33 # 14 "include/linux/types.h"
34 # 1 "include/linux/posix_types.h" 1
38 # 1 "include/linux/stddef.h" 1
42 # 1 "include/linux/compiler.h" 1
43 # 42 "include/linux/compiler.h"
44 # 1 "include/linux/compiler-gcc4.h" 1
48 # 1 "include/linux/compiler-gcc.h" 1
49 # 5 "include/linux/compiler-gcc4.h" 2
50 # 43 "include/linux/compiler.h" 2
51 # 5 "include/linux/stddef.h" 2
52 # 5 "include/linux/posix_types.h" 2
53 # 36 "include/linux/posix_types.h"
55 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
59 typedef void (*__kernel_sighandler_t)(int);
62 typedef int __kernel_key_t;
63 typedef int __kernel_mqd_t;
65 # 1 "include/asm/posix_types.h" 1
66 # 22 "include/asm/posix_types.h"
67 typedef unsigned long __kernel_ino_t;
68 typedef unsigned short __kernel_mode_t;
69 typedef unsigned short __kernel_nlink_t;
70 typedef long __kernel_off_t;
71 typedef int __kernel_pid_t;
72 typedef unsigned short __kernel_ipc_pid_t;
73 typedef unsigned short __kernel_uid_t;
74 typedef unsigned short __kernel_gid_t;
75 typedef unsigned int __kernel_size_t;
76 typedef int __kernel_ssize_t;
77 typedef int __kernel_ptrdiff_t;
78 typedef long __kernel_time_t;
79 typedef long __kernel_suseconds_t;
80 typedef long __kernel_clock_t;
81 typedef int __kernel_timer_t;
82 typedef int __kernel_clockid_t;
83 typedef int __kernel_daddr_t;
84 typedef char * __kernel_caddr_t;
85 typedef unsigned short __kernel_uid16_t;
86 typedef unsigned short __kernel_gid16_t;
87 typedef unsigned int __kernel_uid32_t;
88 typedef unsigned int __kernel_gid32_t;
90 typedef unsigned short __kernel_old_uid_t;
91 typedef unsigned short __kernel_old_gid_t;
92 typedef unsigned short __kernel_old_dev_t;
95 typedef long long __kernel_loff_t;
105 # 48 "include/linux/posix_types.h" 2
106 # 15 "include/linux/types.h" 2
107 # 1 "include/asm/types.h" 1
113 typedef unsigned short umode_t;
120 typedef __signed__ char __s8;
121 typedef unsigned char __u8;
123 typedef __signed__ short __s16;
124 typedef unsigned short __u16;
126 typedef __signed__ int __s32;
127 typedef unsigned int __u32;
130 typedef __signed__ long long __s64;
131 typedef unsigned long long __u64;
132 # 38 "include/asm/types.h"
133 typedef signed char s8;
134 typedef unsigned char u8;
136 typedef signed short s16;
137 typedef unsigned short u16;
139 typedef signed int s32;
140 typedef unsigned int u32;
142 typedef signed long long s64;
143 typedef unsigned long long u64;
147 typedef u32 dma_addr_t;
148 typedef u32 dma64_addr_t;
149 # 16 "include/linux/types.h" 2
153 typedef __u32 __kernel_dev_t;
155 typedef __kernel_fd_set fd_set;
156 typedef __kernel_dev_t dev_t;
157 typedef __kernel_ino_t ino_t;
158 typedef __kernel_mode_t mode_t;
159 typedef __kernel_nlink_t nlink_t;
160 typedef __kernel_off_t off_t;
161 typedef __kernel_pid_t pid_t;
162 typedef __kernel_daddr_t daddr_t;
163 typedef __kernel_key_t key_t;
164 typedef __kernel_suseconds_t suseconds_t;
165 typedef __kernel_timer_t timer_t;
166 typedef __kernel_clockid_t clockid_t;
167 typedef __kernel_mqd_t mqd_t;
170 typedef __kernel_uid32_t uid_t;
171 typedef __kernel_gid32_t gid_t;
172 typedef __kernel_uid16_t uid16_t;
173 typedef __kernel_gid16_t gid16_t;
177 typedef __kernel_old_uid_t old_uid_t;
178 typedef __kernel_old_gid_t old_gid_t;
179 # 56 "include/linux/types.h"
180 typedef __kernel_loff_t loff_t;
181 # 65 "include/linux/types.h"
182 typedef __kernel_size_t size_t;
187 typedef __kernel_ssize_t ssize_t;
192 typedef __kernel_ptrdiff_t ptrdiff_t;
197 typedef __kernel_time_t time_t;
202 typedef __kernel_clock_t clock_t;
207 typedef __kernel_caddr_t caddr_t;
211 typedef unsigned char u_char;
212 typedef unsigned short u_short;
213 typedef unsigned int u_int;
214 typedef unsigned long u_long;
217 typedef unsigned char unchar;
218 typedef unsigned short ushort;
219 typedef unsigned int uint;
220 typedef unsigned long ulong;
225 typedef __u8 u_int8_t;
227 typedef __u16 u_int16_t;
228 typedef __s16 int16_t;
229 typedef __u32 u_int32_t;
230 typedef __s32 int32_t;
234 typedef __u8 uint8_t;
235 typedef __u16 uint16_t;
236 typedef __u32 uint32_t;
239 typedef __u64 uint64_t;
240 typedef __u64 u_int64_t;
241 typedef __s64 int64_t;
242 # 136 "include/linux/types.h"
243 typedef unsigned long sector_t;
247 typedef unsigned long blkcnt_t;
248 # 169 "include/linux/types.h"
249 typedef __u16 __le16;
250 typedef __u16 __be16;
251 typedef __u32 __le32;
252 typedef __u32 __be32;
254 typedef __u64 __le64;
255 typedef __u64 __be64;
259 typedef unsigned gfp_t;
264 typedef u32 resource_size_t;
270 __kernel_daddr_t f_tfree;
271 __kernel_ino_t f_tinode;
275 # 17 "include/linux/capability.h" 2
276 # 32 "include/linux/capability.h"
277 typedef struct __user_cap_header_struct {
280 } *cap_user_header_t;
282 typedef struct __user_cap_data_struct {
290 # 1 "include/linux/spinlock.h" 1
291 # 49 "include/linux/spinlock.h"
292 # 1 "include/linux/preempt.h" 1
293 # 9 "include/linux/preempt.h"
294 # 1 "include/linux/thread_info.h" 1
295 # 13 "include/linux/thread_info.h"
296 struct restart_block {
297 long (*fn)(struct restart_block *);
298 unsigned long arg0, arg1, arg2, arg3;
301 extern long do_no_restart_syscall(struct restart_block *parm);
303 # 1 "include/linux/bitops.h" 1
304 # 9 "include/linux/bitops.h"
305 # 1 "include/asm/bitops.h" 1
306 # 23 "include/asm/bitops.h"
307 # 1 "include/asm/system.h" 1
308 # 71 "include/asm/system.h"
309 # 1 "include/linux/linkage.h" 1
313 # 1 "include/asm/linkage.h" 1
314 # 5 "include/linux/linkage.h" 2
315 # 72 "include/asm/system.h" 2
321 extern unsigned int system_rev;
322 extern unsigned int system_serial_low;
323 extern unsigned int system_serial_high;
324 extern unsigned int mem_fclk_21285;
328 void die(const char *msg, struct pt_regs *regs, int err)
329 __attribute__((noreturn));
332 void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info,
333 unsigned long err, unsigned long trap);
335 void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
337 int sig, const char *name);
344 extern void __backtrace(void);
345 extern void c_backtrace(unsigned long fp, int pmode);
348 extern void show_pte(struct mm_struct *mm, unsigned long addr);
349 extern void __show_regs(struct pt_regs *);
351 extern int cpu_architecture(void);
352 extern void cpu_init(void);
354 void arm_machine_restart(char mode);
355 extern void (*arm_pm_restart)(char str);
356 # 121 "include/asm/system.h"
357 static inline __attribute__((always_inline)) int cpu_is_xsc3(void)
359 extern unsigned int processor_id;
361 if ((processor_id & 0xffffe000) == 0x69056000)
366 # 152 "include/asm/system.h"
367 extern unsigned long cr_no_alignment;
368 extern unsigned long cr_alignment;
376 extern unsigned int user_debug;
377 # 193 "include/asm/system.h"
378 extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *);
379 # 206 "include/asm/system.h"
380 static inline __attribute__((always_inline)) void sched_cacheflush(void)
383 # 370 "include/asm/system.h"
384 static inline __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
386 extern void __bad_xchg(volatile void *, int);
396 # 421 "include/asm/system.h"
398 asm volatile("@ __xchg1\n"
405 asm volatile("@ __xchg4\n"
413 __bad_xchg(ptr, size), ret = 0;
420 extern void disable_hlt(void);
421 extern void enable_hlt(void);
422 # 24 "include/asm/bitops.h" 2
423 # 33 "include/asm/bitops.h"
424 static inline __attribute__((always_inline)) void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p)
427 unsigned long mask = 1UL << (bit & 31);
431 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
433 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
436 static inline __attribute__((always_inline)) void ____atomic_clear_bit(unsigned int bit, volatile unsigned long *p)
439 unsigned long mask = 1UL << (bit & 31);
443 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
445 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
448 static inline __attribute__((always_inline)) void ____atomic_change_bit(unsigned int bit, volatile unsigned long *p)
451 unsigned long mask = 1UL << (bit & 31);
455 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
457 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
460 static inline __attribute__((always_inline)) int
461 ____atomic_test_and_set_bit(unsigned int bit, volatile unsigned long *p)
465 unsigned long mask = 1UL << (bit & 31);
469 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
472 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
477 static inline __attribute__((always_inline)) int
478 ____atomic_test_and_clear_bit(unsigned int bit, volatile unsigned long *p)
482 unsigned long mask = 1UL << (bit & 31);
486 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
489 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
494 static inline __attribute__((always_inline)) int
495 ____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p)
499 unsigned long mask = 1UL << (bit & 31);
503 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
506 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
511 # 1 "include/asm-generic/bitops/non-atomic.h" 1
512 # 18 "include/asm-generic/bitops/non-atomic.h"
513 static inline __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long *addr)
515 unsigned long mask = (1UL << ((nr) % 32));
516 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
521 static inline __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *addr)
523 unsigned long mask = (1UL << ((nr) % 32));
524 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
528 # 43 "include/asm-generic/bitops/non-atomic.h"
529 static inline __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *addr)
531 unsigned long mask = (1UL << ((nr) % 32));
532 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
536 # 60 "include/asm-generic/bitops/non-atomic.h"
537 static inline __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long *addr)
539 unsigned long mask = (1UL << ((nr) % 32));
540 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
541 unsigned long old = *p;
544 return (old & mask) != 0;
546 # 79 "include/asm-generic/bitops/non-atomic.h"
547 static inline __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *addr)
549 unsigned long mask = (1UL << ((nr) % 32));
550 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
551 unsigned long old = *p;
554 return (old & mask) != 0;
558 static inline __attribute__((always_inline)) int __test_and_change_bit(int nr,
559 volatile unsigned long *addr)
561 unsigned long mask = (1UL << ((nr) % 32));
562 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
563 unsigned long old = *p;
566 return (old & mask) != 0;
574 static inline __attribute__((always_inline)) int test_bit(int nr, const volatile unsigned long *addr)
576 return 1UL & (addr[((nr) / 32)] >> (nr & (32 -1)));
578 # 121 "include/asm/bitops.h" 2
579 # 150 "include/asm/bitops.h"
580 extern void _set_bit_le(int nr, volatile unsigned long * p);
581 extern void _clear_bit_le(int nr, volatile unsigned long * p);
582 extern void _change_bit_le(int nr, volatile unsigned long * p);
583 extern int _test_and_set_bit_le(int nr, volatile unsigned long * p);
584 extern int _test_and_clear_bit_le(int nr, volatile unsigned long * p);
585 extern int _test_and_change_bit_le(int nr, volatile unsigned long * p);
586 extern int _find_first_zero_bit_le(const void * p, unsigned size);
587 extern int _find_next_zero_bit_le(const void * p, int size, int offset);
588 extern int _find_first_bit_le(const unsigned long *p, unsigned size);
589 extern int _find_next_bit_le(const unsigned long *p, int size, int offset);
594 extern void _set_bit_be(int nr, volatile unsigned long * p);
595 extern void _clear_bit_be(int nr, volatile unsigned long * p);
596 extern void _change_bit_be(int nr, volatile unsigned long * p);
597 extern int _test_and_set_bit_be(int nr, volatile unsigned long * p);
598 extern int _test_and_clear_bit_be(int nr, volatile unsigned long * p);
599 extern int _test_and_change_bit_be(int nr, volatile unsigned long * p);
600 extern int _find_first_zero_bit_be(const void * p, unsigned size);
601 extern int _find_next_zero_bit_be(const void * p, int size, int offset);
602 extern int _find_first_bit_be(const unsigned long *p, unsigned size);
603 extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
604 # 242 "include/asm/bitops.h"
605 static inline __attribute__((always_inline)) int constant_fls(int x)
611 if (!(x & 0xffff0000u)) {
615 if (!(x & 0xff000000u)) {
619 if (!(x & 0xf0000000u)) {
623 if (!(x & 0xc0000000u)) {
627 if (!(x & 0x80000000u)) {
633 # 285 "include/asm/bitops.h"
634 # 1 "include/asm-generic/bitops/fls64.h" 1
640 static inline __attribute__((always_inline)) int fls64(__u64 x)
644 return ( __builtin_constant_p(h) ? constant_fls(h) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(h) : "cc"); 32-__r; }) ) + 32;
645 return ( __builtin_constant_p(x) ? constant_fls(x) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) );
647 # 286 "include/asm/bitops.h" 2
649 # 1 "include/asm-generic/bitops/sched.h" 1
650 # 13 "include/asm-generic/bitops/sched.h"
651 static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b)
660 if (__builtin_expect(!!(b[0]), 0))
661 return (({ unsigned long __t = (b[0]); ( __builtin_constant_p(__t & -__t) ? constant_fls(__t & -__t) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(__t & -__t) : "cc"); 32-__r; }) ); }) - 1);
662 if (__builtin_expect(!!(b[1]), 0))
663 return (({ unsigned long __t = (b[1]); ( __builtin_constant_p(__t & -__t) ? constant_fls(__t & -__t) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(__t & -__t) : "cc"); 32-__r; }) ); }) - 1) + 32;
664 if (__builtin_expect(!!(b[2]), 0))
665 return (({ unsigned long __t = (b[2]); ( __builtin_constant_p(__t & -__t) ? constant_fls(__t & -__t) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(__t & -__t) : "cc"); 32-__r; }) ); }) - 1) + 64;
667 return (({ unsigned long __t = (b[3]); ( __builtin_constant_p(__t & -__t) ? constant_fls(__t & -__t) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(__t & -__t) : "cc"); 32-__r; }) ); }) - 1) + 96;
668 return (({ unsigned long __t = (b[4]); ( __builtin_constant_p(__t & -__t) ? constant_fls(__t & -__t) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(__t & -__t) : "cc"); 32-__r; }) ); }) - 1) + 128;
673 # 288 "include/asm/bitops.h" 2
674 # 1 "include/asm-generic/bitops/hweight.h" 1
680 extern unsigned int hweight32(unsigned int w);
681 extern unsigned int hweight16(unsigned int w);
682 extern unsigned int hweight8(unsigned int w);
683 extern unsigned long hweight64(__u64 w);
684 # 289 "include/asm/bitops.h" 2
685 # 10 "include/linux/bitops.h" 2
687 static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count)
691 order = ( __builtin_constant_p(count) ? constant_fls(count) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(count) : "cc"); 32-__r; }) );
695 static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count)
699 order = ( __builtin_constant_p(count) ? constant_fls(count) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(count) : "cc"); 32-__r; }) ) - 1;
700 if (count & (count - 1))
705 static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
707 return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
716 static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift)
718 return (word << shift) | (word >> (32 - shift));
727 static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift)
729 return (word >> shift) | (word << (32 - shift));
732 static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l)
735 return ( __builtin_constant_p(l) ? constant_fls(l) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(l) : "cc"); 32-__r; }) );
738 # 21 "include/linux/thread_info.h" 2
739 # 1 "include/asm/thread_info.h" 1
740 # 16 "include/asm/thread_info.h"
741 # 1 "include/asm/fpstate.h" 1
742 # 26 "include/asm/fpstate.h"
743 struct vfp_hard_struct {
758 struct vfp_hard_struct hard;
761 extern void vfp_flush_thread(union vfp_state *);
762 extern void vfp_release_thread(union vfp_state *);
766 struct fp_hard_struct {
767 unsigned int save[35];
772 struct fp_soft_struct {
773 unsigned int save[35];
778 struct iwmmxt_struct {
779 unsigned int save[0x98 / sizeof(unsigned int)];
783 struct fp_hard_struct hard;
784 struct fp_soft_struct soft;
792 struct crunch_state {
793 unsigned int mvdx[16][2];
794 unsigned int mvax[4][3];
795 unsigned int dspsc[2];
797 # 17 "include/asm/thread_info.h" 2
808 # 1 "include/asm/ptrace.h" 1
809 # 75 "include/asm/ptrace.h"
813 # 125 "include/asm/ptrace.h"
814 static inline __attribute__((always_inline)) int valid_user_regs(struct pt_regs *regs)
816 if ((((regs)->uregs[16] & 0xf) == 0) &&
817 (regs->uregs[16] & (0x00000040|0x00000080)) == 0)
823 regs->uregs[16] &= 0xff000000 | 0x00ff0000 | 0x0000ff00 | 0x00000020 | 0x00000010;
827 # 28 "include/asm/thread_info.h" 2
829 # 1 "include/asm/domain.h" 1
830 # 30 "include/asm/thread_info.h" 2
832 typedef unsigned long mm_segment_t;
834 struct cpu_context_save {
855 mm_segment_t addr_limit;
856 struct task_struct *task;
857 struct exec_domain *exec_domain;
860 struct cpu_context_save cpu_context;
862 unsigned long tp_value;
863 struct crunch_state crunchstate;
864 union fp_state fpstate __attribute__((aligned(8)));
865 union vfp_state vfpstate;
866 struct restart_block restart_block;
868 # 89 "include/asm/thread_info.h"
869 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void) __attribute__((__const__));
871 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
873 register unsigned long sp asm ("sp");
874 return (struct thread_info *)(sp & ~(8192 - 1));
877 extern struct thread_info *alloc_thread_info(struct task_struct *task);
878 extern void free_thread_info(struct thread_info *);
885 extern void crunch_task_disable(struct thread_info *);
886 extern void crunch_task_copy(struct thread_info *, void *);
887 extern void crunch_task_restore(struct thread_info *, void *);
888 extern void crunch_task_release(struct thread_info *);
890 extern void iwmmxt_task_disable(struct thread_info *);
891 extern void iwmmxt_task_copy(struct thread_info *, void *);
892 extern void iwmmxt_task_restore(struct thread_info *, void *);
893 extern void iwmmxt_task_release(struct thread_info *);
894 extern void iwmmxt_task_switch(struct thread_info *);
895 # 22 "include/linux/thread_info.h" 2
896 # 30 "include/linux/thread_info.h"
897 static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag)
899 (__builtin_constant_p(flag) ? ____atomic_set_bit(flag, &ti->flags) : _set_bit_le(flag,&ti->flags));
902 static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag)
904 (__builtin_constant_p(flag) ? ____atomic_clear_bit(flag, &ti->flags) : _clear_bit_le(flag,&ti->flags));
907 static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
909 return (__builtin_constant_p(flag) ? ____atomic_test_and_set_bit(flag, &ti->flags) : _test_and_set_bit_le(flag,&ti->flags));
912 static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
914 return (__builtin_constant_p(flag) ? ____atomic_test_and_clear_bit(flag, &ti->flags) : _test_and_clear_bit_le(flag,&ti->flags));
917 static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag)
919 return test_bit(flag,&ti->flags);
921 # 10 "include/linux/preempt.h" 2
922 # 50 "include/linux/spinlock.h" 2
926 # 1 "include/linux/kernel.h" 1
927 # 10 "include/linux/kernel.h"
928 # 1 "/usr/lib/gcc/arm-unknown-linux-gnu/4.1.1/include/stdarg.h" 1 3 4
929 # 43 "/usr/lib/gcc/arm-unknown-linux-gnu/4.1.1/include/stdarg.h" 3 4
930 typedef __builtin_va_list __gnuc_va_list;
931 # 105 "/usr/lib/gcc/arm-unknown-linux-gnu/4.1.1/include/stdarg.h" 3 4
932 typedef __gnuc_va_list va_list;
933 # 11 "include/linux/kernel.h" 2
939 # 1 "include/asm/byteorder.h" 1
940 # 21 "include/asm/byteorder.h"
941 static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swab32(__u32 x)
946 if (!__builtin_constant_p(x)) {
952 asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
955 t = x ^ ((x << 16) | (x >> 16));
957 x = (x << 24) | (x >> 8);
963 # 54 "include/asm/byteorder.h"
964 # 1 "include/linux/byteorder/little_endian.h" 1
965 # 12 "include/linux/byteorder/little_endian.h"
966 # 1 "include/linux/byteorder/swab.h" 1
967 # 133 "include/linux/byteorder/swab.h"
968 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 x)
970 return ({ __u16 __tmp = (x) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); });
972 static __inline__ __attribute__((always_inline)) __u16 __swab16p(const __u16 *x)
974 return ({ __u16 __tmp = (*(x)) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); });
976 static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr)
978 do { *(addr) = ({ __u16 __tmp = (*((addr))) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); }); } while (0);
981 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 x)
983 return ___arch__swab32(x);
985 static __inline__ __attribute__((always_inline)) __u32 __swab32p(const __u32 *x)
987 return ___arch__swab32(*(x));
989 static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr)
991 do { *(addr) = ___arch__swab32(*((addr))); } while (0);
995 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 x)
999 __u32 l = x & ((1ULL<<32)-1);
1000 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)))));
1005 static __inline__ __attribute__((always_inline)) __u64 __swab64p(const __u64 *x)
1007 return ({ __u64 __tmp = (*(x)) ; ({ __u64 __x = (__tmp); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); }); });
1009 static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr)
1011 do { *(addr) = ({ __u64 __tmp = (*((addr))) ; ({ __u64 __x = (__tmp); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); }); }); } while (0);
1013 # 13 "include/linux/byteorder/little_endian.h" 2
1014 # 43 "include/linux/byteorder/little_endian.h"
1015 static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p)
1019 static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p)
1023 static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p)
1027 static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p)
1031 static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p)
1035 static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p)
1039 static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p)
1041 return ( __be64)__swab64p(p);
1043 static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p)
1045 return __swab64p((__u64 *)p);
1047 static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p)
1049 return ( __be32)__swab32p(p);
1051 static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p)
1053 return __swab32p((__u32 *)p);
1055 static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p)
1057 return ( __be16)__swab16p(p);
1059 static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p)
1061 return __swab16p((__u16 *)p);
1063 # 104 "include/linux/byteorder/little_endian.h"
1064 # 1 "include/linux/byteorder/generic.h" 1
1065 # 154 "include/linux/byteorder/generic.h"
1066 extern __u32 ntohl(__be32);
1067 extern __be32 htonl(__u32);
1068 extern __u16 ntohs(__be16);
1069 extern __be16 htons(__u16);
1070 # 105 "include/linux/byteorder/little_endian.h" 2
1071 # 55 "include/asm/byteorder.h" 2
1072 # 17 "include/linux/kernel.h" 2
1073 # 1 "include/asm/bug.h" 1
1080 extern void __bug(const char *file, int line, void *data) __attribute__((noreturn));
1081 # 22 "include/asm/bug.h"
1082 # 1 "include/asm-generic/bug.h" 1
1083 # 23 "include/asm/bug.h" 2
1084 # 18 "include/linux/kernel.h" 2
1086 extern const char linux_banner[];
1087 # 47 "include/linux/kernel.h"
1088 extern int console_printk[];
1098 # 95 "include/linux/kernel.h"
1099 extern struct atomic_notifier_head panic_notifier_list;
1100 extern long (*panic_blink)(long time);
1101 void panic(const char * fmt, ...)
1102 __attribute__ ((noreturn, format (printf, 1, 2)));
1103 extern void oops_enter(void);
1104 extern void oops_exit(void);
1105 extern int oops_may_print(void);
1106 void do_exit(long error_code)
1107 __attribute__((noreturn));
1108 void complete_and_exit(struct completion *, long)
1109 __attribute__((noreturn));
1110 extern unsigned long simple_strtoul(const char *,char **,unsigned int);
1111 extern long simple_strtol(const char *,char **,unsigned int);
1112 extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
1113 extern long long simple_strtoll(const char *,char **,unsigned int);
1114 extern int sprintf(char * buf, const char * fmt, ...)
1115 __attribute__ ((format (printf, 2, 3)));
1116 extern int vsprintf(char *buf, const char *, va_list)
1117 __attribute__ ((format (printf, 2, 0)));
1118 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
1119 __attribute__ ((format (printf, 3, 4)));
1120 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
1121 __attribute__ ((format (printf, 3, 0)));
1122 extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
1123 __attribute__ ((format (printf, 3, 4)));
1124 extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
1125 __attribute__ ((format (printf, 3, 0)));
1126 extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
1127 __attribute__ ((format (printf, 2, 3)));
1129 extern int sscanf(const char *, const char *, ...)
1130 __attribute__ ((format (scanf, 2, 3)));
1131 extern int vsscanf(const char *, const char *, va_list)
1132 __attribute__ ((format (scanf, 2, 0)));
1134 extern int get_option(char **str, int *pint);
1135 extern char *get_options(const char *str, int nints, int *ints);
1136 extern unsigned long long memparse(char *ptr, char **retptr);
1138 extern int core_kernel_text(unsigned long addr);
1139 extern int __kernel_text_address(unsigned long addr);
1140 extern int kernel_text_address(unsigned long addr);
1141 extern int session_of_pgrp(int pgrp);
1143 extern void dump_thread(struct pt_regs *regs, struct user *dump);
1146 int vprintk(const char *fmt, va_list args)
1147 __attribute__ ((format (printf, 1, 0)));
1148 int printk(const char * fmt, ...)
1149 __attribute__ ((format (printf, 1, 2)));
1150 # 155 "include/linux/kernel.h"
1151 unsigned long int_sqrt(unsigned long);
1153 static inline __attribute__((always_inline)) int __attribute__((pure)) long_log2(unsigned long x)
1156 for (x >>= 1; x > 0; x >>= 1)
1161 static inline __attribute__((always_inline)) unsigned long
1162 __attribute__((__const__)) roundup_pow_of_two(unsigned long x)
1164 return 1UL << fls_long(x - 1);
1167 extern int printk_ratelimit(void);
1168 extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
1170 static inline __attribute__((always_inline)) void console_silent(void)
1172 (console_printk[0]) = 0;
1175 static inline __attribute__((always_inline)) void console_verbose(void)
1177 if ((console_printk[0]))
1178 (console_printk[0]) = 15;
1181 extern void bust_spinlocks(int yes);
1182 extern int oops_in_progress;
1183 extern int panic_timeout;
1184 extern int panic_on_oops;
1186 extern const char *print_tainted(void);
1187 extern void add_taint(unsigned);
1190 extern enum system_states {
1196 SYSTEM_SUSPEND_DISK,
1198 # 210 "include/linux/kernel.h"
1199 extern void dump_stack(void);
1200 # 322 "include/linux/kernel.h"
1203 unsigned long loads[3];
1204 unsigned long totalram;
1205 unsigned long freeram;
1206 unsigned long sharedram;
1207 unsigned long bufferram;
1208 unsigned long totalswap;
1209 unsigned long freeswap;
1210 unsigned short procs;
1212 unsigned long totalhigh;
1213 unsigned long freehigh;
1214 unsigned int mem_unit;
1215 char _f[20-2*sizeof(long)-sizeof(int)];
1217 # 54 "include/linux/spinlock.h" 2
1218 # 1 "include/linux/stringify.h" 1
1219 # 55 "include/linux/spinlock.h" 2
1220 # 78 "include/linux/spinlock.h"
1221 # 1 "include/linux/spinlock_types.h" 1
1222 # 12 "include/linux/spinlock_types.h"
1223 # 1 "include/linux/lockdep.h" 1
1224 # 12 "include/linux/lockdep.h"
1225 # 1 "include/linux/list.h" 1
1232 # 1 "include/linux/poison.h" 1
1233 # 8 "include/linux/list.h" 2
1234 # 1 "include/linux/prefetch.h" 1
1235 # 14 "include/linux/prefetch.h"
1236 # 1 "include/asm/processor.h" 1
1237 # 23 "include/asm/processor.h"
1238 # 1 "include/asm/procinfo.h" 1
1239 # 15 "include/asm/procinfo.h"
1241 struct cpu_user_fns;
1242 struct cpu_cache_fns;
1244 # 29 "include/asm/procinfo.h"
1245 struct proc_info_list {
1246 unsigned int cpu_val;
1247 unsigned int cpu_mask;
1248 unsigned long __cpu_mm_mmu_flags;
1249 unsigned long __cpu_io_mmu_flags;
1250 unsigned long __cpu_flush;
1251 const char *arch_name;
1252 const char *elf_name;
1253 unsigned int elf_hwcap;
1254 const char *cpu_name;
1255 struct processor *proc;
1256 struct cpu_tlb_fns *tlb;
1257 struct cpu_user_fns *user;
1258 struct cpu_cache_fns *cache;
1261 extern unsigned int elf_hwcap;
1262 # 24 "include/asm/processor.h" 2
1270 struct debug_entry {
1272 union debug_insn insn;
1277 struct debug_entry bp[2];
1280 struct thread_struct {
1282 unsigned long address;
1283 unsigned long trap_no;
1284 unsigned long error_code;
1286 struct debug_info debug;
1288 # 78 "include/asm/processor.h"
1292 extern void release_thread(struct task_struct *);
1297 unsigned long get_wchan(struct task_struct *p);
1304 extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
1305 # 15 "include/linux/prefetch.h" 2
1306 # 1 "include/asm/cache.h" 1
1307 # 16 "include/linux/prefetch.h" 2
1308 # 58 "include/linux/prefetch.h"
1309 static inline __attribute__((always_inline)) void prefetch_range(void *addr, size_t len)
1313 char *end = addr + len;
1315 for (cp = addr; cp < end; cp += (4*(1 << 5)))
1316 ({ __asm__ __volatile__( "pld\t%0" : : "o" (*(char *)(cp)) : "cc"); });
1319 # 9 "include/linux/list.h" 2
1320 # 21 "include/linux/list.h"
1322 struct list_head *next, *prev;
1330 static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list)
1342 static inline __attribute__((always_inline)) void __list_add(struct list_head *new,
1343 struct list_head *prev,
1344 struct list_head *next)
1351 # 60 "include/linux/list.h"
1352 static inline __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head)
1354 __list_add(new, head, head->next);
1356 # 73 "include/linux/list.h"
1357 static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head)
1359 __list_add(new, head->prev, head);
1368 static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head * new,
1369 struct list_head * prev, struct list_head * next)
1373 __asm__ __volatile__("": : :"memory");
1377 # 110 "include/linux/list.h"
1378 static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head)
1380 __list_add_rcu(new, head, head->next);
1382 # 131 "include/linux/list.h"
1383 static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new,
1384 struct list_head *head)
1386 __list_add_rcu(new, head->prev, head);
1388 # 144 "include/linux/list.h"
1389 static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next)
1401 static inline __attribute__((always_inline)) void list_del(struct list_head *entry)
1403 __list_del(entry->prev, entry->next);
1404 entry->next = ((void *) 0x00100100);
1405 entry->prev = ((void *) 0x00200200);
1407 # 187 "include/linux/list.h"
1408 static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry)
1410 __list_del(entry->prev, entry->next);
1411 entry->prev = ((void *) 0x00200200);
1420 static inline __attribute__((always_inline)) void list_replace(struct list_head *old,
1421 struct list_head *new)
1423 new->next = old->next;
1424 new->next->prev = new;
1425 new->prev = old->prev;
1426 new->prev->next = new;
1429 static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old,
1430 struct list_head *new)
1432 list_replace(old, new);
1433 INIT_LIST_HEAD(old);
1435 # 223 "include/linux/list.h"
1436 static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old,
1437 struct list_head *new)
1439 new->next = old->next;
1440 new->prev = old->prev;
1441 __asm__ __volatile__("": : :"memory");
1442 new->next->prev = new;
1443 new->prev->next = new;
1444 old->prev = ((void *) 0x00200200);
1451 static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry)
1453 __list_del(entry->prev, entry->next);
1454 INIT_LIST_HEAD(entry);
1462 static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head)
1464 __list_del(list->prev, list->next);
1465 list_add(list, head);
1473 static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list,
1474 struct list_head *head)
1476 __list_del(list->prev, list->next);
1477 list_add_tail(list, head);
1485 static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list,
1486 const struct list_head *head)
1488 return list->next == head;
1495 static inline __attribute__((always_inline)) int list_empty(const struct list_head *head)
1497 return head->next == head;
1499 # 300 "include/linux/list.h"
1500 static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head)
1502 struct list_head *next = head->next;
1503 return (next == head) && (next == head->prev);
1506 static inline __attribute__((always_inline)) void __list_splice(struct list_head *list,
1507 struct list_head *head)
1509 struct list_head *first = list->next;
1510 struct list_head *last = list->prev;
1511 struct list_head *at = head->next;
1525 static inline __attribute__((always_inline)) void list_splice(struct list_head *list, struct list_head *head)
1527 if (!list_empty(list))
1528 __list_splice(list, head);
1530 # 338 "include/linux/list.h"
1531 static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list,
1532 struct list_head *head)
1534 if (!list_empty(list)) {
1535 __list_splice(list, head);
1536 INIT_LIST_HEAD(list);
1539 # 592 "include/linux/list.h"
1541 struct hlist_node *first;
1545 struct hlist_node *next, **pprev;
1551 static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h)
1553 h->next = ((void *)0);
1554 h->pprev = ((void *)0);
1557 static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h)
1562 static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h)
1567 static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n)
1569 struct hlist_node *next = n->next;
1570 struct hlist_node **pprev = n->pprev;
1573 next->pprev = pprev;
1576 static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n)
1579 n->next = ((void *) 0x00100100);
1580 n->pprev = ((void *) 0x00200200);
1582 # 654 "include/linux/list.h"
1583 static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n)
1586 n->pprev = ((void *) 0x00200200);
1589 static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n)
1591 if (!hlist_unhashed(n)) {
1596 # 675 "include/linux/list.h"
1597 static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old,
1598 struct hlist_node *new)
1600 struct hlist_node *next = old->next;
1603 new->pprev = old->pprev;
1604 __asm__ __volatile__("": : :"memory");
1606 new->next->pprev = &new->next;
1608 old->pprev = ((void *) 0x00200200);
1611 static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
1613 struct hlist_node *first = h->first;
1616 first->pprev = &n->next;
1618 n->pprev = &h->first;
1620 # 719 "include/linux/list.h"
1621 static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n,
1622 struct hlist_head *h)
1624 struct hlist_node *first = h->first;
1626 n->pprev = &h->first;
1627 __asm__ __volatile__("": : :"memory");
1629 first->pprev = &n->next;
1634 static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n,
1635 struct hlist_node *next)
1637 n->pprev = next->pprev;
1639 next->pprev = &n->next;
1643 static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n,
1644 struct hlist_node *next)
1646 next->next = n->next;
1648 next->pprev = &n->next;
1651 next->next->pprev = &next->next;
1653 # 770 "include/linux/list.h"
1654 static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n,
1655 struct hlist_node *next)
1657 n->pprev = next->pprev;
1659 __asm__ __volatile__("": : :"memory");
1660 next->pprev = &n->next;
1663 # 798 "include/linux/list.h"
1664 static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev,
1665 struct hlist_node *n)
1667 n->next = prev->next;
1668 n->pprev = &prev->next;
1669 __asm__ __volatile__("": : :"memory");
1672 n->next->pprev = &n->next;
1674 # 13 "include/linux/lockdep.h" 2
1675 # 1 "include/linux/debug_locks.h" 1
1681 extern int debug_locks;
1682 extern int debug_locks_silent;
1687 extern int debug_locks_off(void);
1688 # 52 "include/linux/debug_locks.h"
1689 static inline __attribute__((always_inline)) void debug_show_all_locks(void)
1693 static inline __attribute__((always_inline)) void debug_show_held_locks(struct task_struct *task)
1697 static inline __attribute__((always_inline)) void
1698 debug_check_no_locks_freed(const void *from, unsigned long len)
1702 static inline __attribute__((always_inline)) void
1703 debug_check_no_locks_held(struct task_struct *task)
1706 # 14 "include/linux/lockdep.h" 2
1707 # 1 "include/linux/stacktrace.h" 1
1708 # 15 "include/linux/lockdep.h" 2
1709 # 243 "include/linux/lockdep.h"
1710 static inline __attribute__((always_inline)) void lockdep_off(void)
1714 static inline __attribute__((always_inline)) void lockdep_on(void)
1718 static inline __attribute__((always_inline)) int lockdep_internal(void)
1722 # 270 "include/linux/lockdep.h"
1723 struct lock_class_key { };
1724 # 13 "include/linux/spinlock_types.h" 2
1729 # 1 "include/linux/spinlock_types_up.h" 1
1730 # 29 "include/linux/spinlock_types_up.h"
1731 typedef struct { } raw_spinlock_t;
1743 # 18 "include/linux/spinlock_types.h" 2
1747 raw_spinlock_t raw_lock;
1748 # 32 "include/linux/spinlock_types.h"
1754 raw_rwlock_t raw_lock;
1755 # 48 "include/linux/spinlock_types.h"
1757 # 79 "include/linux/spinlock.h" 2
1759 extern int __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock);
1767 # 1 "include/linux/spinlock_up.h" 1
1768 # 89 "include/linux/spinlock.h" 2
1769 # 134 "include/linux/spinlock.h"
1770 # 1 "include/linux/spinlock_api_up.h" 1
1771 # 135 "include/linux/spinlock.h" 2
1772 # 259 "include/linux/spinlock.h"
1773 # 1 "include/asm/atomic.h" 1
1774 # 16 "include/asm/atomic.h"
1775 typedef struct { volatile int counter; } atomic_t;
1776 # 126 "include/asm/atomic.h"
1777 static inline __attribute__((always_inline)) int atomic_add_return(int i, atomic_t *v)
1779 unsigned long flags;
1782 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
1784 v->counter = val += i;
1785 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
1790 static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t *v)
1792 unsigned long flags;
1795 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
1797 v->counter = val -= i;
1798 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
1803 static inline __attribute__((always_inline)) int atomic_cmpxchg(atomic_t *v, int old, int new)
1806 unsigned long flags;
1808 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
1810 if (__builtin_expect(!!(ret == old), 1))
1812 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
1817 static inline __attribute__((always_inline)) void atomic_clear_mask(unsigned long mask, unsigned long *addr)
1819 unsigned long flags;
1821 ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); });
1823 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
1830 static inline __attribute__((always_inline)) int atomic_add_unless(atomic_t *v, int a, int u)
1835 while (c != u && (old = atomic_cmpxchg((v), c, c + a)) != c)
1839 # 209 "include/asm/atomic.h"
1840 # 1 "include/asm-generic/atomic.h" 1
1841 # 71 "include/asm-generic/atomic.h"
1842 typedef atomic_t atomic_long_t;
1845 static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l)
1847 atomic_t *v = (atomic_t *)l;
1849 return (long)((v)->counter);
1852 static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i)
1854 atomic_t *v = (atomic_t *)l;
1856 (((v)->counter) = (i));
1859 static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l)
1861 atomic_t *v = (atomic_t *)l;
1863 (void) atomic_add_return(1, v);
1866 static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l)
1868 atomic_t *v = (atomic_t *)l;
1870 (void) atomic_sub_return(1, v);
1873 static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l)
1875 atomic_t *v = (atomic_t *)l;
1877 (void) atomic_add_return(i, v);
1880 static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l)
1882 atomic_t *v = (atomic_t *)l;
1884 (void) atomic_sub_return(i, v);
1886 # 210 "include/asm/atomic.h" 2
1887 # 260 "include/linux/spinlock.h" 2
1893 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
1894 # 46 "include/linux/capability.h" 2
1895 # 1 "include/asm/current.h" 1
1901 static inline __attribute__((always_inline)) struct task_struct *get_current(void) __attribute__((__const__));
1903 static inline __attribute__((always_inline)) struct task_struct *get_current(void)
1905 return current_thread_info()->task;
1907 # 47 "include/linux/capability.h" 2
1908 # 58 "include/linux/capability.h"
1909 typedef __u32 kernel_cap_t;
1910 # 295 "include/linux/capability.h"
1911 extern kernel_cap_t cap_bset;
1912 # 323 "include/linux/capability.h"
1913 static inline __attribute__((always_inline)) kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
1920 static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b)
1927 static inline __attribute__((always_inline)) kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop)
1930 (dest) = (a) & ~(drop);
1934 static inline __attribute__((always_inline)) kernel_cap_t cap_invert(kernel_cap_t c)
1940 # 360 "include/linux/capability.h"
1941 int capable(int cap);
1942 int __capable(struct task_struct *t, int cap);
1943 # 45 "include/linux/sched.h" 2
1944 # 1 "include/linux/threads.h" 1
1945 # 46 "include/linux/sched.h" 2
1948 # 1 "include/linux/timex.h" 1
1949 # 57 "include/linux/timex.h"
1950 # 1 "include/linux/time.h" 1
1957 # 1 "include/linux/seqlock.h" 1
1958 # 32 "include/linux/seqlock.h"
1963 # 57 "include/linux/seqlock.h"
1964 static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl)
1966 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1968 __asm__ __volatile__("": : :"memory");
1971 static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl)
1973 __asm__ __volatile__("": : :"memory");
1975 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1978 static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl)
1980 int ret = (({ do { do { } while (0); (void)0; (void)(&sl->lock); } while (0); 1; }));
1984 __asm__ __volatile__("": : :"memory");
1990 static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl)
1992 unsigned ret = sl->sequence;
1993 __asm__ __volatile__("": : :"memory");
1996 # 98 "include/linux/seqlock.h"
1997 static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned iv)
1999 __asm__ __volatile__("": : :"memory");
2000 return (iv & 1) | (sl->sequence ^ iv);
2002 # 112 "include/linux/seqlock.h"
2003 typedef struct seqcount {
2011 static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s)
2013 unsigned ret = s->sequence;
2014 __asm__ __volatile__("": : :"memory");
2023 static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned iv)
2025 __asm__ __volatile__("": : :"memory");
2026 return (iv & 1) | (s->sequence ^ iv);
2034 static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s)
2037 __asm__ __volatile__("": : :"memory");
2040 static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s)
2042 __asm__ __volatile__("": : :"memory");
2045 # 8 "include/linux/time.h" 2
2058 suseconds_t tv_usec;
2065 # 39 "include/linux/time.h"
2066 static inline __attribute__((always_inline)) int timespec_equal(struct timespec *a, struct timespec *b)
2068 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
2076 static inline __attribute__((always_inline)) int timespec_compare(struct timespec *lhs, struct timespec *rhs)
2078 if (lhs->tv_sec < rhs->tv_sec)
2080 if (lhs->tv_sec > rhs->tv_sec)
2082 return lhs->tv_nsec - rhs->tv_nsec;
2085 static inline __attribute__((always_inline)) int timeval_compare(struct timeval *lhs, struct timeval *rhs)
2087 if (lhs->tv_sec < rhs->tv_sec)
2089 if (lhs->tv_sec > rhs->tv_sec)
2091 return lhs->tv_usec - rhs->tv_usec;
2094 extern unsigned long mktime(const unsigned int year, const unsigned int mon,
2095 const unsigned int day, const unsigned int hour,
2096 const unsigned int min, const unsigned int sec);
2098 extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
2103 static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs,
2104 struct timespec rhs)
2106 struct timespec ts_delta;
2107 set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
2108 lhs.tv_nsec - rhs.tv_nsec);
2118 extern struct timespec xtime;
2119 extern struct timespec wall_to_monotonic;
2120 extern seqlock_t xtime_lock;
2122 void timekeeping_init(void);
2124 static inline __attribute__((always_inline)) unsigned long get_seconds(void)
2126 return xtime.tv_sec;
2129 struct timespec current_kernel_time(void);
2134 extern void do_gettimeofday(struct timeval *tv);
2135 extern int do_settimeofday(struct timespec *tv);
2136 extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
2138 extern long do_utimes(int dfd, char *filename, struct timeval *times);
2140 extern int do_setitimer(int which, struct itimerval *value,
2141 struct itimerval *ovalue);
2142 extern unsigned int alarm_setitimer(unsigned int seconds);
2143 extern int do_getitimer(int which, struct itimerval *value);
2144 extern void getnstimeofday(struct timespec *tv);
2146 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
2147 extern int timekeeping_is_continuous(void);
2148 # 129 "include/linux/time.h"
2149 static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts)
2151 return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
2153 # 141 "include/linux/time.h"
2154 static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv)
2156 return ((s64) tv->tv_sec * 1000000000L) +
2157 tv->tv_usec * 1000L;
2166 extern struct timespec ns_to_timespec(const s64 nsec);
2174 extern struct timeval ns_to_timeval(const s64 nsec);
2181 static inline __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns)
2184 while(__builtin_expect(!!(ns >= 1000000000L), 0)) {
2190 # 195 "include/linux/time.h"
2192 struct timespec it_interval;
2193 struct timespec it_value;
2197 struct timeval it_interval;
2198 struct timeval it_value;
2200 # 58 "include/linux/timex.h" 2
2201 # 106 "include/linux/timex.h"
2214 struct timeval time;
2226 int :32; int :32; int :32; int :32;
2227 int :32; int :32; int :32; int :32;
2228 int :32; int :32; int :32; int :32;
2230 # 193 "include/linux/timex.h"
2231 # 1 "include/asm/timex.h" 1
2232 # 15 "include/asm/timex.h"
2233 # 1 "include/asm/arch/timex.h" 1
2234 # 1 "include/asm/hardware.h" 1
2235 # 16 "include/asm/hardware.h"
2236 # 1 "include/asm/arch/hardware.h" 1
2244 extern unsigned long iop13xx_pcibios_min_io;
2245 extern unsigned long iop13xx_pcibios_min_mem;
2246 # 19 "include/asm/arch/hardware.h"
2247 # 1 "include/asm/arch/iop13xx.h" 1
2253 extern u32 iop13xx_atux_pmmr_offset;
2254 extern u32 iop13xx_atue_pmmr_offset;
2255 void iop13xx_init_irq(void);
2256 void iop13xx_map_io(void);
2257 void iop13xx_platform_init(void);
2258 void iop13xx_add_tpmi_devices(void);
2259 void iop13xx_init_irq(void);
2260 void iop13xx_init_time(unsigned long tickrate);
2261 unsigned long iop13xx_gettimeoffset(void);
2262 static inline __attribute__((always_inline)) u32 iop13xx_cp6_save(void)
2267 "mrc p15, 0, %1, c15, c1, 0\n\t"
2268 "orr %0, %1, #(1 << 6)\n\t"
2269 "mcr p15, 0, %0, c15, c1, 0\n\t"
2270 : "=r" (temp), "=r"(cp_flags));
2275 static inline __attribute__((always_inline)) void iop13xx_cp6_restore(u32 cp_flags)
2278 "mcr p15, 0, %0, c15, c1, 0\n\t"
2279 : : "r" (cp_flags) );
2283 static inline __attribute__((always_inline)) int iop13xx_cpu_id(void)
2286 asm volatile("mrc p6, 0, %0, c0, c0, 0":"=r" (id));
2289 # 20 "include/asm/arch/hardware.h" 2
2294 # 1 "include/asm/arch/iq81340.h" 1
2295 # 25 "include/asm/arch/hardware.h" 2
2296 # 17 "include/asm/hardware.h" 2
2297 # 2 "include/asm/arch/timex.h" 2
2298 # 16 "include/asm/timex.h" 2
2300 typedef unsigned long cycles_t;
2302 static inline __attribute__((always_inline)) cycles_t get_cycles (void)
2306 # 194 "include/linux/timex.h" 2
2313 extern unsigned long tick_usec;
2314 extern unsigned long tick_nsec;
2320 extern int time_state;
2321 extern int time_status;
2322 extern long time_offset;
2323 extern long time_constant;
2324 extern long time_tolerance;
2325 extern long time_precision;
2326 extern long time_maxerror;
2327 extern long time_esterror;
2329 extern long time_freq;
2330 extern long time_reftime;
2332 extern long time_adjust;
2333 extern long time_next_adjust;
2340 static inline __attribute__((always_inline)) void ntp_clear(void)
2343 time_status |= 0x0040;
2344 time_maxerror = (512000L << 5);
2345 time_esterror = (512000L << 5);
2352 static inline __attribute__((always_inline)) int ntp_synced(void)
2354 return !(time_status & 0x0040);
2356 # 300 "include/linux/timex.h"
2357 static inline __attribute__((always_inline)) void
2358 time_interpolator_reset(void)
2367 extern u64 current_tick_length(void);
2369 extern int do_adjtimex(struct timex *);
2370 # 49 "include/linux/sched.h" 2
2371 # 1 "include/linux/jiffies.h" 1
2375 # 1 "include/linux/calc64.h" 1
2380 # 1 "include/asm/div64.h" 1
2381 # 6 "include/linux/calc64.h" 2
2382 # 20 "include/linux/calc64.h"
2383 static inline __attribute__((always_inline)) unsigned long do_div_llr(const long long dividend,
2384 const long divisor, long *remainder)
2386 u64 result = dividend;
2388 *(remainder) = ({ register unsigned int __base asm("r4") = divisor; register unsigned long long __n asm("r0") = result; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm( ".ifnc " "%0" "," "r1" " ; .err ; .endif\n\t" ".ifnc " "%1" "," "r2" " ; .err ; .endif\n\t" ".ifnc " "%2" "," "r0" " ; .err ; .endif\n\t" ".ifnc " "%3" "," "r4" " ; .err ; .endif\n\t" "bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); result = __res; __rem; });
2389 return (unsigned long) result;
2398 static inline __attribute__((always_inline)) long div_long_long_rem_signed(const long long dividend,
2399 const long divisor, long *remainder)
2403 if (__builtin_expect(!!(dividend < 0), 0)) {
2404 res = -do_div_llr((-dividend), divisor, remainder);
2405 *remainder = -(*remainder);
2407 res = do_div_llr((dividend), divisor, remainder);
2411 # 5 "include/linux/jiffies.h" 2
2412 # 81 "include/linux/jiffies.h"
2413 extern u64 __attribute__((section(".data"))) jiffies_64;
2414 extern unsigned long volatile __attribute__((section(".data"))) jiffies;
2417 u64 get_jiffies_64(void);
2418 # 252 "include/linux/jiffies.h"
2419 static inline __attribute__((always_inline)) unsigned int jiffies_to_msecs(const unsigned long j)
2422 return (1000L / 100) * j;
2430 static inline __attribute__((always_inline)) unsigned int jiffies_to_usecs(const unsigned long j)
2433 return (1000000L / 100) * j;
2441 static inline __attribute__((always_inline)) unsigned long msecs_to_jiffies(const unsigned int m)
2443 if (m > jiffies_to_msecs(((~0UL >> 1)-1)))
2444 return ((~0UL >> 1)-1);
2446 return (m + (1000L / 100) - 1) / (1000L / 100);
2454 static inline __attribute__((always_inline)) unsigned long usecs_to_jiffies(const unsigned int u)
2456 if (u > jiffies_to_usecs(((~0UL >> 1)-1)))
2457 return ((~0UL >> 1)-1);
2459 return (u + (1000000L / 100) - 1) / (1000000L / 100);
2466 # 311 "include/linux/jiffies.h"
2467 static __inline__ __attribute__((always_inline)) unsigned long
2468 timespec_to_jiffies(const struct timespec *value)
2470 unsigned long sec = value->tv_sec;
2471 long nsec = value->tv_nsec + (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))))) - 1;
2473 if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))))) / 1000000000L)){
2474 sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))))) / 1000000000L);
2477 return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 7)) + (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))))))) +
2478 (((u64)nsec * ((unsigned long)((((u64)1 << ((32 - 7) + 29)) + (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))))))) >>
2479 (((32 - 7) + 29) - (32 - 7)))) >> (32 - 7);
2483 static __inline__ __attribute__((always_inline)) void
2484 jiffies_to_timespec(const unsigned long jiffies, struct timespec *value)
2490 u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))));
2491 value->tv_sec = do_div_llr((nsec), 1000000000L, &value->tv_nsec);
2493 # 350 "include/linux/jiffies.h"
2494 static __inline__ __attribute__((always_inline)) unsigned long
2495 timeval_to_jiffies(const struct timeval *value)
2497 unsigned long sec = value->tv_sec;
2498 long usec = value->tv_usec;
2500 if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))))) / 1000000000L)){
2501 sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))))) / 1000000000L);
2504 return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 7)) + (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))))))) +
2505 (((u64)usec * ((unsigned long)((((u64)1000L << ((32 - 7) + 19)) + (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))))))) + (u64)(((u64)1 << ((32 - 7) + 19)) - 1)) >>
2506 (((32 - 7) + 19) - (32 - 7)))) >> (32 - 7);
2509 static __inline__ __attribute__((always_inline)) void
2510 jiffies_to_timeval(const unsigned long jiffies, struct timeval *value)
2516 u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((((1000000UL * 1000) % ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))) << (8)) + ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100))))) / 2) / ((( ((((100 * 100)) / ((((100 * 100) + 100/2) / 100))) << (8)) + (((((100 * 100)) % ((((100 * 100) + 100/2) / 100))) << (8)) + ((((100 * 100) + 100/2) / 100)) / 2) / ((((100 * 100) + 100/2) / 100)))))));
2519 value->tv_sec = do_div_llr((nsec), 1000000000L, &tv_usec);
2521 value->tv_usec = tv_usec;
2527 static inline __attribute__((always_inline)) clock_t jiffies_to_clock_t(long x)
2530 return x / (100 / 100);
2538 static inline __attribute__((always_inline)) unsigned long clock_t_to_jiffies(unsigned long x)
2541 if (x >= ~0UL / (100 / 100))
2543 return x * (100 / 100);
2544 # 412 "include/linux/jiffies.h"
2547 static inline __attribute__((always_inline)) u64 jiffies_64_to_clock_t(u64 x)
2550 ({ register unsigned int __base asm("r4") = 100 / 100; register unsigned long long __n asm("r0") = x; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm( ".ifnc " "%0" "," "r1" " ; .err ; .endif\n\t" ".ifnc " "%1" "," "r2" " ; .err ; .endif\n\t" ".ifnc " "%2" "," "r0" " ; .err ; .endif\n\t" ".ifnc " "%3" "," "r4" " ; .err ; .endif\n\t" "bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); x = __res; __rem; });
2551 # 427 "include/linux/jiffies.h"
2555 static inline __attribute__((always_inline)) u64 nsec_to_clock_t(u64 x)
2558 ({ register unsigned int __base asm("r4") = (1000000000L / 100); register unsigned long long __n asm("r0") = x; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm( ".ifnc " "%0" "," "r1" " ; .err ; .endif\n\t" ".ifnc " "%1" "," "r2" " ; .err ; .endif\n\t" ".ifnc " "%2" "," "r0" " ; .err ; .endif\n\t" ".ifnc " "%3" "," "r4" " ; .err ; .endif\n\t" "bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); x = __res; __rem; });
2559 # 447 "include/linux/jiffies.h"
2562 # 50 "include/linux/sched.h" 2
2563 # 1 "include/linux/rbtree.h" 1
2564 # 100 "include/linux/rbtree.h"
2567 unsigned long rb_parent_color;
2570 struct rb_node *rb_right;
2571 struct rb_node *rb_left;
2572 } __attribute__((aligned(sizeof(long))));
2577 struct rb_node *rb_node;
2579 # 123 "include/linux/rbtree.h"
2580 static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p)
2582 rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
2584 static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color)
2586 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
2588 # 139 "include/linux/rbtree.h"
2589 extern void rb_insert_color(struct rb_node *, struct rb_root *);
2590 extern void rb_erase(struct rb_node *, struct rb_root *);
2593 extern struct rb_node *rb_next(struct rb_node *);
2594 extern struct rb_node *rb_prev(struct rb_node *);
2595 extern struct rb_node *rb_first(struct rb_root *);
2596 extern struct rb_node *rb_last(struct rb_root *);
2599 extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
2600 struct rb_root *root);
2602 static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent,
2603 struct rb_node ** rb_link)
2605 node->rb_parent_color = (unsigned long )parent;
2606 node->rb_left = node->rb_right = ((void *)0);
2610 # 51 "include/linux/sched.h" 2
2612 # 1 "include/linux/cpumask.h" 1
2613 # 86 "include/linux/cpumask.h"
2614 # 1 "include/linux/bitmap.h" 1
2622 # 1 "include/linux/string.h" 1
2623 # 16 "include/linux/string.h"
2624 extern char *strndup_user(const char *, long);
2629 # 1 "include/asm/string.h" 1
2630 # 10 "include/asm/string.h"
2631 extern char * strrchr(const char * s, int c);
2634 extern char * strchr(const char * s, int c);
2637 extern void * memcpy(void *, const void *, __kernel_size_t);
2640 extern void * memmove(void *, const void *, __kernel_size_t);
2643 extern void * memchr(const void *, int, __kernel_size_t);
2647 extern void * memset(void *, int, __kernel_size_t);
2649 extern void __memzero(void *ptr, __kernel_size_t n);
2650 # 22 "include/linux/string.h" 2
2653 extern char * strcpy(char *,const char *);
2656 extern char * strncpy(char *,const char *, __kernel_size_t);
2659 size_t strlcpy(char *, const char *, size_t);
2662 extern char * strcat(char *, const char *);
2665 extern char * strncat(char *, const char *, __kernel_size_t);
2668 extern size_t strlcat(char *, const char *, __kernel_size_t);
2671 extern int strcmp(const char *,const char *);
2674 extern int strncmp(const char *,const char *,__kernel_size_t);
2677 extern int strnicmp(const char *, const char *, __kernel_size_t);
2683 extern char * strnchr(const char *, size_t, int);
2688 extern char * strstrip(char *);
2690 extern char * strstr(const char *,const char *);
2693 extern __kernel_size_t strlen(const char *);
2696 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
2699 extern char * strpbrk(const char *,const char *);
2702 extern char * strsep(char **,const char *);
2705 extern __kernel_size_t strspn(const char *,const char *);
2708 extern __kernel_size_t strcspn(const char *,const char *);
2709 # 92 "include/linux/string.h"
2710 extern void * memscan(void *,int,__kernel_size_t);
2713 extern int memcmp(const void *,const void *,__kernel_size_t);
2719 extern char *kstrdup(const char *s, gfp_t gfp);
2720 # 9 "include/linux/bitmap.h" 2
2721 # 83 "include/linux/bitmap.h"
2722 extern int __bitmap_empty(const unsigned long *bitmap, int bits);
2723 extern int __bitmap_full(const unsigned long *bitmap, int bits);
2724 extern int __bitmap_equal(const unsigned long *bitmap1,
2725 const unsigned long *bitmap2, int bits);
2726 extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
2728 extern void __bitmap_shift_right(unsigned long *dst,
2729 const unsigned long *src, int shift, int bits);
2730 extern void __bitmap_shift_left(unsigned long *dst,
2731 const unsigned long *src, int shift, int bits);
2732 extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
2733 const unsigned long *bitmap2, int bits);
2734 extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
2735 const unsigned long *bitmap2, int bits);
2736 extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
2737 const unsigned long *bitmap2, int bits);
2738 extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
2739 const unsigned long *bitmap2, int bits);
2740 extern int __bitmap_intersects(const unsigned long *bitmap1,
2741 const unsigned long *bitmap2, int bits);
2742 extern int __bitmap_subset(const unsigned long *bitmap1,
2743 const unsigned long *bitmap2, int bits);
2744 extern int __bitmap_weight(const unsigned long *bitmap, int bits);
2746 extern int bitmap_scnprintf(char *buf, unsigned int len,
2747 const unsigned long *src, int nbits);
2748 extern int bitmap_parse(const char *ubuf, unsigned int ulen,
2749 unsigned long *dst, int nbits);
2750 extern int bitmap_scnlistprintf(char *buf, unsigned int len,
2751 const unsigned long *src, int nbits);
2752 extern int bitmap_parselist(const char *buf, unsigned long *maskp,
2754 extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
2755 const unsigned long *old, const unsigned long *new, int bits);
2756 extern int bitmap_bitremap(int oldbit,
2757 const unsigned long *old, const unsigned long *new, int bits);
2758 extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
2759 extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
2760 extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
2768 static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits)
2773 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2774 ({ void *__p = (dst); size_t __n = len; if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
2778 static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits)
2780 size_t nlongs = (((nbits)+32 -1)/32);
2782 int len = (nlongs - 1) * sizeof(unsigned long);
2783 ({ void *__p = (dst); size_t __n = len; if ((__n) != 0) { if (__builtin_constant_p((0xff)) && (0xff) == 0) __memzero((__p),(__n)); else memset((__p),(0xff),(__n)); } (__p); });
2785 dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2788 static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src,
2794 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2795 memcpy(dst, src, len);
2799 static inline __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *src1,
2800 const unsigned long *src2, int nbits)
2803 *dst = *src1 & *src2;
2805 __bitmap_and(dst, src1, src2, nbits);
2808 static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1,
2809 const unsigned long *src2, int nbits)
2812 *dst = *src1 | *src2;
2814 __bitmap_or(dst, src1, src2, nbits);
2817 static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1,
2818 const unsigned long *src2, int nbits)
2821 *dst = *src1 ^ *src2;
2823 __bitmap_xor(dst, src1, src2, nbits);
2826 static inline __attribute__((always_inline)) void bitmap_andnot(unsigned long *dst, const unsigned long *src1,
2827 const unsigned long *src2, int nbits)
2830 *dst = *src1 & ~(*src2);
2832 __bitmap_andnot(dst, src1, src2, nbits);
2835 static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src,
2839 *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2841 __bitmap_complement(dst, src, nbits);
2844 static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1,
2845 const unsigned long *src2, int nbits)
2848 return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2850 return __bitmap_equal(src1, src2, nbits);
2853 static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1,
2854 const unsigned long *src2, int nbits)
2857 return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0;
2859 return __bitmap_intersects(src1, src2, nbits);
2862 static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1,
2863 const unsigned long *src2, int nbits)
2866 return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2868 return __bitmap_subset(src1, src2, nbits);
2871 static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits)
2874 return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2876 return __bitmap_empty(src, nbits);
2879 static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits)
2882 return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2884 return __bitmap_full(src, nbits);
2887 static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits)
2890 return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2891 return __bitmap_weight(src, nbits);
2894 static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst,
2895 const unsigned long *src, int n, int nbits)
2900 __bitmap_shift_right(dst, src, n, nbits);
2903 static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst,
2904 const unsigned long *src, int n, int nbits)
2907 *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2909 __bitmap_shift_left(dst, src, n, nbits);
2911 # 87 "include/linux/cpumask.h" 2
2913 typedef struct { unsigned long bits[(((1)+32 -1)/32)]; } cpumask_t;
2914 extern cpumask_t _unused_cpumask_arg_;
2917 static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp)
2919 (__builtin_constant_p(cpu) ? ____atomic_set_bit(cpu, dstp->bits) : _set_bit_le(cpu,dstp->bits));
2923 static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp)
2925 (__builtin_constant_p(cpu) ? ____atomic_clear_bit(cpu, dstp->bits) : _clear_bit_le(cpu,dstp->bits));
2929 static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits)
2931 bitmap_fill(dstp->bits, nbits);
2935 static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits)
2937 bitmap_zero(dstp->bits, nbits);
2944 static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr)
2946 return (__builtin_constant_p(cpu) ? ____atomic_test_and_set_bit(cpu, addr->bits) : _test_and_set_bit_le(cpu,addr->bits));
2950 static inline __attribute__((always_inline)) void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
2951 const cpumask_t *src2p, int nbits)
2953 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
2957 static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
2958 const cpumask_t *src2p, int nbits)
2960 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
2964 static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
2965 const cpumask_t *src2p, int nbits)
2967 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
2972 static inline __attribute__((always_inline)) void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
2973 const cpumask_t *src2p, int nbits)
2975 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
2979 static inline __attribute__((always_inline)) void __cpus_complement(cpumask_t *dstp,
2980 const cpumask_t *srcp, int nbits)
2982 bitmap_complement(dstp->bits, srcp->bits, nbits);
2986 static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p,
2987 const cpumask_t *src2p, int nbits)
2989 return bitmap_equal(src1p->bits, src2p->bits, nbits);
2993 static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p,
2994 const cpumask_t *src2p, int nbits)
2996 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
3000 static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p,
3001 const cpumask_t *src2p, int nbits)
3003 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3007 static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits)
3009 return bitmap_empty(srcp->bits, nbits);
3013 static inline __attribute__((always_inline)) int __cpus_full(const cpumask_t *srcp, int nbits)
3015 return bitmap_full(srcp->bits, nbits);
3019 static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits)
3021 return bitmap_weight(srcp->bits, nbits);
3026 static inline __attribute__((always_inline)) void __cpus_shift_right(cpumask_t *dstp,
3027 const cpumask_t *srcp, int n, int nbits)
3029 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3034 static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp,
3035 const cpumask_t *srcp, int n, int nbits)
3037 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3039 # 270 "include/linux/cpumask.h"
3040 static inline __attribute__((always_inline)) int __cpumask_scnprintf(char *buf, int len,
3041 const cpumask_t *srcp, int nbits)
3043 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3048 static inline __attribute__((always_inline)) int __cpumask_parse(const char *buf, int len,
3049 cpumask_t *dstp, int nbits)
3051 return bitmap_parse(buf, len, dstp->bits, nbits);
3056 static inline __attribute__((always_inline)) int __cpulist_scnprintf(char *buf, int len,
3057 const cpumask_t *srcp, int nbits)
3059 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3063 static inline __attribute__((always_inline)) int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
3065 return bitmap_parselist(buf, dstp->bits, nbits);
3070 static inline __attribute__((always_inline)) int __cpu_remap(int oldbit,
3071 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
3073 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3078 static inline __attribute__((always_inline)) void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp,
3079 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
3081 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3083 # 380 "include/linux/cpumask.h"
3084 extern cpumask_t cpu_possible_map;
3085 extern cpumask_t cpu_online_map;
3086 extern cpumask_t cpu_present_map;
3087 # 53 "include/linux/sched.h" 2
3088 # 1 "include/linux/errno.h" 1
3092 # 1 "include/asm/errno.h" 1
3096 # 1 "include/asm-generic/errno.h" 1
3100 # 1 "include/asm-generic/errno-base.h" 1
3101 # 5 "include/asm-generic/errno.h" 2
3102 # 5 "include/asm/errno.h" 2
3103 # 5 "include/linux/errno.h" 2
3104 # 54 "include/linux/sched.h" 2
3105 # 1 "include/linux/nodemask.h" 1
3106 # 86 "include/linux/nodemask.h"
3107 # 1 "include/linux/numa.h" 1
3108 # 87 "include/linux/nodemask.h" 2
3110 typedef struct { unsigned long bits[((((1 << 0))+32 -1)/32)]; } nodemask_t;
3111 extern nodemask_t _unused_nodemask_arg_;
3114 static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp)
3116 (__builtin_constant_p(node) ? ____atomic_set_bit(node, dstp->bits) : _set_bit_le(node,dstp->bits));
3120 static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp)
3122 (__builtin_constant_p(node) ? ____atomic_clear_bit(node, dstp->bits) : _clear_bit_le(node,dstp->bits));
3126 static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits)
3128 bitmap_fill(dstp->bits, nbits);
3132 static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits)
3134 bitmap_zero(dstp->bits, nbits);
3142 static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr)
3144 return (__builtin_constant_p(node) ? ____atomic_test_and_set_bit(node, addr->bits) : _test_and_set_bit_le(node,addr->bits));
3149 static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
3150 const nodemask_t *src2p, int nbits)
3152 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
3157 static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
3158 const nodemask_t *src2p, int nbits)
3160 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
3165 static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
3166 const nodemask_t *src2p, int nbits)
3168 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
3173 static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
3174 const nodemask_t *src2p, int nbits)
3176 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
3181 static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp,
3182 const nodemask_t *srcp, int nbits)
3184 bitmap_complement(dstp->bits, srcp->bits, nbits);
3189 static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p,
3190 const nodemask_t *src2p, int nbits)
3192 return bitmap_equal(src1p->bits, src2p->bits, nbits);
3197 static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p,
3198 const nodemask_t *src2p, int nbits)
3200 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
3205 static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p,
3206 const nodemask_t *src2p, int nbits)
3208 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3212 static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits)
3214 return bitmap_empty(srcp->bits, nbits);
3218 static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits)
3220 return bitmap_full(srcp->bits, nbits);
3224 static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits)
3226 return bitmap_weight(srcp->bits, nbits);
3231 static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp,
3232 const nodemask_t *srcp, int n, int nbits)
3234 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3239 static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp,
3240 const nodemask_t *srcp, int n, int nbits)
3242 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3249 static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp)
3251 return ({ int __x = ((1 << 0)); int __y = (_find_first_bit_le(srcp->bits,(1 << 0))); __x < __y ? __x: __y; });
3255 static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp)
3257 return ({ int __x = ((1 << 0)); int __y = (_find_next_bit_le(srcp->bits,(1 << 0),n+1)); __x < __y ? __x: __y; });
3259 # 251 "include/linux/nodemask.h"
3260 static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp)
3262 return ({ int __x = ((1 << 0)); int __y = (_find_first_zero_bit_le(maskp->bits,(1 << 0))); __x < __y ? __x: __y; });
3265 # 285 "include/linux/nodemask.h"
3266 static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len,
3267 const nodemask_t *srcp, int nbits)
3269 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3274 static inline __attribute__((always_inline)) int __nodemask_parse(const char *buf, int len,
3275 nodemask_t *dstp, int nbits)
3277 return bitmap_parse(buf, len, dstp->bits, nbits);
3282 static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len,
3283 const nodemask_t *srcp, int nbits)
3285 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3289 static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
3291 return bitmap_parselist(buf, dstp->bits, nbits);
3296 static inline __attribute__((always_inline)) int __node_remap(int oldbit,
3297 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3299 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3304 static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp,
3305 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3307 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3309 # 345 "include/linux/nodemask.h"
3310 extern nodemask_t node_online_map;
3311 extern nodemask_t node_possible_map;
3312 # 55 "include/linux/sched.h" 2
3315 # 1 "include/asm/semaphore.h" 1
3316 # 9 "include/asm/semaphore.h"
3317 # 1 "include/linux/wait.h" 1
3318 # 28 "include/linux/wait.h"
3319 typedef struct __wait_queue wait_queue_t;
3320 typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key);
3321 int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3323 struct __wait_queue {
3327 wait_queue_func_t func;
3328 struct list_head task_list;
3331 struct wait_bit_key {
3336 struct wait_bit_queue {
3337 struct wait_bit_key key;
3341 struct __wait_queue_head {
3343 struct list_head task_list;
3345 typedef struct __wait_queue_head wait_queue_head_t;
3348 # 80 "include/linux/wait.h"
3349 extern void init_waitqueue_head(wait_queue_head_t *q);
3351 static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
3355 q->func = default_wake_function;
3358 static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q,
3359 wait_queue_func_t func)
3362 q->private = ((void *)0);
3366 static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q)
3368 return !list_empty(&q->task_list);
3370 # 111 "include/linux/wait.h"
3371 extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
3372 extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait);
3373 extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
3375 static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
3377 list_add(&new->task_list, &head->task_list);
3383 static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head,
3386 list_add_tail(&new->task_list, &head->task_list);
3389 static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head,
3392 list_del(&old->task_list);
3395 void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
3396 extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
3397 extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
3398 void __wake_up_bit(wait_queue_head_t *, void *, int);
3399 int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
3400 int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
3401 void wake_up_bit(void *, int);
3402 int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned);
3403 int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned);
3404 wait_queue_head_t *bit_waitqueue(void *, int);
3405 # 342 "include/linux/wait.h"
3406 static inline __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
3407 wait_queue_t * wait)
3409 wait->flags |= 0x01;
3410 __add_wait_queue_tail(q, wait);
3416 static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q,
3417 wait_queue_t * wait)
3419 __remove_wait_queue(q, wait);
3427 extern void sleep_on(wait_queue_head_t *q);
3428 extern long sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3430 extern void interruptible_sleep_on(wait_queue_head_t *q);
3431 extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3437 void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
3439 void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
3441 void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
3442 int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3443 int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3444 # 420 "include/linux/wait.h"
3445 static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit,
3446 int (*action)(void *), unsigned mode)
3448 if (!test_bit(bit, word))
3450 return out_of_line_wait_on_bit(word, bit, action, mode);
3452 # 444 "include/linux/wait.h"
3453 static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit,
3454 int (*action)(void *), unsigned mode)
3456 if (!(__builtin_constant_p(bit) ? ____atomic_test_and_set_bit(bit, word) : _test_and_set_bit_le(bit,word)))
3458 return out_of_line_wait_on_bit_lock(word, bit, action, mode);
3460 # 10 "include/asm/semaphore.h" 2
3461 # 1 "include/linux/rwsem.h" 1
3462 # 19 "include/linux/rwsem.h"
3463 struct rw_semaphore;
3466 # 1 "include/linux/rwsem-spinlock.h" 1
3467 # 22 "include/linux/rwsem-spinlock.h"
3468 struct rwsem_waiter;
3469 # 31 "include/linux/rwsem-spinlock.h"
3470 struct rw_semaphore {
3472 spinlock_t wait_lock;
3473 struct list_head wait_list;
3478 # 52 "include/linux/rwsem-spinlock.h"
3479 extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
3480 struct lock_class_key *key);
3481 # 62 "include/linux/rwsem-spinlock.h"
3482 extern void __down_read(struct rw_semaphore *sem);
3483 extern int __down_read_trylock(struct rw_semaphore *sem);
3484 extern void __down_write(struct rw_semaphore *sem);
3485 extern void __down_write_nested(struct rw_semaphore *sem, int subclass);
3486 extern int __down_write_trylock(struct rw_semaphore *sem);
3487 extern void __up_read(struct rw_semaphore *sem);
3488 extern void __up_write(struct rw_semaphore *sem);
3489 extern void __downgrade_write(struct rw_semaphore *sem);
3491 static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem)
3493 return (sem->activity != 0);
3495 # 23 "include/linux/rwsem.h" 2
3503 extern void down_read(struct rw_semaphore *sem);
3508 extern int down_read_trylock(struct rw_semaphore *sem);
3513 extern void down_write(struct rw_semaphore *sem);
3518 extern int down_write_trylock(struct rw_semaphore *sem);
3523 extern void up_read(struct rw_semaphore *sem);
3528 extern void up_write(struct rw_semaphore *sem);
3533 extern void downgrade_write(struct rw_semaphore *sem);
3534 # 11 "include/asm/semaphore.h" 2
3537 # 1 "include/asm/locks.h" 1
3538 # 14 "include/asm/semaphore.h" 2
3543 wait_queue_head_t wait;
3545 # 33 "include/asm/semaphore.h"
3546 static inline __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val)
3548 (((&sem->count)->counter) = (val));
3550 init_waitqueue_head(&sem->wait);
3553 static inline __attribute__((always_inline)) void init_MUTEX(struct semaphore *sem)
3558 static inline __attribute__((always_inline)) void init_MUTEX_LOCKED(struct semaphore *sem)
3566 void __down_failed(void);
3567 int __down_interruptible_failed(void);
3568 int __down_trylock_failed(void);
3569 void __up_wakeup(void);
3571 extern void __down(struct semaphore * sem);
3572 extern int __down_interruptible(struct semaphore * sem);
3573 extern int __down_trylock(struct semaphore * sem);
3574 extern void __up(struct semaphore * sem);
3580 static inline __attribute__((always_inline)) void down(struct semaphore * sem)
3582 do { do { } while (0); } while (0);
3583 ({ __asm__ __volatile__( "@ down_op\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%0]\n" " subs lr, lr, %1\n" " str lr, [%0]\n" " msr cpsr_c, ip\n" " movmi ip, %0\n" " blmi " "__down_failed" : : "r" (sem), "I" (1) : "ip", "lr", "cc"); __asm__ __volatile__("": : :"memory"); });
3590 static inline __attribute__((always_inline)) int down_interruptible (struct semaphore * sem)
3592 do { do { } while (0); } while (0);
3593 return ({ unsigned int ret; __asm__ __volatile__( "@ down_op_ret\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%1]\n" " subs lr, lr, %2\n" " str lr, [%1]\n" " msr cpsr_c, ip\n" " movmi ip, %1\n" " movpl ip, #0\n" " blmi " "__down_interruptible_failed" "\n" " mov %0, ip" : "=&r" (ret) : "r" (sem), "I" (1) : "ip", "lr", "cc"); __asm__ __volatile__("": : :"memory"); ret; });
3596 static inline __attribute__((always_inline)) int down_trylock(struct semaphore *sem)
3598 return ({ unsigned int ret; __asm__ __volatile__( "@ down_op_ret\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%1]\n" " subs lr, lr, %2\n" " str lr, [%1]\n" " msr cpsr_c, ip\n" " movmi ip, %1\n" " movpl ip, #0\n" " blmi " "__down_trylock_failed" "\n" " mov %0, ip" : "=&r" (ret) : "r" (sem), "I" (1) : "ip", "lr", "cc"); __asm__ __volatile__("": : :"memory"); ret; });
3607 static inline __attribute__((always_inline)) void up(struct semaphore * sem)
3609 ({ __asm__ __volatile__("": : :"memory"); __asm__ __volatile__( "@ up_op\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%0]\n" " adds lr, lr, %1\n" " str lr, [%0]\n" " msr cpsr_c, ip\n" " movle ip, %0\n" " blle " "__up_wakeup" : : "r" (sem), "I" (1) : "ip", "lr", "cc"); });
3611 # 58 "include/linux/sched.h" 2
3612 # 1 "include/asm/page.h" 1
3613 # 32 "include/asm/page.h"
3614 # 1 "include/asm/glue.h" 1
3615 # 33 "include/asm/page.h" 2
3616 # 109 "include/asm/page.h"
3617 struct cpu_user_fns {
3618 void (*cpu_clear_user_page)(void *p, unsigned long user);
3619 void (*cpu_copy_user_page)(void *to, const void *from,
3620 unsigned long user);
3622 # 126 "include/asm/page.h"
3623 extern void xsc3_mc_clear_user_page(void *p, unsigned long user);
3624 extern void xsc3_mc_copy_user_page(void *to, const void *from,
3625 unsigned long user);
3632 extern void copy_page(void *to, const void *from);
3633 # 161 "include/asm/page.h"
3634 typedef unsigned long pte_t;
3635 typedef unsigned long pmd_t;
3636 typedef unsigned long pgd_t[2];
3637 typedef unsigned long pgprot_t;
3638 # 178 "include/asm/page.h"
3639 extern pmd_t *top_pmd;
3643 # 1 "include/asm/memory.h" 1
3644 # 27 "include/asm/memory.h"
3645 # 1 "include/asm/arch/memory.h" 1
3649 # 1 "include/linux/config.h" 1
3655 # 1 "include/linux/autoconf.h" 1
3656 # 7 "include/linux/config.h" 2
3657 # 5 "include/asm/arch/memory.h" 2
3658 # 28 "include/asm/memory.h" 2
3659 # 1 "include/asm/sizes.h" 1
3660 # 29 "include/asm/memory.h" 2
3661 # 168 "include/asm/memory.h"
3662 static inline __attribute__((always_inline)) unsigned long virt_to_phys(void *x)
3664 return (((unsigned long)(x)) - (0x40000000UL) + (0x00000000UL));
3667 static inline __attribute__((always_inline)) void *phys_to_virt(unsigned long x)
3669 return (void *)((((unsigned long)(x)) - (0x00000000UL) + (0x40000000UL)));
3671 # 191 "include/asm/memory.h"
3672 static inline __attribute__((always_inline)) __attribute__((deprecated)) unsigned long virt_to_bus(void *x)
3674 return ((((unsigned long)x) - (0x40000000UL) + (0x00000000UL)));
3677 static inline __attribute__((always_inline)) __attribute__((deprecated)) void *bus_to_virt(unsigned long x)
3679 return (void *)(((x) - (0x00000000UL) + (0x40000000UL)));
3681 # 290 "include/asm/memory.h"
3682 # 1 "include/asm-generic/memory_model.h" 1
3683 # 291 "include/asm/memory.h" 2
3684 # 183 "include/asm/page.h" 2
3685 # 196 "include/asm/page.h"
3686 # 1 "include/asm-generic/page.h" 1
3687 # 10 "include/asm-generic/page.h"
3688 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) int get_order(unsigned long size)
3692 size = (size - 1) >> (12 - 1);
3700 # 197 "include/asm/page.h" 2
3701 # 59 "include/linux/sched.h" 2
3703 # 1 "include/asm/mmu.h" 1
3713 unsigned int kvm_seq;
3715 # 61 "include/linux/sched.h" 2
3716 # 1 "include/asm/cputime.h" 1
3720 # 1 "include/asm-generic/cputime.h" 1
3727 typedef unsigned long cputime_t;
3728 # 23 "include/asm-generic/cputime.h"
3729 typedef u64 cputime64_t;
3730 # 5 "include/asm/cputime.h" 2
3731 # 62 "include/linux/sched.h" 2
3733 # 1 "include/linux/smp.h" 1
3734 # 10 "include/linux/smp.h"
3735 extern void cpu_idle(void);
3736 # 84 "include/linux/smp.h"
3737 static inline __attribute__((always_inline)) int up_smp_call_function(void)
3741 # 96 "include/linux/smp.h"
3742 static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) { }
3743 # 128 "include/linux/smp.h"
3744 void smp_setup_processor_id(void);
3745 # 64 "include/linux/sched.h" 2
3746 # 1 "include/linux/sem.h" 1
3750 # 1 "include/linux/ipc.h" 1
3751 # 9 "include/linux/ipc.h"
3757 __kernel_uid_t cuid;
3758 __kernel_gid_t cgid;
3759 __kernel_mode_t mode;
3764 # 1 "include/asm/ipcbuf.h" 1
3765 # 14 "include/asm/ipcbuf.h"
3769 __kernel_uid32_t uid;
3770 __kernel_gid32_t gid;
3771 __kernel_uid32_t cuid;
3772 __kernel_gid32_t cgid;
3773 __kernel_mode_t mode;
3774 unsigned short __pad1;
3776 unsigned short __pad2;
3777 unsigned long __unused1;
3778 unsigned long __unused2;
3780 # 22 "include/linux/ipc.h" 2
3781 # 57 "include/linux/ipc.h"
3782 struct kern_ipc_perm
3795 # 5 "include/linux/sem.h" 2
3796 # 23 "include/linux/sem.h"
3798 struct ipc_perm sem_perm;
3799 __kernel_time_t sem_otime;
3800 __kernel_time_t sem_ctime;
3801 struct sem *sem_base;
3802 struct sem_queue *sem_pending;
3803 struct sem_queue **sem_pending_last;
3804 struct sem_undo *undo;
3805 unsigned short sem_nsems;
3809 # 1 "include/asm/sembuf.h" 1
3810 # 14 "include/asm/sembuf.h"
3812 struct ipc64_perm sem_perm;
3813 __kernel_time_t sem_otime;
3814 unsigned long __unused1;
3815 __kernel_time_t sem_ctime;
3816 unsigned long __unused2;
3817 unsigned long sem_nsems;
3818 unsigned long __unused3;
3819 unsigned long __unused4;
3821 # 36 "include/linux/sem.h" 2
3825 unsigned short sem_num;
3833 struct semid_ds *buf;
3834 unsigned short *array;
3835 struct seminfo *__buf;
3851 # 82 "include/linux/sem.h"
3862 struct kern_ipc_perm sem_perm;
3866 struct sem *sem_base;
3867 struct sem_queue *sem_pending;
3868 struct sem_queue **sem_pending_last;
3869 struct sem_undo *undo;
3870 unsigned long sem_nsems;
3875 struct sem_queue * next;
3876 struct sem_queue ** prev;
3877 struct task_struct* sleeper;
3878 struct sem_undo * undo;
3881 struct sem_array * sma;
3883 struct sembuf * sops;
3892 struct sem_undo * proc_next;
3893 struct sem_undo * id_next;
3901 struct sem_undo_list {
3904 struct sem_undo *proc_list;
3908 struct sem_undo_list *undo_list;
3913 extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
3914 extern void exit_sem(struct task_struct *tsk);
3915 # 65 "include/linux/sched.h" 2
3916 # 1 "include/linux/signal.h" 1
3920 # 1 "include/asm/signal.h" 1
3928 # 17 "include/asm/signal.h"
3929 typedef unsigned long old_sigset_t;
3932 unsigned long sig[(64 / 32)];
3934 # 114 "include/asm/signal.h"
3935 # 1 "include/asm-generic/signal.h" 1
3936 # 17 "include/asm-generic/signal.h"
3937 typedef void __signalfn_t(int);
3938 typedef __signalfn_t *__sighandler_t;
3940 typedef void __restorefn_t(void);
3941 typedef __restorefn_t *__sigrestore_t;
3942 # 115 "include/asm/signal.h" 2
3945 struct old_sigaction {
3946 __sighandler_t sa_handler;
3947 old_sigset_t sa_mask;
3948 unsigned long sa_flags;
3949 __sigrestore_t sa_restorer;
3953 __sighandler_t sa_handler;
3954 unsigned long sa_flags;
3955 __sigrestore_t sa_restorer;
3959 struct k_sigaction {
3960 struct sigaction sa;
3962 # 153 "include/asm/signal.h"
3963 typedef struct sigaltstack {
3970 # 1 "include/asm/sigcontext.h" 1
3971 # 9 "include/asm/sigcontext.h"
3973 unsigned long trap_no;
3974 unsigned long error_code;
3975 unsigned long oldmask;
3976 unsigned long arm_r0;
3977 unsigned long arm_r1;
3978 unsigned long arm_r2;
3979 unsigned long arm_r3;
3980 unsigned long arm_r4;
3981 unsigned long arm_r5;
3982 unsigned long arm_r6;
3983 unsigned long arm_r7;
3984 unsigned long arm_r8;
3985 unsigned long arm_r9;
3986 unsigned long arm_r10;
3987 unsigned long arm_fp;
3988 unsigned long arm_ip;
3989 unsigned long arm_sp;
3990 unsigned long arm_lr;
3991 unsigned long arm_pc;
3992 unsigned long arm_cpsr;
3993 unsigned long fault_address;
3995 # 161 "include/asm/signal.h" 2
3996 # 5 "include/linux/signal.h" 2
3997 # 1 "include/asm/siginfo.h" 1
4001 # 1 "include/asm-generic/siginfo.h" 1
4008 typedef union sigval {
4012 # 40 "include/asm-generic/siginfo.h"
4013 typedef struct siginfo {
4019 int _pad[((128 - (3 * sizeof(int))) / sizeof(int))];
4031 char _pad[sizeof( uid_t) - sizeof(int)];
4067 # 251 "include/asm-generic/siginfo.h"
4068 typedef struct sigevent {
4069 sigval_t sigev_value;
4073 int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))];
4077 void (*_function)(sigval_t);
4090 void do_schedule_next_timer(struct siginfo *info);
4096 static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from)
4098 if (from->si_code < 0)
4099 memcpy(to, from, sizeof(*to));
4102 memcpy(to, from, (3 * sizeof(int)) + sizeof(from->_sifields._sigchld));
4107 extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from);
4108 # 5 "include/asm/siginfo.h" 2
4109 # 6 "include/linux/signal.h" 2
4110 # 15 "include/linux/signal.h"
4112 struct list_head list;
4115 struct user_struct *user;
4122 struct list_head list;
4125 # 39 "include/linux/signal.h"
4126 static inline __attribute__((always_inline)) void sigaddset(sigset_t *set, int _sig)
4128 unsigned long sig = _sig - 1;
4130 set->sig[0] |= 1UL << sig;
4132 set->sig[sig / 32] |= 1UL << (sig % 32);
4135 static inline __attribute__((always_inline)) void sigdelset(sigset_t *set, int _sig)
4137 unsigned long sig = _sig - 1;
4139 set->sig[0] &= ~(1UL << sig);
4141 set->sig[sig / 32] &= ~(1UL << (sig % 32));
4144 static inline __attribute__((always_inline)) int sigismember(sigset_t *set, int _sig)
4146 unsigned long sig = _sig - 1;
4148 return 1 & (set->sig[0] >> sig);
4150 return 1 & (set->sig[sig / 32] >> (sig % 32));
4153 static inline __attribute__((always_inline)) int sigfindinword(unsigned long word)
4155 return (({ unsigned long __t = (~(~word)); ( __builtin_constant_p(__t & -__t) ? constant_fls(__t & -__t) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(__t & -__t) : "cc"); 32-__r; }) ); }) - 1);
4160 static inline __attribute__((always_inline)) int sigisemptyset(sigset_t *set)
4162 extern void _NSIG_WORDS_is_unsupported_size(void);
4163 switch ((64 / 32)) {
4165 return (set->sig[3] | set->sig[2] |
4166 set->sig[1] | set->sig[0]) == 0;
4168 return (set->sig[1] | set->sig[0]) == 0;
4170 return set->sig[0] == 0;
4172 _NSIG_WORDS_is_unsupported_size();
4176 # 120 "include/linux/signal.h"
4177 static 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(); } }
4180 static 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(); } }
4183 static 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(); } }
4184 # 150 "include/linux/signal.h"
4185 static 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(); } }
4190 static inline __attribute__((always_inline)) void sigemptyset(sigset_t *set)
4192 switch ((64 / 32)) {
4194 ({ void *__p = (set); size_t __n = sizeof(sigset_t); if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
4196 case 2: set->sig[1] = 0;
4197 case 1: set->sig[0] = 0;
4202 static inline __attribute__((always_inline)) void sigfillset(sigset_t *set)
4204 switch ((64 / 32)) {
4206 ({ void *__p = (set); size_t __n = sizeof(sigset_t); if ((__n) != 0) { if (__builtin_constant_p((-1)) && (-1) == 0) __memzero((__p),(__n)); else memset((__p),(-1),(__n)); } (__p); });
4208 case 2: set->sig[1] = -1;
4209 case 1: set->sig[0] = -1;
4216 static inline __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask)
4218 set->sig[0] |= mask;
4221 static inline __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask)
4223 set->sig[0] &= ~mask;
4226 static inline __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask)
4228 return (set->sig[0] & mask) != 0;
4231 static inline __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask)
4234 switch ((64 / 32)) {
4236 ({ void *__p = (&set->sig[1]); size_t __n = sizeof(long)*((64 / 32)-1); if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
4238 case 2: set->sig[1] = 0;
4243 static inline __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask)
4245 set->sig[0] = ~mask;
4246 switch ((64 / 32)) {
4248 ({ void *__p = (&set->sig[1]); size_t __n = sizeof(long)*((64 / 32)-1); if ((__n) != 0) { if (__builtin_constant_p((-1)) && (-1) == 0) __memzero((__p),(__n)); else memset((__p),(-1),(__n)); } (__p); });
4250 case 2: set->sig[1] = -1;
4257 static inline __attribute__((always_inline)) void init_sigpending(struct sigpending *sig)
4259 sigemptyset(&sig->signal);
4260 INIT_LIST_HEAD(&sig->list);
4263 extern void flush_sigqueue(struct sigpending *queue);
4266 static inline __attribute__((always_inline)) int valid_signal(unsigned long sig)
4268 return sig <= 64 ? 1 : 0;
4271 extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
4272 extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
4273 extern long do_sigpending(void *, unsigned long);
4274 extern int sigprocmask(int, sigset_t *, sigset_t *);
4277 extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
4278 # 66 "include/linux/sched.h" 2
4279 # 1 "include/linux/securebits.h" 1
4285 extern unsigned securebits;
4286 # 67 "include/linux/sched.h" 2
4287 # 1 "include/linux/fs_struct.h" 1
4298 struct dentry * root, * pwd, * altroot;
4299 struct vfsmount * rootmnt, * pwdmnt, * altrootmnt;
4308 extern void exit_fs(struct task_struct *);
4309 extern void set_fs_altroot(void);
4310 extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *);
4311 extern void set_fs_pwd(struct fs_struct *, struct vfsmount *, struct dentry *);
4312 extern struct fs_struct *copy_fs_struct(struct fs_struct *);
4313 extern void put_fs_struct(struct fs_struct *);
4314 # 68 "include/linux/sched.h" 2
4316 # 1 "include/linux/completion.h" 1
4317 # 13 "include/linux/completion.h"
4320 wait_queue_head_t wait;
4322 # 39 "include/linux/completion.h"
4323 static inline __attribute__((always_inline)) void init_completion(struct completion *x)
4326 init_waitqueue_head(&x->wait);
4329 extern void wait_for_completion(struct completion *);
4330 extern int wait_for_completion_interruptible(struct completion *x);
4331 extern unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout);
4333 extern unsigned long wait_for_completion_interruptible_timeout( struct completion *x, unsigned long timeout);
4336 extern void complete(struct completion *);
4337 extern void complete_all(struct completion *);
4338 # 70 "include/linux/sched.h" 2
4339 # 1 "include/linux/pid.h" 1
4343 # 1 "include/linux/rcupdate.h" 1
4344 # 38 "include/linux/rcupdate.h"
4345 # 1 "include/linux/cache.h" 1
4346 # 39 "include/linux/rcupdate.h" 2
4349 # 1 "include/linux/percpu.h" 1
4353 # 1 "include/linux/slab.h" 1
4354 # 12 "include/linux/slab.h"
4355 typedef struct kmem_cache kmem_cache_t;
4357 # 1 "include/linux/gfp.h" 1
4361 # 1 "include/linux/mmzone.h" 1
4362 # 13 "include/linux/mmzone.h"
4363 # 1 "include/linux/init.h" 1
4364 # 63 "include/linux/init.h"
4365 typedef int (*initcall_t)(void);
4366 typedef void (*exitcall_t)(void);
4368 extern initcall_t __con_initcall_start[], __con_initcall_end[];
4369 extern initcall_t __security_initcall_start[], __security_initcall_end[];
4372 extern char saved_command_line[];
4375 extern void setup_arch(char **);
4376 # 113 "include/linux/init.h"
4377 struct obs_kernel_param {
4379 int (*setup_func)(char *);
4382 # 148 "include/linux/init.h"
4383 void __attribute__ ((__section__ (".init.text"))) parse_early_param(void);
4384 # 14 "include/linux/mmzone.h" 2
4385 # 27 "include/linux/mmzone.h"
4387 struct list_head free_list;
4388 unsigned long nr_free;
4392 # 49 "include/linux/mmzone.h"
4393 enum zone_stat_item {
4404 # 68 "include/linux/mmzone.h"
4405 NR_VM_ZONE_STAT_ITEMS };
4407 struct per_cpu_pages {
4411 struct list_head list;
4414 struct per_cpu_pageset {
4415 struct per_cpu_pages pcp[2];
4421 # 139 "include/linux/mmzone.h"
4424 unsigned long free_pages;
4425 unsigned long pages_min, pages_low, pages_high;
4426 # 151 "include/linux/mmzone.h"
4427 unsigned long lowmem_reserve[4];
4428 # 160 "include/linux/mmzone.h"
4429 struct per_cpu_pageset pageset[1];
4439 struct free_area free_area[11];
4445 spinlock_t lru_lock;
4446 struct list_head active_list;
4447 struct list_head inactive_list;
4448 unsigned long nr_scan_active;
4449 unsigned long nr_scan_inactive;
4450 unsigned long nr_active;
4451 unsigned long nr_inactive;
4452 unsigned long pages_scanned;
4453 int all_unreclaimable;
4456 atomic_t reclaim_in_progress;
4459 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
4460 # 208 "include/linux/mmzone.h"
4466 # 239 "include/linux/mmzone.h"
4467 wait_queue_head_t * wait_table;
4468 unsigned long wait_table_hash_nr_entries;
4469 unsigned long wait_table_bits;
4474 struct pglist_data *zone_pgdat;
4476 unsigned long zone_start_pfn;
4477 # 260 "include/linux/mmzone.h"
4478 unsigned long spanned_pages;
4479 unsigned long present_pages;
4486 # 288 "include/linux/mmzone.h"
4488 struct zone *zones[(1 << 0) * 4 + 1];
4490 # 304 "include/linux/mmzone.h"
4491 struct bootmem_data;
4492 typedef struct pglist_data {
4493 struct zone node_zones[4];
4494 struct zonelist node_zonelists[((0x07 + 1) / 2 + 1)];
4497 struct page *node_mem_map;
4499 struct bootmem_data *bdata;
4500 # 323 "include/linux/mmzone.h"
4501 unsigned long node_start_pfn;
4502 unsigned long node_present_pages;
4503 unsigned long node_spanned_pages;
4506 wait_queue_head_t kswapd_wait;
4507 struct task_struct *kswapd;
4508 int kswapd_max_order;
4510 # 342 "include/linux/mmzone.h"
4511 # 1 "include/linux/memory_hotplug.h" 1
4515 # 1 "include/linux/mmzone.h" 1
4516 # 5 "include/linux/memory_hotplug.h" 2
4519 # 1 "include/linux/notifier.h" 1
4520 # 13 "include/linux/notifier.h"
4521 # 1 "include/linux/mutex.h" 1
4522 # 47 "include/linux/mutex.h"
4526 spinlock_t wait_lock;
4527 struct list_head wait_list;
4528 # 60 "include/linux/mutex.h"
4535 struct mutex_waiter {
4536 struct list_head list;
4537 struct task_struct *task;
4543 # 105 "include/linux/mutex.h"
4544 extern void __mutex_init(struct mutex *lock, const char *name,
4545 struct lock_class_key *key);
4553 static inline __attribute__((always_inline)) int mutex_is_locked(struct mutex *lock)
4555 return ((&lock->count)->counter) != 1;
4562 extern void mutex_lock(struct mutex *lock);
4563 extern int mutex_lock_interruptible(struct mutex *lock);
4564 # 136 "include/linux/mutex.h"
4565 extern int mutex_trylock(struct mutex *lock);
4566 extern void mutex_unlock(struct mutex *lock);
4567 # 14 "include/linux/notifier.h" 2
4568 # 35 "include/linux/notifier.h"
4569 struct notifier_block {
4570 int (*notifier_call)(struct notifier_block *, unsigned long, void *);
4571 struct notifier_block *next;
4575 struct atomic_notifier_head {
4577 struct notifier_block *head;
4580 struct blocking_notifier_head {
4581 struct rw_semaphore rwsem;
4582 struct notifier_block *head;
4585 struct raw_notifier_head {
4586 struct notifier_block *head;
4588 # 88 "include/linux/notifier.h"
4589 extern int atomic_notifier_chain_register(struct atomic_notifier_head *,
4590 struct notifier_block *);
4591 extern int blocking_notifier_chain_register(struct blocking_notifier_head *,
4592 struct notifier_block *);
4593 extern int raw_notifier_chain_register(struct raw_notifier_head *,
4594 struct notifier_block *);
4596 extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *,
4597 struct notifier_block *);
4598 extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *,
4599 struct notifier_block *);
4600 extern int raw_notifier_chain_unregister(struct raw_notifier_head *,
4601 struct notifier_block *);
4603 extern int atomic_notifier_call_chain(struct atomic_notifier_head *,
4604 unsigned long val, void *v);
4605 extern int blocking_notifier_call_chain(struct blocking_notifier_head *,
4606 unsigned long val, void *v);
4607 extern int raw_notifier_call_chain(struct raw_notifier_head *,
4608 unsigned long val, void *v);
4609 # 8 "include/linux/memory_hotplug.h" 2
4614 # 140 "include/linux/memory_hotplug.h"
4615 static inline __attribute__((always_inline)) void pgdat_resize_lock(struct pglist_data *p, unsigned long *f) {}
4616 static inline __attribute__((always_inline)) void pgdat_resize_unlock(struct pglist_data *p, unsigned long *f) {}
4617 static inline __attribute__((always_inline)) void pgdat_resize_init(struct pglist_data *pgdat) {}
4619 static inline __attribute__((always_inline)) unsigned zone_span_seqbegin(struct zone *zone)
4623 static inline __attribute__((always_inline)) int zone_span_seqretry(struct zone *zone, unsigned iv)
4627 static inline __attribute__((always_inline)) void zone_span_writelock(struct zone *zone) {}
4628 static inline __attribute__((always_inline)) void zone_span_writeunlock(struct zone *zone) {}
4629 static inline __attribute__((always_inline)) void zone_seqlock_init(struct zone *zone) {}
4631 static inline __attribute__((always_inline)) int mhp_notimplemented(const char *func)
4633 printk("<4>" "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
4639 static inline __attribute__((always_inline)) int __remove_pages(struct zone *zone, unsigned long start_pfn,
4640 unsigned long nr_pages)
4642 printk("<4>" "%s() called, not yet supported\n", (__func__));
4647 extern int add_memory(int nid, u64 start, u64 size);
4648 extern int arch_add_memory(int nid, u64 start, u64 size);
4649 extern int remove_memory(u64 start, u64 size);
4650 # 343 "include/linux/mmzone.h" 2
4652 void __get_zone_counts(unsigned long *active, unsigned long *inactive,
4653 unsigned long *free, struct pglist_data *pgdat);
4654 void get_zone_counts(unsigned long *active, unsigned long *inactive,
4655 unsigned long *free);
4656 void build_all_zonelists(void);
4657 void wakeup_kswapd(struct zone *zone, int order);
4658 int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
4659 int classzone_idx, int alloc_flags);
4661 extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
4662 unsigned long size);
4667 static inline __attribute__((always_inline)) void memory_present(int nid, unsigned long start, unsigned long end) {}
4668 # 371 "include/linux/mmzone.h"
4669 static inline __attribute__((always_inline)) int populated_zone(struct zone *zone)
4671 return (!!zone->present_pages);
4674 static inline __attribute__((always_inline)) int is_highmem_idx(int idx)
4679 static inline __attribute__((always_inline)) int is_normal_idx(int idx)
4690 static inline __attribute__((always_inline)) int is_highmem(struct zone *zone)
4692 return zone == zone->zone_pgdat->node_zones + 3;
4695 static inline __attribute__((always_inline)) int is_normal(struct zone *zone)
4697 return zone == zone->zone_pgdat->node_zones + 2;
4700 static inline __attribute__((always_inline)) int is_dma32(struct zone *zone)
4702 return zone == zone->zone_pgdat->node_zones + 1;
4705 static inline __attribute__((always_inline)) int is_dma(struct zone *zone)
4707 return zone == zone->zone_pgdat->node_zones + 0;
4713 int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *,
4714 void *, size_t *, loff_t *);
4715 extern int sysctl_lowmem_reserve_ratio[4 -1];
4716 int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,
4717 void *, size_t *, loff_t *);
4718 int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *,
4719 void *, size_t *, loff_t *);
4720 int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
4721 struct file *, void *, size_t *, loff_t *);
4723 # 1 "include/linux/topology.h" 1
4724 # 34 "include/linux/topology.h"
4725 # 1 "include/asm/topology.h" 1
4729 # 1 "include/asm-generic/topology.h" 1
4730 # 5 "include/asm/topology.h" 2
4731 # 35 "include/linux/topology.h" 2
4732 # 426 "include/linux/mmzone.h" 2
4740 extern struct pglist_data contig_page_data;
4741 # 444 "include/linux/mmzone.h"
4742 extern struct pglist_data *first_online_pgdat(void);
4743 extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
4744 extern struct zone *next_zone(struct zone *zone);
4745 # 636 "include/linux/mmzone.h"
4746 void memory_present(int nid, unsigned long start, unsigned long end);
4747 unsigned long __attribute__ ((__section__ (".init.text"))) node_memmap_size_bytes(int, unsigned long, unsigned long);
4748 # 5 "include/linux/gfp.h" 2
4752 struct vm_area_struct;
4753 # 79 "include/linux/gfp.h"
4754 static inline __attribute__((always_inline)) int gfp_zone(gfp_t gfp)
4756 int zone = 0x07 & ( int) gfp;
4757 do { if (__builtin_expect(!!((zone >= ((0x07 + 1) / 2 + 1))!=0), 0)) __bug("include/linux/gfp.h", 82, ((void *)0)); } while(0);
4760 # 102 "include/linux/gfp.h"
4761 static inline __attribute__((always_inline)) void arch_free_page(struct page *page, int order) { }
4764 extern struct page *
4765 __alloc_pages(gfp_t, unsigned int, struct zonelist *);
4767 static inline __attribute__((always_inline)) struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
4770 if (__builtin_expect(!!(order >= 11), 0))
4777 return __alloc_pages(gfp_mask, order,
4778 (&contig_page_data)->node_zonelists + gfp_zone(gfp_mask));
4780 # 142 "include/linux/gfp.h"
4781 extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
4782 extern unsigned long get_zeroed_page(gfp_t gfp_mask);
4790 extern void __free_pages(struct page *page, unsigned int order);
4791 extern void free_pages(unsigned long addr, unsigned int order);
4792 extern void free_hot_page(struct page *page);
4793 extern void free_cold_page(struct page *page);
4798 void page_alloc_init(void);
4802 static inline __attribute__((always_inline)) void drain_node_pages(int node) { };
4803 # 15 "include/linux/slab.h" 2
4804 # 58 "include/linux/slab.h"
4805 extern void __attribute__ ((__section__ (".init.text"))) kmem_cache_init(void);
4807 extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
4808 void (*)(void *, kmem_cache_t *, unsigned long),
4809 void (*)(void *, kmem_cache_t *, unsigned long));
4810 extern int kmem_cache_destroy(kmem_cache_t *);
4811 extern int kmem_cache_shrink(kmem_cache_t *);
4812 extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
4813 extern void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
4814 extern void kmem_cache_free(kmem_cache_t *, void *);
4815 extern unsigned int kmem_cache_size(kmem_cache_t *);
4816 extern const char *kmem_cache_name(kmem_cache_t *);
4817 extern kmem_cache_t *kmem_find_general_cachep(size_t size, gfp_t gfpflags);
4820 struct cache_sizes {
4822 kmem_cache_t *cs_cachep;
4823 kmem_cache_t *cs_dmacachep;
4825 extern struct cache_sizes malloc_sizes[];
4827 extern void *__kmalloc(size_t, gfp_t);
4828 # 134 "include/linux/slab.h"
4829 static inline __attribute__((always_inline)) void *kmalloc(size_t size, gfp_t flags)
4831 if (__builtin_constant_p(size)) {
4838 # 1 "include/linux/kmalloc_sizes.h" 1
4840 if (size <= 32) goto found; else i++;
4842 if (size <= 64) goto found; else i++;
4844 if (size <= 96) goto found; else i++;
4846 if (size <= 128) goto found; else i++;
4848 if (size <= 192) goto found; else i++;
4850 if (size <= 256) goto found; else i++;
4851 if (size <= 512) goto found; else i++;
4852 if (size <= 1024) goto found; else i++;
4853 if (size <= 2048) goto found; else i++;
4854 if (size <= 4096) goto found; else i++;
4855 if (size <= 8192) goto found; else i++;
4856 if (size <= 16384) goto found; else i++;
4857 if (size <= 32768) goto found; else i++;
4858 if (size <= 65536) goto found; else i++;
4859 if (size <= 131072) goto found; else i++;
4860 # 144 "include/linux/slab.h" 2
4863 extern void __you_cannot_kmalloc_that_much(void);
4864 __you_cannot_kmalloc_that_much();
4867 return kmem_cache_alloc((flags & (( gfp_t)0x01u)) ?
4868 malloc_sizes[i].cs_dmacachep :
4869 malloc_sizes[i].cs_cachep, flags);
4871 return __kmalloc(size, flags);
4874 extern void *__kzalloc(size_t, gfp_t);
4881 static inline __attribute__((always_inline)) void *kzalloc(size_t size, gfp_t flags)
4883 if (__builtin_constant_p(size)) {
4890 # 1 "include/linux/kmalloc_sizes.h" 1
4892 if (size <= 32) goto found; else i++;
4894 if (size <= 64) goto found; else i++;
4896 if (size <= 96) goto found; else i++;
4898 if (size <= 128) goto found; else i++;
4900 if (size <= 192) goto found; else i++;
4902 if (size <= 256) goto found; else i++;
4903 if (size <= 512) goto found; else i++;
4904 if (size <= 1024) goto found; else i++;
4905 if (size <= 2048) goto found; else i++;
4906 if (size <= 4096) goto found; else i++;
4907 if (size <= 8192) goto found; else i++;
4908 if (size <= 16384) goto found; else i++;
4909 if (size <= 32768) goto found; else i++;
4910 if (size <= 65536) goto found; else i++;
4911 if (size <= 131072) goto found; else i++;
4912 # 174 "include/linux/slab.h" 2
4915 extern void __you_cannot_kzalloc_that_much(void);
4916 __you_cannot_kzalloc_that_much();
4919 return kmem_cache_zalloc((flags & (( gfp_t)0x01u)) ?
4920 malloc_sizes[i].cs_dmacachep :
4921 malloc_sizes[i].cs_cachep, flags);
4923 return __kzalloc(size, flags);
4932 static inline __attribute__((always_inline)) void *kcalloc(size_t n, size_t size, gfp_t flags)
4934 if (n != 0 && size > (~0UL) / n)
4936 return kzalloc(n * size, flags);
4939 extern void kfree(const void *);
4940 extern unsigned int ksize(const void *);
4941 extern int slab_is_available(void);
4947 static inline __attribute__((always_inline)) void *kmem_cache_alloc_node(kmem_cache_t *cachep, gfp_t flags, int node)
4949 return kmem_cache_alloc(cachep, flags);
4951 static inline __attribute__((always_inline)) void *kmalloc_node(size_t size, gfp_t flags, int node)
4953 return kmalloc(size, flags);
4957 extern int kmem_cache_reap(int);
4958 extern int kmem_ptr_validate(kmem_cache_t *cachep, void *ptr);
4959 # 258 "include/linux/slab.h"
4960 extern kmem_cache_t *vm_area_cachep;
4961 extern kmem_cache_t *names_cachep;
4962 extern kmem_cache_t *files_cachep;
4963 extern kmem_cache_t *filp_cachep;
4964 extern kmem_cache_t *fs_cachep;
4965 extern kmem_cache_t *sighand_cachep;
4966 extern kmem_cache_t *bio_cachep;
4968 extern atomic_t slab_reclaim_pages;
4969 # 5 "include/linux/percpu.h" 2
4972 # 1 "include/asm/percpu.h" 1
4976 # 1 "include/asm-generic/percpu.h" 1
4977 # 5 "include/asm/percpu.h" 2
4978 # 8 "include/linux/percpu.h" 2
4979 # 42 "include/linux/percpu.h"
4980 static inline __attribute__((always_inline)) void *__alloc_percpu(size_t size)
4982 void *ret = kmalloc(size, ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)));
4984 ({ void *__p = (ret); size_t __n = size; if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
4987 static inline __attribute__((always_inline)) void free_percpu(const void *ptr)
4991 # 42 "include/linux/rcupdate.h" 2
4992 # 50 "include/linux/rcupdate.h"
4994 struct rcu_head *next;
4995 void (*func)(struct rcu_head *head);
4997 # 64 "include/linux/rcupdate.h"
4998 struct rcu_ctrlblk {
5009 static inline __attribute__((always_inline)) int rcu_batch_before(long a, long b)
5015 static inline __attribute__((always_inline)) int rcu_batch_after(long a, long b)
5033 struct rcu_head *nxtlist;
5034 struct rcu_head **nxttail;
5036 struct rcu_head *curlist;
5037 struct rcu_head **curtail;
5038 struct rcu_head *donelist;
5039 struct rcu_head **donetail;
5042 struct rcu_head barrier;
5048 extern __typeof__(struct rcu_data) per_cpu__rcu_data;
5049 extern __typeof__(struct rcu_data) per_cpu__rcu_bh_data;
5057 static inline __attribute__((always_inline)) void rcu_qsctr_inc(int cpu)
5059 struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_data));
5060 rdp->passed_quiesc = 1;
5062 static inline __attribute__((always_inline)) void rcu_bh_qsctr_inc(int cpu)
5064 struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_bh_data));
5065 rdp->passed_quiesc = 1;
5068 extern int rcu_pending(int cpu);
5069 extern int rcu_needs_cpu(int cpu);
5070 # 273 "include/linux/rcupdate.h"
5071 extern void rcu_init(void);
5072 extern void rcu_check_callbacks(int cpu, int user);
5073 extern void rcu_restart_cpu(int cpu);
5074 extern long rcu_batches_completed(void);
5075 extern long rcu_batches_completed_bh(void);
5078 extern void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head));
5080 extern void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *head));
5082 extern void synchronize_rcu(void);
5083 void synchronize_idle(void);
5084 extern void rcu_barrier(void);
5085 # 5 "include/linux/pid.h" 2
5094 # 42 "include/linux/pid.h"
5100 struct hlist_node pid_chain;
5102 struct hlist_head tasks[PIDTYPE_MAX];
5103 struct rcu_head rcu;
5108 struct hlist_node node;
5112 static inline __attribute__((always_inline)) struct pid *get_pid(struct pid *pid)
5115 (void) atomic_add_return(1, &pid->count);
5119 extern void put_pid(struct pid *pid);
5120 extern struct task_struct *pid_task(struct pid *pid, enum pid_type);
5121 extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type);
5128 extern int attach_pid(struct task_struct *task, enum pid_type type, int nr);
5131 extern void detach_pid(struct task_struct *task, enum pid_type);
5137 extern struct pid *find_pid(int nr);
5142 extern struct pid *find_get_pid(int nr);
5144 extern struct pid *alloc_pid(void);
5145 extern void free_pid(struct pid *pid);
5146 # 71 "include/linux/sched.h" 2
5149 # 1 "include/linux/seccomp.h" 1
5150 # 28 "include/linux/seccomp.h"
5151 typedef struct { } seccomp_t;
5155 static inline __attribute__((always_inline)) int has_secure_computing(struct thread_info *ti)
5159 # 74 "include/linux/sched.h" 2
5161 # 1 "include/linux/futex.h" 1
5165 # 1 "include/linux/sched.h" 1
5166 # 5 "include/linux/futex.h" 2
5167 # 33 "include/linux/futex.h"
5168 struct robust_list {
5169 struct robust_list *next;
5171 # 45 "include/linux/futex.h"
5172 struct robust_list_head {
5176 struct robust_list list;
5185 # 69 "include/linux/futex.h"
5186 struct robust_list *list_op_pending;
5188 # 96 "include/linux/futex.h"
5189 long do_futex(u32 *uaddr, int op, u32 val, unsigned long timeout,
5190 u32 *uaddr2, u32 val2, u32 val3);
5193 handle_futex_death(u32 *uaddr, struct task_struct *curr, int pi);
5196 extern void exit_robust_list(struct task_struct *curr);
5197 extern void exit_pi_state_list(struct task_struct *curr);
5198 # 76 "include/linux/sched.h" 2
5199 # 1 "include/linux/rtmutex.h" 1
5200 # 16 "include/linux/rtmutex.h"
5201 # 1 "include/linux/plist.h" 1
5202 # 80 "include/linux/plist.h"
5204 struct list_head prio_list;
5205 struct list_head node_list;
5213 struct plist_head plist;
5215 # 128 "include/linux/plist.h"
5216 static inline __attribute__((always_inline)) void
5217 plist_head_init(struct plist_head *head, spinlock_t *lock)
5219 INIT_LIST_HEAD(&head->prio_list);
5220 INIT_LIST_HEAD(&head->node_list);
5232 static inline __attribute__((always_inline)) void plist_node_init(struct plist_node *node, int prio)
5235 plist_head_init(&node->plist, ((void *)0));
5238 extern void plist_add(struct plist_node *node, struct plist_head *head);
5239 extern void plist_del(struct plist_node *node, struct plist_head *head);
5240 # 200 "include/linux/plist.h"
5241 static inline __attribute__((always_inline)) int plist_head_empty(const struct plist_head *head)
5243 return list_empty(&head->node_list);
5251 static inline __attribute__((always_inline)) int plist_node_empty(const struct plist_node *node)
5253 return plist_head_empty(&node->plist);
5255 # 242 "include/linux/plist.h"
5256 static inline __attribute__((always_inline)) struct plist_node* plist_first(const struct plist_head *head)
5258 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) );});
5261 # 17 "include/linux/rtmutex.h" 2
5262 # 26 "include/linux/rtmutex.h"
5264 spinlock_t wait_lock;
5265 struct plist_head wait_list;
5266 struct task_struct *owner;
5275 struct rt_mutex_waiter;
5276 struct hrtimer_sleeper;
5283 static inline __attribute__((always_inline)) int rt_mutex_debug_check_no_locks_freed(const void *from,
5288 # 80 "include/linux/rtmutex.h"
5289 static inline __attribute__((always_inline)) int rt_mutex_is_locked(struct rt_mutex *lock)
5291 return lock->owner != ((void *)0);
5294 extern void __rt_mutex_init(struct rt_mutex *lock, const char *name);
5295 extern void rt_mutex_destroy(struct rt_mutex *lock);
5297 extern void rt_mutex_lock(struct rt_mutex *lock);
5298 extern int rt_mutex_lock_interruptible(struct rt_mutex *lock,
5299 int detect_deadlock);
5300 extern int rt_mutex_timed_lock(struct rt_mutex *lock,
5301 struct hrtimer_sleeper *timeout,
5302 int detect_deadlock);
5304 extern int rt_mutex_trylock(struct rt_mutex *lock);
5306 extern void rt_mutex_unlock(struct rt_mutex *lock);
5307 # 77 "include/linux/sched.h" 2
5310 # 1 "include/linux/param.h" 1
5311 # 80 "include/linux/sched.h" 2
5312 # 1 "include/linux/resource.h" 1
5319 # 23 "include/linux/resource.h"
5321 struct timeval ru_utime;
5322 struct timeval ru_stime;
5340 unsigned long rlim_cur;
5341 unsigned long rlim_max;
5343 # 70 "include/linux/resource.h"
5344 # 1 "include/asm/resource.h" 1
5348 # 1 "include/asm-generic/resource.h" 1
5349 # 5 "include/asm/resource.h" 2
5350 # 71 "include/linux/resource.h" 2
5352 int getrusage(struct task_struct *p, int who, struct rusage *ru);
5353 # 81 "include/linux/sched.h" 2
5354 # 1 "include/linux/timer.h" 1
5362 struct tvec_t_base_s;
5365 struct list_head entry;
5366 unsigned long expires;
5368 void (*function)(unsigned long);
5371 struct tvec_t_base_s *base;
5374 extern struct tvec_t_base_s boot_tvec_bases;
5375 # 33 "include/linux/timer.h"
5376 void init_timer(struct timer_list * timer);
5378 static inline __attribute__((always_inline)) void setup_timer(struct timer_list * timer,
5379 void (*function)(unsigned long),
5382 timer->function = function;
5386 # 54 "include/linux/timer.h"
5387 static inline __attribute__((always_inline)) int timer_pending(const struct timer_list * timer)
5389 return timer->entry.next != ((void *)0);
5392 extern void add_timer_on(struct timer_list *timer, int cpu);
5393 extern int del_timer(struct timer_list * timer);
5394 extern int __mod_timer(struct timer_list *timer, unsigned long expires);
5395 extern int mod_timer(struct timer_list *timer, unsigned long expires);
5397 extern unsigned long next_timer_interrupt(void);
5398 # 80 "include/linux/timer.h"
5399 static inline __attribute__((always_inline)) void add_timer(struct timer_list *timer)
5401 do { if (__builtin_expect(!!((timer_pending(timer))!=0), 0)) __bug("include/linux/timer.h", 82, ((void *)0)); } while(0);
5402 __mod_timer(timer, timer->expires);
5404 # 96 "include/linux/timer.h"
5405 extern void init_timers(void);
5406 extern void run_local_timers(void);
5408 extern int it_real_fn(struct hrtimer *);
5409 # 82 "include/linux/sched.h" 2
5410 # 1 "include/linux/hrtimer.h" 1
5411 # 19 "include/linux/hrtimer.h"
5412 # 1 "include/linux/ktime.h" 1
5413 # 46 "include/linux/ktime.h"
5426 # 138 "include/linux/ktime.h"
5427 static inline __attribute__((always_inline)) ktime_t ktime_set(const long secs, const unsigned long nsecs)
5429 return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } };
5431 # 150 "include/linux/ktime.h"
5432 static inline __attribute__((always_inline)) ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
5436 res.tv64 = lhs.tv64 - rhs.tv64;
5437 if (res.tv.nsec < 0)
5438 res.tv.nsec += 1000000000L;
5442 # 168 "include/linux/ktime.h"
5443 static inline __attribute__((always_inline)) ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
5447 res.tv64 = add1.tv64 + add2.tv64;
5448 # 181 "include/linux/ktime.h"
5449 if (res.tv.nsec >= 1000000000L)
5450 res.tv64 += (u32)-1000000000L;
5454 # 194 "include/linux/ktime.h"
5455 extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
5463 static inline __attribute__((always_inline)) ktime_t timespec_to_ktime(const struct timespec ts)
5465 return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec,
5466 .nsec = (s32)ts.tv_nsec } };
5475 static inline __attribute__((always_inline)) ktime_t timeval_to_ktime(const struct timeval tv)
5477 return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec,
5478 .nsec = (s32)tv.tv_usec * 1000 } };
5487 static inline __attribute__((always_inline)) struct timespec ktime_to_timespec(const ktime_t kt)
5489 return (struct timespec) { .tv_sec = (time_t) kt.tv.sec,
5490 .tv_nsec = (long) kt.tv.nsec };
5499 static inline __attribute__((always_inline)) struct timeval ktime_to_timeval(const ktime_t kt)
5501 return (struct timeval) {
5502 .tv_sec = (time_t) kt.tv.sec,
5503 .tv_usec = (suseconds_t) (kt.tv.nsec / 1000L) };
5512 static inline __attribute__((always_inline)) u64 ktime_to_ns(const ktime_t kt)
5514 return (u64) kt.tv.sec * 1000000000L + kt.tv.nsec;
5516 # 268 "include/linux/ktime.h"
5517 extern void ktime_get_ts(struct timespec *ts);
5518 # 20 "include/linux/hrtimer.h" 2
5531 enum hrtimer_restart {
5538 struct hrtimer_base;
5539 # 52 "include/linux/hrtimer.h"
5541 struct rb_node node;
5543 int (*function)(struct hrtimer *);
5544 struct hrtimer_base *base;
5546 # 66 "include/linux/hrtimer.h"
5547 struct hrtimer_sleeper {
5548 struct hrtimer timer;
5549 struct task_struct *task;
5551 # 85 "include/linux/hrtimer.h"
5552 struct hrtimer_base {
5555 struct rb_root active;
5556 struct rb_node *first;
5558 ktime_t (*get_time)(void);
5559 ktime_t (*get_softirq_time)(void);
5560 struct hrtimer *curr_timer;
5561 ktime_t softirq_time;
5562 struct lock_class_key lock_key;
5564 # 108 "include/linux/hrtimer.h"
5565 extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock,
5566 enum hrtimer_mode mode);
5569 extern int hrtimer_start(struct hrtimer *timer, ktime_t tim,
5570 const enum hrtimer_mode mode);
5571 extern int hrtimer_cancel(struct hrtimer *timer);
5572 extern int hrtimer_try_to_cancel(struct hrtimer *timer);
5577 extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer);
5578 extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp);
5584 static inline __attribute__((always_inline)) int hrtimer_active(const struct hrtimer *timer)
5586 return ((struct rb_node *)((&timer->node)->rb_parent_color & ~3)) != &timer->node;
5590 extern unsigned long
5591 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
5594 extern long hrtimer_nanosleep(struct timespec *rqtp,
5595 struct timespec *rmtp,
5596 const enum hrtimer_mode mode,
5597 const clockid_t clockid);
5599 extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
5600 struct task_struct *tsk);
5603 extern void hrtimer_run_queues(void);
5606 extern void __attribute__ ((__section__ (".init.text"))) hrtimers_init(void);
5607 # 83 "include/linux/sched.h" 2
5612 struct futex_pi_state;
5613 # 105 "include/linux/sched.h"
5614 extern unsigned long avenrun[];
5615 # 119 "include/linux/sched.h"
5616 extern unsigned long total_forks;
5617 extern int nr_threads;
5618 extern int last_pid;
5619 extern __typeof__(unsigned long) per_cpu__process_counts;
5620 extern int nr_processes(void);
5621 extern unsigned long nr_running(void);
5622 extern unsigned long nr_uninterruptible(void);
5623 extern unsigned long nr_active(void);
5624 extern unsigned long nr_iowait(void);
5625 extern unsigned long weighted_cpuload(const int cpu);
5626 # 184 "include/linux/sched.h"
5627 extern rwlock_t tasklist_lock;
5628 extern spinlock_t mmlist_lock;
5632 extern void sched_init(void);
5633 extern void sched_init_smp(void);
5634 extern void init_idle(struct task_struct *idle, int cpu);
5636 extern cpumask_t nohz_cpu_mask;
5638 extern void show_state(void);
5639 extern void show_regs(struct pt_regs *);
5646 extern void show_stack(struct task_struct *task, unsigned long *sp);
5648 void io_schedule(void);
5649 long io_schedule_timeout(long timeout);
5651 extern void cpu_init (void);
5652 extern void trap_init(void);
5653 extern void update_process_times(int user);
5654 extern void scheduler_tick(void);
5661 static inline __attribute__((always_inline)) void softlockup_tick(void)
5664 static inline __attribute__((always_inline)) void spawn_softlockup_task(void)
5667 static inline __attribute__((always_inline)) void touch_softlockup_watchdog(void)
5676 extern int in_sched_functions(unsigned long addr);
5679 extern signed long schedule_timeout(signed long timeout);
5680 extern signed long schedule_timeout_interruptible(signed long timeout);
5681 extern signed long schedule_timeout_uninterruptible(signed long timeout);
5682 void schedule(void);
5689 extern int sysctl_max_map_count;
5691 # 1 "include/linux/aio.h" 1
5696 # 1 "include/linux/workqueue.h" 1
5697 # 12 "include/linux/workqueue.h"
5698 struct workqueue_struct;
5700 struct work_struct {
5701 unsigned long pending;
5702 struct list_head entry;
5703 void (*func)(void *);
5706 struct timer_list timer;
5709 struct execute_work {
5710 struct work_struct work;
5712 # 57 "include/linux/workqueue.h"
5713 extern struct workqueue_struct *__create_workqueue(const char *name,
5718 extern void destroy_workqueue(struct workqueue_struct *wq);
5720 extern int queue_work(struct workqueue_struct *wq, struct work_struct *work);
5721 extern int queue_delayed_work(struct workqueue_struct *wq, struct work_struct *work, unsigned long delay);
5722 extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
5723 struct work_struct *work, unsigned long delay);
5724 extern void flush_workqueue(struct workqueue_struct *wq);
5726 extern int schedule_work(struct work_struct *work);
5727 extern int schedule_delayed_work(struct work_struct *work, unsigned long delay);
5729 extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay);
5730 extern int schedule_on_each_cpu(void (*func)(void *info), void *info);
5731 extern void flush_scheduled_work(void);
5732 extern int current_is_keventd(void);
5733 extern int keventd_up(void);
5735 extern void init_workqueues(void);
5736 void cancel_rearming_delayed_work(struct work_struct *work);
5737 void cancel_rearming_delayed_workqueue(struct workqueue_struct *,
5738 struct work_struct *);
5739 int execute_in_process_context(void (*fn)(void *), void *,
5740 struct execute_work *);
5747 static inline __attribute__((always_inline)) int cancel_delayed_work(struct work_struct *work)
5751 ret = del_timer(&work->timer);
5753 (__builtin_constant_p(0) ? ____atomic_clear_bit(0, &work->pending) : _clear_bit_le(0,&work->pending));
5756 # 6 "include/linux/aio.h" 2
5757 # 1 "include/linux/aio_abi.h" 1
5758 # 32 "include/linux/aio_abi.h"
5759 typedef unsigned long aio_context_t;
5763 IOCB_CMD_PWRITE = 1,
5765 IOCB_CMD_FDSYNC = 3,
5780 # 68 "include/linux/aio_abi.h"
5784 __u32 aio_key, aio_reserved1;
5788 __u16 aio_lio_opcode;
5797 __u64 aio_reserved2;
5798 __u64 aio_reserved3;
5800 # 7 "include/linux/aio.h" 2
5808 # 85 "include/linux/aio.h"
5810 struct list_head ki_run_list;
5815 struct file *ki_filp;
5816 struct kioctx *ki_ctx;
5817 int (*ki_cancel)(struct kiocb *, struct io_event *);
5818 ssize_t (*ki_retry)(struct kiocb *);
5819 void (*ki_dtor)(struct kiocb *);
5823 struct task_struct *tsk;
5827 wait_queue_t ki_wait;
5832 unsigned short ki_opcode;
5840 struct list_head ki_list;
5843 # 140 "include/linux/aio.h"
5851 unsigned compat_features;
5852 unsigned incompat_features;
5853 unsigned header_length;
5856 struct io_event io_events[0];
5862 struct aio_ring_info {
5863 unsigned long mmap_base;
5864 unsigned long mmap_size;
5866 struct page **ring_pages;
5867 spinlock_t ring_lock;
5872 struct page *internal_pages[8];
5878 struct mm_struct *mm;
5881 unsigned long user_id;
5882 struct kioctx *next;
5884 wait_queue_head_t wait;
5886 spinlock_t ctx_lock;
5889 struct list_head active_reqs;
5890 struct list_head run_list;
5895 struct aio_ring_info ring_info;
5897 struct work_struct wq;
5901 extern unsigned aio_max_size;
5903 extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
5904 extern int aio_put_req(struct kiocb *iocb);
5905 extern void kick_iocb(struct kiocb *iocb);
5906 extern int aio_complete(struct kiocb *iocb, long res, long res2);
5907 extern void __put_ioctx(struct kioctx *ctx);
5909 extern void exit_aio(struct mm_struct *mm);
5910 extern struct kioctx *lookup_ioctx(unsigned long ctx_id);
5911 extern int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb);
5915 struct kioctx *lookup_ioctx(unsigned long ctx_id);
5916 int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb);
5917 # 241 "include/linux/aio.h"
5918 static inline __attribute__((always_inline)) struct kiocb *list_kiocb(struct list_head *h)
5920 return ({ const typeof( ((struct kiocb *)0)->ki_list ) *__mptr = (h); (struct kiocb *)( (char *)__mptr - __builtin_offsetof(struct kiocb,ki_list) );});
5924 extern unsigned long aio_nr;
5925 extern unsigned long aio_max_nr;
5926 # 249 "include/linux/sched.h" 2
5928 extern unsigned long
5929 arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
5930 unsigned long, unsigned long);
5931 extern unsigned long
5932 arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
5933 unsigned long len, unsigned long pgoff,
5934 unsigned long flags);
5935 extern void arch_unmap_area(struct mm_struct *, unsigned long);
5936 extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
5937 # 282 "include/linux/sched.h"
5938 typedef unsigned long mm_counter_t;
5939 # 298 "include/linux/sched.h"
5941 struct vm_area_struct * mmap;
5942 struct rb_root mm_rb;
5943 struct vm_area_struct * mmap_cache;
5944 unsigned long (*get_unmapped_area) (struct file *filp,
5945 unsigned long addr, unsigned long len,
5946 unsigned long pgoff, unsigned long flags);
5947 void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
5948 unsigned long mmap_base;
5949 unsigned long task_size;
5950 unsigned long cached_hole_size;
5951 unsigned long free_area_cache;
5956 struct rw_semaphore mmap_sem;
5957 spinlock_t page_table_lock;
5959 struct list_head mmlist;
5967 mm_counter_t _file_rss;
5968 mm_counter_t _anon_rss;
5970 unsigned long hiwater_rss;
5971 unsigned long hiwater_vm;
5973 unsigned long total_vm, locked_vm, shared_vm, exec_vm;
5974 unsigned long stack_vm, reserved_vm, def_flags, nr_ptes;
5975 unsigned long start_code, end_code, start_data, end_data;
5976 unsigned long start_brk, brk, start_stack;
5977 unsigned long arg_start, arg_end, env_start, env_end;
5979 unsigned long saved_auxv[44];
5981 unsigned dumpable:2;
5982 cpumask_t cpu_vm_mask;
5985 mm_context_t context;
5988 unsigned long swap_token_time;
5993 struct completion *core_startup_done, core_done;
5996 rwlock_t ioctx_list_lock;
5997 struct kioctx *ioctx_list;
6000 struct sighand_struct {
6002 struct k_sigaction action[64];
6006 struct pacct_struct {
6009 unsigned long ac_mem;
6010 cputime_t ac_utime, ac_stime;
6011 unsigned long ac_minflt, ac_majflt;
6013 # 379 "include/linux/sched.h"
6014 struct signal_struct {
6018 wait_queue_head_t wait_chldexit;
6021 struct task_struct *curr_target;
6024 struct sigpending shared_pending;
6027 int group_exit_code;
6033 struct task_struct *group_exit_task;
6037 int group_stop_count;
6041 struct list_head posix_timers;
6044 struct hrtimer real_timer;
6045 struct task_struct *tsk;
6046 ktime_t it_real_incr;
6049 cputime_t it_prof_expires, it_virt_expires;
6050 cputime_t it_prof_incr, it_virt_incr;
6059 struct tty_struct *tty;
6067 cputime_t utime, stime, cutime, cstime;
6068 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
6069 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
6077 unsigned long long sched_time;
6078 # 453 "include/linux/sched.h"
6079 struct rlimit rlim[15];
6081 struct list_head cpu_timers[3];
6082 # 470 "include/linux/sched.h"
6084 # 513 "include/linux/sched.h"
6085 struct user_struct {
6089 atomic_t sigpending;
6095 unsigned long mq_bytes;
6096 unsigned long locked_shm;
6104 struct list_head uidhash_list;
6108 extern struct user_struct *find_user(uid_t);
6110 extern struct user_struct root_user;
6113 struct backing_dev_info;
6114 struct reclaim_state;
6115 # 591 "include/linux/sched.h"
6116 static inline __attribute__((always_inline)) int sched_info_on(void)
6135 # 711 "include/linux/sched.h"
6137 void exit_io_context(void);
6145 gid_t small_block[32];
6149 # 740 "include/linux/sched.h"
6150 extern struct group_info *groups_alloc(int gidsetsize);
6151 extern void groups_free(struct group_info *group_info);
6152 extern int set_current_groups(struct group_info *group_info);
6153 extern int groups_search(struct group_info *group_info, gid_t grp);
6161 static inline __attribute__((always_inline)) void prefetch_stack(struct task_struct *t) { }
6164 struct audit_context;
6166 struct pipe_inode_info;
6170 SLEEP_NONINTERACTIVE,
6177 struct task_struct {
6178 volatile long state;
6179 struct thread_info *thread_info;
6181 unsigned long flags;
6182 unsigned long ptrace;
6192 int prio, static_prio, normal_prio;
6193 struct list_head run_list;
6194 struct prio_array *array;
6196 unsigned short ioprio;
6197 unsigned int btrace_seq;
6199 unsigned long sleep_avg;
6200 unsigned long long timestamp, last_ran;
6201 unsigned long long sched_time;
6202 enum sleep_type sleep_type;
6204 unsigned long policy;
6205 cpumask_t cpus_allowed;
6206 unsigned int time_slice, first_time_slice;
6212 struct list_head tasks;
6217 struct list_head ptrace_children;
6218 struct list_head ptrace_list;
6220 struct mm_struct *mm, *active_mm;
6223 struct linux_binfmt *binfmt;
6225 int exit_code, exit_signal;
6228 unsigned long personality;
6229 unsigned did_exec:1;
6237 struct task_struct *real_parent;
6238 struct task_struct *parent;
6243 struct list_head children;
6244 struct list_head sibling;
6245 struct task_struct *group_leader;
6248 struct pid_link pids[PIDTYPE_MAX];
6249 struct list_head thread_group;
6251 struct completion *vfork_done;
6253 int *clear_child_tid;
6255 unsigned long rt_priority;
6256 cputime_t utime, stime;
6257 unsigned long nvcsw, nivcsw;
6258 struct timespec start_time;
6260 unsigned long min_flt, maj_flt;
6262 cputime_t it_prof_expires, it_virt_expires;
6263 unsigned long long it_sched_expires;
6264 struct list_head cpu_timers[3];
6267 uid_t uid,euid,suid,fsuid;
6268 gid_t gid,egid,sgid,fsgid;
6269 struct group_info *group_info;
6270 kernel_cap_t cap_effective, cap_inheritable, cap_permitted;
6271 unsigned keep_capabilities:1;
6272 struct user_struct *user;
6284 int link_count, total_link_count;
6286 struct sysv_sem sysvsem;
6288 struct thread_struct thread;
6290 struct fs_struct *fs;
6292 struct files_struct *files;
6294 struct namespace *namespace;
6296 struct signal_struct *signal;
6297 struct sighand_struct *sighand;
6299 sigset_t blocked, real_blocked;
6300 sigset_t saved_sigmask;
6301 struct sigpending pending;
6303 unsigned long sas_ss_sp;
6305 int (*notifier)(void *priv);
6306 void *notifier_data;
6307 sigset_t *notifier_mask;
6310 struct audit_context *audit_context;
6317 spinlock_t alloc_lock;
6324 struct plist_head pi_waiters;
6326 struct rt_mutex_waiter *pi_blocked_on;
6327 # 947 "include/linux/sched.h"
6331 struct reclaim_state *reclaim_state;
6333 struct backing_dev_info *backing_dev_info;
6335 struct io_context *io_context;
6337 unsigned long ptrace_message;
6338 siginfo_t *last_siginfo;
6345 wait_queue_t *io_wait;
6347 u64 rchar, wchar, syscr, syscw;
6348 # 982 "include/linux/sched.h"
6349 struct robust_list_head *robust_list;
6353 struct list_head pi_state_list;
6354 struct futex_pi_state *pi_state_cache;
6357 struct rcu_head rcu;
6362 struct pipe_inode_info *splice_pipe;
6368 static inline __attribute__((always_inline)) pid_t process_group(struct task_struct *tsk)
6370 return tsk->signal->pgrp;
6372 # 1014 "include/linux/sched.h"
6373 static inline __attribute__((always_inline)) int pid_alive(struct task_struct *p)
6375 return p->pids[PIDTYPE_PID].pid != ((void *)0);
6378 extern void free_task(struct task_struct *tsk);
6381 extern void __put_task_struct(struct task_struct *t);
6383 static inline __attribute__((always_inline)) void put_task_struct(struct task_struct *t)
6385 if ((atomic_sub_return(1, &t->usage) == 0))
6386 __put_task_struct(t);
6388 # 1088 "include/linux/sched.h"
6389 static inline __attribute__((always_inline)) int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
6391 if (!test_bit((0), (new_mask).bits))
6397 extern unsigned long long sched_clock(void);
6398 extern unsigned long long
6399 current_sched_time(const struct task_struct *current_task);
6400 # 1110 "include/linux/sched.h"
6401 static inline __attribute__((always_inline)) void idle_task_exit(void) {}
6404 extern void sched_idle_next(void);
6407 extern int rt_mutex_getprio(struct task_struct *p);
6408 extern void rt_mutex_setprio(struct task_struct *p, int prio);
6409 extern void rt_mutex_adjust_pi(struct task_struct *p);
6410 # 1127 "include/linux/sched.h"
6411 extern void set_user_nice(struct task_struct *p, long nice);
6412 extern int task_prio(const struct task_struct *p);
6413 extern int task_nice(const struct task_struct *p);
6414 extern int can_nice(const struct task_struct *p, const int nice);
6415 extern int task_curr(const struct task_struct *p);
6416 extern int idle_cpu(int cpu);
6417 extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
6418 extern struct task_struct *idle_task(int cpu);
6419 extern struct task_struct *curr_task(int cpu);
6420 extern void set_curr_task(int cpu, struct task_struct *p);
6427 extern struct exec_domain default_exec_domain;
6429 union thread_union {
6430 struct thread_info thread_info;
6431 unsigned long stack[8192/sizeof(long)];
6435 static inline __attribute__((always_inline)) int kstack_end(void *addr)
6440 return !(((unsigned long)addr+sizeof(void*)-1) & (8192 -sizeof(void*)));
6444 extern union thread_union init_thread_union;
6445 extern struct task_struct init_task;
6447 extern struct mm_struct init_mm;
6450 extern struct task_struct *find_task_by_pid_type(int type, int pid);
6451 extern void set_special_pids(pid_t session, pid_t pgrp);
6452 extern void __set_special_pids(pid_t session, pid_t pgrp);
6455 extern struct user_struct * alloc_uid(uid_t);
6456 static inline __attribute__((always_inline)) struct user_struct *get_uid(struct user_struct *u)
6458 (void) atomic_add_return(1, &u->__count);
6461 extern void free_uid(struct user_struct *);
6462 extern void switch_uid(struct user_struct *);
6466 extern void do_timer(struct pt_regs *);
6468 extern int wake_up_state(struct task_struct * tsk, unsigned int state);
6469 extern int wake_up_process(struct task_struct * tsk);
6470 extern void wake_up_new_task(struct task_struct * tsk, unsigned long clone_flags);
6475 static inline __attribute__((always_inline)) void kick_process(struct task_struct *tsk) { }
6477 extern void sched_fork(struct task_struct * p, int clone_flags);
6478 extern void sched_exit(struct task_struct * p);
6480 extern int in_group_p(gid_t);
6481 extern int in_egroup_p(gid_t);
6483 extern void proc_caches_init(void);
6484 extern void flush_signals(struct task_struct *);
6485 extern void flush_signal_handlers(struct task_struct *, int force_default);
6486 extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
6488 static inline __attribute__((always_inline)) int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
6490 unsigned long flags;
6493 do { ({ unsigned long temp; (void) (&temp == &flags); __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory", "cc"); }); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
6494 ret = dequeue_signal(tsk, mask, info);
6495 do { __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc"); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
6500 extern void block_all_signals(int (*notifier)(void *priv), void *priv,
6502 extern void unblock_all_signals(void);
6503 extern void release_task(struct task_struct * p);
6504 extern int send_sig_info(int, struct siginfo *, struct task_struct *);
6505 extern int send_group_sig_info(int, struct siginfo *, struct task_struct *);
6506 extern int force_sigsegv(int, struct task_struct *);
6507 extern int force_sig_info(int, struct siginfo *, struct task_struct *);
6508 extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
6509 extern int kill_pg_info(int, struct siginfo *, pid_t);
6510 extern int kill_proc_info(int, struct siginfo *, pid_t);
6511 extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t, u32);
6512 extern void do_notify_parent(struct task_struct *, int);
6513 extern void force_sig(int, struct task_struct *);
6514 extern void force_sig_specific(int, struct task_struct *);
6515 extern int send_sig(int, struct task_struct *, int);
6516 extern void zap_other_threads(struct task_struct *p);
6517 extern int kill_pg(pid_t, int, int);
6518 extern int kill_proc(pid_t, int, int);
6519 extern struct sigqueue *sigqueue_alloc(void);
6520 extern void sigqueue_free(struct sigqueue *);
6521 extern int send_sigqueue(int, struct sigqueue *, struct task_struct *);
6522 extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *);
6523 extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *);
6524 extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long);
6531 static inline __attribute__((always_inline)) int is_si_special(const struct siginfo *info)
6533 return info <= ((struct siginfo *) 2);
6538 static inline __attribute__((always_inline)) int on_sig_stack(unsigned long sp)
6540 return (sp - (get_current())->sas_ss_sp < (get_current())->sas_ss_size);
6543 static inline __attribute__((always_inline)) int sas_ss_flags(unsigned long sp)
6545 return ((get_current())->sas_ss_size == 0 ? 2
6546 : on_sig_stack(sp) ? 1 : 0);
6552 extern struct mm_struct * mm_alloc(void);
6555 extern void __mmdrop(struct mm_struct *);
6556 static inline __attribute__((always_inline)) void mmdrop(struct mm_struct * mm)
6558 if ((atomic_sub_return(1, &mm->mm_count) == 0))
6563 extern void mmput(struct mm_struct *);
6565 extern struct mm_struct *get_task_mm(struct task_struct *task);
6567 extern void mm_release(struct task_struct *, struct mm_struct *);
6569 extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
6570 extern void flush_thread(void);
6571 extern void exit_thread(void);
6573 extern void exit_files(struct task_struct *);
6574 extern void __cleanup_signal(struct signal_struct *);
6575 extern void __cleanup_sighand(struct sighand_struct *);
6576 extern void exit_itimers(struct signal_struct *);
6578 extern void do_group_exit(int);
6580 extern void daemonize(const char *, ...);
6581 extern int allow_signal(int);
6582 extern int disallow_signal(int);
6583 extern struct task_struct *child_reaper;
6585 extern int do_execve(char *, char * *, char * *, struct pt_regs *);
6586 extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *);
6587 struct task_struct *fork_idle(int);
6589 extern void set_task_comm(struct task_struct *tsk, char *from);
6590 extern void get_task_comm(char *to, struct task_struct *tsk);
6591 # 1335 "include/linux/sched.h"
6592 static inline __attribute__((always_inline)) struct task_struct *next_thread(const struct task_struct *p)
6594 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) );});
6598 static inline __attribute__((always_inline)) int thread_group_empty(struct task_struct *p)
6600 return list_empty(&p->thread_group);
6602 # 1358 "include/linux/sched.h"
6603 static inline __attribute__((always_inline)) void task_lock(struct task_struct *p)
6605 do { do { } while (0); (void)0; (void)(&p->alloc_lock); } while (0);
6608 static inline __attribute__((always_inline)) void task_unlock(struct task_struct *p)
6610 do { do { } while (0); (void)0; (void)(&p->alloc_lock); } while (0);
6613 extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk,
6614 unsigned long *flags);
6616 static inline __attribute__((always_inline)) void unlock_task_sighand(struct task_struct *tsk,
6617 unsigned long *flags)
6619 do { __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (*flags) : "memory", "cc"); do { do { } while (0); (void)0; (void)(&tsk->sighand->siglock); } while (0); } while (0);
6627 static inline __attribute__((always_inline)) void setup_thread_stack(struct task_struct *p, struct task_struct *org)
6629 *(p)->thread_info = *(org)->thread_info;
6630 (p)->thread_info->task = p;
6633 static inline __attribute__((always_inline)) unsigned long *end_of_stack(struct task_struct *p)
6635 return (unsigned long *)(p->thread_info + 1);
6643 static inline __attribute__((always_inline)) void set_tsk_thread_flag(struct task_struct *tsk, int flag)
6645 set_ti_thread_flag((tsk)->thread_info, flag);
6648 static inline __attribute__((always_inline)) void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
6650 clear_ti_thread_flag((tsk)->thread_info, flag);
6653 static inline __attribute__((always_inline)) int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
6655 return test_and_set_ti_thread_flag((tsk)->thread_info, flag);
6658 static inline __attribute__((always_inline)) int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
6660 return test_and_clear_ti_thread_flag((tsk)->thread_info, flag);
6663 static inline __attribute__((always_inline)) int test_tsk_thread_flag(struct task_struct *tsk, int flag)
6665 return test_ti_thread_flag((tsk)->thread_info, flag);
6668 static inline __attribute__((always_inline)) void set_tsk_need_resched(struct task_struct *tsk)
6670 set_tsk_thread_flag(tsk,2);
6673 static inline __attribute__((always_inline)) void clear_tsk_need_resched(struct task_struct *tsk)
6675 clear_tsk_thread_flag(tsk,2);
6678 static inline __attribute__((always_inline)) int signal_pending(struct task_struct *p)
6680 return __builtin_expect(!!(test_tsk_thread_flag(p,1)), 0);
6683 static inline __attribute__((always_inline)) int need_resched(void)
6685 return __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 2)), 0);
6687 # 1450 "include/linux/sched.h"
6688 extern int cond_resched(void);
6689 extern int cond_resched_lock(spinlock_t * lock);
6690 extern int cond_resched_softirq(void);
6691 # 1468 "include/linux/sched.h"
6692 static inline __attribute__((always_inline)) int lock_need_resched(spinlock_t *lock)
6694 if (0 || need_resched())
6703 extern void recalc_sigpending_tsk(struct task_struct *t);
6704 extern void recalc_sigpending(void);
6706 extern void signal_wake_up(struct task_struct *t, int resume_stopped);
6707 # 1501 "include/linux/sched.h"
6708 static inline __attribute__((always_inline)) unsigned int task_cpu(const struct task_struct *p)
6713 static inline __attribute__((always_inline)) void set_task_cpu(struct task_struct *p, unsigned int cpu)
6722 static inline __attribute__((always_inline)) void arch_pick_mmap_layout(struct mm_struct *mm)
6724 mm->mmap_base = (((0x3f000000UL) + 0x01000000) / 3);
6725 mm->get_unmapped_area = arch_get_unmapped_area;
6726 mm->unmap_area = arch_unmap_area;
6730 extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
6731 extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
6733 # 1 "include/linux/sysdev.h" 1
6734 # 24 "include/linux/sysdev.h"
6735 # 1 "include/linux/kobject.h" 1
6736 # 22 "include/linux/kobject.h"
6737 # 1 "include/linux/sysfs.h" 1
6738 # 15 "include/linux/sysfs.h"
6744 struct module * owner;
6748 struct attribute_group {
6750 struct attribute ** attrs;
6752 # 51 "include/linux/sysfs.h"
6753 struct vm_area_struct;
6755 struct bin_attribute {
6756 struct attribute attr;
6759 ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
6760 ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
6761 int (*mmap)(struct kobject *, struct bin_attribute *attr,
6762 struct vm_area_struct *vma);
6766 ssize_t (*show)(struct kobject *, struct attribute *,char *);
6767 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
6770 struct sysfs_dirent {
6772 struct list_head s_sibling;
6773 struct list_head s_children;
6777 struct dentry * s_dentry;
6778 struct iattr * s_iattr;
6781 # 89 "include/linux/sysfs.h"
6783 sysfs_create_dir(struct kobject *);
6786 sysfs_remove_dir(struct kobject *);
6789 sysfs_rename_dir(struct kobject *, const char *new_name);
6792 sysfs_create_file(struct kobject *, const struct attribute *);
6795 sysfs_update_file(struct kobject *, const struct attribute *);
6798 sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode);
6801 sysfs_remove_file(struct kobject *, const struct attribute *);
6804 sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name);
6807 sysfs_remove_link(struct kobject *, const char * name);
6809 int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr);
6810 int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr);
6812 int sysfs_create_group(struct kobject *, const struct attribute_group *);
6813 void sysfs_remove_group(struct kobject *, const struct attribute_group *);
6814 void sysfs_notify(struct kobject * k, char *dir, char *attr);
6815 # 23 "include/linux/kobject.h" 2
6818 # 1 "include/linux/kref.h" 1
6819 # 23 "include/linux/kref.h"
6824 void kref_init(struct kref *kref);
6825 void kref_get(struct kref *kref);
6826 int kref_put(struct kref *kref, void (*release) (struct kref *kref));
6827 # 26 "include/linux/kobject.h" 2
6828 # 34 "include/linux/kobject.h"
6829 extern char uevent_helper[];
6832 extern u64 uevent_seqnum;
6835 typedef int kobject_action_t;
6836 enum kobject_action {
6837 KOBJ_ADD = ( kobject_action_t) 0x01,
6838 KOBJ_REMOVE = ( kobject_action_t) 0x02,
6839 KOBJ_CHANGE = ( kobject_action_t) 0x03,
6840 KOBJ_MOUNT = ( kobject_action_t) 0x04,
6841 KOBJ_UMOUNT = ( kobject_action_t) 0x05,
6842 KOBJ_OFFLINE = ( kobject_action_t) 0x06,
6843 KOBJ_ONLINE = ( kobject_action_t) 0x07,
6847 const char * k_name;
6850 struct list_head entry;
6851 struct kobject * parent;
6853 struct kobj_type * ktype;
6854 struct dentry * dentry;
6855 wait_queue_head_t poll;
6858 extern int kobject_set_name(struct kobject *, const char *, ...)
6859 __attribute__((format(printf,2,3)));
6861 static inline __attribute__((always_inline)) const char * kobject_name(const struct kobject * kobj)
6863 return kobj->k_name;
6866 extern void kobject_init(struct kobject *);
6867 extern void kobject_cleanup(struct kobject *);
6869 extern int kobject_add(struct kobject *);
6870 extern void kobject_del(struct kobject *);
6872 extern int kobject_rename(struct kobject *, const char *new_name);
6874 extern int kobject_register(struct kobject *);
6875 extern void kobject_unregister(struct kobject *);
6877 extern struct kobject * kobject_get(struct kobject *);
6878 extern void kobject_put(struct kobject *);
6880 extern struct kobject *kobject_add_dir(struct kobject *, const char *);
6882 extern char * kobject_get_path(struct kobject *, gfp_t);
6885 void (*release)(struct kobject *);
6886 struct sysfs_ops * sysfs_ops;
6887 struct attribute ** default_attrs;
6889 # 113 "include/linux/kobject.h"
6890 struct kset_uevent_ops {
6891 int (*filter)(struct kset *kset, struct kobject *kobj);
6892 const char *(*name)(struct kset *kset, struct kobject *kobj);
6893 int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp,
6894 int num_envp, char *buffer, int buffer_size);
6898 struct subsystem * subsys;
6899 struct kobj_type * ktype;
6900 struct list_head list;
6901 spinlock_t list_lock;
6902 struct kobject kobj;
6903 struct kset_uevent_ops * uevent_ops;
6907 extern void kset_init(struct kset * k);
6908 extern int kset_add(struct kset * k);
6909 extern int kset_register(struct kset * k);
6910 extern void kset_unregister(struct kset * k);
6912 static inline __attribute__((always_inline)) struct kset * to_kset(struct kobject * kobj)
6914 return kobj ? ({ const typeof( ((struct kset *)0)->kobj ) *__mptr = (kobj); (struct kset *)( (char *)__mptr - __builtin_offsetof(struct kset,kobj) );}) : ((void *)0);
6917 static inline __attribute__((always_inline)) struct kset * kset_get(struct kset * k)
6919 return k ? to_kset(kobject_get(&k->kobj)) : ((void *)0);
6922 static inline __attribute__((always_inline)) void kset_put(struct kset * k)
6924 kobject_put(&k->kobj);
6927 static inline __attribute__((always_inline)) struct kobj_type * get_ktype(struct kobject * k)
6929 if (k->kset && k->kset->ktype)
6930 return k->kset->ktype;
6935 extern struct kobject * kset_find_obj(struct kset *, const char *);
6936 # 169 "include/linux/kobject.h"
6939 struct rw_semaphore rwsem;
6941 # 192 "include/linux/kobject.h"
6942 extern struct subsystem kernel_subsys;
6944 extern struct subsystem hypervisor_subsys;
6945 # 241 "include/linux/kobject.h"
6946 extern void subsystem_init(struct subsystem *);
6947 extern int subsystem_register(struct subsystem *);
6948 extern void subsystem_unregister(struct subsystem *);
6950 static inline __attribute__((always_inline)) struct subsystem * subsys_get(struct subsystem * s)
6952 return s ? ({ const typeof( ((struct subsystem *)0)->kset ) *__mptr = (kset_get(&s->kset)); (struct subsystem *)( (char *)__mptr - __builtin_offsetof(struct subsystem,kset) );}) : ((void *)0);
6955 static inline __attribute__((always_inline)) void subsys_put(struct subsystem * s)
6960 struct subsys_attribute {
6961 struct attribute attr;
6962 ssize_t (*show)(struct subsystem *, char *);
6963 ssize_t (*store)(struct subsystem *, const char *, size_t);
6966 extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
6969 void kobject_uevent(struct kobject *kobj, enum kobject_action action);
6971 int add_uevent_var(char **envp, int num_envp, int *cur_index,
6972 char *buffer, int buffer_size, int *cur_len,
6973 const char *format, ...)
6974 __attribute__((format (printf, 7, 8)));
6975 # 25 "include/linux/sysdev.h" 2
6976 # 1 "include/linux/pm.h" 1
6977 # 34 "include/linux/pm.h"
6978 typedef int pm_request_t;
6979 # 43 "include/linux/pm.h"
6980 typedef int pm_dev_t;
6981 # 56 "include/linux/pm.h"
6984 PM_SYS_UNKNOWN = 0x00000000,
6985 PM_SYS_KBC = 0x41d00303,
6986 PM_SYS_COM = 0x41d00500,
6987 PM_SYS_IRDA = 0x41d00510,
6988 PM_SYS_FDC = 0x41d00700,
6989 PM_SYS_VGA = 0x41d00900,
6990 PM_SYS_PCMCIA = 0x41d00e00,
6992 # 75 "include/linux/pm.h"
6995 typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data);
7004 pm_callback callback;
7007 unsigned long flags;
7008 unsigned long state;
7009 unsigned long prev_state;
7011 struct list_head entry;
7020 extern void (*pm_idle)(void);
7021 extern void (*pm_power_off)(void);
7023 typedef int suspend_state_t;
7031 typedef int suspend_disk_method_t;
7040 suspend_disk_method_t pm_disk_mode;
7041 int (*valid)(suspend_state_t state);
7042 int (*prepare)(suspend_state_t state);
7043 int (*enter)(suspend_state_t state);
7044 int (*finish)(suspend_state_t state);
7047 extern void pm_set_ops(struct pm_ops *);
7048 extern struct pm_ops *pm_ops;
7049 extern int pm_suspend(suspend_state_t state);
7058 typedef struct pm_message {
7061 # 171 "include/linux/pm.h"
7062 struct dev_pm_info {
7063 pm_message_t power_state;
7064 unsigned can_wakeup:1;
7074 extern void device_pm_set_parent(struct device * dev, struct device * parent);
7076 extern int device_power_down(pm_message_t state);
7077 extern void device_power_up(void);
7078 extern void device_resume(void);
7079 # 210 "include/linux/pm.h"
7080 static inline __attribute__((always_inline)) int device_suspend(pm_message_t state)
7088 static inline __attribute__((always_inline)) int dpm_runtime_suspend(struct device * dev, pm_message_t state)
7093 static inline __attribute__((always_inline)) void dpm_runtime_resume(struct device * dev)
7096 # 26 "include/linux/sysdev.h" 2
7101 struct sysdev_class {
7102 struct list_head drivers;
7105 int (*shutdown)(struct sys_device *);
7106 int (*suspend)(struct sys_device *, pm_message_t state);
7107 int (*resume)(struct sys_device *);
7111 struct sysdev_class_attribute {
7112 struct attribute attr;
7113 ssize_t (*show)(struct sysdev_class *, char *);
7114 ssize_t (*store)(struct sysdev_class *, const char *, size_t);
7116 # 54 "include/linux/sysdev.h"
7117 extern int sysdev_class_register(struct sysdev_class *);
7118 extern void sysdev_class_unregister(struct sysdev_class *);
7120 extern int sysdev_class_create_file(struct sysdev_class *,
7121 struct sysdev_class_attribute *);
7122 extern void sysdev_class_remove_file(struct sysdev_class *,
7123 struct sysdev_class_attribute *);
7128 struct sysdev_driver {
7129 struct list_head entry;
7130 int (*add)(struct sys_device *);
7131 int (*remove)(struct sys_device *);
7132 int (*shutdown)(struct sys_device *);
7133 int (*suspend)(struct sys_device *, pm_message_t state);
7134 int (*resume)(struct sys_device *);
7138 extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *);
7139 extern void sysdev_driver_unregister(struct sysdev_class *, struct sysdev_driver *);
7149 struct sysdev_class * cls;
7150 struct kobject kobj;
7153 extern int sysdev_register(struct sys_device *);
7154 extern void sysdev_unregister(struct sys_device *);
7157 struct sysdev_attribute {
7158 struct attribute attr;
7159 ssize_t (*show)(struct sys_device *, char *);
7160 ssize_t (*store)(struct sys_device *, const char *, size_t);
7162 # 108 "include/linux/sysdev.h"
7163 extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *);
7164 extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);
7165 # 1527 "include/linux/sched.h" 2
7166 extern int sched_mc_power_savings, sched_smt_power_savings;
7167 extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings;
7168 extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
7170 extern void normalize_rt_tasks(void);
7171 # 1601 "include/linux/sched.h"
7172 static inline __attribute__((always_inline)) int frozen(struct task_struct *p) { return 0; }
7173 static inline __attribute__((always_inline)) int freezing(struct task_struct *p) { return 0; }
7174 static inline __attribute__((always_inline)) void freeze(struct task_struct *p) { __bug("include/linux/sched.h", 1603, ((void *)0)); }
7175 static inline __attribute__((always_inline)) int thaw_process(struct task_struct *p) { return 1; }
7176 static inline __attribute__((always_inline)) void frozen_process(struct task_struct *p) { __bug("include/linux/sched.h", 1605, ((void *)0)); }
7178 static inline __attribute__((always_inline)) void refrigerator(void) {}
7179 static inline __attribute__((always_inline)) int freeze_processes(void) { __bug("include/linux/sched.h", 1608, ((void *)0)); return 0; }
7180 static inline __attribute__((always_inline)) void thaw_processes(void) {}
7182 static inline __attribute__((always_inline)) int try_to_freeze(void) { return 0; }
7183 # 10 "include/linux/module.h" 2
7186 # 1 "include/linux/stat.h" 1
7192 # 1 "include/asm/stat.h" 1
7196 struct __old_kernel_stat {
7197 unsigned short st_dev;
7198 unsigned short st_ino;
7199 unsigned short st_mode;
7200 unsigned short st_nlink;
7201 unsigned short st_uid;
7202 unsigned short st_gid;
7203 unsigned short st_rdev;
7204 unsigned long st_size;
7205 unsigned long st_atime;
7206 unsigned long st_mtime;
7207 unsigned long st_ctime;
7217 unsigned long st_dev;
7219 unsigned long st_ino;
7220 unsigned short st_mode;
7221 unsigned short st_nlink;
7222 unsigned short st_uid;
7223 unsigned short st_gid;
7228 unsigned long st_rdev;
7230 unsigned long st_size;
7231 unsigned long st_blksize;
7232 unsigned long st_blocks;
7233 unsigned long st_atime;
7234 unsigned long st_atime_nsec;
7235 unsigned long st_mtime;
7236 unsigned long st_mtime_nsec;
7237 unsigned long st_ctime;
7238 unsigned long st_ctime_nsec;
7239 unsigned long __unused4;
7240 unsigned long __unused5;
7249 unsigned long long st_dev;
7250 unsigned char __pad0[4];
7253 unsigned long __st_ino;
7254 unsigned int st_mode;
7255 unsigned int st_nlink;
7257 unsigned long st_uid;
7258 unsigned long st_gid;
7260 unsigned long long st_rdev;
7261 unsigned char __pad3[4];
7264 unsigned long st_blksize;
7265 unsigned long long st_blocks;
7267 unsigned long st_atime;
7268 unsigned long st_atime_nsec;
7270 unsigned long st_mtime;
7271 unsigned long st_mtime_nsec;
7273 unsigned long st_ctime;
7274 unsigned long st_ctime_nsec;
7276 unsigned long long st_ino;
7278 # 7 "include/linux/stat.h" 2
7279 # 59 "include/linux/stat.h"
7289 struct timespec atime;
7290 struct timespec mtime;
7291 struct timespec ctime;
7292 unsigned long blksize;
7293 unsigned long long blocks;
7295 # 13 "include/linux/module.h" 2
7298 # 1 "include/linux/kmod.h" 1
7299 # 31 "include/linux/kmod.h"
7300 extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
7308 extern int call_usermodehelper_keys(char *path, char *argv[], char *envp[],
7309 struct key *session_keyring, int wait);
7311 static inline __attribute__((always_inline)) int
7312 call_usermodehelper(char *path, char **argv, char **envp, int wait)
7314 return call_usermodehelper_keys(path, argv, envp, ((void *)0), wait);
7317 extern void usermodehelper_init(void);
7318 # 16 "include/linux/module.h" 2
7319 # 1 "include/linux/elf.h" 1
7325 # 1 "include/linux/elf-em.h" 1
7326 # 7 "include/linux/elf.h" 2
7327 # 1 "include/asm/elf.h" 1
7328 # 10 "include/asm/elf.h"
7329 # 1 "include/asm/user.h" 1
7330 # 33 "include/asm/user.h"
7333 unsigned int sign1:1;
7334 unsigned int unused:15;
7335 unsigned int sign2:1;
7336 unsigned int exponent:14;
7338 unsigned int mantissa1:31;
7339 unsigned int mantissa0:32;
7341 unsigned int fpsr:32;
7342 unsigned int fpcr:32;
7343 unsigned char ftype[8];
7344 unsigned int init_flag;
7353 struct pt_regs regs;
7358 unsigned long int u_tsize;
7359 unsigned long int u_dsize;
7360 unsigned long int u_ssize;
7361 unsigned long start_code;
7362 unsigned long start_stack;
7368 struct pt_regs * u_ar0;
7370 unsigned long magic;
7373 struct user_fp u_fp;
7374 struct user_fp_struct * u_fp0;
7377 # 11 "include/asm/elf.h" 2
7382 typedef unsigned long elf_greg_t;
7383 typedef unsigned long elf_freg_t[3];
7384 # 30 "include/asm/elf.h"
7385 typedef elf_greg_t elf_gregset_t[(sizeof (struct pt_regs) / sizeof(elf_greg_t))];
7387 typedef struct user_fp elf_fpregset_t;
7388 # 83 "include/asm/elf.h"
7389 extern char elf_platform[];
7390 # 8 "include/linux/elf.h" 2
7391 # 17 "include/linux/elf.h"
7392 typedef __u32 Elf32_Addr;
7393 typedef __u16 Elf32_Half;
7394 typedef __u32 Elf32_Off;
7395 typedef __s32 Elf32_Sword;
7396 typedef __u32 Elf32_Word;
7399 typedef __u64 Elf64_Addr;
7400 typedef __u16 Elf64_Half;
7401 typedef __s16 Elf64_SHalf;
7402 typedef __u64 Elf64_Off;
7403 typedef __s32 Elf64_Sword;
7404 typedef __u32 Elf64_Word;
7405 typedef __u64 Elf64_Xword;
7406 typedef __s64 Elf64_Sxword;
7407 # 107 "include/linux/elf.h"
7408 typedef struct dynamic{
7423 # 130 "include/linux/elf.h"
7424 typedef struct elf32_rel {
7425 Elf32_Addr r_offset;
7429 typedef struct elf64_rel {
7430 Elf64_Addr r_offset;
7434 typedef struct elf32_rela{
7435 Elf32_Addr r_offset;
7437 Elf32_Sword r_addend;
7440 typedef struct elf64_rela {
7441 Elf64_Addr r_offset;
7443 Elf64_Sxword r_addend;
7446 typedef struct elf32_sym{
7448 Elf32_Addr st_value;
7450 unsigned char st_info;
7451 unsigned char st_other;
7452 Elf32_Half st_shndx;
7455 typedef struct elf64_sym {
7457 unsigned char st_info;
7458 unsigned char st_other;
7459 Elf64_Half st_shndx;
7460 Elf64_Addr st_value;
7461 Elf64_Xword st_size;
7467 typedef struct elf32_hdr{
7468 unsigned char e_ident[16];
7470 Elf32_Half e_machine;
7471 Elf32_Word e_version;
7476 Elf32_Half e_ehsize;
7477 Elf32_Half e_phentsize;
7479 Elf32_Half e_shentsize;
7481 Elf32_Half e_shstrndx;
7484 typedef struct elf64_hdr {
7485 unsigned char e_ident[16];
7487 Elf64_Half e_machine;
7488 Elf64_Word e_version;
7493 Elf64_Half e_ehsize;
7494 Elf64_Half e_phentsize;
7496 Elf64_Half e_shentsize;
7498 Elf64_Half e_shstrndx;
7507 typedef struct elf32_phdr{
7512 Elf32_Word p_filesz;
7518 typedef struct elf64_phdr {
7524 Elf64_Xword p_filesz;
7525 Elf64_Xword p_memsz;
7526 Elf64_Xword p_align;
7528 # 269 "include/linux/elf.h"
7532 Elf32_Word sh_flags;
7534 Elf32_Off sh_offset;
7538 Elf32_Word sh_addralign;
7539 Elf32_Word sh_entsize;
7542 typedef struct elf64_shdr {
7545 Elf64_Xword sh_flags;
7547 Elf64_Off sh_offset;
7548 Elf64_Xword sh_size;
7551 Elf64_Xword sh_addralign;
7552 Elf64_Xword sh_entsize;
7554 # 342 "include/linux/elf.h"
7555 typedef struct elf32_note {
7556 Elf32_Word n_namesz;
7557 Elf32_Word n_descsz;
7562 typedef struct elf64_note {
7563 Elf64_Word n_namesz;
7564 Elf64_Word n_descsz;
7570 extern Elf32_Dyn _DYNAMIC [];
7571 # 17 "include/linux/module.h" 2
7574 # 1 "include/linux/moduleparam.h" 1
7575 # 29 "include/linux/moduleparam.h"
7576 struct kernel_param;
7579 typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
7581 typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
7583 struct kernel_param {
7592 struct kparam_string {
7593 unsigned int maxlen;
7604 unsigned int elemsize;
7607 # 95 "include/linux/moduleparam.h"
7608 extern int parse_args(const char *name,
7610 struct kernel_param *params,
7612 int (*unknown)(char *param, char *val));
7620 extern int param_set_byte(const char *val, struct kernel_param *kp);
7621 extern int param_get_byte(char *buffer, struct kernel_param *kp);
7624 extern int param_set_short(const char *val, struct kernel_param *kp);
7625 extern int param_get_short(char *buffer, struct kernel_param *kp);
7628 extern int param_set_ushort(const char *val, struct kernel_param *kp);
7629 extern int param_get_ushort(char *buffer, struct kernel_param *kp);
7632 extern int param_set_int(const char *val, struct kernel_param *kp);
7633 extern int param_get_int(char *buffer, struct kernel_param *kp);
7636 extern int param_set_uint(const char *val, struct kernel_param *kp);
7637 extern int param_get_uint(char *buffer, struct kernel_param *kp);
7640 extern int param_set_long(const char *val, struct kernel_param *kp);
7641 extern int param_get_long(char *buffer, struct kernel_param *kp);
7644 extern int param_set_ulong(const char *val, struct kernel_param *kp);
7645 extern int param_get_ulong(char *buffer, struct kernel_param *kp);
7648 extern int param_set_charp(const char *val, struct kernel_param *kp);
7649 extern int param_get_charp(char *buffer, struct kernel_param *kp);
7652 extern int param_set_bool(const char *val, struct kernel_param *kp);
7653 extern int param_get_bool(char *buffer, struct kernel_param *kp);
7656 extern int param_set_invbool(const char *val, struct kernel_param *kp);
7657 extern int param_get_invbool(char *buffer, struct kernel_param *kp);
7658 # 159 "include/linux/moduleparam.h"
7659 extern int param_array_set(const char *val, struct kernel_param *kp);
7660 extern int param_array_get(char *buffer, struct kernel_param *kp);
7662 extern int param_set_copystring(const char *val, struct kernel_param *kp);
7663 extern int param_get_string(char *buffer, struct kernel_param *kp);
7669 extern int module_param_sysfs_setup(struct module *mod,
7670 struct kernel_param *kparam,
7671 unsigned int num_params);
7673 extern void module_param_sysfs_remove(struct module *mod);
7674 # 20 "include/linux/module.h" 2
7675 # 1 "include/asm/local.h" 1
7676 # 1 "include/asm-generic/local.h" 1
7681 # 1 "include/linux/hardirq.h" 1
7686 # 1 "include/linux/smp_lock.h" 1
7687 # 6 "include/linux/hardirq.h" 2
7689 # 1 "include/asm/hardirq.h" 1
7695 # 1 "include/asm/irq.h" 1
7699 # 1 "include/asm/arch/irqs.h" 1
7700 # 9 "include/asm/arch/irqs.h"
7701 static inline __attribute__((always_inline)) u32 read_intpnd_0(void)
7704 asm volatile("mrc p6, 0, %0, c0, c3, 0":"=r" (val));
7710 static inline __attribute__((always_inline)) u32 read_intpnd_1(void)
7713 asm volatile("mrc p6, 0, %0, c1, c3, 0":"=r" (val));
7719 static inline __attribute__((always_inline)) u32 read_intpnd_2(void)
7722 asm volatile("mrc p6, 0, %0, c2, c3, 0":"=r" (val));
7728 static inline __attribute__((always_inline)) u32 read_intpnd_3(void)
7731 asm volatile("mrc p6, 0, %0, c3, c3, 0":"=r" (val));
7734 # 5 "include/asm/irq.h" 2
7735 # 22 "include/asm/irq.h"
7737 # 40 "include/asm/irq.h"
7738 extern void migrate_irqs(void);
7739 # 7 "include/asm/hardirq.h" 2
7742 unsigned int __softirq_pending;
7743 unsigned int local_timer_irqs;
7744 } __attribute__((__aligned__((1 << 5)))) irq_cpustat_t;
7746 # 1 "include/linux/irq_cpustat.h" 1
7747 # 20 "include/linux/irq_cpustat.h"
7748 extern irq_cpustat_t irq_stat[];
7749 # 14 "include/asm/hardirq.h" 2
7750 # 8 "include/linux/hardirq.h" 2
7751 # 90 "include/linux/hardirq.h"
7755 static inline __attribute__((always_inline)) void account_system_vtime(struct task_struct *tsk)
7758 # 124 "include/linux/hardirq.h"
7759 extern void irq_exit(void);
7760 # 6 "include/asm-generic/local.h" 2
7761 # 22 "include/asm-generic/local.h"
7766 # 1 "include/asm/local.h" 2
7767 # 21 "include/linux/module.h" 2
7769 # 1 "include/asm/module.h" 1
7773 struct mod_arch_specific
7777 # 23 "include/linux/module.h" 2
7778 # 34 "include/linux/module.h"
7779 struct kernel_symbol
7781 unsigned long value;
7785 struct modversion_info
7788 char name[(64 - sizeof(unsigned long))];
7793 struct module_attribute {
7794 struct attribute attr;
7795 ssize_t (*show)(struct module_attribute *, struct module *, char *);
7796 ssize_t (*store)(struct module_attribute *, struct module *,
7797 const char *, size_t count);
7798 void (*setup)(struct module *, const char *);
7799 int (*test)(struct module *);
7800 void (*free)(struct module *);
7803 struct module_kobject
7805 struct kobject kobj;
7810 extern int init_module(void);
7811 extern void cleanup_module(void);
7814 struct exception_table_entry;
7816 const struct exception_table_entry *
7817 search_extable(const struct exception_table_entry *first,
7818 const struct exception_table_entry *last,
7819 unsigned long value);
7820 void sort_extable(struct exception_table_entry *start,
7821 struct exception_table_entry *finish);
7822 void sort_main_extable(void);
7824 extern struct subsystem module_subsys;
7825 # 160 "include/linux/module.h"
7826 const struct exception_table_entry *search_exception_tables(unsigned long add);
7828 struct notifier_block;
7833 void *__symbol_get(const char *symbol);
7834 void *__symbol_get_gpl(const char *symbol);
7835 # 217 "include/linux/module.h"
7839 } __attribute__((__aligned__((1 << 5))));
7844 MODULE_STATE_COMING,
7850 struct module_sect_attr
7852 struct module_attribute mattr;
7854 unsigned long address;
7857 struct module_sect_attrs
7859 struct attribute_group grp;
7860 struct module_sect_attr attrs[0];
7863 struct module_param_attrs;
7867 enum module_state state;
7870 struct list_head list;
7873 char name[(64 - sizeof(unsigned long))];
7876 struct module_kobject mkobj;
7877 struct module_param_attrs *param_attrs;
7878 struct module_attribute *modinfo_attrs;
7879 const char *version;
7880 const char *srcversion;
7883 const struct kernel_symbol *syms;
7884 unsigned int num_syms;
7885 const unsigned long *crcs;
7888 const struct kernel_symbol *gpl_syms;
7889 unsigned int num_gpl_syms;
7890 const unsigned long *gpl_crcs;
7893 const struct kernel_symbol *unused_syms;
7894 unsigned int num_unused_syms;
7895 const unsigned long *unused_crcs;
7897 const struct kernel_symbol *unused_gpl_syms;
7898 unsigned int num_unused_gpl_syms;
7899 const unsigned long *unused_gpl_crcs;
7902 const struct kernel_symbol *gpl_future_syms;
7903 unsigned int num_gpl_future_syms;
7904 const unsigned long *gpl_future_crcs;
7907 unsigned int num_exentries;
7908 const struct exception_table_entry *extable;
7920 unsigned long init_size, core_size;
7923 unsigned long init_text_size, core_text_size;
7929 struct mod_arch_specific arch;
7939 struct module_ref ref[1];
7942 struct list_head modules_which_use_me;
7945 struct task_struct *waiter;
7954 unsigned long num_symtab;
7958 struct module_sect_attrs *sect_attrs;
7972 static inline __attribute__((always_inline)) int module_is_live(struct module *mod)
7974 return mod->state != MODULE_STATE_GOING;
7978 struct module *module_text_address(unsigned long addr);
7979 struct module *__module_text_address(unsigned long addr);
7980 int is_module_address(unsigned long addr);
7984 struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
7985 char *type, char *name, size_t namelen);
7988 unsigned long module_kallsyms_lookup_name(const char *name);
7990 int is_exported(const char *name, const struct module *mod);
7992 extern void __module_put_and_exit(struct module *mod, long code)
7993 __attribute__((noreturn));
7997 unsigned int module_refcount(struct module *mod);
7998 void __symbol_put(const char *symbol);
8000 void symbol_put_addr(void *addr);
8004 static inline __attribute__((always_inline)) void __module_get(struct module *module)
8007 do { if (__builtin_expect(!!((module_refcount(module) == 0)!=0), 0)) __bug("include/linux/module.h", 388, ((void *)0)); } while(0);
8008 atomic_long_inc(&(&module->ref[({ do { } while (0); 0; })].count)->a);
8013 static inline __attribute__((always_inline)) int try_module_get(struct module *module)
8018 unsigned int cpu = ({ do { } while (0); 0; });
8019 if (__builtin_expect(!!(module_is_live(module)), 1))
8020 atomic_long_inc(&(&module->ref[cpu].count)->a);
8028 static inline __attribute__((always_inline)) void module_put(struct module *module)
8031 unsigned int cpu = ({ do { } while (0); 0; });
8032 atomic_long_dec(&(&module->ref[cpu].count)->a);
8034 if (__builtin_expect(!!(!module_is_live(module)), 0))
8035 wake_up_process(module->waiter);
8039 # 455 "include/linux/module.h"
8040 const char *module_address_lookup(unsigned long addr,
8041 unsigned long *symbolsize,
8042 unsigned long *offset,
8046 const struct exception_table_entry *search_module_extables(unsigned long addr);
8048 int register_module_notifier(struct notifier_block * nb);
8049 int unregister_module_notifier(struct notifier_block * nb);
8051 extern void print_modules(void);
8053 struct device_driver;
8054 void module_add_driver(struct module *, struct device_driver *);
8055 void module_remove_driver(struct device_driver *);
8056 # 26 "arch/arm/mach-iop13xx/imu/dev.c" 2
8058 # 1 "include/linux/fs.h" 1
8059 # 9 "include/linux/fs.h"
8060 # 1 "include/linux/limits.h" 1
8061 # 10 "include/linux/fs.h" 2
8062 # 1 "include/linux/ioctl.h" 1
8066 # 1 "include/asm/ioctl.h" 1
8067 # 1 "include/asm-generic/ioctl.h" 1
8068 # 51 "include/asm-generic/ioctl.h"
8069 extern unsigned int __invalid_size_argument_for_IOC;
8070 # 1 "include/asm/ioctl.h" 2
8071 # 5 "include/linux/ioctl.h" 2
8072 # 11 "include/linux/fs.h" 2
8073 # 35 "include/linux/fs.h"
8074 struct files_stat_struct {
8079 extern struct files_stat_struct files_stat;
8080 extern int get_max_files(void);
8082 struct inodes_stat_t {
8087 extern struct inodes_stat_t inodes_stat;
8089 extern int leases_enable, lease_break_time;
8092 extern int dir_notify_enable;
8093 # 228 "include/linux/fs.h"
8094 # 1 "include/linux/kdev_t.h" 1
8095 # 21 "include/linux/kdev_t.h"
8096 static inline __attribute__((always_inline)) int old_valid_dev(dev_t dev)
8098 return ((unsigned int) ((dev) >> 20)) < 256 && ((unsigned int) ((dev) & ((1U << 20) - 1))) < 256;
8101 static inline __attribute__((always_inline)) u16 old_encode_dev(dev_t dev)
8103 return (((unsigned int) ((dev) >> 20)) << 8) | ((unsigned int) ((dev) & ((1U << 20) - 1)));
8106 static inline __attribute__((always_inline)) dev_t old_decode_dev(u16 val)
8108 return ((((val >> 8) & 255) << 20) | (val & 255));
8111 static inline __attribute__((always_inline)) int new_valid_dev(dev_t dev)
8116 static inline __attribute__((always_inline)) u32 new_encode_dev(dev_t dev)
8118 unsigned major = ((unsigned int) ((dev) >> 20));
8119 unsigned minor = ((unsigned int) ((dev) & ((1U << 20) - 1)));
8120 return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
8123 static inline __attribute__((always_inline)) dev_t new_decode_dev(u32 dev)
8125 unsigned major = (dev & 0xfff00) >> 8;
8126 unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00);
8127 return (((major) << 20) | (minor));
8130 static inline __attribute__((always_inline)) int huge_valid_dev(dev_t dev)
8135 static inline __attribute__((always_inline)) u64 huge_encode_dev(dev_t dev)
8137 return new_encode_dev(dev);
8140 static inline __attribute__((always_inline)) dev_t huge_decode_dev(u64 dev)
8142 return new_decode_dev(dev);
8145 static inline __attribute__((always_inline)) int sysv_valid_dev(dev_t dev)
8147 return ((unsigned int) ((dev) >> 20)) < (1<<14) && ((unsigned int) ((dev) & ((1U << 20) - 1))) < (1<<18);
8150 static inline __attribute__((always_inline)) u32 sysv_encode_dev(dev_t dev)
8152 return ((unsigned int) ((dev) & ((1U << 20) - 1))) | (((unsigned int) ((dev) >> 20)) << 18);
8155 static inline __attribute__((always_inline)) unsigned sysv_major(u32 dev)
8157 return (dev >> 18) & 0x3fff;
8160 static inline __attribute__((always_inline)) unsigned sysv_minor(u32 dev)
8162 return dev & 0x3ffff;
8164 # 229 "include/linux/fs.h" 2
8165 # 1 "include/linux/dcache.h" 1
8166 # 12 "include/linux/dcache.h"
8169 # 33 "include/linux/dcache.h"
8173 const unsigned char *name;
8176 struct dentry_stat_t {
8183 extern struct dentry_stat_t dentry_stat;
8190 static inline __attribute__((always_inline)) unsigned long
8191 partial_name_hash(unsigned long c, unsigned long prevhash)
8193 return (prevhash + (c << 4) + (c >> 4)) * 11;
8200 static inline __attribute__((always_inline)) unsigned long end_name_hash(unsigned long hash)
8202 return (unsigned int) hash;
8206 static inline __attribute__((always_inline)) unsigned int
8207 full_name_hash(const unsigned char *name, unsigned int len)
8209 unsigned long hash = 0;
8211 hash = partial_name_hash(*name++, hash);
8212 return end_name_hash(hash);
8215 struct dcookie_struct;
8221 unsigned int d_flags;
8223 struct inode *d_inode;
8229 struct hlist_node d_hash;
8230 struct dentry *d_parent;
8233 struct list_head d_lru;
8238 struct list_head d_child;
8239 struct rcu_head d_rcu;
8241 struct list_head d_subdirs;
8242 struct list_head d_alias;
8243 unsigned long d_time;
8244 struct dentry_operations *d_op;
8245 struct super_block *d_sb;
8251 unsigned char d_iname[36];
8260 enum dentry_d_lock_class
8262 DENTRY_D_LOCK_NORMAL,
8263 DENTRY_D_LOCK_NESTED
8266 struct dentry_operations {
8267 int (*d_revalidate)(struct dentry *, struct nameidata *);
8268 int (*d_hash) (struct dentry *, struct qstr *);
8269 int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
8270 int (*d_delete)(struct dentry *);
8271 void (*d_release)(struct dentry *);
8272 void (*d_iput)(struct dentry *, struct inode *);
8274 # 179 "include/linux/dcache.h"
8275 extern spinlock_t dcache_lock;
8276 # 197 "include/linux/dcache.h"
8277 static inline __attribute__((always_inline)) void __d_drop(struct dentry *dentry)
8279 if (!(dentry->d_flags & 0x0010)) {
8280 dentry->d_flags |= 0x0010;
8281 hlist_del_rcu(&dentry->d_hash);
8285 static inline __attribute__((always_inline)) void d_drop(struct dentry *dentry)
8287 do { do { } while (0); (void)0; (void)(&dcache_lock); } while (0);
8288 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8290 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8291 do { do { } while (0); (void)0; (void)(&dcache_lock); } while (0);
8294 static inline __attribute__((always_inline)) int dname_external(struct dentry *dentry)
8296 return dentry->d_name.name != dentry->d_iname;
8302 extern void d_instantiate(struct dentry *, struct inode *);
8303 extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
8304 extern void d_delete(struct dentry *);
8307 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
8308 extern struct dentry * d_alloc_anon(struct inode *);
8309 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
8310 extern void shrink_dcache_sb(struct super_block *);
8311 extern void shrink_dcache_parent(struct dentry *);
8312 extern int d_invalidate(struct dentry *);
8315 extern struct dentry * d_alloc_root(struct inode *);
8318 extern void d_genocide(struct dentry *);
8320 extern struct dentry *d_find_alias(struct inode *);
8321 extern void d_prune_aliases(struct inode *);
8324 extern int have_submounts(struct dentry *);
8329 extern void d_rehash(struct dentry *);
8330 # 260 "include/linux/dcache.h"
8331 static inline __attribute__((always_inline)) void d_add(struct dentry *entry, struct inode *inode)
8333 d_instantiate(entry, inode);
8336 # 274 "include/linux/dcache.h"
8337 static inline __attribute__((always_inline)) struct dentry *d_add_unique(struct dentry *entry, struct inode *inode)
8341 res = d_instantiate_unique(entry, inode);
8342 d_rehash(res != ((void *)0) ? res : entry);
8347 extern void d_move(struct dentry *, struct dentry *);
8350 extern struct dentry * d_lookup(struct dentry *, struct qstr *);
8351 extern struct dentry * __d_lookup(struct dentry *, struct qstr *);
8352 extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *);
8355 extern int d_validate(struct dentry *, struct dentry *);
8357 extern char * d_path(struct dentry *, struct vfsmount *, char *, int);
8358 # 311 "include/linux/dcache.h"
8359 static inline __attribute__((always_inline)) struct dentry *dget(struct dentry *dentry)
8362 do { if (__builtin_expect(!!((!((&dentry->d_count)->counter))!=0), 0)) __bug("include/linux/dcache.h", 314, ((void *)0)); } while(0);
8363 (void) atomic_add_return(1, &dentry->d_count);
8368 extern struct dentry * dget_locked(struct dentry *);
8369 # 329 "include/linux/dcache.h"
8370 static inline __attribute__((always_inline)) int d_unhashed(struct dentry *dentry)
8372 return (dentry->d_flags & 0x0010);
8375 static inline __attribute__((always_inline)) struct dentry *dget_parent(struct dentry *dentry)
8379 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8380 ret = dget(dentry->d_parent);
8381 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
8385 extern void dput(struct dentry *);
8387 static inline __attribute__((always_inline)) int d_mountpoint(struct dentry *dentry)
8389 return dentry->d_mounted;
8392 extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
8393 extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
8394 extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
8396 extern int sysctl_vfs_cache_pressure;
8397 # 230 "include/linux/fs.h" 2
8402 # 1 "include/linux/radix-tree.h" 1
8403 # 29 "include/linux/radix-tree.h"
8404 struct radix_tree_root {
8405 unsigned int height;
8407 struct radix_tree_node *rnode;
8409 # 51 "include/linux/radix-tree.h"
8410 int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
8411 void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
8412 void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long);
8413 void *radix_tree_delete(struct radix_tree_root *, unsigned long);
8415 radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
8416 unsigned long first_index, unsigned int max_items);
8417 int radix_tree_preload(gfp_t gfp_mask);
8418 void radix_tree_init(void);
8419 void *radix_tree_tag_set(struct radix_tree_root *root,
8420 unsigned long index, unsigned int tag);
8421 void *radix_tree_tag_clear(struct radix_tree_root *root,
8422 unsigned long index, unsigned int tag);
8423 int radix_tree_tag_get(struct radix_tree_root *root,
8424 unsigned long index, unsigned int tag);
8426 radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results,
8427 unsigned long first_index, unsigned int max_items,
8429 int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag);
8431 static inline __attribute__((always_inline)) void radix_tree_preload_end(void)
8435 # 235 "include/linux/fs.h" 2
8436 # 1 "include/linux/prio_tree.h" 1
8437 # 14 "include/linux/prio_tree.h"
8438 struct raw_prio_tree_node {
8439 struct prio_tree_node *left;
8440 struct prio_tree_node *right;
8441 struct prio_tree_node *parent;
8444 struct prio_tree_node {
8445 struct prio_tree_node *left;
8446 struct prio_tree_node *right;
8447 struct prio_tree_node *parent;
8448 unsigned long start;
8452 struct prio_tree_root {
8453 struct prio_tree_node *prio_tree_node;
8454 unsigned short index_bits;
8462 struct prio_tree_iter {
8463 struct prio_tree_node *cur;
8465 unsigned long value;
8468 struct prio_tree_root *root;
8469 unsigned long r_index;
8470 unsigned long h_index;
8473 static inline __attribute__((always_inline)) void prio_tree_iter_init(struct prio_tree_iter *iter,
8474 struct prio_tree_root *root, unsigned long r_index, unsigned long h_index)
8477 iter->r_index = r_index;
8478 iter->h_index = h_index;
8479 iter->cur = ((void *)0);
8481 # 84 "include/linux/prio_tree.h"
8482 static inline __attribute__((always_inline)) int prio_tree_empty(const struct prio_tree_root *root)
8484 return root->prio_tree_node == ((void *)0);
8487 static inline __attribute__((always_inline)) int prio_tree_root(const struct prio_tree_node *node)
8489 return node->parent == node;
8492 static inline __attribute__((always_inline)) int prio_tree_left_empty(const struct prio_tree_node *node)
8494 return node->left == node;
8497 static inline __attribute__((always_inline)) int prio_tree_right_empty(const struct prio_tree_node *node)
8499 return node->right == node;
8503 struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
8504 struct prio_tree_node *old, struct prio_tree_node *node);
8505 struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
8506 struct prio_tree_node *node);
8507 void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node);
8508 struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter);
8509 # 236 "include/linux/fs.h" 2
8510 # 244 "include/linux/fs.h"
8515 struct pipe_inode_info;
8516 struct poll_table_struct;
8518 struct vm_area_struct;
8521 extern void __attribute__ ((__section__ (".init.text"))) inode_init(unsigned long);
8522 extern void __attribute__ ((__section__ (".init.text"))) inode_init_early(void);
8523 extern void __attribute__ ((__section__ (".init.text"))) mnt_init(unsigned long);
8524 extern void __attribute__ ((__section__ (".init.text"))) files_init(unsigned long);
8527 typedef int (get_block_t)(struct inode *inode, sector_t iblock,
8528 struct buffer_head *bh_result, int create);
8529 typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
8530 ssize_t bytes, void *private);
8531 # 293 "include/linux/fs.h"
8533 unsigned int ia_valid;
8538 struct timespec ia_atime;
8539 struct timespec ia_mtime;
8540 struct timespec ia_ctime;
8547 struct file *ia_file;
8553 # 1 "include/linux/quota.h" 1
8554 # 44 "include/linux/quota.h"
8555 typedef __kernel_uid32_t qid_t;
8556 typedef __u64 qsize_t;
8558 extern spinlock_t dq_data_lock;
8559 # 105 "include/linux/quota.h"
8561 __u64 dqb_bhardlimit;
8562 __u64 dqb_bsoftlimit;
8564 __u64 dqb_ihardlimit;
8565 __u64 dqb_isoftlimit;
8566 __u64 dqb_curinodes;
8571 # 126 "include/linux/quota.h"
8583 # 1 "include/linux/dqblk_xfs.h" 1
8584 # 50 "include/linux/dqblk_xfs.h"
8585 typedef struct fs_disk_quota {
8590 __u64 d_blk_hardlimit;
8591 __u64 d_blk_softlimit;
8592 __u64 d_ino_hardlimit;
8593 __u64 d_ino_softlimit;
8602 __u64 d_rtb_hardlimit;
8603 __u64 d_rtb_softlimit;
8610 # 137 "include/linux/dqblk_xfs.h"
8611 typedef struct fs_qfilestat {
8617 typedef struct fs_quota_stat {
8621 fs_qfilestat_t qs_uquota;
8622 fs_qfilestat_t qs_gquota;
8624 __s32 qs_btimelimit;
8625 __s32 qs_itimelimit;
8626 __s32 qs_rtbtimelimit;
8627 __u16 qs_bwarnlimit;
8628 __u16 qs_iwarnlimit;
8630 # 138 "include/linux/quota.h" 2
8631 # 1 "include/linux/dqblk_v1.h" 1
8632 # 21 "include/linux/dqblk_v1.h"
8633 struct v1_mem_dqinfo {
8635 # 139 "include/linux/quota.h" 2
8636 # 1 "include/linux/dqblk_v2.h" 1
8637 # 20 "include/linux/dqblk_v2.h"
8638 struct v2_mem_dqinfo {
8639 unsigned int dqi_blocks;
8640 unsigned int dqi_free_blk;
8641 unsigned int dqi_free_entry;
8643 # 140 "include/linux/quota.h" 2
8644 # 151 "include/linux/quota.h"
8646 __u32 dqb_bhardlimit;
8647 __u32 dqb_bsoftlimit;
8648 qsize_t dqb_curspace;
8649 __u32 dqb_ihardlimit;
8650 __u32 dqb_isoftlimit;
8651 __u32 dqb_curinodes;
8659 struct quota_format_type;
8662 struct quota_format_type *dqi_format;
8663 struct list_head dqi_dirty_list;
8664 unsigned long dqi_flags;
8665 unsigned int dqi_bgrace;
8666 unsigned int dqi_igrace;
8668 struct v1_mem_dqinfo v1_i;
8669 struct v2_mem_dqinfo v2_i;
8679 extern void mark_info_dirty(struct super_block *sb, int type);
8693 int allocated_dquots;
8698 extern struct dqstats dqstats;
8699 # 213 "include/linux/quota.h"
8701 struct hlist_node dq_hash;
8702 struct list_head dq_inuse;
8703 struct list_head dq_free;
8704 struct list_head dq_dirty;
8705 struct mutex dq_lock;
8707 wait_queue_head_t dq_wait_unused;
8708 struct super_block *dq_sb;
8711 unsigned long dq_flags;
8713 struct mem_dqblk dq_dqb;
8722 struct quota_format_ops {
8723 int (*check_quota_file)(struct super_block *sb, int type);
8724 int (*read_file_info)(struct super_block *sb, int type);
8725 int (*write_file_info)(struct super_block *sb, int type);
8726 int (*free_file_info)(struct super_block *sb, int type);
8727 int (*read_dqblk)(struct dquot *dquot);
8728 int (*commit_dqblk)(struct dquot *dquot);
8729 int (*release_dqblk)(struct dquot *dquot);
8733 struct dquot_operations {
8734 int (*initialize) (struct inode *, int);
8735 int (*drop) (struct inode *);
8736 int (*alloc_space) (struct inode *, qsize_t, int);
8737 int (*alloc_inode) (const struct inode *, unsigned long);
8738 int (*free_space) (struct inode *, qsize_t);
8739 int (*free_inode) (const struct inode *, unsigned long);
8740 int (*transfer) (struct inode *, struct iattr *);
8741 int (*write_dquot) (struct dquot *);
8742 int (*acquire_dquot) (struct dquot *);
8743 int (*release_dquot) (struct dquot *);
8744 int (*mark_dirty) (struct dquot *);
8745 int (*write_info) (struct super_block *, int);
8749 struct quotactl_ops {
8750 int (*quota_on)(struct super_block *, int, int, char *);
8751 int (*quota_off)(struct super_block *, int);
8752 int (*quota_sync)(struct super_block *, int);
8753 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
8754 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
8755 int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
8756 int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
8757 int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
8758 int (*set_xstate)(struct super_block *, unsigned int, int);
8759 int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
8760 int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
8763 struct quota_format_type {
8765 struct quota_format_ops *qf_ops;
8766 struct module *qf_owner;
8767 struct quota_format_type *qf_next;
8775 struct mutex dqio_mutex;
8776 struct mutex dqonoff_mutex;
8777 struct rw_semaphore dqptr_sem;
8778 struct inode *files[2];
8779 struct mem_dqinfo info[2];
8780 struct quota_format_ops *ops[2];
8784 int mark_dquot_dirty(struct dquot *dquot);
8785 # 307 "include/linux/quota.h"
8786 int register_quota_format(struct quota_format_type *fmt);
8787 void unregister_quota_format(struct quota_format_type *fmt);
8789 struct quota_module_name {
8793 # 315 "include/linux/fs.h" 2
8794 # 342 "include/linux/fs.h"
8795 enum positive_aop_returns {
8796 AOP_WRITEPAGE_ACTIVATE = 0x80000,
8797 AOP_TRUNCATED_PAGE = 0x80001,
8804 struct address_space;
8805 struct writeback_control;
8807 struct address_space_operations {
8808 int (*writepage)(struct page *page, struct writeback_control *wbc);
8809 int (*readpage)(struct file *, struct page *);
8810 void (*sync_page)(struct page *);
8813 int (*writepages)(struct address_space *, struct writeback_control *);
8816 int (*set_page_dirty)(struct page *page);
8818 int (*readpages)(struct file *filp, struct address_space *mapping,
8819 struct list_head *pages, unsigned nr_pages);
8825 int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
8826 int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
8828 sector_t (*bmap)(struct address_space *, sector_t);
8829 void (*invalidatepage) (struct page *, unsigned long);
8830 int (*releasepage) (struct page *, gfp_t);
8831 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
8832 loff_t offset, unsigned long nr_segs);
8833 struct page* (*get_xip_page)(struct address_space *, sector_t,
8836 int (*migratepage) (struct address_space *,
8837 struct page *, struct page *);
8840 struct backing_dev_info;
8841 struct address_space {
8843 struct radix_tree_root page_tree;
8845 unsigned int i_mmap_writable;
8846 struct prio_tree_root i_mmap;
8847 struct list_head i_mmap_nonlinear;
8848 spinlock_t i_mmap_lock;
8849 unsigned int truncate_count;
8850 unsigned long nrpages;
8851 unsigned long writeback_index;
8852 const struct address_space_operations *a_ops;
8853 unsigned long flags;
8854 struct backing_dev_info *backing_dev_info;
8855 spinlock_t private_lock;
8856 struct list_head private_list;
8857 struct address_space *assoc_mapping;
8858 } __attribute__((aligned(sizeof(long))));
8865 struct block_device {
8867 struct inode * bd_inode;
8869 struct mutex bd_mutex;
8870 struct mutex bd_mount_mutex;
8871 struct list_head bd_inodes;
8875 struct list_head bd_holder_list;
8877 struct block_device * bd_contains;
8878 unsigned bd_block_size;
8879 struct hd_struct * bd_part;
8881 unsigned bd_part_count;
8883 struct gendisk * bd_disk;
8884 struct list_head bd_list;
8885 struct backing_dev_info *bd_inode_backing_dev_info;
8892 unsigned long bd_private;
8894 # 449 "include/linux/fs.h"
8895 enum bdev_bd_mutex_lock_class
8901 # 464 "include/linux/fs.h"
8902 int mapping_tagged(struct address_space *mapping, int tag);
8907 static inline __attribute__((always_inline)) int mapping_mapped(struct address_space *mapping)
8909 return !prio_tree_empty(&mapping->i_mmap) ||
8910 !list_empty(&mapping->i_mmap_nonlinear);
8919 static inline __attribute__((always_inline)) int mapping_writably_mapped(struct address_space *mapping)
8921 return mapping->i_mmap_writable != 0;
8923 # 497 "include/linux/fs.h"
8925 struct hlist_node i_hash;
8926 struct list_head i_list;
8927 struct list_head i_sb_list;
8928 struct list_head i_dentry;
8929 unsigned long i_ino;
8932 unsigned int i_nlink;
8937 struct timespec i_atime;
8938 struct timespec i_mtime;
8939 struct timespec i_ctime;
8940 unsigned int i_blkbits;
8941 unsigned long i_blksize;
8942 unsigned long i_version;
8944 unsigned short i_bytes;
8946 struct mutex i_mutex;
8947 struct rw_semaphore i_alloc_sem;
8948 struct inode_operations *i_op;
8949 const struct file_operations *i_fop;
8950 struct super_block *i_sb;
8951 struct file_lock *i_flock;
8952 struct address_space *i_mapping;
8953 struct address_space i_data;
8958 struct list_head i_devices;
8959 struct pipe_inode_info *i_pipe;
8960 struct block_device *i_bdev;
8961 struct cdev *i_cdev;
8967 unsigned long i_dnotify_mask;
8968 struct dnotify_struct *i_dnotify;
8976 unsigned long i_state;
8977 unsigned long dirtied_when;
8979 unsigned int i_flags;
8981 atomic_t i_writecount;
8990 # 575 "include/linux/fs.h"
8991 enum inode_i_mutex_lock_class
8999 # 594 "include/linux/fs.h"
9000 static inline __attribute__((always_inline)) loff_t i_size_read(struct inode *inode)
9002 # 613 "include/linux/fs.h"
9003 return inode->i_size;
9008 static inline __attribute__((always_inline)) void i_size_write(struct inode *inode, loff_t i_size)
9010 # 629 "include/linux/fs.h"
9011 inode->i_size = i_size;
9015 static inline __attribute__((always_inline)) unsigned iminor(struct inode *inode)
9017 return ((unsigned int) ((inode->i_rdev) & ((1U << 20) - 1)));
9020 static inline __attribute__((always_inline)) unsigned imajor(struct inode *inode)
9022 return ((unsigned int) ((inode->i_rdev) >> 20));
9025 extern struct block_device *I_BDEV(struct inode *inode);
9027 struct fown_struct {
9038 struct file_ra_state {
9039 unsigned long start;
9041 unsigned long flags;
9042 unsigned long cache_hit;
9043 unsigned long prev_page;
9044 unsigned long ahead_start;
9045 unsigned long ahead_size;
9046 unsigned long ra_pages;
9047 unsigned long mmap_hit;
9048 unsigned long mmap_miss;
9059 struct list_head fu_list;
9060 struct rcu_head fu_rcuhead;
9062 struct dentry *f_dentry;
9063 struct vfsmount *f_vfsmnt;
9064 const struct file_operations *f_op;
9066 unsigned int f_flags;
9069 struct fown_struct f_owner;
9070 unsigned int f_uid, f_gid;
9071 struct file_ra_state f_ra;
9073 unsigned long f_version;
9081 struct list_head f_ep_links;
9082 spinlock_t f_ep_lock;
9084 struct address_space *f_mapping;
9086 extern spinlock_t files_lock;
9087 # 736 "include/linux/fs.h"
9088 typedef struct files_struct *fl_owner_t;
9090 struct file_lock_operations {
9091 void (*fl_insert)(struct file_lock *);
9092 void (*fl_remove)(struct file_lock *);
9093 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
9094 void (*fl_release_private)(struct file_lock *);
9097 struct lock_manager_operations {
9098 int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
9099 void (*fl_notify)(struct file_lock *);
9100 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
9101 void (*fl_release_private)(struct file_lock *);
9102 void (*fl_break)(struct file_lock *);
9103 int (*fl_mylease)(struct file_lock *, struct file_lock *);
9104 int (*fl_change)(struct file_lock **, int);
9108 # 1 "include/linux/nfs_fs_i.h" 1
9114 # 1 "include/linux/nfs.h" 1
9115 # 39 "include/linux/nfs.h"
9134 NFSERR_OPNOTSUPP = 45,
9135 NFSERR_NAMETOOLONG = 63,
9136 NFSERR_NOTEMPTY = 66,
9141 NFSERR_BADHANDLE = 10001,
9142 NFSERR_NOT_SYNC = 10002,
9143 NFSERR_BAD_COOKIE = 10003,
9144 NFSERR_NOTSUPP = 10004,
9145 NFSERR_TOOSMALL = 10005,
9146 NFSERR_SERVERFAULT = 10006,
9147 NFSERR_BADTYPE = 10007,
9148 NFSERR_JUKEBOX = 10008,
9149 NFSERR_SAME = 10009,
9150 NFSERR_DENIED = 10010,
9151 NFSERR_EXPIRED = 10011,
9152 NFSERR_LOCKED = 10012,
9153 NFSERR_GRACE = 10013,
9154 NFSERR_FHEXPIRED = 10014,
9155 NFSERR_SHARE_DENIED = 10015,
9156 NFSERR_WRONGSEC = 10016,
9157 NFSERR_CLID_INUSE = 10017,
9158 NFSERR_RESOURCE = 10018,
9159 NFSERR_MOVED = 10019,
9160 NFSERR_NOFILEHANDLE = 10020,
9161 NFSERR_MINOR_VERS_MISMATCH = 10021,
9162 NFSERR_STALE_CLIENTID = 10022,
9163 NFSERR_STALE_STATEID = 10023,
9164 NFSERR_OLD_STATEID = 10024,
9165 NFSERR_BAD_STATEID = 10025,
9166 NFSERR_BAD_SEQID = 10026,
9167 NFSERR_NOT_SAME = 10027,
9168 NFSERR_LOCK_RANGE = 10028,
9169 NFSERR_SYMLINK = 10029,
9170 NFSERR_RESTOREFH = 10030,
9171 NFSERR_LEASE_MOVED = 10031,
9172 NFSERR_ATTRNOTSUPP = 10032,
9173 NFSERR_NO_GRACE = 10033,
9174 NFSERR_RECLAIM_BAD = 10034,
9175 NFSERR_RECLAIM_CONFLICT = 10035,
9176 NFSERR_BAD_XDR = 10036,
9177 NFSERR_LOCKS_HELD = 10037,
9178 NFSERR_OPENMODE = 10038,
9179 NFSERR_BADOWNER = 10039,
9180 NFSERR_BADCHAR = 10040,
9181 NFSERR_BADNAME = 10041,
9182 NFSERR_BAD_RANGE = 10042,
9183 NFSERR_LOCK_NOTSUPP = 10043,
9184 NFSERR_OP_ILLEGAL = 10044,
9185 NFSERR_DEADLOCK = 10045,
9186 NFSERR_FILE_OPEN = 10046,
9187 NFSERR_ADMIN_REVOKED = 10047,
9188 NFSERR_CB_PATH_DOWN = 10048,
9189 NFSERR_REPLAY_ME = 10049
9207 # 1 "include/linux/sunrpc/msg_prot.h" 1
9208 # 15 "include/linux/sunrpc/msg_prot.h"
9209 typedef u32 rpc_authflavor_t;
9211 enum rpc_auth_flavors {
9218 RPC_AUTH_MAXFLAVOR = 8,
9220 RPC_AUTH_GSS_KRB5 = 390003,
9221 RPC_AUTH_GSS_KRB5I = 390004,
9222 RPC_AUTH_GSS_KRB5P = 390005,
9223 RPC_AUTH_GSS_LKEY = 390006,
9224 RPC_AUTH_GSS_LKEYI = 390007,
9225 RPC_AUTH_GSS_LKEYP = 390008,
9226 RPC_AUTH_GSS_SPKM = 390009,
9227 RPC_AUTH_GSS_SPKMI = 390010,
9228 RPC_AUTH_GSS_SPKMP = 390011,
9236 enum rpc_reply_stat {
9237 RPC_MSG_ACCEPTED = 0,
9241 enum rpc_accept_stat {
9243 RPC_PROG_UNAVAIL = 1,
9244 RPC_PROG_MISMATCH = 2,
9245 RPC_PROC_UNAVAIL = 3,
9246 RPC_GARBAGE_ARGS = 4,
9250 enum rpc_reject_stat {
9255 enum rpc_auth_stat {
9257 RPC_AUTH_BADCRED = 1,
9258 RPC_AUTH_REJECTEDCRED = 2,
9259 RPC_AUTH_BADVERF = 3,
9260 RPC_AUTH_REJECTEDVERF = 4,
9261 RPC_AUTH_TOOWEAK = 5,
9263 RPCSEC_GSS_CREDPROBLEM = 13,
9264 RPCSEC_GSS_CTXPROBLEM = 14
9266 # 98 "include/linux/sunrpc/msg_prot.h"
9267 typedef u32 rpc_fraghdr;
9268 # 131 "include/linux/nfs.h" 2
9276 unsigned short size;
9277 unsigned char data[128];
9284 static inline __attribute__((always_inline)) int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
9286 return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
9289 static inline __attribute__((always_inline)) void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
9291 target->size = source->size;
9292 memcpy(target->data, source->data, source->size);
9294 # 165 "include/linux/nfs.h"
9295 enum nfs3_stable_how {
9300 # 7 "include/linux/nfs_fs_i.h" 2
9302 struct nlm_lockowner;
9307 struct nfs_lock_info {
9309 struct nlm_lockowner *owner;
9310 struct list_head list;
9313 struct nfs4_lock_state;
9314 struct nfs4_lock_info {
9315 struct nfs4_lock_state *owner;
9317 # 757 "include/linux/fs.h" 2
9320 struct file_lock *fl_next;
9321 struct list_head fl_link;
9322 struct list_head fl_block;
9323 fl_owner_t fl_owner;
9324 unsigned int fl_pid;
9325 wait_queue_head_t fl_wait;
9326 struct file *fl_file;
9327 unsigned char fl_flags;
9328 unsigned char fl_type;
9332 struct fasync_struct * fl_fasync;
9333 unsigned long fl_break_time;
9335 struct file_lock_operations *fl_ops;
9336 struct lock_manager_operations *fl_lmops;
9338 struct nfs_lock_info nfs_fl;
9339 struct nfs4_lock_info nfs4_fl;
9342 # 789 "include/linux/fs.h"
9343 # 1 "include/linux/fcntl.h" 1
9347 # 1 "include/asm/fcntl.h" 1
9348 # 9 "include/asm/fcntl.h"
9349 # 1 "include/asm-generic/fcntl.h" 1
9350 # 114 "include/asm-generic/fcntl.h"
9359 # 137 "include/asm-generic/fcntl.h"
9368 # 10 "include/asm/fcntl.h" 2
9369 # 5 "include/linux/fcntl.h" 2
9370 # 790 "include/linux/fs.h" 2
9372 extern int fcntl_getlk(struct file *, struct flock *);
9373 extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
9377 extern int fcntl_getlk64(struct file *, struct flock64 *);
9378 extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
9382 extern void send_sigio(struct fown_struct *fown, int fd, int band);
9383 extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg);
9384 extern int fcntl_getlease(struct file *filp);
9387 extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte,
9388 unsigned int flags);
9391 extern void locks_init_lock(struct file_lock *);
9392 extern void locks_copy_lock(struct file_lock *, struct file_lock *);
9393 extern void locks_remove_posix(struct file *, fl_owner_t);
9394 extern void locks_remove_flock(struct file *);
9395 extern int posix_test_lock(struct file *, struct file_lock *, struct file_lock *);
9396 extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_lock *);
9397 extern int posix_lock_file(struct file *, struct file_lock *);
9398 extern int posix_lock_file_wait(struct file *, struct file_lock *);
9399 extern int posix_unblock_lock(struct file *, struct file_lock *);
9400 extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
9401 extern int __break_lease(struct inode *inode, unsigned int flags);
9402 extern void lease_get_mtime(struct inode *, struct timespec *time);
9403 extern int setlease(struct file *, long, struct file_lock **);
9404 extern int lease_modify(struct file_lock **, int);
9405 extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
9406 extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
9408 struct fasync_struct {
9411 struct fasync_struct *fa_next;
9412 struct file *fa_file;
9418 extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
9420 extern void kill_fasync(struct fasync_struct **, int, int);
9422 extern void __kill_fasync(struct fasync_struct *, int, int);
9424 extern int f_setown(struct file *filp, unsigned long arg, int force);
9425 extern void f_delown(struct file *filp);
9426 extern int send_sigurg(struct fown_struct *fown);
9427 # 855 "include/linux/fs.h"
9428 extern struct list_head super_blocks;
9429 extern spinlock_t sb_lock;
9433 struct super_block {
9434 struct list_head s_list;
9436 unsigned long s_blocksize;
9437 unsigned char s_blocksize_bits;
9438 unsigned char s_dirt;
9439 unsigned long long s_maxbytes;
9440 struct file_system_type *s_type;
9441 struct super_operations *s_op;
9442 struct dquot_operations *dq_op;
9443 struct quotactl_ops *s_qcop;
9444 struct export_operations *s_export_op;
9445 unsigned long s_flags;
9446 unsigned long s_magic;
9447 struct dentry *s_root;
9448 struct rw_semaphore s_umount;
9449 struct mutex s_lock;
9455 struct xattr_handler **s_xattr;
9457 struct list_head s_inodes;
9458 struct list_head s_dirty;
9459 struct list_head s_io;
9460 struct hlist_head s_anon;
9461 struct list_head s_files;
9463 struct block_device *s_bdev;
9464 struct list_head s_instances;
9465 struct quota_info s_dquot;
9468 wait_queue_head_t s_wait_unfrozen;
9478 struct mutex s_vfs_rename_mutex;
9485 extern struct timespec current_fs_time(struct super_block *sb);
9492 SB_FREEZE_WRITE = 1,
9493 SB_FREEZE_TRANS = 2,
9499 static inline __attribute__((always_inline)) void get_fs_excl(void)
9501 (void) atomic_add_return(1, &(get_current())->fs_excl);
9504 static inline __attribute__((always_inline)) void put_fs_excl(void)
9506 (void) atomic_sub_return(1, &(get_current())->fs_excl);
9509 static inline __attribute__((always_inline)) int has_fs_excl(void)
9511 return ((&(get_current())->fs_excl)->counter);
9518 static inline __attribute__((always_inline)) void lock_super(struct super_block * sb)
9521 mutex_lock(&sb->s_lock);
9524 static inline __attribute__((always_inline)) void unlock_super(struct super_block * sb)
9527 mutex_unlock(&sb->s_lock);
9533 extern int vfs_permission(struct nameidata *, int);
9534 extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
9535 extern int vfs_mkdir(struct inode *, struct dentry *, int);
9536 extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
9537 extern int vfs_symlink(struct inode *, struct dentry *, const char *, int);
9538 extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
9539 extern int vfs_rmdir(struct inode *, struct dentry *);
9540 extern int vfs_unlink(struct inode *, struct dentry *);
9541 extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
9546 extern void dentry_unhash(struct dentry *dentry);
9551 extern int file_permission(struct file *, int);
9552 # 999 "include/linux/fs.h"
9553 int generic_osync_inode(struct inode *, struct address_space *, int);
9561 typedef int (*filldir_t)(void *, const char *, int, loff_t, ino_t, unsigned);
9563 struct block_device_operations {
9564 int (*open) (struct inode *, struct file *);
9565 int (*release) (struct inode *, struct file *);
9566 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
9567 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
9568 long (*compat_ioctl) (struct file *, unsigned, unsigned long);
9569 int (*direct_access) (struct block_device *, sector_t, unsigned long *);
9570 int (*media_changed) (struct gendisk *);
9571 int (*revalidate_disk) (struct gendisk *);
9572 int (*getgeo)(struct block_device *, struct hd_geometry *);
9573 struct module *owner;
9575 # 1031 "include/linux/fs.h"
9584 } read_descriptor_t;
9586 typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long);
9587 # 1054 "include/linux/fs.h"
9588 struct file_operations {
9589 struct module *owner;
9590 loff_t (*llseek) (struct file *, loff_t, int);
9591 ssize_t (*read) (struct file *, char *, size_t, loff_t *);
9592 ssize_t (*aio_read) (struct kiocb *, char *, size_t, loff_t);
9593 ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
9594 ssize_t (*aio_write) (struct kiocb *, const char *, size_t, loff_t);
9595 int (*readdir) (struct file *, void *, filldir_t);
9596 unsigned int (*poll) (struct file *, struct poll_table_struct *);
9597 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
9598 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
9599 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
9600 int (*mmap) (struct file *, struct vm_area_struct *);
9601 int (*open) (struct inode *, struct file *);
9602 int (*flush) (struct file *, fl_owner_t id);
9603 int (*release) (struct inode *, struct file *);
9604 int (*fsync) (struct file *, struct dentry *, int datasync);
9605 int (*aio_fsync) (struct kiocb *, int datasync);
9606 int (*fasync) (int, struct file *, int);
9607 int (*lock) (struct file *, int, struct file_lock *);
9608 ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *);
9609 ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *);
9610 ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *);
9611 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
9612 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
9613 int (*check_flags)(int);
9614 int (*dir_notify)(struct file *filp, unsigned long arg);
9615 int (*flock) (struct file *, int, struct file_lock *);
9616 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
9617 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
9620 struct inode_operations {
9621 int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
9622 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
9623 int (*link) (struct dentry *,struct inode *,struct dentry *);
9624 int (*unlink) (struct inode *,struct dentry *);
9625 int (*symlink) (struct inode *,struct dentry *,const char *);
9626 int (*mkdir) (struct inode *,struct dentry *,int);
9627 int (*rmdir) (struct inode *,struct dentry *);
9628 int (*mknod) (struct inode *,struct dentry *,int,dev_t);
9629 int (*rename) (struct inode *, struct dentry *,
9630 struct inode *, struct dentry *);
9631 int (*readlink) (struct dentry *, char *,int);
9632 void * (*follow_link) (struct dentry *, struct nameidata *);
9633 void (*put_link) (struct dentry *, struct nameidata *, void *);
9634 void (*truncate) (struct inode *);
9635 int (*permission) (struct inode *, int, struct nameidata *);
9636 int (*setattr) (struct dentry *, struct iattr *);
9637 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
9638 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
9639 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
9640 ssize_t (*listxattr) (struct dentry *, char *, size_t);
9641 int (*removexattr) (struct dentry *, const char *);
9642 void (*truncate_range)(struct inode *, loff_t, loff_t);
9647 extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *);
9648 extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *);
9649 extern ssize_t vfs_readv(struct file *, const struct iovec *,
9650 unsigned long, loff_t *);
9651 extern ssize_t vfs_writev(struct file *, const struct iovec *,
9652 unsigned long, loff_t *);
9658 struct super_operations {
9659 struct inode *(*alloc_inode)(struct super_block *sb);
9660 void (*destroy_inode)(struct inode *);
9662 void (*read_inode) (struct inode *);
9664 void (*dirty_inode) (struct inode *);
9665 int (*write_inode) (struct inode *, int);
9666 void (*put_inode) (struct inode *);
9667 void (*drop_inode) (struct inode *);
9668 void (*delete_inode) (struct inode *);
9669 void (*put_super) (struct super_block *);
9670 void (*write_super) (struct super_block *);
9671 int (*sync_fs)(struct super_block *sb, int wait);
9672 void (*write_super_lockfs) (struct super_block *);
9673 void (*unlockfs) (struct super_block *);
9674 int (*statfs) (struct dentry *, struct kstatfs *);
9675 int (*remount_fs) (struct super_block *, int *, char *);
9676 void (*clear_inode) (struct inode *);
9677 void (*umount_begin) (struct vfsmount *, int);
9679 int (*show_options)(struct seq_file *, struct vfsmount *);
9680 int (*show_stats)(struct seq_file *, struct vfsmount *);
9682 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
9683 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
9685 # 1165 "include/linux/fs.h"
9686 extern void __mark_inode_dirty(struct inode *, int);
9687 static inline __attribute__((always_inline)) void mark_inode_dirty(struct inode *inode)
9689 __mark_inode_dirty(inode, (1 | 2 | 4));
9692 static inline __attribute__((always_inline)) void mark_inode_dirty_sync(struct inode *inode)
9694 __mark_inode_dirty(inode, 1);
9697 static inline __attribute__((always_inline)) void inode_inc_link_count(struct inode *inode)
9700 mark_inode_dirty(inode);
9703 static inline __attribute__((always_inline)) void inode_dec_link_count(struct inode *inode)
9706 mark_inode_dirty(inode);
9709 extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
9710 static inline __attribute__((always_inline)) void file_accessed(struct file *file)
9712 if (!(file->f_flags & 01000000))
9713 touch_atime(file->f_vfsmnt, file->f_dentry);
9716 int sync_inode(struct inode *inode, struct writeback_control *wbc);
9717 # 1283 "include/linux/fs.h"
9718 struct export_operations {
9719 struct dentry *(*decode_fh)(struct super_block *sb, __u32 *fh, int fh_len, int fh_type,
9720 int (*acceptable)(void *context, struct dentry *de),
9722 int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len,
9726 int (*get_name)(struct dentry *parent, char *name,
9727 struct dentry *child);
9728 struct dentry * (*get_parent)(struct dentry *child);
9729 struct dentry * (*get_dentry)(struct super_block *sb, void *inump);
9732 struct dentry * (*find_exported_dentry)(
9733 struct super_block *sb, void *obj, void *parent,
9734 int (*acceptable)(void *context, struct dentry *de),
9740 extern struct dentry *
9741 find_exported_dentry(struct super_block *sb, void *obj, void *parent,
9742 int (*acceptable)(void *context, struct dentry *de),
9745 struct file_system_type {
9748 int (*get_sb) (struct file_system_type *, int,
9749 const char *, void *, struct vfsmount *);
9750 void (*kill_sb) (struct super_block *);
9751 struct module *owner;
9752 struct file_system_type * next;
9753 struct list_head fs_supers;
9754 struct lock_class_key s_lock_key;
9755 struct lock_class_key s_umount_key;
9758 extern int get_sb_bdev(struct file_system_type *fs_type,
9759 int flags, const char *dev_name, void *data,
9760 int (*fill_super)(struct super_block *, void *, int),
9761 struct vfsmount *mnt);
9762 extern int get_sb_single(struct file_system_type *fs_type,
9763 int flags, void *data,
9764 int (*fill_super)(struct super_block *, void *, int),
9765 struct vfsmount *mnt);
9766 extern int get_sb_nodev(struct file_system_type *fs_type,
9767 int flags, void *data,
9768 int (*fill_super)(struct super_block *, void *, int),
9769 struct vfsmount *mnt);
9770 void generic_shutdown_super(struct super_block *sb);
9771 void kill_block_super(struct super_block *sb);
9772 void kill_anon_super(struct super_block *sb);
9773 void kill_litter_super(struct super_block *sb);
9774 void deactivate_super(struct super_block *sb);
9775 int set_anon_super(struct super_block *s, void *data);
9776 struct super_block *sget(struct file_system_type *type,
9777 int (*test)(struct super_block *,void *),
9778 int (*set)(struct super_block *,void *),
9780 extern int get_sb_pseudo(struct file_system_type *, char *,
9781 struct super_operations *ops, unsigned long,
9782 struct vfsmount *mnt);
9783 extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
9784 int __put_super(struct super_block *sb);
9785 int __put_super_and_need_restart(struct super_block *sb);
9786 void unnamed_dev_init(void);
9794 extern int register_filesystem(struct file_system_type *);
9795 extern int unregister_filesystem(struct file_system_type *);
9796 extern struct vfsmount *kern_mount(struct file_system_type *);
9797 extern int may_umount_tree(struct vfsmount *);
9798 extern int may_umount(struct vfsmount *);
9799 extern void umount_tree(struct vfsmount *, int, struct list_head *);
9800 extern void release_mounts(struct list_head *);
9801 extern long do_mount(char *, char *, char *, unsigned long, void *);
9802 extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
9803 extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
9806 extern int vfs_statfs(struct dentry *, struct kstatfs *);
9809 extern struct subsystem fs_subsys;
9814 extern int locks_mandatory_locked(struct inode *);
9815 extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
9816 # 1389 "include/linux/fs.h"
9817 static inline __attribute__((always_inline)) int locks_verify_locked(struct inode *inode)
9819 if ((((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000))
9820 return locks_mandatory_locked(inode);
9824 extern int rw_verify_area(int, struct file *, loff_t *, size_t);
9826 static inline __attribute__((always_inline)) int locks_verify_truncate(struct inode *inode,
9830 if (inode->i_flock && (((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000))
9831 return locks_mandatory_area(
9833 size < inode->i_size ? size : inode->i_size,
9834 (size < inode->i_size ? inode->i_size - size
9835 : size - inode->i_size)
9840 static inline __attribute__((always_inline)) int break_lease(struct inode *inode, unsigned int mode)
9843 return __break_lease(inode, mode);
9849 extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
9851 extern long do_sys_open(int fdf, const char *filename, int flags,
9853 extern struct file *filp_open(const char *, int, int);
9854 extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
9855 extern int filp_close(struct file *, fl_owner_t id);
9856 extern char * getname(const char *);
9859 extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init_early(void);
9860 extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init(unsigned long);
9861 # 1442 "include/linux/fs.h"
9862 extern int register_blkdev(unsigned int, const char *);
9863 extern int unregister_blkdev(unsigned int, const char *);
9864 extern struct block_device *bdget(dev_t);
9865 extern void bd_set_size(struct block_device *, loff_t size);
9866 extern void bd_forget(struct inode *inode);
9867 extern void bdput(struct block_device *);
9868 extern struct block_device *open_by_devnum(dev_t, unsigned);
9869 extern struct block_device *open_partition_by_devnum(dev_t, unsigned);
9870 extern const struct file_operations def_blk_fops;
9871 extern const struct address_space_operations def_blk_aops;
9872 extern const struct file_operations def_chr_fops;
9873 extern const struct file_operations bad_sock_fops;
9874 extern const struct file_operations def_fifo_fops;
9875 extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
9876 extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
9877 extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
9878 extern int blkdev_get(struct block_device *, mode_t, unsigned);
9879 extern int blkdev_put(struct block_device *);
9880 extern int blkdev_put_partition(struct block_device *);
9881 extern int bd_claim(struct block_device *, void *);
9882 extern void bd_release(struct block_device *);
9884 extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
9885 extern void bd_release_from_disk(struct block_device *, struct gendisk *);
9893 extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
9894 extern int register_chrdev_region(dev_t, unsigned, const char *);
9895 extern int register_chrdev(unsigned int, const char *,
9896 const struct file_operations *);
9897 extern int unregister_chrdev(unsigned int, const char *);
9898 extern void unregister_chrdev_region(dev_t, unsigned);
9899 extern int chrdev_open(struct inode *, struct file *);
9900 extern void chrdev_show(struct seq_file *,off_t);
9905 extern const char *__bdevname(dev_t, char *buffer);
9906 extern const char *bdevname(struct block_device *bdev, char *buffer);
9907 extern struct block_device *lookup_bdev(const char *);
9908 extern struct block_device *open_bdev_excl(const char *, int, void *);
9909 extern void close_bdev_excl(struct block_device *);
9910 extern void blkdev_show(struct seq_file *,off_t);
9912 extern void init_special_inode(struct inode *, umode_t, dev_t);
9915 extern void make_bad_inode(struct inode *);
9916 extern int is_bad_inode(struct inode *);
9918 extern const struct file_operations read_fifo_fops;
9919 extern const struct file_operations write_fifo_fops;
9920 extern const struct file_operations rdwr_fifo_fops;
9922 extern int fs_may_remount_ro(struct super_block *);
9923 # 1514 "include/linux/fs.h"
9924 extern int check_disk_change(struct block_device *);
9925 extern int invalidate_inodes(struct super_block *);
9926 extern int __invalidate_device(struct block_device *);
9927 extern int invalidate_partition(struct gendisk *, int);
9928 unsigned long invalidate_mapping_pages(struct address_space *mapping,
9929 unsigned long start, unsigned long end);
9930 unsigned long invalidate_inode_pages(struct address_space *mapping);
9931 static inline __attribute__((always_inline)) void invalidate_remote_inode(struct inode *inode)
9933 if ((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) ||
9934 (((inode->i_mode) & 00170000) == 0120000))
9935 invalidate_inode_pages(inode->i_mapping);
9937 extern int invalidate_inode_pages2(struct address_space *mapping);
9938 extern int invalidate_inode_pages2_range(struct address_space *mapping,
9939 unsigned long start, unsigned long end);
9940 extern int write_inode_now(struct inode *, int);
9941 extern int filemap_fdatawrite(struct address_space *);
9942 extern int filemap_flush(struct address_space *);
9943 extern int filemap_fdatawait(struct address_space *);
9944 extern int filemap_write_and_wait(struct address_space *mapping);
9945 extern int filemap_write_and_wait_range(struct address_space *mapping,
9946 loff_t lstart, loff_t lend);
9947 extern int wait_on_page_writeback_range(struct address_space *mapping,
9948 unsigned long start, unsigned long end);
9949 extern int __filemap_fdatawrite_range(struct address_space *mapping,
9950 loff_t start, loff_t end, int sync_mode);
9952 extern long do_fsync(struct file *file, int datasync);
9953 extern void sync_supers(void);
9954 extern void sync_filesystems(int wait);
9955 extern void emergency_sync(void);
9956 extern void emergency_remount(void);
9957 extern int do_remount_sb(struct super_block *sb, int flags,
9958 void *data, int force);
9959 extern sector_t bmap(struct inode *, sector_t);
9960 extern int notify_change(struct dentry *, struct iattr *);
9961 extern int permission(struct inode *, int, struct nameidata *);
9962 extern int generic_permission(struct inode *, int,
9963 int (*check_acl)(struct inode *, int));
9965 extern int get_write_access(struct inode *);
9966 extern int deny_write_access(struct file *);
9967 static inline __attribute__((always_inline)) void put_write_access(struct inode * inode)
9969 (void) atomic_sub_return(1, &inode->i_writecount);
9971 static inline __attribute__((always_inline)) void allow_write_access(struct file *file)
9974 (void) atomic_add_return(1, &file->f_dentry->d_inode->i_writecount);
9976 extern int do_pipe(int *);
9978 extern int open_namei(int dfd, const char *, int, int, struct nameidata *);
9979 extern int may_open(struct nameidata *, int, int);
9981 extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
9982 extern struct file * open_exec(const char *);
9985 extern int is_subdir(struct dentry *, struct dentry *);
9986 extern ino_t find_inode_number(struct dentry *, struct qstr *);
9988 # 1 "include/linux/err.h" 1
9989 # 20 "include/linux/err.h"
9990 static inline __attribute__((always_inline)) void *ERR_PTR(long error)
9992 return (void *) error;
9995 static inline __attribute__((always_inline)) long PTR_ERR(const void *ptr)
10000 static inline __attribute__((always_inline)) long IS_ERR(const void *ptr)
10002 return __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0);
10004 # 1579 "include/linux/fs.h" 2
10007 extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
10009 extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
10011 extern void inode_init_once(struct inode *);
10012 extern void iput(struct inode *);
10013 extern struct inode * igrab(struct inode *);
10014 extern ino_t iunique(struct super_block *, ino_t);
10015 extern int inode_needs_sync(struct inode *inode);
10016 extern void generic_delete_inode(struct inode *inode);
10017 extern void generic_drop_inode(struct inode *inode);
10019 extern struct inode *ilookup5_nowait(struct super_block *sb,
10020 unsigned long hashval, int (*test)(struct inode *, void *),
10022 extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
10023 int (*test)(struct inode *, void *), void *data);
10024 extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
10026 extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
10027 extern struct inode * iget_locked(struct super_block *, unsigned long);
10028 extern void unlock_new_inode(struct inode *);
10030 static inline __attribute__((always_inline)) struct inode *iget(struct super_block *sb, unsigned long ino)
10032 struct inode *inode = iget_locked(sb, ino);
10034 if (inode && (inode->i_state & 64)) {
10035 sb->s_op->read_inode(inode);
10036 unlock_new_inode(inode);
10042 extern void __iget(struct inode * inode);
10043 extern void clear_inode(struct inode *);
10044 extern void destroy_inode(struct inode *);
10045 extern struct inode *new_inode(struct super_block *);
10046 extern int remove_suid(struct dentry *);
10047 extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
10049 extern void __insert_inode_hash(struct inode *, unsigned long hashval);
10050 extern void remove_inode_hash(struct inode *);
10051 static inline __attribute__((always_inline)) void insert_inode_hash(struct inode *inode) {
10052 __insert_inode_hash(inode, inode->i_ino);
10055 extern struct file * get_empty_filp(void);
10056 extern void file_move(struct file *f, struct list_head *list);
10057 extern void file_kill(struct file *f);
10059 extern void submit_bio(int, struct bio *);
10060 extern int bdev_read_only(struct block_device *);
10061 extern int set_blocksize(struct block_device *, int);
10062 extern int sb_set_blocksize(struct super_block *, int);
10063 extern int sb_min_blocksize(struct super_block *, int);
10065 extern int generic_file_mmap(struct file *, struct vm_area_struct *);
10066 extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
10067 extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
10068 extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
10069 extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
10070 int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
10071 extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
10072 extern ssize_t generic_file_aio_read(struct kiocb *, char *, size_t, loff_t);
10073 extern ssize_t __generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t *);
10074 extern ssize_t generic_file_aio_write(struct kiocb *, const char *, size_t, loff_t);
10075 extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *,
10076 unsigned long, loff_t *);
10077 extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
10078 unsigned long *, loff_t, loff_t *, size_t, size_t);
10079 extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
10080 unsigned long, loff_t, loff_t *, size_t, ssize_t);
10081 extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos);
10082 extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos);
10083 ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov,
10084 unsigned long nr_segs, loff_t *ppos);
10085 extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
10086 extern void do_generic_mapping_read(struct address_space *mapping,
10087 struct file_ra_state *, struct file *,
10088 loff_t *, read_descriptor_t *, read_actor_t);
10091 extern ssize_t generic_file_splice_read(struct file *, loff_t *,
10092 struct pipe_inode_info *, size_t, unsigned int);
10093 extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
10094 struct file *, loff_t *, size_t, unsigned int);
10095 extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
10096 struct file *out, loff_t *, size_t len, unsigned int flags);
10097 extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
10098 size_t len, unsigned int flags);
10101 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
10102 extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
10103 unsigned long nr_segs, loff_t *ppos);
10104 ssize_t generic_file_writev(struct file *filp, const struct iovec *iov,
10105 unsigned long nr_segs, loff_t *ppos);
10106 extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
10107 extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
10108 extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
10109 extern int generic_file_open(struct inode * inode, struct file * filp);
10110 extern int nonseekable_open(struct inode * inode, struct file * filp);
10111 # 1697 "include/linux/fs.h"
10112 static inline __attribute__((always_inline)) int xip_truncate_page(struct address_space *mapping, loff_t from)
10118 static inline __attribute__((always_inline)) void do_generic_file_read(struct file * filp, loff_t *ppos,
10119 read_descriptor_t * desc,
10120 read_actor_t actor)
10122 do_generic_mapping_read(filp->f_mapping,
10130 ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
10131 struct block_device *bdev, const struct iovec *iov, loff_t offset,
10132 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
10141 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
10142 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
10143 loff_t offset, unsigned long nr_segs, get_block_t get_block,
10144 dio_iodone_t end_io)
10146 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
10147 nr_segs, get_block, end_io, DIO_LOCKING);
10150 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
10151 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
10152 loff_t offset, unsigned long nr_segs, get_block_t get_block,
10153 dio_iodone_t end_io)
10155 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
10156 nr_segs, get_block, end_io, DIO_NO_LOCKING);
10159 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb,
10160 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
10161 loff_t offset, unsigned long nr_segs, get_block_t get_block,
10162 dio_iodone_t end_io)
10164 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
10165 nr_segs, get_block, end_io, DIO_OWN_LOCKING);
10168 extern const struct file_operations generic_ro_fops;
10172 extern int vfs_readlink(struct dentry *, char *, int, const char *);
10173 extern int vfs_follow_link(struct nameidata *, const char *);
10174 extern int page_readlink(struct dentry *, char *, int);
10175 extern void *page_follow_link_light(struct dentry *, struct nameidata *);
10176 extern void page_put_link(struct dentry *, struct nameidata *, void *);
10177 extern int __page_symlink(struct inode *inode, const char *symname, int len,
10179 extern int page_symlink(struct inode *inode, const char *symname, int len);
10180 extern struct inode_operations page_symlink_inode_operations;
10181 extern int generic_readlink(struct dentry *, char *, int);
10182 extern void generic_fillattr(struct inode *, struct kstat *);
10183 extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
10184 void inode_add_bytes(struct inode *inode, loff_t bytes);
10185 void inode_sub_bytes(struct inode *inode, loff_t bytes);
10186 loff_t inode_get_bytes(struct inode *inode);
10187 void inode_set_bytes(struct inode *inode, loff_t bytes);
10189 extern int vfs_readdir(struct file *, filldir_t, void *);
10191 extern int vfs_stat(char *, struct kstat *);
10192 extern int vfs_lstat(char *, struct kstat *);
10193 extern int vfs_stat_fd(int dfd, char *, struct kstat *);
10194 extern int vfs_lstat_fd(int dfd, char *, struct kstat *);
10195 extern int vfs_fstat(unsigned int, struct kstat *);
10197 extern int vfs_ioctl(struct file *, unsigned int, unsigned int, unsigned long);
10199 extern struct file_system_type *get_fs_type(const char *name);
10200 extern struct super_block *get_super(struct block_device *);
10201 extern struct super_block *user_get_super(dev_t);
10202 extern void drop_super(struct super_block *sb);
10204 extern int dcache_dir_open(struct inode *, struct file *);
10205 extern int dcache_dir_close(struct inode *, struct file *);
10206 extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
10207 extern int dcache_readdir(struct file *, void *, filldir_t);
10208 extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
10209 extern int simple_statfs(struct dentry *, struct kstatfs *);
10210 extern int simple_link(struct dentry *, struct inode *, struct dentry *);
10211 extern int simple_unlink(struct inode *, struct dentry *);
10212 extern int simple_rmdir(struct inode *, struct dentry *);
10213 extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
10214 extern int simple_sync_file(struct file *, struct dentry *, int);
10215 extern int simple_empty(struct dentry *);
10216 extern int simple_readpage(struct file *file, struct page *page);
10217 extern int simple_prepare_write(struct file *file, struct page *page,
10218 unsigned offset, unsigned to);
10219 extern int simple_commit_write(struct file *file, struct page *page,
10220 unsigned offset, unsigned to);
10222 extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
10223 extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
10224 extern const struct file_operations simple_dir_operations;
10225 extern struct inode_operations simple_dir_inode_operations;
10226 struct tree_descr { char *name; const struct file_operations *ops; int mode; };
10227 struct dentry *d_alloc_name(struct dentry *, const char *);
10228 extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
10229 extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
10230 extern void simple_release_fs(struct vfsmount **mount, int *count);
10232 extern ssize_t simple_read_from_buffer(void *, size_t, loff_t *, const void *, size_t);
10233 # 1826 "include/linux/fs.h"
10234 extern int inode_change_ok(struct inode *, struct iattr *);
10235 extern int __attribute__((warn_unused_result)) inode_setattr(struct inode *, struct iattr *);
10237 extern void file_update_time(struct file *file);
10239 static inline __attribute__((always_inline)) ino_t parent_ino(struct dentry *dentry)
10243 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
10244 res = dentry->d_parent->d_inode->i_ino;
10245 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
10250 extern int unshare_files(void);
10258 struct simple_transaction_argresp {
10265 char *simple_transaction_get(struct file *file, const char *buf,
10267 ssize_t simple_transaction_read(struct file *file, char *buf,
10268 size_t size, loff_t *pos);
10269 int simple_transaction_release(struct inode *inode, struct file *file);
10271 static inline __attribute__((always_inline)) void simple_transaction_set(struct file *file, size_t n)
10273 struct simple_transaction_argresp *ar = file->private_data;
10275 do { if (__builtin_expect(!!((n > ((1UL << 12) - sizeof(struct simple_transaction_argresp)))!=0), 0)) __bug("include/linux/fs.h", 1867, ((void *)0)); } while(0);
10281 __asm__ __volatile__("": : :"memory");
10284 # 1907 "include/linux/fs.h"
10285 static inline __attribute__((always_inline)) void __attribute__((format(printf, 1, 2)))
10286 __simple_attr_check_format(const char *fmt, ...)
10291 int simple_attr_open(struct inode *inode, struct file *file,
10292 u64 (*get)(void *), void (*set)(void *, u64),
10294 int simple_attr_close(struct inode *inode, struct file *file);
10295 ssize_t simple_attr_read(struct file *file, char *buf,
10296 size_t len, loff_t *ppos);
10297 ssize_t simple_attr_write(struct file *file, const char *buf,
10298 size_t len, loff_t *ppos);
10299 # 1934 "include/linux/fs.h"
10300 static inline __attribute__((always_inline)) char *alloc_secdata(void)
10305 static inline __attribute__((always_inline)) void free_secdata(void *secdata)
10307 # 28 "arch/arm/mach-iop13xx/imu/dev.c" 2
10309 # 1 "include/linux/device.h" 1
10310 # 14 "include/linux/device.h"
10311 # 1 "include/linux/ioport.h" 1
10312 # 17 "include/linux/ioport.h"
10314 resource_size_t start;
10315 resource_size_t end;
10317 unsigned long flags;
10318 struct resource *parent, *sibling, *child;
10321 struct resource_list {
10322 struct resource_list *next;
10323 struct resource *res;
10324 struct pci_dev *dev;
10326 # 94 "include/linux/ioport.h"
10327 extern struct resource ioport_resource;
10328 extern struct resource iomem_resource;
10330 extern int request_resource(struct resource *root, struct resource *new);
10331 extern struct resource * ____request_resource(struct resource *root, struct resource *new);
10332 extern int release_resource(struct resource *new);
10333 extern int insert_resource(struct resource *parent, struct resource *new);
10334 extern int allocate_resource(struct resource *root, struct resource *new,
10335 resource_size_t size, resource_size_t min,
10336 resource_size_t max, resource_size_t align,
10337 void (*alignf)(void *, struct resource *,
10338 resource_size_t, resource_size_t),
10339 void *alignf_data);
10340 int adjust_resource(struct resource *res, resource_size_t start,
10341 resource_size_t size);
10344 extern int find_next_system_ram(struct resource *res);
10351 extern struct resource * __request_region(struct resource *,
10352 resource_size_t start,
10353 resource_size_t n, const char *name);
10360 extern int __check_region(struct resource *, resource_size_t, resource_size_t);
10361 extern void __release_region(struct resource *, resource_size_t,
10364 static inline __attribute__((always_inline)) int __attribute__((deprecated)) check_region(resource_size_t s,
10367 return __check_region(&ioport_resource, s, n);
10369 # 15 "include/linux/device.h" 2
10371 # 1 "include/linux/klist.h" 1
10372 # 20 "include/linux/klist.h"
10376 struct list_head k_list;
10377 void (*get)(struct klist_node *);
10378 void (*put)(struct klist_node *);
10382 extern void klist_init(struct klist * k, void (*get)(struct klist_node *),
10383 void (*put)(struct klist_node *));
10385 struct klist_node {
10386 struct klist * n_klist;
10387 struct list_head n_node;
10389 struct completion n_removed;
10392 extern void klist_add_tail(struct klist_node * n, struct klist * k);
10393 extern void klist_add_head(struct klist_node * n, struct klist * k);
10395 extern void klist_del(struct klist_node * n);
10396 extern void klist_remove(struct klist_node * n);
10398 extern int klist_node_attached(struct klist_node * n);
10401 struct klist_iter {
10402 struct klist * i_klist;
10403 struct list_head * i_head;
10404 struct klist_node * i_cur;
10408 extern void klist_iter_init(struct klist * k, struct klist_iter * i);
10409 extern void klist_iter_init_node(struct klist * k, struct klist_iter * i,
10410 struct klist_node * n);
10411 extern void klist_iter_exit(struct klist_iter * i);
10412 extern struct klist_node * klist_next(struct klist_iter * i);
10413 # 17 "include/linux/device.h" 2
10414 # 30 "include/linux/device.h"
10416 struct device_driver;
10418 struct class_device;
10423 struct subsystem subsys;
10424 struct kset drivers;
10425 struct kset devices;
10426 struct klist klist_devices;
10427 struct klist klist_drivers;
10429 struct bus_attribute * bus_attrs;
10430 struct device_attribute * dev_attrs;
10431 struct driver_attribute * drv_attrs;
10433 int (*match)(struct device * dev, struct device_driver * drv);
10434 int (*uevent)(struct device *dev, char **envp,
10435 int num_envp, char *buffer, int buffer_size);
10436 int (*probe)(struct device * dev);
10437 int (*remove)(struct device * dev);
10438 void (*shutdown)(struct device * dev);
10439 int (*suspend)(struct device * dev, pm_message_t state);
10440 int (*resume)(struct device * dev);
10443 extern int bus_register(struct bus_type * bus);
10444 extern void bus_unregister(struct bus_type * bus);
10446 extern void bus_rescan_devices(struct bus_type * bus);
10450 int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data,
10451 int (*fn)(struct device *, void *));
10452 struct device * bus_find_device(struct bus_type *bus, struct device *start,
10453 void *data, int (*match)(struct device *, void *));
10455 int bus_for_each_drv(struct bus_type * bus, struct device_driver * start,
10456 void * data, int (*fn)(struct device_driver *, void *));
10461 struct bus_attribute {
10462 struct attribute attr;
10463 ssize_t (*show)(struct bus_type *, char * buf);
10464 ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
10470 extern int bus_create_file(struct bus_type *, struct bus_attribute *);
10471 extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
10473 struct device_driver {
10475 struct bus_type * bus;
10477 struct completion unloaded;
10478 struct kobject kobj;
10479 struct klist klist_devices;
10480 struct klist_node knode_bus;
10482 struct module * owner;
10484 int (*probe) (struct device * dev);
10485 int (*remove) (struct device * dev);
10486 void (*shutdown) (struct device * dev);
10487 int (*suspend) (struct device * dev, pm_message_t state);
10488 int (*resume) (struct device * dev);
10492 extern int driver_register(struct device_driver * drv);
10493 extern void driver_unregister(struct device_driver * drv);
10495 extern struct device_driver * get_driver(struct device_driver * drv);
10496 extern void put_driver(struct device_driver * drv);
10497 extern struct device_driver *driver_find(const char *name, struct bus_type *bus);
10502 struct driver_attribute {
10503 struct attribute attr;
10504 ssize_t (*show)(struct device_driver *, char * buf);
10505 ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
10511 extern int driver_create_file(struct device_driver *, struct driver_attribute *);
10512 extern void driver_remove_file(struct device_driver *, struct driver_attribute *);
10514 extern int driver_for_each_device(struct device_driver * drv, struct device * start,
10515 void * data, int (*fn)(struct device *, void *));
10516 struct device * driver_find_device(struct device_driver *drv,
10517 struct device *start, void *data,
10518 int (*match)(struct device *, void *));
10526 struct module * owner;
10528 struct subsystem subsys;
10529 struct list_head children;
10530 struct list_head devices;
10531 struct list_head interfaces;
10532 struct semaphore sem;
10534 struct class_attribute * class_attrs;
10535 struct class_device_attribute * class_dev_attrs;
10537 int (*uevent)(struct class_device *dev, char **envp,
10538 int num_envp, char *buffer, int buffer_size);
10540 void (*release)(struct class_device *dev);
10541 void (*class_release)(struct class *class);
10544 extern int class_register(struct class *);
10545 extern void class_unregister(struct class *);
10548 struct class_attribute {
10549 struct attribute attr;
10550 ssize_t (*show)(struct class *, char * buf);
10551 ssize_t (*store)(struct class *, const char * buf, size_t count);
10557 extern int class_create_file(struct class *, const struct class_attribute *);
10558 extern void class_remove_file(struct class *, const struct class_attribute *);
10560 struct class_device_attribute {
10561 struct attribute attr;
10562 ssize_t (*show)(struct class_device *, char * buf);
10563 ssize_t (*store)(struct class_device *, const char * buf, size_t count);
10570 extern int class_device_create_file(struct class_device *,
10571 const struct class_device_attribute *);
10572 # 213 "include/linux/device.h"
10573 struct class_device {
10574 struct list_head node;
10576 struct kobject kobj;
10577 struct class * class;
10579 struct class_device_attribute *devt_attr;
10580 struct class_device_attribute uevent_attr;
10581 struct device * dev;
10583 struct class_device *parent;
10584 struct attribute_group ** groups;
10586 void (*release)(struct class_device *dev);
10587 int (*uevent)(struct class_device *dev, char **envp,
10588 int num_envp, char *buffer, int buffer_size);
10592 static inline __attribute__((always_inline)) void *
10593 class_get_devdata (struct class_device *dev)
10595 return dev->class_data;
10598 static inline __attribute__((always_inline)) void
10599 class_set_devdata (struct class_device *dev, void *data)
10601 dev->class_data = data;
10605 extern int class_device_register(struct class_device *);
10606 extern void class_device_unregister(struct class_device *);
10607 extern void class_device_initialize(struct class_device *);
10608 extern int class_device_add(struct class_device *);
10609 extern void class_device_del(struct class_device *);
10611 extern int class_device_rename(struct class_device *, char *);
10613 extern struct class_device * class_device_get(struct class_device *);
10614 extern void class_device_put(struct class_device *);
10616 extern void class_device_remove_file(struct class_device *,
10617 const struct class_device_attribute *);
10618 extern int class_device_create_bin_file(struct class_device *,
10619 struct bin_attribute *);
10620 extern void class_device_remove_bin_file(struct class_device *,
10621 struct bin_attribute *);
10623 struct class_interface {
10624 struct list_head node;
10625 struct class *class;
10627 int (*add) (struct class_device *, struct class_interface *);
10628 void (*remove) (struct class_device *, struct class_interface *);
10631 extern int class_interface_register(struct class_interface *);
10632 extern void class_interface_unregister(struct class_interface *);
10634 extern struct class *class_create(struct module *owner, char *name);
10635 extern void class_destroy(struct class *cls);
10636 extern struct class_device *class_device_create(struct class *cls,
10637 struct class_device *parent,
10639 struct device *device,
10641 __attribute__((format(printf,5,6)));
10642 extern void class_device_destroy(struct class *cls, dev_t devt);
10646 struct device_attribute {
10647 struct attribute attr;
10648 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
10650 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
10651 const char *buf, size_t count);
10657 extern int device_create_file(struct device *device, struct device_attribute * entry);
10658 extern void device_remove_file(struct device * dev, struct device_attribute * attr);
10660 struct klist klist_children;
10661 struct klist_node knode_parent;
10662 struct klist_node knode_driver;
10663 struct klist_node knode_bus;
10664 struct device * parent;
10666 struct kobject kobj;
10668 struct device_attribute uevent_attr;
10669 struct device_attribute *devt_attr;
10671 struct semaphore sem;
10675 struct bus_type * bus;
10676 struct device_driver *driver;
10679 void *platform_data;
10681 void *firmware_data;
10683 struct dev_pm_info power;
10686 u64 coherent_dma_mask;
10692 struct list_head dma_pools;
10694 struct dma_coherent_mem *dma_mem;
10698 struct list_head node;
10699 struct class *class;
10702 void (*release)(struct device * dev);
10705 static inline __attribute__((always_inline)) void *
10706 dev_get_drvdata (struct device *dev)
10708 return dev->driver_data;
10711 static inline __attribute__((always_inline)) void
10712 dev_set_drvdata (struct device *dev, void *data)
10714 dev->driver_data = data;
10717 static inline __attribute__((always_inline)) int device_is_registered(struct device *dev)
10719 return klist_node_attached(&dev->knode_bus);
10725 extern int device_register(struct device * dev);
10726 extern void device_unregister(struct device * dev);
10727 extern void device_initialize(struct device * dev);
10728 extern int device_add(struct device * dev);
10729 extern void device_del(struct device * dev);
10730 extern int device_for_each_child(struct device *, void *,
10731 int (*fn)(struct device *, void *));
10737 extern void device_bind_driver(struct device * dev);
10738 extern void device_release_driver(struct device * dev);
10739 extern int device_attach(struct device * dev);
10740 extern void driver_attach(struct device_driver * drv);
10741 extern void device_reprobe(struct device *dev);
10746 extern struct device *device_create(struct class *cls, struct device *parent,
10747 dev_t devt, char *fmt, ...)
10748 __attribute__((format(printf,4,5)));
10749 extern void device_destroy(struct class *cls, dev_t devt);
10757 extern int (*platform_notify)(struct device * dev);
10759 extern int (*platform_notify_remove)(struct device * dev);
10766 extern struct device * get_device(struct device * dev);
10767 extern void put_device(struct device * dev);
10771 extern void device_shutdown(void);
10775 extern int firmware_register(struct subsystem *);
10776 extern void firmware_unregister(struct subsystem *);
10779 extern const char *dev_driver_string(struct device *dev);
10780 # 30 "arch/arm/mach-iop13xx/imu/dev.c" 2
10781 # 1 "include/linux/poll.h" 1
10785 # 1 "include/asm/poll.h" 1
10786 # 21 "include/asm/poll.h"
10792 # 5 "include/linux/poll.h" 2
10799 # 1 "include/linux/mm.h" 1
10800 # 19 "include/linux/mm.h"
10805 extern unsigned long max_mapnr;
10808 extern unsigned long num_physpages;
10809 extern void * high_memory;
10810 extern unsigned long vmalloc_earlyreserve;
10811 extern int page_cluster;
10814 extern int sysctl_legacy_va_layout;
10820 # 1 "include/asm/pgtable.h" 1
10821 # 13 "include/asm/pgtable.h"
10822 # 1 "include/asm-generic/4level-fixup.h" 1
10823 # 14 "include/asm/pgtable.h" 2
10824 # 1 "include/asm/proc-fns.h" 1
10825 # 161 "include/asm/proc-fns.h"
10826 # 1 "include/asm/cpu-single.h" 1
10827 # 35 "include/asm/cpu-single.h"
10831 extern void cpu_xsc3_proc_init(void);
10832 extern void cpu_xsc3_proc_fin(void);
10833 extern int cpu_xsc3_do_idle(void);
10834 extern void cpu_xsc3_dcache_clean_area(void *, int);
10835 extern void cpu_xsc3_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
10836 extern void cpu_xsc3_set_pte(pte_t *ptep, pte_t pte);
10837 extern void cpu_xsc3_reset(unsigned long addr) __attribute__((noreturn));
10838 # 162 "include/asm/proc-fns.h" 2
10839 # 15 "include/asm/pgtable.h" 2
10840 # 23 "include/asm/pgtable.h"
10841 # 1 "include/asm/arch/vmalloc.h" 1
10842 # 24 "include/asm/pgtable.h" 2
10843 # 114 "include/asm/pgtable.h"
10844 extern void __pte_error(const char *file, int line, unsigned long val);
10845 extern void __pmd_error(const char *file, int line, unsigned long val);
10846 extern void __pgd_error(const char *file, int line, unsigned long val);
10847 # 177 "include/asm/pgtable.h"
10848 extern pgprot_t pgprot_kernel;
10849 # 218 "include/asm/pgtable.h"
10850 extern struct page *empty_zero_page;
10851 # 261 "include/asm/pgtable.h"
10852 static inline __attribute__((always_inline)) pte_t pte_wrprotect(pte_t pte) { (pte) &= ~(1 << 5); return pte; };
10853 static inline __attribute__((always_inline)) pte_t pte_mkwrite(pte_t pte) { (pte) |= (1 << 5); return pte; };
10854 static inline __attribute__((always_inline)) pte_t pte_exprotect(pte_t pte) { (pte) &= ~(1 << 6); return pte; };
10855 static inline __attribute__((always_inline)) pte_t pte_mkexec(pte_t pte) { (pte) |= (1 << 6); return pte; };
10856 static inline __attribute__((always_inline)) pte_t pte_mkclean(pte_t pte) { (pte) &= ~(1 << 7); return pte; };
10857 static inline __attribute__((always_inline)) pte_t pte_mkdirty(pte_t pte) { (pte) |= (1 << 7); return pte; };
10858 static inline __attribute__((always_inline)) pte_t pte_mkold(pte_t pte) { (pte) &= ~(1 << 1); return pte; };
10859 static inline __attribute__((always_inline)) pte_t pte_mkyoung(pte_t pte) { (pte) |= (1 << 1); return pte; };
10860 # 294 "include/asm/pgtable.h"
10861 static inline __attribute__((always_inline)) pte_t *pmd_page_kernel(pmd_t pmd)
10865 ptr = (pmd) & ~(512 * sizeof(void *) - 1);
10866 ptr += 512 * sizeof(void *);
10868 return ((void *)(((unsigned long)(ptr)) - (0x00000000UL) + (0x40000000UL)));
10870 # 342 "include/asm/pgtable.h"
10871 static inline __attribute__((always_inline)) pte_t pte_modify(pte_t pte, pgprot_t newprot)
10873 const unsigned long mask = (1 << 6) | (1 << 5) | (1 << 4);
10874 (pte) = ((pte) & ~mask) | ((newprot) & mask);
10878 extern pgd_t swapper_pg_dir[2048];
10879 # 365 "include/asm/pgtable.h"
10880 # 1 "include/asm-generic/pgtable.h" 1
10881 # 131 "include/asm-generic/pgtable.h"
10883 static inline __attribute__((always_inline)) void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep)
10885 pte_t old_pte = *ptep;
10886 cpu_xsc3_set_pte(ptep,pte_wrprotect(old_pte));
10888 # 197 "include/asm-generic/pgtable.h"
10889 void pgd_clear_bad(pgd_t *);
10890 void pud_clear_bad(pgd_t *);
10891 void pmd_clear_bad(pmd_t *);
10893 static inline __attribute__((always_inline)) int pgd_none_or_clear_bad(pgd_t *pgd)
10897 if (__builtin_expect(!!((0)), 0)) {
10898 pgd_clear_bad(pgd);
10904 static inline __attribute__((always_inline)) int pud_none_or_clear_bad(pgd_t *pud)
10908 if (__builtin_expect(!!(0), 0)) {
10909 pud_clear_bad(pud);
10915 static inline __attribute__((always_inline)) int pmd_none_or_clear_bad(pmd_t *pmd)
10919 if (__builtin_expect(!!(((*pmd) & 2)), 0)) {
10920 pmd_clear_bad(pmd);
10925 # 366 "include/asm/pgtable.h" 2
10926 # 39 "include/linux/mm.h" 2
10927 # 58 "include/linux/mm.h"
10928 struct vm_area_struct {
10929 struct mm_struct * vm_mm;
10930 unsigned long vm_start;
10931 unsigned long vm_end;
10935 struct vm_area_struct *vm_next;
10937 pgprot_t vm_page_prot;
10938 unsigned long vm_flags;
10940 struct rb_node vm_rb;
10950 struct list_head list;
10952 struct vm_area_struct *head;
10955 struct raw_prio_tree_node prio_tree_node;
10964 struct list_head anon_vma_node;
10965 struct anon_vma *anon_vma;
10968 struct vm_operations_struct * vm_ops;
10971 unsigned long vm_pgoff;
10973 struct file * vm_file;
10974 void * vm_private_data;
10975 unsigned long vm_truncate_count;
10990 struct vm_list_struct {
10991 struct vm_list_struct *next;
10992 struct vm_area_struct *vma;
10994 # 188 "include/linux/mm.h"
10995 extern pgprot_t protection_map[16];
11003 struct vm_operations_struct {
11004 void (*open)(struct vm_area_struct * area);
11005 void (*close)(struct vm_area_struct * area);
11006 struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type);
11007 int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
11011 int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
11031 unsigned long flags;
11034 atomic_t _mapcount;
11040 unsigned long private;
11047 struct address_space *mapping;
11059 unsigned long index;
11060 struct list_head lru;
11061 # 270 "include/linux/mm.h"
11063 # 279 "include/linux/mm.h"
11064 # 1 "include/linux/page-flags.h" 1
11065 # 250 "include/linux/page-flags.h"
11068 int test_clear_page_dirty(struct page *page);
11069 int test_clear_page_writeback(struct page *page);
11070 int test_set_page_writeback(struct page *page);
11072 static inline __attribute__((always_inline)) void clear_page_dirty(struct page *page)
11074 test_clear_page_dirty(page);
11077 static inline __attribute__((always_inline)) void set_page_writeback(struct page *page)
11079 test_set_page_writeback(page);
11081 # 280 "include/linux/mm.h" 2
11082 # 298 "include/linux/mm.h"
11083 static inline __attribute__((always_inline)) int put_page_testzero(struct page *page)
11085 do { if (__builtin_expect(!!((((&page->_count)->counter) == 0)!=0), 0)) __bug("include/linux/mm.h", 300, ((void *)0)); } while(0);
11086 return (atomic_sub_return(1, &page->_count) == 0);
11093 static inline __attribute__((always_inline)) int get_page_unless_zero(struct page *page)
11095 return atomic_add_unless((&page->_count), 1, 0);
11098 extern void __page_cache_release(struct page *);
11100 static inline __attribute__((always_inline)) int page_count(struct page *page)
11102 if (__builtin_expect(!!(test_bit(14, &(page)->flags)), 0))
11103 page = (struct page *)((page)->private);
11104 return ((&page->_count)->counter);
11107 static inline __attribute__((always_inline)) void get_page(struct page *page)
11109 if (__builtin_expect(!!(test_bit(14, &(page)->flags)), 0))
11110 page = (struct page *)((page)->private);
11111 (void) atomic_add_return(1, &page->_count);
11118 static inline __attribute__((always_inline)) void init_page_count(struct page *page)
11120 (((&page->_count)->counter) = (1));
11123 void put_page(struct page *page);
11124 void put_pages_list(struct list_head *pages);
11126 void split_page(struct page *page, unsigned int order);
11127 # 466 "include/linux/mm.h"
11128 static inline __attribute__((always_inline)) unsigned long page_zonenum(struct page *page)
11130 return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0))) & ((1UL << 2) - 1);
11134 extern struct zone *zone_table[];
11136 static inline __attribute__((always_inline)) int page_zone_id(struct page *page)
11138 return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0))) & ((1UL << (0 + 2)) - 1);
11140 static inline __attribute__((always_inline)) struct zone *page_zone(struct page *page)
11142 return zone_table[page_zone_id(page)];
11145 static inline __attribute__((always_inline)) unsigned long page_to_nid(struct page *page)
11147 if ((0 > 0 || 0 == 0))
11148 return (page->flags >> ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))) & ((1UL << 0) - 1);
11150 return page_zone(page)->zone_pgdat->node_id;
11152 static inline __attribute__((always_inline)) unsigned long page_to_section(struct page *page)
11154 return (page->flags >> (((sizeof(unsigned long)*8) - 0) * (0 != 0))) & ((1UL << 0) - 1);
11157 static inline __attribute__((always_inline)) void set_page_zone(struct page *page, unsigned long zone)
11159 page->flags &= ~(((1UL << 2) - 1) << (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0)));
11160 page->flags |= (zone & ((1UL << 2) - 1)) << (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0));
11162 static inline __attribute__((always_inline)) void set_page_node(struct page *page, unsigned long node)
11164 page->flags &= ~(((1UL << 0) - 1) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0)));
11165 page->flags |= (node & ((1UL << 0) - 1)) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0));
11167 static inline __attribute__((always_inline)) void set_page_section(struct page *page, unsigned long section)
11169 page->flags &= ~(((1UL << 0) - 1) << (((sizeof(unsigned long)*8) - 0) * (0 != 0)));
11170 page->flags |= (section & ((1UL << 0) - 1)) << (((sizeof(unsigned long)*8) - 0) * (0 != 0));
11173 static inline __attribute__((always_inline)) void set_page_links(struct page *page, unsigned long zone,
11174 unsigned long node, unsigned long pfn)
11176 set_page_zone(page, zone);
11177 set_page_node(page, node);
11178 set_page_section(page, ((pfn) >> 0));
11184 # 1 "include/linux/vmstat.h" 1
11185 # 23 "include/linux/vmstat.h"
11186 enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
11187 PGALLOC_DMA, PGALLOC_DMA32, PGALLOC_NORMAL, PGALLOC_HIGH,
11188 PGFREE, PGACTIVATE, PGDEACTIVATE,
11189 PGFAULT, PGMAJFAULT,
11190 PGREFILL_DMA, PGREFILL_DMA32, PGREFILL_NORMAL, PGREFILL_HIGH,
11191 PGSTEAL_DMA, PGSTEAL_DMA32, PGSTEAL_NORMAL, PGSTEAL_HIGH,
11192 PGSCAN_KSWAPD_DMA, PGSCAN_KSWAPD_DMA32, PGSCAN_KSWAPD_NORMAL, PGSCAN_KSWAPD_HIGH,
11193 PGSCAN_DIRECT_DMA, PGSCAN_DIRECT_DMA32, PGSCAN_DIRECT_NORMAL, PGSCAN_DIRECT_HIGH,
11194 PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL,
11195 PAGEOUTRUN, ALLOCSTALL, PGROTATED,
11199 struct vm_event_state {
11200 unsigned long event[NR_VM_EVENT_ITEMS];
11203 extern __typeof__(struct vm_event_state) per_cpu__vm_event_states;
11205 static inline __attribute__((always_inline)) void __count_vm_event(enum vm_event_item item)
11207 per_cpu__vm_event_states.event[item]++;
11210 static inline __attribute__((always_inline)) void count_vm_event(enum vm_event_item item)
11212 (*({ do { } while (0); &per_cpu__vm_event_states; })).event[item]++;
11216 static inline __attribute__((always_inline)) void __count_vm_events(enum vm_event_item item, long delta)
11218 per_cpu__vm_event_states.event[item] += delta;
11221 static inline __attribute__((always_inline)) void count_vm_events(enum vm_event_item item, long delta)
11223 (*({ do { } while (0); &per_cpu__vm_event_states; })).event[item] += delta;
11227 extern void all_vm_events(unsigned long *);
11228 extern void vm_events_fold_cpu(int cpu);
11229 # 85 "include/linux/vmstat.h"
11230 extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
11232 static inline __attribute__((always_inline)) void zone_page_state_add(long x, struct zone *zone,
11233 enum zone_stat_item item)
11235 atomic_long_add(x, &zone->vm_stat[item]);
11236 atomic_long_add(x, &vm_stat[item]);
11239 static inline __attribute__((always_inline)) unsigned long global_page_state(enum zone_stat_item item)
11241 long x = atomic_long_read(&vm_stat[item]);
11249 static inline __attribute__((always_inline)) unsigned long zone_page_state(struct zone *zone,
11250 enum zone_stat_item item)
11252 long x = atomic_long_read(&zone->vm_stat[item]);
11259 # 156 "include/linux/vmstat.h"
11260 static inline __attribute__((always_inline)) void zap_zone_vm_stats(struct zone *zone)
11262 ({ void *__p = (zone->vm_stat); size_t __n = sizeof(zone->vm_stat); if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
11265 extern void inc_zone_state(struct zone *, enum zone_stat_item);
11266 # 183 "include/linux/vmstat.h"
11267 static inline __attribute__((always_inline)) void __mod_zone_page_state(struct zone *zone,
11268 enum zone_stat_item item, int delta)
11270 zone_page_state_add(delta, zone, item);
11273 static inline __attribute__((always_inline)) void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
11275 atomic_long_inc(&zone->vm_stat[item]);
11276 atomic_long_inc(&vm_stat[item]);
11279 static inline __attribute__((always_inline)) void __inc_zone_page_state(struct page *page,
11280 enum zone_stat_item item)
11282 __inc_zone_state(page_zone(page), item);
11285 static inline __attribute__((always_inline)) void __dec_zone_page_state(struct page *page,
11286 enum zone_stat_item item)
11288 atomic_long_dec(&page_zone(page)->vm_stat[item]);
11289 atomic_long_dec(&vm_stat[item]);
11291 # 216 "include/linux/vmstat.h"
11292 static inline __attribute__((always_inline)) void refresh_cpu_vm_stats(int cpu) { }
11293 static inline __attribute__((always_inline)) void refresh_vm_stats(void) { }
11294 # 523 "include/linux/mm.h" 2
11298 extern struct page *mem_map;
11301 static inline __attribute__((always_inline)) __attribute__((always_inline)) void *lowmem_page_address(struct page *page)
11303 return ((void *)(((unsigned long)(((unsigned long)((page) - mem_map) + ((0x00000000UL) >> 12)) << 12)) - (0x00000000UL) + (0x40000000UL)));
11305 # 570 "include/linux/mm.h"
11306 extern struct address_space swapper_space;
11307 static inline __attribute__((always_inline)) struct address_space *page_mapping(struct page *page)
11309 struct address_space *mapping = page->mapping;
11311 if (__builtin_expect(!!(test_bit(15, &(page)->flags)), 0))
11312 mapping = &swapper_space;
11313 else if (__builtin_expect(!!((unsigned long)mapping & 1), 0))
11314 mapping = ((void *)0);
11318 static inline __attribute__((always_inline)) int PageAnon(struct page *page)
11320 return ((unsigned long)page->mapping & 1) != 0;
11327 static inline __attribute__((always_inline)) unsigned long page_index(struct page *page)
11329 if (__builtin_expect(!!(test_bit(15, &(page)->flags)), 0))
11330 return ((page)->private);
11331 return page->index;
11339 static inline __attribute__((always_inline)) void reset_page_mapcount(struct page *page)
11341 (((&(page)->_mapcount)->counter) = (-1));
11344 static inline __attribute__((always_inline)) int page_mapcount(struct page *page)
11346 return ((&(page)->_mapcount)->counter) + 1;
11352 static inline __attribute__((always_inline)) int page_mapped(struct page *page)
11354 return ((&(page)->_mapcount)->counter) >= 0;
11356 # 645 "include/linux/mm.h"
11357 extern void show_free_areas(void);
11360 struct page *shmem_nopage(struct vm_area_struct *vma,
11361 unsigned long address, int *type);
11362 int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
11363 struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
11364 unsigned long addr);
11365 int shmem_lock(struct file *file, int lock, struct user_struct *user);
11366 # 675 "include/linux/mm.h"
11367 struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
11368 extern int shmem_mmap(struct file *file, struct vm_area_struct *vma);
11370 int shmem_zero_setup(struct vm_area_struct *);
11371 # 688 "include/linux/mm.h"
11372 static inline __attribute__((always_inline)) int can_do_mlock(void)
11376 if ((get_current())->signal->rlim[8].rlim_cur != 0)
11380 extern int user_shm_lock(size_t, struct user_struct *);
11381 extern void user_shm_unlock(size_t, struct user_struct *);
11386 struct zap_details {
11387 struct vm_area_struct *nonlinear_vma;
11388 struct address_space *check_mapping;
11389 unsigned long first_index;
11390 unsigned long last_index;
11391 spinlock_t *i_mmap_lock;
11392 unsigned long truncate_count;
11395 struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t);
11396 unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address,
11397 unsigned long size, struct zap_details *);
11398 unsigned long unmap_vmas(struct mmu_gather **tlb,
11399 struct vm_area_struct *start_vma, unsigned long start_addr,
11400 unsigned long end_addr, unsigned long *nr_accounted,
11401 struct zap_details *);
11402 void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
11403 unsigned long end, unsigned long floor, unsigned long ceiling);
11404 void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
11405 unsigned long floor, unsigned long ceiling);
11406 int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
11407 struct vm_area_struct *vma);
11408 int zeromap_page_range(struct vm_area_struct *vma, unsigned long from,
11409 unsigned long size, pgprot_t prot);
11410 void unmap_mapping_range(struct address_space *mapping,
11411 loff_t const holebegin, loff_t const holelen, int even_cows);
11413 static inline __attribute__((always_inline)) void unmap_shared_mapping_range(struct address_space *mapping,
11414 loff_t const holebegin, loff_t const holelen)
11416 unmap_mapping_range(mapping, holebegin, holelen, 0);
11419 extern int vmtruncate(struct inode * inode, loff_t offset);
11420 extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end);
11421 extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot);
11422 extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot);
11425 extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma,
11426 unsigned long address, int write_access);
11428 static inline __attribute__((always_inline)) int handle_mm_fault(struct mm_struct *mm,
11429 struct vm_area_struct *vma, unsigned long address,
11432 return __handle_mm_fault(mm, vma, address, write_access) &
11435 # 762 "include/linux/mm.h"
11436 extern int make_pages_present(unsigned long addr, unsigned long end);
11437 extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
11438 void install_arg_page(struct vm_area_struct *, struct page *, unsigned long);
11440 int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
11441 int len, int write, int force, struct page **pages, struct vm_area_struct **vmas);
11442 void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long);
11444 int __set_page_dirty_buffers(struct page *page);
11445 int __set_page_dirty_nobuffers(struct page *page);
11446 int redirty_page_for_writepage(struct writeback_control *wbc,
11447 struct page *page);
11448 int set_page_dirty(struct page *page);
11449 int set_page_dirty_lock(struct page *page);
11450 int clear_page_dirty_for_io(struct page *page);
11452 extern unsigned long do_mremap(unsigned long addr,
11453 unsigned long old_len, unsigned long new_len,
11454 unsigned long flags, unsigned long new_addr);
11455 # 793 "include/linux/mm.h"
11456 typedef int (*shrinker_t)(int nr_to_scan, gfp_t gfp_mask);
11465 extern struct shrinker *set_shrinker(int, shrinker_t);
11466 extern void remove_shrinker(struct shrinker *shrinker);
11468 extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl);
11470 int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address);
11471 int __pmd_alloc(struct mm_struct *mm, pgd_t *pud, unsigned long address);
11472 int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address);
11473 int __pte_alloc_kernel(pmd_t *pmd, unsigned long address);
11474 # 878 "include/linux/mm.h"
11475 extern void free_area_init(unsigned long * zones_size);
11476 extern void free_area_init_node(int nid, pg_data_t *pgdat,
11477 unsigned long * zones_size, unsigned long zone_start_pfn,
11478 unsigned long *zholes_size);
11479 extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long);
11480 extern void setup_per_zone_pages_min(void);
11481 extern void mem_init(void);
11482 extern void show_mem(void);
11483 extern void si_meminfo(struct sysinfo * val);
11484 extern void si_meminfo_node(struct sysinfo *val, int nid);
11489 static inline __attribute__((always_inline)) void setup_per_cpu_pageset(void) {}
11493 void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
11494 void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);
11495 void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *);
11496 struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma,
11497 struct prio_tree_iter *iter);
11503 static inline __attribute__((always_inline)) void vma_nonlinear_insert(struct vm_area_struct *vma,
11504 struct list_head *list)
11506 vma->shared.vm_set.parent = ((void *)0);
11507 list_add_tail(&vma->shared.vm_set.list, list);
11511 extern int __vm_enough_memory(long pages, int cap_sys_admin);
11512 extern void vma_adjust(struct vm_area_struct *vma, unsigned long start,
11513 unsigned long end, unsigned long pgoff, struct vm_area_struct *insert);
11514 extern struct vm_area_struct *vma_merge(struct mm_struct *,
11515 struct vm_area_struct *prev, unsigned long addr, unsigned long end,
11516 unsigned long vm_flags, struct anon_vma *, struct file *, unsigned long,
11517 struct mempolicy *);
11518 extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
11519 extern int split_vma(struct mm_struct *,
11520 struct vm_area_struct *, unsigned long addr, int new_below);
11521 extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
11522 extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
11523 struct rb_node **, struct rb_node *);
11524 extern void unlink_file_vma(struct vm_area_struct *);
11525 extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
11526 unsigned long addr, unsigned long len, unsigned long pgoff);
11527 extern void exit_mmap(struct mm_struct *);
11528 extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
11530 extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
11532 extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
11533 unsigned long len, unsigned long prot,
11534 unsigned long flag, unsigned long pgoff);
11536 static inline __attribute__((always_inline)) unsigned long do_mmap(struct file *file, unsigned long addr,
11537 unsigned long len, unsigned long prot,
11538 unsigned long flag, unsigned long offset)
11540 unsigned long ret = -22;
11541 if ((offset + (((len)+(1UL << 12)-1)&(~((1UL << 12)-1)))) < offset)
11543 if (!(offset & ~(~((1UL << 12)-1))))
11544 ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> 12);
11549 extern int do_munmap(struct mm_struct *, unsigned long, size_t);
11551 extern unsigned long do_brk(unsigned long, unsigned long);
11554 extern unsigned long page_unuse(struct page *);
11555 extern void truncate_inode_pages(struct address_space *, loff_t);
11556 extern void truncate_inode_pages_range(struct address_space *,
11557 loff_t lstart, loff_t lend);
11560 extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *);
11561 extern int filemap_populate(struct vm_area_struct *, unsigned long,
11562 unsigned long, pgprot_t, unsigned long, int);
11565 int write_one_page(struct page *page, int wait);
11573 int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
11574 unsigned long offset, unsigned long nr_to_read);
11575 int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
11576 unsigned long offset, unsigned long nr_to_read);
11577 unsigned long page_cache_readahead(struct address_space *mapping,
11578 struct file_ra_state *ra,
11580 unsigned long offset,
11581 unsigned long size);
11582 void handle_ra_miss(struct address_space *mapping,
11583 struct file_ra_state *ra, unsigned long offset);
11584 unsigned long max_sane_readahead(unsigned long nr);
11587 extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
11593 extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
11594 extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
11595 struct vm_area_struct **pprev);
11599 static inline __attribute__((always_inline)) struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
11601 struct vm_area_struct * vma = find_vma(mm,start_addr);
11603 if (vma && end_addr <= vma->vm_start)
11608 static inline __attribute__((always_inline)) unsigned long vma_pages(struct vm_area_struct *vma)
11610 return (vma->vm_end - vma->vm_start) >> 12;
11613 struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
11614 struct page *vmalloc_to_page(void *addr);
11615 unsigned long vmalloc_to_pfn(void *addr);
11616 int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
11617 unsigned long pfn, unsigned long size, pgprot_t);
11618 int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
11620 struct page *follow_page(struct vm_area_struct *, unsigned long address,
11621 unsigned int foll_flags);
11628 void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
11629 # 1040 "include/linux/mm.h"
11630 static inline __attribute__((always_inline)) void
11631 kernel_map_pages(struct page *page, int numpages, int enable)
11634 debug_check_no_locks_freed(lowmem_page_address(page),
11635 numpages * (1UL << 12));
11639 extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
11644 int in_gate_area_no_task(unsigned long addr);
11651 int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
11652 void *, size_t *, loff_t *);
11653 unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
11654 unsigned long lru_pages);
11655 void drop_pagecache(void);
11656 void drop_slab(void);
11661 extern int randomize_va_space;
11664 const char *arch_vma_name(struct vm_area_struct *vma);
11665 # 12 "include/linux/poll.h" 2
11666 # 1 "include/asm/uaccess.h" 1
11667 # 36 "include/asm/uaccess.h"
11668 struct exception_table_entry
11670 unsigned long insn, fixup;
11673 extern int fixup_exception(struct pt_regs *regs);
11679 extern int __get_user_bad(void);
11680 extern int __put_user_bad(void);
11681 # 61 "include/asm/uaccess.h"
11682 static inline __attribute__((always_inline)) void set_fs(mm_segment_t fs)
11684 current_thread_info()->addr_limit = fs;
11685 do { struct thread_info *thread = current_thread_info(); unsigned int domain = thread->cpu_domain; domain &= ~((3) << (2*(2))); thread->cpu_domain = domain | ((fs ? 1 : 3) << (2*(2))); do { __asm__ __volatile__( "mcr p15, 0, %0, c3, c0 @ set domain" : : "r" (thread->cpu_domain)); } while (0); } while (0);
11687 # 98 "include/asm/uaccess.h"
11688 extern int __get_user_1(void *);
11689 extern int __get_user_2(void *);
11690 extern int __get_user_4(void *);
11691 # 131 "include/asm/uaccess.h"
11692 extern int __put_user_1(void *, unsigned int);
11693 extern int __put_user_2(void *, unsigned int);
11694 extern int __put_user_4(void *, unsigned int);
11695 extern int __put_user_8(void *, unsigned long long);
11696 # 386 "include/asm/uaccess.h"
11697 extern unsigned long __copy_from_user(void *to, const void *from, unsigned long n);
11698 extern unsigned long __copy_to_user(void *to, const void *from, unsigned long n);
11699 extern unsigned long __clear_user(void *addr, unsigned long n);
11706 extern unsigned long __strncpy_from_user(char *to, const char *from, unsigned long count);
11707 extern unsigned long __strnlen_user(const char *s, long n);
11709 static inline __attribute__((always_inline)) unsigned long copy_from_user(void *to, const void *from, unsigned long n)
11711 if ((({ unsigned long flag, sum; (void)0; __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" : "=&r" (flag), "=&r" (sum) : "r" (from), "Ir" (n), "0" (current_thread_info()->addr_limit) : "cc"); flag; }) == 0))
11712 n = __copy_from_user(to, from, n);
11714 ({ void *__p = (to); size_t __n = n; if ((__n) != 0) __memzero((__p),(__n)); (__p); });
11718 static inline __attribute__((always_inline)) unsigned long copy_to_user(void *to, const void *from, unsigned long n)
11720 if ((({ unsigned long flag, sum; (void)0; __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" : "=&r" (flag), "=&r" (sum) : "r" (to), "Ir" (n), "0" (current_thread_info()->addr_limit) : "cc"); flag; }) == 0))
11721 n = __copy_to_user(to, from, n);
11728 static inline __attribute__((always_inline)) unsigned long clear_user(void *to, unsigned long n)
11730 if ((({ unsigned long flag, sum; (void)0; __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" : "=&r" (flag), "=&r" (sum) : "r" (to), "Ir" (n), "0" (current_thread_info()->addr_limit) : "cc"); flag; }) == 0))
11731 n = __clear_user(to, n);
11735 static inline __attribute__((always_inline)) long strncpy_from_user(char *dst, const char *src, long count)
11738 if ((({ unsigned long flag, sum; (void)0; __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" : "=&r" (flag), "=&r" (sum) : "r" (src), "Ir" (1), "0" (current_thread_info()->addr_limit) : "cc"); flag; }) == 0))
11739 res = __strncpy_from_user(dst, src, count);
11745 static inline __attribute__((always_inline)) long strnlen_user(const char *s, long n)
11747 unsigned long res = 0;
11749 if (({ unsigned long flag; __asm__("cmp %2, %0; movlo %0, #0" : "=&r" (flag) : "0" (current_thread_info()->addr_limit), "r" (s) : "cc"); (flag == 0); }))
11750 res = __strnlen_user(s, n);
11754 # 13 "include/linux/poll.h" 2
11755 # 23 "include/linux/poll.h"
11756 struct poll_table_struct;
11761 typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *);
11763 typedef struct poll_table_struct {
11764 poll_queue_proc qproc;
11767 static inline __attribute__((always_inline)) void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p)
11769 if (p && wait_address)
11770 p->qproc(filp, wait_address, p);
11773 static inline __attribute__((always_inline)) void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
11778 struct poll_table_entry {
11779 struct file * filp;
11781 wait_queue_head_t * wait_address;
11787 struct poll_wqueues {
11789 struct poll_table_page * table;
11792 struct poll_table_entry inline_entries[((832 - 256) / sizeof(struct poll_table_entry))];
11795 extern void poll_initwait(struct poll_wqueues *pwq);
11796 extern void poll_freewait(struct poll_wqueues *pwq);
11803 unsigned long *in, *out, *ex;
11804 unsigned long *res_in, *res_out, *res_ex;
11806 # 87 "include/linux/poll.h"
11807 static inline __attribute__((always_inline))
11808 int get_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
11810 nr = ((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long));
11812 return copy_from_user(fdset, ufdset, nr) ? -14 : 0;
11814 ({ void *__p = (fdset); size_t __n = nr; if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
11818 static inline __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result))
11819 set_fd_set(unsigned long nr, void *ufdset, unsigned long *fdset)
11822 return __copy_to_user(ufdset, fdset, ((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)));
11826 static inline __attribute__((always_inline))
11827 void zero_fd_set(unsigned long nr, unsigned long *fdset)
11829 ({ void *__p = (fdset); size_t __n = ((((nr)+(8*sizeof(long))-1)/(8*sizeof(long)))*sizeof(long)); if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
11834 extern int do_select(int n, fd_set_bits *fds, s64 *timeout);
11835 extern int do_sys_poll(struct pollfd * ufds, unsigned int nfds,
11837 # 31 "arch/arm/mach-iop13xx/imu/dev.c" 2
11838 # 1 "include/linux/cdev.h" 1
11844 struct kobject kobj;
11845 struct module *owner;
11846 const struct file_operations *ops;
11847 struct list_head list;
11849 unsigned int count;
11852 void cdev_init(struct cdev *, const struct file_operations *);
11854 struct cdev *cdev_alloc(void);
11856 void cdev_put(struct cdev *p);
11858 int cdev_add(struct cdev *, dev_t, unsigned);
11860 void cdev_del(struct cdev *);
11862 void cd_forget(struct inode *);
11863 # 32 "arch/arm/mach-iop13xx/imu/dev.c" 2
11866 # 1 "include/asm/io.h" 1
11867 # 41 "include/asm/io.h"
11868 extern void __raw_writesb(void *addr, const void *data, int bytelen);
11869 extern void __raw_writesw(void *addr, const void *data, int wordlen);
11870 extern void __raw_writesl(void *addr, const void *data, int longlen);
11872 extern void __raw_readsb(const void *addr, void *data, int bytelen);
11873 extern void __raw_readsw(const void *addr, void *data, int wordlen);
11874 extern void __raw_readsl(const void *addr, void *data, int longlen);
11875 # 64 "include/asm/io.h"
11876 extern void * __ioremap_pfn(unsigned long, unsigned long, size_t, unsigned long);
11877 extern void * __ioremap(unsigned long, size_t, unsigned long);
11878 extern void __iounmap(void *addr);
11883 extern void __readwrite_bug(const char *fn);
11888 # 1 "include/asm/arch/io.h" 1
11889 # 32 "include/asm/arch/io.h"
11890 extern void * __ioremap(unsigned long, size_t, unsigned long);
11891 extern u32 iop13xx_atue_mem_base;
11892 extern u32 iop13xx_atux_mem_base;
11893 extern size_t iop13xx_atue_mem_size;
11894 extern size_t iop13xx_atux_mem_size;
11896 static inline __attribute__((always_inline)) void *
11897 __iop13xx_ioremap(unsigned long cookie, size_t size, unsigned long flags)
11902 case 0x80000000UL ... (0x80000000UL + 0x3a000000UL - 1):
11903 if (__builtin_expect(!!(!iop13xx_atux_mem_base), 0))
11904 retval = ((void *)0);
11906 retval = (void *)(iop13xx_atux_mem_base +
11907 (cookie - 0x80000000UL));
11909 case 0xc0000000UL ... (0xc0000000UL + 0x3a000000UL - 1):
11910 if (__builtin_expect(!!(!iop13xx_atue_mem_base), 0))
11911 retval = ((void *)0);
11913 retval = (void *)(iop13xx_atue_mem_base +
11914 (cookie - 0xc0000000UL));
11916 case 0xfa000000UL ... (0xfa000000UL + 0x04000000UL - 1):
11917 retval = __ioremap(0xf0000000UL +
11918 (cookie - 0xfa000000UL),
11921 case 0xfed70000UL ... (0xfed70000UL + 0x10000UL - 1):
11922 case 0xfec60000UL ... (0xfec60000UL + 0x10000UL - 1):
11923 case 0xfee80000UL ... (0xfee80000UL + 0x80000 - 1):
11924 retval = (void *) cookie;
11927 retval = __ioremap(cookie, size, flags);
11933 static inline __attribute__((always_inline)) void
11934 __iop13xx_iounmap(void *addr)
11936 extern void __iounmap(void *addr);
11938 if (iop13xx_atue_mem_base)
11939 if (addr >= (void *) iop13xx_atue_mem_base &&
11940 addr < (void *) (iop13xx_atue_mem_base +
11941 iop13xx_atue_mem_size))
11944 if (iop13xx_atux_mem_base)
11945 if (addr >= (void *) iop13xx_atux_mem_base &&
11946 addr < (void *) (iop13xx_atux_mem_base +
11947 iop13xx_atux_mem_size))
11950 switch ((u32) addr) {
11951 case 0xfed70000UL ... (0xfed70000UL + 0x10000UL - 1):
11952 case 0xfec60000UL ... (0xfec60000UL + 0x10000UL - 1):
11953 case 0xfee80000UL ... (0xfee80000UL + 0x80000 - 1):
11961 # 77 "include/asm/io.h" 2
11962 # 149 "include/asm/io.h"
11963 extern void _memcpy_fromio(void *, const volatile void *, size_t);
11964 extern void _memcpy_toio(volatile void *, const void *, size_t);
11965 extern void _memset_io(volatile void *, int, size_t);
11966 # 196 "include/asm/io.h"
11967 static inline __attribute__((always_inline)) int
11968 check_signature(void *io_addr, const unsigned char *signature,
11973 if (({ __u8 __v = ((void)0, *(volatile unsigned char *)(((unsigned long)(io_addr)))); __v; }) != *signature)
11983 # 267 "include/asm/io.h"
11984 extern void *ioport_map(unsigned long port, unsigned int nr);
11985 extern void ioport_unmap(void *addr);
11990 extern void *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen);
11991 extern void pci_iounmap(struct pci_dev *dev, void *addr);
11992 # 298 "include/asm/io.h"
11993 extern void register_isa_ports(unsigned int mmio, unsigned int io,
11994 unsigned int io_shift);
11995 # 35 "arch/arm/mach-iop13xx/imu/dev.c" 2
11996 # 1 "include/asm/arch/iop13xx-imu.h" 1
11997 # 32 "include/asm/arch/iop13xx-imu.h"
11998 typedef int imu_handler(int);
12000 void iop_mutex_lock(int mutex);
12001 int iop_mutex_trylock(int mutex);
12002 void iop_mutex_unlock(int mutex);
12004 int iop_queue_init(int queueid, void *phys_base, void *vert_base,
12005 int msg_size, int num_items,
12006 void (*rcd_callback) (int), void (*error_callback) (int));
12007 void *iop_queue_allocate(int queueid);
12008 int iop_queue_postmsg(int queueid, void *msg_adr);
12010 int iop_doorbell_reg_callback(int doorbell, void (*callback) (int));
12011 void iop_doorbell_clear_status(int doorbell);
12012 int iop_doorbell_check_status(int doorbell);
12013 void iop_doorbell_enable(int doorbell);
12014 void iop_doorbell_disable(int doorbell);
12015 void iop_doorbell_mask(int doorbell);
12016 void iop_doorbell_unmask(int doorbell);
12017 void iop_doorbell_ring(int doorbell);
12018 inline __attribute__((always_inline)) void iop_wait_on_doorbell(int doorbell);
12020 void *iop_queue_getmsg(int queueid);
12021 int iop_queue_rxfree(int queueid, void *msg_adr);
12022 int iop_queue_rx_not_empty(int queueid);
12023 int iop_queue_tx_not_full(int queueid);
12024 # 177 "include/asm/arch/iop13xx-imu.h"
12028 unsigned int sqlbar;
12029 unsigned int squbar;
12032 unsigned int rqlbar;
12033 unsigned int rqubar;
12036 struct imu_queue_params {
12043 # 36 "arch/arm/mach-iop13xx/imu/dev.c" 2
12044 # 52 "arch/arm/mach-iop13xx/imu/dev.c"
12047 wait_queue_head_t rq;
12048 wait_queue_head_t wq;
12049 size_t rq_leftover;
12050 char *rq_leftover_ptr;
12051 atomic_t read_available;
12052 atomic_t write_available;
12055 static struct imu_dev imu[4];
12056 static int imu_major = 0;
12058 void queue_rq_callback(int queueid)
12060 struct imu_dev *imui = &imu[queueid];
12063 __wake_up(&imui->rq, 1, 1, ((void *)0));
12064 iop_doorbell_disable(17 + (queueid * 2));
12067 void queue_wq_callback(int queueid)
12069 struct imu_dev *imui = &imu[queueid];
12072 __wake_up(&imui->wq, 1, 1, ((void *)0));
12073 iop_doorbell_disable(16 + (queueid * 2));
12076 extern struct imu_queue_params imu_queue[];
12084 void init_callback(int queueid)
12086 int i, qi_rxitems, err = 0;
12087 struct imu_queue_params *qi;
12088 struct imu_queue_params *queue = &imu_queue[queueid];
12089 struct imu_queue *qi_hw;
12090 struct imu_queue *queue_hw = (struct imu_queue *)
12091 ((0xfee80000UL +0xa20) + (queueid * sizeof(struct imu_queue)));
12093 int phy_rxbase = queue_hw->rqlbar;
12094 int rq_items = queue_hw->rqcr & 0xffff;
12098 for (i = 0; i < 4; i++) {
12099 qi = &imu_queue[i];
12100 qi_hw = (struct imu_queue *)
12101 ((0xfee80000UL +0xa20) + (i * sizeof(struct imu_queue)));
12102 qi_rxitems = qi_hw->rqcr & 0xffff;
12104 if (i != queueid &&
12105 qi->rxbase && qi->msg_size &&
12106 ((((int)qi->rxbase<=phy_rxbase) && ((int)qi->rxbase + (qi_rxitems * qi->msg_size)>phy_rxbase))||(((int)qi->rxbase<phy_rxbase + (rq_items * qi->msg_size)) && ((int)qi->rxbase + (qi_rxitems * qi->msg_size)>=phy_rxbase + (rq_items * qi->msg_size)))||(((int)qi->rxbase>=phy_rxbase) && ((int)qi->rxbase + (qi_rxitems * qi->msg_size)<=phy_rxbase + (rq_items * qi->msg_size))))) {
12114 if (qi->txbase && qi->msg_size &&
12115 ((((int)qi->txbase<=phy_rxbase) && ((int)qi->txbase + (qi->items * qi->msg_size)>phy_rxbase))||(((int)qi->txbase<phy_rxbase + (rq_items * qi->msg_size)) && ((int)qi->txbase + (qi->items * qi->msg_size)>=phy_rxbase + (rq_items * qi->msg_size)))||(((int)qi->txbase>=phy_rxbase) && ((int)qi->txbase + (qi->items * qi->msg_size)<=phy_rxbase + (rq_items * qi->msg_size))))) {
12125 "overlap found in IMU rx queue request 0x%x\n",
12129 queue->rxbase = __iop13xx_ioremap((phy_rxbase), (rq_items * 64), 0);
12132 iop_doorbell_reg_callback(14 - 1 +
12134 (queueid * 2), queue_rq_callback);
12137 ("init_callback registerd q=%d rxbase=0x%x rxphy=0x%x size=0x%x\n",
12138 queueid, (int)queue->rxbase, phy_rxbase, rq_items * 64);
12139 queue_rq_callback(queueid);
12142 void error_callback(int queueid)
12146 static int imu_open(struct inode *inode, struct file *file)
12148 struct imu_dev *imui;
12149 int queueid = iminor(file->f_dentry->d_inode);
12151 imui = &imu[queueid];
12153 switch (file->f_flags & 00000003) {
12155 if (!(atomic_sub_return(1, &imui->read_available) == 0)) {
12156 (void) atomic_add_return(1, &imui->read_available);
12159 if (!(atomic_sub_return(1, &imui->write_available) == 0)) {
12160 (void) atomic_add_return(1, &imui->write_available);
12161 (void) atomic_add_return(1, &imui->read_available);
12166 if (!(atomic_sub_return(1, &imui->write_available) == 0)) {
12167 (void) atomic_add_return(1, &imui->write_available);
12172 if (!(atomic_sub_return(1, &imui->read_available) == 0)) {
12173 (void) atomic_add_return(1, &imui->read_available);
12182 static int imu_release(struct inode *inode, struct file *file)
12184 struct imu_dev *imui;
12185 int queueid = iminor(file->f_dentry->d_inode);
12187 imui = &imu[queueid];
12189 switch (file->f_flags & 00000003) {
12191 (void) atomic_add_return(1, &imui->read_available);
12193 (void) atomic_add_return(1, &imui->write_available);
12196 (void) atomic_add_return(1, &imui->read_available);
12203 imu_read(struct file *file, char * buf, size_t count, loff_t * f_pos)
12205 struct imu_dev *imui;
12207 int queueid = iminor(file->f_dentry->d_inode);
12209 imui = &imu[queueid];
12214 if (imui->rq_leftover) {
12216 count = ({ typeof(count) _x = (count); typeof(imui->rq_leftover) _y = (imui->rq_leftover); (void) (&_x == &_y); _x < _y ? _x : _y; });
12217 if (copy_to_user(buf, imui->rq_leftover_ptr, count))
12219 imui->rq_leftover -= count;
12221 if (imui->rq_leftover == 0)
12222 iop_queue_rxfree(queueid,
12223 imui->rq_leftover_ptr);
12224 imui->rq_leftover_ptr += count;
12228 while (!iop_queue_rx_not_empty(queueid)) {
12229 wait_queue_t wait = { .private = (get_current()), .func = default_wake_function, .task_list = { ((void *)0), ((void *)0) } };
12231 if (file->f_flags & 00004000)
12236 add_wait_queue(&imui->rq, &wait);
12237 do { (get_current())->state = (1); __asm__ __volatile__ ("" : : : "memory"); } while (0);
12238 iop_doorbell_enable(17 + (queueid * 2));
12239 schedule_timeout(1000);
12241 remove_wait_queue(&imui->rq, &wait);
12242 if (signal_pending((get_current()))) {
12248 dat = iop_queue_getmsg(queueid);
12251 if (((void *)0) == dat)
12255 imui->rq_leftover = *((int *)dat);
12259 if (imui->rq_leftover > 64)
12260 imui->rq_leftover = 0;
12262 imui->rq_leftover_ptr = dat + 4;
12265 if (!imui->rq_leftover)
12266 iop_queue_rxfree(queueid, imui->rq_leftover_ptr);
12271 imu_write(struct file *file, const char * buf, size_t count,
12275 struct imu_dev *imui;
12276 int queueid = iminor(file->f_dentry->d_inode);
12278 imui = &imu[queueid];
12280 count = ({ typeof(count) _x = (count); typeof((size_t) (64 - 4)) _y = ((size_t) (64 - 4)); (void) (&_x == &_y); _x < _y ? _x : _y; });
12282 while (((void *)0) == (msg = iop_queue_allocate(queueid))) {
12283 wait_queue_t wait = { .private = (get_current()), .func = default_wake_function, .task_list = { ((void *)0), ((void *)0) } };
12285 if (file->f_flags & 00004000)
12290 add_wait_queue(&imui->wq, &wait);
12291 do { (get_current())->state = (1); __asm__ __volatile__ ("" : : : "memory"); } while (0);
12292 iop_doorbell_enable(16 + (queueid * 2));
12293 schedule_timeout(1000);
12295 remove_wait_queue(&imui->wq, &wait);
12296 if (signal_pending((get_current()))) {
12302 if (copy_from_user(msg + 4, buf, count))
12305 *((int *)msg) = count;
12308 iop_queue_postmsg(queueid, msg);
12315 static unsigned int imu_poll(struct file *file, poll_table * wait)
12317 struct imu_dev *imui;
12318 unsigned int mask = 0;
12319 int queueid = iminor(file->f_dentry->d_inode);
12321 imui = &imu[queueid];
12322 poll_wait(file, &imui->rq, wait);
12323 poll_wait(file, &imui->wq, wait);
12325 if (iop_queue_rx_not_empty(queueid))
12326 mask |= 0x0001 | 0x0040;
12327 if (iop_queue_tx_not_full(queueid))
12328 mask |= 0x0004 | 0x0100;
12333 static struct file_operations imu_fops = {
12334 .owner = ((struct module *)0),
12336 .write = imu_write,
12339 .release = imu_release,
12342 static int __attribute__ ((__section__ (".init.text"))) imu_dev_init(void)
12350 dev = (((imu_major) << 20) | (0));
12351 err = register_chrdev_region(dev, 4, "imu");
12353 err = alloc_chrdev_region(&dev, 1,
12355 imu_major = ((unsigned int) ((dev) >> 20));
12358 printk("<4>" "imu: can't get major %d\n", imu_major);
12363 for (i = 1; i < 4; i++) {
12364 cdev_init(&imu[i].cdev, &imu_fops);
12365 if (cdev_add(&imu[i].cdev, (((imu_major) << 20) | (i)), 1)) {
12366 printk("<4>" "Error cdev_add imu%i\n", i);
12370 imu[i].rq_leftover = 0;
12371 (((&imu[i].read_available)->counter) = (1));
12372 (((&imu[i].write_available)->counter) = (1));
12373 init_waitqueue_head(&imu[i].rq);
12374 init_waitqueue_head(&imu[i].wq);
12375 imu_queue[i].rxbase = 0;
12377 queue_base = __iop13xx_ioremap(((128*1024*1024) + (i * (16*64))), ((16*64)), 0);
12382 err = iop_queue_init(i,
12383 (void *)(128*1024*1024) + (i * (16*64)),
12387 init_callback, error_callback);
12389 printk("<4>" "could not init imu queue %d\n", i);
12392 iop_doorbell_reg_callback(14 - 1 +
12395 queue_wq_callback);
12397 "IMU Queue %d initialized major=%d minor=%d base=0x%x\n",
12398 i, imu_major, i, (int)queue_base);
12405 static void __attribute__((__used__)) __attribute__ ((__section__(".exit.text"))) imu_dev_cleanup(void)
12409 for (i = 1; i < 4; i++) {
12410 cdev_del(&imu[i].cdev);
12411 iop_doorbell_disable(17 + (i * 2));
12412 iop_doorbell_disable(16 + (i * 2));
12413 __iop13xx_iounmap(imu_queue[i].txbase);
12414 if (imu_queue[i].rxbase) {
12415 __iop13xx_iounmap(imu_queue[i].rxbase);
12416 imu_queue[i].rxbase = 0;
12421 unregister_chrdev_region((((imu_major) << 20) | (0)), 4);
12423 printk("<6>" "%s driver ver %s removed\n",
12427 static initcall_t __initcall_imu_dev_init __attribute__((__used__)) __attribute__((__section__(".initcall" "6" ".init"))) = imu_dev_init;;
12428 static exitcall_t __exitcall_imu_dev_cleanup __attribute__((__used__)) __attribute__ ((__section__ (".exitcall.exit"))) = imu_dev_cleanup;;