initial import
[ICEs.git] / 153708 / foo / ice.i
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"
3 # 1 "<built-in>"
4 # 1 "<command line>"
5 # 1 "./include/linux/autoconf.h" 1
6 # 1 "<command line>" 2
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
12
13
14
15 # 1 "include/linux/auxvec.h" 1
16
17
18
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"
23 struct sched_param {
24 int sched_priority;
25 };
26
27 # 1 "include/asm/param.h" 1
28 # 43 "include/linux/sched.h" 2
29
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
35
36
37
38 # 1 "include/linux/stddef.h" 1
39
40
41
42 # 1 "include/linux/compiler.h" 1
43 # 42 "include/linux/compiler.h"
44 # 1 "include/linux/compiler-gcc4.h" 1
45
46
47
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"
54 typedef struct {
55 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
56 } __kernel_fd_set;
57
58
59 typedef void (*__kernel_sighandler_t)(int);
60
61
62 typedef int __kernel_key_t;
63 typedef int __kernel_mqd_t;
64
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;
89
90 typedef unsigned short __kernel_old_uid_t;
91 typedef unsigned short __kernel_old_gid_t;
92 typedef unsigned short __kernel_old_dev_t;
93
94
95 typedef long long __kernel_loff_t;
96
97
98 typedef struct {
99
100 int val[2];
101
102
103
104 } __kernel_fsid_t;
105 # 48 "include/linux/posix_types.h" 2
106 # 15 "include/linux/types.h" 2
107 # 1 "include/asm/types.h" 1
108
109
110
111
112
113 typedef unsigned short umode_t;
114
115
116
117
118
119
120 typedef __signed__ char __s8;
121 typedef unsigned char __u8;
122
123 typedef __signed__ short __s16;
124 typedef unsigned short __u16;
125
126 typedef __signed__ int __s32;
127 typedef unsigned int __u32;
128
129
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;
135
136 typedef signed short s16;
137 typedef unsigned short u16;
138
139 typedef signed int s32;
140 typedef unsigned int u32;
141
142 typedef signed long long s64;
143 typedef unsigned long long u64;
144
145
146
147 typedef u32 dma_addr_t;
148 typedef u32 dma64_addr_t;
149 # 16 "include/linux/types.h" 2
150
151
152
153 typedef __u32 __kernel_dev_t;
154
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;
168
169
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;
174
175
176
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;
183
184
185
186
187 typedef __kernel_ssize_t ssize_t;
188
189
190
191
192 typedef __kernel_ptrdiff_t ptrdiff_t;
193
194
195
196
197 typedef __kernel_time_t time_t;
198
199
200
201
202 typedef __kernel_clock_t clock_t;
203
204
205
206
207 typedef __kernel_caddr_t caddr_t;
208
209
210
211 typedef unsigned char u_char;
212 typedef unsigned short u_short;
213 typedef unsigned int u_int;
214 typedef unsigned long u_long;
215
216
217 typedef unsigned char unchar;
218 typedef unsigned short ushort;
219 typedef unsigned int uint;
220 typedef unsigned long ulong;
221
222
223
224
225 typedef __u8 u_int8_t;
226 typedef __s8 int8_t;
227 typedef __u16 u_int16_t;
228 typedef __s16 int16_t;
229 typedef __u32 u_int32_t;
230 typedef __s32 int32_t;
231
232
233
234 typedef __u8 uint8_t;
235 typedef __u16 uint16_t;
236 typedef __u32 uint32_t;
237
238
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;
244
245
246
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;
253
254 typedef __u64 __le64;
255 typedef __u64 __be64;
256
257
258
259 typedef unsigned gfp_t;
260
261
262
263
264 typedef u32 resource_size_t;
265
266
267
268
269 struct ustat {
270 __kernel_daddr_t f_tfree;
271 __kernel_ino_t f_tinode;
272 char f_fname[6];
273 char f_fpack[6];
274 };
275 # 17 "include/linux/capability.h" 2
276 # 32 "include/linux/capability.h"
277 typedef struct __user_cap_header_struct {
278 __u32 version;
279 int pid;
280 } *cap_user_header_t;
281
282 typedef struct __user_cap_data_struct {
283 __u32 effective;
284 __u32 permitted;
285 __u32 inheritable;
286 } *cap_user_data_t;
287
288
289
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;
299 };
300
301 extern long do_no_restart_syscall(struct restart_block *parm);
302
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
310
311
312
313 # 1 "include/asm/linkage.h" 1
314 # 5 "include/linux/linkage.h" 2
315 # 72 "include/asm/system.h" 2
316
317 struct thread_info;
318 struct task_struct;
319
320
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;
325
326 struct pt_regs;
327
328 void die(const char *msg, struct pt_regs *regs, int err)
329 __attribute__((noreturn));
330
331 struct siginfo;
332 void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info,
333 unsigned long err, unsigned long trap);
334
335 void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
336 struct pt_regs *),
337 int sig, const char *name);
338
339
340
341
342
343
344 extern void __backtrace(void);
345 extern void c_backtrace(unsigned long fp, int pmode);
346
347 struct mm_struct;
348 extern void show_pte(struct mm_struct *mm, unsigned long addr);
349 extern void __show_regs(struct pt_regs *);
350
351 extern int cpu_architecture(void);
352 extern void cpu_init(void);
353
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)
358 {
359 extern unsigned int processor_id;
360
361 if ((processor_id & 0xffffe000) == 0x69056000)
362 return 1;
363
364 return 0;
365 }
366 # 152 "include/asm/system.h"
367 extern unsigned long cr_no_alignment;
368 extern unsigned long cr_alignment;
369
370
371
372
373
374
375
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)
381 {
382 }
383 # 370 "include/asm/system.h"
384 static inline __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
385 {
386 extern void __bad_xchg(volatile void *, int);
387 unsigned long ret;
388
389
390
391
392
393
394
395 switch (size) {
396 # 421 "include/asm/system.h"
397 case 1:
398 asm volatile("@ __xchg1\n"
399 " swpb %0, %1, [%2]"
400 : "=&r" (ret)
401 : "r" (x), "r" (ptr)
402 : "memory", "cc");
403 break;
404 case 4:
405 asm volatile("@ __xchg4\n"
406 " swp %0, %1, [%2]"
407 : "=&r" (ret)
408 : "r" (x), "r" (ptr)
409 : "memory", "cc");
410 break;
411
412 default:
413 __bad_xchg(ptr, size), ret = 0;
414 break;
415 }
416
417 return ret;
418 }
419
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)
425 {
426 unsigned long flags;
427 unsigned long mask = 1UL << (bit & 31);
428
429 p += bit >> 5;
430
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"); });
432 *p |= mask;
433 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
434 }
435
436 static inline __attribute__((always_inline)) void ____atomic_clear_bit(unsigned int bit, volatile unsigned long *p)
437 {
438 unsigned long flags;
439 unsigned long mask = 1UL << (bit & 31);
440
441 p += bit >> 5;
442
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"); });
444 *p &= ~mask;
445 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
446 }
447
448 static inline __attribute__((always_inline)) void ____atomic_change_bit(unsigned int bit, volatile unsigned long *p)
449 {
450 unsigned long flags;
451 unsigned long mask = 1UL << (bit & 31);
452
453 p += bit >> 5;
454
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"); });
456 *p ^= mask;
457 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
458 }
459
460 static inline __attribute__((always_inline)) int
461 ____atomic_test_and_set_bit(unsigned int bit, volatile unsigned long *p)
462 {
463 unsigned long flags;
464 unsigned int res;
465 unsigned long mask = 1UL << (bit & 31);
466
467 p += bit >> 5;
468
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"); });
470 res = *p;
471 *p = res | mask;
472 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
473
474 return res & mask;
475 }
476
477 static inline __attribute__((always_inline)) int
478 ____atomic_test_and_clear_bit(unsigned int bit, volatile unsigned long *p)
479 {
480 unsigned long flags;
481 unsigned int res;
482 unsigned long mask = 1UL << (bit & 31);
483
484 p += bit >> 5;
485
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"); });
487 res = *p;
488 *p = res & ~mask;
489 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
490
491 return res & mask;
492 }
493
494 static inline __attribute__((always_inline)) int
495 ____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p)
496 {
497 unsigned long flags;
498 unsigned int res;
499 unsigned long mask = 1UL << (bit & 31);
500
501 p += bit >> 5;
502
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"); });
504 res = *p;
505 *p = res ^ mask;
506 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
507
508 return res & mask;
509 }
510
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)
514 {
515 unsigned long mask = (1UL << ((nr) % 32));
516 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
517
518 *p |= mask;
519 }
520
521 static inline __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *addr)
522 {
523 unsigned long mask = (1UL << ((nr) % 32));
524 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
525
526 *p &= ~mask;
527 }
528 # 43 "include/asm-generic/bitops/non-atomic.h"
529 static inline __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *addr)
530 {
531 unsigned long mask = (1UL << ((nr) % 32));
532 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
533
534 *p ^= mask;
535 }
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)
538 {
539 unsigned long mask = (1UL << ((nr) % 32));
540 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
541 unsigned long old = *p;
542
543 *p = old | mask;
544 return (old & mask) != 0;
545 }
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)
548 {
549 unsigned long mask = (1UL << ((nr) % 32));
550 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
551 unsigned long old = *p;
552
553 *p = old & ~mask;
554 return (old & mask) != 0;
555 }
556
557
558 static inline __attribute__((always_inline)) int __test_and_change_bit(int nr,
559 volatile unsigned long *addr)
560 {
561 unsigned long mask = (1UL << ((nr) % 32));
562 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
563 unsigned long old = *p;
564
565 *p = old ^ mask;
566 return (old & mask) != 0;
567 }
568
569
570
571
572
573
574 static inline __attribute__((always_inline)) int test_bit(int nr, const volatile unsigned long *addr)
575 {
576 return 1UL & (addr[((nr) / 32)] >> (nr & (32 -1)));
577 }
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);
590
591
592
593
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)
606 {
607 int r = 32;
608
609 if (!x)
610 return 0;
611 if (!(x & 0xffff0000u)) {
612 x <<= 16;
613 r -= 16;
614 }
615 if (!(x & 0xff000000u)) {
616 x <<= 8;
617 r -= 8;
618 }
619 if (!(x & 0xf0000000u)) {
620 x <<= 4;
621 r -= 4;
622 }
623 if (!(x & 0xc0000000u)) {
624 x <<= 2;
625 r -= 2;
626 }
627 if (!(x & 0x80000000u)) {
628 x <<= 1;
629 r -= 1;
630 }
631 return r;
632 }
633 # 285 "include/asm/bitops.h"
634 # 1 "include/asm-generic/bitops/fls64.h" 1
635
636
637
638
639
640 static inline __attribute__((always_inline)) int fls64(__u64 x)
641 {
642 __u32 h = x >> 32;
643 if (h)
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; }) );
646 }
647 # 286 "include/asm/bitops.h" 2
648
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)
652 {
653
654
655
656
657
658
659
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;
666 if (b[3])
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;
669
670
671
672 }
673 # 288 "include/asm/bitops.h" 2
674 # 1 "include/asm-generic/bitops/hweight.h" 1
675
676
677
678
679
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
686
687 static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count)
688 {
689 int order;
690
691 order = ( __builtin_constant_p(count) ? constant_fls(count) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(count) : "cc"); 32-__r; }) );
692 return order;
693 }
694
695 static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count)
696 {
697 int order;
698
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))
701 order++;
702 return order;
703 }
704
705 static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
706 {
707 return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
708 }
709
710
711
712
713
714
715
716 static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift)
717 {
718 return (word << shift) | (word >> (32 - shift));
719 }
720
721
722
723
724
725
726
727 static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift)
728 {
729 return (word >> shift) | (word << (32 - shift));
730 }
731
732 static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l)
733 {
734 if (sizeof(l) == 4)
735 return ( __builtin_constant_p(l) ? constant_fls(l) : ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(l) : "cc"); 32-__r; }) );
736 return fls64(l);
737 }
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 {
744 __u64 fpregs[16];
745
746 __u32 fpmx_state;
747
748 __u32 fpexc;
749 __u32 fpscr;
750
751
752
753 __u32 fpinst;
754 __u32 fpinst2;
755 };
756
757 union vfp_state {
758 struct vfp_hard_struct hard;
759 };
760
761 extern void vfp_flush_thread(union vfp_state *);
762 extern void vfp_release_thread(union vfp_state *);
763
764
765
766 struct fp_hard_struct {
767 unsigned int save[35];
768 };
769
770
771
772 struct fp_soft_struct {
773 unsigned int save[35];
774 };
775
776
777
778 struct iwmmxt_struct {
779 unsigned int save[0x98 / sizeof(unsigned int)];
780 };
781
782 union fp_state {
783 struct fp_hard_struct hard;
784 struct fp_soft_struct soft;
785
786
787
788 };
789
790
791
792 struct crunch_state {
793 unsigned int mvdx[16][2];
794 unsigned int mvax[4][3];
795 unsigned int dspsc[2];
796 };
797 # 17 "include/asm/thread_info.h" 2
798
799
800
801
802
803
804
805 struct task_struct;
806 struct exec_domain;
807
808 # 1 "include/asm/ptrace.h" 1
809 # 75 "include/asm/ptrace.h"
810 struct pt_regs {
811 long uregs[18];
812 };
813 # 125 "include/asm/ptrace.h"
814 static inline __attribute__((always_inline)) int valid_user_regs(struct pt_regs *regs)
815 {
816 if ((((regs)->uregs[16] & 0xf) == 0) &&
817 (regs->uregs[16] & (0x00000040|0x00000080)) == 0)
818 return 1;
819
820
821
822
823 regs->uregs[16] &= 0xff000000 | 0x00ff0000 | 0x0000ff00 | 0x00000020 | 0x00000010;
824
825 return 0;
826 }
827 # 28 "include/asm/thread_info.h" 2
828
829 # 1 "include/asm/domain.h" 1
830 # 30 "include/asm/thread_info.h" 2
831
832 typedef unsigned long mm_segment_t;
833
834 struct cpu_context_save {
835 __u32 r4;
836 __u32 r5;
837 __u32 r6;
838 __u32 r7;
839 __u32 r8;
840 __u32 r9;
841 __u32 sl;
842 __u32 fp;
843 __u32 sp;
844 __u32 pc;
845 __u32 extra[2];
846 };
847
848
849
850
851
852 struct thread_info {
853 unsigned long flags;
854 int preempt_count;
855 mm_segment_t addr_limit;
856 struct task_struct *task;
857 struct exec_domain *exec_domain;
858 __u32 cpu;
859 __u32 cpu_domain;
860 struct cpu_context_save cpu_context;
861 __u8 used_cp[16];
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;
867 };
868 # 89 "include/asm/thread_info.h"
869 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void) __attribute__((__const__));
870
871 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
872 {
873 register unsigned long sp asm ("sp");
874 return (struct thread_info *)(sp & ~(8192 - 1));
875 }
876
877 extern struct thread_info *alloc_thread_info(struct task_struct *task);
878 extern void free_thread_info(struct thread_info *);
879
880
881
882
883
884
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 *);
889
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)
898 {
899 (__builtin_constant_p(flag) ? ____atomic_set_bit(flag, &ti->flags) : _set_bit_le(flag,&ti->flags));
900 }
901
902 static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag)
903 {
904 (__builtin_constant_p(flag) ? ____atomic_clear_bit(flag, &ti->flags) : _clear_bit_le(flag,&ti->flags));
905 }
906
907 static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
908 {
909 return (__builtin_constant_p(flag) ? ____atomic_test_and_set_bit(flag, &ti->flags) : _test_and_set_bit_le(flag,&ti->flags));
910 }
911
912 static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
913 {
914 return (__builtin_constant_p(flag) ? ____atomic_test_and_clear_bit(flag, &ti->flags) : _test_and_clear_bit_le(flag,&ti->flags));
915 }
916
917 static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag)
918 {
919 return test_bit(flag,&ti->flags);
920 }
921 # 10 "include/linux/preempt.h" 2
922 # 50 "include/linux/spinlock.h" 2
923
924
925
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
934
935
936
937
938
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)
942 {
943 __u32 t;
944
945
946 if (!__builtin_constant_p(x)) {
947
948
949
950
951
952 asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
953 } else
954
955 t = x ^ ((x << 16) | (x >> 16));
956
957 x = (x << 24) | (x >> 8);
958 t &= ~0x00FF0000;
959 x ^= (t >> 8);
960
961 return x;
962 }
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)
969 {
970 return ({ __u16 __tmp = (x) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); });
971 }
972 static __inline__ __attribute__((always_inline)) __u16 __swab16p(const __u16 *x)
973 {
974 return ({ __u16 __tmp = (*(x)) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); });
975 }
976 static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr)
977 {
978 do { *(addr) = ({ __u16 __tmp = (*((addr))) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); }); } while (0);
979 }
980
981 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 x)
982 {
983 return ___arch__swab32(x);
984 }
985 static __inline__ __attribute__((always_inline)) __u32 __swab32p(const __u32 *x)
986 {
987 return ___arch__swab32(*(x));
988 }
989 static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr)
990 {
991 do { *(addr) = ___arch__swab32(*((addr))); } while (0);
992 }
993
994
995 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 x)
996 {
997
998 __u32 h = x >> 32;
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)))));
1001
1002
1003
1004 }
1005 static __inline__ __attribute__((always_inline)) __u64 __swab64p(const __u64 *x)
1006 {
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) )); }); });
1008 }
1009 static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr)
1010 {
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);
1012 }
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)
1016 {
1017 return ( __le64)*p;
1018 }
1019 static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p)
1020 {
1021 return ( __u64)*p;
1022 }
1023 static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p)
1024 {
1025 return ( __le32)*p;
1026 }
1027 static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p)
1028 {
1029 return ( __u32)*p;
1030 }
1031 static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p)
1032 {
1033 return ( __le16)*p;
1034 }
1035 static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p)
1036 {
1037 return ( __u16)*p;
1038 }
1039 static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p)
1040 {
1041 return ( __be64)__swab64p(p);
1042 }
1043 static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p)
1044 {
1045 return __swab64p((__u64 *)p);
1046 }
1047 static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p)
1048 {
1049 return ( __be32)__swab32p(p);
1050 }
1051 static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p)
1052 {
1053 return __swab32p((__u32 *)p);
1054 }
1055 static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p)
1056 {
1057 return ( __be16)__swab16p(p);
1058 }
1059 static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p)
1060 {
1061 return __swab16p((__u16 *)p);
1062 }
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
1074
1075
1076
1077
1078
1079
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
1085
1086 extern const char linux_banner[];
1087 # 47 "include/linux/kernel.h"
1088 extern int console_printk[];
1089
1090
1091
1092
1093
1094
1095 struct completion;
1096 struct pt_regs;
1097 struct user;
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)));
1128
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)));
1133
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);
1137
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);
1142
1143 extern void dump_thread(struct pt_regs *regs, struct user *dump);
1144
1145
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);
1152
1153 static inline __attribute__((always_inline)) int __attribute__((pure)) long_log2(unsigned long x)
1154 {
1155 int r = 0;
1156 for (x >>= 1; x > 0; x >>= 1)
1157 r++;
1158 return r;
1159 }
1160
1161 static inline __attribute__((always_inline)) unsigned long
1162 __attribute__((__const__)) roundup_pow_of_two(unsigned long x)
1163 {
1164 return 1UL << fls_long(x - 1);
1165 }
1166
1167 extern int printk_ratelimit(void);
1168 extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
1169
1170 static inline __attribute__((always_inline)) void console_silent(void)
1171 {
1172 (console_printk[0]) = 0;
1173 }
1174
1175 static inline __attribute__((always_inline)) void console_verbose(void)
1176 {
1177 if ((console_printk[0]))
1178 (console_printk[0]) = 15;
1179 }
1180
1181 extern void bust_spinlocks(int yes);
1182 extern int oops_in_progress;
1183 extern int panic_timeout;
1184 extern int panic_on_oops;
1185 extern int tainted;
1186 extern const char *print_tainted(void);
1187 extern void add_taint(unsigned);
1188
1189
1190 extern enum system_states {
1191 SYSTEM_BOOTING,
1192 SYSTEM_RUNNING,
1193 SYSTEM_HALT,
1194 SYSTEM_POWER_OFF,
1195 SYSTEM_RESTART,
1196 SYSTEM_SUSPEND_DISK,
1197 } system_state;
1198 # 210 "include/linux/kernel.h"
1199 extern void dump_stack(void);
1200 # 322 "include/linux/kernel.h"
1201 struct sysinfo {
1202 long uptime;
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;
1211 unsigned short pad;
1212 unsigned long totalhigh;
1213 unsigned long freehigh;
1214 unsigned int mem_unit;
1215 char _f[20-2*sizeof(long)-sizeof(int)];
1216 };
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
1226
1227
1228
1229
1230
1231
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"
1240 struct cpu_tlb_fns;
1241 struct cpu_user_fns;
1242 struct cpu_cache_fns;
1243 struct processor;
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;
1259 };
1260
1261 extern unsigned int elf_hwcap;
1262 # 24 "include/asm/processor.h" 2
1263
1264
1265 union debug_insn {
1266 u32 arm;
1267 u16 thumb;
1268 };
1269
1270 struct debug_entry {
1271 u32 address;
1272 union debug_insn insn;
1273 };
1274
1275 struct debug_info {
1276 int nsaved;
1277 struct debug_entry bp[2];
1278 };
1279
1280 struct thread_struct {
1281
1282 unsigned long address;
1283 unsigned long trap_no;
1284 unsigned long error_code;
1285
1286 struct debug_info debug;
1287 };
1288 # 78 "include/asm/processor.h"
1289 struct task_struct;
1290
1291
1292 extern void release_thread(struct task_struct *);
1293
1294
1295
1296
1297 unsigned long get_wchan(struct task_struct *p);
1298
1299
1300
1301
1302
1303
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)
1310 {
1311
1312 char *cp;
1313 char *end = addr + len;
1314
1315 for (cp = addr; cp < end; cp += (4*(1 << 5)))
1316 ({ __asm__ __volatile__( "pld\t%0" : : "o" (*(char *)(cp)) : "cc"); });
1317
1318 }
1319 # 9 "include/linux/list.h" 2
1320 # 21 "include/linux/list.h"
1321 struct list_head {
1322 struct list_head *next, *prev;
1323 };
1324
1325
1326
1327
1328
1329
1330 static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list)
1331 {
1332 list->next = list;
1333 list->prev = list;
1334 }
1335
1336
1337
1338
1339
1340
1341
1342 static inline __attribute__((always_inline)) void __list_add(struct list_head *new,
1343 struct list_head *prev,
1344 struct list_head *next)
1345 {
1346 next->prev = new;
1347 new->next = next;
1348 new->prev = prev;
1349 prev->next = new;
1350 }
1351 # 60 "include/linux/list.h"
1352 static inline __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head)
1353 {
1354 __list_add(new, head, head->next);
1355 }
1356 # 73 "include/linux/list.h"
1357 static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head)
1358 {
1359 __list_add(new, head->prev, head);
1360 }
1361
1362
1363
1364
1365
1366
1367
1368 static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head * new,
1369 struct list_head * prev, struct list_head * next)
1370 {
1371 new->next = next;
1372 new->prev = prev;
1373 __asm__ __volatile__("": : :"memory");
1374 next->prev = new;
1375 prev->next = new;
1376 }
1377 # 110 "include/linux/list.h"
1378 static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head)
1379 {
1380 __list_add_rcu(new, head, head->next);
1381 }
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)
1385 {
1386 __list_add_rcu(new, head->prev, head);
1387 }
1388 # 144 "include/linux/list.h"
1389 static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next)
1390 {
1391 next->prev = prev;
1392 prev->next = next;
1393 }
1394
1395
1396
1397
1398
1399
1400
1401 static inline __attribute__((always_inline)) void list_del(struct list_head *entry)
1402 {
1403 __list_del(entry->prev, entry->next);
1404 entry->next = ((void *) 0x00100100);
1405 entry->prev = ((void *) 0x00200200);
1406 }
1407 # 187 "include/linux/list.h"
1408 static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry)
1409 {
1410 __list_del(entry->prev, entry->next);
1411 entry->prev = ((void *) 0x00200200);
1412 }
1413
1414
1415
1416
1417
1418
1419
1420 static inline __attribute__((always_inline)) void list_replace(struct list_head *old,
1421 struct list_head *new)
1422 {
1423 new->next = old->next;
1424 new->next->prev = new;
1425 new->prev = old->prev;
1426 new->prev->next = new;
1427 }
1428
1429 static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old,
1430 struct list_head *new)
1431 {
1432 list_replace(old, new);
1433 INIT_LIST_HEAD(old);
1434 }
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)
1438 {
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);
1445 }
1446
1447
1448
1449
1450
1451 static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry)
1452 {
1453 __list_del(entry->prev, entry->next);
1454 INIT_LIST_HEAD(entry);
1455 }
1456
1457
1458
1459
1460
1461
1462 static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head)
1463 {
1464 __list_del(list->prev, list->next);
1465 list_add(list, head);
1466 }
1467
1468
1469
1470
1471
1472
1473 static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list,
1474 struct list_head *head)
1475 {
1476 __list_del(list->prev, list->next);
1477 list_add_tail(list, head);
1478 }
1479
1480
1481
1482
1483
1484
1485 static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list,
1486 const struct list_head *head)
1487 {
1488 return list->next == head;
1489 }
1490
1491
1492
1493
1494
1495 static inline __attribute__((always_inline)) int list_empty(const struct list_head *head)
1496 {
1497 return head->next == head;
1498 }
1499 # 300 "include/linux/list.h"
1500 static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head)
1501 {
1502 struct list_head *next = head->next;
1503 return (next == head) && (next == head->prev);
1504 }
1505
1506 static inline __attribute__((always_inline)) void __list_splice(struct list_head *list,
1507 struct list_head *head)
1508 {
1509 struct list_head *first = list->next;
1510 struct list_head *last = list->prev;
1511 struct list_head *at = head->next;
1512
1513 first->prev = head;
1514 head->next = first;
1515
1516 last->next = at;
1517 at->prev = last;
1518 }
1519
1520
1521
1522
1523
1524
1525 static inline __attribute__((always_inline)) void list_splice(struct list_head *list, struct list_head *head)
1526 {
1527 if (!list_empty(list))
1528 __list_splice(list, head);
1529 }
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)
1533 {
1534 if (!list_empty(list)) {
1535 __list_splice(list, head);
1536 INIT_LIST_HEAD(list);
1537 }
1538 }
1539 # 592 "include/linux/list.h"
1540 struct hlist_head {
1541 struct hlist_node *first;
1542 };
1543
1544 struct hlist_node {
1545 struct hlist_node *next, **pprev;
1546 };
1547
1548
1549
1550
1551 static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h)
1552 {
1553 h->next = ((void *)0);
1554 h->pprev = ((void *)0);
1555 }
1556
1557 static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h)
1558 {
1559 return !h->pprev;
1560 }
1561
1562 static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h)
1563 {
1564 return !h->first;
1565 }
1566
1567 static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n)
1568 {
1569 struct hlist_node *next = n->next;
1570 struct hlist_node **pprev = n->pprev;
1571 *pprev = next;
1572 if (next)
1573 next->pprev = pprev;
1574 }
1575
1576 static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n)
1577 {
1578 __hlist_del(n);
1579 n->next = ((void *) 0x00100100);
1580 n->pprev = ((void *) 0x00200200);
1581 }
1582 # 654 "include/linux/list.h"
1583 static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n)
1584 {
1585 __hlist_del(n);
1586 n->pprev = ((void *) 0x00200200);
1587 }
1588
1589 static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n)
1590 {
1591 if (!hlist_unhashed(n)) {
1592 __hlist_del(n);
1593 INIT_HLIST_NODE(n);
1594 }
1595 }
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)
1599 {
1600 struct hlist_node *next = old->next;
1601
1602 new->next = next;
1603 new->pprev = old->pprev;
1604 __asm__ __volatile__("": : :"memory");
1605 if (next)
1606 new->next->pprev = &new->next;
1607 *new->pprev = new;
1608 old->pprev = ((void *) 0x00200200);
1609 }
1610
1611 static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
1612 {
1613 struct hlist_node *first = h->first;
1614 n->next = first;
1615 if (first)
1616 first->pprev = &n->next;
1617 h->first = n;
1618 n->pprev = &h->first;
1619 }
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)
1623 {
1624 struct hlist_node *first = h->first;
1625 n->next = first;
1626 n->pprev = &h->first;
1627 __asm__ __volatile__("": : :"memory");
1628 if (first)
1629 first->pprev = &n->next;
1630 h->first = n;
1631 }
1632
1633
1634 static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n,
1635 struct hlist_node *next)
1636 {
1637 n->pprev = next->pprev;
1638 n->next = next;
1639 next->pprev = &n->next;
1640 *(n->pprev) = n;
1641 }
1642
1643 static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n,
1644 struct hlist_node *next)
1645 {
1646 next->next = n->next;
1647 n->next = next;
1648 next->pprev = &n->next;
1649
1650 if(next->next)
1651 next->next->pprev = &next->next;
1652 }
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)
1656 {
1657 n->pprev = next->pprev;
1658 n->next = next;
1659 __asm__ __volatile__("": : :"memory");
1660 next->pprev = &n->next;
1661 *(n->pprev) = n;
1662 }
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)
1666 {
1667 n->next = prev->next;
1668 n->pprev = &prev->next;
1669 __asm__ __volatile__("": : :"memory");
1670 prev->next = n;
1671 if (n->next)
1672 n->next->pprev = &n->next;
1673 }
1674 # 13 "include/linux/lockdep.h" 2
1675 # 1 "include/linux/debug_locks.h" 1
1676
1677
1678
1679 struct task_struct;
1680
1681 extern int debug_locks;
1682 extern int debug_locks_silent;
1683
1684
1685
1686
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)
1690 {
1691 }
1692
1693 static inline __attribute__((always_inline)) void debug_show_held_locks(struct task_struct *task)
1694 {
1695 }
1696
1697 static inline __attribute__((always_inline)) void
1698 debug_check_no_locks_freed(const void *from, unsigned long len)
1699 {
1700 }
1701
1702 static inline __attribute__((always_inline)) void
1703 debug_check_no_locks_held(struct task_struct *task)
1704 {
1705 }
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)
1711 {
1712 }
1713
1714 static inline __attribute__((always_inline)) void lockdep_on(void)
1715 {
1716 }
1717
1718 static inline __attribute__((always_inline)) int lockdep_internal(void)
1719 {
1720 return 0;
1721 }
1722 # 270 "include/linux/lockdep.h"
1723 struct lock_class_key { };
1724 # 13 "include/linux/spinlock_types.h" 2
1725
1726
1727
1728
1729 # 1 "include/linux/spinlock_types_up.h" 1
1730 # 29 "include/linux/spinlock_types_up.h"
1731 typedef struct { } raw_spinlock_t;
1732
1733
1734
1735
1736
1737 typedef struct {
1738
1739
1740
1741
1742 } raw_rwlock_t;
1743 # 18 "include/linux/spinlock_types.h" 2
1744
1745
1746 typedef struct {
1747 raw_spinlock_t raw_lock;
1748 # 32 "include/linux/spinlock_types.h"
1749 } spinlock_t;
1750
1751
1752
1753 typedef struct {
1754 raw_rwlock_t raw_lock;
1755 # 48 "include/linux/spinlock_types.h"
1756 } rwlock_t;
1757 # 79 "include/linux/spinlock.h" 2
1758
1759 extern int __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock);
1760
1761
1762
1763
1764
1765
1766
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)
1778 {
1779 unsigned long flags;
1780 int val;
1781
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"); });
1783 val = v->counter;
1784 v->counter = val += i;
1785 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
1786
1787 return val;
1788 }
1789
1790 static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t *v)
1791 {
1792 unsigned long flags;
1793 int val;
1794
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"); });
1796 val = v->counter;
1797 v->counter = val -= i;
1798 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
1799
1800 return val;
1801 }
1802
1803 static inline __attribute__((always_inline)) int atomic_cmpxchg(atomic_t *v, int old, int new)
1804 {
1805 int ret;
1806 unsigned long flags;
1807
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"); });
1809 ret = v->counter;
1810 if (__builtin_expect(!!(ret == old), 1))
1811 v->counter = new;
1812 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
1813
1814 return ret;
1815 }
1816
1817 static inline __attribute__((always_inline)) void atomic_clear_mask(unsigned long mask, unsigned long *addr)
1818 {
1819 unsigned long flags;
1820
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"); });
1822 *addr &= ~mask;
1823 __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
1824 }
1825
1826
1827
1828
1829
1830 static inline __attribute__((always_inline)) int atomic_add_unless(atomic_t *v, int a, int u)
1831 {
1832 int c, old;
1833
1834 c = ((v)->counter);
1835 while (c != u && (old = atomic_cmpxchg((v), c, c + a)) != c)
1836 c = old;
1837 return c != u;
1838 }
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;
1843
1844
1845 static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l)
1846 {
1847 atomic_t *v = (atomic_t *)l;
1848
1849 return (long)((v)->counter);
1850 }
1851
1852 static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i)
1853 {
1854 atomic_t *v = (atomic_t *)l;
1855
1856 (((v)->counter) = (i));
1857 }
1858
1859 static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l)
1860 {
1861 atomic_t *v = (atomic_t *)l;
1862
1863 (void) atomic_add_return(1, v);
1864 }
1865
1866 static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l)
1867 {
1868 atomic_t *v = (atomic_t *)l;
1869
1870 (void) atomic_sub_return(1, v);
1871 }
1872
1873 static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l)
1874 {
1875 atomic_t *v = (atomic_t *)l;
1876
1877 (void) atomic_add_return(i, v);
1878 }
1879
1880 static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l)
1881 {
1882 atomic_t *v = (atomic_t *)l;
1883
1884 (void) atomic_sub_return(i, v);
1885 }
1886 # 210 "include/asm/atomic.h" 2
1887 # 260 "include/linux/spinlock.h" 2
1888
1889
1890
1891
1892
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
1896
1897
1898
1899
1900
1901 static inline __attribute__((always_inline)) struct task_struct *get_current(void) __attribute__((__const__));
1902
1903 static inline __attribute__((always_inline)) struct task_struct *get_current(void)
1904 {
1905 return current_thread_info()->task;
1906 }
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)
1914 {
1915 kernel_cap_t dest;
1916 (dest) = (a) | (b);
1917 return dest;
1918 }
1919
1920 static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b)
1921 {
1922 kernel_cap_t dest;
1923 (dest) = (a) & (b);
1924 return dest;
1925 }
1926
1927 static inline __attribute__((always_inline)) kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop)
1928 {
1929 kernel_cap_t dest;
1930 (dest) = (a) & ~(drop);
1931 return dest;
1932 }
1933
1934 static inline __attribute__((always_inline)) kernel_cap_t cap_invert(kernel_cap_t c)
1935 {
1936 kernel_cap_t dest;
1937 (dest) = ~(c);
1938 return dest;
1939 }
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
1946
1947
1948 # 1 "include/linux/timex.h" 1
1949 # 57 "include/linux/timex.h"
1950 # 1 "include/linux/time.h" 1
1951
1952
1953
1954
1955
1956
1957 # 1 "include/linux/seqlock.h" 1
1958 # 32 "include/linux/seqlock.h"
1959 typedef struct {
1960 unsigned sequence;
1961 spinlock_t lock;
1962 } seqlock_t;
1963 # 57 "include/linux/seqlock.h"
1964 static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl)
1965 {
1966 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1967 ++sl->sequence;
1968 __asm__ __volatile__("": : :"memory");
1969 }
1970
1971 static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl)
1972 {
1973 __asm__ __volatile__("": : :"memory");
1974 sl->sequence++;
1975 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1976 }
1977
1978 static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl)
1979 {
1980 int ret = (({ do { do { } while (0); (void)0; (void)(&sl->lock); } while (0); 1; }));
1981
1982 if (ret) {
1983 ++sl->sequence;
1984 __asm__ __volatile__("": : :"memory");
1985 }
1986 return ret;
1987 }
1988
1989
1990 static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl)
1991 {
1992 unsigned ret = sl->sequence;
1993 __asm__ __volatile__("": : :"memory");
1994 return ret;
1995 }
1996 # 98 "include/linux/seqlock.h"
1997 static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned iv)
1998 {
1999 __asm__ __volatile__("": : :"memory");
2000 return (iv & 1) | (sl->sequence ^ iv);
2001 }
2002 # 112 "include/linux/seqlock.h"
2003 typedef struct seqcount {
2004 unsigned sequence;
2005 } seqcount_t;
2006
2007
2008
2009
2010
2011 static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s)
2012 {
2013 unsigned ret = s->sequence;
2014 __asm__ __volatile__("": : :"memory");
2015 return ret;
2016 }
2017
2018
2019
2020
2021
2022
2023 static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned iv)
2024 {
2025 __asm__ __volatile__("": : :"memory");
2026 return (iv & 1) | (s->sequence ^ iv);
2027 }
2028
2029
2030
2031
2032
2033
2034 static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s)
2035 {
2036 s->sequence++;
2037 __asm__ __volatile__("": : :"memory");
2038 }
2039
2040 static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s)
2041 {
2042 __asm__ __volatile__("": : :"memory");
2043 s->sequence++;
2044 }
2045 # 8 "include/linux/time.h" 2
2046
2047
2048
2049
2050 struct timespec {
2051 time_t tv_sec;
2052 long tv_nsec;
2053 };
2054
2055
2056 struct timeval {
2057 time_t tv_sec;
2058 suseconds_t tv_usec;
2059 };
2060
2061 struct timezone {
2062 int tz_minuteswest;
2063 int tz_dsttime;
2064 };
2065 # 39 "include/linux/time.h"
2066 static inline __attribute__((always_inline)) int timespec_equal(struct timespec *a, struct timespec *b)
2067 {
2068 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
2069 }
2070
2071
2072
2073
2074
2075
2076 static inline __attribute__((always_inline)) int timespec_compare(struct timespec *lhs, struct timespec *rhs)
2077 {
2078 if (lhs->tv_sec < rhs->tv_sec)
2079 return -1;
2080 if (lhs->tv_sec > rhs->tv_sec)
2081 return 1;
2082 return lhs->tv_nsec - rhs->tv_nsec;
2083 }
2084
2085 static inline __attribute__((always_inline)) int timeval_compare(struct timeval *lhs, struct timeval *rhs)
2086 {
2087 if (lhs->tv_sec < rhs->tv_sec)
2088 return -1;
2089 if (lhs->tv_sec > rhs->tv_sec)
2090 return 1;
2091 return lhs->tv_usec - rhs->tv_usec;
2092 }
2093
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);
2097
2098 extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
2099
2100
2101
2102
2103 static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs,
2104 struct timespec rhs)
2105 {
2106 struct timespec ts_delta;
2107 set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
2108 lhs.tv_nsec - rhs.tv_nsec);
2109 return ts_delta;
2110 }
2111
2112
2113
2114
2115
2116
2117
2118 extern struct timespec xtime;
2119 extern struct timespec wall_to_monotonic;
2120 extern seqlock_t xtime_lock;
2121
2122 void timekeeping_init(void);
2123
2124 static inline __attribute__((always_inline)) unsigned long get_seconds(void)
2125 {
2126 return xtime.tv_sec;
2127 }
2128
2129 struct timespec current_kernel_time(void);
2130
2131
2132
2133
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);
2137
2138 extern long do_utimes(int dfd, char *filename, struct timeval *times);
2139 struct itimerval;
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);
2145
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)
2150 {
2151 return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
2152 }
2153 # 141 "include/linux/time.h"
2154 static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv)
2155 {
2156 return ((s64) tv->tv_sec * 1000000000L) +
2157 tv->tv_usec * 1000L;
2158 }
2159
2160
2161
2162
2163
2164
2165
2166 extern struct timespec ns_to_timespec(const s64 nsec);
2167
2168
2169
2170
2171
2172
2173
2174 extern struct timeval ns_to_timeval(const s64 nsec);
2175
2176
2177
2178
2179
2180
2181 static inline __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns)
2182 {
2183 ns += a->tv_nsec;
2184 while(__builtin_expect(!!(ns >= 1000000000L), 0)) {
2185 ns -= 1000000000L;
2186 a->tv_sec++;
2187 }
2188 a->tv_nsec = ns;
2189 }
2190 # 195 "include/linux/time.h"
2191 struct itimerspec {
2192 struct timespec it_interval;
2193 struct timespec it_value;
2194 };
2195
2196 struct itimerval {
2197 struct timeval it_interval;
2198 struct timeval it_value;
2199 };
2200 # 58 "include/linux/timex.h" 2
2201 # 106 "include/linux/timex.h"
2202 struct timex {
2203 unsigned int modes;
2204 long offset;
2205 long freq;
2206 long maxerror;
2207 long esterror;
2208 int status;
2209 long constant;
2210 long precision;
2211 long tolerance;
2212
2213
2214 struct timeval time;
2215 long tick;
2216
2217 long ppsfreq;
2218 long jitter;
2219 int shift;
2220 long stabil;
2221 long jitcnt;
2222 long calcnt;
2223 long errcnt;
2224 long stbcnt;
2225
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;
2229 };
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
2237
2238
2239
2240
2241
2242
2243
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
2248
2249
2250
2251
2252
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)
2263 {
2264 u32 temp, cp_flags;
2265
2266 asm volatile (
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));
2271
2272 return cp_flags;
2273 }
2274
2275 static inline __attribute__((always_inline)) void iop13xx_cp6_restore(u32 cp_flags)
2276 {
2277 asm volatile (
2278 "mcr p15, 0, %0, c15, c1, 0\n\t"
2279 : : "r" (cp_flags) );
2280 }
2281
2282
2283 static inline __attribute__((always_inline)) int iop13xx_cpu_id(void)
2284 {
2285 int id;
2286 asm volatile("mrc p6, 0, %0, c0, c0, 0":"=r" (id));
2287 return id;
2288 }
2289 # 20 "include/asm/arch/hardware.h" 2
2290
2291
2292
2293
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
2299
2300 typedef unsigned long cycles_t;
2301
2302 static inline __attribute__((always_inline)) cycles_t get_cycles (void)
2303 {
2304 return 0;
2305 }
2306 # 194 "include/linux/timex.h" 2
2307
2308
2309
2310
2311
2312
2313 extern unsigned long tick_usec;
2314 extern unsigned long tick_nsec;
2315 extern int tickadj;
2316
2317
2318
2319
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;
2328
2329 extern long time_freq;
2330 extern long time_reftime;
2331
2332 extern long time_adjust;
2333 extern long time_next_adjust;
2334
2335
2336
2337
2338
2339
2340 static inline __attribute__((always_inline)) void ntp_clear(void)
2341 {
2342 time_adjust = 0;
2343 time_status |= 0x0040;
2344 time_maxerror = (512000L << 5);
2345 time_esterror = (512000L << 5);
2346 }
2347
2348
2349
2350
2351
2352 static inline __attribute__((always_inline)) int ntp_synced(void)
2353 {
2354 return !(time_status & 0x0040);
2355 }
2356 # 300 "include/linux/timex.h"
2357 static inline __attribute__((always_inline)) void
2358 time_interpolator_reset(void)
2359 {
2360 }
2361
2362
2363
2364
2365
2366
2367 extern u64 current_tick_length(void);
2368
2369 extern int do_adjtimex(struct timex *);
2370 # 49 "include/linux/sched.h" 2
2371 # 1 "include/linux/jiffies.h" 1
2372
2373
2374
2375 # 1 "include/linux/calc64.h" 1
2376
2377
2378
2379
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)
2385 {
2386 u64 result = dividend;
2387
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;
2390 }
2391
2392
2393
2394
2395
2396
2397
2398 static inline __attribute__((always_inline)) long div_long_long_rem_signed(const long long dividend,
2399 const long divisor, long *remainder)
2400 {
2401 long res;
2402
2403 if (__builtin_expect(!!(dividend < 0), 0)) {
2404 res = -do_div_llr((-dividend), divisor, remainder);
2405 *remainder = -(*remainder);
2406 } else
2407 res = do_div_llr((dividend), divisor, remainder);
2408
2409 return res;
2410 }
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;
2415
2416
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)
2420 {
2421
2422 return (1000L / 100) * j;
2423
2424
2425
2426
2427
2428 }
2429
2430 static inline __attribute__((always_inline)) unsigned int jiffies_to_usecs(const unsigned long j)
2431 {
2432
2433 return (1000000L / 100) * j;
2434
2435
2436
2437
2438
2439 }
2440
2441 static inline __attribute__((always_inline)) unsigned long msecs_to_jiffies(const unsigned int m)
2442 {
2443 if (m > jiffies_to_msecs(((~0UL >> 1)-1)))
2444 return ((~0UL >> 1)-1);
2445
2446 return (m + (1000L / 100) - 1) / (1000L / 100);
2447
2448
2449
2450
2451
2452 }
2453
2454 static inline __attribute__((always_inline)) unsigned long usecs_to_jiffies(const unsigned int u)
2455 {
2456 if (u > jiffies_to_usecs(((~0UL >> 1)-1)))
2457 return ((~0UL >> 1)-1);
2458
2459 return (u + (1000000L / 100) - 1) / (1000000L / 100);
2460
2461
2462
2463
2464
2465 }
2466 # 311 "include/linux/jiffies.h"
2467 static __inline__ __attribute__((always_inline)) unsigned long
2468 timespec_to_jiffies(const struct timespec *value)
2469 {
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;
2472
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);
2475 nsec = 0;
2476 }
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);
2480
2481 }
2482
2483 static __inline__ __attribute__((always_inline)) void
2484 jiffies_to_timespec(const unsigned long jiffies, struct timespec *value)
2485 {
2486
2487
2488
2489
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);
2492 }
2493 # 350 "include/linux/jiffies.h"
2494 static __inline__ __attribute__((always_inline)) unsigned long
2495 timeval_to_jiffies(const struct timeval *value)
2496 {
2497 unsigned long sec = value->tv_sec;
2498 long usec = value->tv_usec;
2499
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);
2502 usec = 0;
2503 }
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);
2507 }
2508
2509 static __inline__ __attribute__((always_inline)) void
2510 jiffies_to_timeval(const unsigned long jiffies, struct timeval *value)
2511 {
2512
2513
2514
2515
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)))))));
2517 long tv_usec;
2518
2519 value->tv_sec = do_div_llr((nsec), 1000000000L, &tv_usec);
2520 tv_usec /= 1000L;
2521 value->tv_usec = tv_usec;
2522 }
2523
2524
2525
2526
2527 static inline __attribute__((always_inline)) clock_t jiffies_to_clock_t(long x)
2528 {
2529
2530 return x / (100 / 100);
2531
2532
2533
2534
2535
2536 }
2537
2538 static inline __attribute__((always_inline)) unsigned long clock_t_to_jiffies(unsigned long x)
2539 {
2540
2541 if (x >= ~0UL / (100 / 100))
2542 return ~0UL;
2543 return x * (100 / 100);
2544 # 412 "include/linux/jiffies.h"
2545 }
2546
2547 static inline __attribute__((always_inline)) u64 jiffies_64_to_clock_t(u64 x)
2548 {
2549
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"
2552 return x;
2553 }
2554
2555 static inline __attribute__((always_inline)) u64 nsec_to_clock_t(u64 x)
2556 {
2557
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"
2560 return x;
2561 }
2562 # 50 "include/linux/sched.h" 2
2563 # 1 "include/linux/rbtree.h" 1
2564 # 100 "include/linux/rbtree.h"
2565 struct rb_node
2566 {
2567 unsigned long rb_parent_color;
2568
2569
2570 struct rb_node *rb_right;
2571 struct rb_node *rb_left;
2572 } __attribute__((aligned(sizeof(long))));
2573
2574
2575 struct rb_root
2576 {
2577 struct rb_node *rb_node;
2578 };
2579 # 123 "include/linux/rbtree.h"
2580 static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p)
2581 {
2582 rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
2583 }
2584 static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color)
2585 {
2586 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
2587 }
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 *);
2591
2592
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 *);
2597
2598
2599 extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
2600 struct rb_root *root);
2601
2602 static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent,
2603 struct rb_node ** rb_link)
2604 {
2605 node->rb_parent_color = (unsigned long )parent;
2606 node->rb_left = node->rb_right = ((void *)0);
2607
2608 *rb_link = node;
2609 }
2610 # 51 "include/linux/sched.h" 2
2611
2612 # 1 "include/linux/cpumask.h" 1
2613 # 86 "include/linux/cpumask.h"
2614 # 1 "include/linux/bitmap.h" 1
2615
2616
2617
2618
2619
2620
2621
2622 # 1 "include/linux/string.h" 1
2623 # 16 "include/linux/string.h"
2624 extern char *strndup_user(const char *, long);
2625
2626
2627
2628
2629 # 1 "include/asm/string.h" 1
2630 # 10 "include/asm/string.h"
2631 extern char * strrchr(const char * s, int c);
2632
2633
2634 extern char * strchr(const char * s, int c);
2635
2636
2637 extern void * memcpy(void *, const void *, __kernel_size_t);
2638
2639
2640 extern void * memmove(void *, const void *, __kernel_size_t);
2641
2642
2643 extern void * memchr(const void *, int, __kernel_size_t);
2644
2645
2646
2647 extern void * memset(void *, int, __kernel_size_t);
2648
2649 extern void __memzero(void *ptr, __kernel_size_t n);
2650 # 22 "include/linux/string.h" 2
2651
2652
2653 extern char * strcpy(char *,const char *);
2654
2655
2656 extern char * strncpy(char *,const char *, __kernel_size_t);
2657
2658
2659 size_t strlcpy(char *, const char *, size_t);
2660
2661
2662 extern char * strcat(char *, const char *);
2663
2664
2665 extern char * strncat(char *, const char *, __kernel_size_t);
2666
2667
2668 extern size_t strlcat(char *, const char *, __kernel_size_t);
2669
2670
2671 extern int strcmp(const char *,const char *);
2672
2673
2674 extern int strncmp(const char *,const char *,__kernel_size_t);
2675
2676
2677 extern int strnicmp(const char *, const char *, __kernel_size_t);
2678
2679
2680
2681
2682
2683 extern char * strnchr(const char *, size_t, int);
2684
2685
2686
2687
2688 extern char * strstrip(char *);
2689
2690 extern char * strstr(const char *,const char *);
2691
2692
2693 extern __kernel_size_t strlen(const char *);
2694
2695
2696 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
2697
2698
2699 extern char * strpbrk(const char *,const char *);
2700
2701
2702 extern char * strsep(char **,const char *);
2703
2704
2705 extern __kernel_size_t strspn(const char *,const char *);
2706
2707
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);
2711
2712
2713 extern int memcmp(const void *,const void *,__kernel_size_t);
2714
2715
2716
2717
2718
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,
2727 int bits);
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);
2745
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,
2753 int nmaskbits);
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);
2761
2762
2763
2764
2765
2766
2767
2768 static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits)
2769 {
2770 if (nbits <= 32)
2771 *dst = 0UL;
2772 else {
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); });
2775 }
2776 }
2777
2778 static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits)
2779 {
2780 size_t nlongs = (((nbits)+32 -1)/32);
2781 if (nlongs > 1) {
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); });
2784 }
2785 dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2786 }
2787
2788 static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src,
2789 int nbits)
2790 {
2791 if (nbits <= 32)
2792 *dst = *src;
2793 else {
2794 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2795 memcpy(dst, src, len);
2796 }
2797 }
2798
2799 static inline __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *src1,
2800 const unsigned long *src2, int nbits)
2801 {
2802 if (nbits <= 32)
2803 *dst = *src1 & *src2;
2804 else
2805 __bitmap_and(dst, src1, src2, nbits);
2806 }
2807
2808 static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1,
2809 const unsigned long *src2, int nbits)
2810 {
2811 if (nbits <= 32)
2812 *dst = *src1 | *src2;
2813 else
2814 __bitmap_or(dst, src1, src2, nbits);
2815 }
2816
2817 static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1,
2818 const unsigned long *src2, int nbits)
2819 {
2820 if (nbits <= 32)
2821 *dst = *src1 ^ *src2;
2822 else
2823 __bitmap_xor(dst, src1, src2, nbits);
2824 }
2825
2826 static inline __attribute__((always_inline)) void bitmap_andnot(unsigned long *dst, const unsigned long *src1,
2827 const unsigned long *src2, int nbits)
2828 {
2829 if (nbits <= 32)
2830 *dst = *src1 & ~(*src2);
2831 else
2832 __bitmap_andnot(dst, src1, src2, nbits);
2833 }
2834
2835 static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src,
2836 int nbits)
2837 {
2838 if (nbits <= 32)
2839 *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2840 else
2841 __bitmap_complement(dst, src, nbits);
2842 }
2843
2844 static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1,
2845 const unsigned long *src2, int nbits)
2846 {
2847 if (nbits <= 32)
2848 return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2849 else
2850 return __bitmap_equal(src1, src2, nbits);
2851 }
2852
2853 static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1,
2854 const unsigned long *src2, int nbits)
2855 {
2856 if (nbits <= 32)
2857 return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0;
2858 else
2859 return __bitmap_intersects(src1, src2, nbits);
2860 }
2861
2862 static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1,
2863 const unsigned long *src2, int nbits)
2864 {
2865 if (nbits <= 32)
2866 return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2867 else
2868 return __bitmap_subset(src1, src2, nbits);
2869 }
2870
2871 static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits)
2872 {
2873 if (nbits <= 32)
2874 return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2875 else
2876 return __bitmap_empty(src, nbits);
2877 }
2878
2879 static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits)
2880 {
2881 if (nbits <= 32)
2882 return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2883 else
2884 return __bitmap_full(src, nbits);
2885 }
2886
2887 static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits)
2888 {
2889 if (nbits <= 32)
2890 return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2891 return __bitmap_weight(src, nbits);
2892 }
2893
2894 static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst,
2895 const unsigned long *src, int n, int nbits)
2896 {
2897 if (nbits <= 32)
2898 *dst = *src >> n;
2899 else
2900 __bitmap_shift_right(dst, src, n, nbits);
2901 }
2902
2903 static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst,
2904 const unsigned long *src, int n, int nbits)
2905 {
2906 if (nbits <= 32)
2907 *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2908 else
2909 __bitmap_shift_left(dst, src, n, nbits);
2910 }
2911 # 87 "include/linux/cpumask.h" 2
2912
2913 typedef struct { unsigned long bits[(((1)+32 -1)/32)]; } cpumask_t;
2914 extern cpumask_t _unused_cpumask_arg_;
2915
2916
2917 static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp)
2918 {
2919 (__builtin_constant_p(cpu) ? ____atomic_set_bit(cpu, dstp->bits) : _set_bit_le(cpu,dstp->bits));
2920 }
2921
2922
2923 static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp)
2924 {
2925 (__builtin_constant_p(cpu) ? ____atomic_clear_bit(cpu, dstp->bits) : _clear_bit_le(cpu,dstp->bits));
2926 }
2927
2928
2929 static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits)
2930 {
2931 bitmap_fill(dstp->bits, nbits);
2932 }
2933
2934
2935 static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits)
2936 {
2937 bitmap_zero(dstp->bits, nbits);
2938 }
2939
2940
2941
2942
2943
2944 static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr)
2945 {
2946 return (__builtin_constant_p(cpu) ? ____atomic_test_and_set_bit(cpu, addr->bits) : _test_and_set_bit_le(cpu,addr->bits));
2947 }
2948
2949
2950 static inline __attribute__((always_inline)) void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
2951 const cpumask_t *src2p, int nbits)
2952 {
2953 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
2954 }
2955
2956
2957 static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
2958 const cpumask_t *src2p, int nbits)
2959 {
2960 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
2961 }
2962
2963
2964 static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
2965 const cpumask_t *src2p, int nbits)
2966 {
2967 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
2968 }
2969
2970
2971
2972 static inline __attribute__((always_inline)) void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
2973 const cpumask_t *src2p, int nbits)
2974 {
2975 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
2976 }
2977
2978
2979 static inline __attribute__((always_inline)) void __cpus_complement(cpumask_t *dstp,
2980 const cpumask_t *srcp, int nbits)
2981 {
2982 bitmap_complement(dstp->bits, srcp->bits, nbits);
2983 }
2984
2985
2986 static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p,
2987 const cpumask_t *src2p, int nbits)
2988 {
2989 return bitmap_equal(src1p->bits, src2p->bits, nbits);
2990 }
2991
2992
2993 static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p,
2994 const cpumask_t *src2p, int nbits)
2995 {
2996 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
2997 }
2998
2999
3000 static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p,
3001 const cpumask_t *src2p, int nbits)
3002 {
3003 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3004 }
3005
3006
3007 static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits)
3008 {
3009 return bitmap_empty(srcp->bits, nbits);
3010 }
3011
3012
3013 static inline __attribute__((always_inline)) int __cpus_full(const cpumask_t *srcp, int nbits)
3014 {
3015 return bitmap_full(srcp->bits, nbits);
3016 }
3017
3018
3019 static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits)
3020 {
3021 return bitmap_weight(srcp->bits, nbits);
3022 }
3023
3024
3025
3026 static inline __attribute__((always_inline)) void __cpus_shift_right(cpumask_t *dstp,
3027 const cpumask_t *srcp, int n, int nbits)
3028 {
3029 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3030 }
3031
3032
3033
3034 static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp,
3035 const cpumask_t *srcp, int n, int nbits)
3036 {
3037 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3038 }
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)
3042 {
3043 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3044 }
3045
3046
3047
3048 static inline __attribute__((always_inline)) int __cpumask_parse(const char *buf, int len,
3049 cpumask_t *dstp, int nbits)
3050 {
3051 return bitmap_parse(buf, len, dstp->bits, nbits);
3052 }
3053
3054
3055
3056 static inline __attribute__((always_inline)) int __cpulist_scnprintf(char *buf, int len,
3057 const cpumask_t *srcp, int nbits)
3058 {
3059 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3060 }
3061
3062
3063 static inline __attribute__((always_inline)) int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
3064 {
3065 return bitmap_parselist(buf, dstp->bits, nbits);
3066 }
3067
3068
3069
3070 static inline __attribute__((always_inline)) int __cpu_remap(int oldbit,
3071 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
3072 {
3073 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3074 }
3075
3076
3077
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)
3080 {
3081 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3082 }
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
3089
3090
3091
3092 # 1 "include/asm/errno.h" 1
3093
3094
3095
3096 # 1 "include/asm-generic/errno.h" 1
3097
3098
3099
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
3109
3110 typedef struct { unsigned long bits[((((1 << 0))+32 -1)/32)]; } nodemask_t;
3111 extern nodemask_t _unused_nodemask_arg_;
3112
3113
3114 static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp)
3115 {
3116 (__builtin_constant_p(node) ? ____atomic_set_bit(node, dstp->bits) : _set_bit_le(node,dstp->bits));
3117 }
3118
3119
3120 static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp)
3121 {
3122 (__builtin_constant_p(node) ? ____atomic_clear_bit(node, dstp->bits) : _clear_bit_le(node,dstp->bits));
3123 }
3124
3125
3126 static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits)
3127 {
3128 bitmap_fill(dstp->bits, nbits);
3129 }
3130
3131
3132 static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits)
3133 {
3134 bitmap_zero(dstp->bits, nbits);
3135 }
3136
3137
3138
3139
3140
3141
3142 static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr)
3143 {
3144 return (__builtin_constant_p(node) ? ____atomic_test_and_set_bit(node, addr->bits) : _test_and_set_bit_le(node,addr->bits));
3145 }
3146
3147
3148
3149 static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
3150 const nodemask_t *src2p, int nbits)
3151 {
3152 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
3153 }
3154
3155
3156
3157 static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
3158 const nodemask_t *src2p, int nbits)
3159 {
3160 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
3161 }
3162
3163
3164
3165 static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
3166 const nodemask_t *src2p, int nbits)
3167 {
3168 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
3169 }
3170
3171
3172
3173 static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
3174 const nodemask_t *src2p, int nbits)
3175 {
3176 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
3177 }
3178
3179
3180
3181 static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp,
3182 const nodemask_t *srcp, int nbits)
3183 {
3184 bitmap_complement(dstp->bits, srcp->bits, nbits);
3185 }
3186
3187
3188
3189 static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p,
3190 const nodemask_t *src2p, int nbits)
3191 {
3192 return bitmap_equal(src1p->bits, src2p->bits, nbits);
3193 }
3194
3195
3196
3197 static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p,
3198 const nodemask_t *src2p, int nbits)
3199 {
3200 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
3201 }
3202
3203
3204
3205 static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p,
3206 const nodemask_t *src2p, int nbits)
3207 {
3208 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3209 }
3210
3211
3212 static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits)
3213 {
3214 return bitmap_empty(srcp->bits, nbits);
3215 }
3216
3217
3218 static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits)
3219 {
3220 return bitmap_full(srcp->bits, nbits);
3221 }
3222
3223
3224 static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits)
3225 {
3226 return bitmap_weight(srcp->bits, nbits);
3227 }
3228
3229
3230
3231 static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp,
3232 const nodemask_t *srcp, int n, int nbits)
3233 {
3234 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3235 }
3236
3237
3238
3239 static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp,
3240 const nodemask_t *srcp, int n, int nbits)
3241 {
3242 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3243 }
3244
3245
3246
3247
3248
3249 static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp)
3250 {
3251 return ({ int __x = ((1 << 0)); int __y = (_find_first_bit_le(srcp->bits,(1 << 0))); __x < __y ? __x: __y; });
3252 }
3253
3254
3255 static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp)
3256 {
3257 return ({ int __x = ((1 << 0)); int __y = (_find_next_bit_le(srcp->bits,(1 << 0),n+1)); __x < __y ? __x: __y; });
3258 }
3259 # 251 "include/linux/nodemask.h"
3260 static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp)
3261 {
3262 return ({ int __x = ((1 << 0)); int __y = (_find_first_zero_bit_le(maskp->bits,(1 << 0))); __x < __y ? __x: __y; });
3263
3264 }
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)
3268 {
3269 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3270 }
3271
3272
3273
3274 static inline __attribute__((always_inline)) int __nodemask_parse(const char *buf, int len,
3275 nodemask_t *dstp, int nbits)
3276 {
3277 return bitmap_parse(buf, len, dstp->bits, nbits);
3278 }
3279
3280
3281
3282 static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len,
3283 const nodemask_t *srcp, int nbits)
3284 {
3285 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3286 }
3287
3288
3289 static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
3290 {
3291 return bitmap_parselist(buf, dstp->bits, nbits);
3292 }
3293
3294
3295
3296 static inline __attribute__((always_inline)) int __node_remap(int oldbit,
3297 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3298 {
3299 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3300 }
3301
3302
3303
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)
3306 {
3307 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3308 }
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
3313
3314
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);
3322
3323 struct __wait_queue {
3324 unsigned int flags;
3325
3326 void *private;
3327 wait_queue_func_t func;
3328 struct list_head task_list;
3329 };
3330
3331 struct wait_bit_key {
3332 void *flags;
3333 int bit_nr;
3334 };
3335
3336 struct wait_bit_queue {
3337 struct wait_bit_key key;
3338 wait_queue_t wait;
3339 };
3340
3341 struct __wait_queue_head {
3342 spinlock_t lock;
3343 struct list_head task_list;
3344 };
3345 typedef struct __wait_queue_head wait_queue_head_t;
3346
3347 struct task_struct;
3348 # 80 "include/linux/wait.h"
3349 extern void init_waitqueue_head(wait_queue_head_t *q);
3350
3351 static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
3352 {
3353 q->flags = 0;
3354 q->private = p;
3355 q->func = default_wake_function;
3356 }
3357
3358 static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q,
3359 wait_queue_func_t func)
3360 {
3361 q->flags = 0;
3362 q->private = ((void *)0);
3363 q->func = func;
3364 }
3365
3366 static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q)
3367 {
3368 return !list_empty(&q->task_list);
3369 }
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);
3374
3375 static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
3376 {
3377 list_add(&new->task_list, &head->task_list);
3378 }
3379
3380
3381
3382
3383 static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head,
3384 wait_queue_t *new)
3385 {
3386 list_add_tail(&new->task_list, &head->task_list);
3387 }
3388
3389 static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head,
3390 wait_queue_t *old)
3391 {
3392 list_del(&old->task_list);
3393 }
3394
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)
3408 {
3409 wait->flags |= 0x01;
3410 __add_wait_queue_tail(q, wait);
3411 }
3412
3413
3414
3415
3416 static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q,
3417 wait_queue_t * wait)
3418 {
3419 __remove_wait_queue(q, wait);
3420 }
3421
3422
3423
3424
3425
3426
3427 extern void sleep_on(wait_queue_head_t *q);
3428 extern long sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3429
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);
3432
3433
3434
3435
3436
3437 void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
3438
3439 void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
3440
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)
3447 {
3448 if (!test_bit(bit, word))
3449 return 0;
3450 return out_of_line_wait_on_bit(word, bit, action, mode);
3451 }
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)
3455 {
3456 if (!(__builtin_constant_p(bit) ? ____atomic_test_and_set_bit(bit, word) : _test_and_set_bit_le(bit,word)))
3457 return 0;
3458 return out_of_line_wait_on_bit_lock(word, bit, action, mode);
3459 }
3460 # 10 "include/asm/semaphore.h" 2
3461 # 1 "include/linux/rwsem.h" 1
3462 # 19 "include/linux/rwsem.h"
3463 struct rw_semaphore;
3464
3465
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 {
3471 __s32 activity;
3472 spinlock_t wait_lock;
3473 struct list_head wait_list;
3474
3475
3476
3477 };
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);
3490
3491 static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem)
3492 {
3493 return (sem->activity != 0);
3494 }
3495 # 23 "include/linux/rwsem.h" 2
3496
3497
3498
3499
3500
3501
3502
3503 extern void down_read(struct rw_semaphore *sem);
3504
3505
3506
3507
3508 extern int down_read_trylock(struct rw_semaphore *sem);
3509
3510
3511
3512
3513 extern void down_write(struct rw_semaphore *sem);
3514
3515
3516
3517
3518 extern int down_write_trylock(struct rw_semaphore *sem);
3519
3520
3521
3522
3523 extern void up_read(struct rw_semaphore *sem);
3524
3525
3526
3527
3528 extern void up_write(struct rw_semaphore *sem);
3529
3530
3531
3532
3533 extern void downgrade_write(struct rw_semaphore *sem);
3534 # 11 "include/asm/semaphore.h" 2
3535
3536
3537 # 1 "include/asm/locks.h" 1
3538 # 14 "include/asm/semaphore.h" 2
3539
3540 struct semaphore {
3541 atomic_t count;
3542 int sleepers;
3543 wait_queue_head_t wait;
3544 };
3545 # 33 "include/asm/semaphore.h"
3546 static inline __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val)
3547 {
3548 (((&sem->count)->counter) = (val));
3549 sem->sleepers = 0;
3550 init_waitqueue_head(&sem->wait);
3551 }
3552
3553 static inline __attribute__((always_inline)) void init_MUTEX(struct semaphore *sem)
3554 {
3555 sema_init(sem, 1);
3556 }
3557
3558 static inline __attribute__((always_inline)) void init_MUTEX_LOCKED(struct semaphore *sem)
3559 {
3560 sema_init(sem, 0);
3561 }
3562
3563
3564
3565
3566 void __down_failed(void);
3567 int __down_interruptible_failed(void);
3568 int __down_trylock_failed(void);
3569 void __up_wakeup(void);
3570
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);
3575
3576
3577
3578
3579
3580 static inline __attribute__((always_inline)) void down(struct semaphore * sem)
3581 {
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"); });
3584 }
3585
3586
3587
3588
3589
3590 static inline __attribute__((always_inline)) int down_interruptible (struct semaphore * sem)
3591 {
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; });
3594 }
3595
3596 static inline __attribute__((always_inline)) int down_trylock(struct semaphore *sem)
3597 {
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; });
3599 }
3600
3601
3602
3603
3604
3605
3606
3607 static inline __attribute__((always_inline)) void up(struct semaphore * sem)
3608 {
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"); });
3610 }
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);
3621 };
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);
3626
3627
3628
3629
3630
3631
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;
3640
3641
3642
3643 # 1 "include/asm/memory.h" 1
3644 # 27 "include/asm/memory.h"
3645 # 1 "include/asm/arch/memory.h" 1
3646
3647
3648
3649 # 1 "include/linux/config.h" 1
3650
3651
3652
3653
3654
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)
3663 {
3664 return (((unsigned long)(x)) - (0x40000000UL) + (0x00000000UL));
3665 }
3666
3667 static inline __attribute__((always_inline)) void *phys_to_virt(unsigned long x)
3668 {
3669 return (void *)((((unsigned long)(x)) - (0x00000000UL) + (0x40000000UL)));
3670 }
3671 # 191 "include/asm/memory.h"
3672 static inline __attribute__((always_inline)) __attribute__((deprecated)) unsigned long virt_to_bus(void *x)
3673 {
3674 return ((((unsigned long)x) - (0x40000000UL) + (0x00000000UL)));
3675 }
3676
3677 static inline __attribute__((always_inline)) __attribute__((deprecated)) void *bus_to_virt(unsigned long x)
3678 {
3679 return (void *)(((x) - (0x00000000UL) + (0x40000000UL)));
3680 }
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)
3689 {
3690 int order;
3691
3692 size = (size - 1) >> (12 - 1);
3693 order = -1;
3694 do {
3695 size >>= 1;
3696 order++;
3697 } while (size);
3698 return order;
3699 }
3700 # 197 "include/asm/page.h" 2
3701 # 59 "include/linux/sched.h" 2
3702
3703 # 1 "include/asm/mmu.h" 1
3704
3705
3706
3707
3708
3709 typedef struct {
3710
3711
3712
3713 unsigned int kvm_seq;
3714 } mm_context_t;
3715 # 61 "include/linux/sched.h" 2
3716 # 1 "include/asm/cputime.h" 1
3717
3718
3719
3720 # 1 "include/asm-generic/cputime.h" 1
3721
3722
3723
3724
3725
3726
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
3732
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)
3738 {
3739 return 0;
3740 }
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
3747
3748
3749
3750 # 1 "include/linux/ipc.h" 1
3751 # 9 "include/linux/ipc.h"
3752 struct ipc_perm
3753 {
3754 __kernel_key_t key;
3755 __kernel_uid_t uid;
3756 __kernel_gid_t gid;
3757 __kernel_uid_t cuid;
3758 __kernel_gid_t cgid;
3759 __kernel_mode_t mode;
3760 unsigned short seq;
3761 };
3762
3763
3764 # 1 "include/asm/ipcbuf.h" 1
3765 # 14 "include/asm/ipcbuf.h"
3766 struct ipc64_perm
3767 {
3768 __kernel_key_t key;
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;
3775 unsigned short seq;
3776 unsigned short __pad2;
3777 unsigned long __unused1;
3778 unsigned long __unused2;
3779 };
3780 # 22 "include/linux/ipc.h" 2
3781 # 57 "include/linux/ipc.h"
3782 struct kern_ipc_perm
3783 {
3784 spinlock_t lock;
3785 int deleted;
3786 key_t key;
3787 uid_t uid;
3788 gid_t gid;
3789 uid_t cuid;
3790 gid_t cgid;
3791 mode_t mode;
3792 unsigned long seq;
3793 void *security;
3794 };
3795 # 5 "include/linux/sem.h" 2
3796 # 23 "include/linux/sem.h"
3797 struct semid_ds {
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;
3806 };
3807
3808
3809 # 1 "include/asm/sembuf.h" 1
3810 # 14 "include/asm/sembuf.h"
3811 struct semid64_ds {
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;
3820 };
3821 # 36 "include/linux/sem.h" 2
3822
3823
3824 struct sembuf {
3825 unsigned short sem_num;
3826 short sem_op;
3827 short sem_flg;
3828 };
3829
3830
3831 union semun {
3832 int val;
3833 struct semid_ds *buf;
3834 unsigned short *array;
3835 struct seminfo *__buf;
3836 void *__pad;
3837 };
3838
3839 struct seminfo {
3840 int semmap;
3841 int semmni;
3842 int semmns;
3843 int semmnu;
3844 int semmsl;
3845 int semopm;
3846 int semume;
3847 int semusz;
3848 int semvmx;
3849 int semaem;
3850 };
3851 # 82 "include/linux/sem.h"
3852 struct task_struct;
3853
3854
3855 struct sem {
3856 int semval;
3857 int sempid;
3858 };
3859
3860
3861 struct sem_array {
3862 struct kern_ipc_perm sem_perm;
3863 int sem_id;
3864 time_t sem_otime;
3865 time_t sem_ctime;
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;
3871 };
3872
3873
3874 struct sem_queue {
3875 struct sem_queue * next;
3876 struct sem_queue ** prev;
3877 struct task_struct* sleeper;
3878 struct sem_undo * undo;
3879 int pid;
3880 int status;
3881 struct sem_array * sma;
3882 int id;
3883 struct sembuf * sops;
3884 int nsops;
3885 int alter;
3886 };
3887
3888
3889
3890
3891 struct sem_undo {
3892 struct sem_undo * proc_next;
3893 struct sem_undo * id_next;
3894 int semid;
3895 short * semadj;
3896 };
3897
3898
3899
3900
3901 struct sem_undo_list {
3902 atomic_t refcnt;
3903 spinlock_t lock;
3904 struct sem_undo *proc_list;
3905 };
3906
3907 struct sysv_sem {
3908 struct sem_undo_list *undo_list;
3909 };
3910
3911
3912
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
3917
3918
3919
3920 # 1 "include/asm/signal.h" 1
3921
3922
3923
3924
3925
3926
3927 struct siginfo;
3928 # 17 "include/asm/signal.h"
3929 typedef unsigned long old_sigset_t;
3930
3931 typedef struct {
3932 unsigned long sig[(64 / 32)];
3933 } sigset_t;
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;
3939
3940 typedef void __restorefn_t(void);
3941 typedef __restorefn_t *__sigrestore_t;
3942 # 115 "include/asm/signal.h" 2
3943
3944
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;
3950 };
3951
3952 struct sigaction {
3953 __sighandler_t sa_handler;
3954 unsigned long sa_flags;
3955 __sigrestore_t sa_restorer;
3956 sigset_t sa_mask;
3957 };
3958
3959 struct k_sigaction {
3960 struct sigaction sa;
3961 };
3962 # 153 "include/asm/signal.h"
3963 typedef struct sigaltstack {
3964 void *ss_sp;
3965 int ss_flags;
3966 size_t ss_size;
3967 } stack_t;
3968
3969
3970 # 1 "include/asm/sigcontext.h" 1
3971 # 9 "include/asm/sigcontext.h"
3972 struct sigcontext {
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;
3994 };
3995 # 161 "include/asm/signal.h" 2
3996 # 5 "include/linux/signal.h" 2
3997 # 1 "include/asm/siginfo.h" 1
3998
3999
4000
4001 # 1 "include/asm-generic/siginfo.h" 1
4002
4003
4004
4005
4006
4007
4008 typedef union sigval {
4009 int sival_int;
4010 void *sival_ptr;
4011 } sigval_t;
4012 # 40 "include/asm-generic/siginfo.h"
4013 typedef struct siginfo {
4014 int si_signo;
4015 int si_errno;
4016 int si_code;
4017
4018 union {
4019 int _pad[((128 - (3 * sizeof(int))) / sizeof(int))];
4020
4021
4022 struct {
4023 pid_t _pid;
4024 uid_t _uid;
4025 } _kill;
4026
4027
4028 struct {
4029 timer_t _tid;
4030 int _overrun;
4031 char _pad[sizeof( uid_t) - sizeof(int)];
4032 sigval_t _sigval;
4033 int _sys_private;
4034 } _timer;
4035
4036
4037 struct {
4038 pid_t _pid;
4039 uid_t _uid;
4040 sigval_t _sigval;
4041 } _rt;
4042
4043
4044 struct {
4045 pid_t _pid;
4046 uid_t _uid;
4047 int _status;
4048 clock_t _utime;
4049 clock_t _stime;
4050 } _sigchld;
4051
4052
4053 struct {
4054 void *_addr;
4055
4056
4057
4058 } _sigfault;
4059
4060
4061 struct {
4062 long _band;
4063 int _fd;
4064 } _sigpoll;
4065 } _sifields;
4066 } siginfo_t;
4067 # 251 "include/asm-generic/siginfo.h"
4068 typedef struct sigevent {
4069 sigval_t sigev_value;
4070 int sigev_signo;
4071 int sigev_notify;
4072 union {
4073 int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))];
4074 int _tid;
4075
4076 struct {
4077 void (*_function)(sigval_t);
4078 void *_attribute;
4079 } _sigev_thread;
4080 } _sigev_un;
4081 } sigevent_t;
4082
4083
4084
4085
4086
4087
4088
4089 struct siginfo;
4090 void do_schedule_next_timer(struct siginfo *info);
4091
4092
4093
4094
4095
4096 static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from)
4097 {
4098 if (from->si_code < 0)
4099 memcpy(to, from, sizeof(*to));
4100 else
4101
4102 memcpy(to, from, (3 * sizeof(int)) + sizeof(from->_sifields._sigchld));
4103 }
4104
4105
4106
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"
4111 struct sigqueue {
4112 struct list_head list;
4113 int flags;
4114 siginfo_t info;
4115 struct user_struct *user;
4116 };
4117
4118
4119
4120
4121 struct sigpending {
4122 struct list_head list;
4123 sigset_t signal;
4124 };
4125 # 39 "include/linux/signal.h"
4126 static inline __attribute__((always_inline)) void sigaddset(sigset_t *set, int _sig)
4127 {
4128 unsigned long sig = _sig - 1;
4129 if ((64 / 32) == 1)
4130 set->sig[0] |= 1UL << sig;
4131 else
4132 set->sig[sig / 32] |= 1UL << (sig % 32);
4133 }
4134
4135 static inline __attribute__((always_inline)) void sigdelset(sigset_t *set, int _sig)
4136 {
4137 unsigned long sig = _sig - 1;
4138 if ((64 / 32) == 1)
4139 set->sig[0] &= ~(1UL << sig);
4140 else
4141 set->sig[sig / 32] &= ~(1UL << (sig % 32));
4142 }
4143
4144 static inline __attribute__((always_inline)) int sigismember(sigset_t *set, int _sig)
4145 {
4146 unsigned long sig = _sig - 1;
4147 if ((64 / 32) == 1)
4148 return 1 & (set->sig[0] >> sig);
4149 else
4150 return 1 & (set->sig[sig / 32] >> (sig % 32));
4151 }
4152
4153 static inline __attribute__((always_inline)) int sigfindinword(unsigned long word)
4154 {
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);
4156 }
4157
4158
4159
4160 static inline __attribute__((always_inline)) int sigisemptyset(sigset_t *set)
4161 {
4162 extern void _NSIG_WORDS_is_unsupported_size(void);
4163 switch ((64 / 32)) {
4164 case 4:
4165 return (set->sig[3] | set->sig[2] |
4166 set->sig[1] | set->sig[0]) == 0;
4167 case 2:
4168 return (set->sig[1] | set->sig[0]) == 0;
4169 case 1:
4170 return set->sig[0] == 0;
4171 default:
4172 _NSIG_WORDS_is_unsupported_size();
4173 return 0;
4174 }
4175 }
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(); } }
4178
4179
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(); } }
4181
4182
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(); } }
4186
4187
4188
4189
4190 static inline __attribute__((always_inline)) void sigemptyset(sigset_t *set)
4191 {
4192 switch ((64 / 32)) {
4193 default:
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); });
4195 break;
4196 case 2: set->sig[1] = 0;
4197 case 1: set->sig[0] = 0;
4198 break;
4199 }
4200 }
4201
4202 static inline __attribute__((always_inline)) void sigfillset(sigset_t *set)
4203 {
4204 switch ((64 / 32)) {
4205 default:
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); });
4207 break;
4208 case 2: set->sig[1] = -1;
4209 case 1: set->sig[0] = -1;
4210 break;
4211 }
4212 }
4213
4214
4215
4216 static inline __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask)
4217 {
4218 set->sig[0] |= mask;
4219 }
4220
4221 static inline __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask)
4222 {
4223 set->sig[0] &= ~mask;
4224 }
4225
4226 static inline __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask)
4227 {
4228 return (set->sig[0] & mask) != 0;
4229 }
4230
4231 static inline __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask)
4232 {
4233 set->sig[0] = mask;
4234 switch ((64 / 32)) {
4235 default:
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); });
4237 break;
4238 case 2: set->sig[1] = 0;
4239 case 1: ;
4240 }
4241 }
4242
4243 static inline __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask)
4244 {
4245 set->sig[0] = ~mask;
4246 switch ((64 / 32)) {
4247 default:
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); });
4249 break;
4250 case 2: set->sig[1] = -1;
4251 case 1: ;
4252 }
4253 }
4254
4255
4256
4257 static inline __attribute__((always_inline)) void init_sigpending(struct sigpending *sig)
4258 {
4259 sigemptyset(&sig->signal);
4260 INIT_LIST_HEAD(&sig->list);
4261 }
4262
4263 extern void flush_sigqueue(struct sigpending *queue);
4264
4265
4266 static inline __attribute__((always_inline)) int valid_signal(unsigned long sig)
4267 {
4268 return sig <= 64 ? 1 : 0;
4269 }
4270
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 *);
4275
4276 struct pt_regs;
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
4280
4281
4282
4283
4284
4285 extern unsigned securebits;
4286 # 67 "include/linux/sched.h" 2
4287 # 1 "include/linux/fs_struct.h" 1
4288
4289
4290
4291 struct dentry;
4292 struct vfsmount;
4293
4294 struct fs_struct {
4295 atomic_t count;
4296 rwlock_t lock;
4297 int umask;
4298 struct dentry * root, * pwd, * altroot;
4299 struct vfsmount * rootmnt, * pwdmnt, * altrootmnt;
4300 };
4301
4302
4303
4304
4305
4306
4307
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
4315
4316 # 1 "include/linux/completion.h" 1
4317 # 13 "include/linux/completion.h"
4318 struct completion {
4319 unsigned int done;
4320 wait_queue_head_t wait;
4321 };
4322 # 39 "include/linux/completion.h"
4323 static inline __attribute__((always_inline)) void init_completion(struct completion *x)
4324 {
4325 x->done = 0;
4326 init_waitqueue_head(&x->wait);
4327 }
4328
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);
4332
4333 extern unsigned long wait_for_completion_interruptible_timeout( struct completion *x, unsigned long timeout);
4334
4335
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
4340
4341
4342
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
4347
4348
4349 # 1 "include/linux/percpu.h" 1
4350
4351
4352
4353 # 1 "include/linux/slab.h" 1
4354 # 12 "include/linux/slab.h"
4355 typedef struct kmem_cache kmem_cache_t;
4356
4357 # 1 "include/linux/gfp.h" 1
4358
4359
4360
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);
4367
4368 extern initcall_t __con_initcall_start[], __con_initcall_end[];
4369 extern initcall_t __security_initcall_start[], __security_initcall_end[];
4370
4371
4372 extern char saved_command_line[];
4373
4374
4375 extern void setup_arch(char **);
4376 # 113 "include/linux/init.h"
4377 struct obs_kernel_param {
4378 const char *str;
4379 int (*setup_func)(char *);
4380 int early;
4381 };
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"
4386 struct free_area {
4387 struct list_head free_list;
4388 unsigned long nr_free;
4389 };
4390
4391 struct pglist_data;
4392 # 49 "include/linux/mmzone.h"
4393 enum zone_stat_item {
4394 NR_ANON_PAGES,
4395 NR_FILE_MAPPED,
4396
4397 NR_FILE_PAGES,
4398 NR_SLAB,
4399 NR_PAGETABLE,
4400 NR_FILE_DIRTY,
4401 NR_WRITEBACK,
4402 NR_UNSTABLE_NFS,
4403 NR_BOUNCE,
4404 # 68 "include/linux/mmzone.h"
4405 NR_VM_ZONE_STAT_ITEMS };
4406
4407 struct per_cpu_pages {
4408 int count;
4409 int high;
4410 int batch;
4411 struct list_head list;
4412 };
4413
4414 struct per_cpu_pageset {
4415 struct per_cpu_pages pcp[2];
4416
4417
4418
4419
4420 } ;
4421 # 139 "include/linux/mmzone.h"
4422 struct zone {
4423
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];
4430
4431
4432
4433
4434 spinlock_t lock;
4435
4436
4437
4438
4439 struct free_area free_area[11];
4440
4441
4442
4443
4444
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;
4454
4455
4456 atomic_t reclaim_in_progress;
4457
4458
4459 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
4460 # 208 "include/linux/mmzone.h"
4461 int temp_priority;
4462 int prev_priority;
4463
4464
4465
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;
4470
4471
4472
4473
4474 struct pglist_data *zone_pgdat;
4475
4476 unsigned long zone_start_pfn;
4477 # 260 "include/linux/mmzone.h"
4478 unsigned long spanned_pages;
4479 unsigned long present_pages;
4480
4481
4482
4483
4484 char *name;
4485 } ;
4486 # 288 "include/linux/mmzone.h"
4487 struct zonelist {
4488 struct zone *zones[(1 << 0) * 4 + 1];
4489 };
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)];
4495 int nr_zones;
4496
4497 struct page *node_mem_map;
4498
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;
4504
4505 int node_id;
4506 wait_queue_head_t kswapd_wait;
4507 struct task_struct *kswapd;
4508 int kswapd_max_order;
4509 } pg_data_t;
4510 # 342 "include/linux/mmzone.h"
4511 # 1 "include/linux/memory_hotplug.h" 1
4512
4513
4514
4515 # 1 "include/linux/mmzone.h" 1
4516 # 5 "include/linux/memory_hotplug.h" 2
4517
4518
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"
4523 struct mutex {
4524
4525 atomic_t count;
4526 spinlock_t wait_lock;
4527 struct list_head wait_list;
4528 # 60 "include/linux/mutex.h"
4529 };
4530