add bfin ice
[ICEs.git] / bfin-5761 / super.i.0
CommitLineData
0e45bb16
MF
1# 1 "fs/sysv/super.c"
2# 1 "/usr/local/src/blackfin/git/linux-kernel//"
3# 1 "<built-in>"
4# 1 "<command-line>"
5# 1 "./include/linux/autoconf.h" 1
6# 1 "<command-line>" 2
7# 1 "fs/sysv/super.c"
8# 23 "fs/sysv/super.c"
9# 1 "include/linux/module.h" 1
10# 9 "include/linux/module.h"
11# 1 "include/linux/list.h" 1
12
13
14
15# 1 "include/linux/stddef.h" 1
16
17
18
19# 1 "include/linux/compiler.h" 1
20# 40 "include/linux/compiler.h"
21# 1 "include/linux/compiler-gcc.h" 1
22# 86 "include/linux/compiler-gcc.h"
23# 1 "include/linux/compiler-gcc4.h" 1
24# 86 "include/linux/compiler-gcc.h" 2
25# 41 "include/linux/compiler.h" 2
26# 58 "include/linux/compiler.h"
27struct ftrace_branch_data {
28 const char *func;
29 const char *file;
30 unsigned line;
31 union {
32 struct {
33 unsigned long correct;
34 unsigned long incorrect;
35 };
36 struct {
37 unsigned long miss;
38 unsigned long hit;
39 };
40 unsigned long miss_hit[2];
41 };
42};
43# 5 "include/linux/stddef.h" 2
44# 15 "include/linux/stddef.h"
45enum {
46 false = 0,
47 true = 1
48};
49# 5 "include/linux/list.h" 2
50# 1 "include/linux/poison.h" 1
51# 6 "include/linux/list.h" 2
52# 1 "include/linux/prefetch.h" 1
53# 13 "include/linux/prefetch.h"
54# 1 "include/linux/types.h" 1
55
56
57
58# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
59# 1 "include/asm-generic/types.h" 1
60
61
62
63
64
65
66# 1 "include/asm-generic/int-ll64.h" 1
67# 11 "include/asm-generic/int-ll64.h"
68# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bitsperlong.h" 1
69# 1 "include/asm-generic/bitsperlong.h" 1
70# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bitsperlong.h" 2
71# 12 "include/asm-generic/int-ll64.h" 2
72
73
74
75
76
77
78
79typedef __signed__ char __s8;
80typedef unsigned char __u8;
81
82typedef __signed__ short __s16;
83typedef unsigned short __u16;
84
85typedef __signed__ int __s32;
86typedef unsigned int __u32;
87
88
89__extension__ typedef __signed__ long long __s64;
90__extension__ typedef unsigned long long __u64;
91# 42 "include/asm-generic/int-ll64.h"
92typedef signed char s8;
93typedef unsigned char u8;
94
95typedef signed short s16;
96typedef unsigned short u16;
97
98typedef signed int s32;
99typedef unsigned int u32;
100
101typedef signed long long s64;
102typedef unsigned long long u64;
103# 8 "include/asm-generic/types.h" 2
104
105
106
107typedef unsigned short umode_t;
108# 34 "include/asm-generic/types.h"
109typedef u32 dma_addr_t;
110# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 2
111# 5 "include/linux/types.h" 2
112# 14 "include/linux/types.h"
113# 1 "include/linux/posix_types.h" 1
114# 36 "include/linux/posix_types.h"
115typedef struct {
116 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
117} __kernel_fd_set;
118
119
120typedef void (*__kernel_sighandler_t)(int);
121
122
123typedef int __kernel_key_t;
124typedef int __kernel_mqd_t;
125
126# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/posix_types.h" 1
127# 10 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/posix_types.h"
128typedef unsigned short __kernel_mode_t;
129
130
131typedef unsigned short __kernel_nlink_t;
132
133
134typedef unsigned int __kernel_ipc_pid_t;
135
136
137typedef unsigned long __kernel_size_t;
138typedef long __kernel_ssize_t;
139typedef int __kernel_ptrdiff_t;
140
141
142typedef unsigned short __kernel_old_uid_t;
143typedef unsigned short __kernel_old_gid_t;
144
145
146typedef unsigned short __kernel_old_dev_t;
147
148
149# 1 "include/asm-generic/posix_types.h" 1
150
151
152
153# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bitsperlong.h" 1
154# 5 "include/asm-generic/posix_types.h" 2
155# 14 "include/asm-generic/posix_types.h"
156typedef unsigned long __kernel_ino_t;
157# 26 "include/asm-generic/posix_types.h"
158typedef int __kernel_pid_t;
159
160
161
162
163
164
165
166typedef unsigned int __kernel_uid_t;
167typedef unsigned int __kernel_gid_t;
168
169
170
171typedef long __kernel_suseconds_t;
172
173
174
175typedef int __kernel_daddr_t;
176
177
178
179typedef __kernel_uid_t __kernel_uid32_t;
180typedef __kernel_gid_t __kernel_gid32_t;
181# 79 "include/asm-generic/posix_types.h"
182typedef long __kernel_off_t;
183typedef long long __kernel_loff_t;
184typedef long __kernel_time_t;
185typedef long __kernel_clock_t;
186typedef int __kernel_timer_t;
187typedef int __kernel_clockid_t;
188typedef char * __kernel_caddr_t;
189typedef unsigned short __kernel_uid16_t;
190typedef unsigned short __kernel_gid16_t;
191
192typedef struct {
193 int val[2];
194} __kernel_fsid_t;
195
196
197
198
199static inline __attribute__((always_inline)) void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
200{
201 unsigned long __tmp = __fd / (8 * sizeof(unsigned long));
202 unsigned long __rem = __fd % (8 * sizeof(unsigned long));
203 __fdsetp->fds_bits[__tmp] |= (1UL<<__rem);
204}
205
206
207static inline __attribute__((always_inline)) void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
208{
209 unsigned long __tmp = __fd / (8 * sizeof(unsigned long));
210 unsigned long __rem = __fd % (8 * sizeof(unsigned long));
211 __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem);
212}
213
214
215static inline __attribute__((always_inline)) int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p)
216{
217 unsigned long __tmp = __fd / (8 * sizeof(unsigned long));
218 unsigned long __rem = __fd % (8 * sizeof(unsigned long));
219 return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0;
220}
221
222
223
224
225
226
227static inline __attribute__((always_inline)) void __FD_ZERO(__kernel_fd_set *__p)
228{
229 unsigned long *__tmp = __p->fds_bits;
230 int __i;
231
232 if (__builtin_constant_p((1024/(8 * sizeof(unsigned long))))) {
233 switch ((1024/(8 * sizeof(unsigned long)))) {
234 case 16:
235 __tmp[ 0] = 0; __tmp[ 1] = 0;
236 __tmp[ 2] = 0; __tmp[ 3] = 0;
237 __tmp[ 4] = 0; __tmp[ 5] = 0;
238 __tmp[ 6] = 0; __tmp[ 7] = 0;
239 __tmp[ 8] = 0; __tmp[ 9] = 0;
240 __tmp[10] = 0; __tmp[11] = 0;
241 __tmp[12] = 0; __tmp[13] = 0;
242 __tmp[14] = 0; __tmp[15] = 0;
243 return;
244
245 case 8:
246 __tmp[ 0] = 0; __tmp[ 1] = 0;
247 __tmp[ 2] = 0; __tmp[ 3] = 0;
248 __tmp[ 4] = 0; __tmp[ 5] = 0;
249 __tmp[ 6] = 0; __tmp[ 7] = 0;
250 return;
251
252 case 4:
253 __tmp[ 0] = 0; __tmp[ 1] = 0;
254 __tmp[ 2] = 0; __tmp[ 3] = 0;
255 return;
256 }
257 }
258 __i = (1024/(8 * sizeof(unsigned long)));
259 while (__i) {
260 __i--;
261 *__tmp = 0;
262 __tmp++;
263 }
264}
265# 32 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/posix_types.h" 2
266# 48 "include/linux/posix_types.h" 2
267# 15 "include/linux/types.h" 2
268
269
270
271typedef __u32 __kernel_dev_t;
272
273typedef __kernel_fd_set fd_set;
274typedef __kernel_dev_t dev_t;
275typedef __kernel_ino_t ino_t;
276typedef __kernel_mode_t mode_t;
277typedef __kernel_nlink_t nlink_t;
278typedef __kernel_off_t off_t;
279typedef __kernel_pid_t pid_t;
280typedef __kernel_daddr_t daddr_t;
281typedef __kernel_key_t key_t;
282typedef __kernel_suseconds_t suseconds_t;
283typedef __kernel_timer_t timer_t;
284typedef __kernel_clockid_t clockid_t;
285typedef __kernel_mqd_t mqd_t;
286
287typedef _Bool bool;
288
289typedef __kernel_uid32_t uid_t;
290typedef __kernel_gid32_t gid_t;
291typedef __kernel_uid16_t uid16_t;
292typedef __kernel_gid16_t gid16_t;
293
294typedef unsigned long uintptr_t;
295
296
297
298typedef __kernel_old_uid_t old_uid_t;
299typedef __kernel_old_gid_t old_gid_t;
300
301
302
303typedef __kernel_loff_t loff_t;
304# 59 "include/linux/types.h"
305typedef __kernel_size_t size_t;
306
307
308
309
310typedef __kernel_ssize_t ssize_t;
311
312
313
314
315typedef __kernel_ptrdiff_t ptrdiff_t;
316
317
318
319
320typedef __kernel_time_t time_t;
321
322
323
324
325typedef __kernel_clock_t clock_t;
326
327
328
329
330typedef __kernel_caddr_t caddr_t;
331
332
333
334typedef unsigned char u_char;
335typedef unsigned short u_short;
336typedef unsigned int u_int;
337typedef unsigned long u_long;
338
339
340typedef unsigned char unchar;
341typedef unsigned short ushort;
342typedef unsigned int uint;
343typedef unsigned long ulong;
344
345
346
347
348typedef __u8 u_int8_t;
349typedef __s8 int8_t;
350typedef __u16 u_int16_t;
351typedef __s16 int16_t;
352typedef __u32 u_int32_t;
353typedef __s32 int32_t;
354
355
356
357typedef __u8 uint8_t;
358typedef __u16 uint16_t;
359typedef __u32 uint32_t;
360
361
362typedef __u64 uint64_t;
363typedef __u64 u_int64_t;
364typedef __s64 int64_t;
365# 135 "include/linux/types.h"
366typedef u64 sector_t;
367typedef u64 blkcnt_t;
368# 168 "include/linux/types.h"
369typedef __u16 __le16;
370typedef __u16 __be16;
371typedef __u32 __le32;
372typedef __u32 __be32;
373typedef __u64 __le64;
374typedef __u64 __be64;
375
376typedef __u16 __sum16;
377typedef __u32 __wsum;
378
379
380typedef unsigned gfp_t;
381typedef unsigned fmode_t;
382
383
384
385
386typedef u32 phys_addr_t;
387
388
389typedef phys_addr_t resource_size_t;
390
391typedef struct {
392 volatile int counter;
393} atomic_t;
394
395
396
397
398
399
400
401struct ustat {
402 __kernel_daddr_t f_tfree;
403 __kernel_ino_t f_tinode;
404 char f_fname[6];
405 char f_fpack[6];
406};
407# 14 "include/linux/prefetch.h" 2
408# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h" 1
409# 16 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h"
410# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/ptrace.h" 1
411# 30 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/ptrace.h"
412struct pt_regs {
413 long orig_pc;
414 long ipend;
415 long seqstat;
416 long rete;
417 long retn;
418 long retx;
419 long pc;
420 long rets;
421 long reserved;
422 long astat;
423 long lb1;
424 long lb0;
425 long lt1;
426 long lt0;
427 long lc1;
428 long lc0;
429 long a1w;
430 long a1x;
431 long a0w;
432 long a0x;
433 long b3;
434 long b2;
435 long b1;
436 long b0;
437 long l3;
438 long l2;
439 long l1;
440 long l0;
441 long m3;
442 long m2;
443 long m1;
444 long m0;
445 long i3;
446 long i2;
447 long i1;
448 long i0;
449 long usp;
450 long fp;
451 long p5;
452 long p4;
453 long p3;
454 long p2;
455 long p1;
456 long p0;
457 long r7;
458 long r6;
459 long r5;
460 long r4;
461 long r3;
462 long r2;
463 long r1;
464 long r0;
465 long orig_r0;
466 long orig_p0;
467 long syscfg;
468};
469# 105 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/ptrace.h"
470extern void show_regs(struct pt_regs *);
471# 17 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h" 2
472# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/blackfin.h" 1
473# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/blackfin.h"
474# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/bf533.h" 1
475# 13 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/blackfin.h" 2
476# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/defBF532.h" 1
477# 13 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/defBF532.h"
478# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/def_LPBlackfin.h" 1
479# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/def_LPBlackfin.h"
480# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/anomaly.h" 1
481# 13 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/def_LPBlackfin.h" 2
482# 14 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/defBF532.h" 2
483# 14 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/blackfin.h" 2
484# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/anomaly.h" 1
485# 15 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/blackfin.h" 2
486
487
488# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/cdefBF532.h" 1
489# 14 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/cdefBF532.h"
490# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_LPBlackfin.h" 1
491# 15 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/cdefBF532.h" 2
492# 18 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/blackfin.h" 2
493# 18 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h" 2
494
495static inline __attribute__((always_inline)) unsigned long rdusp(void)
496{
497 unsigned long usp;
498
499 __asm__ __volatile__("%0 = usp;\n\t":"=da"(usp));
500 return usp;
501}
502
503static inline __attribute__((always_inline)) void wrusp(unsigned long usp)
504{
505 __asm__ __volatile__("usp = %0;\n\t"::"da"(usp));
506}
507
508static inline __attribute__((always_inline)) unsigned long __get_SP(void)
509{
510 unsigned long sp;
511
512 __asm__ __volatile__("%0 = sp;\n\t" : "=da"(sp));
513 return sp;
514}
515# 53 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h"
516struct thread_struct {
517 unsigned long ksp;
518 unsigned long usp;
519 unsigned short seqstat;
520 unsigned long esp0;
521 unsigned long pc;
522 void * debuggerinfo;
523};
524
525
526
527
528
529
530extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
531 unsigned long new_sp);
532
533
534struct task_struct;
535
536
537static inline __attribute__((always_inline)) void release_thread(struct task_struct *dead_task)
538{
539}
540
541
542
543extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);
544
545
546
547
548static inline __attribute__((always_inline)) void exit_thread(void)
549{
550}
551
552
553
554
555
556
557unsigned long get_wchan(struct task_struct *p);
558# 109 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h"
559static inline __attribute__((always_inline)) uint32_t __attribute__((pure)) bfin_revid(void)
560{
561
562 uint32_t revid = (({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }) & 0xF0000000) >> 28;
563# 124 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h"
564 return revid;
565}
566
567static inline __attribute__((always_inline)) uint16_t __attribute__((pure)) bfin_cpuid(void)
568{
569 return (({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }) & 0x0FFFF000) >> 12;
570}
571
572static inline __attribute__((always_inline)) uint32_t __attribute__((pure)) bfin_dspid(void)
573{
574 return ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFE05000) ); __v; });
575}
576
577
578
579static inline __attribute__((always_inline)) uint32_t __attribute__((pure)) bfin_compiled_revid(void)
580{
581# 150 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h"
582 return 4;
583# 160 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/processor.h"
584}
585# 15 "include/linux/prefetch.h" 2
586# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cache.h" 1
587# 9 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cache.h"
588# 1 "include/linux/linkage.h" 1
589
590
591
592
593# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/linkage.h" 1
594# 6 "include/linux/linkage.h" 2
595# 10 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cache.h" 2
596# 16 "include/linux/prefetch.h" 2
597# 53 "include/linux/prefetch.h"
598static inline __attribute__((always_inline)) void prefetch_range(void *addr, size_t len)
599{
600
601
602
603
604
605
606
607}
608# 7 "include/linux/list.h" 2
609# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h" 1
610# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h"
611# 1 "include/linux/irqflags.h" 1
612# 14 "include/linux/irqflags.h"
613# 1 "include/linux/typecheck.h" 1
614# 15 "include/linux/irqflags.h" 2
615# 57 "include/linux/irqflags.h"
616# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irqflags.h" 1
617# 16 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irqflags.h"
618extern unsigned long bfin_irq_flags;
619
620
621static inline __attribute__((always_inline)) void bfin_sti(unsigned long flags)
622{
623 asm volatile("sti %0;" : : "d" (flags));
624}
625
626static inline __attribute__((always_inline)) unsigned long bfin_cli(void)
627{
628 unsigned long flags;
629 asm volatile("cli %0;" : "=d" (flags));
630 return flags;
631}
632# 176 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irqflags.h"
633static inline __attribute__((always_inline)) void raw_local_irq_disable(void)
634{
635 bfin_cli();
636}
637static inline __attribute__((always_inline)) void raw_local_irq_enable(void)
638{
639 bfin_sti(bfin_irq_flags);
640}
641
642
643
644
645
646static inline __attribute__((always_inline)) unsigned long __raw_local_irq_save(void)
647{
648 unsigned long flags = bfin_cli();
649
650
651
652 return flags;
653}
654# 207 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irqflags.h"
655static inline __attribute__((always_inline)) void raw_local_irq_restore(unsigned long flags)
656{
657 if (!(((flags) & ~0x3f) == 0))
658 raw_local_irq_enable();
659}
660# 58 "include/linux/irqflags.h" 2
661# 13 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h" 2
662
663
664# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pda.h" 1
665# 15 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pda.h"
666struct blackfin_pda {
667 struct blackfin_pda *next;
668
669 unsigned long syscfg;
670
671
672
673
674 unsigned long *ipdt;
675 unsigned long *ipdt_swapcount;
676 unsigned long *dpdt;
677 unsigned long *dpdt_swapcount;
678
679
680
681
682
683
684
685 unsigned long ex_iptr;
686 unsigned long ex_optr;
687 unsigned long ex_buf[4];
688 unsigned long ex_imask;
689 unsigned long ex_ipend;
690 unsigned long *ex_stack;
691
692
693 unsigned long last_cplb_fault_retx;
694
695 unsigned long dcplb_fault_addr;
696 unsigned long icplb_fault_addr;
697 unsigned long retx;
698 unsigned long seqstat;
699 unsigned int __nmi_count;
700
701 unsigned long dcplb_doublefault_addr;
702 unsigned long icplb_doublefault_addr;
703 unsigned long retx_doublefault;
704 unsigned long seqstat_doublefault;
705
706};
707
708extern struct blackfin_pda cpu_pda[];
709# 16 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h" 2
710# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irq.h" 1
711# 18 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irq.h"
712# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/irq.h" 1
713# 19 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irq.h" 2
714# 36 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irq.h"
715# 1 "include/asm-generic/irq.h" 1
716# 13 "include/asm-generic/irq.h"
717static inline __attribute__((always_inline)) int irq_canonicalize(int irq)
718{
719 return irq;
720}
721# 37 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irq.h" 2
722# 17 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h" 2
723# 107 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h"
724struct __xchg_dummy {
725 unsigned long a[100];
726};
727
728
729
730
731static inline __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void *ptr,
732 int size)
733{
734 unsigned long tmp = 0;
735 unsigned long flags;
736
737 do { (flags) = __raw_local_irq_save(); } while (0);
738
739 switch (size) {
740 case 1:
741 __asm__ __volatile__
742 ("%0 = b%2 (z);\n\t"
743 "b%2 = %1;\n\t"
744 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
745 break;
746 case 2:
747 __asm__ __volatile__
748 ("%0 = w%2 (z);\n\t"
749 "w%2 = %1;\n\t"
750 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
751 break;
752 case 4:
753 __asm__ __volatile__
754 ("%0 = %2;\n\t"
755 "%2 = %1;\n\t"
756 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
757 break;
758 }
759 raw_local_irq_restore(flags);
760 return tmp;
761}
762
763# 1 "include/asm-generic/cmpxchg-local.h" 1
764
765
766
767
768
769extern unsigned long wrong_size_cmpxchg(volatile void *ptr);
770
771
772
773
774
775static inline __attribute__((always_inline)) unsigned long __cmpxchg_local_generic(volatile void *ptr,
776 unsigned long old, unsigned long new, int size)
777{
778 unsigned long flags, prev;
779
780
781
782
783 if (size == 8 && sizeof(unsigned long) != 8)
784 wrong_size_cmpxchg(ptr);
785
786 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
787 switch (size) {
788 case 1: prev = *(u8 *)ptr;
789 if (prev == old)
790 *(u8 *)ptr = (u8)new;
791 break;
792 case 2: prev = *(u16 *)ptr;
793 if (prev == old)
794 *(u16 *)ptr = (u16)new;
795 break;
796 case 4: prev = *(u32 *)ptr;
797 if (prev == old)
798 *(u32 *)ptr = (u32)new;
799 break;
800 case 8: prev = *(u64 *)ptr;
801 if (prev == old)
802 *(u64 *)ptr = (u64)new;
803 break;
804 default:
805 wrong_size_cmpxchg(ptr);
806 }
807 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0);
808 return prev;
809}
810
811
812
813
814static inline __attribute__((always_inline)) u64 __cmpxchg64_local_generic(volatile void *ptr,
815 u64 old, u64 new)
816{
817 u64 prev;
818 unsigned long flags;
819
820 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
821 prev = *(u64 *)ptr;
822 if (prev == old)
823 *(u64 *)ptr = new;
824 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0);
825 return prev;
826}
827# 147 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h" 2
828# 157 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h"
829# 1 "include/asm-generic/cmpxchg.h" 1
830# 158 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h" 2
831# 171 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h"
832# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/l1layout.h" 1
833# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/l1layout.h"
834# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/blackfin.h" 1
835# 17 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/blackfin.h"
836static inline __attribute__((always_inline)) void SSYNC(void)
837{
838 int _tmp;
839 if ((0x0004 < 6))
840 __asm__ __volatile__(
841 "cli %0;"
842 "nop;"
843 "nop;"
844 "ssync;"
845 "sti %0;"
846 : "=d" (_tmp)
847 );
848 else if ((0x0004 < 5))
849 __asm__ __volatile__(
850 "nop;"
851 "nop;"
852 "nop;"
853 "ssync;"
854 );
855 else
856 __asm__ __volatile__("ssync;");
857}
858
859
860static inline __attribute__((always_inline)) void CSYNC(void)
861{
862 int _tmp;
863 if ((0x0004 < 6))
864 __asm__ __volatile__(
865 "cli %0;"
866 "nop;"
867 "nop;"
868 "csync;"
869 "sti %0;"
870 : "=d" (_tmp)
871 );
872 else if ((0x0004 < 5))
873 __asm__ __volatile__(
874 "nop;"
875 "nop;"
876 "nop;"
877 "csync;"
878 );
879 else
880 __asm__ __volatile__("csync;");
881}
882# 92 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/blackfin.h"
883# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/mem_map.h" 1
884# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/mem_map.h"
885# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/mach-bf533/include/mach/mem_map.h" 1
886# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/mem_map.h" 2
887# 53 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/mem_map.h"
888static inline __attribute__((always_inline)) unsigned long get_l1_scratch_start_cpu(int cpu)
889{
890 return 0xFFB00000;
891}
892static inline __attribute__((always_inline)) unsigned long get_l1_code_start_cpu(int cpu)
893{
894 return 0xFFA00000;
895}
896static inline __attribute__((always_inline)) unsigned long get_l1_data_a_start_cpu(int cpu)
897{
898 return 0xFF800000;
899}
900static inline __attribute__((always_inline)) unsigned long get_l1_data_b_start_cpu(int cpu)
901{
902 return 0xFF900000;
903}
904static inline __attribute__((always_inline)) unsigned long get_l1_scratch_start(void)
905{
906 return get_l1_scratch_start_cpu(0);
907}
908static inline __attribute__((always_inline)) unsigned long get_l1_code_start(void)
909{
910 return get_l1_code_start_cpu(0);
911}
912static inline __attribute__((always_inline)) unsigned long get_l1_data_a_start(void)
913{
914 return get_l1_data_a_start_cpu(0);
915}
916static inline __attribute__((always_inline)) unsigned long get_l1_data_b_start(void)
917{
918 return get_l1_data_b_start_cpu(0);
919}
920# 93 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/blackfin.h" 2
921
922# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bfin-global.h" 1
923# 33 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bfin-global.h"
924extern void bfin_setup_caches(unsigned int cpu);
925extern void bfin_setup_cpudata(unsigned int cpu);
926
927extern unsigned long get_cclk(void);
928extern unsigned long get_sclk(void);
929extern unsigned long sclk_to_usecs(unsigned long sclk);
930extern unsigned long usecs_to_sclk(unsigned long usecs);
931
932struct pt_regs;
933extern void dump_bfin_process(struct pt_regs *regs);
934extern void dump_bfin_mem(struct pt_regs *regs);
935extern void dump_bfin_trace_buffer(void);
936
937
938extern int init_arch_irq(void);
939extern void init_exception_vectors(void);
940extern void program_IAR(void);
941
942extern void lower_to_irq14(void);
943extern void bfin_return_from_exception(void);
944extern void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
945extern int bfin_internal_set_wake(unsigned int irq, unsigned int state);
946
947extern void *l1_data_A_sram_alloc(size_t);
948extern void *l1_data_B_sram_alloc(size_t);
949extern void *l1_inst_sram_alloc(size_t);
950extern void *l1_data_sram_alloc(size_t);
951extern void *l1_data_sram_zalloc(size_t);
952extern void *l2_sram_alloc(size_t);
953extern void *l2_sram_zalloc(size_t);
954extern int l1_data_A_sram_free(const void*);
955extern int l1_data_B_sram_free(const void*);
956extern int l1_inst_sram_free(const void*);
957extern int l1_data_sram_free(const void*);
958extern int l2_sram_free(const void *);
959extern int sram_free(const void*);
960
961
962
963
964
965
966extern void *sram_alloc_with_lsl(size_t, unsigned long);
967extern int sram_free_with_lsl(const void*);
968
969extern void *isram_memcpy(void *dest, const void *src, size_t n);
970
971extern const char bfin_board_name[];
972
973extern unsigned long bfin_sic_iwr[];
974extern unsigned vr_wakeup;
975extern u16 _bfin_swrst;
976# 95 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/blackfin.h" 2
977# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h" 1
978# 37 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
979static __inline__ __attribute__((always_inline)) void bfin_write_PLL_CTL(unsigned int val)
980{
981 unsigned long flags = 0;
982# 49 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
983 unsigned long iwr;
984
985
986 if (val == ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = w[%1] (z);" : "=d" (__v) : "a" (0xFFC00000) ); __v; }))
987 return;
988
989 do { (flags) = __raw_local_irq_save(); } while (0);
990# 70 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
991 iwr = ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00124) ); __v; });
992
993
994 __asm__ __volatile__( "nop;" "w[%0] = %1;" : : "a" (0xFFC00000), "d" ((uint16_t)(val)) : "memory" );
995 SSYNC();
996 asm("IDLE;");
997# 86 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
998 __asm__ __volatile__( "nop;" "[%0] = %1;" : : "a" (0xFFC00124), "d" (iwr) : "memory" );
999
1000 raw_local_irq_restore(flags);
1001}
1002
1003
1004static __inline__ __attribute__((always_inline)) void bfin_write_VR_CTL(unsigned int val)
1005{
1006 unsigned long flags = 0;
1007# 104 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
1008 unsigned long iwr;
1009
1010
1011 if (val == ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = w[%1] (z);" : "=d" (__v) : "a" (0xFFC00008) ); __v; }))
1012 return;
1013
1014 do { (flags) = __raw_local_irq_save(); } while (0);
1015# 125 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
1016 iwr = ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00124) ); __v; });
1017 __asm__ __volatile__( "nop;" "[%0] = %1;" : : "a" (0xFFC00124), "d" ((1 << (0))) : "memory" );
1018
1019
1020 __asm__ __volatile__( "nop;" "w[%0] = %1;" : : "a" (0xFFC00008), "d" ((uint16_t)(val)) : "memory" );
1021 SSYNC();
1022 asm("IDLE;");
1023# 142 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
1024 __asm__ __volatile__( "nop;" "[%0] = %1;" : : "a" (0xFFC00124), "d" (iwr) : "memory" );
1025
1026 raw_local_irq_restore(flags);
1027}
1028# 160 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
1029static inline __attribute__((always_inline)) void bfin_write_FIO_FLAG_D(unsigned short val) { unsigned long flags; do { (flags) = __raw_local_irq_save(); } while (0); __asm__ __volatile__( "nop;" "w[%0] = %1;" : : "a" (0xFFC00700), "d" ((uint16_t)(val)) : "memory" ); ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }); raw_local_irq_restore(flags); }
1030static inline __attribute__((always_inline)) void bfin_write_FIO_FLAG_C(unsigned short val) { unsigned long flags; do { (flags) = __raw_local_irq_save(); } while (0); __asm__ __volatile__( "nop;" "w[%0] = %1;" : : "a" (0xFFC00704), "d" ((uint16_t)(val)) : "memory" ); ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }); raw_local_irq_restore(flags); }
1031static inline __attribute__((always_inline)) void bfin_write_FIO_FLAG_S(unsigned short val) { unsigned long flags; do { (flags) = __raw_local_irq_save(); } while (0); __asm__ __volatile__( "nop;" "w[%0] = %1;" : : "a" (0xFFC00708), "d" ((uint16_t)(val)) : "memory" ); ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }); raw_local_irq_restore(flags); }
1032static inline __attribute__((always_inline)) void bfin_write_FIO_FLAG_T(unsigned short val) { unsigned long flags; do { (flags) = __raw_local_irq_save(); } while (0); __asm__ __volatile__( "nop;" "w[%0] = %1;" : : "a" (0xFFC0070C), "d" ((uint16_t)(val)) : "memory" ); ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }); raw_local_irq_restore(flags); }
1033# 176 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cdef_misc.h"
1034static inline __attribute__((always_inline)) u16 bfin_read_FIO_FLAG_D(void) { unsigned long flags; u16 ret; do { (flags) = __raw_local_irq_save(); } while (0); ret = ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = w[%1] (z);" : "=d" (__v) : "a" (0xFFC00700) ); __v; }); ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }); raw_local_irq_restore(flags); return ret; }
1035static inline __attribute__((always_inline)) u16 bfin_read_FIO_FLAG_C(void) { unsigned long flags; u16 ret; do { (flags) = __raw_local_irq_save(); } while (0); ret = ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = w[%1] (z);" : "=d" (__v) : "a" (0xFFC00704) ); __v; }); ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }); raw_local_irq_restore(flags); return ret; }
1036static inline __attribute__((always_inline)) u16 bfin_read_FIO_FLAG_S(void) { unsigned long flags; u16 ret; do { (flags) = __raw_local_irq_save(); } while (0); ret = ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = w[%1] (z);" : "=d" (__v) : "a" (0xFFC00708) ); __v; }); ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }); raw_local_irq_restore(flags); return ret; }
1037static inline __attribute__((always_inline)) u16 bfin_read_FIO_FLAG_T(void) { unsigned long flags; u16 ret; do { (flags) = __raw_local_irq_save(); } while (0); ret = ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = w[%1] (z);" : "=d" (__v) : "a" (0xFFC0070C) ); __v; }); ({ uint32_t __v; __asm__ __volatile__( "nop;" "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }); raw_local_irq_restore(flags); return ret; }
1038# 96 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/blackfin.h" 2
1039# 13 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/l1layout.h" 2
1040
1041
1042
1043
1044
1045
1046
1047struct l1_scratch_task_info
1048{
1049
1050 void *stack_start;
1051
1052
1053
1054 void *lowest_sp;
1055};
1056# 172 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/system.h" 2
1057
1058
1059 struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
1060# 8 "include/linux/list.h" 2
1061# 19 "include/linux/list.h"
1062struct list_head {
1063 struct list_head *next, *prev;
1064};
1065
1066
1067
1068
1069
1070
1071static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list)
1072{
1073 list->next = list;
1074 list->prev = list;
1075}
1076# 41 "include/linux/list.h"
1077static inline __attribute__((always_inline)) void __list_add(struct list_head *new,
1078 struct list_head *prev,
1079 struct list_head *next)
1080{
1081 next->prev = new;
1082 new->next = next;
1083 new->prev = prev;
1084 prev->next = new;
1085}
1086# 64 "include/linux/list.h"
1087static inline __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head)
1088{
1089 __list_add(new, head, head->next);
1090}
1091# 78 "include/linux/list.h"
1092static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head)
1093{
1094 __list_add(new, head->prev, head);
1095}
1096# 90 "include/linux/list.h"
1097static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next)
1098{
1099 next->prev = prev;
1100 prev->next = next;
1101}
1102# 103 "include/linux/list.h"
1103static inline __attribute__((always_inline)) void list_del(struct list_head *entry)
1104{
1105 __list_del(entry->prev, entry->next);
1106 entry->next = ((void *) 0x00100100);
1107 entry->prev = ((void *) 0x00200200);
1108}
1109# 120 "include/linux/list.h"
1110static inline __attribute__((always_inline)) void list_replace(struct list_head *old,
1111 struct list_head *new)
1112{
1113 new->next = old->next;
1114 new->next->prev = new;
1115 new->prev = old->prev;
1116 new->prev->next = new;
1117}
1118
1119static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old,
1120 struct list_head *new)
1121{
1122 list_replace(old, new);
1123 INIT_LIST_HEAD(old);
1124}
1125
1126
1127
1128
1129
1130static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry)
1131{
1132 __list_del(entry->prev, entry->next);
1133 INIT_LIST_HEAD(entry);
1134}
1135
1136
1137
1138
1139
1140
1141static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head)
1142{
1143 __list_del(list->prev, list->next);
1144 list_add(list, head);
1145}
1146
1147
1148
1149
1150
1151
1152static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list,
1153 struct list_head *head)
1154{
1155 __list_del(list->prev, list->next);
1156 list_add_tail(list, head);
1157}
1158
1159
1160
1161
1162
1163
1164static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list,
1165 const struct list_head *head)
1166{
1167 return list->next == head;
1168}
1169
1170
1171
1172
1173
1174static inline __attribute__((always_inline)) int list_empty(const struct list_head *head)
1175{
1176 return head->next == head;
1177}
1178# 202 "include/linux/list.h"
1179static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head)
1180{
1181 struct list_head *next = head->next;
1182 return (next == head) && (next == head->prev);
1183}
1184
1185
1186
1187
1188
1189static inline __attribute__((always_inline)) int list_is_singular(const struct list_head *head)
1190{
1191 return !list_empty(head) && (head->next == head->prev);
1192}
1193
1194static inline __attribute__((always_inline)) void __list_cut_position(struct list_head *list,
1195 struct list_head *head, struct list_head *entry)
1196{
1197 struct list_head *new_first = entry->next;
1198 list->next = head->next;
1199 list->next->prev = list;
1200 list->prev = entry;
1201 entry->next = list;
1202 head->next = new_first;
1203 new_first->prev = head;
1204}
1205# 243 "include/linux/list.h"
1206static inline __attribute__((always_inline)) void list_cut_position(struct list_head *list,
1207 struct list_head *head, struct list_head *entry)
1208{
1209 if (list_empty(head))
1210 return;
1211 if (list_is_singular(head) &&
1212 (head->next != entry && head != entry))
1213 return;
1214 if (entry == head)
1215 INIT_LIST_HEAD(list);
1216 else
1217 __list_cut_position(list, head, entry);
1218}
1219
1220static inline __attribute__((always_inline)) void __list_splice(const struct list_head *list,
1221 struct list_head *prev,
1222 struct list_head *next)
1223{
1224 struct list_head *first = list->next;
1225 struct list_head *last = list->prev;
1226
1227 first->prev = prev;
1228 prev->next = first;
1229
1230 last->next = next;
1231 next->prev = last;
1232}
1233
1234
1235
1236
1237
1238
1239static inline __attribute__((always_inline)) void list_splice(const struct list_head *list,
1240 struct list_head *head)
1241{
1242 if (!list_empty(list))
1243 __list_splice(list, head, head->next);
1244}
1245
1246
1247
1248
1249
1250
1251static inline __attribute__((always_inline)) void list_splice_tail(struct list_head *list,
1252 struct list_head *head)
1253{
1254 if (!list_empty(list))
1255 __list_splice(list, head->prev, head);
1256}
1257# 302 "include/linux/list.h"
1258static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list,
1259 struct list_head *head)
1260{
1261 if (!list_empty(list)) {
1262 __list_splice(list, head, head->next);
1263 INIT_LIST_HEAD(list);
1264 }
1265}
1266# 319 "include/linux/list.h"
1267static inline __attribute__((always_inline)) void list_splice_tail_init(struct list_head *list,
1268 struct list_head *head)
1269{
1270 if (!list_empty(list)) {
1271 __list_splice(list, head->prev, head);
1272 INIT_LIST_HEAD(list);
1273 }
1274}
1275# 540 "include/linux/list.h"
1276struct hlist_head {
1277 struct hlist_node *first;
1278};
1279
1280struct hlist_node {
1281 struct hlist_node *next, **pprev;
1282};
1283
1284
1285
1286
1287static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h)
1288{
1289 h->next = ((void *)0);
1290 h->pprev = ((void *)0);
1291}
1292
1293static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h)
1294{
1295 return !h->pprev;
1296}
1297
1298static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h)
1299{
1300 return !h->first;
1301}
1302
1303static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n)
1304{
1305 struct hlist_node *next = n->next;
1306 struct hlist_node **pprev = n->pprev;
1307 *pprev = next;
1308 if (next)
1309 next->pprev = pprev;
1310}
1311
1312static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n)
1313{
1314 __hlist_del(n);
1315 n->next = ((void *) 0x00100100);
1316 n->pprev = ((void *) 0x00200200);
1317}
1318
1319static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n)
1320{
1321 if (!hlist_unhashed(n)) {
1322 __hlist_del(n);
1323 INIT_HLIST_NODE(n);
1324 }
1325}
1326
1327static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
1328{
1329 struct hlist_node *first = h->first;
1330 n->next = first;
1331 if (first)
1332 first->pprev = &n->next;
1333 h->first = n;
1334 n->pprev = &h->first;
1335}
1336
1337
1338static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n,
1339 struct hlist_node *next)
1340{
1341 n->pprev = next->pprev;
1342 n->next = next;
1343 next->pprev = &n->next;
1344 *(n->pprev) = n;
1345}
1346
1347static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n,
1348 struct hlist_node *next)
1349{
1350 next->next = n->next;
1351 n->next = next;
1352 next->pprev = &n->next;
1353
1354 if(next->next)
1355 next->next->pprev = &next->next;
1356}
1357
1358
1359
1360
1361
1362static inline __attribute__((always_inline)) void hlist_move_list(struct hlist_head *old,
1363 struct hlist_head *new)
1364{
1365 new->first = old->first;
1366 if (new->first)
1367 new->first->pprev = &new->first;
1368 old->first = ((void *)0);
1369}
1370# 10 "include/linux/module.h" 2
1371# 1 "include/linux/stat.h" 1
1372
1373
1374
1375
1376
1377# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/stat.h" 1
1378# 10 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/stat.h"
1379struct stat {
1380 unsigned short st_dev;
1381 unsigned short __pad1;
1382 unsigned long st_ino;
1383 unsigned short st_mode;
1384 unsigned short st_nlink;
1385 unsigned short st_uid;
1386 unsigned short st_gid;
1387 unsigned short st_rdev;
1388 unsigned short __pad2;
1389 unsigned long st_size;
1390 unsigned long st_blksize;
1391 unsigned long st_blocks;
1392 unsigned long st_atime;
1393 unsigned long __unused1;
1394 unsigned long st_mtime;
1395 unsigned long __unused2;
1396 unsigned long st_ctime;
1397 unsigned long __unused3;
1398 unsigned long __unused4;
1399 unsigned long __unused5;
1400};
1401
1402
1403
1404
1405struct stat64 {
1406 unsigned long long st_dev;
1407 unsigned char __pad1[4];
1408
1409
1410 unsigned long __st_ino;
1411
1412 unsigned int st_mode;
1413 unsigned int st_nlink;
1414
1415 unsigned long st_uid;
1416 unsigned long st_gid;
1417
1418 unsigned long long st_rdev;
1419 unsigned char __pad2[4];
1420
1421 long long st_size;
1422 unsigned long st_blksize;
1423
1424 long long st_blocks;
1425
1426 unsigned long st_atime;
1427 unsigned long st_atime_nsec;
1428
1429 unsigned long st_mtime;
1430 unsigned long st_mtime_nsec;
1431
1432 unsigned long st_ctime;
1433 unsigned long st_ctime_nsec;
1434
1435 unsigned long long st_ino;
1436};
1437# 7 "include/linux/stat.h" 2
1438# 60 "include/linux/stat.h"
1439# 1 "include/linux/time.h" 1
1440
1441
1442
1443
1444
1445
1446# 1 "include/linux/cache.h" 1
1447
1448
1449
1450# 1 "include/linux/kernel.h" 1
1451# 10 "include/linux/kernel.h"
1452# 1 "/usr/local/src/blackfin/toolchains/20091208/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.4/include/stdarg.h" 1 3 4
1453# 43 "/usr/local/src/blackfin/toolchains/20091208/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.4/include/stdarg.h" 3 4
1454typedef __builtin_va_list __gnuc_va_list;
1455# 105 "/usr/local/src/blackfin/toolchains/20091208/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.4/include/stdarg.h" 3 4
1456typedef __gnuc_va_list va_list;
1457# 11 "include/linux/kernel.h" 2
1458
1459
1460
1461
1462# 1 "include/linux/bitops.h" 1
1463
1464
1465# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1466# 4 "include/linux/bitops.h" 2
1467# 17 "include/linux/bitops.h"
1468# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bitops.h" 1
1469# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bitops.h"
1470# 1 "include/asm-generic/bitops.h" 1
1471# 23 "include/asm-generic/bitops.h"
1472# 1 "include/asm-generic/bitops/__ffs.h" 1
1473
1474
1475
1476# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1477# 5 "include/asm-generic/bitops/__ffs.h" 2
1478
1479
1480
1481
1482
1483
1484
1485static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __ffs(unsigned long word)
1486{
1487 int num = 0;
1488
1489
1490
1491
1492
1493
1494
1495 if ((word & 0xffff) == 0) {
1496 num += 16;
1497 word >>= 16;
1498 }
1499 if ((word & 0xff) == 0) {
1500 num += 8;
1501 word >>= 8;
1502 }
1503 if ((word & 0xf) == 0) {
1504 num += 4;
1505 word >>= 4;
1506 }
1507 if ((word & 0x3) == 0) {
1508 num += 2;
1509 word >>= 2;
1510 }
1511 if ((word & 0x1) == 0)
1512 num += 1;
1513 return num;
1514}
1515# 24 "include/asm-generic/bitops.h" 2
1516# 1 "include/asm-generic/bitops/ffz.h" 1
1517# 25 "include/asm-generic/bitops.h" 2
1518# 1 "include/asm-generic/bitops/fls.h" 1
1519# 12 "include/asm-generic/bitops/fls.h"
1520static inline __attribute__((always_inline)) __attribute__((always_inline)) int fls(int x)
1521{
1522 int r = 32;
1523
1524 if (!x)
1525 return 0;
1526 if (!(x & 0xffff0000u)) {
1527 x <<= 16;
1528 r -= 16;
1529 }
1530 if (!(x & 0xff000000u)) {
1531 x <<= 8;
1532 r -= 8;
1533 }
1534 if (!(x & 0xf0000000u)) {
1535 x <<= 4;
1536 r -= 4;
1537 }
1538 if (!(x & 0xc0000000u)) {
1539 x <<= 2;
1540 r -= 2;
1541 }
1542 if (!(x & 0x80000000u)) {
1543 x <<= 1;
1544 r -= 1;
1545 }
1546 return r;
1547}
1548# 26 "include/asm-generic/bitops.h" 2
1549# 1 "include/asm-generic/bitops/__fls.h" 1
1550
1551
1552
1553# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1554# 5 "include/asm-generic/bitops/__fls.h" 2
1555
1556
1557
1558
1559
1560
1561
1562static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __fls(unsigned long word)
1563{
1564 int num = 32 - 1;
1565
1566
1567
1568
1569
1570
1571
1572 if (!(word & (~0ul << (32 -16)))) {
1573 num -= 16;
1574 word <<= 16;
1575 }
1576 if (!(word & (~0ul << (32 -8)))) {
1577 num -= 8;
1578 word <<= 8;
1579 }
1580 if (!(word & (~0ul << (32 -4)))) {
1581 num -= 4;
1582 word <<= 4;
1583 }
1584 if (!(word & (~0ul << (32 -2)))) {
1585 num -= 2;
1586 word <<= 2;
1587 }
1588 if (!(word & (~0ul << (32 -1))))
1589 num -= 1;
1590 return num;
1591}
1592# 27 "include/asm-generic/bitops.h" 2
1593# 1 "include/asm-generic/bitops/fls64.h" 1
1594
1595
1596
1597# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1598# 5 "include/asm-generic/bitops/fls64.h" 2
1599# 18 "include/asm-generic/bitops/fls64.h"
1600static inline __attribute__((always_inline)) __attribute__((always_inline)) int fls64(__u64 x)
1601{
1602 __u32 h = x >> 32;
1603 if (h)
1604 return fls(h) + 32;
1605 return fls(x);
1606}
1607# 28 "include/asm-generic/bitops.h" 2
1608# 1 "include/asm-generic/bitops/find.h" 1
1609# 29 "include/asm-generic/bitops.h" 2
1610
1611
1612
1613
1614
1615# 1 "include/asm-generic/bitops/sched.h" 1
1616
1617
1618
1619
1620# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1621# 6 "include/asm-generic/bitops/sched.h" 2
1622
1623
1624
1625
1626
1627
1628static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b)
1629{
1630
1631
1632
1633
1634
1635 if (b[0])
1636 return __ffs(b[0]);
1637 if (b[1])
1638 return __ffs(b[1]) + 32;
1639 if (b[2])
1640 return __ffs(b[2]) + 64;
1641 return __ffs(b[3]) + 96;
1642
1643
1644
1645}
1646# 35 "include/asm-generic/bitops.h" 2
1647# 1 "include/asm-generic/bitops/ffs.h" 1
1648# 12 "include/asm-generic/bitops/ffs.h"
1649static inline __attribute__((always_inline)) int ffs(int x)
1650{
1651 int r = 1;
1652
1653 if (!x)
1654 return 0;
1655 if (!(x & 0xffff)) {
1656 x >>= 16;
1657 r += 16;
1658 }
1659 if (!(x & 0xff)) {
1660 x >>= 8;
1661 r += 8;
1662 }
1663 if (!(x & 0xf)) {
1664 x >>= 4;
1665 r += 4;
1666 }
1667 if (!(x & 3)) {
1668 x >>= 2;
1669 r += 2;
1670 }
1671 if (!(x & 1)) {
1672 x >>= 1;
1673 r += 1;
1674 }
1675 return r;
1676}
1677# 36 "include/asm-generic/bitops.h" 2
1678# 1 "include/asm-generic/bitops/hweight.h" 1
1679
1680
1681
1682# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1683# 5 "include/asm-generic/bitops/hweight.h" 2
1684
1685extern unsigned int hweight32(unsigned int w);
1686extern unsigned int hweight16(unsigned int w);
1687extern unsigned int hweight8(unsigned int w);
1688extern unsigned long hweight64(__u64 w);
1689# 37 "include/asm-generic/bitops.h" 2
1690# 1 "include/asm-generic/bitops/lock.h" 1
1691# 38 "include/asm-generic/bitops.h" 2
1692
1693# 1 "include/asm-generic/bitops/atomic.h" 1
1694
1695
1696
1697# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1698# 5 "include/asm-generic/bitops/atomic.h" 2
1699# 65 "include/asm-generic/bitops/atomic.h"
1700static inline __attribute__((always_inline)) void set_bit(int nr, volatile unsigned long *addr)
1701{
1702 unsigned long mask = (1UL << ((nr) % 32));
1703 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1704 unsigned long flags;
1705
1706 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0); } while (0);
1707 *p |= mask;
1708 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0); } while (0);
1709}
1710# 86 "include/asm-generic/bitops/atomic.h"
1711static inline __attribute__((always_inline)) void clear_bit(int nr, volatile unsigned long *addr)
1712{
1713 unsigned long mask = (1UL << ((nr) % 32));
1714 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1715 unsigned long flags;
1716
1717 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0); } while (0);
1718 *p &= ~mask;
1719 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0); } while (0);
1720}
1721# 107 "include/asm-generic/bitops/atomic.h"
1722static inline __attribute__((always_inline)) void change_bit(int nr, volatile unsigned long *addr)
1723{
1724 unsigned long mask = (1UL << ((nr) % 32));
1725 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1726 unsigned long flags;
1727
1728 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0); } while (0);
1729 *p ^= mask;
1730 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0); } while (0);
1731}
1732# 127 "include/asm-generic/bitops/atomic.h"
1733static inline __attribute__((always_inline)) int test_and_set_bit(int nr, volatile unsigned long *addr)
1734{
1735 unsigned long mask = (1UL << ((nr) % 32));
1736 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1737 unsigned long old;
1738 unsigned long flags;
1739
1740 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0); } while (0);
1741 old = *p;
1742 *p = old | mask;
1743 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0); } while (0);
1744
1745 return (old & mask) != 0;
1746}
1747# 151 "include/asm-generic/bitops/atomic.h"
1748static inline __attribute__((always_inline)) int test_and_clear_bit(int nr, volatile unsigned long *addr)
1749{
1750 unsigned long mask = (1UL << ((nr) % 32));
1751 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1752 unsigned long old;
1753 unsigned long flags;
1754
1755 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0); } while (0);
1756 old = *p;
1757 *p = old & ~mask;
1758 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0); } while (0);
1759
1760 return (old & mask) != 0;
1761}
1762# 174 "include/asm-generic/bitops/atomic.h"
1763static inline __attribute__((always_inline)) int test_and_change_bit(int nr, volatile unsigned long *addr)
1764{
1765 unsigned long mask = (1UL << ((nr) % 32));
1766 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1767 unsigned long old;
1768 unsigned long flags;
1769
1770 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0); } while (0);
1771 old = *p;
1772 *p = old ^ mask;
1773 do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0); } while (0);
1774
1775 return (old & mask) != 0;
1776}
1777# 40 "include/asm-generic/bitops.h" 2
1778# 1 "include/asm-generic/bitops/non-atomic.h" 1
1779
1780
1781
1782# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1783# 5 "include/asm-generic/bitops/non-atomic.h" 2
1784# 15 "include/asm-generic/bitops/non-atomic.h"
1785static inline __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long *addr)
1786{
1787 unsigned long mask = (1UL << ((nr) % 32));
1788 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1789
1790 *p |= mask;
1791}
1792
1793static inline __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *addr)
1794{
1795 unsigned long mask = (1UL << ((nr) % 32));
1796 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1797
1798 *p &= ~mask;
1799}
1800# 40 "include/asm-generic/bitops/non-atomic.h"
1801static inline __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *addr)
1802{
1803 unsigned long mask = (1UL << ((nr) % 32));
1804 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1805
1806 *p ^= mask;
1807}
1808# 57 "include/asm-generic/bitops/non-atomic.h"
1809static inline __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long *addr)
1810{
1811 unsigned long mask = (1UL << ((nr) % 32));
1812 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1813 unsigned long old = *p;
1814
1815 *p = old | mask;
1816 return (old & mask) != 0;
1817}
1818# 76 "include/asm-generic/bitops/non-atomic.h"
1819static inline __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *addr)
1820{
1821 unsigned long mask = (1UL << ((nr) % 32));
1822 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1823 unsigned long old = *p;
1824
1825 *p = old & ~mask;
1826 return (old & mask) != 0;
1827}
1828
1829
1830static inline __attribute__((always_inline)) int __test_and_change_bit(int nr,
1831 volatile unsigned long *addr)
1832{
1833 unsigned long mask = (1UL << ((nr) % 32));
1834 unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
1835 unsigned long old = *p;
1836
1837 *p = old ^ mask;
1838 return (old & mask) != 0;
1839}
1840
1841
1842
1843
1844
1845
1846static inline __attribute__((always_inline)) int test_bit(int nr, const volatile unsigned long *addr)
1847{
1848 return 1UL & (addr[((nr) / 32)] >> (nr & (32 -1)));
1849}
1850# 41 "include/asm-generic/bitops.h" 2
1851# 1 "include/asm-generic/bitops/ext2-non-atomic.h" 1
1852
1853
1854
1855# 1 "include/asm-generic/bitops/le.h" 1
1856
1857
1858
1859# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
1860# 5 "include/asm-generic/bitops/le.h" 2
1861# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/byteorder.h" 1
1862# 1 "include/linux/byteorder/little_endian.h" 1
1863# 12 "include/linux/byteorder/little_endian.h"
1864# 1 "include/linux/swab.h" 1
1865
1866
1867
1868
1869
1870# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/swab.h" 1
1871# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/swab.h"
1872# 1 "include/asm-generic/swab.h" 1
1873
1874
1875
1876# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bitsperlong.h" 1
1877# 5 "include/asm-generic/swab.h" 2
1878# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/swab.h" 2
1879
1880
1881
1882static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __arch_swahb32(__u32 xx)
1883{
1884 __u32 tmp;
1885 __asm__("%1 = %0 >> 8 (V);\n\t"
1886 "%0 = %0 << 8 (V);\n\t"
1887 "%0 = %0 | %1;\n\t"
1888 : "+d"(xx), "=&d"(tmp));
1889 return xx;
1890}
1891
1892
1893static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __arch_swahw32(__u32 xx)
1894{
1895 __u32 rv;
1896 __asm__("%0 = PACK(%1.L, %1.H);\n\t": "=d"(rv): "d"(xx));
1897 return rv;
1898}
1899
1900
1901static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __arch_swab32(__u32 xx)
1902{
1903 return __arch_swahb32(__arch_swahw32(xx));
1904}
1905
1906
1907static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 __arch_swab16(__u16 xx)
1908{
1909 __u32 xw = xx;
1910 __asm__("%0 <<= 8;\n %0.L = %0.L + %0.H (NS);\n": "+d"(xw));
1911 return (__u16)xw;
1912}
1913# 7 "include/linux/swab.h" 2
1914# 46 "include/linux/swab.h"
1915static inline __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 val)
1916{
1917
1918 return __arch_swab16(val);
1919
1920
1921
1922}
1923
1924static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 val)
1925{
1926
1927 return __arch_swab32(val);
1928
1929
1930
1931}
1932
1933static inline __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 val)
1934{
1935
1936
1937
1938 __u32 h = val >> 32;
1939 __u32 l = val & ((1ULL << 32) - 1);
1940 return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));
1941
1942
1943
1944}
1945
1946static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswahw32(__u32 val)
1947{
1948
1949 return __arch_swahw32(val);
1950
1951
1952
1953}
1954
1955static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswahb32(__u32 val)
1956{
1957
1958 return __arch_swahb32(val);
1959
1960
1961
1962}
1963# 148 "include/linux/swab.h"
1964static inline __attribute__((always_inline)) __u16 __swab16p(const __u16 *p)
1965{
1966
1967
1968
1969 return (__builtin_constant_p((__u16)(*p)) ? ((__u16)( (((__u16)(*p) & (__u16)0x00ffU) << 8) | (((__u16)(*p) & (__u16)0xff00U) >> 8))) : __fswab16(*p));
1970
1971}
1972
1973
1974
1975
1976
1977static inline __attribute__((always_inline)) __u32 __swab32p(const __u32 *p)
1978{
1979
1980
1981
1982 return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x000000ffUL) << 24) | (((__u32)(*p) & (__u32)0x0000ff00UL) << 8) | (((__u32)(*p) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(*p) & (__u32)0xff000000UL) >> 24))) : __fswab32(*p));
1983
1984}
1985
1986
1987
1988
1989
1990static inline __attribute__((always_inline)) __u64 __swab64p(const __u64 *p)
1991{
1992
1993
1994
1995 return (__builtin_constant_p((__u64)(*p)) ? ((__u64)( (((__u64)(*p) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(*p) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(*p) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(*p) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(*p) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(*p) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(*p) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(*p) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(*p));
1996
1997}
1998
1999
2000
2001
2002
2003
2004
2005static inline __attribute__((always_inline)) __u32 __swahw32p(const __u32 *p)
2006{
2007
2008
2009
2010 return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x0000ffffUL) << 16) | (((__u32)(*p) & (__u32)0xffff0000UL) >> 16))) : __fswahw32(*p));
2011
2012}
2013
2014
2015
2016
2017
2018
2019
2020static inline __attribute__((always_inline)) __u32 __swahb32p(const __u32 *p)
2021{
2022
2023
2024
2025 return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(*p) & (__u32)0xff00ff00UL) >> 8))) : __fswahb32(*p));
2026
2027}
2028
2029
2030
2031
2032
2033static inline __attribute__((always_inline)) void __swab16s(__u16 *p)
2034{
2035
2036
2037
2038 *p = __swab16p(p);
2039
2040}
2041
2042
2043
2044
2045static inline __attribute__((always_inline)) void __swab32s(__u32 *p)
2046{
2047
2048
2049
2050 *p = __swab32p(p);
2051
2052}
2053
2054
2055
2056
2057
2058static inline __attribute__((always_inline)) void __swab64s(__u64 *p)
2059{
2060
2061
2062
2063 *p = __swab64p(p);
2064
2065}
2066
2067
2068
2069
2070
2071
2072
2073static inline __attribute__((always_inline)) void __swahw32s(__u32 *p)
2074{
2075
2076
2077
2078 *p = __swahw32p(p);
2079
2080}
2081
2082
2083
2084
2085
2086
2087
2088static inline __attribute__((always_inline)) void __swahb32s(__u32 *p)
2089{
2090
2091
2092
2093 *p = __swahb32p(p);
2094
2095}
2096# 13 "include/linux/byteorder/little_endian.h" 2
2097# 43 "include/linux/byteorder/little_endian.h"
2098static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p)
2099{
2100 return ( __le64)*p;
2101}
2102static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p)
2103{
2104 return ( __u64)*p;
2105}
2106static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p)
2107{
2108 return ( __le32)*p;
2109}
2110static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p)
2111{
2112 return ( __u32)*p;
2113}
2114static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p)
2115{
2116 return ( __le16)*p;
2117}
2118static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p)
2119{
2120 return ( __u16)*p;
2121}
2122static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p)
2123{
2124 return ( __be64)__swab64p(p);
2125}
2126static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p)
2127{
2128 return __swab64p((__u64 *)p);
2129}
2130static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p)
2131{
2132 return ( __be32)__swab32p(p);
2133}
2134static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p)
2135{
2136 return __swab32p((__u32 *)p);
2137}
2138static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p)
2139{
2140 return ( __be16)__swab16p(p);
2141}
2142static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p)
2143{
2144 return __swab16p((__u16 *)p);
2145}
2146# 105 "include/linux/byteorder/little_endian.h"
2147# 1 "include/linux/byteorder/generic.h" 1
2148# 143 "include/linux/byteorder/generic.h"
2149static inline __attribute__((always_inline)) void le16_add_cpu(__le16 *var, u16 val)
2150{
2151 *var = (( __le16)(__u16)((( __u16)(__le16)(*var)) + val));
2152}
2153
2154static inline __attribute__((always_inline)) void le32_add_cpu(__le32 *var, u32 val)
2155{
2156 *var = (( __le32)(__u32)((( __u32)(__le32)(*var)) + val));
2157}
2158
2159static inline __attribute__((always_inline)) void le64_add_cpu(__le64 *var, u64 val)
2160{
2161 *var = (( __le64)(__u64)((( __u64)(__le64)(*var)) + val));
2162}
2163
2164static inline __attribute__((always_inline)) void be16_add_cpu(__be16 *var, u16 val)
2165{
2166 *var = (( __be16)(__builtin_constant_p((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val))) ? ((__u16)( (((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val)) & (__u16)0x00ffU) << 8) | (((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val)) & (__u16)0xff00U) >> 8))) : __fswab16(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val))));
2167}
2168
2169static inline __attribute__((always_inline)) void be32_add_cpu(__be32 *var, u32 val)
2170{
2171 *var = (( __be32)(__builtin_constant_p((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val))) ? ((__u32)( (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x000000ffUL) << 24) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0xff000000UL) >> 24))) : __fswab32(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val))));
2172}
2173
2174static inline __attribute__((always_inline)) void be64_add_cpu(__be64 *var, u64 val)
2175{
2176 *var = (( __be64)(__builtin_constant_p((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val))) ? ((__u64)( (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val))));
2177}
2178# 106 "include/linux/byteorder/little_endian.h" 2
2179# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/byteorder.h" 2
2180# 6 "include/asm-generic/bitops/le.h" 2
2181# 5 "include/asm-generic/bitops/ext2-non-atomic.h" 2
2182# 42 "include/asm-generic/bitops.h" 2
2183# 1 "include/asm-generic/bitops/ext2-atomic.h" 1
2184# 43 "include/asm-generic/bitops.h" 2
2185# 1 "include/asm-generic/bitops/minix.h" 1
2186# 44 "include/asm-generic/bitops.h" 2
2187# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bitops.h" 2
2188# 18 "include/linux/bitops.h" 2
2189
2190
2191
2192
2193
2194
2195
2196static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count)
2197{
2198 int order;
2199
2200 order = fls(count);
2201 return order;
2202}
2203
2204static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count)
2205{
2206 int order;
2207
2208 order = fls(count) - 1;
2209 if (count & (count - 1))
2210 order++;
2211 return order;
2212}
2213
2214static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
2215{
2216 return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
2217}
2218
2219
2220
2221
2222
2223
2224static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift)
2225{
2226 return (word << shift) | (word >> (32 - shift));
2227}
2228
2229
2230
2231
2232
2233
2234static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift)
2235{
2236 return (word >> shift) | (word << (32 - shift));
2237}
2238
2239
2240
2241
2242
2243
2244static inline __attribute__((always_inline)) __u16 rol16(__u16 word, unsigned int shift)
2245{
2246 return (word << shift) | (word >> (16 - shift));
2247}
2248
2249
2250
2251
2252
2253
2254static inline __attribute__((always_inline)) __u16 ror16(__u16 word, unsigned int shift)
2255{
2256 return (word >> shift) | (word << (16 - shift));
2257}
2258
2259
2260
2261
2262
2263
2264static inline __attribute__((always_inline)) __u8 rol8(__u8 word, unsigned int shift)
2265{
2266 return (word << shift) | (word >> (8 - shift));
2267}
2268
2269
2270
2271
2272
2273
2274static inline __attribute__((always_inline)) __u8 ror8(__u8 word, unsigned int shift)
2275{
2276 return (word >> shift) | (word << (8 - shift));
2277}
2278
2279static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l)
2280{
2281 if (sizeof(l) == 4)
2282 return fls(l);
2283 return fls64(l);
2284}
2285# 123 "include/linux/bitops.h"
2286static inline __attribute__((always_inline)) unsigned long __ffs64(u64 word)
2287{
2288
2289 if (((u32)word) == 0UL)
2290 return __ffs((u32)(word >> 32)) + 32;
2291
2292
2293
2294 return __ffs((unsigned long)word);
2295}
2296# 166 "include/linux/bitops.h"
2297extern unsigned long find_last_bit(const unsigned long *addr,
2298 unsigned long size);
2299# 178 "include/linux/bitops.h"
2300extern unsigned long find_next_bit(const unsigned long *addr,
2301 unsigned long size, unsigned long offset);
2302# 188 "include/linux/bitops.h"
2303extern unsigned long find_next_zero_bit(const unsigned long *addr,
2304 unsigned long size,
2305 unsigned long offset);
2306# 16 "include/linux/kernel.h" 2
2307# 1 "include/linux/log2.h" 1
2308# 21 "include/linux/log2.h"
2309extern __attribute__((const, noreturn))
2310int ____ilog2_NaN(void);
2311# 31 "include/linux/log2.h"
2312static inline __attribute__((always_inline)) __attribute__((const))
2313int __ilog2_u32(u32 n)
2314{
2315 return fls(n) - 1;
2316}
2317
2318
2319
2320static inline __attribute__((always_inline)) __attribute__((const))
2321int __ilog2_u64(u64 n)
2322{
2323 return fls64(n) - 1;
2324}
2325
2326
2327
2328
2329
2330
2331
2332static inline __attribute__((always_inline)) __attribute__((const))
2333bool is_power_of_2(unsigned long n)
2334{
2335 return (n != 0 && ((n & (n - 1)) == 0));
2336}
2337
2338
2339
2340
2341static inline __attribute__((always_inline)) __attribute__((const))
2342unsigned long __roundup_pow_of_two(unsigned long n)
2343{
2344 return 1UL << fls_long(n - 1);
2345}
2346
2347
2348
2349
2350static inline __attribute__((always_inline)) __attribute__((const))
2351unsigned long __rounddown_pow_of_two(unsigned long n)
2352{
2353 return 1UL << (fls_long(n) - 1);
2354}
2355# 17 "include/linux/kernel.h" 2
2356
2357# 1 "include/linux/ratelimit.h" 1
2358
2359
2360# 1 "include/linux/param.h" 1
2361
2362
2363
2364# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/param.h" 1
2365# 1 "include/asm-generic/param.h" 1
2366# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/param.h" 2
2367# 5 "include/linux/param.h" 2
2368# 4 "include/linux/ratelimit.h" 2
2369
2370
2371
2372
2373struct ratelimit_state {
2374 int interval;
2375 int burst;
2376 int printed;
2377 int missed;
2378 unsigned long begin;
2379};
2380
2381
2382
2383
2384extern int __ratelimit(struct ratelimit_state *rs);
2385# 19 "include/linux/kernel.h" 2
2386# 1 "include/linux/dynamic_debug.h" 1
2387
2388
2389
2390
2391
2392
2393
2394extern long long dynamic_debug_enabled;
2395extern long long dynamic_debug_enabled2;
2396
2397
2398
2399
2400
2401
2402struct _ddebug {
2403
2404
2405
2406
2407 const char *modname;
2408 const char *function;
2409 const char *filename;
2410 const char *format;
2411 char primary_hash;
2412 char secondary_hash;
2413 unsigned int lineno:24;
2414
2415
2416
2417
2418
2419
2420
2421 unsigned int flags:8;
2422} __attribute__((aligned(8)));
2423
2424
2425int ddebug_add_module(struct _ddebug *tab, unsigned int n,
2426 const char *modname);
2427# 79 "include/linux/dynamic_debug.h"
2428static inline __attribute__((always_inline)) int ddebug_remove_module(char *mod)
2429{
2430 return 0;
2431}
2432# 20 "include/linux/kernel.h" 2
2433# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/byteorder.h" 1
2434# 21 "include/linux/kernel.h" 2
2435# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bug.h" 1
2436# 66 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bug.h"
2437# 1 "include/asm-generic/bug.h" 1
2438# 10 "include/asm-generic/bug.h"
2439struct bug_entry {
2440
2441 unsigned long bug_addr;
2442
2443
2444
2445
2446
2447 const char *file;
2448
2449
2450
2451 unsigned short line;
2452
2453 unsigned short flags;
2454};
2455# 61 "include/asm-generic/bug.h"
2456extern void warn_slowpath_fmt(const char *file, const int line,
2457 const char *fmt, ...) __attribute__((format(printf, 3, 4)));
2458extern void warn_slowpath_null(const char *file, const int line);
2459# 67 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bug.h" 2
2460# 22 "include/linux/kernel.h" 2
2461
2462extern const char linux_banner[];
2463extern const char linux_proc_banner[];
2464# 62 "include/linux/kernel.h"
2465# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/div64.h" 1
2466# 1 "include/asm-generic/div64.h" 1
2467# 35 "include/asm-generic/div64.h"
2468extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
2469# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/div64.h" 2
2470# 63 "include/linux/kernel.h" 2
2471# 109 "include/linux/kernel.h"
2472extern int console_printk[];
2473
2474
2475
2476
2477
2478
2479struct completion;
2480struct pt_regs;
2481struct user;
2482
2483
2484extern int _cond_resched(void);
2485
2486
2487
2488
2489
2490
2491 void __might_sleep(char *file, int line, int preempt_offset);
2492# 156 "include/linux/kernel.h"
2493static inline __attribute__((always_inline)) void might_fault(void)
2494{
2495 do { __might_sleep("include/linux/kernel.h", 158, 0); _cond_resched(); } while (0);
2496}
2497
2498
2499extern struct atomic_notifier_head panic_notifier_list;
2500extern long (*panic_blink)(long time);
2501 void panic(const char * fmt, ...)
2502 __attribute__ ((noreturn, format (printf, 1, 2))) __attribute__((__cold__));
2503extern void oops_enter(void);
2504extern void oops_exit(void);
2505extern int oops_may_print(void);
2506 void do_exit(long error_code)
2507 __attribute__((noreturn));
2508 void complete_and_exit(struct completion *, long)
2509 __attribute__((noreturn));
2510extern unsigned long simple_strtoul(const char *,char **,unsigned int);
2511extern long simple_strtol(const char *,char **,unsigned int);
2512extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
2513extern long long simple_strtoll(const char *,char **,unsigned int);
2514extern int strict_strtoul(const char *, unsigned int, unsigned long *);
2515extern int strict_strtol(const char *, unsigned int, long *);
2516extern int strict_strtoull(const char *, unsigned int, unsigned long long *);
2517extern int strict_strtoll(const char *, unsigned int, long long *);
2518extern int sprintf(char * buf, const char * fmt, ...)
2519 __attribute__ ((format (printf, 2, 3)));
2520extern int vsprintf(char *buf, const char *, va_list)
2521 __attribute__ ((format (printf, 2, 0)));
2522extern int snprintf(char * buf, size_t size, const char * fmt, ...)
2523 __attribute__ ((format (printf, 3, 4)));
2524extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
2525 __attribute__ ((format (printf, 3, 0)));
2526extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
2527 __attribute__ ((format (printf, 3, 4)));
2528extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
2529 __attribute__ ((format (printf, 3, 0)));
2530extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
2531 __attribute__ ((format (printf, 2, 3)));
2532extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
2533
2534extern int sscanf(const char *, const char *, ...)
2535 __attribute__ ((format (scanf, 2, 3)));
2536extern int vsscanf(const char *, const char *, va_list)
2537 __attribute__ ((format (scanf, 2, 0)));
2538
2539extern int get_option(char **str, int *pint);
2540extern char *get_options(const char *str, int nints, int *ints);
2541extern unsigned long long memparse(const char *ptr, char **retptr);
2542
2543extern int core_kernel_text(unsigned long addr);
2544extern int __kernel_text_address(unsigned long addr);
2545extern int kernel_text_address(unsigned long addr);
2546extern int func_ptr_is_kernel_text(void *ptr);
2547
2548struct pid;
2549extern struct pid *session_of_pgrp(struct pid *pgrp);
2550# 239 "include/linux/kernel.h"
2551 int vprintk(const char *fmt, va_list args)
2552 __attribute__ ((format (printf, 1, 0)));
2553 int printk(const char * fmt, ...)
2554 __attribute__ ((format (printf, 1, 2))) __attribute__((__cold__));
2555
2556extern struct ratelimit_state printk_ratelimit_state;
2557extern int printk_ratelimit(void);
2558extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
2559 unsigned int interval_msec);
2560
2561extern int printk_delay_msec;
2562# 263 "include/linux/kernel.h"
2563void log_buf_kexec_setup(void);
2564# 284 "include/linux/kernel.h"
2565extern int printk_needs_cpu(int cpu);
2566extern void printk_tick(void);
2567
2568extern void __attribute__((format(printf, 1, 2)))
2569 early_printk(const char *fmt, ...);
2570
2571unsigned long int_sqrt(unsigned long);
2572
2573static inline __attribute__((always_inline)) void console_silent(void)
2574{
2575 (console_printk[0]) = 0;
2576}
2577
2578static inline __attribute__((always_inline)) void console_verbose(void)
2579{
2580 if ((console_printk[0]))
2581 (console_printk[0]) = 15;
2582}
2583
2584extern void bust_spinlocks(int yes);
2585extern void wake_up_klogd(void);
2586extern int oops_in_progress;
2587extern int panic_timeout;
2588extern int panic_on_oops;
2589extern int panic_on_unrecovered_nmi;
2590extern int panic_on_io_nmi;
2591extern const char *print_tainted(void);
2592extern void add_taint(unsigned flag);
2593extern int test_taint(unsigned flag);
2594extern unsigned long get_taint(void);
2595extern int root_mountflags;
2596
2597
2598extern enum system_states {
2599 SYSTEM_BOOTING,
2600 SYSTEM_RUNNING,
2601 SYSTEM_HALT,
2602 SYSTEM_POWER_OFF,
2603 SYSTEM_RESTART,
2604 SYSTEM_SUSPEND_DISK,
2605} system_state;
2606# 338 "include/linux/kernel.h"
2607extern void dump_stack(void) __attribute__((__cold__));
2608
2609enum {
2610 DUMP_PREFIX_NONE,
2611 DUMP_PREFIX_ADDRESS,
2612 DUMP_PREFIX_OFFSET
2613};
2614extern void hex_dump_to_buffer(const void *buf, size_t len,
2615 int rowsize, int groupsize,
2616 char *linebuf, size_t linebuflen, bool ascii);
2617extern void print_hex_dump(const char *level, const char *prefix_str,
2618 int prefix_type, int rowsize, int groupsize,
2619 const void *buf, size_t len, bool ascii);
2620extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
2621 const void *buf, size_t len);
2622
2623extern const char hex_asc[];
2624
2625
2626
2627static inline __attribute__((always_inline)) char *pack_hex_byte(char *buf, u8 byte)
2628{
2629 *buf++ = hex_asc[((byte) & 0xf0) >> 4];
2630 *buf++ = hex_asc[((byte) & 0x0f)];
2631 return buf;
2632}
2633# 429 "include/linux/kernel.h"
2634void tracing_on(void);
2635void tracing_off(void);
2636
2637void tracing_off_permanent(void);
2638int tracing_is_on(void);
2639
2640
2641
2642
2643
2644
2645
2646extern void tracing_start(void);
2647extern void tracing_stop(void);
2648extern void ftrace_off_permanent(void);
2649
2650extern void
2651ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
2652
2653static inline __attribute__((always_inline)) void __attribute__ ((format (printf, 1, 2)))
2654____trace_printk_check_format(const char *fmt, ...)
2655{
2656}
2657# 488 "include/linux/kernel.h"
2658extern int
2659__trace_bprintk(unsigned long ip, const char *fmt, ...)
2660 __attribute__ ((format (printf, 2, 3)));
2661
2662extern int
2663__trace_printk(unsigned long ip, const char *fmt, ...)
2664 __attribute__ ((format (printf, 2, 3)));
2665# 513 "include/linux/kernel.h"
2666extern int
2667__ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap);
2668
2669extern int
2670__ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
2671
2672extern void ftrace_dump(void);
2673# 657 "include/linux/kernel.h"
2674struct sysinfo;
2675extern int do_sysinfo(struct sysinfo *info);
2676# 669 "include/linux/kernel.h"
2677struct sysinfo {
2678 long uptime;
2679 unsigned long loads[3];
2680 unsigned long totalram;
2681 unsigned long freeram;
2682 unsigned long sharedram;
2683 unsigned long bufferram;
2684 unsigned long totalswap;
2685 unsigned long freeswap;
2686 unsigned short procs;
2687 unsigned short pad;
2688 unsigned long totalhigh;
2689 unsigned long freehigh;
2690 unsigned int mem_unit;
2691 char _f[20-2*sizeof(long)-sizeof(int)];
2692};
2693# 5 "include/linux/cache.h" 2
2694# 8 "include/linux/time.h" 2
2695# 1 "include/linux/seqlock.h" 1
2696# 29 "include/linux/seqlock.h"
2697# 1 "include/linux/spinlock.h" 1
2698# 50 "include/linux/spinlock.h"
2699# 1 "include/linux/preempt.h" 1
2700# 9 "include/linux/preempt.h"
2701# 1 "include/linux/thread_info.h" 1
2702# 12 "include/linux/thread_info.h"
2703struct timespec;
2704struct compat_timespec;
2705
2706
2707
2708
2709struct restart_block {
2710 long (*fn)(struct restart_block *);
2711 union {
2712 struct {
2713 unsigned long arg0, arg1, arg2, arg3;
2714 };
2715
2716 struct {
2717 u32 *uaddr;
2718 u32 val;
2719 u32 flags;
2720 u32 bitset;
2721 u64 time;
2722 u32 *uaddr2;
2723 } futex;
2724
2725 struct {
2726 clockid_t index;
2727 struct timespec *rmtp;
2728
2729
2730
2731 u64 expires;
2732 } nanosleep;
2733
2734 struct {
2735 struct pollfd *ufds;
2736 int nfds;
2737 int has_timeout;
2738 unsigned long tv_sec;
2739 unsigned long tv_nsec;
2740 } poll;
2741 };
2742};
2743
2744extern long do_no_restart_syscall(struct restart_block *parm);
2745
2746
2747# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/thread_info.h" 1
2748# 10 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/thread_info.h"
2749# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/page.h" 1
2750# 10 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/page.h"
2751# 1 "include/asm-generic/page.h" 1
2752# 23 "include/asm-generic/page.h"
2753# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/setup.h" 1
2754# 1 "include/asm-generic/setup.h" 1
2755# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/setup.h" 2
2756# 24 "include/asm-generic/page.h" 2
2757# 39 "include/asm-generic/page.h"
2758typedef struct {
2759 unsigned long pte;
2760} pte_t;
2761typedef struct {
2762 unsigned long pmd[16];
2763} pmd_t;
2764typedef struct {
2765 unsigned long pgd;
2766} pgd_t;
2767typedef struct {
2768 unsigned long pgprot;
2769} pgprot_t;
2770typedef struct page *pgtable_t;
2771# 63 "include/asm-generic/page.h"
2772extern unsigned long memory_start;
2773extern unsigned long memory_end;
2774# 96 "include/asm-generic/page.h"
2775# 1 "include/asm-generic/memory_model.h" 1
2776# 97 "include/asm-generic/page.h" 2
2777# 1 "include/asm-generic/getorder.h" 1
2778# 9 "include/asm-generic/getorder.h"
2779static inline __attribute__((always_inline)) __attribute__((__const__)) int get_order(unsigned long size)
2780{
2781 int order;
2782
2783 size = (size - 1) >> (12 - 1);
2784 order = -1;
2785 do {
2786 size >>= 1;
2787 order++;
2788 } while (size);
2789 return order;
2790}
2791# 98 "include/asm-generic/page.h" 2
2792# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/page.h" 2
2793# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/thread_info.h" 2
2794# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/entry.h" 1
2795# 10 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/entry.h"
2796# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/setup.h" 1
2797# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/entry.h" 2
2798# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/thread_info.h" 2
2799# 31 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/thread_info.h"
2800typedef unsigned long mm_segment_t;
2801
2802
2803
2804
2805
2806
2807struct thread_info {
2808 struct task_struct *task;
2809 struct exec_domain *exec_domain;
2810 unsigned long flags;
2811 int cpu;
2812 int preempt_count;
2813 mm_segment_t addr_limit;
2814 struct restart_block restart_block;
2815
2816 struct l1_scratch_task_info l1_task_info;
2817
2818};
2819# 72 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/thread_info.h"
2820__attribute__((__const__))
2821static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
2822{
2823 struct thread_info *ti;
2824 __asm__("%0 = sp;" : "=da"(ti) :
2825 );
2826 return (struct thread_info *)((long)ti & ~((long)8192 -1));
2827}
2828# 57 "include/linux/thread_info.h" 2
2829# 65 "include/linux/thread_info.h"
2830static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag)
2831{
2832 set_bit(flag, (unsigned long *)&ti->flags);
2833}
2834
2835static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag)
2836{
2837 clear_bit(flag, (unsigned long *)&ti->flags);
2838}
2839
2840static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
2841{
2842 return test_and_set_bit(flag, (unsigned long *)&ti->flags);
2843}
2844
2845static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
2846{
2847 return test_and_clear_bit(flag, (unsigned long *)&ti->flags);
2848}
2849
2850static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag)
2851{
2852 return test_bit(flag, (unsigned long *)&ti->flags);
2853}
2854# 122 "include/linux/thread_info.h"
2855static inline __attribute__((always_inline)) void set_restore_sigmask(void)
2856{
2857 set_ti_thread_flag(current_thread_info(), 5);
2858 set_ti_thread_flag(current_thread_info(), 1);
2859}
2860# 10 "include/linux/preempt.h" 2
2861# 51 "include/linux/spinlock.h" 2
2862
2863
2864
2865
2866# 1 "include/linux/stringify.h" 1
2867# 56 "include/linux/spinlock.h" 2
2868# 1 "include/linux/bottom_half.h" 1
2869
2870
2871
2872extern void local_bh_disable(void);
2873extern void _local_bh_enable(void);
2874extern void local_bh_enable(void);
2875extern void local_bh_enable_ip(unsigned long ip);
2876# 57 "include/linux/spinlock.h" 2
2877# 80 "include/linux/spinlock.h"
2878# 1 "include/linux/spinlock_types.h" 1
2879# 15 "include/linux/spinlock_types.h"
2880# 1 "include/linux/spinlock_types_up.h" 1
2881# 17 "include/linux/spinlock_types_up.h"
2882typedef struct {
2883 volatile unsigned int slock;
2884} raw_spinlock_t;
2885# 31 "include/linux/spinlock_types_up.h"
2886typedef struct {
2887
2888} raw_rwlock_t;
2889# 16 "include/linux/spinlock_types.h" 2
2890
2891
2892# 1 "include/linux/lockdep.h" 1
2893# 12 "include/linux/lockdep.h"
2894struct task_struct;
2895struct lockdep_map;
2896
2897
2898
2899
2900
2901# 1 "include/linux/debug_locks.h" 1
2902
2903
2904
2905
2906# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/atomic.h" 1
2907# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/atomic.h"
2908# 1 "include/asm-generic/atomic.h" 1
2909# 58 "include/asm-generic/atomic.h"
2910static inline __attribute__((always_inline)) int atomic_add_return(int i, atomic_t *v)
2911{
2912 unsigned long flags;
2913 int temp;
2914
2915 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
2916 temp = v->counter;
2917 temp += i;
2918 v->counter = temp;
2919 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0);
2920
2921 return temp;
2922}
2923# 80 "include/asm-generic/atomic.h"
2924static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t *v)
2925{
2926 unsigned long flags;
2927 int temp;
2928
2929 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
2930 temp = v->counter;
2931 temp -= i;
2932 v->counter = temp;
2933 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0);
2934
2935 return temp;
2936}
2937
2938static inline __attribute__((always_inline)) int atomic_add_negative(int i, atomic_t *v)
2939{
2940 return atomic_add_return(i, v) < 0;
2941}
2942
2943static inline __attribute__((always_inline)) void atomic_add(int i, atomic_t *v)
2944{
2945 atomic_add_return(i, v);
2946}
2947
2948static inline __attribute__((always_inline)) void atomic_sub(int i, atomic_t *v)
2949{
2950 atomic_sub_return(i, v);
2951}
2952
2953static inline __attribute__((always_inline)) void atomic_inc(atomic_t *v)
2954{
2955 atomic_add_return(1, v);
2956}
2957
2958static inline __attribute__((always_inline)) void atomic_dec(atomic_t *v)
2959{
2960 atomic_sub_return(1, v);
2961}
2962# 137 "include/asm-generic/atomic.h"
2963static inline __attribute__((always_inline)) void atomic_clear_mask(unsigned long mask, unsigned long *addr)
2964{
2965 unsigned long flags;
2966
2967 mask = ~mask;
2968 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
2969 *addr &= mask;
2970 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0);
2971}
2972# 162 "include/asm-generic/atomic.h"
2973# 1 "include/asm-generic/atomic-long.h" 1
2974# 11 "include/asm-generic/atomic-long.h"
2975# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
2976# 12 "include/asm-generic/atomic-long.h" 2
2977# 141 "include/asm-generic/atomic-long.h"
2978typedef atomic_t atomic_long_t;
2979
2980
2981static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l)
2982{
2983 atomic_t *v = (atomic_t *)l;
2984
2985 return (long)((v)->counter);
2986}
2987
2988static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i)
2989{
2990 atomic_t *v = (atomic_t *)l;
2991
2992 (((v)->counter) = (i));
2993}
2994
2995static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l)
2996{
2997 atomic_t *v = (atomic_t *)l;
2998
2999 atomic_inc(v);
3000}
3001
3002static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l)
3003{
3004 atomic_t *v = (atomic_t *)l;
3005
3006 atomic_dec(v);
3007}
3008
3009static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l)
3010{
3011 atomic_t *v = (atomic_t *)l;
3012
3013 atomic_add(i, v);
3014}
3015
3016static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l)
3017{
3018 atomic_t *v = (atomic_t *)l;
3019
3020 atomic_sub(i, v);
3021}
3022
3023static inline __attribute__((always_inline)) int atomic_long_sub_and_test(long i, atomic_long_t *l)
3024{
3025 atomic_t *v = (atomic_t *)l;
3026
3027 return (atomic_sub_return((i), (v)) == 0);
3028}
3029
3030static inline __attribute__((always_inline)) int atomic_long_dec_and_test(atomic_long_t *l)
3031{
3032 atomic_t *v = (atomic_t *)l;
3033
3034 return (atomic_sub_return(1, (v)) == 0);
3035}
3036
3037static inline __attribute__((always_inline)) int atomic_long_inc_and_test(atomic_long_t *l)
3038{
3039 atomic_t *v = (atomic_t *)l;
3040
3041 return (atomic_add_return(1, (v)) == 0);
3042}
3043
3044static inline __attribute__((always_inline)) int atomic_long_add_negative(long i, atomic_long_t *l)
3045{
3046 atomic_t *v = (atomic_t *)l;
3047
3048 return atomic_add_negative(i, v);
3049}
3050
3051static inline __attribute__((always_inline)) long atomic_long_add_return(long i, atomic_long_t *l)
3052{
3053 atomic_t *v = (atomic_t *)l;
3054
3055 return (long)atomic_add_return(i, v);
3056}
3057
3058static inline __attribute__((always_inline)) long atomic_long_sub_return(long i, atomic_long_t *l)
3059{
3060 atomic_t *v = (atomic_t *)l;
3061
3062 return (long)atomic_sub_return(i, v);
3063}
3064
3065static inline __attribute__((always_inline)) long atomic_long_inc_return(atomic_long_t *l)
3066{
3067 atomic_t *v = (atomic_t *)l;
3068
3069 return (long)atomic_add_return(1, (v));
3070}
3071
3072static inline __attribute__((always_inline)) long atomic_long_dec_return(atomic_long_t *l)
3073{
3074 atomic_t *v = (atomic_t *)l;
3075
3076 return (long)atomic_sub_return(1, (v));
3077}
3078
3079static inline __attribute__((always_inline)) long atomic_long_add_unless(atomic_long_t *l, long a, long u)
3080{
3081 atomic_t *v = (atomic_t *)l;
3082
3083 return (long)({ int c, old; c = ((v)->counter); while (c != (u) && (old = (((__typeof__(*((&(((v))->counter)))))__cmpxchg_local_generic(((&(((v))->counter))), (unsigned long)(((c))), (unsigned long)(((c + (a)))), sizeof(*((&(((v))->counter)))))))) != c) c = old; c != (u); });
3084}
3085# 163 "include/asm-generic/atomic.h" 2
3086# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/atomic.h" 2
3087# 6 "include/linux/debug_locks.h" 2
3088
3089
3090struct task_struct;
3091
3092extern int debug_locks;
3093extern int debug_locks_silent;
3094
3095
3096static inline __attribute__((always_inline)) int __debug_locks_off(void)
3097{
3098 return ((__typeof__(*(&debug_locks)))__xchg((unsigned long)(0), (&debug_locks), sizeof(*(&debug_locks))));
3099}
3100
3101
3102
3103
3104extern int debug_locks_off(void);
3105# 43 "include/linux/debug_locks.h"
3106 extern void locking_selftest(void);
3107
3108
3109
3110
3111struct task_struct;
3112
3113
3114extern void debug_show_all_locks(void);
3115extern void __debug_show_held_locks(struct task_struct *task);
3116extern void debug_show_held_locks(struct task_struct *task);
3117extern void debug_check_no_locks_freed(const void *from, unsigned long len);
3118extern void debug_check_no_locks_held(struct task_struct *task);
3119# 20 "include/linux/lockdep.h" 2
3120# 1 "include/linux/stacktrace.h" 1
3121
3122
3123
3124struct task_struct;
3125
3126
3127struct task_struct;
3128
3129struct stack_trace {
3130 unsigned int nr_entries, max_entries;
3131 unsigned long *entries;
3132 int skip;
3133};
3134
3135extern void save_stack_trace(struct stack_trace *trace);
3136extern void save_stack_trace_bp(struct stack_trace *trace, unsigned long bp);
3137extern void save_stack_trace_tsk(struct task_struct *tsk,
3138 struct stack_trace *trace);
3139
3140extern void print_stack_trace(struct stack_trace *trace, int spaces);
3141# 21 "include/linux/lockdep.h" 2
3142# 35 "include/linux/lockdep.h"
3143struct lockdep_subclass_key {
3144 char __one_byte;
3145} __attribute__ ((__packed__));
3146
3147struct lock_class_key {
3148 struct lockdep_subclass_key subkeys[8UL];
3149};
3150
3151
3152
3153
3154
3155
3156struct lock_class {
3157
3158
3159
3160 struct list_head hash_entry;
3161
3162
3163
3164
3165 struct list_head lock_entry;
3166
3167 struct lockdep_subclass_key *key;
3168 unsigned int subclass;
3169 unsigned int dep_gen_id;
3170
3171
3172
3173
3174 unsigned long usage_mask;
3175 struct stack_trace usage_traces[(1+3*4)];
3176
3177
3178
3179
3180
3181
3182 struct list_head locks_after, locks_before;
3183
3184
3185
3186
3187
3188 unsigned int version;
3189
3190
3191
3192
3193 unsigned long ops;
3194
3195 const char *name;
3196 int name_version;
3197
3198
3199
3200
3201
3202};
3203# 133 "include/linux/lockdep.h"
3204struct lockdep_map {
3205 struct lock_class_key *key;
3206 struct lock_class *class_cache;
3207 const char *name;
3208
3209
3210
3211
3212};
3213
3214
3215
3216
3217
3218struct lock_list {
3219 struct list_head entry;
3220 struct lock_class *class;
3221 struct stack_trace trace;
3222 int distance;
3223
3224
3225
3226
3227
3228 struct lock_list *parent;
3229};
3230
3231
3232
3233
3234struct lock_chain {
3235 u8 irq_context;
3236 u8 depth;
3237 u16 base;
3238 struct list_head entry;
3239 u64 chain_key;
3240};
3241# 179 "include/linux/lockdep.h"
3242struct held_lock {
3243# 194 "include/linux/lockdep.h"
3244 u64 prev_chain_key;
3245 unsigned long acquire_ip;
3246 struct lockdep_map *instance;
3247 struct lockdep_map *nest_lock;
3248
3249
3250
3251
3252 unsigned int class_idx:13;
3253# 216 "include/linux/lockdep.h"
3254 unsigned int irq_context:2;
3255 unsigned int trylock:1;
3256
3257 unsigned int read:2;
3258 unsigned int check:2;
3259 unsigned int hardirqs_off:1;
3260 unsigned int references:11;
3261};
3262
3263
3264
3265
3266extern void lockdep_init(void);
3267extern void lockdep_info(void);
3268extern void lockdep_reset(void);
3269extern void lockdep_reset_lock(struct lockdep_map *lock);
3270extern void lockdep_free_key_range(void *start, unsigned long size);
3271extern void lockdep_sys_exit(void);
3272
3273extern void lockdep_off(void);
3274extern void lockdep_on(void);
3275
3276
3277
3278
3279
3280
3281
3282extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
3283 struct lock_class_key *key, int subclass);
3284# 274 "include/linux/lockdep.h"
3285static inline __attribute__((always_inline)) int lockdep_match_key(struct lockdep_map *lock,
3286 struct lock_class_key *key)
3287{
3288 return lock->key == key;
3289}
3290# 295 "include/linux/lockdep.h"
3291extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
3292 int trylock, int read, int check,
3293 struct lockdep_map *nest_lock, unsigned long ip);
3294
3295extern void lock_release(struct lockdep_map *lock, int nested,
3296 unsigned long ip);
3297
3298
3299
3300extern int lock_is_held(struct lockdep_map *lock);
3301
3302extern void lock_set_class(struct lockdep_map *lock, const char *name,
3303 struct lock_class_key *key, unsigned int subclass,
3304 unsigned long ip);
3305
3306static inline __attribute__((always_inline)) void lock_set_subclass(struct lockdep_map *lock,
3307 unsigned int subclass, unsigned long ip)
3308{
3309 lock_set_class(lock, lock->name, lock->key, subclass, ip);
3310}
3311
3312extern void lockdep_set_current_reclaim_state(gfp_t gfp_mask);
3313extern void lockdep_clear_current_reclaim_state(void);
3314extern void lockdep_trace_alloc(gfp_t mask);
3315# 416 "include/linux/lockdep.h"
3316extern void early_init_irq_lock_class(void);
3317# 428 "include/linux/lockdep.h"
3318static inline __attribute__((always_inline)) void early_boot_irqs_off(void)
3319{
3320}
3321static inline __attribute__((always_inline)) void early_boot_irqs_on(void)
3322{
3323}
3324static inline __attribute__((always_inline)) void print_irqtrace_events(struct task_struct *curr)
3325{
3326}
3327# 19 "include/linux/spinlock_types.h" 2
3328
3329typedef struct {
3330 raw_spinlock_t raw_lock;
3331
3332
3333
3334
3335 unsigned int magic, owner_cpu;
3336 void *owner;
3337
3338
3339 struct lockdep_map dep_map;
3340
3341} spinlock_t;
3342
3343
3344
3345typedef struct {
3346 raw_rwlock_t raw_lock;
3347
3348
3349
3350
3351 unsigned int magic, owner_cpu;
3352 void *owner;
3353
3354
3355 struct lockdep_map dep_map;
3356
3357} rwlock_t;
3358# 81 "include/linux/spinlock.h" 2
3359
3360extern int __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock);
3361
3362
3363
3364
3365
3366
3367
3368# 1 "include/linux/spinlock_up.h" 1
3369# 23 "include/linux/spinlock_up.h"
3370static inline __attribute__((always_inline)) void __raw_spin_lock(raw_spinlock_t *lock)
3371{
3372 lock->slock = 0;
3373}
3374
3375static inline __attribute__((always_inline)) void
3376__raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
3377{
3378 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
3379 lock->slock = 0;
3380}
3381
3382static inline __attribute__((always_inline)) int __raw_spin_trylock(raw_spinlock_t *lock)
3383{
3384 char oldval = lock->slock;
3385
3386 lock->slock = 0;
3387
3388 return oldval > 0;
3389}
3390
3391static inline __attribute__((always_inline)) void __raw_spin_unlock(raw_spinlock_t *lock)
3392{
3393 lock->slock = 1;
3394}
3395# 91 "include/linux/spinlock.h" 2
3396
3397
3398
3399 extern void __spin_lock_init(spinlock_t *lock, const char *name,
3400 struct lock_class_key *key);
3401# 109 "include/linux/spinlock.h"
3402 extern void __rwlock_init(rwlock_t *lock, const char *name,
3403 struct lock_class_key *key);
3404# 137 "include/linux/spinlock.h"
3405static inline __attribute__((always_inline)) void smp_mb__after_lock(void) { __asm__ __volatile__("": : :"memory"); }
3406# 147 "include/linux/spinlock.h"
3407 extern void _raw_spin_lock(spinlock_t *lock);
3408
3409 extern int _raw_spin_trylock(spinlock_t *lock);
3410 extern void _raw_spin_unlock(spinlock_t *lock);
3411 extern void _raw_read_lock(rwlock_t *lock);
3412
3413 extern int _raw_read_trylock(rwlock_t *lock);
3414 extern void _raw_read_unlock(rwlock_t *lock);
3415 extern void _raw_write_lock(rwlock_t *lock);
3416
3417 extern int _raw_write_trylock(rwlock_t *lock);
3418 extern void _raw_write_unlock(rwlock_t *lock);
3419# 330 "include/linux/spinlock.h"
3420extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
3421# 344 "include/linux/spinlock.h"
3422# 1 "include/linux/spinlock_api_smp.h" 1
3423# 18 "include/linux/spinlock_api_smp.h"
3424int in_lock_functions(unsigned long addr);
3425
3426
3427
3428void __attribute__((section(".spinlock.text"))) _spin_lock(spinlock_t *lock) ;
3429void __attribute__((section(".spinlock.text"))) _spin_lock_nested(spinlock_t *lock, int subclass)
3430 ;
3431void __attribute__((section(".spinlock.text"))) _spin_lock_nest_lock(spinlock_t *lock, struct lockdep_map *map)
3432 ;
3433void __attribute__((section(".spinlock.text"))) _read_lock(rwlock_t *lock) ;
3434void __attribute__((section(".spinlock.text"))) _write_lock(rwlock_t *lock) ;
3435void __attribute__((section(".spinlock.text"))) _spin_lock_bh(spinlock_t *lock) ;
3436void __attribute__((section(".spinlock.text"))) _read_lock_bh(rwlock_t *lock) ;
3437void __attribute__((section(".spinlock.text"))) _write_lock_bh(rwlock_t *lock) ;
3438void __attribute__((section(".spinlock.text"))) _spin_lock_irq(spinlock_t *lock) ;
3439void __attribute__((section(".spinlock.text"))) _read_lock_irq(rwlock_t *lock) ;
3440void __attribute__((section(".spinlock.text"))) _write_lock_irq(rwlock_t *lock) ;
3441unsigned long __attribute__((section(".spinlock.text"))) _spin_lock_irqsave(spinlock_t *lock)
3442 ;
3443unsigned long __attribute__((section(".spinlock.text"))) _spin_lock_irqsave_nested(spinlock_t *lock, int subclass)
3444 ;
3445unsigned long __attribute__((section(".spinlock.text"))) _read_lock_irqsave(rwlock_t *lock)
3446 ;
3447unsigned long __attribute__((section(".spinlock.text"))) _write_lock_irqsave(rwlock_t *lock)
3448 ;
3449int __attribute__((section(".spinlock.text"))) _spin_trylock(spinlock_t *lock);
3450int __attribute__((section(".spinlock.text"))) _read_trylock(rwlock_t *lock);
3451int __attribute__((section(".spinlock.text"))) _write_trylock(rwlock_t *lock);
3452int __attribute__((section(".spinlock.text"))) _spin_trylock_bh(spinlock_t *lock);
3453void __attribute__((section(".spinlock.text"))) _spin_unlock(spinlock_t *lock) ;
3454void __attribute__((section(".spinlock.text"))) _read_unlock(rwlock_t *lock) ;
3455void __attribute__((section(".spinlock.text"))) _write_unlock(rwlock_t *lock) ;
3456void __attribute__((section(".spinlock.text"))) _spin_unlock_bh(spinlock_t *lock) ;
3457void __attribute__((section(".spinlock.text"))) _read_unlock_bh(rwlock_t *lock) ;
3458void __attribute__((section(".spinlock.text"))) _write_unlock_bh(rwlock_t *lock) ;
3459void __attribute__((section(".spinlock.text"))) _spin_unlock_irq(spinlock_t *lock) ;
3460void __attribute__((section(".spinlock.text"))) _read_unlock_irq(rwlock_t *lock) ;
3461void __attribute__((section(".spinlock.text"))) _write_unlock_irq(rwlock_t *lock) ;
3462void __attribute__((section(".spinlock.text"))) _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
3463 ;
3464void __attribute__((section(".spinlock.text"))) _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
3465 ;
3466void __attribute__((section(".spinlock.text"))) _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
3467 ;
3468# 194 "include/linux/spinlock_api_smp.h"
3469static inline __attribute__((always_inline)) int __spin_trylock(spinlock_t *lock)
3470{
3471 do { } while (0);
3472 if (_raw_spin_trylock(lock)) {
3473 lock_acquire(&lock->dep_map, 0, 1, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3474 return 1;
3475 }
3476 do { } while (0);
3477 return 0;
3478}
3479
3480static inline __attribute__((always_inline)) int __read_trylock(rwlock_t *lock)
3481{
3482 do { } while (0);
3483 if (_raw_read_trylock(lock)) {
3484 lock_acquire(&lock->dep_map, 0, 1, 2, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3485 return 1;
3486 }
3487 do { } while (0);
3488 return 0;
3489}
3490
3491static inline __attribute__((always_inline)) int __write_trylock(rwlock_t *lock)
3492{
3493 do { } while (0);
3494 if (_raw_write_trylock(lock)) {
3495 lock_acquire(&lock->dep_map, 0, 1, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3496 return 1;
3497 }
3498 do { } while (0);
3499 return 0;
3500}
3501# 234 "include/linux/spinlock_api_smp.h"
3502static inline __attribute__((always_inline)) void __read_lock(rwlock_t *lock)
3503{
3504 do { } while (0);
3505 lock_acquire(&lock->dep_map, 0, 0, 2, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3506 _raw_read_lock(lock);
3507}
3508
3509static inline __attribute__((always_inline)) unsigned long __spin_lock_irqsave(spinlock_t *lock)
3510{
3511 unsigned long flags;
3512
3513 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
3514 do { } while (0);
3515 lock_acquire(&lock->dep_map, 0, 0, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3516
3517
3518
3519
3520
3521
3522 _raw_spin_lock(lock);
3523
3524
3525
3526 return flags;
3527}
3528
3529static inline __attribute__((always_inline)) void __spin_lock_irq(spinlock_t *lock)
3530{
3531 do { raw_local_irq_disable(); do { } while (0); } while (0);
3532 do { } while (0);
3533 lock_acquire(&lock->dep_map, 0, 0, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3534 _raw_spin_lock(lock);
3535}
3536
3537static inline __attribute__((always_inline)) void __spin_lock_bh(spinlock_t *lock)
3538{
3539 local_bh_disable();
3540 do { } while (0);
3541 lock_acquire(&lock->dep_map, 0, 0, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3542 _raw_spin_lock(lock);
3543}
3544
3545static inline __attribute__((always_inline)) unsigned long __read_lock_irqsave(rwlock_t *lock)
3546{
3547 unsigned long flags;
3548
3549 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
3550 do { } while (0);
3551 lock_acquire(&lock->dep_map, 0, 0, 2, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3552 (_raw_read_lock)((lock));
3553
3554 return flags;
3555}
3556
3557static inline __attribute__((always_inline)) void __read_lock_irq(rwlock_t *lock)
3558{
3559 do { raw_local_irq_disable(); do { } while (0); } while (0);
3560 do { } while (0);
3561 lock_acquire(&lock->dep_map, 0, 0, 2, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3562 _raw_read_lock(lock);
3563}
3564
3565static inline __attribute__((always_inline)) void __read_lock_bh(rwlock_t *lock)
3566{
3567 local_bh_disable();
3568 do { } while (0);
3569 lock_acquire(&lock->dep_map, 0, 0, 2, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3570 _raw_read_lock(lock);
3571}
3572
3573static inline __attribute__((always_inline)) unsigned long __write_lock_irqsave(rwlock_t *lock)
3574{
3575 unsigned long flags;
3576
3577 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
3578 do { } while (0);
3579 lock_acquire(&lock->dep_map, 0, 0, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3580 (_raw_write_lock)((lock));
3581
3582 return flags;
3583}
3584
3585static inline __attribute__((always_inline)) void __write_lock_irq(rwlock_t *lock)
3586{
3587 do { raw_local_irq_disable(); do { } while (0); } while (0);
3588 do { } while (0);
3589 lock_acquire(&lock->dep_map, 0, 0, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3590 _raw_write_lock(lock);
3591}
3592
3593static inline __attribute__((always_inline)) void __write_lock_bh(rwlock_t *lock)
3594{
3595 local_bh_disable();
3596 do { } while (0);
3597 lock_acquire(&lock->dep_map, 0, 0, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3598 _raw_write_lock(lock);
3599}
3600
3601static inline __attribute__((always_inline)) void __spin_lock(spinlock_t *lock)
3602{
3603 do { } while (0);
3604 lock_acquire(&lock->dep_map, 0, 0, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3605 _raw_spin_lock(lock);
3606}
3607
3608static inline __attribute__((always_inline)) void __write_lock(rwlock_t *lock)
3609{
3610 do { } while (0);
3611 lock_acquire(&lock->dep_map, 0, 0, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3612 _raw_write_lock(lock);
3613}
3614
3615
3616
3617static inline __attribute__((always_inline)) void __spin_unlock(spinlock_t *lock)
3618{
3619 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3620 _raw_spin_unlock(lock);
3621 do { } while (0);
3622}
3623
3624static inline __attribute__((always_inline)) void __write_unlock(rwlock_t *lock)
3625{
3626 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3627 _raw_write_unlock(lock);
3628 do { } while (0);
3629}
3630
3631static inline __attribute__((always_inline)) void __read_unlock(rwlock_t *lock)
3632{
3633 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3634 _raw_read_unlock(lock);
3635 do { } while (0);
3636}
3637
3638static inline __attribute__((always_inline)) void __spin_unlock_irqrestore(spinlock_t *lock,
3639 unsigned long flags)
3640{
3641 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3642 _raw_spin_unlock(lock);
3643 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0);
3644 do { } while (0);
3645}
3646
3647static inline __attribute__((always_inline)) void __spin_unlock_irq(spinlock_t *lock)
3648{
3649 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3650 _raw_spin_unlock(lock);
3651 do { do { } while (0); raw_local_irq_enable(); } while (0);
3652 do { } while (0);
3653}
3654
3655static inline __attribute__((always_inline)) void __spin_unlock_bh(spinlock_t *lock)
3656{
3657 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3658 _raw_spin_unlock(lock);
3659 do { } while (0);
3660 local_bh_enable_ip((unsigned long)__builtin_return_address(0));
3661}
3662
3663static inline __attribute__((always_inline)) void __read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
3664{
3665 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3666 _raw_read_unlock(lock);
3667 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0);
3668 do { } while (0);
3669}
3670
3671static inline __attribute__((always_inline)) void __read_unlock_irq(rwlock_t *lock)
3672{
3673 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3674 _raw_read_unlock(lock);
3675 do { do { } while (0); raw_local_irq_enable(); } while (0);
3676 do { } while (0);
3677}
3678
3679static inline __attribute__((always_inline)) void __read_unlock_bh(rwlock_t *lock)
3680{
3681 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3682 _raw_read_unlock(lock);
3683 do { } while (0);
3684 local_bh_enable_ip((unsigned long)__builtin_return_address(0));
3685}
3686
3687static inline __attribute__((always_inline)) void __write_unlock_irqrestore(rwlock_t *lock,
3688 unsigned long flags)
3689{
3690 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3691 _raw_write_unlock(lock);
3692 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); if ((((flags) & ~0x3f) == 0)) { raw_local_irq_restore(flags); do { } while (0); } else { do { } while (0); raw_local_irq_restore(flags); } } while (0);
3693 do { } while (0);
3694}
3695
3696static inline __attribute__((always_inline)) void __write_unlock_irq(rwlock_t *lock)
3697{
3698 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3699 _raw_write_unlock(lock);
3700 do { do { } while (0); raw_local_irq_enable(); } while (0);
3701 do { } while (0);
3702}
3703
3704static inline __attribute__((always_inline)) void __write_unlock_bh(rwlock_t *lock)
3705{
3706 lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0));
3707 _raw_write_unlock(lock);
3708 do { } while (0);
3709 local_bh_enable_ip((unsigned long)__builtin_return_address(0));
3710}
3711
3712static inline __attribute__((always_inline)) int __spin_trylock_bh(spinlock_t *lock)
3713{
3714 local_bh_disable();
3715 do { } while (0);
3716 if (_raw_spin_trylock(lock)) {
3717 lock_acquire(&lock->dep_map, 0, 1, 0, 1, ((void *)0), (unsigned long)__builtin_return_address(0));
3718 return 1;
3719 }
3720 do { } while (0);
3721 local_bh_enable_ip((unsigned long)__builtin_return_address(0));
3722 return 0;
3723}
3724# 345 "include/linux/spinlock.h" 2
3725# 30 "include/linux/seqlock.h" 2
3726
3727
3728typedef struct {
3729 unsigned sequence;
3730 spinlock_t lock;
3731} seqlock_t;
3732# 60 "include/linux/seqlock.h"
3733static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl)
3734{
3735 _spin_lock(&sl->lock);
3736 ++sl->sequence;
3737 __asm__ __volatile__("": : :"memory");
3738}
3739
3740static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl)
3741{
3742 __asm__ __volatile__("": : :"memory");
3743 sl->sequence++;
3744 _spin_unlock(&sl->lock);
3745}
3746
3747static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl)
3748{
3749 int ret = (_spin_trylock(&sl->lock));
3750
3751 if (ret) {
3752 ++sl->sequence;
3753 __asm__ __volatile__("": : :"memory");
3754 }
3755 return ret;
3756}
3757
3758
3759static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl)
3760{
3761 unsigned ret;
3762
3763repeat:
3764 ret = sl->sequence;
3765 __asm__ __volatile__("": : :"memory");
3766 if (__builtin_expect(!!(ret & 1), 0)) {
3767 __asm__ __volatile__("": : :"memory");
3768 goto repeat;
3769 }
3770
3771 return ret;
3772}
3773
3774
3775
3776
3777
3778
3779static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned start)
3780{
3781 __asm__ __volatile__("": : :"memory");
3782
3783 return (sl->sequence != start);
3784}
3785# 121 "include/linux/seqlock.h"
3786typedef struct seqcount {
3787 unsigned sequence;
3788} seqcount_t;
3789
3790
3791
3792
3793
3794static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s)
3795{
3796 unsigned ret;
3797
3798repeat:
3799 ret = s->sequence;
3800 __asm__ __volatile__("": : :"memory");
3801 if (__builtin_expect(!!(ret & 1), 0)) {
3802 __asm__ __volatile__("": : :"memory");
3803 goto repeat;
3804 }
3805 return ret;
3806}
3807
3808
3809
3810
3811static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned start)
3812{
3813 __asm__ __volatile__("": : :"memory");
3814
3815 return s->sequence != start;
3816}
3817
3818
3819
3820
3821
3822
3823static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s)
3824{
3825 s->sequence++;
3826 __asm__ __volatile__("": : :"memory");
3827}
3828
3829static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s)
3830{
3831 __asm__ __volatile__("": : :"memory");
3832 s->sequence++;
3833}
3834# 9 "include/linux/time.h" 2
3835# 1 "include/linux/math64.h" 1
3836
3837
3838
3839
3840# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/div64.h" 1
3841# 6 "include/linux/math64.h" 2
3842# 41 "include/linux/math64.h"
3843static inline __attribute__((always_inline)) u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
3844{
3845 *remainder = ({ uint32_t __base = (divisor); uint32_t __rem; (void)(((typeof((dividend)) *)0) == ((uint64_t *)0)); if (__builtin_expect(!!(((dividend) >> 32) == 0), 1)) { __rem = (uint32_t)(dividend) % __base; (dividend) = (uint32_t)(dividend) / __base; } else __rem = __div64_32(&(dividend), __base); __rem; });
3846 return dividend;
3847}
3848
3849
3850
3851extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder);
3852
3853
3854
3855extern u64 div64_u64(u64 dividend, u64 divisor);
3856# 66 "include/linux/math64.h"
3857static inline __attribute__((always_inline)) u64 div_u64(u64 dividend, u32 divisor)
3858{
3859 u32 remainder;
3860 return div_u64_rem(dividend, divisor, &remainder);
3861}
3862
3863
3864
3865
3866
3867
3868static inline __attribute__((always_inline)) s64 div_s64(s64 dividend, s32 divisor)
3869{
3870 s32 remainder;
3871 return div_s64_rem(dividend, divisor, &remainder);
3872}
3873
3874
3875u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder);
3876
3877static inline __attribute__((always_inline)) __attribute__((always_inline)) u32
3878__iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
3879{
3880 u32 ret = 0;
3881
3882 while (dividend >= divisor) {
3883
3884
3885 asm("" : "+rm"(dividend));
3886
3887 dividend -= divisor;
3888 ret++;
3889 }
3890
3891 *remainder = dividend;
3892
3893 return ret;
3894}
3895# 10 "include/linux/time.h" 2
3896
3897
3898
3899
3900struct timespec {
3901 __kernel_time_t tv_sec;
3902 long tv_nsec;
3903};
3904
3905
3906struct timeval {
3907 __kernel_time_t tv_sec;
3908 __kernel_suseconds_t tv_usec;
3909};
3910
3911struct timezone {
3912 int tz_minuteswest;
3913 int tz_dsttime;
3914};
3915
3916
3917
3918extern struct timezone sys_tz;
3919# 45 "include/linux/time.h"
3920static inline __attribute__((always_inline)) int timespec_equal(const struct timespec *a,
3921 const struct timespec *b)
3922{
3923 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
3924}
3925
3926
3927
3928
3929
3930
3931static inline __attribute__((always_inline)) int timespec_compare(const struct timespec *lhs, const struct timespec *rhs)
3932{
3933 if (lhs->tv_sec < rhs->tv_sec)
3934 return -1;
3935 if (lhs->tv_sec > rhs->tv_sec)
3936 return 1;
3937 return lhs->tv_nsec - rhs->tv_nsec;
3938}
3939
3940static inline __attribute__((always_inline)) int timeval_compare(const struct timeval *lhs, const struct timeval *rhs)
3941{
3942 if (lhs->tv_sec < rhs->tv_sec)
3943 return -1;
3944 if (lhs->tv_sec > rhs->tv_sec)
3945 return 1;
3946 return lhs->tv_usec - rhs->tv_usec;
3947}
3948
3949extern unsigned long mktime(const unsigned int year, const unsigned int mon,
3950 const unsigned int day, const unsigned int hour,
3951 const unsigned int min, const unsigned int sec);
3952
3953extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec);
3954extern struct timespec timespec_add_safe(const struct timespec lhs,
3955 const struct timespec rhs);
3956
3957
3958
3959
3960static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs,
3961 struct timespec rhs)
3962{
3963 struct timespec ts_delta;
3964 set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
3965 lhs.tv_nsec - rhs.tv_nsec);
3966 return ts_delta;
3967}
3968
3969
3970
3971
3972
3973
3974
3975extern struct timespec xtime;
3976extern struct timespec wall_to_monotonic;
3977extern seqlock_t xtime_lock;
3978
3979extern void read_persistent_clock(struct timespec *ts);
3980extern void read_boot_clock(struct timespec *ts);
3981extern int update_persistent_clock(struct timespec now);
3982extern int no_sync_cmos_clock ;
3983void timekeeping_init(void);
3984extern int timekeeping_suspended;
3985
3986unsigned long get_seconds(void);
3987struct timespec current_kernel_time(void);
3988struct timespec __current_kernel_time(void);
3989struct timespec get_monotonic_coarse(void);
3990# 131 "include/linux/time.h"
3991static inline __attribute__((always_inline)) u32 arch_gettimeoffset(void) { return 0; }
3992
3993
3994extern void do_gettimeofday(struct timeval *tv);
3995extern int do_settimeofday(struct timespec *tv);
3996extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
3997
3998extern long do_utimes(int dfd, char *filename, struct timespec *times, int flags);
3999struct itimerval;
4000extern int do_setitimer(int which, struct itimerval *value,
4001 struct itimerval *ovalue);
4002extern unsigned int alarm_setitimer(unsigned int seconds);
4003extern int do_getitimer(int which, struct itimerval *value);
4004extern void getnstimeofday(struct timespec *tv);
4005extern void getrawmonotonic(struct timespec *ts);
4006extern void getboottime(struct timespec *ts);
4007extern void monotonic_to_bootbased(struct timespec *ts);
4008
4009extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
4010extern int timekeeping_valid_for_hres(void);
4011extern void update_wall_time(void);
4012extern void update_xtime_cache(u64 nsec);
4013extern void timekeeping_leap_insert(int leapsecond);
4014
4015struct tms;
4016extern void do_sys_times(struct tms *);
4017
4018
4019
4020
4021
4022struct tm {
4023
4024
4025
4026
4027 int tm_sec;
4028
4029 int tm_min;
4030
4031 int tm_hour;
4032
4033 int tm_mday;
4034
4035 int tm_mon;
4036
4037 long tm_year;
4038
4039 int tm_wday;
4040
4041 int tm_yday;
4042};
4043
4044void time_to_tm(time_t totalsecs, int offset, struct tm *result);
4045# 193 "include/linux/time.h"
4046static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts)
4047{
4048 return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
4049}
4050# 205 "include/linux/time.h"
4051static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv)
4052{
4053 return ((s64) tv->tv_sec * 1000000000L) +
4054 tv->tv_usec * 1000L;
4055}
4056
4057
4058
4059
4060
4061
4062
4063extern struct timespec ns_to_timespec(const s64 nsec);
4064
4065
4066
4067
4068
4069
4070
4071extern struct timeval ns_to_timeval(const s64 nsec);
4072# 235 "include/linux/time.h"
4073static inline __attribute__((always_inline)) __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns)
4074{
4075 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, 1000000000L, &ns);
4076 a->tv_nsec = ns;
4077}
4078# 258 "include/linux/time.h"
4079struct itimerspec {
4080 struct timespec it_interval;
4081 struct timespec it_value;
4082};
4083
4084struct itimerval {
4085 struct timeval it_interval;
4086 struct timeval it_value;
4087};
4088# 61 "include/linux/stat.h" 2
4089
4090struct kstat {
4091 u64 ino;
4092 dev_t dev;
4093 umode_t mode;
4094 unsigned int nlink;
4095 uid_t uid;
4096 gid_t gid;
4097 dev_t rdev;
4098 loff_t size;
4099 struct timespec atime;
4100 struct timespec mtime;
4101 struct timespec ctime;
4102 unsigned long blksize;
4103 unsigned long long blocks;
4104};
4105# 11 "include/linux/module.h" 2
4106
4107
4108# 1 "include/linux/kmod.h" 1
4109# 22 "include/linux/kmod.h"
4110# 1 "include/linux/gfp.h" 1
4111
4112
4113
4114# 1 "include/linux/mmzone.h" 1
4115# 9 "include/linux/mmzone.h"
4116# 1 "include/linux/wait.h" 1
4117# 26 "include/linux/wait.h"
4118# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/current.h" 1
4119# 1 "include/asm-generic/current.h" 1
4120# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/current.h" 2
4121# 27 "include/linux/wait.h" 2
4122
4123typedef struct __wait_queue wait_queue_t;
4124typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key);
4125int default_wake_function(wait_queue_t *wait, unsigned mode, int flags, void *key);
4126
4127struct __wait_queue {
4128 unsigned int flags;
4129
4130 void *private;
4131 wait_queue_func_t func;
4132 struct list_head task_list;
4133};
4134
4135struct wait_bit_key {
4136 void *flags;
4137 int bit_nr;
4138};
4139
4140struct wait_bit_queue {
4141 struct wait_bit_key key;
4142 wait_queue_t wait;
4143};
4144
4145struct __wait_queue_head {
4146 spinlock_t lock;
4147 struct list_head task_list;
4148};
4149typedef struct __wait_queue_head wait_queue_head_t;
4150
4151struct task_struct;
4152# 80 "include/linux/wait.h"
4153extern void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *);
4154# 98 "include/linux/wait.h"
4155static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
4156{
4157 q->flags = 0;
4158 q->private = p;
4159 q->func = default_wake_function;
4160}
4161
4162static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q,
4163 wait_queue_func_t func)
4164{
4165 q->flags = 0;
4166 q->private = ((void *)0);
4167 q->func = func;
4168}
4169
4170static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q)
4171{
4172 return !list_empty(&q->task_list);
4173}
4174
4175extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
4176extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait);
4177extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
4178
4179static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
4180{
4181 list_add(&new->task_list, &head->task_list);
4182}
4183
4184
4185
4186
4187static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head,
4188 wait_queue_t *new)
4189{
4190 list_add_tail(&new->task_list, &head->task_list);
4191}
4192
4193static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head,
4194 wait_queue_t *old)