initial import
[ICEs.git] / bfin-2630 / ip_output.i.0
1 # 1 "net/ipv4/ip_output.c"
2 # 1 "/usr/local/src/blackfin/svn/linux-kernel/trunk//"
3 # 1 "<built-in>"
4 # 1 "<command line>"
5 # 1 "./include/linux/autoconf.h" 1
6 # 1 "<command line>" 2
7 # 1 "net/ipv4/ip_output.c"
8 # 47 "net/ipv4/ip_output.c"
9 # 1 "include/asm/uaccess.h" 1
10 # 12 "include/asm/uaccess.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 # 40 "include/linux/sched.h"
23 struct sched_param {
24 int sched_priority;
25 };
26
27 # 1 "include/asm/param.h" 1
28 # 45 "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 # 15 "include/linux/stddef.h"
53 enum {
54 false = 0,
55 true = 1
56 };
57 # 5 "include/linux/posix_types.h" 2
58 # 36 "include/linux/posix_types.h"
59 typedef struct {
60 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
61 } __kernel_fd_set;
62
63
64 typedef void (*__kernel_sighandler_t)(int);
65
66
67 typedef int __kernel_key_t;
68 typedef int __kernel_mqd_t;
69
70 # 1 "include/asm/posix_types.h" 1
71 # 10 "include/asm/posix_types.h"
72 typedef unsigned long __kernel_ino_t;
73 typedef unsigned short __kernel_mode_t;
74 typedef unsigned short __kernel_nlink_t;
75 typedef long __kernel_off_t;
76 typedef int __kernel_pid_t;
77 typedef unsigned int __kernel_ipc_pid_t;
78 typedef unsigned int __kernel_uid_t;
79 typedef unsigned int __kernel_gid_t;
80 typedef unsigned long __kernel_size_t;
81 typedef long __kernel_ssize_t;
82 typedef int __kernel_ptrdiff_t;
83 typedef long __kernel_time_t;
84 typedef long __kernel_suseconds_t;
85 typedef long __kernel_clock_t;
86 typedef int __kernel_timer_t;
87 typedef int __kernel_clockid_t;
88 typedef int __kernel_daddr_t;
89 typedef char *__kernel_caddr_t;
90 typedef unsigned short __kernel_uid16_t;
91 typedef unsigned short __kernel_gid16_t;
92 typedef unsigned int __kernel_uid32_t;
93 typedef unsigned int __kernel_gid32_t;
94
95 typedef unsigned short __kernel_old_uid_t;
96 typedef unsigned short __kernel_old_gid_t;
97 typedef unsigned short __kernel_old_dev_t;
98
99
100 typedef long long __kernel_loff_t;
101
102
103 typedef struct {
104
105 int val[2];
106
107
108
109 } __kernel_fsid_t;
110 # 48 "include/linux/posix_types.h" 2
111 # 15 "include/linux/types.h" 2
112 # 1 "include/asm/types.h" 1
113 # 13 "include/asm/types.h"
114 typedef unsigned short umode_t;
115
116
117
118
119
120
121 typedef __signed__ char __s8;
122 typedef unsigned char __u8;
123
124 typedef __signed__ short __s16;
125 typedef unsigned short __u16;
126
127 typedef __signed__ int __s32;
128 typedef unsigned int __u32;
129
130
131
132 typedef __signed__ long long __s64;
133 typedef unsigned long long __u64;
134 # 45 "include/asm/types.h"
135 typedef signed char s8;
136 typedef unsigned char u8;
137
138 typedef signed short s16;
139 typedef unsigned short u16;
140
141 typedef signed int s32;
142 typedef unsigned int u32;
143
144 typedef signed long long s64;
145 typedef unsigned long long u64;
146
147
148
149 typedef u32 dma_addr_t;
150 typedef u64 dma64_addr_t;
151 # 16 "include/linux/types.h" 2
152
153
154
155 typedef __u32 __kernel_dev_t;
156
157 typedef __kernel_fd_set fd_set;
158 typedef __kernel_dev_t dev_t;
159 typedef __kernel_ino_t ino_t;
160 typedef __kernel_mode_t mode_t;
161 typedef __kernel_nlink_t nlink_t;
162 typedef __kernel_off_t off_t;
163 typedef __kernel_pid_t pid_t;
164 typedef __kernel_daddr_t daddr_t;
165 typedef __kernel_key_t key_t;
166 typedef __kernel_suseconds_t suseconds_t;
167 typedef __kernel_timer_t timer_t;
168 typedef __kernel_clockid_t clockid_t;
169 typedef __kernel_mqd_t mqd_t;
170
171
172 typedef _Bool bool;
173
174 typedef __kernel_uid32_t uid_t;
175 typedef __kernel_gid32_t gid_t;
176 typedef __kernel_uid16_t uid16_t;
177 typedef __kernel_gid16_t gid16_t;
178
179
180
181 typedef __kernel_old_uid_t old_uid_t;
182 typedef __kernel_old_gid_t old_gid_t;
183 # 58 "include/linux/types.h"
184 typedef __kernel_loff_t loff_t;
185 # 67 "include/linux/types.h"
186 typedef __kernel_size_t size_t;
187
188
189
190
191 typedef __kernel_ssize_t ssize_t;
192
193
194
195
196 typedef __kernel_ptrdiff_t ptrdiff_t;
197
198
199
200
201 typedef __kernel_time_t time_t;
202
203
204
205
206 typedef __kernel_clock_t clock_t;
207
208
209
210
211 typedef __kernel_caddr_t caddr_t;
212
213
214
215 typedef unsigned char u_char;
216 typedef unsigned short u_short;
217 typedef unsigned int u_int;
218 typedef unsigned long u_long;
219
220
221 typedef unsigned char unchar;
222 typedef unsigned short ushort;
223 typedef unsigned int uint;
224 typedef unsigned long ulong;
225
226
227
228
229 typedef __u8 u_int8_t;
230 typedef __s8 int8_t;
231 typedef __u16 u_int16_t;
232 typedef __s16 int16_t;
233 typedef __u32 u_int32_t;
234 typedef __s32 int32_t;
235
236
237
238 typedef __u8 uint8_t;
239 typedef __u16 uint16_t;
240 typedef __u32 uint32_t;
241
242
243 typedef __u64 uint64_t;
244 typedef __u64 u_int64_t;
245 typedef __s64 int64_t;
246 # 142 "include/linux/types.h"
247 typedef unsigned long sector_t;
248
249
250
251 typedef unsigned long blkcnt_t;
252 # 175 "include/linux/types.h"
253 typedef __u16 __le16;
254 typedef __u16 __be16;
255 typedef __u32 __le32;
256 typedef __u32 __be32;
257
258 typedef __u64 __le64;
259 typedef __u64 __be64;
260
261
262
263 typedef unsigned gfp_t;
264
265
266
267
268 typedef u32 resource_size_t;
269
270
271
272
273 struct ustat {
274 __kernel_daddr_t f_tfree;
275 __kernel_ino_t f_tinode;
276 char f_fname[6];
277 char f_fpack[6];
278 };
279 # 17 "include/linux/capability.h" 2
280 # 32 "include/linux/capability.h"
281 typedef struct __user_cap_header_struct {
282 __u32 version;
283 int pid;
284 } *cap_user_header_t;
285
286 typedef struct __user_cap_data_struct {
287 __u32 effective;
288 __u32 permitted;
289 __u32 inheritable;
290 } *cap_user_data_t;
291
292
293
294 # 1 "include/linux/spinlock.h" 1
295 # 49 "include/linux/spinlock.h"
296 # 1 "include/linux/preempt.h" 1
297 # 9 "include/linux/preempt.h"
298 # 1 "include/linux/thread_info.h" 1
299 # 13 "include/linux/thread_info.h"
300 struct restart_block {
301 long (*fn)(struct restart_block *);
302 unsigned long arg0, arg1, arg2, arg3;
303 };
304
305 extern long do_no_restart_syscall(struct restart_block *parm);
306
307 # 1 "include/linux/bitops.h" 1
308 # 9 "include/linux/bitops.h"
309 # 1 "include/asm/bitops.h" 1
310 # 9 "include/asm/bitops.h"
311 # 1 "include/asm/byteorder.h" 1
312 # 9 "include/asm/byteorder.h"
313 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swahb32(__u32 xx)
314 {
315 __u32 tmp;
316 __asm__("%1 = %0 >> 8 (V);\n\t"
317 "%0 = %0 << 8 (V);\n\t"
318 "%0 = %0 | %1;\n\t"
319 : "+d"(xx), "=&d"(tmp));
320 return xx;
321 }
322
323 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swahw32(__u32 xx)
324 {
325 __u32 rv;
326 __asm__("%0 = PACK(%1.L, %1.H);\n\t": "=d"(rv): "d"(xx));
327 return rv;
328 }
329
330
331
332
333
334 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 ___arch__swab16(__u16 xx)
335 {
336 __u32 xw = xx;
337 __asm__("%0 <<= 8;\n %0.L = %0.L + %0.H (NS);\n": "+d"(xw));
338 return (__u16)xw;
339 }
340 # 46 "include/asm/byteorder.h"
341 # 1 "include/linux/byteorder/little_endian.h" 1
342 # 12 "include/linux/byteorder/little_endian.h"
343 # 1 "include/linux/byteorder/swab.h" 1
344 # 133 "include/linux/byteorder/swab.h"
345 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 x)
346 {
347 return ___arch__swab16(x);
348 }
349 static __inline__ __attribute__((always_inline)) __u16 __swab16p(const __u16 *x)
350 {
351 return ___arch__swab16(*(x));
352 }
353 static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr)
354 {
355 do { *(addr) = ___arch__swab16(*((addr))); } while (0);
356 }
357
358 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 x)
359 {
360 return ___arch__swahb32(___arch__swahw32(x));
361 }
362 static __inline__ __attribute__((always_inline)) __u32 __swab32p(const __u32 *x)
363 {
364 return ___arch__swahb32(___arch__swahw32(*(x)));
365 }
366 static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr)
367 {
368 do { *(addr) = ___arch__swahb32(___arch__swahw32(*((addr)))); } while (0);
369 }
370
371
372 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 x)
373 {
374
375 __u32 h = x >> 32;
376 __u32 l = x & ((1ULL<<32)-1);
377 return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));
378
379
380
381 }
382 static __inline__ __attribute__((always_inline)) __u64 __swab64p(const __u64 *x)
383 {
384 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) )); }); });
385 }
386 static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr)
387 {
388 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);
389 }
390 # 13 "include/linux/byteorder/little_endian.h" 2
391 # 43 "include/linux/byteorder/little_endian.h"
392 static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p)
393 {
394 return ( __le64)*p;
395 }
396 static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p)
397 {
398 return ( __u64)*p;
399 }
400 static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p)
401 {
402 return ( __le32)*p;
403 }
404 static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p)
405 {
406 return ( __u32)*p;
407 }
408 static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p)
409 {
410 return ( __le16)*p;
411 }
412 static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p)
413 {
414 return ( __u16)*p;
415 }
416 static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p)
417 {
418 return ( __be64)__swab64p(p);
419 }
420 static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p)
421 {
422 return __swab64p((__u64 *)p);
423 }
424 static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p)
425 {
426 return ( __be32)__swab32p(p);
427 }
428 static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p)
429 {
430 return __swab32p((__u32 *)p);
431 }
432 static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p)
433 {
434 return ( __be16)__swab16p(p);
435 }
436 static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p)
437 {
438 return __swab16p((__u16 *)p);
439 }
440 # 104 "include/linux/byteorder/little_endian.h"
441 # 1 "include/linux/byteorder/generic.h" 1
442 # 154 "include/linux/byteorder/generic.h"
443 extern __u32 ntohl(__be32);
444 extern __be32 htonl(__u32);
445 extern __u16 ntohs(__be16);
446 extern __be16 htons(__u16);
447 # 105 "include/linux/byteorder/little_endian.h" 2
448 # 47 "include/asm/byteorder.h" 2
449 # 10 "include/asm/bitops.h" 2
450 # 1 "include/asm/system.h" 1
451 # 40 "include/asm/system.h"
452 # 1 "include/linux/linkage.h" 1
453
454
455
456 # 1 "include/asm/linkage.h" 1
457 # 5 "include/linux/linkage.h" 2
458 # 41 "include/asm/system.h" 2
459
460
461
462
463
464
465 extern unsigned long irq_flags;
466 # 146 "include/asm/system.h"
467 struct __xchg_dummy {
468 unsigned long a[100];
469 };
470
471
472 static inline __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void *ptr,
473 int size)
474 {
475 unsigned long tmp = 0;
476 unsigned long flags = 0;
477
478 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
479
480 switch (size) {
481 case 1:
482 __asm__ __volatile__
483 ("%0 = b%2 (z);\n\t"
484 "b%2 = %1;\n\t"
485 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
486 break;
487 case 2:
488 __asm__ __volatile__
489 ("%0 = w%2 (z);\n\t"
490 "w%2 = %1;\n\t"
491 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
492 break;
493 case 4:
494 __asm__ __volatile__
495 ("%0 = %2;\n\t"
496 "%2 = %1;\n\t"
497 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
498 break;
499 }
500 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
501 return tmp;
502 }
503
504
505
506
507
508
509 static inline __attribute__((always_inline)) unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
510 unsigned long new, int size)
511 {
512 unsigned long tmp = 0;
513 unsigned long flags = 0;
514
515 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
516
517 switch (size) {
518 case 1:
519 __asm__ __volatile__
520 ("%0 = b%3 (z);\n\t"
521 "CC = %1 == %0;\n\t"
522 "IF !CC JUMP 1f;\n\t"
523 "b%3 = %2;\n\t"
524 "1:\n\t"
525 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
526 break;
527 case 2:
528 __asm__ __volatile__
529 ("%0 = w%3 (z);\n\t"
530 "CC = %1 == %0;\n\t"
531 "IF !CC JUMP 1f;\n\t"
532 "w%3 = %2;\n\t"
533 "1:\n\t"
534 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
535 break;
536 case 4:
537 __asm__ __volatile__
538 ("%0 = %3;\n\t"
539 "CC = %1 == %0;\n\t"
540 "IF !CC JUMP 1f;\n\t"
541 "%3 = %2;\n\t"
542 "1:\n\t"
543 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
544 break;
545 }
546 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
547 return tmp;
548 }
549 # 240 "include/asm/system.h"
550 # 1 "include/asm/blackfin.h" 1
551 # 9 "include/asm/blackfin.h"
552 # 1 "include/asm/macros.h" 1
553 # 10 "include/asm/blackfin.h" 2
554 # 1 "include/asm/mach/blackfin.h" 1
555 # 37 "include/asm/mach/blackfin.h"
556 # 1 "include/asm/mach/bf537.h" 1
557 # 35 "include/asm/mach/bf537.h"
558 # 1 "include/linux/config.h" 1
559
560
561
562
563
564 # 1 "include/linux/autoconf.h" 1
565 # 7 "include/linux/config.h" 2
566 # 36 "include/asm/mach/bf537.h" 2
567 # 38 "include/asm/mach/blackfin.h" 2
568 # 1 "include/asm/mach/mem_map.h" 1
569 # 39 "include/asm/mach/blackfin.h" 2
570 # 1 "include/asm/mach/defBF534.h" 1
571 # 36 "include/asm/mach/defBF534.h"
572 # 1 "include/asm/mach-common/def_LPBlackfin.h" 1
573 # 37 "include/asm/mach-common/def_LPBlackfin.h"
574 # 1 "include/asm/mach/anomaly.h" 1
575 # 38 "include/asm/mach-common/def_LPBlackfin.h" 2
576 # 37 "include/asm/mach/defBF534.h" 2
577 # 40 "include/asm/mach/blackfin.h" 2
578 # 1 "include/asm/mach/anomaly.h" 1
579 # 41 "include/asm/mach/blackfin.h" 2
580
581
582 # 1 "include/asm/mach/defBF537.h" 1
583 # 36 "include/asm/mach/defBF537.h"
584 # 1 "include/asm/mach/defBF537.h" 1
585 # 37 "include/asm/mach/defBF537.h" 2
586
587
588 # 1 "include/asm/mach-common/cdef_LPBlackfin.h" 1
589 # 40 "include/asm/mach/defBF537.h" 2
590 # 44 "include/asm/mach/blackfin.h" 2
591
592
593
594 # 1 "include/asm/mach/cdefBF534.h" 1
595 # 41 "include/asm/mach/cdefBF534.h"
596 # 1 "include/asm/system.h" 1
597 # 42 "include/asm/mach/cdefBF534.h" 2
598 # 50 "include/asm/mach/cdefBF534.h"
599 static __inline__ __attribute__((always_inline)) void bfin_write_VR_CTL(unsigned int val)
600 {
601 unsigned long flags, iwr;
602
603 ({ __asm__ __volatile__ ( "w[%0] = %1;\n\t" : : "a"(0xFFC00008) , "d"(val) : "memory");});
604 __builtin_bfin_ssync();
605
606 iwr = ({ unsigned __v; __asm__ __volatile__ ( "%0 = [%1];\n\t" : "=d"(__v) : "a"(0xFFC00124)); __v; });
607
608 ({ __asm__ __volatile__ ( "[%0] = %1;\n\t" : : "a"(0xFFC00124) , "d"((1 << ((0)&0x1F))) : "memory");});
609 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
610 asm("IDLE;");
611 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
612 ({ __asm__ __volatile__ ( "[%0] = %1;\n\t" : : "a"(0xFFC00124) , "d"(iwr) : "memory");});
613 }
614 # 48 "include/asm/mach/blackfin.h" 2
615 # 74 "include/asm/mach/blackfin.h"
616 # 1 "include/asm/mach/cdefBF537.h" 1
617 # 75 "include/asm/mach/blackfin.h" 2
618 # 11 "include/asm/blackfin.h" 2
619 # 1 "include/asm/bfin-global.h" 1
620 # 36 "include/asm/bfin-global.h"
621 # 1 "include/asm-generic/sections.h" 1
622
623
624
625
626
627 extern char _text[], _stext[], _etext[];
628 extern char _data[], _sdata[], _edata[];
629 extern char __bss_start[], __bss_stop[];
630 extern char __init_begin[], __init_end[];
631 extern char _sinittext[], _einittext[];
632 extern char _sextratext[] __attribute__((weak));
633 extern char _eextratext[] __attribute__((weak));
634 extern char _end[];
635 extern char __per_cpu_start[], __per_cpu_end[];
636 extern char __kprobes_text_start[], __kprobes_text_end[];
637 extern char __initdata_begin[], __initdata_end[];
638 extern char __start_rodata[], __end_rodata[];
639 # 37 "include/asm/bfin-global.h" 2
640 # 1 "include/asm/ptrace.h" 1
641 # 24 "include/asm/ptrace.h"
642 struct pt_regs {
643 long orig_pc;
644 long ipend;
645 long seqstat;
646 long rete;
647 long retn;
648 long retx;
649 long pc;
650 long rets;
651 long reserved;
652 long astat;
653 long lb1;
654 long lb0;
655 long lt1;
656 long lt0;
657 long lc1;
658 long lc0;
659 long a1w;
660 long a1x;
661 long a0w;
662 long a0x;
663 long b3;
664 long b2;
665 long b1;
666 long b0;
667 long l3;
668 long l2;
669 long l1;
670 long l0;
671 long m3;
672 long m2;
673 long m1;
674 long m0;
675 long i3;
676 long i2;
677 long i1;
678 long i0;
679 long usp;
680 long fp;
681 long p5;
682 long p4;
683 long p3;
684 long p2;
685 long p1;
686 long p0;
687 long r7;
688 long r6;
689 long r5;
690 long r4;
691 long r3;
692 long r2;
693 long r1;
694 long r0;
695 long orig_r0;
696 long orig_p0;
697 long syscfg;
698 };
699 # 99 "include/asm/ptrace.h"
700 extern void show_regs(struct pt_regs *);
701 # 38 "include/asm/bfin-global.h" 2
702 # 1 "include/asm/user.h" 1
703 # 10 "include/asm/user.h"
704 # 1 "include/asm/page.h" 1
705 # 12 "include/asm/page.h"
706 # 1 "include/asm/setup.h" 1
707 # 13 "include/asm/page.h" 2
708 # 28 "include/asm/page.h"
709 typedef struct {
710 unsigned long pte;
711 } pte_t;
712 typedef struct {
713 unsigned long pmd[16];
714 } pmd_t;
715 typedef struct {
716 unsigned long pgd;
717 } pgd_t;
718 typedef struct {
719 unsigned long pgprot;
720 } pgprot_t;
721 # 54 "include/asm/page.h"
722 extern unsigned long memory_start;
723 extern unsigned long memory_end;
724
725
726
727 # 1 "include/asm/page_offset.h" 1
728 # 60 "include/asm/page.h" 2
729 # 1 "include/asm/io.h" 1
730 # 97 "include/asm/io.h"
731 extern void outsb(void *port, const void *addr, unsigned long count);
732 extern void outsw(void *port, const void *addr, unsigned long count);
733 extern void outsl(void *port, const void *addr, unsigned long count);
734
735 extern void insb(const void *port, void *addr, unsigned long count);
736 extern void insw(const void *port, void *addr, unsigned long count);
737 extern void insl(const void *port, void *addr, unsigned long count);
738
739 extern void *__ioremap(unsigned long physaddr, unsigned long size,
740 int cacheflag);
741 extern void iounmap(void *addr);
742
743 static inline __attribute__((always_inline)) void *ioremap(unsigned long physaddr, unsigned long size)
744 {
745 return __ioremap(physaddr, size, 1);
746 }
747 static inline __attribute__((always_inline)) void *ioremap_nocache(unsigned long physaddr,
748 unsigned long size)
749 {
750 return __ioremap(physaddr, size, 1);
751 }
752
753 extern void blkfin_inv_cache_all(void);
754 # 61 "include/asm/page.h" 2
755 # 84 "include/asm/page.h"
756 # 1 "include/asm-generic/page.h" 1
757 # 10 "include/asm-generic/page.h"
758 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) int get_order(unsigned long size)
759 {
760 int order;
761
762 size = (size - 1) >> (12 - 1);
763 order = -1;
764 do {
765 size >>= 1;
766 order++;
767 } while (size);
768 return order;
769 }
770 # 85 "include/asm/page.h" 2
771 # 11 "include/asm/user.h" 2
772 # 38 "include/asm/user.h"
773 struct user_bfinfp_struct {
774 };
775
776
777
778
779 struct user_regs_struct {
780 long r0, r1, r2, r3, r4, r5, r6, r7;
781 long p0, p1, p2, p3, p4, p5, usp, fp;
782 long i0, i1, i2, i3;
783 long l0, l1, l2, l3;
784 long b0, b1, b2, b3;
785 long m0, m1, m2, m3;
786 long a0w, a1w;
787 long a0x, a1x;
788 unsigned long rets;
789 unsigned long astat;
790 unsigned long pc;
791 unsigned long orig_p0;
792 };
793
794
795
796
797
798 struct user {
799
800
801
802 struct user_regs_struct regs;
803
804
805 unsigned long int u_tsize;
806 unsigned long int u_dsize;
807 unsigned long int u_ssize;
808 unsigned long start_code;
809 unsigned long start_stack;
810
811
812
813 long int signal;
814 int reserved;
815 struct user_regs_struct *u_ar0;
816
817
818 unsigned long magic;
819 char u_comm[32];
820 };
821 # 39 "include/asm/bfin-global.h" 2
822 # 49 "include/asm/bfin-global.h"
823 extern unsigned long get_cclk(void);
824 extern unsigned long get_sclk(void);
825
826 extern void dump_thread(struct pt_regs *regs, struct user *dump);
827 extern void dump_bfin_regs(struct pt_regs *fp, void *retaddr);
828 extern void dump_bfin_trace_buffer(void);
829
830 extern int init_arch_irq(void);
831 extern void bfin_reset(void);
832 extern void _cplb_hdr(void);
833
834 extern void bfin_icache_init(void);
835 extern void bfin_dcache_init(void);
836 extern int read_iloc(void);
837 extern int bfin_console_init(void);
838 extern void lower_to_irq14(void);
839 extern void init_dma(void);
840 extern void program_IAR(void);
841 extern void evt14_softirq(void);
842 extern void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
843 extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type);
844
845 extern void *l1_data_A_sram_alloc(size_t);
846 extern void *l1_data_B_sram_alloc(size_t);
847 extern void *l1_inst_sram_alloc(size_t);
848 extern void *l1_data_sram_zalloc(size_t);
849 extern int l1_data_A_sram_free(const void*);
850 extern int l1_data_B_sram_free(const void*);
851 extern int l1_inst_sram_free(const void*);
852 extern int l1_data_sram_free(const void*);
853 extern int sram_free(const void*);
854
855
856
857
858
859 extern void *sram_alloc_with_lsl(size_t, unsigned long);
860 extern int sram_free_with_lsl(const void*);
861
862 extern void led_on(int);
863 extern void led_off(int);
864 extern void led_toggle(int);
865 extern void led_disp_num(int);
866 extern void led_toggle_num(int);
867
868 extern char *bfin_board_name __attribute__ ((weak));
869 extern unsigned long wall_jiffies;
870 extern unsigned long memory_end;
871 extern unsigned long memory_mtd_end;
872 extern unsigned long memory_mtd_start;
873 extern unsigned long mtd_size;
874 extern unsigned long ipdt_table[];
875 extern unsigned long dpdt_table[];
876 extern unsigned long icplb_table[];
877 extern unsigned long dcplb_table[];
878
879 extern unsigned long ipdt_swapcount_table[];
880 extern unsigned long dpdt_swapcount_table[];
881
882 extern unsigned long table_start, table_end;
883
884 extern struct file_operations dpmc_fops;
885 extern char _start;
886 extern unsigned long _ramstart, _ramend, _rambase;
887 extern unsigned long memory_start, memory_end;
888 extern unsigned long memory_mtd_end;
889 extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
890 _ebss_l1[], _l1_lma_start[];
891 # 12 "include/asm/blackfin.h" 2
892 # 241 "include/asm/system.h" 2
893
894 struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
895 # 11 "include/asm/bitops.h" 2
896
897
898
899 # 1 "include/asm-generic/bitops/ffs.h" 1
900 # 12 "include/asm-generic/bitops/ffs.h"
901 static inline __attribute__((always_inline)) int ffs(int x)
902 {
903 int r = 1;
904
905 if (!x)
906 return 0;
907 if (!(x & 0xffff)) {
908 x >>= 16;
909 r += 16;
910 }
911 if (!(x & 0xff)) {
912 x >>= 8;
913 r += 8;
914 }
915 if (!(x & 0xf)) {
916 x >>= 4;
917 r += 4;
918 }
919 if (!(x & 3)) {
920 x >>= 2;
921 r += 2;
922 }
923 if (!(x & 1)) {
924 x >>= 1;
925 r += 1;
926 }
927 return r;
928 }
929 # 15 "include/asm/bitops.h" 2
930 # 1 "include/asm-generic/bitops/__ffs.h" 1
931 # 12 "include/asm-generic/bitops/__ffs.h"
932 static inline __attribute__((always_inline)) unsigned long __ffs(unsigned long word)
933 {
934 int num = 0;
935
936
937
938
939
940
941
942 if ((word & 0xffff) == 0) {
943 num += 16;
944 word >>= 16;
945 }
946 if ((word & 0xff) == 0) {
947 num += 8;
948 word >>= 8;
949 }
950 if ((word & 0xf) == 0) {
951 num += 4;
952 word >>= 4;
953 }
954 if ((word & 0x3) == 0) {
955 num += 2;
956 word >>= 2;
957 }
958 if ((word & 0x1) == 0)
959 num += 1;
960 return num;
961 }
962 # 16 "include/asm/bitops.h" 2
963 # 1 "include/asm-generic/bitops/sched.h" 1
964 # 13 "include/asm-generic/bitops/sched.h"
965 static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b)
966 {
967
968
969
970
971
972
973
974 if (__builtin_expect(!!(b[0]), 0))
975 return __ffs(b[0]);
976 if (__builtin_expect(!!(b[1]), 0))
977 return __ffs(b[1]) + 32;
978 if (__builtin_expect(!!(b[2]), 0))
979 return __ffs(b[2]) + 64;
980 if (b[3])
981 return __ffs(b[3]) + 96;
982 return __ffs(b[4]) + 128;
983
984
985
986 }
987 # 17 "include/asm/bitops.h" 2
988 # 1 "include/asm-generic/bitops/ffz.h" 1
989 # 18 "include/asm/bitops.h" 2
990
991 static __inline__ __attribute__((always_inline)) void set_bit(int nr, volatile unsigned long *addr)
992 {
993 int *a = (int *)addr;
994 int mask;
995 unsigned long flags;
996
997 a += nr >> 5;
998 mask = 1 << (nr & 0x1f);
999 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1000 *a |= mask;
1001 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1002 }
1003
1004 static __inline__ __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long *addr)
1005 {
1006 int *a = (int *)addr;
1007 int mask;
1008
1009 a += nr >> 5;
1010 mask = 1 << (nr & 0x1f);
1011 *a |= mask;
1012 }
1013
1014
1015
1016
1017
1018
1019
1020 static __inline__ __attribute__((always_inline)) void clear_bit(int nr, volatile unsigned long *addr)
1021 {
1022 int *a = (int *)addr;
1023 int mask;
1024 unsigned long flags;
1025 a += nr >> 5;
1026 mask = 1 << (nr & 0x1f);
1027 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1028 *a &= ~mask;
1029 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1030 }
1031
1032 static __inline__ __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *addr)
1033 {
1034 int *a = (int *)addr;
1035 int mask;
1036
1037 a += nr >> 5;
1038 mask = 1 << (nr & 0x1f);
1039 *a &= ~mask;
1040 }
1041
1042 static __inline__ __attribute__((always_inline)) void change_bit(int nr, volatile unsigned long *addr)
1043 {
1044 int mask, flags;
1045 unsigned long *ADDR = (unsigned long *)addr;
1046
1047 ADDR += nr >> 5;
1048 mask = 1 << (nr & 31);
1049 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1050 *ADDR ^= mask;
1051 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1052 }
1053
1054 static __inline__ __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *addr)
1055 {
1056 int mask;
1057 unsigned long *ADDR = (unsigned long *)addr;
1058
1059 ADDR += nr >> 5;
1060 mask = 1 << (nr & 31);
1061 *ADDR ^= mask;
1062 }
1063
1064 static __inline__ __attribute__((always_inline)) int test_and_set_bit(int nr, void *addr)
1065 {
1066 int mask, retval;
1067 volatile unsigned int *a = (volatile unsigned int *)addr;
1068 unsigned long flags;
1069
1070 a += nr >> 5;
1071 mask = 1 << (nr & 0x1f);
1072 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1073 retval = (mask & *a) != 0;
1074 *a |= mask;
1075 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1076
1077 return retval;
1078 }
1079
1080 static __inline__ __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long *addr)
1081 {
1082 int mask, retval;
1083 volatile unsigned int *a = (volatile unsigned int *)addr;
1084
1085 a += nr >> 5;
1086 mask = 1 << (nr & 0x1f);
1087 retval = (mask & *a) != 0;
1088 *a |= mask;
1089 return retval;
1090 }
1091
1092 static __inline__ __attribute__((always_inline)) int test_and_clear_bit(int nr, volatile unsigned long *addr)
1093 {
1094 int mask, retval;
1095 volatile unsigned int *a = (volatile unsigned int *)addr;
1096 unsigned long flags;
1097
1098 a += nr >> 5;
1099 mask = 1 << (nr & 0x1f);
1100 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1101 retval = (mask & *a) != 0;
1102 *a &= ~mask;
1103 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1104
1105 return retval;
1106 }
1107
1108 static __inline__ __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *addr)
1109 {
1110 int mask, retval;
1111 volatile unsigned int *a = (volatile unsigned int *)addr;
1112
1113 a += nr >> 5;
1114 mask = 1 << (nr & 0x1f);
1115 retval = (mask & *a) != 0;
1116 *a &= ~mask;
1117 return retval;
1118 }
1119
1120 static __inline__ __attribute__((always_inline)) int test_and_change_bit(int nr, volatile unsigned long *addr)
1121 {
1122 int mask, retval;
1123 volatile unsigned int *a = (volatile unsigned int *)addr;
1124 unsigned long flags;
1125
1126 a += nr >> 5;
1127 mask = 1 << (nr & 0x1f);
1128 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1129 retval = (mask & *a) != 0;
1130 *a ^= mask;
1131 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1132 return retval;
1133 }
1134
1135 static __inline__ __attribute__((always_inline)) int __test_and_change_bit(int nr,
1136 volatile unsigned long *addr)
1137 {
1138 int mask, retval;
1139 volatile unsigned int *a = (volatile unsigned int *)addr;
1140
1141 a += nr >> 5;
1142 mask = 1 << (nr & 0x1f);
1143 retval = (mask & *a) != 0;
1144 *a ^= mask;
1145 return retval;
1146 }
1147
1148
1149
1150
1151 static __inline__ __attribute__((always_inline)) int __constant_test_bit(int nr, const void *addr)
1152 {
1153 return ((1UL << (nr & 31)) &
1154 (((const volatile unsigned int *)addr)[nr >> 5])) != 0;
1155 }
1156
1157 static __inline__ __attribute__((always_inline)) int __test_bit(int nr, const void *addr)
1158 {
1159 int *a = (int *)addr;
1160 int mask;
1161
1162 a += nr >> 5;
1163 mask = 1 << (nr & 0x1f);
1164 return ((mask & *a) != 0);
1165 }
1166
1167
1168
1169
1170
1171
1172 # 1 "include/asm-generic/bitops/find.h" 1
1173
1174
1175
1176 extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
1177 size, unsigned long offset);
1178
1179 extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
1180 long size, unsigned long offset);
1181 # 201 "include/asm/bitops.h" 2
1182 # 1 "include/asm-generic/bitops/hweight.h" 1
1183
1184
1185
1186
1187
1188 extern unsigned int hweight32(unsigned int w);
1189 extern unsigned int hweight16(unsigned int w);
1190 extern unsigned int hweight8(unsigned int w);
1191 extern unsigned long hweight64(__u64 w);
1192 # 202 "include/asm/bitops.h" 2
1193
1194 # 1 "include/asm-generic/bitops/ext2-atomic.h" 1
1195 # 204 "include/asm/bitops.h" 2
1196 # 1 "include/asm-generic/bitops/ext2-non-atomic.h" 1
1197
1198
1199
1200 # 1 "include/asm-generic/bitops/le.h" 1
1201 # 5 "include/asm-generic/bitops/ext2-non-atomic.h" 2
1202 # 205 "include/asm/bitops.h" 2
1203
1204 # 1 "include/asm-generic/bitops/minix.h" 1
1205 # 207 "include/asm/bitops.h" 2
1206
1207
1208
1209 # 1 "include/asm-generic/bitops/fls.h" 1
1210 # 12 "include/asm-generic/bitops/fls.h"
1211 static inline __attribute__((always_inline)) int fls(int x)
1212 {
1213 int r = 32;
1214
1215 if (!x)
1216 return 0;
1217 if (!(x & 0xffff0000u)) {
1218 x <<= 16;
1219 r -= 16;
1220 }
1221 if (!(x & 0xff000000u)) {
1222 x <<= 8;
1223 r -= 8;
1224 }
1225 if (!(x & 0xf0000000u)) {
1226 x <<= 4;
1227 r -= 4;
1228 }
1229 if (!(x & 0xc0000000u)) {
1230 x <<= 2;
1231 r -= 2;
1232 }
1233 if (!(x & 0x80000000u)) {
1234 x <<= 1;
1235 r -= 1;
1236 }
1237 return r;
1238 }
1239 # 211 "include/asm/bitops.h" 2
1240 # 1 "include/asm-generic/bitops/fls64.h" 1
1241
1242
1243
1244
1245
1246 static inline __attribute__((always_inline)) int fls64(__u64 x)
1247 {
1248 __u32 h = x >> 32;
1249 if (h)
1250 return fls(h) + 32;
1251 return fls(x);
1252 }
1253 # 212 "include/asm/bitops.h" 2
1254 # 10 "include/linux/bitops.h" 2
1255
1256 static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count)
1257 {
1258 int order;
1259
1260 order = fls(count);
1261 return order;
1262 }
1263
1264 static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count)
1265 {
1266 int order;
1267
1268 order = fls(count) - 1;
1269 if (count & (count - 1))
1270 order++;
1271 return order;
1272 }
1273
1274 static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
1275 {
1276 return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
1277 }
1278
1279
1280
1281
1282
1283
1284
1285 static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift)
1286 {
1287 return (word << shift) | (word >> (32 - shift));
1288 }
1289
1290
1291
1292
1293
1294
1295
1296 static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift)
1297 {
1298 return (word >> shift) | (word << (32 - shift));
1299 }
1300
1301 static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l)
1302 {
1303 if (sizeof(l) == 4)
1304 return fls(l);
1305 return fls64(l);
1306 }
1307 # 21 "include/linux/thread_info.h" 2
1308 # 1 "include/asm/thread_info.h" 1
1309 # 32 "include/asm/thread_info.h"
1310 # 1 "include/asm/entry.h" 1
1311 # 33 "include/asm/thread_info.h" 2
1312 # 1 "include/asm/l1layout.h" 1
1313 # 16 "include/asm/l1layout.h"
1314 struct l1_scratch_task_info
1315 {
1316
1317 void *stack_start;
1318
1319
1320
1321 void *lowest_sp;
1322 };
1323 # 34 "include/asm/thread_info.h" 2
1324 # 45 "include/asm/thread_info.h"
1325 typedef unsigned long mm_segment_t;
1326
1327
1328
1329
1330
1331
1332 struct thread_info {
1333 struct task_struct *task;
1334 struct exec_domain *exec_domain;
1335 unsigned long flags;
1336 int cpu;
1337 int preempt_count;
1338 mm_segment_t addr_limit;
1339 struct restart_block restart_block;
1340 struct l1_scratch_task_info l1_task_info;
1341 };
1342 # 87 "include/asm/thread_info.h"
1343 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
1344 __attribute__ ((__const__));
1345
1346
1347
1348
1349 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
1350 {
1351 struct thread_info *ti;
1352 __asm__("%0 = sp;": "=&d"(ti):
1353 );
1354 return (struct thread_info *)((long)ti & ~8191UL);
1355 }
1356 # 22 "include/linux/thread_info.h" 2
1357 # 30 "include/linux/thread_info.h"
1358 static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag)
1359 {
1360 set_bit(flag,&ti->flags);
1361 }
1362
1363 static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag)
1364 {
1365 clear_bit(flag,&ti->flags);
1366 }
1367
1368 static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
1369 {
1370 return test_and_set_bit(flag,&ti->flags);
1371 }
1372
1373 static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
1374 {
1375 return test_and_clear_bit(flag,&ti->flags);
1376 }
1377
1378 static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag)
1379 {
1380 return (__builtin_constant_p(flag) ? __constant_test_bit((flag),(&ti->flags)) : __test_bit((flag),(&ti->flags)));
1381 }
1382 # 10 "include/linux/preempt.h" 2
1383 # 50 "include/linux/spinlock.h" 2
1384
1385
1386
1387 # 1 "include/linux/kernel.h" 1
1388 # 10 "include/linux/kernel.h"
1389 # 1 "/usr/local/src/blackfin/toolchains/20070115/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stdarg.h" 1 3 4
1390 # 43 "/usr/local/src/blackfin/toolchains/20070115/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stdarg.h" 3 4
1391 typedef __builtin_va_list __gnuc_va_list;
1392 # 105 "/usr/local/src/blackfin/toolchains/20070115/out-uclinux/lib/gcc/bfin-uclinux/4.1.1/include/stdarg.h" 3 4
1393 typedef __gnuc_va_list va_list;
1394 # 11 "include/linux/kernel.h" 2
1395
1396
1397
1398
1399
1400
1401 # 1 "include/asm/bug.h" 1
1402 # 14 "include/asm/bug.h"
1403 # 1 "include/asm-generic/bug.h" 1
1404 # 15 "include/asm/bug.h" 2
1405 # 18 "include/linux/kernel.h" 2
1406
1407 extern const char linux_banner[];
1408 # 50 "include/linux/kernel.h"
1409 extern int console_printk[];
1410
1411
1412
1413
1414
1415
1416 struct completion;
1417 struct pt_regs;
1418 struct user;
1419 # 98 "include/linux/kernel.h"
1420 extern struct atomic_notifier_head panic_notifier_list;
1421 extern long (*panic_blink)(long time);
1422 void panic(const char * fmt, ...)
1423 __attribute__ ((noreturn, format (printf, 1, 2)));
1424 extern void oops_enter(void);
1425 extern void oops_exit(void);
1426 extern int oops_may_print(void);
1427 void do_exit(long error_code)
1428 __attribute__((noreturn));
1429 void complete_and_exit(struct completion *, long)
1430 __attribute__((noreturn));
1431 extern unsigned long simple_strtoul(const char *,char **,unsigned int);
1432 extern long simple_strtol(const char *,char **,unsigned int);
1433 extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
1434 extern long long simple_strtoll(const char *,char **,unsigned int);
1435 extern int sprintf(char * buf, const char * fmt, ...)
1436 __attribute__ ((format (printf, 2, 3)));
1437 extern int vsprintf(char *buf, const char *, va_list)
1438 __attribute__ ((format (printf, 2, 0)));
1439 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
1440 __attribute__ ((format (printf, 3, 4)));
1441 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
1442 __attribute__ ((format (printf, 3, 0)));
1443 extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
1444 __attribute__ ((format (printf, 3, 4)));
1445 extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
1446 __attribute__ ((format (printf, 3, 0)));
1447 extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
1448 __attribute__ ((format (printf, 2, 3)));
1449
1450 extern int sscanf(const char *, const char *, ...)
1451 __attribute__ ((format (scanf, 2, 3)));
1452 extern int vsscanf(const char *, const char *, va_list)
1453 __attribute__ ((format (scanf, 2, 0)));
1454
1455 extern int get_option(char **str, int *pint);
1456 extern char *get_options(const char *str, int nints, int *ints);
1457 extern unsigned long long memparse(char *ptr, char **retptr);
1458
1459 extern int core_kernel_text(unsigned long addr);
1460 extern int __kernel_text_address(unsigned long addr);
1461 extern int kernel_text_address(unsigned long addr);
1462 extern int session_of_pgrp(int pgrp);
1463
1464 extern void dump_thread(struct pt_regs *regs, struct user *dump);
1465
1466
1467 int vprintk(const char *fmt, va_list args)
1468 __attribute__ ((format (printf, 1, 0)));
1469 int printk(const char * fmt, ...)
1470 __attribute__ ((format (printf, 1, 2)));
1471 # 158 "include/linux/kernel.h"
1472 unsigned long int_sqrt(unsigned long);
1473
1474 static inline __attribute__((always_inline)) int __attribute__((pure)) long_log2(unsigned long x)
1475 {
1476 int r = 0;
1477 for (x >>= 1; x > 0; x >>= 1)
1478 r++;
1479 return r;
1480 }
1481
1482 static inline __attribute__((always_inline)) unsigned long
1483 __attribute__((__const__)) roundup_pow_of_two(unsigned long x)
1484 {
1485 return 1UL << fls_long(x - 1);
1486 }
1487
1488 extern int printk_ratelimit(void);
1489 extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
1490 extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
1491 unsigned int interval_msec);
1492
1493 static inline __attribute__((always_inline)) void console_silent(void)
1494 {
1495 (console_printk[0]) = 0;
1496 }
1497
1498 static inline __attribute__((always_inline)) void console_verbose(void)
1499 {
1500 if ((console_printk[0]))
1501 (console_printk[0]) = 15;
1502 }
1503
1504 extern void bust_spinlocks(int yes);
1505 extern int oops_in_progress;
1506 extern int panic_timeout;
1507 extern int panic_on_oops;
1508 extern int panic_on_unrecovered_nmi;
1509 extern int tainted;
1510 extern const char *print_tainted(void);
1511 extern void add_taint(unsigned);
1512
1513
1514 extern enum system_states {
1515 SYSTEM_BOOTING,
1516 SYSTEM_RUNNING,
1517 SYSTEM_HALT,
1518 SYSTEM_POWER_OFF,
1519 SYSTEM_RESTART,
1520 SYSTEM_SUSPEND_DISK,
1521 } system_state;
1522 # 216 "include/linux/kernel.h"
1523 extern void dump_stack(void);
1524
1525
1526
1527
1528
1529
1530 static inline __attribute__((always_inline)) int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...)
1531 {
1532 return 0;
1533 }
1534 # 330 "include/linux/kernel.h"
1535 struct sysinfo {
1536 long uptime;
1537 unsigned long loads[3];
1538 unsigned long totalram;
1539 unsigned long freeram;
1540 unsigned long sharedram;
1541 unsigned long bufferram;
1542 unsigned long totalswap;
1543 unsigned long freeswap;
1544 unsigned short procs;
1545 unsigned short pad;
1546 unsigned long totalhigh;
1547 unsigned long freehigh;
1548 unsigned int mem_unit;
1549 char _f[20-2*sizeof(long)-sizeof(int)];
1550 };
1551 # 54 "include/linux/spinlock.h" 2
1552 # 1 "include/linux/stringify.h" 1
1553 # 55 "include/linux/spinlock.h" 2
1554 # 1 "include/linux/bottom_half.h" 1
1555 extern void local_bh_disable(void);
1556 extern void __local_bh_enable(void);
1557 extern void _local_bh_enable(void);
1558 extern void local_bh_enable(void);
1559 extern void local_bh_enable_ip(unsigned long ip);
1560 # 56 "include/linux/spinlock.h" 2
1561 # 79 "include/linux/spinlock.h"
1562 # 1 "include/linux/spinlock_types.h" 1
1563 # 12 "include/linux/spinlock_types.h"
1564 # 1 "include/linux/lockdep.h" 1
1565 # 248 "include/linux/lockdep.h"
1566 static inline __attribute__((always_inline)) void lockdep_off(void)
1567 {
1568 }
1569
1570 static inline __attribute__((always_inline)) void lockdep_on(void)
1571 {
1572 }
1573
1574 static inline __attribute__((always_inline)) int lockdep_internal(void)
1575 {
1576 return 0;
1577 }
1578 # 279 "include/linux/lockdep.h"
1579 struct lock_class_key { };
1580 # 13 "include/linux/spinlock_types.h" 2
1581
1582
1583
1584
1585 # 1 "include/linux/spinlock_types_up.h" 1
1586 # 29 "include/linux/spinlock_types_up.h"
1587 typedef struct { } raw_spinlock_t;
1588
1589
1590
1591
1592
1593 typedef struct {
1594
1595
1596
1597
1598 } raw_rwlock_t;
1599 # 18 "include/linux/spinlock_types.h" 2
1600
1601
1602 typedef struct {
1603 raw_spinlock_t raw_lock;
1604 # 32 "include/linux/spinlock_types.h"
1605 } spinlock_t;
1606
1607
1608
1609 typedef struct {
1610 raw_rwlock_t raw_lock;
1611 # 48 "include/linux/spinlock_types.h"
1612 } rwlock_t;
1613 # 80 "include/linux/spinlock.h" 2
1614
1615 extern int __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock);
1616
1617
1618
1619
1620
1621
1622
1623 # 1 "include/linux/spinlock_up.h" 1
1624 # 90 "include/linux/spinlock.h" 2
1625 # 135 "include/linux/spinlock.h"
1626 # 1 "include/linux/spinlock_api_up.h" 1
1627 # 136 "include/linux/spinlock.h" 2
1628 # 274 "include/linux/spinlock.h"
1629 # 1 "include/asm/atomic.h" 1
1630 # 16 "include/asm/atomic.h"
1631 typedef struct {
1632 int counter;
1633 } atomic_t;
1634
1635
1636
1637
1638
1639 static __inline__ __attribute__((always_inline)) void atomic_add(int i, atomic_t * v)
1640 {
1641 long flags;
1642
1643 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1644 v->counter += i;
1645 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1646 }
1647
1648 static __inline__ __attribute__((always_inline)) void atomic_sub(int i, atomic_t * v)
1649 {
1650 long flags;
1651
1652 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1653 v->counter -= i;
1654 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1655
1656 }
1657
1658 static inline __attribute__((always_inline)) int atomic_add_return(int i, atomic_t * v)
1659 {
1660 int __temp = 0;
1661 long flags;
1662
1663 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1664 v->counter += i;
1665 __temp = v->counter;
1666 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1667
1668
1669 return __temp;
1670 }
1671
1672
1673 static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t * v)
1674 {
1675 int __temp = 0;
1676 long flags;
1677
1678 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1679 v->counter -= i;
1680 __temp = v->counter;
1681 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1682
1683 return __temp;
1684 }
1685
1686 static __inline__ __attribute__((always_inline)) void atomic_inc(volatile atomic_t * v)
1687 {
1688 long flags;
1689
1690 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1691 v->counter++;
1692 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1693 }
1694 # 93 "include/asm/atomic.h"
1695 static __inline__ __attribute__((always_inline)) void atomic_dec(volatile atomic_t * v)
1696 {
1697 long flags;
1698
1699 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1700 v->counter--;
1701 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1702 }
1703
1704 static __inline__ __attribute__((always_inline)) void atomic_clear_mask(unsigned int mask, atomic_t * v)
1705 {
1706 long flags;
1707
1708 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1709 v->counter &= ~mask;
1710 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1711 }
1712
1713 static __inline__ __attribute__((always_inline)) void atomic_set_mask(unsigned int mask, atomic_t * v)
1714 {
1715 long flags;
1716
1717 do { __asm__ __volatile__ ( "cli %0;" :"=&d"(flags):); } while (0);
1718 v->counter |= mask;
1719 do { if (((flags) != 0x1f)) do { __asm__ __volatile__ ( "sti %0;" ::"d"(irq_flags)); } while (0); } while (0);
1720 }
1721 # 142 "include/asm/atomic.h"
1722 # 1 "include/asm-generic/atomic.h" 1
1723 # 71 "include/asm-generic/atomic.h"
1724 typedef atomic_t atomic_long_t;
1725
1726
1727 static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l)
1728 {
1729 atomic_t *v = (atomic_t *)l;
1730
1731 return (long)((v)->counter);
1732 }
1733
1734 static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i)
1735 {
1736 atomic_t *v = (atomic_t *)l;
1737
1738 (((v)->counter) = i);
1739 }
1740
1741 static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l)
1742 {
1743 atomic_t *v = (atomic_t *)l;
1744
1745 atomic_inc(v);
1746 }
1747
1748 static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l)
1749 {
1750 atomic_t *v = (atomic_t *)l;
1751
1752 atomic_dec(v);
1753 }
1754
1755 static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l)
1756 {
1757 atomic_t *v = (atomic_t *)l;
1758
1759 atomic_add(i, v);
1760 }
1761
1762 static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l)
1763 {
1764 atomic_t *v = (atomic_t *)l;
1765
1766 atomic_sub(i, v);
1767 }
1768 # 143 "include/asm/atomic.h" 2
1769 # 275 "include/linux/spinlock.h" 2
1770
1771
1772
1773
1774
1775 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
1776 # 46 "include/linux/capability.h" 2
1777 # 1 "include/asm/current.h" 1
1778 # 13 "include/asm/current.h"
1779 struct task_struct;
1780
1781 static inline __attribute__((always_inline)) struct task_struct *get_current(void) __attribute__ ((__const__));
1782 static inline __attribute__((always_inline)) struct task_struct *get_current(void)
1783 {
1784 return (current_thread_info()->task);
1785 }
1786 # 47 "include/linux/capability.h" 2
1787 # 58 "include/linux/capability.h"
1788 typedef __u32 kernel_cap_t;
1789 # 295 "include/linux/capability.h"
1790 extern kernel_cap_t cap_bset;
1791 # 323 "include/linux/capability.h"
1792 static inline __attribute__((always_inline)) kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
1793 {
1794 kernel_cap_t dest;
1795 (dest) = (a) | (b);
1796 return dest;
1797 }
1798
1799 static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b)
1800 {
1801 kernel_cap_t dest;
1802 (dest) = (a) & (b);
1803 return dest;
1804 }
1805
1806 static inline __attribute__((always_inline)) kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop)
1807 {
1808 kernel_cap_t dest;
1809 (dest) = (a) & ~(drop);
1810 return dest;
1811 }
1812
1813 static inline __attribute__((always_inline)) kernel_cap_t cap_invert(kernel_cap_t c)
1814 {
1815 kernel_cap_t dest;
1816 (dest) = ~(c);
1817 return dest;
1818 }
1819 # 360 "include/linux/capability.h"
1820 int capable(int cap);
1821 int __capable(struct task_struct *t, int cap);
1822 # 47 "include/linux/sched.h" 2
1823 # 1 "include/linux/threads.h" 1
1824 # 48 "include/linux/sched.h" 2
1825
1826
1827 # 1 "include/linux/timex.h" 1
1828 # 57 "include/linux/timex.h"
1829 # 1 "include/linux/time.h" 1
1830
1831
1832
1833
1834
1835
1836 # 1 "include/linux/seqlock.h" 1
1837 # 32 "include/linux/seqlock.h"
1838 typedef struct {
1839 unsigned sequence;
1840 spinlock_t lock;
1841 } seqlock_t;
1842 # 57 "include/linux/seqlock.h"
1843 static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl)
1844 {
1845 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1846 ++sl->sequence;
1847 __asm__ __volatile__("": : :"memory");
1848 }
1849
1850 static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl)
1851 {
1852 __asm__ __volatile__("": : :"memory");
1853 sl->sequence++;
1854 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
1855 }
1856
1857 static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl)
1858 {
1859 int ret = (({ do { do { } while (0); (void)0; (void)(&sl->lock); } while (0); 1; }));
1860
1861 if (ret) {
1862 ++sl->sequence;
1863 __asm__ __volatile__("": : :"memory");
1864 }
1865 return ret;
1866 }
1867
1868
1869 static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl)
1870 {
1871 unsigned ret = sl->sequence;
1872 __asm__ __volatile__("": : :"memory");
1873 return ret;
1874 }
1875 # 98 "include/linux/seqlock.h"
1876 static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned iv)
1877 {
1878 __asm__ __volatile__("": : :"memory");
1879 return (iv & 1) | (sl->sequence ^ iv);
1880 }
1881 # 112 "include/linux/seqlock.h"
1882 typedef struct seqcount {
1883 unsigned sequence;
1884 } seqcount_t;
1885
1886
1887
1888
1889
1890 static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s)
1891 {
1892 unsigned ret = s->sequence;
1893 __asm__ __volatile__("": : :"memory");
1894 return ret;
1895 }
1896
1897
1898
1899
1900
1901
1902 static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned iv)
1903 {
1904 __asm__ __volatile__("": : :"memory");
1905 return (iv & 1) | (s->sequence ^ iv);
1906 }
1907
1908
1909
1910
1911
1912
1913 static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s)
1914 {
1915 s->sequence++;
1916 __asm__ __volatile__("": : :"memory");
1917 }
1918
1919 static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s)
1920 {
1921 __asm__ __volatile__("": : :"memory");
1922 s->sequence++;
1923 }
1924 # 8 "include/linux/time.h" 2
1925
1926
1927
1928
1929 struct timespec {
1930 time_t tv_sec;
1931 long tv_nsec;
1932 };
1933
1934
1935 struct timeval {
1936 time_t tv_sec;
1937 suseconds_t tv_usec;
1938 };
1939
1940 struct timezone {
1941 int tz_minuteswest;
1942 int tz_dsttime;
1943 };
1944 # 39 "include/linux/time.h"
1945 static inline __attribute__((always_inline)) int timespec_equal(struct timespec *a, struct timespec *b)
1946 {
1947 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
1948 }
1949
1950
1951
1952
1953
1954
1955 static inline __attribute__((always_inline)) int timespec_compare(struct timespec *lhs, struct timespec *rhs)
1956 {
1957 if (lhs->tv_sec < rhs->tv_sec)
1958 return -1;
1959 if (lhs->tv_sec > rhs->tv_sec)
1960 return 1;
1961 return lhs->tv_nsec - rhs->tv_nsec;
1962 }
1963
1964 static inline __attribute__((always_inline)) int timeval_compare(struct timeval *lhs, struct timeval *rhs)
1965 {
1966 if (lhs->tv_sec < rhs->tv_sec)
1967 return -1;
1968 if (lhs->tv_sec > rhs->tv_sec)
1969 return 1;
1970 return lhs->tv_usec - rhs->tv_usec;
1971 }
1972
1973 extern unsigned long mktime(const unsigned int year, const unsigned int mon,
1974 const unsigned int day, const unsigned int hour,
1975 const unsigned int min, const unsigned int sec);
1976
1977 extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
1978
1979
1980
1981
1982 static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs,
1983 struct timespec rhs)
1984 {
1985 struct timespec ts_delta;
1986 set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
1987 lhs.tv_nsec - rhs.tv_nsec);
1988 return ts_delta;
1989 }
1990
1991
1992
1993
1994
1995
1996
1997 extern struct timespec xtime;
1998 extern struct timespec wall_to_monotonic;
1999 extern seqlock_t xtime_lock;
2000
2001 void timekeeping_init(void);
2002
2003 static inline __attribute__((always_inline)) unsigned long get_seconds(void)
2004 {
2005 return xtime.tv_sec;
2006 }
2007
2008 struct timespec current_kernel_time(void);
2009
2010
2011
2012
2013 extern void do_gettimeofday(struct timeval *tv);
2014 extern int do_settimeofday(struct timespec *tv);
2015 extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
2016
2017 extern long do_utimes(int dfd, char *filename, struct timeval *times);
2018 struct itimerval;
2019 extern int do_setitimer(int which, struct itimerval *value,
2020 struct itimerval *ovalue);
2021 extern unsigned int alarm_setitimer(unsigned int seconds);
2022 extern int do_getitimer(int which, struct itimerval *value);
2023 extern void getnstimeofday(struct timespec *tv);
2024
2025 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
2026 extern int timekeeping_is_continuous(void);
2027 # 129 "include/linux/time.h"
2028 static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts)
2029 {
2030 return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
2031 }
2032 # 141 "include/linux/time.h"
2033 static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv)
2034 {
2035 return ((s64) tv->tv_sec * 1000000000L) +
2036 tv->tv_usec * 1000L;
2037 }
2038
2039
2040
2041
2042
2043
2044
2045 extern struct timespec ns_to_timespec(const s64 nsec);
2046
2047
2048
2049
2050
2051
2052
2053 extern struct timeval ns_to_timeval(const s64 nsec);
2054
2055
2056
2057
2058
2059
2060 static inline __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns)
2061 {
2062 ns += a->tv_nsec;
2063 while(__builtin_expect(!!(ns >= 1000000000L), 0)) {
2064 ns -= 1000000000L;
2065 a->tv_sec++;
2066 }
2067 a->tv_nsec = ns;
2068 }
2069 # 195 "include/linux/time.h"
2070 struct itimerspec {
2071 struct timespec it_interval;
2072 struct timespec it_value;
2073 };
2074
2075 struct itimerval {
2076 struct timeval it_interval;
2077 struct timeval it_value;
2078 };
2079 # 58 "include/linux/timex.h" 2
2080 # 100 "include/linux/timex.h"
2081 struct timex {
2082 unsigned int modes;
2083 long offset;
2084 long freq;
2085 long maxerror;
2086 long esterror;
2087 int status;
2088 long constant;
2089 long precision;
2090 long tolerance;
2091
2092
2093 struct timeval time;
2094 long tick;
2095
2096 long ppsfreq;
2097 long jitter;
2098 int shift;
2099 long stabil;
2100 long jitcnt;
2101 long calcnt;
2102 long errcnt;
2103 long stbcnt;
2104
2105 int :32; int :32; int :32; int :32;
2106 int :32; int :32; int :32; int :32;
2107 int :32; int :32; int :32; int :32;
2108 };
2109 # 187 "include/linux/timex.h"
2110 # 1 "include/asm/timex.h" 1
2111 # 11 "include/asm/timex.h"
2112 typedef unsigned long cycles_t;
2113
2114 static inline __attribute__((always_inline)) cycles_t get_cycles(void)
2115 {
2116 return 0;
2117 }
2118 # 188 "include/linux/timex.h" 2
2119
2120
2121
2122
2123
2124
2125 extern unsigned long tick_usec;
2126 extern unsigned long tick_nsec;
2127 extern int tickadj;
2128
2129
2130
2131
2132 extern int time_status;
2133 extern long time_maxerror;
2134 extern long time_esterror;
2135
2136 extern long time_freq;
2137
2138 extern long time_adjust;
2139
2140 extern void ntp_clear(void);
2141
2142
2143
2144
2145
2146 static inline __attribute__((always_inline)) int ntp_synced(void)
2147 {
2148 return !(time_status & 0x0040);
2149 }
2150 # 277 "include/linux/timex.h"
2151 static inline __attribute__((always_inline)) void time_interpolator_reset(void)
2152 {
2153 }
2154
2155 static inline __attribute__((always_inline)) void time_interpolator_update(long delta_nsec)
2156 {
2157 }
2158
2159
2160
2161
2162
2163
2164 extern u64 current_tick_length(void);
2165
2166 extern void second_overflow(void);
2167 extern void update_ntp_one_tick(void);
2168 extern int do_adjtimex(struct timex *);
2169 # 51 "include/linux/sched.h" 2
2170 # 1 "include/linux/jiffies.h" 1
2171
2172
2173
2174 # 1 "include/linux/calc64.h" 1
2175
2176
2177
2178
2179 # 1 "include/asm/div64.h" 1
2180 # 1 "include/asm-generic/div64.h" 1
2181 # 35 "include/asm-generic/div64.h"
2182 extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
2183 # 1 "include/asm/div64.h" 2
2184 # 6 "include/linux/calc64.h" 2
2185 # 20 "include/linux/calc64.h"
2186 static inline __attribute__((always_inline)) unsigned long do_div_llr(const long long dividend,
2187 const long divisor, long *remainder)
2188 {
2189 u64 result = dividend;
2190
2191 *(remainder) = ({ uint32_t __base = (divisor); uint32_t __rem; (void)(((typeof((result)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((result) >> 32) == 0), 1)) { __rem = (uint32_t)(result) % __base; (result) = (uint32_t)(result) / __base; } else __rem = __div64_32(&(result), __base); __rem; });
2192 return (unsigned long) result;
2193 }
2194
2195
2196
2197
2198
2199
2200
2201 static inline __attribute__((always_inline)) long div_long_long_rem_signed(const long long dividend,
2202 const long divisor, long *remainder)
2203 {
2204 long res;
2205
2206 if (__builtin_expect(!!(dividend < 0), 0)) {
2207 res = -do_div_llr((-dividend), divisor, remainder);
2208 *remainder = -(*remainder);
2209 } else
2210 res = do_div_llr((dividend), divisor, remainder);
2211
2212 return res;
2213 }
2214 # 5 "include/linux/jiffies.h" 2
2215 # 81 "include/linux/jiffies.h"
2216 extern u64 __attribute__((section(".data"))) jiffies_64;
2217 extern unsigned long volatile __attribute__((section(".data"))) jiffies;
2218
2219
2220 u64 get_jiffies_64(void);
2221 # 267 "include/linux/jiffies.h"
2222 static inline __attribute__((always_inline)) unsigned int jiffies_to_msecs(const unsigned long j)
2223 {
2224
2225 return (1000L / 250) * j;
2226
2227
2228
2229
2230
2231 }
2232
2233 static inline __attribute__((always_inline)) unsigned int jiffies_to_usecs(const unsigned long j)
2234 {
2235
2236 return (1000000L / 250) * j;
2237
2238
2239
2240
2241
2242 }
2243
2244 static inline __attribute__((always_inline)) unsigned long msecs_to_jiffies(const unsigned int m)
2245 {
2246 if (m > jiffies_to_msecs(((~0UL >> 1)-1)))
2247 return ((~0UL >> 1)-1);
2248
2249 return (m + (1000L / 250) - 1) / (1000L / 250);
2250
2251
2252
2253
2254
2255 }
2256
2257 static inline __attribute__((always_inline)) unsigned long usecs_to_jiffies(const unsigned int u)
2258 {
2259 if (u > jiffies_to_usecs(((~0UL >> 1)-1)))
2260 return ((~0UL >> 1)-1);
2261
2262 return (u + (1000000L / 250) - 1) / (1000000L / 250);
2263
2264
2265
2266
2267
2268 }
2269 # 326 "include/linux/jiffies.h"
2270 static __inline__ __attribute__((always_inline)) unsigned long
2271 timespec_to_jiffies(const struct timespec *value)
2272 {
2273 unsigned long sec = value->tv_sec;
2274 long nsec = value->tv_nsec + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) - 1;
2275
2276 if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))) / 1000000000L)){
2277 sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))) / 1000000000L);
2278 nsec = 0;
2279 }
2280 return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 8)) + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))))) +
2281 (((u64)nsec * ((unsigned long)((((u64)1 << ((32 - 8) + 29)) + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))))) >>
2282 (((32 - 8) + 29) - (32 - 8)))) >> (32 - 8);
2283
2284 }
2285
2286 static __inline__ __attribute__((always_inline)) void
2287 jiffies_to_timespec(const unsigned long jiffies, struct timespec *value)
2288 {
2289
2290
2291
2292
2293 u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))));
2294 value->tv_sec = do_div_llr((nsec), 1000000000L, &value->tv_nsec);
2295 }
2296 # 365 "include/linux/jiffies.h"
2297 static __inline__ __attribute__((always_inline)) unsigned long
2298 timeval_to_jiffies(const struct timeval *value)
2299 {
2300 unsigned long sec = value->tv_sec;
2301 long usec = value->tv_usec;
2302
2303 if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))) / 1000000000L)){
2304 sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))) / 1000000000L);
2305 usec = 0;
2306 }
2307 return (((u64)sec * ((unsigned long)((((u64)1000000000L << (32 - 8)) + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))))))) +
2308 (((u64)usec * ((unsigned long)((((u64)1000L << ((32 - 8) + 19)) + (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))) -1) / (u64)(( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))))))) + (u64)(((u64)1 << ((32 - 8) + 19)) - 1)) >>
2309 (((32 - 8) + 19) - (32 - 8)))) >> (32 - 8);
2310 }
2311
2312 static __inline__ __attribute__((always_inline)) void
2313 jiffies_to_timeval(const unsigned long jiffies, struct timeval *value)
2314 {
2315
2316
2317
2318
2319 u64 nsec = (u64)jiffies * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))));
2320 long tv_usec;
2321
2322 value->tv_sec = do_div_llr((nsec), 1000000000L, &tv_usec);
2323 tv_usec /= 1000L;
2324 value->tv_usec = tv_usec;
2325 }
2326
2327
2328
2329
2330 static inline __attribute__((always_inline)) clock_t jiffies_to_clock_t(long x)
2331 {
2332
2333
2334
2335 u64 tmp = (u64)x * (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))));
2336 ({ uint32_t __base = ((1000000000L / 100)); uint32_t __rem; (void)(((typeof((tmp)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((tmp) >> 32) == 0), 1)) { __rem = (uint32_t)(tmp) % __base; (tmp) = (uint32_t)(tmp) / __base; } else __rem = __div64_32(&(tmp), __base); __rem; });
2337 return (long)tmp;
2338
2339 }
2340
2341 static inline __attribute__((always_inline)) unsigned long clock_t_to_jiffies(unsigned long x)
2342 {
2343
2344
2345
2346
2347
2348 u64 jif;
2349
2350
2351 if (x >= ~0UL / 250 * 100)
2352 return ~0UL;
2353
2354
2355 jif = x * (u64) 250;
2356 ({ uint32_t __base = (100); uint32_t __rem; (void)(((typeof((jif)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((jif) >> 32) == 0), 1)) { __rem = (uint32_t)(jif) % __base; (jif) = (uint32_t)(jif) / __base; } else __rem = __div64_32(&(jif), __base); __rem; });
2357 return jif;
2358
2359 }
2360
2361 static inline __attribute__((always_inline)) u64 jiffies_64_to_clock_t(u64 x)
2362 {
2363 # 439 "include/linux/jiffies.h"
2364 x *= (( (((1000000UL * 1000) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((((1000000UL * 1000) % ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))) << (8)) + ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250))))) / 2) / ((( (((1000000) / (((1000000 + 250/2) / 250))) << (8)) + ((((1000000) % (((1000000 + 250/2) / 250))) << (8)) + (((1000000 + 250/2) / 250)) / 2) / (((1000000 + 250/2) / 250)))))));
2365 ({ uint32_t __base = ((1000000000L / 100)); uint32_t __rem; (void)(((typeof((x)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((x) >> 32) == 0), 1)) { __rem = (uint32_t)(x) % __base; (x) = (uint32_t)(x) / __base; } else __rem = __div64_32(&(x), __base); __rem; });
2366
2367 return x;
2368 }
2369
2370 static inline __attribute__((always_inline)) u64 nsec_to_clock_t(u64 x)
2371 {
2372
2373 ({ uint32_t __base = ((1000000000L / 100)); uint32_t __rem; (void)(((typeof((x)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((x) >> 32) == 0), 1)) { __rem = (uint32_t)(x) % __base; (x) = (uint32_t)(x) / __base; } else __rem = __div64_32(&(x), __base); __rem; });
2374 # 462 "include/linux/jiffies.h"
2375 return x;
2376 }
2377 # 52 "include/linux/sched.h" 2
2378 # 1 "include/linux/rbtree.h" 1
2379 # 100 "include/linux/rbtree.h"
2380 struct rb_node
2381 {
2382 unsigned long rb_parent_color;
2383
2384
2385 struct rb_node *rb_right;
2386 struct rb_node *rb_left;
2387 } __attribute__((aligned(sizeof(long))));
2388
2389
2390 struct rb_root
2391 {
2392 struct rb_node *rb_node;
2393 };
2394 # 123 "include/linux/rbtree.h"
2395 static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p)
2396 {
2397 rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
2398 }
2399 static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color)
2400 {
2401 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
2402 }
2403 # 139 "include/linux/rbtree.h"
2404 extern void rb_insert_color(struct rb_node *, struct rb_root *);
2405 extern void rb_erase(struct rb_node *, struct rb_root *);
2406
2407
2408 extern struct rb_node *rb_next(struct rb_node *);
2409 extern struct rb_node *rb_prev(struct rb_node *);
2410 extern struct rb_node *rb_first(struct rb_root *);
2411 extern struct rb_node *rb_last(struct rb_root *);
2412
2413
2414 extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
2415 struct rb_root *root);
2416
2417 static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent,
2418 struct rb_node ** rb_link)
2419 {
2420 node->rb_parent_color = (unsigned long )parent;
2421 node->rb_left = node->rb_right = ((void *)0);
2422
2423 *rb_link = node;
2424 }
2425 # 53 "include/linux/sched.h" 2
2426
2427 # 1 "include/linux/cpumask.h" 1
2428 # 86 "include/linux/cpumask.h"
2429 # 1 "include/linux/bitmap.h" 1
2430
2431
2432
2433
2434
2435
2436
2437 # 1 "include/linux/string.h" 1
2438 # 16 "include/linux/string.h"
2439 extern char *strndup_user(const char *, long);
2440
2441
2442
2443
2444 # 1 "include/asm/string.h" 1
2445
2446
2447
2448
2449
2450
2451 extern inline __attribute__((always_inline)) char *strcpy(char *dest, const char *src)
2452 {
2453 char *xdest = dest;
2454 char temp = 0;
2455
2456 __asm__ __volatile__
2457 ("1:\t%2 = B [%1++] (Z);\n\t"
2458 "B [%0++] = %2;\n\t"
2459 "CC = %2;\n\t"
2460 "if cc jump 1b (bp);\n"
2461 : "+&a" (dest), "+&a" (src), "=&d" (temp)
2462 ::"memory", "CC");
2463 return xdest;
2464 }
2465
2466
2467 extern inline __attribute__((always_inline)) char *strncpy(char *dest, const char *src, size_t n)
2468 {
2469 char *xdest = dest;
2470 char temp = 0;
2471
2472 if (n == 0)
2473 return xdest;
2474
2475 __asm__ __volatile__
2476 ("1:\t%3 = B [%1++] (Z);\n\t"
2477 "B [%0++] = %3;\n\t"
2478 "CC = %3;\n\t"
2479 "if ! cc jump 2f;\n\t"
2480 "%2 += -1;\n\t"
2481 "CC = %2 == 0;\n\t"
2482 "if ! cc jump 1b (bp);\n"
2483 "2:\n"
2484 : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp)
2485 ::"memory", "CC");
2486 return xdest;
2487 }
2488
2489
2490 extern inline __attribute__((always_inline)) int strcmp(const char *cs, const char *ct)
2491 {
2492 char __res1, __res2;
2493
2494 __asm__
2495 ("1:\t%2 = B[%0++] (Z);\n\t"
2496 "%3 = B[%1++] (Z);\n\t"
2497 "CC = %2 == %3;\n\t"
2498 "if ! cc jump 2f;\n\t"
2499 "CC = %2;\n\t"
2500 "if cc jump 1b (bp);\n\t"
2501 "jump.s 3f;\n"
2502 "2:\t%2 = %2 - %3;\n"
2503 "3:\n"
2504 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2)
2505 : : "CC");
2506
2507 return __res1;
2508 }
2509
2510
2511 extern inline __attribute__((always_inline)) int strncmp(const char *cs, const char *ct, size_t count)
2512 {
2513 char __res1, __res2;
2514
2515 if (!count)
2516 return 0;
2517 __asm__
2518 ("1:\t%3 = B[%0++] (Z);\n\t"
2519 "%4 = B[%1++] (Z);\n\t"
2520 "CC = %3 == %4;\n\t"
2521 "if ! cc jump 3f;\n\t"
2522 "CC = %3;\n\t"
2523 "if ! cc jump 4f;\n\t"
2524 "%2 += -1;\n\t"
2525 "CC = %2 == 0;\n\t"
2526 "if ! cc jump 1b;\n"
2527 "2:\t%3 = 0;\n\t"
2528 "jump.s 4f;\n"
2529 "3:\t%3 = %3 - %4;\n"
2530 "4:"
2531 : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2)
2532 : : "CC");
2533 return __res1;
2534 }
2535
2536
2537 extern void *memset(void *s, int c, size_t count);
2538
2539 extern void *memcpy(void *d, const void *s, size_t count);
2540
2541 extern int memcmp(const void *, const void *, __kernel_size_t);
2542
2543 extern void *memchr(const void *s, int c, size_t n);
2544
2545 extern void *memmove(void *dest, const void *src, size_t count);
2546 # 22 "include/linux/string.h" 2
2547 # 30 "include/linux/string.h"
2548 size_t strlcpy(char *, const char *, size_t);
2549
2550
2551 extern char * strcat(char *, const char *);
2552
2553
2554 extern char * strncat(char *, const char *, __kernel_size_t);
2555
2556
2557 extern size_t strlcat(char *, const char *, __kernel_size_t);
2558 # 48 "include/linux/string.h"
2559 extern int strnicmp(const char *, const char *, __kernel_size_t);
2560
2561
2562 extern char * strchr(const char *,int);
2563
2564
2565 extern char * strnchr(const char *, size_t, int);
2566
2567
2568 extern char * strrchr(const char *,int);
2569
2570 extern char * strstrip(char *);
2571
2572 extern char * strstr(const char *,const char *);
2573
2574
2575 extern __kernel_size_t strlen(const char *);
2576
2577
2578 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
2579
2580
2581 extern char * strpbrk(const char *,const char *);
2582
2583
2584 extern char * strsep(char **,const char *);
2585
2586
2587 extern __kernel_size_t strspn(const char *,const char *);
2588
2589
2590 extern __kernel_size_t strcspn(const char *,const char *);
2591 # 92 "include/linux/string.h"
2592 extern void * memscan(void *,int,__kernel_size_t);
2593 # 101 "include/linux/string.h"
2594 extern char *kstrdup(const char *s, gfp_t gfp);
2595 extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
2596 # 9 "include/linux/bitmap.h" 2
2597 # 84 "include/linux/bitmap.h"
2598 extern int __bitmap_empty(const unsigned long *bitmap, int bits);
2599 extern int __bitmap_full(const unsigned long *bitmap, int bits);
2600 extern int __bitmap_equal(const unsigned long *bitmap1,
2601 const unsigned long *bitmap2, int bits);
2602 extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
2603 int bits);
2604 extern void __bitmap_shift_right(unsigned long *dst,
2605 const unsigned long *src, int shift, int bits);
2606 extern void __bitmap_shift_left(unsigned long *dst,
2607 const unsigned long *src, int shift, int bits);
2608 extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
2609 const unsigned long *bitmap2, int bits);
2610 extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
2611 const unsigned long *bitmap2, int bits);
2612 extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
2613 const unsigned long *bitmap2, int bits);
2614 extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
2615 const unsigned long *bitmap2, int bits);
2616 extern int __bitmap_intersects(const unsigned long *bitmap1,
2617 const unsigned long *bitmap2, int bits);
2618 extern int __bitmap_subset(const unsigned long *bitmap1,
2619 const unsigned long *bitmap2, int bits);
2620 extern int __bitmap_weight(const unsigned long *bitmap, int bits);
2621
2622 extern int bitmap_scnprintf(char *buf, unsigned int len,
2623 const unsigned long *src, int nbits);
2624 extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
2625 unsigned long *dst, int nbits);
2626 extern int bitmap_parse_user(const char *ubuf, unsigned int ulen,
2627 unsigned long *dst, int nbits);
2628 extern int bitmap_scnlistprintf(char *buf, unsigned int len,
2629 const unsigned long *src, int nbits);
2630 extern int bitmap_parselist(const char *buf, unsigned long *maskp,
2631 int nmaskbits);
2632 extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
2633 const unsigned long *old, const unsigned long *new, int bits);
2634 extern int bitmap_bitremap(int oldbit,
2635 const unsigned long *old, const unsigned long *new, int bits);
2636 extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
2637 extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
2638 extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
2639
2640
2641
2642
2643
2644
2645
2646 static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits)
2647 {
2648 if (nbits <= 32)
2649 *dst = 0UL;
2650 else {
2651 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2652 memset(dst, 0, len);
2653 }
2654 }
2655
2656 static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits)
2657 {
2658 size_t nlongs = (((nbits)+32 -1)/32);
2659 if (nlongs > 1) {
2660 int len = (nlongs - 1) * sizeof(unsigned long);
2661 memset(dst, 0xff, len);
2662 }
2663 dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2664 }
2665
2666 static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src,
2667 int nbits)
2668 {
2669 if (nbits <= 32)
2670 *dst = *src;
2671 else {
2672 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
2673 memcpy(dst, src, len);
2674 }
2675 }
2676
2677 static inline __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *src1,
2678 const unsigned long *src2, int nbits)
2679 {
2680 if (nbits <= 32)
2681 *dst = *src1 & *src2;
2682 else
2683 __bitmap_and(dst, src1, src2, nbits);
2684 }
2685
2686 static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1,
2687 const unsigned long *src2, int nbits)
2688 {
2689 if (nbits <= 32)
2690 *dst = *src1 | *src2;
2691 else
2692 __bitmap_or(dst, src1, src2, nbits);
2693 }
2694
2695 static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1,
2696 const unsigned long *src2, int nbits)
2697 {
2698 if (nbits <= 32)
2699 *dst = *src1 ^ *src2;
2700 else
2701 __bitmap_xor(dst, src1, src2, nbits);
2702 }
2703
2704 static inline __attribute__((always_inline)) void bitmap_andnot(unsigned long *dst, const unsigned long *src1,
2705 const unsigned long *src2, int nbits)
2706 {
2707 if (nbits <= 32)
2708 *dst = *src1 & ~(*src2);
2709 else
2710 __bitmap_andnot(dst, src1, src2, nbits);
2711 }
2712
2713 static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src,
2714 int nbits)
2715 {
2716 if (nbits <= 32)
2717 *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2718 else
2719 __bitmap_complement(dst, src, nbits);
2720 }
2721
2722 static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1,
2723 const unsigned long *src2, int nbits)
2724 {
2725 if (nbits <= 32)
2726 return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2727 else
2728 return __bitmap_equal(src1, src2, nbits);
2729 }
2730
2731 static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1,
2732 const unsigned long *src2, int nbits)
2733 {
2734 if (nbits <= 32)
2735 return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0;
2736 else
2737 return __bitmap_intersects(src1, src2, nbits);
2738 }
2739
2740 static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1,
2741 const unsigned long *src2, int nbits)
2742 {
2743 if (nbits <= 32)
2744 return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2745 else
2746 return __bitmap_subset(src1, src2, nbits);
2747 }
2748
2749 static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits)
2750 {
2751 if (nbits <= 32)
2752 return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2753 else
2754 return __bitmap_empty(src, nbits);
2755 }
2756
2757 static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits)
2758 {
2759 if (nbits <= 32)
2760 return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2761 else
2762 return __bitmap_full(src, nbits);
2763 }
2764
2765 static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits)
2766 {
2767 if (nbits <= 32)
2768 return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
2769 return __bitmap_weight(src, nbits);
2770 }
2771
2772 static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst,
2773 const unsigned long *src, int n, int nbits)
2774 {
2775 if (nbits <= 32)
2776 *dst = *src >> n;
2777 else
2778 __bitmap_shift_right(dst, src, n, nbits);
2779 }
2780
2781 static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst,
2782 const unsigned long *src, int n, int nbits)
2783 {
2784 if (nbits <= 32)
2785 *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
2786 else
2787 __bitmap_shift_left(dst, src, n, nbits);
2788 }
2789
2790 static inline __attribute__((always_inline)) int bitmap_parse(const char *buf, unsigned int buflen,
2791 unsigned long *maskp, int nmaskbits)
2792 {
2793 return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
2794 }
2795 # 87 "include/linux/cpumask.h" 2
2796
2797 typedef struct { unsigned long bits[(((1)+32 -1)/32)]; } cpumask_t;
2798 extern cpumask_t _unused_cpumask_arg_;
2799
2800
2801 static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp)
2802 {
2803 set_bit(cpu, dstp->bits);
2804 }
2805
2806
2807 static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp)
2808 {
2809 clear_bit(cpu, dstp->bits);
2810 }
2811
2812
2813 static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits)
2814 {
2815 bitmap_fill(dstp->bits, nbits);
2816 }
2817
2818
2819 static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits)
2820 {
2821 bitmap_zero(dstp->bits, nbits);
2822 }
2823
2824
2825
2826
2827
2828 static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr)
2829 {
2830 return test_and_set_bit(cpu, addr->bits);
2831 }
2832
2833
2834 static inline __attribute__((always_inline)) void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
2835 const cpumask_t *src2p, int nbits)
2836 {
2837 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
2838 }
2839
2840
2841 static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
2842 const cpumask_t *src2p, int nbits)
2843 {
2844 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
2845 }
2846
2847
2848 static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
2849 const cpumask_t *src2p, int nbits)
2850 {
2851 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
2852 }
2853
2854
2855
2856 static inline __attribute__((always_inline)) void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
2857 const cpumask_t *src2p, int nbits)
2858 {
2859 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
2860 }
2861
2862
2863 static inline __attribute__((always_inline)) void __cpus_complement(cpumask_t *dstp,
2864 const cpumask_t *srcp, int nbits)
2865 {
2866 bitmap_complement(dstp->bits, srcp->bits, nbits);
2867 }
2868
2869
2870 static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p,
2871 const cpumask_t *src2p, int nbits)
2872 {
2873 return bitmap_equal(src1p->bits, src2p->bits, nbits);
2874 }
2875
2876
2877 static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p,
2878 const cpumask_t *src2p, int nbits)
2879 {
2880 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
2881 }
2882
2883
2884 static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p,
2885 const cpumask_t *src2p, int nbits)
2886 {
2887 return bitmap_subset(src1p->bits, src2p->bits, nbits);
2888 }
2889
2890
2891 static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits)
2892 {
2893 return bitmap_empty(srcp->bits, nbits);
2894 }
2895
2896
2897 static inline __attribute__((always_inline)) int __cpus_full(const cpumask_t *srcp, int nbits)
2898 {
2899 return bitmap_full(srcp->bits, nbits);
2900 }
2901
2902
2903 static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits)
2904 {
2905 return bitmap_weight(srcp->bits, nbits);
2906 }
2907
2908
2909
2910 static inline __attribute__((always_inline)) void __cpus_shift_right(cpumask_t *dstp,
2911 const cpumask_t *srcp, int n, int nbits)
2912 {
2913 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
2914 }
2915
2916
2917
2918 static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp,
2919 const cpumask_t *srcp, int n, int nbits)
2920 {
2921 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
2922 }
2923 # 270 "include/linux/cpumask.h"
2924 static inline __attribute__((always_inline)) int __cpumask_scnprintf(char *buf, int len,
2925 const cpumask_t *srcp, int nbits)
2926 {
2927 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
2928 }
2929
2930
2931
2932 static inline __attribute__((always_inline)) int __cpumask_parse_user(const char *buf, int len,
2933 cpumask_t *dstp, int nbits)
2934 {
2935 return bitmap_parse_user(buf, len, dstp->bits, nbits);
2936 }
2937
2938
2939
2940 static inline __attribute__((always_inline)) int __cpulist_scnprintf(char *buf, int len,
2941 const cpumask_t *srcp, int nbits)
2942 {
2943 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
2944 }
2945
2946
2947 static inline __attribute__((always_inline)) int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
2948 {
2949 return bitmap_parselist(buf, dstp->bits, nbits);
2950 }
2951
2952
2953
2954 static inline __attribute__((always_inline)) int __cpu_remap(int oldbit,
2955 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
2956 {
2957 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
2958 }
2959
2960
2961
2962 static inline __attribute__((always_inline)) void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp,
2963 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
2964 {
2965 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
2966 }
2967 # 380 "include/linux/cpumask.h"
2968 extern cpumask_t cpu_possible_map;
2969 extern cpumask_t cpu_online_map;
2970 extern cpumask_t cpu_present_map;
2971 # 55 "include/linux/sched.h" 2
2972 # 1 "include/linux/errno.h" 1
2973
2974
2975
2976 # 1 "include/asm/errno.h" 1
2977
2978
2979
2980 # 1 "include/asm-generic/errno.h" 1
2981
2982
2983
2984 # 1 "include/asm-generic/errno-base.h" 1
2985 # 5 "include/asm-generic/errno.h" 2
2986 # 5 "include/asm/errno.h" 2
2987 # 5 "include/linux/errno.h" 2
2988 # 56 "include/linux/sched.h" 2
2989 # 1 "include/linux/nodemask.h" 1
2990 # 86 "include/linux/nodemask.h"
2991 # 1 "include/linux/numa.h" 1
2992 # 87 "include/linux/nodemask.h" 2
2993
2994 typedef struct { unsigned long bits[((((1 << 0))+32 -1)/32)]; } nodemask_t;
2995 extern nodemask_t _unused_nodemask_arg_;
2996
2997
2998 static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp)
2999 {
3000 set_bit(node, dstp->bits);
3001 }
3002
3003
3004 static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp)
3005 {
3006 clear_bit(node, dstp->bits);
3007 }
3008
3009
3010 static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits)
3011 {
3012 bitmap_fill(dstp->bits, nbits);
3013 }
3014
3015
3016 static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits)
3017 {
3018 bitmap_zero(dstp->bits, nbits);
3019 }
3020
3021
3022
3023
3024
3025
3026 static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr)
3027 {
3028 return test_and_set_bit(node, addr->bits);
3029 }
3030
3031
3032
3033 static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
3034 const nodemask_t *src2p, int nbits)
3035 {
3036 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
3037 }
3038
3039
3040
3041 static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
3042 const nodemask_t *src2p, int nbits)
3043 {
3044 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
3045 }
3046
3047
3048
3049 static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
3050 const nodemask_t *src2p, int nbits)
3051 {
3052 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
3053 }
3054
3055
3056
3057 static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
3058 const nodemask_t *src2p, int nbits)
3059 {
3060 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
3061 }
3062
3063
3064
3065 static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp,
3066 const nodemask_t *srcp, int nbits)
3067 {
3068 bitmap_complement(dstp->bits, srcp->bits, nbits);
3069 }
3070
3071
3072
3073 static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p,
3074 const nodemask_t *src2p, int nbits)
3075 {
3076 return bitmap_equal(src1p->bits, src2p->bits, nbits);
3077 }
3078
3079
3080
3081 static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p,
3082 const nodemask_t *src2p, int nbits)
3083 {
3084 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
3085 }
3086
3087
3088
3089 static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p,
3090 const nodemask_t *src2p, int nbits)
3091 {
3092 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3093 }
3094
3095
3096 static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits)
3097 {
3098 return bitmap_empty(srcp->bits, nbits);
3099 }
3100
3101
3102 static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits)
3103 {
3104 return bitmap_full(srcp->bits, nbits);
3105 }
3106
3107
3108 static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits)
3109 {
3110 return bitmap_weight(srcp->bits, nbits);
3111 }
3112
3113
3114
3115 static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp,
3116 const nodemask_t *srcp, int n, int nbits)
3117 {
3118 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3119 }
3120
3121
3122
3123 static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp,
3124 const nodemask_t *srcp, int n, int nbits)
3125 {
3126 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3127 }
3128
3129
3130
3131
3132
3133 static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp)
3134 {
3135 return ({ int __x = ((1 << 0)); int __y = (find_next_bit((srcp->bits), ((1 << 0)), 0)); __x < __y ? __x: __y; });
3136 }
3137
3138
3139 static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp)
3140 {
3141 return ({ int __x = ((1 << 0)); int __y = (find_next_bit(srcp->bits, (1 << 0), n+1)); __x < __y ? __x: __y; });
3142 }
3143 # 251 "include/linux/nodemask.h"
3144 static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp)
3145 {
3146 return ({ int __x = ((1 << 0)); int __y = (find_next_zero_bit((maskp->bits), ((1 << 0)), 0)); __x < __y ? __x: __y; });
3147
3148 }
3149 # 285 "include/linux/nodemask.h"
3150 static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len,
3151 const nodemask_t *srcp, int nbits)
3152 {
3153 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3154 }
3155
3156
3157
3158 static inline __attribute__((always_inline)) int __nodemask_parse_user(const char *buf, int len,
3159 nodemask_t *dstp, int nbits)
3160 {
3161 return bitmap_parse_user(buf, len, dstp->bits, nbits);
3162 }
3163
3164
3165
3166 static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len,
3167 const nodemask_t *srcp, int nbits)
3168 {
3169 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3170 }
3171
3172
3173 static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
3174 {
3175 return bitmap_parselist(buf, dstp->bits, nbits);
3176 }
3177
3178
3179
3180 static inline __attribute__((always_inline)) int __node_remap(int oldbit,
3181 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3182 {
3183 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3184 }
3185
3186
3187
3188 static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp,
3189 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3190 {
3191 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3192 }
3193 # 345 "include/linux/nodemask.h"
3194 extern nodemask_t node_online_map;
3195 extern nodemask_t node_possible_map;
3196 # 57 "include/linux/sched.h" 2
3197
3198
3199 # 1 "include/asm/semaphore.h" 1
3200
3201
3202
3203
3204
3205
3206 # 1 "include/linux/wait.h" 1
3207 # 22 "include/linux/wait.h"
3208 # 1 "include/linux/list.h" 1
3209
3210
3211
3212
3213
3214
3215 # 1 "include/linux/poison.h" 1
3216 # 8 "include/linux/list.h" 2
3217 # 1 "include/linux/prefetch.h" 1
3218 # 14 "include/linux/prefetch.h"
3219 # 1 "include/asm/processor.h" 1
3220 # 10 "include/asm/processor.h"
3221 # 1 "include/asm/segment.h" 1
3222 # 11 "include/asm/processor.h" 2
3223
3224
3225 static inline __attribute__((always_inline)) unsigned long rdusp(void)
3226 {
3227 unsigned long usp;
3228
3229 __asm__ __volatile__("%0 = usp;\n\t":"=da"(usp));
3230 return usp;
3231 }
3232
3233 static inline __attribute__((always_inline)) void wrusp(unsigned long usp)
3234 {
3235 __asm__ __volatile__("usp = %0;\n\t"::"da"(usp));
3236 }
3237
3238
3239
3240
3241 extern unsigned long memory_end;
3242
3243
3244
3245
3246 struct thread_struct {
3247 unsigned long ksp;
3248 unsigned long usp;
3249 unsigned short seqstat;
3250 unsigned long esp0;
3251 unsigned long pc;
3252 void * debuggerinfo;
3253 };
3254 # 69 "include/asm/processor.h"
3255 struct task_struct;
3256
3257
3258 static inline __attribute__((always_inline)) void release_thread(struct task_struct *dead_task)
3259 {
3260 }
3261
3262
3263
3264 extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);
3265
3266
3267
3268
3269 static inline __attribute__((always_inline)) void exit_thread(void)
3270 {
3271 }
3272
3273
3274
3275
3276
3277
3278 unsigned long get_wchan(struct task_struct *p);
3279 # 15 "include/linux/prefetch.h" 2
3280 # 1 "include/asm/cache.h" 1
3281 # 16 "include/linux/prefetch.h" 2
3282 # 43 "include/linux/prefetch.h"
3283 static inline __attribute__((always_inline)) void prefetch(const void *x) {;}
3284
3285
3286
3287 static inline __attribute__((always_inline)) void prefetchw(const void *x) {;}
3288 # 58 "include/linux/prefetch.h"
3289 static inline __attribute__((always_inline)) void prefetch_range(void *addr, size_t len)
3290 {
3291
3292
3293
3294
3295
3296
3297
3298 }
3299 # 9 "include/linux/list.h" 2
3300 # 21 "include/linux/list.h"
3301 struct list_head {
3302 struct list_head *next, *prev;
3303 };
3304
3305
3306
3307
3308
3309
3310 static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list)
3311 {
3312 list->next = list;
3313 list->prev = list;
3314 }
3315 # 43 "include/linux/list.h"
3316 static inline __attribute__((always_inline)) void __list_add(struct list_head *new,
3317 struct list_head *prev,
3318 struct list_head *next)
3319 {
3320 next->prev = new;
3321 new->next = next;
3322 new->prev = prev;
3323 prev->next = new;
3324 }
3325 # 67 "include/linux/list.h"
3326 static inline __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head)
3327 {
3328 __list_add(new, head, head->next);
3329 }
3330 # 84 "include/linux/list.h"
3331 static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head)
3332 {
3333 __list_add(new, head->prev, head);
3334 }
3335
3336
3337
3338
3339
3340
3341
3342 static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head * new,
3343 struct list_head * prev, struct list_head * next)
3344 {
3345 new->next = next;
3346 new->prev = prev;
3347 __asm__ __volatile__("": : :"memory");
3348 next->prev = new;
3349 prev->next = new;
3350 }
3351 # 121 "include/linux/list.h"
3352 static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head)
3353 {
3354 __list_add_rcu(new, head, head->next);
3355 }
3356 # 142 "include/linux/list.h"
3357 static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new,
3358 struct list_head *head)
3359 {
3360 __list_add_rcu(new, head->prev, head);
3361 }
3362 # 155 "include/linux/list.h"
3363 static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next)
3364 {
3365 next->prev = prev;
3366 prev->next = next;
3367 }
3368 # 168 "include/linux/list.h"
3369 static inline __attribute__((always_inline)) void list_del(struct list_head *entry)
3370 {
3371 __list_del(entry->prev, entry->next);
3372 entry->next = ((void *) 0x00100100);
3373 entry->prev = ((void *) 0x00200200);
3374 }
3375 # 202 "include/linux/list.h"
3376 static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry)
3377 {
3378 __list_del(entry->prev, entry->next);
3379 entry->prev = ((void *) 0x00200200);
3380 }
3381
3382
3383
3384
3385
3386
3387
3388 static inline __attribute__((always_inline)) void list_replace(struct list_head *old,
3389 struct list_head *new)
3390 {
3391 new->next = old->next;
3392 new->next->prev = new;
3393 new->prev = old->prev;
3394 new->prev->next = new;
3395 }
3396
3397 static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old,
3398 struct list_head *new)
3399 {
3400 list_replace(old, new);
3401 INIT_LIST_HEAD(old);
3402 }
3403 # 238 "include/linux/list.h"
3404 static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old,
3405 struct list_head *new)
3406 {
3407 new->next = old->next;
3408 new->prev = old->prev;
3409 __asm__ __volatile__("": : :"memory");
3410 new->next->prev = new;
3411 new->prev->next = new;
3412 old->prev = ((void *) 0x00200200);
3413 }
3414
3415
3416
3417
3418
3419 static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry)
3420 {
3421 __list_del(entry->prev, entry->next);
3422 INIT_LIST_HEAD(entry);
3423 }
3424
3425
3426
3427
3428
3429
3430 static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head)
3431 {
3432 __list_del(list->prev, list->next);
3433 list_add(list, head);
3434 }
3435
3436
3437
3438
3439
3440
3441 static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list,
3442 struct list_head *head)
3443 {
3444 __list_del(list->prev, list->next);
3445 list_add_tail(list, head);
3446 }
3447
3448
3449
3450
3451
3452
3453 static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list,
3454 const struct list_head *head)
3455 {
3456 return list->next == head;
3457 }
3458
3459
3460
3461
3462
3463 static inline __attribute__((always_inline)) int list_empty(const struct list_head *head)
3464 {
3465 return head->next == head;
3466 }
3467 # 315 "include/linux/list.h"
3468 static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head)
3469 {
3470 struct list_head *next = head->next;
3471 return (next == head) && (next == head->prev);
3472 }
3473
3474 static inline __attribute__((always_inline)) void __list_splice(struct list_head *list,
3475 struct list_head *head)
3476 {
3477 struct list_head *first = list->next;
3478 struct list_head *last = list->prev;
3479 struct list_head *at = head->next;
3480
3481 first->prev = head;
3482 head->next = first;
3483
3484 last->next = at;
3485 at->prev = last;
3486 }
3487
3488
3489
3490
3491
3492
3493 static inline __attribute__((always_inline)) void list_splice(struct list_head *list, struct list_head *head)
3494 {
3495 if (!list_empty(list))
3496 __list_splice(list, head);
3497 }
3498 # 353 "include/linux/list.h"
3499 static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list,
3500 struct list_head *head)
3501 {
3502 if (!list_empty(list)) {
3503 __list_splice(list, head);
3504 INIT_LIST_HEAD(list);
3505 }
3506 }
3507 # 607 "include/linux/list.h"
3508 struct hlist_head {
3509 struct hlist_node *first;
3510 };
3511
3512 struct hlist_node {
3513 struct hlist_node *next, **pprev;
3514 };
3515
3516
3517
3518
3519 static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h)
3520 {
3521 h->next = ((void *)0);
3522 h->pprev = ((void *)0);
3523 }
3524
3525 static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h)
3526 {
3527 return !h->pprev;
3528 }
3529
3530 static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h)
3531 {
3532 return !h->first;
3533 }
3534
3535 static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n)
3536 {
3537 struct hlist_node *next = n->next;
3538 struct hlist_node **pprev = n->pprev;
3539 *pprev = next;
3540 if (next)
3541 next->pprev = pprev;
3542 }
3543
3544 static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n)
3545 {
3546 __hlist_del(n);
3547 n->next = ((void *) 0x00100100);
3548 n->pprev = ((void *) 0x00200200);
3549 }
3550 # 669 "include/linux/list.h"
3551 static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n)
3552 {
3553 __hlist_del(n);
3554 n->pprev = ((void *) 0x00200200);
3555 }
3556
3557 static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n)
3558 {
3559 if (!hlist_unhashed(n)) {
3560 __hlist_del(n);
3561 INIT_HLIST_NODE(n);
3562 }
3563 }
3564 # 690 "include/linux/list.h"
3565 static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old,
3566 struct hlist_node *new)
3567 {
3568 struct hlist_node *next = old->next;
3569
3570 new->next = next;
3571 new->pprev = old->pprev;
3572 __asm__ __volatile__("": : :"memory");
3573 if (next)
3574 new->next->pprev = &new->next;
3575 *new->pprev = new;
3576 old->pprev = ((void *) 0x00200200);
3577 }
3578
3579 static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
3580 {
3581 struct hlist_node *first = h->first;
3582 n->next = first;
3583 if (first)
3584 first->pprev = &n->next;
3585 h->first = n;
3586 n->pprev = &h->first;
3587 }
3588 # 734 "include/linux/list.h"
3589 static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n,
3590 struct hlist_head *h)
3591 {
3592 struct hlist_node *first = h->first;
3593 n->next = first;
3594 n->pprev = &h->first;
3595 __asm__ __volatile__("": : :"memory");
3596 if (first)
3597 first->pprev = &n->next;
3598 h->first = n;
3599 }
3600
3601
3602 static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n,
3603 struct hlist_node *next)
3604 {
3605 n->pprev = next->pprev;
3606 n->next = next;
3607 next->pprev = &n->next;
3608 *(n->pprev) = n;
3609 }
3610
3611 static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n,
3612 struct hlist_node *next)
3613 {
3614 next->next = n->next;
3615 n->next = next;
3616 next->pprev = &n->next;
3617
3618 if(next->next)
3619 next->next->pprev = &next->next;
3620 }
3621 # 785 "include/linux/list.h"
3622 static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n,
3623 struct hlist_node *next)
3624 {
3625 n->pprev = next->pprev;
3626 n->next = next;
3627 __asm__ __volatile__("": : :"memory");
3628 next->pprev = &n->next;
3629 *(n->pprev) = n;
3630 }
3631 # 813 "include/linux/list.h"
3632 static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev,
3633 struct hlist_node *n)
3634 {
3635 n->next = prev->next;
3636 n->pprev = &prev->next;
3637 __asm__ __volatile__("": : :"memory");
3638 prev->next = n;
3639 if (n->next)
3640 n->next->pprev = &n->next;
3641 }
3642 # 23 "include/linux/wait.h" 2
3643
3644
3645
3646
3647
3648 typedef struct __wait_queue wait_queue_t;
3649 typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key);
3650 int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3651
3652 struct __wait_queue {
3653 unsigned int flags;
3654
3655 void *private;
3656 wait_queue_func_t func;
3657 struct list_head task_list;
3658 };
3659
3660 struct wait_bit_key {
3661 void *flags;
3662 int bit_nr;
3663 };
3664
3665 struct wait_bit_queue {
3666 struct wait_bit_key key;
3667 wait_queue_t wait;
3668 };
3669
3670 struct __wait_queue_head {
3671 spinlock_t lock;
3672 struct list_head task_list;
3673 };
3674 typedef struct __wait_queue_head wait_queue_head_t;
3675
3676 struct task_struct;
3677 # 80 "include/linux/wait.h"
3678 extern void init_waitqueue_head(wait_queue_head_t *q);
3679 # 91 "include/linux/wait.h"
3680 static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
3681 {
3682 q->flags = 0;
3683 q->private = p;
3684 q->func = default_wake_function;
3685 }
3686
3687 static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q,
3688 wait_queue_func_t func)
3689 {
3690 q->flags = 0;
3691 q->private = ((void *)0);
3692 q->func = func;
3693 }
3694
3695 static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q)
3696 {
3697 return !list_empty(&q->task_list);
3698 }
3699 # 120 "include/linux/wait.h"
3700 extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
3701 extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait);
3702 extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
3703
3704 static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
3705 {
3706 list_add(&new->task_list, &head->task_list);
3707 }
3708
3709
3710
3711
3712 static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head,
3713 wait_queue_t *new)
3714 {
3715 list_add_tail(&new->task_list, &head->task_list);
3716 }
3717
3718 static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head,
3719 wait_queue_t *old)
3720 {
3721 list_del(&old->task_list);
3722 }
3723
3724 void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
3725 extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
3726 extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
3727 void __wake_up_bit(wait_queue_head_t *, void *, int);
3728 int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
3729 int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
3730 void wake_up_bit(void *, int);
3731 int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned);
3732 int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned);
3733 wait_queue_head_t *bit_waitqueue(void *, int);
3734 # 351 "include/linux/wait.h"
3735 static inline __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
3736 wait_queue_t * wait)
3737 {
3738 wait->flags |= 0x01;
3739 __add_wait_queue_tail(q, wait);
3740 }
3741
3742
3743
3744
3745 static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q,
3746 wait_queue_t * wait)
3747 {
3748 __remove_wait_queue(q, wait);
3749 }
3750
3751
3752
3753
3754
3755
3756 extern void sleep_on(wait_queue_head_t *q);
3757 extern long sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3758
3759 extern void interruptible_sleep_on(wait_queue_head_t *q);
3760 extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
3761
3762
3763
3764
3765
3766 void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
3767
3768 void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
3769
3770 void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
3771 int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3772 int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
3773 # 429 "include/linux/wait.h"
3774 static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit,
3775 int (*action)(void *), unsigned mode)
3776 {
3777 if (!(__builtin_constant_p(bit) ? __constant_test_bit((bit),(word)) : __test_bit((bit),(word))))
3778 return 0;
3779 return out_of_line_wait_on_bit(word, bit, action, mode);
3780 }
3781 # 453 "include/linux/wait.h"
3782 static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit,
3783 int (*action)(void *), unsigned mode)
3784 {
3785 if (!test_and_set_bit(bit, word))
3786 return 0;
3787 return out_of_line_wait_on_bit_lock(word, bit, action, mode);
3788 }
3789 # 8 "include/asm/semaphore.h" 2
3790
3791 # 1 "include/linux/rwsem.h" 1
3792 # 19 "include/linux/rwsem.h"
3793 struct rw_semaphore;
3794
3795
3796 # 1 "include/linux/rwsem-spinlock.h" 1
3797 # 22 "include/linux/rwsem-spinlock.h"
3798 struct rwsem_waiter;
3799 # 31 "include/linux/rwsem-spinlock.h"
3800 struct rw_semaphore {
3801 __s32 activity;
3802 spinlock_t wait_lock;
3803 struct list_head wait_list;
3804
3805
3806
3807 };
3808 # 52 "include/linux/rwsem-spinlock.h"
3809 extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
3810 struct lock_class_key *key);
3811 # 62 "include/linux/rwsem-spinlock.h"
3812 extern void __down_read(struct rw_semaphore *sem);
3813 extern int __down_read_trylock(struct rw_semaphore *sem);
3814 extern void __down_write(struct rw_semaphore *sem);
3815 extern void __down_write_nested(struct rw_semaphore *sem, int subclass);
3816 extern int __down_write_trylock(struct rw_semaphore *sem);
3817 extern void __up_read(struct rw_semaphore *sem);
3818 extern void __up_write(struct rw_semaphore *sem);
3819 extern void __downgrade_write(struct rw_semaphore *sem);
3820
3821 static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem)
3822 {
3823 return (sem->activity != 0);
3824 }
3825 # 23 "include/linux/rwsem.h" 2
3826
3827
3828
3829
3830
3831
3832
3833 extern void down_read(struct rw_semaphore *sem);
3834
3835
3836
3837
3838 extern int down_read_trylock(struct rw_semaphore *sem);
3839
3840
3841
3842
3843 extern void down_write(struct rw_semaphore *sem);
3844
3845
3846
3847
3848 extern int down_write_trylock(struct rw_semaphore *sem);
3849
3850
3851
3852
3853 extern void up_read(struct rw_semaphore *sem);
3854
3855
3856
3857
3858 extern void up_write(struct rw_semaphore *sem);
3859
3860
3861
3862
3863 extern void downgrade_write(struct rw_semaphore *sem);
3864 # 10 "include/asm/semaphore.h" 2
3865 # 21 "include/asm/semaphore.h"
3866 struct semaphore {
3867 atomic_t count;
3868 int sleepers;
3869 wait_queue_head_t wait;
3870 };
3871 # 40 "include/asm/semaphore.h"
3872 static inline __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val)
3873 {
3874 *sem = (struct semaphore){ .count = { (val) }, .sleepers = 0, .wait = { .lock = (spinlock_t) { .raw_lock = { }, }, .task_list = { &((*sem).wait).task_list, &((*sem).wait).task_list } } };
3875 }
3876
3877 static inline __attribute__((always_inline)) void init_MUTEX(struct semaphore *sem)
3878 {
3879 sema_init(sem, 1);
3880 }
3881
3882 static inline __attribute__((always_inline)) void init_MUTEX_LOCKED(struct semaphore *sem)
3883 {
3884 sema_init(sem, 0);
3885 }
3886
3887 void __down(struct semaphore *sem);
3888 int __down_interruptible(struct semaphore *sem);
3889 int __down_trylock(struct semaphore *sem);
3890 void __up(struct semaphore *sem);
3891
3892 extern spinlock_t semaphore_wake_lock;
3893
3894
3895
3896
3897
3898
3899 static inline __attribute__((always_inline)) void down(struct semaphore *sem)
3900 {
3901 do { do { } while (0); } while (0);
3902 if (atomic_sub_return(1,(&sem->count)) < 0)
3903 __down(sem);
3904 }
3905
3906 static inline __attribute__((always_inline)) int down_interruptible(struct semaphore *sem)
3907 {
3908 int ret = 0;
3909
3910 do { do { } while (0); } while (0);
3911 if (atomic_sub_return(1,(&sem->count)) < 0)
3912 ret = __down_interruptible(sem);
3913 return (ret);
3914 }
3915
3916 static inline __attribute__((always_inline)) int down_trylock(struct semaphore *sem)
3917 {
3918 int ret = 0;
3919
3920 if (atomic_sub_return(1,(&sem->count)) < 0)
3921 ret = __down_trylock(sem);
3922 return ret;
3923 }
3924
3925
3926
3927
3928
3929
3930
3931 static inline __attribute__((always_inline)) void up(struct semaphore *sem)
3932 {
3933 if (atomic_add_return(1,(&sem->count)) <= 0)
3934 __up(sem);
3935 }
3936 # 60 "include/linux/sched.h" 2
3937
3938
3939 # 1 "include/asm/mmu.h" 1
3940
3941
3942
3943
3944
3945 struct sram_list_struct {
3946 struct sram_list_struct *next;
3947 void *addr;
3948 size_t length;
3949 };
3950
3951 typedef struct {
3952 struct vm_list_struct *vmlist;
3953 unsigned long end_brk;
3954 unsigned long stack_start;
3955
3956
3957
3958 void *l1_stack_save;
3959
3960 struct sram_list_struct *sram_list;
3961
3962
3963 unsigned long exec_fdpic_loadmap;
3964 unsigned long interp_fdpic_loadmap;
3965
3966
3967 } mm_context_t;
3968 # 63 "include/linux/sched.h" 2
3969 # 1 "include/asm/cputime.h" 1
3970
3971
3972
3973 # 1 "include/asm-generic/cputime.h" 1
3974
3975
3976
3977
3978
3979
3980 typedef unsigned long cputime_t;
3981 # 23 "include/asm-generic/cputime.h"
3982 typedef u64 cputime64_t;
3983 # 5 "include/asm/cputime.h" 2
3984 # 64 "include/linux/sched.h" 2
3985
3986 # 1 "include/linux/smp.h" 1
3987 # 10 "include/linux/smp.h"
3988 extern void cpu_idle(void);
3989 # 87 "include/linux/smp.h"
3990 static inline __attribute__((always_inline)) int up_smp_call_function(void)
3991 {
3992 return 0;
3993 }
3994 # 99 "include/linux/smp.h"
3995 static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) { }
3996 # 131 "include/linux/smp.h"
3997 void smp_setup_processor_id(void);
3998 # 66 "include/linux/sched.h" 2
3999 # 1 "include/linux/sem.h" 1
4000
4001
4002
4003 # 1 "include/linux/ipc.h" 1
4004 # 9 "include/linux/ipc.h"
4005 struct ipc_perm
4006 {
4007 __kernel_key_t key;
4008 __kernel_uid_t uid;
4009 __kernel_gid_t gid;
4010 __kernel_uid_t cuid;
4011 __kernel_gid_t cgid;
4012 __kernel_mode_t mode;
4013 unsigned short seq;
4014 };
4015
4016
4017 # 1 "include/asm/ipcbuf.h" 1
4018 # 16 "include/asm/ipcbuf.h"
4019 struct ipc64_perm {
4020 __kernel_key_t key;
4021 __kernel_uid32_t uid;
4022 __kernel_gid32_t gid;
4023 __kernel_uid32_t cuid;
4024 __kernel_gid32_t cgid;
4025 __kernel_mode_t mode;
4026 unsigned short __pad1;
4027 unsigned short seq;
4028 unsigned short __pad2;
4029 unsigned long __unused1;
4030 unsigned long __unused2;
4031 };
4032 # 22 "include/linux/ipc.h" 2
4033 # 54 "include/linux/ipc.h"
4034 # 1 "include/linux/kref.h" 1
4035 # 23 "include/linux/kref.h"
4036 struct kref {
4037 atomic_t refcount;
4038 };
4039
4040 void kref_init(struct kref *kref);
4041 void kref_get(struct kref *kref);
4042 int kref_put(struct kref *kref, void (*release) (struct kref *kref));
4043 # 55 "include/linux/ipc.h" 2
4044
4045
4046
4047
4048 struct kern_ipc_perm
4049 {
4050 spinlock_t lock;
4051 int deleted;
4052 key_t key;
4053 uid_t uid;
4054 gid_t gid;
4055 uid_t cuid;
4056 gid_t cgid;
4057 mode_t mode;
4058 unsigned long seq;
4059 void *security;
4060 };
4061
4062 struct ipc_ids;
4063 struct ipc_namespace {
4064 struct kref kref;
4065 struct ipc_ids *ids[3];
4066
4067 int sem_ctls[4];
4068 int used_sems;
4069
4070 int msg_ctlmax;
4071 int msg_ctlmnb;
4072 int msg_ctlmni;
4073
4074 size_t shm_ctlmax;
4075 size_t shm_ctlall;
4076 int shm_ctlmni;
4077 int shm_tot;
4078 };
4079
4080 extern struct ipc_namespace init_ipc_ns;
4081 # 104 "include/linux/ipc.h"
4082 static inline __attribute__((always_inline)) int copy_ipcs(unsigned long flags, struct task_struct *tsk)
4083 {
4084 return 0;
4085 }
4086
4087
4088 static inline __attribute__((always_inline)) struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
4089 {
4090
4091
4092
4093
4094 return ns;
4095 }
4096
4097 static inline __attribute__((always_inline)) void put_ipc_ns(struct ipc_namespace *ns)
4098 {
4099
4100
4101
4102 }
4103 # 5 "include/linux/sem.h" 2
4104 # 23 "include/linux/sem.h"
4105 struct semid_ds {
4106 struct ipc_perm sem_perm;
4107 __kernel_time_t sem_otime;
4108 __kernel_time_t sem_ctime;
4109 struct sem *sem_base;
4110 struct sem_queue *sem_pending;
4111 struct sem_queue **sem_pending_last;
4112 struct sem_undo *undo;
4113 unsigned short sem_nsems;
4114 };
4115
4116
4117 # 1 "include/asm/sembuf.h" 1
4118 # 14 "include/asm/sembuf.h"
4119 struct semid64_ds {
4120 struct ipc64_perm sem_perm;
4121 __kernel_time_t sem_otime;
4122 unsigned long __unused1;
4123 __kernel_time_t sem_ctime;
4124 unsigned long __unused2;
4125 unsigned long sem_nsems;
4126 unsigned long __unused3;
4127 unsigned long __unused4;
4128 };
4129 # 36 "include/linux/sem.h" 2
4130
4131
4132 struct sembuf {
4133 unsigned short sem_num;
4134 short sem_op;
4135 short sem_flg;
4136 };
4137
4138
4139 union semun {
4140 int val;
4141 struct semid_ds *buf;
4142 unsigned short *array;
4143 struct seminfo *__buf;
4144 void *__pad;
4145 };
4146
4147 struct seminfo {
4148 int semmap;
4149 int semmni;
4150 int semmns;
4151 int semmnu;
4152 int semmsl;
4153 int semopm;
4154 int semume;
4155 int semusz;
4156 int semvmx;
4157 int semaem;
4158 };
4159 # 82 "include/linux/sem.h"
4160 struct task_struct;
4161
4162
4163 struct sem {
4164 int semval;
4165 int sempid;
4166 };
4167
4168
4169 struct sem_array {
4170 struct kern_ipc_perm sem_perm;
4171 int sem_id;
4172 time_t sem_otime;
4173 time_t sem_ctime;
4174 struct sem *sem_base;
4175 struct sem_queue *sem_pending;
4176 struct sem_queue **sem_pending_last;
4177 struct sem_undo *undo;
4178 unsigned long sem_nsems;
4179 };
4180
4181
4182 struct sem_queue {
4183 struct sem_queue * next;
4184 struct sem_queue ** prev;
4185 struct task_struct* sleeper;
4186 struct sem_undo * undo;
4187 int pid;
4188 int status;
4189 struct sem_array * sma;
4190 int id;
4191 struct sembuf * sops;
4192 int nsops;
4193 int alter;
4194 };
4195
4196
4197
4198
4199 struct sem_undo {
4200 struct sem_undo * proc_next;
4201 struct sem_undo * id_next;
4202 int semid;
4203 short * semadj;
4204 };
4205
4206
4207
4208
4209 struct sem_undo_list {
4210 atomic_t refcnt;
4211 spinlock_t lock;
4212 struct sem_undo *proc_list;
4213 };
4214
4215 struct sysv_sem {
4216 struct sem_undo_list *undo_list;
4217 };
4218
4219
4220
4221
4222
4223
4224
4225 static inline __attribute__((always_inline)) int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
4226 {
4227 return 0;
4228 }
4229
4230 static inline __attribute__((always_inline)) void exit_sem(struct task_struct *tsk)
4231 {
4232 return;
4233 }
4234 # 67 "include/linux/sched.h" 2
4235 # 1 "include/linux/signal.h" 1
4236
4237
4238
4239 # 1 "include/asm/signal.h" 1
4240
4241
4242
4243
4244
4245
4246 struct siginfo;
4247 # 17 "include/asm/signal.h"
4248 typedef unsigned long old_sigset_t;
4249
4250 typedef struct {
4251 unsigned long sig[(64 / 32)];
4252 } sigset_t;
4253 # 107 "include/asm/signal.h"
4254 # 1 "include/asm-generic/signal.h" 1
4255 # 17 "include/asm-generic/signal.h"
4256 typedef void __signalfn_t(int);
4257 typedef __signalfn_t *__sighandler_t;
4258
4259 typedef void __restorefn_t(void);
4260 typedef __restorefn_t *__sigrestore_t;
4261 # 108 "include/asm/signal.h" 2
4262
4263
4264 struct old_sigaction {
4265 __sighandler_t sa_handler;
4266 old_sigset_t sa_mask;
4267 unsigned long sa_flags;
4268 void (*sa_restorer) (void);
4269 };
4270
4271 struct sigaction {
4272 __sighandler_t sa_handler;
4273 unsigned long sa_flags;
4274 void (*sa_restorer) (void);
4275 sigset_t sa_mask;
4276 };
4277
4278 struct k_sigaction {
4279 struct sigaction sa;
4280 };
4281 # 145 "include/asm/signal.h"
4282 typedef struct sigaltstack {
4283 void *ss_sp;
4284 int ss_flags;
4285 size_t ss_size;
4286 } stack_t;
4287
4288
4289
4290 # 1 "include/asm/sigcontext.h" 1
4291
4292
4293
4294
4295 struct sigcontext {
4296 unsigned long sc_mask;
4297 unsigned long sc_usp;
4298 unsigned long sc_r0;
4299 unsigned long sc_r1;
4300 unsigned long sc_r2;
4301 unsigned long sc_r3;
4302 unsigned long sc_r4;
4303 unsigned long sc_p0;
4304 unsigned long sc_p1;
4305 unsigned long sc_p2;
4306 unsigned long sc_p3;
4307 unsigned long sc_i0;
4308 unsigned long sc_i1;
4309 unsigned long sc_i2;
4310 unsigned long sc_i3;
4311 unsigned long sc_m0;
4312 unsigned long sc_m1;
4313 unsigned long sc_m2;
4314 unsigned long sc_m3;
4315 unsigned long sc_l0;
4316 unsigned long sc_l1;
4317 unsigned long sc_l2;
4318 unsigned long sc_l3;
4319 unsigned long sc_b0;
4320 unsigned long sc_b1;
4321 unsigned long sc_b2;
4322 unsigned long sc_b3;
4323 unsigned long sc_a0x;
4324 unsigned long sc_a0w;
4325 unsigned long sc_a1x;
4326 unsigned long sc_a1w;
4327 unsigned long sc_astat;
4328 unsigned long sc_rets;
4329 unsigned long sc_lc0;
4330 unsigned long sc_lc1;
4331 unsigned long sc_lt0;
4332 unsigned long sc_lt1;
4333 unsigned long sc_lb0;
4334 unsigned long sc_lb1;
4335 unsigned long sc_seqstat;
4336 unsigned long sc_pc;
4337 unsigned long sc_retx;
4338 };
4339 # 154 "include/asm/signal.h" 2
4340 # 5 "include/linux/signal.h" 2
4341 # 1 "include/asm/siginfo.h" 1
4342
4343
4344
4345
4346 # 1 "include/asm-generic/siginfo.h" 1
4347
4348
4349
4350
4351
4352
4353 typedef union sigval {
4354 int sival_int;
4355 void *sival_ptr;
4356 } sigval_t;
4357 # 40 "include/asm-generic/siginfo.h"
4358 typedef struct siginfo {
4359 int si_signo;
4360 int si_errno;
4361 int si_code;
4362
4363 union {
4364 int _pad[((128 - (3 * sizeof(int))) / sizeof(int))];
4365
4366
4367 struct {
4368 pid_t _pid;
4369 uid_t _uid;
4370 } _kill;
4371
4372
4373 struct {
4374 timer_t _tid;
4375 int _overrun;
4376 char _pad[sizeof( uid_t) - sizeof(int)];
4377 sigval_t _sigval;
4378 int _sys_private;
4379 } _timer;
4380
4381
4382 struct {
4383 pid_t _pid;
4384 uid_t _uid;
4385 sigval_t _sigval;
4386 } _rt;
4387
4388
4389 struct {
4390 pid_t _pid;
4391 uid_t _uid;
4392 int _status;
4393 clock_t _utime;
4394 clock_t _stime;
4395 } _sigchld;
4396
4397
4398 struct {
4399 void *_addr;
4400
4401
4402
4403 } _sigfault;
4404
4405
4406 struct {
4407 long _band;
4408 int _fd;
4409 } _sigpoll;
4410 } _sifields;
4411 } siginfo_t;
4412 # 251 "include/asm-generic/siginfo.h"
4413 typedef struct sigevent {
4414 sigval_t sigev_value;
4415 int sigev_signo;
4416 int sigev_notify;
4417 union {
4418 int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))];
4419 int _tid;
4420
4421 struct {
4422 void (*_function)(sigval_t);
4423 void *_attribute;
4424 } _sigev_thread;
4425 } _sigev_un;
4426 } sigevent_t;
4427
4428
4429
4430
4431
4432
4433
4434 struct siginfo;
4435 void do_schedule_next_timer(struct siginfo *info);
4436
4437
4438