]> git.wh0rd.org - ICEs.git/blame_incremental - bfin-5761/super.i.0
add bfin ice
[ICEs.git] / bfin-5761 / super.i.0
... / ...
CommitLineData
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)
4195{
4196 list_del(&old->task_list);
4197}
4198
4199void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
4200void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key);
4201void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr,
4202 void *key);
4203void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
4204void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
4205void __wake_up_bit(wait_queue_head_t *, void *, int);
4206int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
4207int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
4208void wake_up_bit(void *, int);
4209int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned);
4210int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned);
4211wait_queue_head_t *bit_waitqueue(void *, int);
4212# 409 "include/linux/wait.h"
4213static inline __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
4214 wait_queue_t * wait)
4215{
4216 wait->flags |= 0x01;
4217 __add_wait_queue_tail(q, wait);
4218}
4219
4220
4221
4222
4223static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q,
4224 wait_queue_t * wait)
4225{
4226 __remove_wait_queue(q, wait);
4227}
4228
4229
4230
4231
4232
4233
4234extern void sleep_on(wait_queue_head_t *q);
4235extern long sleep_on_timeout(wait_queue_head_t *q,
4236 signed long timeout);
4237extern void interruptible_sleep_on(wait_queue_head_t *q);
4238extern long interruptible_sleep_on_timeout(wait_queue_head_t *q,
4239 signed long timeout);
4240
4241
4242
4243
4244void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
4245void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
4246void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
4247void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait,
4248 unsigned int mode, void *key);
4249int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
4250int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
4251# 489 "include/linux/wait.h"
4252static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit,
4253 int (*action)(void *), unsigned mode)
4254{
4255 if (!test_bit(bit, word))
4256 return 0;
4257 return out_of_line_wait_on_bit(word, bit, action, mode);
4258}
4259# 513 "include/linux/wait.h"
4260static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit,
4261 int (*action)(void *), unsigned mode)
4262{
4263 if (!test_and_set_bit(bit, word))
4264 return 0;
4265 return out_of_line_wait_on_bit_lock(word, bit, action, mode);
4266}
4267# 10 "include/linux/mmzone.h" 2
4268
4269
4270# 1 "include/linux/threads.h" 1
4271# 13 "include/linux/mmzone.h" 2
4272# 1 "include/linux/numa.h" 1
4273# 14 "include/linux/mmzone.h" 2
4274# 1 "include/linux/init.h" 1
4275# 131 "include/linux/init.h"
4276typedef int (*initcall_t)(void);
4277typedef void (*exitcall_t)(void);
4278
4279extern initcall_t __con_initcall_start[], __con_initcall_end[];
4280extern initcall_t __security_initcall_start[], __security_initcall_end[];
4281
4282
4283typedef void (*ctor_fn_t)(void);
4284
4285
4286extern int do_one_initcall(initcall_t fn);
4287extern char __attribute__ ((__section__(".init.data"))) boot_command_line[];
4288extern char *saved_command_line;
4289extern unsigned int reset_devices;
4290
4291
4292void setup_arch(char **);
4293void prepare_namespace(void);
4294
4295extern void (*late_time_init)(void);
4296# 15 "include/linux/mmzone.h" 2
4297
4298# 1 "include/linux/nodemask.h" 1
4299# 95 "include/linux/nodemask.h"
4300# 1 "include/linux/bitmap.h" 1
4301
4302
4303
4304
4305
4306
4307
4308# 1 "include/linux/string.h" 1
4309# 15 "include/linux/string.h"
4310extern char *strndup_user(const char *, long);
4311extern void *memdup_user(const void *, size_t);
4312
4313
4314
4315
4316# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/string.h" 1
4317# 15 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/string.h"
4318extern inline __attribute__((always_inline)) char *strcpy(char *dest, const char *src)
4319{
4320 char *xdest = dest;
4321 char temp = 0;
4322
4323 __asm__ __volatile__ (
4324 "1:"
4325 "%2 = B [%1++] (Z);"
4326 "B [%0++] = %2;"
4327 "CC = %2;"
4328 "if cc jump 1b (bp);"
4329 : "+&a" (dest), "+&a" (src), "=&d" (temp)
4330 :
4331 : "memory", "CC");
4332
4333 return xdest;
4334}
4335
4336
4337extern inline __attribute__((always_inline)) char *strncpy(char *dest, const char *src, size_t n)
4338{
4339 char *xdest = dest;
4340 char temp = 0;
4341
4342 if (n == 0)
4343 return xdest;
4344
4345 __asm__ __volatile__ (
4346 "1:"
4347 "%3 = B [%1++] (Z);"
4348 "B [%0++] = %3;"
4349 "CC = %3;"
4350 "if ! cc jump 2f;"
4351 "%2 += -1;"
4352 "CC = %2 == 0;"
4353 "if ! cc jump 1b (bp);"
4354 "jump 4f;"
4355 "2:"
4356
4357 "%3 = 0;"
4358 "3:"
4359 "%2 += -1;"
4360 "CC = %2 == 0;"
4361 "if cc jump 4f;"
4362 "B [%0++] = %3;"
4363 "jump 3b;"
4364 "4:"
4365 : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp)
4366 :
4367 : "memory", "CC");
4368
4369 return xdest;
4370}
4371
4372
4373extern inline __attribute__((always_inline)) int strcmp(const char *cs, const char *ct)
4374{
4375
4376
4377
4378 int __res1, __res2;
4379
4380 __asm__ __volatile__ (
4381 "1:"
4382 "%2 = B[%0++] (Z);"
4383 "%3 = B[%1++] (Z);"
4384 "CC = %2 == %3;"
4385 "if ! cc jump 2f;"
4386 "CC = %2;"
4387 "if cc jump 1b (bp);"
4388 "jump.s 3f;"
4389 "2:"
4390 "%2 = %2 - %3;"
4391 "3:"
4392 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2)
4393 :
4394 : "memory", "CC");
4395
4396 return __res1;
4397}
4398
4399
4400extern inline __attribute__((always_inline)) int strncmp(const char *cs, const char *ct, size_t count)
4401{
4402
4403
4404
4405 int __res1, __res2;
4406
4407 if (!count)
4408 return 0;
4409
4410 __asm__ __volatile__ (
4411 "1:"
4412 "%3 = B[%0++] (Z);"
4413 "%4 = B[%1++] (Z);"
4414 "CC = %3 == %4;"
4415 "if ! cc jump 3f;"
4416 "CC = %3;"
4417 "if ! cc jump 4f;"
4418 "%2 += -1;"
4419 "CC = %2 == 0;"
4420 "if ! cc jump 1b;"
4421 "2:"
4422 "%3 = 0;"
4423 "jump.s 4f;"
4424 "3:"
4425 "%3 = %3 - %4;"
4426 "4:"
4427 : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2)
4428 :
4429 : "memory", "CC");
4430
4431 return __res1;
4432}
4433
4434
4435extern void *memset(void *s, int c, size_t count);
4436
4437extern void *memcpy(void *d, const void *s, size_t count);
4438
4439extern int memcmp(const void *, const void *, __kernel_size_t);
4440
4441extern void *memchr(const void *s, int c, size_t n);
4442
4443extern void *memmove(void *dest, const void *src, size_t count);
4444# 22 "include/linux/string.h" 2
4445# 30 "include/linux/string.h"
4446size_t strlcpy(char *, const char *, size_t);
4447
4448
4449extern char * strcat(char *, const char *);
4450
4451
4452extern char * strncat(char *, const char *, __kernel_size_t);
4453
4454
4455extern size_t strlcat(char *, const char *, __kernel_size_t);
4456# 48 "include/linux/string.h"
4457extern int strnicmp(const char *, const char *, __kernel_size_t);
4458
4459
4460extern int strcasecmp(const char *s1, const char *s2);
4461
4462
4463extern int strncasecmp(const char *s1, const char *s2, size_t n);
4464
4465
4466extern char * strchr(const char *,int);
4467
4468
4469extern char * strnchr(const char *, size_t, int);
4470
4471
4472extern char * strrchr(const char *,int);
4473
4474extern char * __attribute__((warn_unused_result)) strstrip(char *);
4475
4476extern char * strstr(const char *,const char *);
4477
4478
4479extern __kernel_size_t strlen(const char *);
4480
4481
4482extern __kernel_size_t strnlen(const char *,__kernel_size_t);
4483
4484
4485extern char * strpbrk(const char *,const char *);
4486
4487
4488extern char * strsep(char **,const char *);
4489
4490
4491extern __kernel_size_t strspn(const char *,const char *);
4492
4493
4494extern __kernel_size_t strcspn(const char *,const char *);
4495# 98 "include/linux/string.h"
4496extern void * memscan(void *,int,__kernel_size_t);
4497# 107 "include/linux/string.h"
4498extern char *kstrdup(const char *s, gfp_t gfp);
4499extern char *kstrndup(const char *s, size_t len, gfp_t gfp);
4500extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
4501
4502extern char **argv_split(gfp_t gfp, const char *str, int *argcp);
4503extern void argv_free(char **argv);
4504
4505extern bool sysfs_streq(const char *s1, const char *s2);
4506
4507
4508int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args);
4509int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf);
4510int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __attribute__((format(printf,3,4)));
4511
4512
4513extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
4514 const void *from, size_t available);
4515
4516
4517
4518
4519
4520
4521static inline __attribute__((always_inline)) bool strstarts(const char *str, const char *prefix)
4522{
4523 return strncmp(str, prefix, strlen(prefix)) == 0;
4524}
4525# 9 "include/linux/bitmap.h" 2
4526# 87 "include/linux/bitmap.h"
4527extern int __bitmap_empty(const unsigned long *bitmap, int bits);
4528extern int __bitmap_full(const unsigned long *bitmap, int bits);
4529extern int __bitmap_equal(const unsigned long *bitmap1,
4530 const unsigned long *bitmap2, int bits);
4531extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
4532 int bits);
4533extern void __bitmap_shift_right(unsigned long *dst,
4534 const unsigned long *src, int shift, int bits);
4535extern void __bitmap_shift_left(unsigned long *dst,
4536 const unsigned long *src, int shift, int bits);
4537extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
4538 const unsigned long *bitmap2, int bits);
4539extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
4540 const unsigned long *bitmap2, int bits);
4541extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
4542 const unsigned long *bitmap2, int bits);
4543extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
4544 const unsigned long *bitmap2, int bits);
4545extern int __bitmap_intersects(const unsigned long *bitmap1,
4546 const unsigned long *bitmap2, int bits);
4547extern int __bitmap_subset(const unsigned long *bitmap1,
4548 const unsigned long *bitmap2, int bits);
4549extern int __bitmap_weight(const unsigned long *bitmap, int bits);
4550
4551extern int bitmap_scnprintf(char *buf, unsigned int len,
4552 const unsigned long *src, int nbits);
4553extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
4554 unsigned long *dst, int nbits);
4555extern int bitmap_parse_user(const char *ubuf, unsigned int ulen,
4556 unsigned long *dst, int nbits);
4557extern int bitmap_scnlistprintf(char *buf, unsigned int len,
4558 const unsigned long *src, int nbits);
4559extern int bitmap_parselist(const char *buf, unsigned long *maskp,
4560 int nmaskbits);
4561extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
4562 const unsigned long *old, const unsigned long *new, int bits);
4563extern int bitmap_bitremap(int oldbit,
4564 const unsigned long *old, const unsigned long *new, int bits);
4565extern void bitmap_onto(unsigned long *dst, const unsigned long *orig,
4566 const unsigned long *relmap, int bits);
4567extern void bitmap_fold(unsigned long *dst, const unsigned long *orig,
4568 int sz, int bits);
4569extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
4570extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
4571extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
4572extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits);
4573# 143 "include/linux/bitmap.h"
4574static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits)
4575{
4576 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4577 *dst = 0UL;
4578 else {
4579 int len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long);
4580 memset(dst, 0, len);
4581 }
4582}
4583
4584static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits)
4585{
4586 size_t nlongs = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)));
4587 if (!(__builtin_constant_p(nbits) && (nbits) <= 32)) {
4588 int len = (nlongs - 1) * sizeof(unsigned long);
4589 memset(dst, 0xff, len);
4590 }
4591 dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
4592}
4593
4594static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src,
4595 int nbits)
4596{
4597 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4598 *dst = *src;
4599 else {
4600 int len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long);
4601 memcpy(dst, src, len);
4602 }
4603}
4604
4605static inline __attribute__((always_inline)) int bitmap_and(unsigned long *dst, const unsigned long *src1,
4606 const unsigned long *src2, int nbits)
4607{
4608 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4609 return (*dst = *src1 & *src2) != 0;
4610 return __bitmap_and(dst, src1, src2, nbits);
4611}
4612
4613static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1,
4614 const unsigned long *src2, int nbits)
4615{
4616 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4617 *dst = *src1 | *src2;
4618 else
4619 __bitmap_or(dst, src1, src2, nbits);
4620}
4621
4622static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1,
4623 const unsigned long *src2, int nbits)
4624{
4625 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4626 *dst = *src1 ^ *src2;
4627 else
4628 __bitmap_xor(dst, src1, src2, nbits);
4629}
4630
4631static inline __attribute__((always_inline)) int bitmap_andnot(unsigned long *dst, const unsigned long *src1,
4632 const unsigned long *src2, int nbits)
4633{
4634 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4635 return (*dst = *src1 & ~(*src2)) != 0;
4636 return __bitmap_andnot(dst, src1, src2, nbits);
4637}
4638
4639static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src,
4640 int nbits)
4641{
4642 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4643 *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
4644 else
4645 __bitmap_complement(dst, src, nbits);
4646}
4647
4648static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1,
4649 const unsigned long *src2, int nbits)
4650{
4651 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4652 return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
4653 else
4654 return __bitmap_equal(src1, src2, nbits);
4655}
4656
4657static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1,
4658 const unsigned long *src2, int nbits)
4659{
4660 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4661 return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0;
4662 else
4663 return __bitmap_intersects(src1, src2, nbits);
4664}
4665
4666static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1,
4667 const unsigned long *src2, int nbits)
4668{
4669 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4670 return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
4671 else
4672 return __bitmap_subset(src1, src2, nbits);
4673}
4674
4675static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits)
4676{
4677 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4678 return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
4679 else
4680 return __bitmap_empty(src, nbits);
4681}
4682
4683static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits)
4684{
4685 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4686 return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
4687 else
4688 return __bitmap_full(src, nbits);
4689}
4690
4691static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits)
4692{
4693 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4694 return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
4695 return __bitmap_weight(src, nbits);
4696}
4697
4698static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst,
4699 const unsigned long *src, int n, int nbits)
4700{
4701 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4702 *dst = *src >> n;
4703 else
4704 __bitmap_shift_right(dst, src, n, nbits);
4705}
4706
4707static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst,
4708 const unsigned long *src, int n, int nbits)
4709{
4710 if ((__builtin_constant_p(nbits) && (nbits) <= 32))
4711 *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
4712 else
4713 __bitmap_shift_left(dst, src, n, nbits);
4714}
4715
4716static inline __attribute__((always_inline)) int bitmap_parse(const char *buf, unsigned int buflen,
4717 unsigned long *maskp, int nmaskbits)
4718{
4719 return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
4720}
4721# 96 "include/linux/nodemask.h" 2
4722
4723
4724typedef struct { unsigned long bits[((((1 << 0)) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; } nodemask_t;
4725extern nodemask_t _unused_nodemask_arg_;
4726
4727
4728static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp)
4729{
4730 set_bit(node, dstp->bits);
4731}
4732
4733
4734static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp)
4735{
4736 clear_bit(node, dstp->bits);
4737}
4738
4739
4740static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits)
4741{
4742 bitmap_fill(dstp->bits, nbits);
4743}
4744
4745
4746static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits)
4747{
4748 bitmap_zero(dstp->bits, nbits);
4749}
4750
4751
4752
4753
4754
4755
4756static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr)
4757{
4758 return test_and_set_bit(node, addr->bits);
4759}
4760
4761
4762
4763static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
4764 const nodemask_t *src2p, int nbits)
4765{
4766 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
4767}
4768
4769
4770
4771static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
4772 const nodemask_t *src2p, int nbits)
4773{
4774 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
4775}
4776
4777
4778
4779static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
4780 const nodemask_t *src2p, int nbits)
4781{
4782 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
4783}
4784
4785
4786
4787static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
4788 const nodemask_t *src2p, int nbits)
4789{
4790 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
4791}
4792
4793
4794
4795static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp,
4796 const nodemask_t *srcp, int nbits)
4797{
4798 bitmap_complement(dstp->bits, srcp->bits, nbits);
4799}
4800
4801
4802
4803static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p,
4804 const nodemask_t *src2p, int nbits)
4805{
4806 return bitmap_equal(src1p->bits, src2p->bits, nbits);
4807}
4808
4809
4810
4811static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p,
4812 const nodemask_t *src2p, int nbits)
4813{
4814 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
4815}
4816
4817
4818
4819static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p,
4820 const nodemask_t *src2p, int nbits)
4821{
4822 return bitmap_subset(src1p->bits, src2p->bits, nbits);
4823}
4824
4825
4826static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits)
4827{
4828 return bitmap_empty(srcp->bits, nbits);
4829}
4830
4831
4832static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits)
4833{
4834 return bitmap_full(srcp->bits, nbits);
4835}
4836
4837
4838static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits)
4839{
4840 return bitmap_weight(srcp->bits, nbits);
4841}
4842
4843
4844
4845static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp,
4846 const nodemask_t *srcp, int n, int nbits)
4847{
4848 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
4849}
4850
4851
4852
4853static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp,
4854 const nodemask_t *srcp, int n, int nbits)
4855{
4856 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
4857}
4858
4859
4860
4861
4862
4863static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp)
4864{
4865 return ({ int __min1 = ((1 << 0)); int __min2 = (find_next_bit((srcp->bits), ((1 << 0)), 0)); __min1 < __min2 ? __min1: __min2; });
4866}
4867
4868
4869static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp)
4870{
4871 return ({ int __min1 = ((1 << 0)); int __min2 = (find_next_bit(srcp->bits, (1 << 0), n+1)); __min1 < __min2 ? __min1: __min2; });
4872}
4873# 261 "include/linux/nodemask.h"
4874static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp)
4875{
4876 return ({ int __min1 = ((1 << 0)); int __min2 = (find_next_zero_bit((maskp->bits), ((1 << 0)), 0)); __min1 < __min2 ? __min1: __min2; });
4877
4878}
4879# 295 "include/linux/nodemask.h"
4880static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len,
4881 const nodemask_t *srcp, int nbits)
4882{
4883 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
4884}
4885
4886
4887
4888static inline __attribute__((always_inline)) int __nodemask_parse_user(const char *buf, int len,
4889 nodemask_t *dstp, int nbits)
4890{
4891 return bitmap_parse_user(buf, len, dstp->bits, nbits);
4892}
4893
4894
4895
4896static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len,
4897 const nodemask_t *srcp, int nbits)
4898{
4899 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
4900}
4901
4902
4903static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
4904{
4905 return bitmap_parselist(buf, dstp->bits, nbits);
4906}
4907
4908
4909
4910static inline __attribute__((always_inline)) int __node_remap(int oldbit,
4911 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
4912{
4913 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
4914}
4915
4916
4917
4918static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp,
4919 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
4920{
4921 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
4922}
4923
4924
4925
4926static inline __attribute__((always_inline)) void __nodes_onto(nodemask_t *dstp, const nodemask_t *origp,
4927 const nodemask_t *relmapp, int nbits)
4928{
4929 bitmap_onto(dstp->bits, origp->bits, relmapp->bits, nbits);
4930}
4931
4932
4933
4934static inline __attribute__((always_inline)) void __nodes_fold(nodemask_t *dstp, const nodemask_t *origp,
4935 int sz, int nbits)
4936{
4937 bitmap_fold(dstp->bits, origp->bits, sz, nbits);
4938}
4939# 369 "include/linux/nodemask.h"
4940enum node_states {
4941 N_POSSIBLE,
4942 N_ONLINE,
4943 N_NORMAL_MEMORY,
4944
4945
4946
4947 N_HIGH_MEMORY = N_NORMAL_MEMORY,
4948
4949 N_CPU,
4950 NR_NODE_STATES
4951};
4952
4953
4954
4955
4956
4957
4958extern nodemask_t node_states[NR_NODE_STATES];
4959# 432 "include/linux/nodemask.h"
4960static inline __attribute__((always_inline)) int node_state(int node, enum node_states state)
4961{
4962 return node == 0;
4963}
4964
4965static inline __attribute__((always_inline)) void node_set_state(int node, enum node_states state)
4966{
4967}
4968
4969static inline __attribute__((always_inline)) void node_clear_state(int node, enum node_states state)
4970{
4971}
4972
4973static inline __attribute__((always_inline)) int num_node_state(enum node_states state)
4974{
4975 return 1;
4976}
4977# 495 "include/linux/nodemask.h"
4978struct nodemask_scratch {
4979 nodemask_t mask1;
4980 nodemask_t mask2;
4981};
4982# 17 "include/linux/mmzone.h" 2
4983# 1 "include/linux/pageblock-flags.h" 1
4984# 29 "include/linux/pageblock-flags.h"
4985enum pageblock_bits {
4986 PB_migrate,
4987 PB_migrate_end = PB_migrate + 3 - 1,
4988
4989 NR_PAGEBLOCK_BITS
4990};
4991# 60 "include/linux/pageblock-flags.h"
4992struct page;
4993
4994
4995unsigned long get_pageblock_flags_group(struct page *page,
4996 int start_bitidx, int end_bitidx);
4997void set_pageblock_flags_group(struct page *page, unsigned long flags,
4998 int start_bitidx, int end_bitidx);
4999# 18 "include/linux/mmzone.h" 2
5000# 1 "include/linux/bounds.h" 1
5001# 19 "include/linux/mmzone.h" 2
5002# 50 "include/linux/mmzone.h"
5003extern int page_group_by_mobility_disabled;
5004
5005static inline __attribute__((always_inline)) int get_pageblock_migratetype(struct page *page)
5006{
5007 return get_pageblock_flags_group(page, PB_migrate, PB_migrate_end);
5008}
5009
5010struct free_area {
5011 struct list_head free_list[5];
5012 unsigned long nr_free;
5013};
5014
5015struct pglist_data;
5016# 79 "include/linux/mmzone.h"
5017enum zone_stat_item {
5018
5019 NR_FREE_PAGES,
5020 NR_LRU_BASE,
5021 NR_INACTIVE_ANON = NR_LRU_BASE,
5022 NR_ACTIVE_ANON,
5023 NR_INACTIVE_FILE,
5024 NR_ACTIVE_FILE,
5025 NR_UNEVICTABLE,
5026 NR_MLOCK,
5027 NR_ANON_PAGES,
5028 NR_FILE_MAPPED,
5029
5030 NR_FILE_PAGES,
5031 NR_FILE_DIRTY,
5032 NR_WRITEBACK,
5033 NR_SLAB_RECLAIMABLE,
5034 NR_SLAB_UNRECLAIMABLE,
5035 NR_PAGETABLE,
5036 NR_KERNEL_STACK,
5037
5038 NR_UNSTABLE_NFS,
5039 NR_BOUNCE,
5040 NR_VMSCAN_WRITE,
5041 NR_WRITEBACK_TEMP,
5042 NR_ISOLATED_ANON,
5043 NR_ISOLATED_FILE,
5044 NR_SHMEM,
5045# 115 "include/linux/mmzone.h"
5046 NR_VM_ZONE_STAT_ITEMS };
5047# 130 "include/linux/mmzone.h"
5048enum lru_list {
5049 LRU_INACTIVE_ANON = 0,
5050 LRU_ACTIVE_ANON = 0 + 1,
5051 LRU_INACTIVE_FILE = 0 + 2,
5052 LRU_ACTIVE_FILE = 0 + 2 + 1,
5053 LRU_UNEVICTABLE,
5054 NR_LRU_LISTS
5055};
5056
5057
5058
5059
5060
5061static inline __attribute__((always_inline)) int is_file_lru(enum lru_list l)
5062{
5063 return (l == LRU_INACTIVE_FILE || l == LRU_ACTIVE_FILE);
5064}
5065
5066static inline __attribute__((always_inline)) int is_active_lru(enum lru_list l)
5067{
5068 return (l == LRU_ACTIVE_ANON || l == LRU_ACTIVE_FILE);
5069}
5070
5071static inline __attribute__((always_inline)) int is_unevictable_lru(enum lru_list l)
5072{
5073 return (l == LRU_UNEVICTABLE);
5074}
5075
5076enum zone_watermarks {
5077 WMARK_MIN,
5078 WMARK_LOW,
5079 WMARK_HIGH,
5080 NR_WMARK
5081};
5082
5083
5084
5085
5086
5087struct per_cpu_pages {
5088 int count;
5089 int high;
5090 int batch;
5091
5092
5093 struct list_head lists[3];
5094};
5095
5096struct per_cpu_pageset {
5097 struct per_cpu_pages pcp;
5098
5099
5100
5101
5102
5103
5104
5105} ;
5106# 197 "include/linux/mmzone.h"
5107enum zone_type {
5108# 217 "include/linux/mmzone.h"
5109 ZONE_DMA,
5110# 232 "include/linux/mmzone.h"
5111 ZONE_NORMAL,
5112# 244 "include/linux/mmzone.h"
5113 ZONE_MOVABLE,
5114 __MAX_NR_ZONES
5115};
5116# 268 "include/linux/mmzone.h"
5117struct zone_reclaim_stat {
5118# 277 "include/linux/mmzone.h"
5119 unsigned long recent_rotated[2];
5120 unsigned long recent_scanned[2];
5121
5122
5123
5124
5125 unsigned long nr_saved_scan[NR_LRU_LISTS];
5126};
5127
5128struct zone {
5129
5130
5131
5132 unsigned long watermark[NR_WMARK];
5133# 300 "include/linux/mmzone.h"
5134 unsigned long lowmem_reserve[3];
5135# 311 "include/linux/mmzone.h"
5136 struct per_cpu_pageset pageset[1];
5137
5138
5139
5140
5141 spinlock_t lock;
5142
5143
5144
5145
5146 struct free_area free_area[14];
5147
5148
5149
5150
5151
5152
5153 unsigned long *pageblock_flags;
5154
5155
5156
5157
5158
5159
5160 spinlock_t lru_lock;
5161 struct zone_lru {
5162 struct list_head list;
5163 } lru[NR_LRU_LISTS];
5164
5165 struct zone_reclaim_stat reclaim_stat;
5166
5167 unsigned long pages_scanned;
5168 unsigned long flags;
5169
5170
5171 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
5172# 361 "include/linux/mmzone.h"
5173 int prev_priority;
5174
5175
5176
5177
5178
5179 unsigned int inactive_ratio;
5180
5181
5182
5183# 397 "include/linux/mmzone.h"
5184 wait_queue_head_t * wait_table;
5185 unsigned long wait_table_hash_nr_entries;
5186 unsigned long wait_table_bits;
5187
5188
5189
5190
5191 struct pglist_data *zone_pgdat;
5192
5193 unsigned long zone_start_pfn;
5194# 418 "include/linux/mmzone.h"
5195 unsigned long spanned_pages;
5196 unsigned long present_pages;
5197
5198
5199
5200
5201 const char *name;
5202} ;
5203
5204typedef enum {
5205 ZONE_ALL_UNRECLAIMABLE,
5206 ZONE_RECLAIM_LOCKED,
5207 ZONE_OOM_LOCKED,
5208} zone_flags_t;
5209
5210static inline __attribute__((always_inline)) void zone_set_flag(struct zone *zone, zone_flags_t flag)
5211{
5212 set_bit(flag, &zone->flags);
5213}
5214
5215static inline __attribute__((always_inline)) int zone_test_and_set_flag(struct zone *zone, zone_flags_t flag)
5216{
5217 return test_and_set_bit(flag, &zone->flags);
5218}
5219
5220static inline __attribute__((always_inline)) void zone_clear_flag(struct zone *zone, zone_flags_t flag)
5221{
5222 clear_bit(flag, &zone->flags);
5223}
5224
5225static inline __attribute__((always_inline)) int zone_is_all_unreclaimable(const struct zone *zone)
5226{
5227 return test_bit(ZONE_ALL_UNRECLAIMABLE, &zone->flags);
5228}
5229
5230static inline __attribute__((always_inline)) int zone_is_reclaim_locked(const struct zone *zone)
5231{
5232 return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags);
5233}
5234
5235static inline __attribute__((always_inline)) int zone_is_oom_locked(const struct zone *zone)
5236{
5237 return test_bit(ZONE_OOM_LOCKED, &zone->flags);
5238}
5239# 551 "include/linux/mmzone.h"
5240struct zonelist_cache;
5241
5242
5243
5244
5245
5246
5247struct zoneref {
5248 struct zone *zone;
5249 int zone_idx;
5250};
5251# 580 "include/linux/mmzone.h"
5252struct zonelist {
5253 struct zonelist_cache *zlcache_ptr;
5254 struct zoneref _zonerefs[((1 << 0) * 3) + 1];
5255
5256
5257
5258};
5259# 598 "include/linux/mmzone.h"
5260extern struct page *mem_map;
5261# 612 "include/linux/mmzone.h"
5262struct bootmem_data;
5263typedef struct pglist_data {
5264 struct zone node_zones[3];
5265 struct zonelist node_zonelists[1];
5266 int nr_zones;
5267
5268 struct page *node_mem_map;
5269
5270
5271
5272
5273 struct bootmem_data *bdata;
5274# 634 "include/linux/mmzone.h"
5275 unsigned long node_start_pfn;
5276 unsigned long node_present_pages;
5277 unsigned long node_spanned_pages;
5278
5279 int node_id;
5280 wait_queue_head_t kswapd_wait;
5281 struct task_struct *kswapd;
5282 int kswapd_max_order;
5283} pg_data_t;
5284# 653 "include/linux/mmzone.h"
5285# 1 "include/linux/memory_hotplug.h" 1
5286
5287
5288
5289# 1 "include/linux/mmzone.h" 1
5290# 5 "include/linux/memory_hotplug.h" 2
5291
5292# 1 "include/linux/notifier.h" 1
5293# 12 "include/linux/notifier.h"
5294# 1 "include/linux/errno.h" 1
5295
5296
5297
5298# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/errno.h" 1
5299# 1 "include/asm-generic/errno.h" 1
5300
5301
5302
5303# 1 "include/asm-generic/errno-base.h" 1
5304# 5 "include/asm-generic/errno.h" 2
5305# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/errno.h" 2
5306# 5 "include/linux/errno.h" 2
5307# 13 "include/linux/notifier.h" 2
5308# 1 "include/linux/mutex.h" 1
5309# 48 "include/linux/mutex.h"
5310struct mutex {
5311
5312 atomic_t count;
5313 spinlock_t wait_lock;
5314 struct list_head wait_list;
5315
5316 struct thread_info *owner;
5317
5318
5319 const char *name;
5320 void *magic;
5321
5322
5323 struct lockdep_map dep_map;
5324
5325};
5326
5327
5328
5329
5330
5331struct mutex_waiter {
5332 struct list_head list;
5333 struct task_struct *task;
5334
5335 void *magic;
5336
5337};
5338
5339
5340# 1 "include/linux/mutex-debug.h" 1
5341# 21 "include/linux/mutex-debug.h"
5342extern void mutex_destroy(struct mutex *lock);
5343# 79 "include/linux/mutex.h" 2
5344# 107 "include/linux/mutex.h"
5345extern void __mutex_init(struct mutex *lock, const char *name,
5346 struct lock_class_key *key);
5347
5348
5349
5350
5351
5352
5353
5354static inline __attribute__((always_inline)) int mutex_is_locked(struct mutex *lock)
5355{
5356 return ((&lock->count)->counter) != 1;
5357}
5358
5359
5360
5361
5362
5363
5364extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
5365extern int __attribute__((warn_unused_result)) mutex_lock_interruptible_nested(struct mutex *lock,
5366 unsigned int subclass);
5367extern int __attribute__((warn_unused_result)) mutex_lock_killable_nested(struct mutex *lock,
5368 unsigned int subclass);
5369# 151 "include/linux/mutex.h"
5370extern int mutex_trylock(struct mutex *lock);
5371extern void mutex_unlock(struct mutex *lock);
5372extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
5373# 14 "include/linux/notifier.h" 2
5374# 1 "include/linux/rwsem.h" 1
5375# 17 "include/linux/rwsem.h"
5376struct rw_semaphore;
5377
5378
5379# 1 "include/linux/rwsem-spinlock.h" 1
5380# 22 "include/linux/rwsem-spinlock.h"
5381struct rwsem_waiter;
5382# 31 "include/linux/rwsem-spinlock.h"
5383struct rw_semaphore {
5384 __s32 activity;
5385 spinlock_t wait_lock;
5386 struct list_head wait_list;
5387
5388 struct lockdep_map dep_map;
5389
5390};
5391# 53 "include/linux/rwsem-spinlock.h"
5392extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
5393 struct lock_class_key *key);
5394# 63 "include/linux/rwsem-spinlock.h"
5395extern void __down_read(struct rw_semaphore *sem);
5396extern int __down_read_trylock(struct rw_semaphore *sem);
5397extern void __down_write(struct rw_semaphore *sem);
5398extern void __down_write_nested(struct rw_semaphore *sem, int subclass);
5399extern int __down_write_trylock(struct rw_semaphore *sem);
5400extern void __up_read(struct rw_semaphore *sem);
5401extern void __up_write(struct rw_semaphore *sem);
5402extern void __downgrade_write(struct rw_semaphore *sem);
5403
5404static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem)
5405{
5406 return (sem->activity != 0);
5407}
5408# 21 "include/linux/rwsem.h" 2
5409
5410
5411
5412
5413
5414
5415
5416extern void down_read(struct rw_semaphore *sem);
5417
5418
5419
5420
5421extern int down_read_trylock(struct rw_semaphore *sem);
5422
5423
5424
5425
5426extern void down_write(struct rw_semaphore *sem);
5427
5428
5429
5430
5431extern int down_write_trylock(struct rw_semaphore *sem);
5432
5433
5434
5435
5436extern void up_read(struct rw_semaphore *sem);
5437
5438
5439
5440
5441extern void up_write(struct rw_semaphore *sem);
5442
5443
5444
5445
5446extern void downgrade_write(struct rw_semaphore *sem);
5447# 74 "include/linux/rwsem.h"
5448extern void down_read_nested(struct rw_semaphore *sem, int subclass);
5449extern void down_write_nested(struct rw_semaphore *sem, int subclass);
5450
5451
5452
5453
5454
5455
5456extern void down_read_non_owner(struct rw_semaphore *sem);
5457extern void up_read_non_owner(struct rw_semaphore *sem);
5458# 15 "include/linux/notifier.h" 2
5459# 1 "include/linux/srcu.h" 1
5460# 30 "include/linux/srcu.h"
5461struct srcu_struct_array {
5462 int c[2];
5463};
5464
5465struct srcu_struct {
5466 int completed;
5467 struct srcu_struct_array *per_cpu_ref;
5468 struct mutex mutex;
5469};
5470
5471
5472
5473
5474
5475
5476
5477int init_srcu_struct(struct srcu_struct *sp);
5478void cleanup_srcu_struct(struct srcu_struct *sp);
5479int srcu_read_lock(struct srcu_struct *sp) ;
5480void srcu_read_unlock(struct srcu_struct *sp, int idx) ;
5481void synchronize_srcu(struct srcu_struct *sp);
5482long srcu_batches_completed(struct srcu_struct *sp);
5483# 16 "include/linux/notifier.h" 2
5484# 50 "include/linux/notifier.h"
5485struct notifier_block {
5486 int (*notifier_call)(struct notifier_block *, unsigned long, void *);
5487 struct notifier_block *next;
5488 int priority;
5489};
5490
5491struct atomic_notifier_head {
5492 spinlock_t lock;
5493 struct notifier_block *head;
5494};
5495
5496struct blocking_notifier_head {
5497 struct rw_semaphore rwsem;
5498 struct notifier_block *head;
5499};
5500
5501struct raw_notifier_head {
5502 struct notifier_block *head;
5503};
5504
5505struct srcu_notifier_head {
5506 struct mutex mutex;
5507 struct srcu_struct srcu;
5508 struct notifier_block *head;
5509};
5510# 89 "include/linux/notifier.h"
5511extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
5512# 115 "include/linux/notifier.h"
5513extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh,
5514 struct notifier_block *nb);
5515extern int blocking_notifier_chain_register(struct blocking_notifier_head *nh,
5516 struct notifier_block *nb);
5517extern int raw_notifier_chain_register(struct raw_notifier_head *nh,
5518 struct notifier_block *nb);
5519extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh,
5520 struct notifier_block *nb);
5521
5522extern int blocking_notifier_chain_cond_register(
5523 struct blocking_notifier_head *nh,
5524 struct notifier_block *nb);
5525
5526extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
5527 struct notifier_block *nb);
5528extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh,
5529 struct notifier_block *nb);
5530extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh,
5531 struct notifier_block *nb);
5532extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh,
5533 struct notifier_block *nb);
5534
5535extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh,
5536 unsigned long val, void *v);
5537extern int __atomic_notifier_call_chain(struct atomic_notifier_head *nh,
5538 unsigned long val, void *v, int nr_to_call, int *nr_calls);
5539extern int blocking_notifier_call_chain(struct blocking_notifier_head *nh,
5540 unsigned long val, void *v);
5541extern int __blocking_notifier_call_chain(struct blocking_notifier_head *nh,
5542 unsigned long val, void *v, int nr_to_call, int *nr_calls);
5543extern int raw_notifier_call_chain(struct raw_notifier_head *nh,
5544 unsigned long val, void *v);
5545extern int __raw_notifier_call_chain(struct raw_notifier_head *nh,
5546 unsigned long val, void *v, int nr_to_call, int *nr_calls);
5547extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh,
5548 unsigned long val, void *v);
5549extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh,
5550 unsigned long val, void *v, int nr_to_call, int *nr_calls);
5551# 165 "include/linux/notifier.h"
5552static inline __attribute__((always_inline)) int notifier_from_errno(int err)
5553{
5554 return 0x8000 | (0x0001 - err);
5555}
5556
5557
5558static inline __attribute__((always_inline)) int notifier_to_errno(int ret)
5559{
5560 ret &= ~0x8000;
5561 return ret > 0x0001 ? 0x0001 - ret : 0;
5562}
5563# 261 "include/linux/notifier.h"
5564extern struct blocking_notifier_head reboot_notifier_list;
5565# 7 "include/linux/memory_hotplug.h" 2
5566
5567struct page;
5568struct zone;
5569struct pglist_data;
5570struct mem_section;
5571# 165 "include/linux/memory_hotplug.h"
5572static inline __attribute__((always_inline)) void pgdat_resize_lock(struct pglist_data *p, unsigned long *f) {}
5573static inline __attribute__((always_inline)) void pgdat_resize_unlock(struct pglist_data *p, unsigned long *f) {}
5574static inline __attribute__((always_inline)) void pgdat_resize_init(struct pglist_data *pgdat) {}
5575
5576static inline __attribute__((always_inline)) unsigned zone_span_seqbegin(struct zone *zone)
5577{
5578 return 0;
5579}
5580static inline __attribute__((always_inline)) int zone_span_seqretry(struct zone *zone, unsigned iv)
5581{
5582 return 0;
5583}
5584static inline __attribute__((always_inline)) void zone_span_writelock(struct zone *zone) {}
5585static inline __attribute__((always_inline)) void zone_span_writeunlock(struct zone *zone) {}
5586static inline __attribute__((always_inline)) void zone_seqlock_init(struct zone *zone) {}
5587
5588static inline __attribute__((always_inline)) int mhp_notimplemented(const char *func)
5589{
5590 printk("<4>" "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
5591 dump_stack();
5592 return -38;
5593}
5594
5595static inline __attribute__((always_inline)) void register_page_bootmem_info_node(struct pglist_data *pgdat)
5596{
5597}
5598# 199 "include/linux/memory_hotplug.h"
5599static inline __attribute__((always_inline)) int is_mem_section_removable(unsigned long pfn,
5600 unsigned long nr_pages)
5601{
5602 return 0;
5603}
5604
5605
5606extern int add_memory(int nid, u64 start, u64 size);
5607extern int arch_add_memory(int nid, u64 start, u64 size);
5608extern int remove_memory(u64 start, u64 size);
5609extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
5610 int nr_pages);
5611extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms);
5612extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map,
5613 unsigned long pnum);
5614# 654 "include/linux/mmzone.h" 2
5615
5616void get_zone_counts(unsigned long *active, unsigned long *inactive,
5617 unsigned long *free);
5618void build_all_zonelists(void);
5619void wakeup_kswapd(struct zone *zone, int order);
5620int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
5621 int classzone_idx, int alloc_flags);
5622enum memmap_context {
5623 MEMMAP_EARLY,
5624 MEMMAP_HOTPLUG,
5625};
5626extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
5627 unsigned long size,
5628 enum memmap_context context);
5629
5630
5631
5632
5633static inline __attribute__((always_inline)) void memory_present(int nid, unsigned long start, unsigned long end) {}
5634# 684 "include/linux/mmzone.h"
5635static inline __attribute__((always_inline)) int populated_zone(struct zone *zone)
5636{
5637 return (!!zone->present_pages);
5638}
5639
5640extern int movable_zone;
5641
5642static inline __attribute__((always_inline)) int zone_movable_is_highmem(void)
5643{
5644
5645
5646
5647 return 0;
5648
5649}
5650
5651static inline __attribute__((always_inline)) int is_highmem_idx(enum zone_type idx)
5652{
5653
5654
5655
5656
5657 return 0;
5658
5659}
5660
5661static inline __attribute__((always_inline)) int is_normal_idx(enum zone_type idx)
5662{
5663 return (idx == ZONE_NORMAL);
5664}
5665
5666
5667
5668
5669
5670
5671
5672static inline __attribute__((always_inline)) int is_highmem(struct zone *zone)
5673{
5674
5675
5676
5677
5678
5679
5680 return 0;
5681
5682}
5683
5684static inline __attribute__((always_inline)) int is_normal(struct zone *zone)
5685{
5686 return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL;
5687}
5688
5689static inline __attribute__((always_inline)) int is_dma32(struct zone *zone)
5690{
5691
5692
5693
5694 return 0;
5695
5696}
5697
5698static inline __attribute__((always_inline)) int is_dma(struct zone *zone)
5699{
5700
5701 return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
5702
5703
5704
5705}
5706
5707
5708struct ctl_table;
5709int min_free_kbytes_sysctl_handler(struct ctl_table *, int,
5710 void *, size_t *, loff_t *);
5711extern int sysctl_lowmem_reserve_ratio[3 -1];
5712int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,
5713 void *, size_t *, loff_t *);
5714int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
5715 void *, size_t *, loff_t *);
5716int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
5717 void *, size_t *, loff_t *);
5718int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
5719 void *, size_t *, loff_t *);
5720
5721extern int numa_zonelist_order_handler(struct ctl_table *, int,
5722 void *, size_t *, loff_t *);
5723extern char numa_zonelist_order[];
5724
5725
5726
5727
5728extern struct pglist_data contig_page_data;
5729# 787 "include/linux/mmzone.h"
5730extern struct pglist_data *first_online_pgdat(void);
5731extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
5732extern struct zone *next_zone(struct zone *zone);
5733# 819 "include/linux/mmzone.h"
5734static inline __attribute__((always_inline)) struct zone *zonelist_zone(struct zoneref *zoneref)
5735{
5736 return zoneref->zone;
5737}
5738
5739static inline __attribute__((always_inline)) int zonelist_zone_idx(struct zoneref *zoneref)
5740{
5741 return zoneref->zone_idx;
5742}
5743
5744static inline __attribute__((always_inline)) int zonelist_node_idx(struct zoneref *zoneref)
5745{
5746
5747
5748
5749
5750 return 0;
5751
5752}
5753# 852 "include/linux/mmzone.h"
5754struct zoneref *next_zones_zonelist(struct zoneref *z,
5755 enum zone_type highest_zoneidx,
5756 nodemask_t *nodes,
5757 struct zone **zone);
5758# 869 "include/linux/mmzone.h"
5759static inline __attribute__((always_inline)) struct zoneref *first_zones_zonelist(struct zonelist *zonelist,
5760 enum zone_type highest_zoneidx,
5761 nodemask_t *nodes,
5762 struct zone **zone)
5763{
5764 return next_zones_zonelist(zonelist->_zonerefs, highest_zoneidx, nodes,
5765 zone);
5766}
5767# 912 "include/linux/mmzone.h"
5768static inline __attribute__((always_inline)) unsigned long early_pfn_to_nid(unsigned long pfn)
5769{
5770 return 0;
5771}
5772# 1093 "include/linux/mmzone.h"
5773void memory_present(int nid, unsigned long start, unsigned long end);
5774unsigned long __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) node_memmap_size_bytes(int, unsigned long, unsigned long);
5775# 1127 "include/linux/mmzone.h"
5776static inline __attribute__((always_inline)) int memmap_valid_within(unsigned long pfn,
5777 struct page *page, struct zone *zone)
5778{
5779 return 1;
5780}
5781# 5 "include/linux/gfp.h" 2
5782
5783
5784# 1 "include/linux/topology.h" 1
5785# 30 "include/linux/topology.h"
5786# 1 "include/linux/cpumask.h" 1
5787# 13 "include/linux/cpumask.h"
5788typedef struct cpumask { unsigned long bits[(((1) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; } cpumask_t;
5789# 78 "include/linux/cpumask.h"
5790extern const struct cpumask *const cpu_possible_mask;
5791extern const struct cpumask *const cpu_online_mask;
5792extern const struct cpumask *const cpu_present_mask;
5793extern const struct cpumask *const cpu_active_mask;
5794# 102 "include/linux/cpumask.h"
5795static inline __attribute__((always_inline)) unsigned int cpumask_check(unsigned int cpu)
5796{
5797
5798
5799
5800 return cpu;
5801}
5802
5803
5804
5805static inline __attribute__((always_inline)) unsigned int cpumask_first(const struct cpumask *srcp)
5806{
5807 return 0;
5808}
5809
5810
5811static inline __attribute__((always_inline)) unsigned int cpumask_next(int n, const struct cpumask *srcp)
5812{
5813 return n+1;
5814}
5815
5816static inline __attribute__((always_inline)) unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
5817{
5818 return n+1;
5819}
5820
5821static inline __attribute__((always_inline)) unsigned int cpumask_next_and(int n,
5822 const struct cpumask *srcp,
5823 const struct cpumask *andp)
5824{
5825 return n+1;
5826}
5827
5828
5829static inline __attribute__((always_inline)) unsigned int cpumask_any_but(const struct cpumask *mask,
5830 unsigned int cpu)
5831{
5832 return 1;
5833}
5834# 238 "include/linux/cpumask.h"
5835static inline __attribute__((always_inline)) void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
5836{
5837 set_bit(cpumask_check(cpu), ((dstp)->bits));
5838}
5839
5840
5841
5842
5843
5844
5845static inline __attribute__((always_inline)) void cpumask_clear_cpu(int cpu, struct cpumask *dstp)
5846{
5847 clear_bit(cpumask_check(cpu), ((dstp)->bits));
5848}
5849# 270 "include/linux/cpumask.h"
5850static inline __attribute__((always_inline)) int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask)
5851{
5852 return test_and_set_bit(cpumask_check(cpu), ((cpumask)->bits));
5853}
5854# 282 "include/linux/cpumask.h"
5855static inline __attribute__((always_inline)) int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask)
5856{
5857 return test_and_clear_bit(cpumask_check(cpu), ((cpumask)->bits));
5858}
5859
5860
5861
5862
5863
5864static inline __attribute__((always_inline)) void cpumask_setall(struct cpumask *dstp)
5865{
5866 bitmap_fill(((dstp)->bits), 1);
5867}
5868
5869
5870
5871
5872
5873static inline __attribute__((always_inline)) void cpumask_clear(struct cpumask *dstp)
5874{
5875 bitmap_zero(((dstp)->bits), 1);
5876}
5877
5878
5879
5880
5881
5882
5883
5884static inline __attribute__((always_inline)) int cpumask_and(struct cpumask *dstp,
5885 const struct cpumask *src1p,
5886 const struct cpumask *src2p)
5887{
5888 return bitmap_and(((dstp)->bits), ((src1p)->bits),
5889 ((src2p)->bits), 1);
5890}
5891
5892
5893
5894
5895
5896
5897
5898static inline __attribute__((always_inline)) void cpumask_or(struct cpumask *dstp, const struct cpumask *src1p,
5899 const struct cpumask *src2p)
5900{
5901 bitmap_or(((dstp)->bits), ((src1p)->bits),
5902 ((src2p)->bits), 1);
5903}
5904
5905
5906
5907
5908
5909
5910
5911static inline __attribute__((always_inline)) void cpumask_xor(struct cpumask *dstp,
5912 const struct cpumask *src1p,
5913 const struct cpumask *src2p)
5914{
5915 bitmap_xor(((dstp)->bits), ((src1p)->bits),
5916 ((src2p)->bits), 1);
5917}
5918
5919
5920
5921
5922
5923
5924
5925static inline __attribute__((always_inline)) int cpumask_andnot(struct cpumask *dstp,
5926 const struct cpumask *src1p,
5927 const struct cpumask *src2p)
5928{
5929 return bitmap_andnot(((dstp)->bits), ((src1p)->bits),
5930 ((src2p)->bits), 1);
5931}
5932
5933
5934
5935
5936
5937
5938static inline __attribute__((always_inline)) void cpumask_complement(struct cpumask *dstp,
5939 const struct cpumask *srcp)
5940{
5941 bitmap_complement(((dstp)->bits), ((srcp)->bits),
5942 1);
5943}
5944
5945
5946
5947
5948
5949
5950static inline __attribute__((always_inline)) bool cpumask_equal(const struct cpumask *src1p,
5951 const struct cpumask *src2p)
5952{
5953 return bitmap_equal(((src1p)->bits), ((src2p)->bits),
5954 1);
5955}
5956
5957
5958
5959
5960
5961
5962static inline __attribute__((always_inline)) bool cpumask_intersects(const struct cpumask *src1p,
5963 const struct cpumask *src2p)
5964{
5965 return bitmap_intersects(((src1p)->bits), ((src2p)->bits),
5966 1);
5967}
5968
5969
5970
5971
5972
5973
5974static inline __attribute__((always_inline)) int cpumask_subset(const struct cpumask *src1p,
5975 const struct cpumask *src2p)
5976{
5977 return bitmap_subset(((src1p)->bits), ((src2p)->bits),
5978 1);
5979}
5980
5981
5982
5983
5984
5985static inline __attribute__((always_inline)) bool cpumask_empty(const struct cpumask *srcp)
5986{
5987 return bitmap_empty(((srcp)->bits), 1);
5988}
5989
5990
5991
5992
5993
5994static inline __attribute__((always_inline)) bool cpumask_full(const struct cpumask *srcp)
5995{
5996 return bitmap_full(((srcp)->bits), 1);
5997}
5998
5999
6000
6001
6002
6003static inline __attribute__((always_inline)) unsigned int cpumask_weight(const struct cpumask *srcp)
6004{
6005 return bitmap_weight(((srcp)->bits), 1);
6006}
6007
6008
6009
6010
6011
6012
6013
6014static inline __attribute__((always_inline)) void cpumask_shift_right(struct cpumask *dstp,
6015 const struct cpumask *srcp, int n)
6016{
6017 bitmap_shift_right(((dstp)->bits), ((srcp)->bits), n,
6018 1);
6019}
6020
6021
6022
6023
6024
6025
6026
6027static inline __attribute__((always_inline)) void cpumask_shift_left(struct cpumask *dstp,
6028 const struct cpumask *srcp, int n)
6029{
6030 bitmap_shift_left(((dstp)->bits), ((srcp)->bits), n,
6031 1);
6032}
6033
6034
6035
6036
6037
6038
6039static inline __attribute__((always_inline)) void cpumask_copy(struct cpumask *dstp,
6040 const struct cpumask *srcp)
6041{
6042 bitmap_copy(((dstp)->bits), ((srcp)->bits), 1);
6043}
6044# 513 "include/linux/cpumask.h"
6045static inline __attribute__((always_inline)) int cpumask_scnprintf(char *buf, int len,
6046 const struct cpumask *srcp)
6047{
6048 return bitmap_scnprintf(buf, len, ((srcp)->bits), 1);
6049}
6050# 527 "include/linux/cpumask.h"
6051static inline __attribute__((always_inline)) int cpumask_parse_user(const char *buf, int len,
6052 struct cpumask *dstp)
6053{
6054 return bitmap_parse_user(buf, len, ((dstp)->bits), 1);
6055}
6056# 542 "include/linux/cpumask.h"
6057static inline __attribute__((always_inline)) int cpulist_scnprintf(char *buf, int len,
6058 const struct cpumask *srcp)
6059{
6060 return bitmap_scnlistprintf(buf, len, ((srcp)->bits),
6061 1);
6062}
6063# 557 "include/linux/cpumask.h"
6064static inline __attribute__((always_inline)) int cpulist_parse(const char *buf, struct cpumask *dstp)
6065{
6066 return bitmap_parselist(buf, ((dstp)->bits), 1);
6067}
6068
6069
6070
6071
6072
6073
6074static inline __attribute__((always_inline)) size_t cpumask_size(void)
6075{
6076
6077
6078 return (((1) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(long);
6079}
6080# 602 "include/linux/cpumask.h"
6081typedef struct cpumask cpumask_var_t[1];
6082
6083static inline __attribute__((always_inline)) bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
6084{
6085 return true;
6086}
6087
6088static inline __attribute__((always_inline)) bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
6089 int node)
6090{
6091 return true;
6092}
6093
6094static inline __attribute__((always_inline)) bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
6095{
6096 cpumask_clear(*mask);
6097 return true;
6098}
6099
6100static inline __attribute__((always_inline)) bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
6101 int node)
6102{
6103 cpumask_clear(*mask);
6104 return true;
6105}
6106
6107static inline __attribute__((always_inline)) void alloc_bootmem_cpumask_var(cpumask_var_t *mask)
6108{
6109}
6110
6111static inline __attribute__((always_inline)) void free_cpumask_var(cpumask_var_t mask)
6112{
6113}
6114
6115static inline __attribute__((always_inline)) void free_bootmem_cpumask_var(cpumask_var_t mask)
6116{
6117}
6118
6119
6120
6121
6122extern const unsigned long cpu_all_bits[(((1) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))];
6123# 654 "include/linux/cpumask.h"
6124void set_cpu_possible(unsigned int cpu, bool possible);
6125void set_cpu_present(unsigned int cpu, bool present);
6126void set_cpu_online(unsigned int cpu, bool online);
6127void set_cpu_active(unsigned int cpu, bool active);
6128void init_cpu_present(const struct cpumask *src);
6129void init_cpu_possible(const struct cpumask *src);
6130void init_cpu_online(const struct cpumask *src);
6131# 676 "include/linux/cpumask.h"
6132static inline __attribute__((always_inline)) int __check_is_bitmap(const unsigned long *bitmap)
6133{
6134 return 1;
6135}
6136# 688 "include/linux/cpumask.h"
6137extern const unsigned long
6138 cpu_bit_bitmap[32 +1][(((1) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))];
6139
6140static inline __attribute__((always_inline)) const struct cpumask *get_cpu_mask(unsigned int cpu)
6141{
6142 const unsigned long *p = cpu_bit_bitmap[1 + cpu % 32];
6143 p -= cpu / 32;
6144 return ((struct cpumask *)(1 ? (p) : (void *)sizeof(__check_is_bitmap(p))));
6145}
6146# 795 "include/linux/cpumask.h"
6147static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp)
6148{
6149 set_bit(cpu, dstp->bits);
6150}
6151
6152
6153static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp)
6154{
6155 clear_bit(cpu, dstp->bits);
6156}
6157
6158
6159static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits)
6160{
6161 bitmap_fill(dstp->bits, nbits);
6162}
6163
6164
6165static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits)
6166{
6167 bitmap_zero(dstp->bits, nbits);
6168}
6169
6170
6171
6172
6173
6174static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr)
6175{
6176 return test_and_set_bit(cpu, addr->bits);
6177}
6178
6179
6180static inline __attribute__((always_inline)) int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
6181 const cpumask_t *src2p, int nbits)
6182{
6183 return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
6184}
6185
6186
6187static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
6188 const cpumask_t *src2p, int nbits)
6189{
6190 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
6191}
6192
6193
6194static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
6195 const cpumask_t *src2p, int nbits)
6196{
6197 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
6198}
6199
6200
6201
6202static inline __attribute__((always_inline)) int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
6203 const cpumask_t *src2p, int nbits)
6204{
6205 return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
6206}
6207
6208
6209static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p,
6210 const cpumask_t *src2p, int nbits)
6211{
6212 return bitmap_equal(src1p->bits, src2p->bits, nbits);
6213}
6214
6215
6216static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p,
6217 const cpumask_t *src2p, int nbits)
6218{
6219 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
6220}
6221
6222
6223static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p,
6224 const cpumask_t *src2p, int nbits)
6225{
6226 return bitmap_subset(src1p->bits, src2p->bits, nbits);
6227}
6228
6229
6230static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits)
6231{
6232 return bitmap_empty(srcp->bits, nbits);
6233}
6234
6235
6236static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits)
6237{
6238 return bitmap_weight(srcp->bits, nbits);
6239}
6240
6241
6242
6243static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp,
6244 const cpumask_t *srcp, int n, int nbits)
6245{
6246 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
6247}
6248# 31 "include/linux/topology.h" 2
6249
6250
6251# 1 "include/linux/smp.h" 1
6252# 14 "include/linux/smp.h"
6253extern void cpu_idle(void);
6254
6255struct call_single_data {
6256 struct list_head list;
6257 void (*func) (void *info);
6258 void *info;
6259 u16 flags;
6260 u16 priv;
6261};
6262
6263
6264extern unsigned int total_cpus;
6265
6266int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
6267 int wait);
6268# 116 "include/linux/smp.h"
6269static inline __attribute__((always_inline)) void smp_send_stop(void) { }
6270
6271
6272
6273
6274
6275static inline __attribute__((always_inline)) int up_smp_call_function(void (*func)(void *), void *info)
6276{
6277 return 0;
6278}
6279# 135 "include/linux/smp.h"
6280static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) { }
6281
6282
6283
6284
6285static inline __attribute__((always_inline)) void init_call_single_data(void)
6286{
6287}
6288# 174 "include/linux/smp.h"
6289extern void arch_disable_smp_support(void);
6290
6291void smp_setup_processor_id(void);
6292# 34 "include/linux/topology.h" 2
6293# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/topology.h" 1
6294# 1 "include/asm-generic/topology.h" 1
6295# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/topology.h" 2
6296# 35 "include/linux/topology.h" 2
6297# 48 "include/linux/topology.h"
6298int arch_update_cpu_topology(void);
6299# 8 "include/linux/gfp.h" 2
6300# 1 "include/linux/mmdebug.h" 1
6301
6302
6303
6304# 1 "include/linux/autoconf.h" 1
6305# 5 "include/linux/mmdebug.h" 2
6306# 9 "include/linux/gfp.h" 2
6307
6308struct vm_area_struct;
6309# 119 "include/linux/gfp.h"
6310static inline __attribute__((always_inline)) int allocflags_to_migratetype(gfp_t gfp_flags)
6311{
6312 ({ int __ret_warn_on = !!((gfp_flags & ((( gfp_t)0x80000u)|(( gfp_t)0x08u))) == ((( gfp_t)0x80000u)|(( gfp_t)0x08u))); if (__builtin_expect(!!(__ret_warn_on), 0)) asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/gfp.h"), "i"(121), "i"((1<<0)), "i"(sizeof(struct bug_entry))); __builtin_expect(!!(__ret_warn_on), 0); });
6313
6314 if (__builtin_expect(!!(page_group_by_mobility_disabled), 0))
6315 return 0;
6316
6317
6318 return (((gfp_flags & (( gfp_t)0x08u)) != 0) << 1) |
6319 ((gfp_flags & (( gfp_t)0x80000u)) != 0);
6320}
6321# 214 "include/linux/gfp.h"
6322static inline __attribute__((always_inline)) enum zone_type gfp_zone(gfp_t flags)
6323{
6324 enum zone_type z;
6325 int bit = flags & ((( gfp_t)0x01u)|(( gfp_t)0x02u)|(( gfp_t)0x04u)|(( gfp_t)0x08u));
6326
6327 z = (( (ZONE_NORMAL << 0 * 2) | (ZONE_DMA << (( gfp_t)0x01u) * 2) | (ZONE_NORMAL << (( gfp_t)0x02u) * 2) | (ZONE_NORMAL << (( gfp_t)0x04u) * 2) | (ZONE_NORMAL << (( gfp_t)0x08u) * 2) | (ZONE_DMA << ((( gfp_t)0x08u) | (( gfp_t)0x01u)) * 2) | (ZONE_MOVABLE << ((( gfp_t)0x08u) | (( gfp_t)0x02u)) * 2) | (ZONE_NORMAL << ((( gfp_t)0x08u) | (( gfp_t)0x04u)) * 2)) >> (bit * 2)) &
6328 ((1 << 2) - 1);
6329
6330 if (__builtin_constant_p(bit))
6331 ((void)sizeof(char[1 - 2 * !!((( 1 << ((( gfp_t)0x01u) | (( gfp_t)0x02u)) | 1 << ((( gfp_t)0x01u) | (( gfp_t)0x04u)) | 1 << ((( gfp_t)0x04u) | (( gfp_t)0x02u)) | 1 << ((( gfp_t)0x01u) | (( gfp_t)0x04u) | (( gfp_t)0x02u)) | 1 << ((( gfp_t)0x08u) | (( gfp_t)0x02u) | (( gfp_t)0x01u)) | 1 << ((( gfp_t)0x08u) | (( gfp_t)0x04u) | (( gfp_t)0x01u)) | 1 << ((( gfp_t)0x08u) | (( gfp_t)0x04u) | (( gfp_t)0x02u)) | 1 << ((( gfp_t)0x08u) | (( gfp_t)0x04u) | (( gfp_t)0x01u) | (( gfp_t)0x02u))) >> bit) & 1)]));
6332 else {
6333
6334
6335
6336 }
6337 return z;
6338}
6339# 239 "include/linux/gfp.h"
6340static inline __attribute__((always_inline)) int gfp_zonelist(gfp_t flags)
6341{
6342 if (0 && __builtin_expect(!!(flags & (( gfp_t)0x40000u)), 0))
6343 return 1;
6344
6345 return 0;
6346}
6347# 256 "include/linux/gfp.h"
6348static inline __attribute__((always_inline)) struct zonelist *node_zonelist(int nid, gfp_t flags)
6349{
6350 return (&contig_page_data)->node_zonelists + gfp_zonelist(flags);
6351}
6352
6353
6354static inline __attribute__((always_inline)) void arch_free_page(struct page *page, int order) { }
6355
6356
6357static inline __attribute__((always_inline)) void arch_alloc_page(struct page *page, int order) { }
6358
6359
6360struct page *
6361__alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order,
6362 struct zonelist *zonelist, nodemask_t *nodemask);
6363
6364static inline __attribute__((always_inline)) struct page *
6365__alloc_pages(gfp_t gfp_mask, unsigned int order,
6366 struct zonelist *zonelist)
6367{
6368 return __alloc_pages_nodemask(gfp_mask, order, zonelist, ((void *)0));
6369}
6370
6371static inline __attribute__((always_inline)) struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
6372 unsigned int order)
6373{
6374
6375 if (nid < 0)
6376 nid = (((void)(0),0));
6377
6378 return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask));
6379}
6380
6381static inline __attribute__((always_inline)) struct page *alloc_pages_exact_node(int nid, gfp_t gfp_mask,
6382 unsigned int order)
6383{
6384 do { } while (0);
6385
6386 return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask));
6387}
6388# 314 "include/linux/gfp.h"
6389extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
6390extern unsigned long get_zeroed_page(gfp_t gfp_mask);
6391
6392void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
6393void free_pages_exact(void *virt, size_t size);
6394
6395
6396
6397
6398
6399
6400
6401extern void __free_pages(struct page *page, unsigned int order);
6402extern void free_pages(unsigned long addr, unsigned int order);
6403extern void free_hot_page(struct page *page);
6404
6405
6406
6407
6408void page_alloc_init(void);
6409void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
6410void drain_all_pages(void);
6411void drain_local_pages(void *dummy);
6412
6413extern gfp_t gfp_allowed_mask;
6414
6415static inline __attribute__((always_inline)) void set_gfp_allowed_mask(gfp_t mask)
6416{
6417 gfp_allowed_mask = mask;
6418}
6419# 23 "include/linux/kmod.h" 2
6420# 32 "include/linux/kmod.h"
6421extern int __request_module(bool wait, const char *name, ...) __attribute__((format(printf, 2, 3)));
6422# 45 "include/linux/kmod.h"
6423struct key;
6424struct file;
6425struct subprocess_info;
6426
6427
6428struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
6429 char **envp, gfp_t gfp_mask);
6430
6431
6432void call_usermodehelper_setkeys(struct subprocess_info *info,
6433 struct key *session_keyring);
6434int call_usermodehelper_stdinpipe(struct subprocess_info *sub_info,
6435 struct file **filp);
6436void call_usermodehelper_setcleanup(struct subprocess_info *info,
6437 void (*cleanup)(char **argv, char **envp));
6438
6439enum umh_wait {
6440 UMH_NO_WAIT = -1,
6441 UMH_WAIT_EXEC = 0,
6442 UMH_WAIT_PROC = 1,
6443};
6444
6445
6446int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait);
6447
6448
6449
6450void call_usermodehelper_freeinfo(struct subprocess_info *info);
6451
6452static inline __attribute__((always_inline)) int
6453call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait)
6454{
6455 struct subprocess_info *info;
6456 gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? ((( gfp_t)0x20u)) : ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u));
6457
6458 info = call_usermodehelper_setup(path, argv, envp, gfp_mask);
6459 if (info == ((void *)0))
6460 return -12;
6461 return call_usermodehelper_exec(info, wait);
6462}
6463
6464static inline __attribute__((always_inline)) int
6465call_usermodehelper_keys(char *path, char **argv, char **envp,
6466 struct key *session_keyring, enum umh_wait wait)
6467{
6468 struct subprocess_info *info;
6469 gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? ((( gfp_t)0x20u)) : ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u));
6470
6471 info = call_usermodehelper_setup(path, argv, envp, gfp_mask);
6472 if (info == ((void *)0))
6473 return -12;
6474
6475 call_usermodehelper_setkeys(info, session_keyring);
6476 return call_usermodehelper_exec(info, wait);
6477}
6478
6479extern void usermodehelper_init(void);
6480
6481struct file;
6482extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[],
6483 struct file **filp);
6484
6485extern int usermodehelper_disable(void);
6486extern void usermodehelper_enable(void);
6487# 14 "include/linux/module.h" 2
6488# 1 "include/linux/elf.h" 1
6489
6490
6491
6492
6493# 1 "include/linux/elf-em.h" 1
6494# 6 "include/linux/elf.h" 2
6495
6496# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/elf.h" 1
6497# 15 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/elf.h"
6498# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/user.h" 1
6499# 1 "include/asm-generic/user.h" 1
6500# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/user.h" 2
6501# 16 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/elf.h" 2
6502# 25 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/elf.h"
6503typedef unsigned long elf_greg_t;
6504
6505
6506typedef elf_greg_t elf_gregset_t[40];
6507
6508typedef struct { } elf_fpregset_t;
6509# 131 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/elf.h"
6510struct mm_struct;
6511struct elf_fdpic_params;
6512struct elf32_phdr;
6513extern int elf_fdpic_plat_process_phdr(struct mm_struct *, struct elf_fdpic_params *,
6514 struct elf32_phdr *, unsigned long *, unsigned long *);
6515# 8 "include/linux/elf.h" 2
6516
6517
6518struct file;
6519# 20 "include/linux/elf.h"
6520typedef __u32 Elf32_Addr;
6521typedef __u16 Elf32_Half;
6522typedef __u32 Elf32_Off;
6523typedef __s32 Elf32_Sword;
6524typedef __u32 Elf32_Word;
6525
6526
6527typedef __u64 Elf64_Addr;
6528typedef __u16 Elf64_Half;
6529typedef __s16 Elf64_SHalf;
6530typedef __u64 Elf64_Off;
6531typedef __s32 Elf64_Sword;
6532typedef __u32 Elf64_Word;
6533typedef __u64 Elf64_Xword;
6534typedef __s64 Elf64_Sxword;
6535# 127 "include/linux/elf.h"
6536typedef struct dynamic{
6537 Elf32_Sword d_tag;
6538 union{
6539 Elf32_Sword d_val;
6540 Elf32_Addr d_ptr;
6541 } d_un;
6542} Elf32_Dyn;
6543
6544typedef struct {
6545 Elf64_Sxword d_tag;
6546 union {
6547 Elf64_Xword d_val;
6548 Elf64_Addr d_ptr;
6549 } d_un;
6550} Elf64_Dyn;
6551# 150 "include/linux/elf.h"
6552typedef struct elf32_rel {
6553 Elf32_Addr r_offset;
6554 Elf32_Word r_info;
6555} Elf32_Rel;
6556
6557typedef struct elf64_rel {
6558 Elf64_Addr r_offset;
6559 Elf64_Xword r_info;
6560} Elf64_Rel;
6561
6562typedef struct elf32_rela{
6563 Elf32_Addr r_offset;
6564 Elf32_Word r_info;
6565 Elf32_Sword r_addend;
6566} Elf32_Rela;
6567
6568typedef struct elf64_rela {
6569 Elf64_Addr r_offset;
6570 Elf64_Xword r_info;
6571 Elf64_Sxword r_addend;
6572} Elf64_Rela;
6573
6574typedef struct elf32_sym{
6575 Elf32_Word st_name;
6576 Elf32_Addr st_value;
6577 Elf32_Word st_size;
6578 unsigned char st_info;
6579 unsigned char st_other;
6580 Elf32_Half st_shndx;
6581} Elf32_Sym;
6582
6583typedef struct elf64_sym {
6584 Elf64_Word st_name;
6585 unsigned char st_info;
6586 unsigned char st_other;
6587 Elf64_Half st_shndx;
6588 Elf64_Addr st_value;
6589 Elf64_Xword st_size;
6590} Elf64_Sym;
6591
6592
6593
6594
6595typedef struct elf32_hdr{
6596 unsigned char e_ident[16];
6597 Elf32_Half e_type;
6598 Elf32_Half e_machine;
6599 Elf32_Word e_version;
6600 Elf32_Addr e_entry;
6601 Elf32_Off e_phoff;
6602 Elf32_Off e_shoff;
6603 Elf32_Word e_flags;
6604 Elf32_Half e_ehsize;
6605 Elf32_Half e_phentsize;
6606 Elf32_Half e_phnum;
6607 Elf32_Half e_shentsize;
6608 Elf32_Half e_shnum;
6609 Elf32_Half e_shstrndx;
6610} Elf32_Ehdr;
6611
6612typedef struct elf64_hdr {
6613 unsigned char e_ident[16];
6614 Elf64_Half e_type;
6615 Elf64_Half e_machine;
6616 Elf64_Word e_version;
6617 Elf64_Addr e_entry;
6618 Elf64_Off e_phoff;
6619 Elf64_Off e_shoff;
6620 Elf64_Word e_flags;
6621 Elf64_Half e_ehsize;
6622 Elf64_Half e_phentsize;
6623 Elf64_Half e_phnum;
6624 Elf64_Half e_shentsize;
6625 Elf64_Half e_shnum;
6626 Elf64_Half e_shstrndx;
6627} Elf64_Ehdr;
6628
6629
6630
6631
6632
6633
6634
6635typedef struct elf32_phdr{
6636 Elf32_Word p_type;
6637 Elf32_Off p_offset;
6638 Elf32_Addr p_vaddr;
6639 Elf32_Addr p_paddr;
6640 Elf32_Word p_filesz;
6641 Elf32_Word p_memsz;
6642 Elf32_Word p_flags;
6643 Elf32_Word p_align;
6644} Elf32_Phdr;
6645
6646typedef struct elf64_phdr {
6647 Elf64_Word p_type;
6648 Elf64_Word p_flags;
6649 Elf64_Off p_offset;
6650 Elf64_Addr p_vaddr;
6651 Elf64_Addr p_paddr;
6652 Elf64_Xword p_filesz;
6653 Elf64_Xword p_memsz;
6654 Elf64_Xword p_align;
6655} Elf64_Phdr;
6656# 289 "include/linux/elf.h"
6657typedef struct {
6658 Elf32_Word sh_name;
6659 Elf32_Word sh_type;
6660 Elf32_Word sh_flags;
6661 Elf32_Addr sh_addr;
6662 Elf32_Off sh_offset;
6663 Elf32_Word sh_size;
6664 Elf32_Word sh_link;
6665 Elf32_Word sh_info;
6666 Elf32_Word sh_addralign;
6667 Elf32_Word sh_entsize;
6668} Elf32_Shdr;
6669
6670typedef struct elf64_shdr {
6671 Elf64_Word sh_name;
6672 Elf64_Word sh_type;
6673 Elf64_Xword sh_flags;
6674 Elf64_Addr sh_addr;
6675 Elf64_Off sh_offset;
6676 Elf64_Xword sh_size;
6677 Elf64_Word sh_link;
6678 Elf64_Word sh_info;
6679 Elf64_Xword sh_addralign;
6680 Elf64_Xword sh_entsize;
6681} Elf64_Shdr;
6682# 368 "include/linux/elf.h"
6683typedef struct elf32_note {
6684 Elf32_Word n_namesz;
6685 Elf32_Word n_descsz;
6686 Elf32_Word n_type;
6687} Elf32_Nhdr;
6688
6689
6690typedef struct elf64_note {
6691 Elf64_Word n_namesz;
6692 Elf64_Word n_descsz;
6693 Elf64_Word n_type;
6694} Elf64_Nhdr;
6695
6696
6697
6698
6699extern Elf32_Dyn _DYNAMIC [];
6700# 402 "include/linux/elf.h"
6701static inline __attribute__((always_inline)) int elf_coredump_extra_notes_size(void) { return 0; }
6702static inline __attribute__((always_inline)) int elf_coredump_extra_notes_write(struct file *file,
6703 loff_t *foffset) { return 0; }
6704# 15 "include/linux/module.h" 2
6705
6706# 1 "include/linux/kobject.h" 1
6707# 21 "include/linux/kobject.h"
6708# 1 "include/linux/sysfs.h" 1
6709# 20 "include/linux/sysfs.h"
6710struct kobject;
6711struct module;
6712
6713
6714
6715
6716
6717
6718struct attribute {
6719 const char *name;
6720 struct module *owner;
6721 mode_t mode;
6722};
6723
6724struct attribute_group {
6725 const char *name;
6726 mode_t (*is_visible)(struct kobject *,
6727 struct attribute *, int);
6728 struct attribute **attrs;
6729};
6730# 63 "include/linux/sysfs.h"
6731struct vm_area_struct;
6732
6733struct bin_attribute {
6734 struct attribute attr;
6735 size_t size;
6736 void *private;
6737 ssize_t (*read)(struct kobject *, struct bin_attribute *,
6738 char *, loff_t, size_t);
6739 ssize_t (*write)(struct kobject *, struct bin_attribute *,
6740 char *, loff_t, size_t);
6741 int (*mmap)(struct kobject *, struct bin_attribute *attr,
6742 struct vm_area_struct *vma);
6743};
6744
6745struct sysfs_ops {
6746 ssize_t (*show)(struct kobject *, struct attribute *,char *);
6747 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
6748};
6749
6750struct sysfs_dirent;
6751
6752
6753
6754int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *),
6755 void *data, struct module *owner);
6756
6757int __attribute__((warn_unused_result)) sysfs_create_dir(struct kobject *kobj);
6758void sysfs_remove_dir(struct kobject *kobj);
6759int __attribute__((warn_unused_result)) sysfs_rename_dir(struct kobject *kobj, const char *new_name);
6760int __attribute__((warn_unused_result)) sysfs_move_dir(struct kobject *kobj,
6761 struct kobject *new_parent_kobj);
6762
6763int __attribute__((warn_unused_result)) sysfs_create_file(struct kobject *kobj,
6764 const struct attribute *attr);
6765int __attribute__((warn_unused_result)) sysfs_chmod_file(struct kobject *kobj, struct attribute *attr,
6766 mode_t mode);
6767void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr);
6768
6769int __attribute__((warn_unused_result)) sysfs_create_bin_file(struct kobject *kobj,
6770 struct bin_attribute *attr);
6771void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr);
6772
6773int __attribute__((warn_unused_result)) sysfs_create_link(struct kobject *kobj, struct kobject *target,
6774 const char *name);
6775int __attribute__((warn_unused_result)) sysfs_create_link_nowarn(struct kobject *kobj,
6776 struct kobject *target,
6777 const char *name);
6778void sysfs_remove_link(struct kobject *kobj, const char *name);
6779
6780int __attribute__((warn_unused_result)) sysfs_create_group(struct kobject *kobj,
6781 const struct attribute_group *grp);
6782int sysfs_update_group(struct kobject *kobj,
6783 const struct attribute_group *grp);
6784void sysfs_remove_group(struct kobject *kobj,
6785 const struct attribute_group *grp);
6786int sysfs_add_file_to_group(struct kobject *kobj,
6787 const struct attribute *attr, const char *group);
6788void sysfs_remove_file_from_group(struct kobject *kobj,
6789 const struct attribute *attr, const char *group);
6790
6791void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
6792void sysfs_notify_dirent(struct sysfs_dirent *sd);
6793struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
6794 const unsigned char *name);
6795struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd);
6796void sysfs_put(struct sysfs_dirent *sd);
6797void sysfs_printk_last_file(void);
6798int __attribute__((warn_unused_result)) sysfs_init(void);
6799# 22 "include/linux/kobject.h" 2
6800
6801
6802# 1 "include/linux/kref.h" 1
6803# 20 "include/linux/kref.h"
6804struct kref {
6805 atomic_t refcount;
6806};
6807
6808void kref_set(struct kref *kref, int num);
6809void kref_init(struct kref *kref);
6810void kref_get(struct kref *kref);
6811int kref_put(struct kref *kref, void (*release) (struct kref *kref));
6812# 25 "include/linux/kobject.h" 2
6813# 34 "include/linux/kobject.h"
6814extern char uevent_helper[];
6815
6816
6817extern u64 uevent_seqnum;
6818# 49 "include/linux/kobject.h"
6819enum kobject_action {
6820 KOBJ_ADD,
6821 KOBJ_REMOVE,
6822 KOBJ_CHANGE,
6823 KOBJ_MOVE,
6824 KOBJ_ONLINE,
6825 KOBJ_OFFLINE,
6826 KOBJ_MAX
6827};
6828
6829struct kobject {
6830 const char *name;
6831 struct list_head entry;
6832 struct kobject *parent;
6833 struct kset *kset;
6834 struct kobj_type *ktype;
6835 struct sysfs_dirent *sd;
6836 struct kref kref;
6837 unsigned int state_initialized:1;
6838 unsigned int state_in_sysfs:1;
6839 unsigned int state_add_uevent_sent:1;
6840 unsigned int state_remove_uevent_sent:1;
6841 unsigned int uevent_suppress:1;
6842};
6843
6844extern int kobject_set_name(struct kobject *kobj, const char *name, ...)
6845 __attribute__((format(printf, 2, 3)));
6846extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
6847 va_list vargs);
6848
6849static inline __attribute__((always_inline)) const char *kobject_name(const struct kobject *kobj)
6850{
6851 return kobj->name;
6852}
6853
6854extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
6855extern int __attribute__((warn_unused_result)) kobject_add(struct kobject *kobj,
6856 struct kobject *parent,
6857 const char *fmt, ...);
6858extern int __attribute__((warn_unused_result)) kobject_init_and_add(struct kobject *kobj,
6859 struct kobj_type *ktype,
6860 struct kobject *parent,
6861 const char *fmt, ...);
6862
6863extern void kobject_del(struct kobject *kobj);
6864
6865extern struct kobject * __attribute__((warn_unused_result)) kobject_create(void);
6866extern struct kobject * __attribute__((warn_unused_result)) kobject_create_and_add(const char *name,
6867 struct kobject *parent);
6868
6869extern int __attribute__((warn_unused_result)) kobject_rename(struct kobject *, const char *new_name);
6870extern int __attribute__((warn_unused_result)) kobject_move(struct kobject *, struct kobject *);
6871
6872extern struct kobject *kobject_get(struct kobject *kobj);
6873extern void kobject_put(struct kobject *kobj);
6874
6875extern char *kobject_get_path(struct kobject *kobj, gfp_t flag);
6876
6877struct kobj_type {
6878 void (*release)(struct kobject *kobj);
6879 struct sysfs_ops *sysfs_ops;
6880 struct attribute **default_attrs;
6881};
6882
6883struct kobj_uevent_env {
6884 char *envp[32];
6885 int envp_idx;
6886 char buf[2048];
6887 int buflen;
6888};
6889
6890struct kset_uevent_ops {
6891 int (*filter)(struct kset *kset, struct kobject *kobj);
6892 const char *(*name)(struct kset *kset, struct kobject *kobj);
6893 int (*uevent)(struct kset *kset, struct kobject *kobj,
6894 struct kobj_uevent_env *env);
6895};
6896
6897struct kobj_attribute {
6898 struct attribute attr;
6899 ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,
6900 char *buf);
6901 ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
6902 const char *buf, size_t count);
6903};
6904
6905extern struct sysfs_ops kobj_sysfs_ops;
6906# 154 "include/linux/kobject.h"
6907struct kset {
6908 struct list_head list;
6909 spinlock_t list_lock;
6910 struct kobject kobj;
6911 struct kset_uevent_ops *uevent_ops;
6912};
6913
6914extern void kset_init(struct kset *kset);
6915extern int __attribute__((warn_unused_result)) kset_register(struct kset *kset);
6916extern void kset_unregister(struct kset *kset);
6917extern struct kset * __attribute__((warn_unused_result)) kset_create_and_add(const char *name,
6918 struct kset_uevent_ops *u,
6919 struct kobject *parent_kobj);
6920
6921static inline __attribute__((always_inline)) struct kset *to_kset(struct kobject *kobj)
6922{
6923 return kobj ? ({ const typeof( ((struct kset *)0)->kobj ) *__mptr = (kobj); (struct kset *)( (char *)__mptr - __builtin_offsetof(struct kset,kobj) );}) : ((void *)0);
6924}
6925
6926static inline __attribute__((always_inline)) struct kset *kset_get(struct kset *k)
6927{
6928 return k ? to_kset(kobject_get(&k->kobj)) : ((void *)0);
6929}
6930
6931static inline __attribute__((always_inline)) void kset_put(struct kset *k)
6932{
6933 kobject_put(&k->kobj);
6934}
6935
6936static inline __attribute__((always_inline)) struct kobj_type *get_ktype(struct kobject *kobj)
6937{
6938 return kobj->ktype;
6939}
6940
6941extern struct kobject *kset_find_obj(struct kset *, const char *);
6942
6943
6944extern struct kobject *kernel_kobj;
6945
6946extern struct kobject *mm_kobj;
6947
6948extern struct kobject *hypervisor_kobj;
6949
6950extern struct kobject *power_kobj;
6951
6952extern struct kobject *firmware_kobj;
6953# 212 "include/linux/kobject.h"
6954static inline __attribute__((always_inline)) int kobject_uevent(struct kobject *kobj,
6955 enum kobject_action action)
6956{ return 0; }
6957static inline __attribute__((always_inline)) int kobject_uevent_env(struct kobject *kobj,
6958 enum kobject_action action,
6959 char *envp[])
6960{ return 0; }
6961
6962static inline __attribute__((always_inline)) int add_uevent_var(struct kobj_uevent_env *env,
6963 const char *format, ...)
6964{ return 0; }
6965
6966static inline __attribute__((always_inline)) int kobject_action_type(const char *buf, size_t count,
6967 enum kobject_action *type)
6968{ return -22; }
6969# 17 "include/linux/module.h" 2
6970# 1 "include/linux/moduleparam.h" 1
6971# 32 "include/linux/moduleparam.h"
6972struct kernel_param;
6973
6974
6975typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
6976
6977typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
6978
6979
6980
6981
6982struct kernel_param {
6983 const char *name;
6984 u16 perm;
6985 u16 flags;
6986 param_set_fn set;
6987 param_get_fn get;
6988 union {
6989 void *arg;
6990 const struct kparam_string *str;
6991 const struct kparam_array *arr;
6992 };
6993};
6994
6995
6996struct kparam_string {
6997 unsigned int maxlen;
6998 char *string;
6999};
7000
7001
7002struct kparam_array
7003{
7004 unsigned int max;
7005 unsigned int *num;
7006 param_set_fn set;
7007 param_get_fn get;
7008 unsigned int elemsize;
7009 void *elem;
7010};
7011# 143 "include/linux/moduleparam.h"
7012extern int parse_args(const char *name,
7013 char *args,
7014 struct kernel_param *params,
7015 unsigned num,
7016 int (*unknown)(char *param, char *val));
7017
7018
7019
7020extern void destroy_params(const struct kernel_param *params, unsigned num);
7021# 165 "include/linux/moduleparam.h"
7022extern int param_set_byte(const char *val, struct kernel_param *kp);
7023extern int param_get_byte(char *buffer, struct kernel_param *kp);
7024
7025
7026extern int param_set_short(const char *val, struct kernel_param *kp);
7027extern int param_get_short(char *buffer, struct kernel_param *kp);
7028
7029
7030extern int param_set_ushort(const char *val, struct kernel_param *kp);
7031extern int param_get_ushort(char *buffer, struct kernel_param *kp);
7032
7033
7034extern int param_set_int(const char *val, struct kernel_param *kp);
7035extern int param_get_int(char *buffer, struct kernel_param *kp);
7036
7037
7038extern int param_set_uint(const char *val, struct kernel_param *kp);
7039extern int param_get_uint(char *buffer, struct kernel_param *kp);
7040
7041
7042extern int param_set_long(const char *val, struct kernel_param *kp);
7043extern int param_get_long(char *buffer, struct kernel_param *kp);
7044
7045
7046extern int param_set_ulong(const char *val, struct kernel_param *kp);
7047extern int param_get_ulong(char *buffer, struct kernel_param *kp);
7048
7049
7050extern int param_set_charp(const char *val, struct kernel_param *kp);
7051extern int param_get_charp(char *buffer, struct kernel_param *kp);
7052
7053
7054
7055extern int param_set_bool(const char *val, struct kernel_param *kp);
7056extern int param_get_bool(char *buffer, struct kernel_param *kp);
7057# 208 "include/linux/moduleparam.h"
7058extern int param_set_invbool(const char *val, struct kernel_param *kp);
7059extern int param_get_invbool(char *buffer, struct kernel_param *kp);
7060# 226 "include/linux/moduleparam.h"
7061extern int param_array_set(const char *val, struct kernel_param *kp);
7062extern int param_array_get(char *buffer, struct kernel_param *kp);
7063
7064extern int param_set_copystring(const char *val, struct kernel_param *kp);
7065extern int param_get_string(char *buffer, struct kernel_param *kp);
7066
7067
7068
7069struct module;
7070
7071
7072extern int module_param_sysfs_setup(struct module *mod,
7073 struct kernel_param *kparam,
7074 unsigned int num_params);
7075
7076extern void module_param_sysfs_remove(struct module *mod);
7077# 18 "include/linux/module.h" 2
7078# 1 "include/linux/tracepoint.h" 1
7079# 18 "include/linux/tracepoint.h"
7080# 1 "include/linux/rcupdate.h" 1
7081# 42 "include/linux/rcupdate.h"
7082# 1 "include/linux/completion.h" 1
7083# 25 "include/linux/completion.h"
7084struct completion {
7085 unsigned int done;
7086 wait_queue_head_t wait;
7087};
7088# 73 "include/linux/completion.h"
7089static inline __attribute__((always_inline)) void init_completion(struct completion *x)
7090{
7091 x->done = 0;
7092 do { static struct lock_class_key __key; __init_waitqueue_head((&x->wait), &__key); } while (0);
7093}
7094
7095extern void wait_for_completion(struct completion *);
7096extern int wait_for_completion_interruptible(struct completion *x);
7097extern int wait_for_completion_killable(struct completion *x);
7098extern unsigned long wait_for_completion_timeout(struct completion *x,
7099 unsigned long timeout);
7100extern unsigned long wait_for_completion_interruptible_timeout(
7101 struct completion *x, unsigned long timeout);
7102extern bool try_wait_for_completion(struct completion *x);
7103extern bool completion_done(struct completion *x);
7104
7105extern void complete(struct completion *);
7106extern void complete_all(struct completion *);
7107# 43 "include/linux/rcupdate.h" 2
7108
7109
7110
7111
7112
7113
7114struct rcu_head {
7115 struct rcu_head *next;
7116 void (*func)(struct rcu_head *head);
7117};
7118
7119
7120
7121
7122
7123
7124
7125extern void synchronize_rcu_bh(void);
7126extern void synchronize_sched(void);
7127extern void rcu_barrier(void);
7128extern void rcu_barrier_bh(void);
7129extern void rcu_barrier_sched(void);
7130extern void synchronize_sched_expedited(void);
7131extern int sched_expedited_torture_stats(char *page);
7132
7133
7134extern void rcu_init(void);
7135extern void rcu_scheduler_starting(void);
7136extern int rcu_needs_cpu(int cpu);
7137extern int rcu_scheduler_active;
7138
7139
7140# 1 "include/linux/rcutree.h" 1
7141# 33 "include/linux/rcutree.h"
7142struct notifier_block;
7143
7144extern void rcu_sched_qs(int cpu);
7145extern void rcu_bh_qs(int cpu);
7146extern int rcu_cpu_notify(struct notifier_block *self,
7147 unsigned long action, void *hcpu);
7148extern int rcu_needs_cpu(int cpu);
7149extern int rcu_expedited_torture_stats(char *page);
7150# 50 "include/linux/rcutree.h"
7151static inline __attribute__((always_inline)) void __rcu_read_lock(void)
7152{
7153 do { } while (0);
7154}
7155
7156static inline __attribute__((always_inline)) void __rcu_read_unlock(void)
7157{
7158 do { } while (0);
7159}
7160
7161
7162
7163static inline __attribute__((always_inline)) void exit_rcu(void)
7164{
7165}
7166
7167
7168
7169static inline __attribute__((always_inline)) void __rcu_read_lock_bh(void)
7170{
7171 local_bh_disable();
7172}
7173static inline __attribute__((always_inline)) void __rcu_read_unlock_bh(void)
7174{
7175 local_bh_enable();
7176}
7177
7178extern void call_rcu_sched(struct rcu_head *head,
7179 void (*func)(struct rcu_head *rcu));
7180extern void synchronize_rcu_expedited(void);
7181
7182static inline __attribute__((always_inline)) void synchronize_rcu_bh_expedited(void)
7183{
7184 synchronize_sched_expedited();
7185}
7186
7187extern void __rcu_init(void);
7188extern void rcu_check_callbacks(int cpu, int user);
7189
7190extern long rcu_batches_completed(void);
7191extern long rcu_batches_completed_bh(void);
7192extern long rcu_batches_completed_sched(void);
7193
7194
7195void rcu_enter_nohz(void);
7196void rcu_exit_nohz(void);
7197# 106 "include/linux/rcutree.h"
7198static inline __attribute__((always_inline)) int rcu_blocking_is_gp(void)
7199{
7200 return 1 == 1;
7201}
7202# 76 "include/linux/rcupdate.h" 2
7203# 87 "include/linux/rcupdate.h"
7204extern struct lockdep_map rcu_lock_map;
7205# 125 "include/linux/rcupdate.h"
7206static inline __attribute__((always_inline)) void rcu_read_lock(void)
7207{
7208 __rcu_read_lock();
7209 (void)0;
7210 lock_acquire(&rcu_lock_map, 0, 0, 2, 1, ((void *)0), ({ __label__ __here; __here: (unsigned long)&&__here; }));
7211}
7212# 147 "include/linux/rcupdate.h"
7213static inline __attribute__((always_inline)) void rcu_read_unlock(void)
7214{
7215 lock_release(&rcu_lock_map, 1, ({ __label__ __here; __here: (unsigned long)&&__here; }));
7216 (void)0;
7217 __rcu_read_unlock();
7218}
7219# 165 "include/linux/rcupdate.h"
7220static inline __attribute__((always_inline)) void rcu_read_lock_bh(void)
7221{
7222 __rcu_read_lock_bh();
7223 (void)0;
7224 lock_acquire(&rcu_lock_map, 0, 0, 2, 1, ((void *)0), ({ __label__ __here; __here: (unsigned long)&&__here; }));
7225}
7226
7227
7228
7229
7230
7231
7232static inline __attribute__((always_inline)) void rcu_read_unlock_bh(void)
7233{
7234 lock_release(&rcu_lock_map, 1, ({ __label__ __here; __here: (unsigned long)&&__here; }));
7235 (void)0;
7236 __rcu_read_unlock_bh();
7237}
7238# 193 "include/linux/rcupdate.h"
7239static inline __attribute__((always_inline)) void rcu_read_lock_sched(void)
7240{
7241 do { } while (0);
7242 (void)0;
7243 lock_acquire(&rcu_lock_map, 0, 0, 2, 1, ((void *)0), ({ __label__ __here; __here: (unsigned long)&&__here; }));
7244}
7245
7246
7247static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void rcu_read_lock_sched_notrace(void)
7248{
7249 do { } while (0);
7250 (void)0;
7251}
7252
7253
7254
7255
7256
7257
7258static inline __attribute__((always_inline)) void rcu_read_unlock_sched(void)
7259{
7260 lock_release(&rcu_lock_map, 1, ({ __label__ __here; __here: (unsigned long)&&__here; }));
7261 (void)0;
7262 do { } while (0);
7263}
7264
7265
7266static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void rcu_read_unlock_sched_notrace(void)
7267{
7268 (void)0;
7269 do { } while (0);
7270}
7271# 266 "include/linux/rcupdate.h"
7272struct rcu_synchronize {
7273 struct rcu_head head;
7274 struct completion completion;
7275};
7276
7277extern void wakeme_after_rcu(struct rcu_head *head);
7278# 284 "include/linux/rcupdate.h"
7279extern void call_rcu(struct rcu_head *head,
7280 void (*func)(struct rcu_head *head));
7281# 305 "include/linux/rcupdate.h"
7282extern void call_rcu_bh(struct rcu_head *head,
7283 void (*func)(struct rcu_head *head));
7284# 19 "include/linux/tracepoint.h" 2
7285
7286struct module;
7287struct tracepoint;
7288
7289struct tracepoint {
7290 const char *name;
7291 int state;
7292 void (*regfunc)(void);
7293 void (*unregfunc)(void);
7294 void **funcs;
7295} __attribute__((aligned(32)));
7296# 99 "include/linux/tracepoint.h"
7297extern void tracepoint_update_probe_range(struct tracepoint *begin,
7298 struct tracepoint *end);
7299# 132 "include/linux/tracepoint.h"
7300extern int tracepoint_probe_register(const char *name, void *probe);
7301
7302
7303
7304
7305
7306extern int tracepoint_probe_unregister(const char *name, void *probe);
7307
7308extern int tracepoint_probe_register_noupdate(const char *name, void *probe);
7309extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe);
7310extern void tracepoint_probe_update_all(void);
7311
7312struct tracepoint_iter {
7313 struct module *module;
7314 struct tracepoint *tracepoint;
7315};
7316
7317extern void tracepoint_iter_start(struct tracepoint_iter *iter);
7318extern void tracepoint_iter_next(struct tracepoint_iter *iter);
7319extern void tracepoint_iter_stop(struct tracepoint_iter *iter);
7320extern void tracepoint_iter_reset(struct tracepoint_iter *iter);
7321extern int tracepoint_get_iter_range(struct tracepoint **tracepoint,
7322 struct tracepoint *begin, struct tracepoint *end);
7323
7324
7325
7326
7327
7328
7329static inline __attribute__((always_inline)) void tracepoint_synchronize_unregister(void)
7330{
7331 synchronize_sched();
7332}
7333# 19 "include/linux/module.h" 2
7334
7335# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/local.h" 1
7336# 1 "include/asm-generic/local.h" 1
7337
7338
7339
7340# 1 "include/linux/percpu.h" 1
7341
7342
7343
7344
7345# 1 "include/linux/slab.h" 1
7346# 93 "include/linux/slab.h"
7347void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) kmem_cache_init(void);
7348int slab_is_available(void);
7349
7350struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
7351 unsigned long,
7352 void (*)(void *));
7353void kmem_cache_destroy(struct kmem_cache *);
7354int kmem_cache_shrink(struct kmem_cache *);
7355void kmem_cache_free(struct kmem_cache *, void *);
7356unsigned int kmem_cache_size(struct kmem_cache *);
7357const char *kmem_cache_name(struct kmem_cache *);
7358int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
7359# 136 "include/linux/slab.h"
7360void * __attribute__((warn_unused_result)) __krealloc(const void *, size_t, gfp_t);
7361void * __attribute__((warn_unused_result)) krealloc(const void *, size_t, gfp_t);
7362void kfree(const void *);
7363void kzfree(const void *);
7364size_t ksize(const void *);
7365# 162 "include/linux/slab.h"
7366# 1 "include/linux/slub_def.h" 1
7367# 11 "include/linux/slub_def.h"
7368# 1 "include/linux/workqueue.h" 1
7369
7370
7371
7372
7373
7374
7375
7376# 1 "include/linux/timer.h" 1
7377
7378
7379
7380
7381# 1 "include/linux/ktime.h" 1
7382# 25 "include/linux/ktime.h"
7383# 1 "include/linux/jiffies.h" 1
7384
7385
7386
7387
7388
7389
7390
7391# 1 "include/linux/timex.h" 1
7392# 64 "include/linux/timex.h"
7393struct timex {
7394 unsigned int modes;
7395 long offset;
7396 long freq;
7397 long maxerror;
7398 long esterror;
7399 int status;
7400 long constant;
7401 long precision;
7402 long tolerance;
7403
7404
7405 struct timeval time;
7406 long tick;
7407
7408 long ppsfreq;
7409 long jitter;
7410 int shift;
7411 long stabil;
7412 long jitcnt;
7413 long calcnt;
7414 long errcnt;
7415 long stbcnt;
7416
7417 int tai;
7418
7419 int :32; int :32; int :32; int :32;
7420 int :32; int :32; int :32; int :32;
7421 int :32; int :32; int :32;
7422};
7423# 170 "include/linux/timex.h"
7424# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/timex.h" 1
7425# 14 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/timex.h"
7426typedef unsigned long long cycles_t;
7427
7428static inline __attribute__((always_inline)) cycles_t get_cycles(void)
7429{
7430 unsigned long tmp, tmp2;
7431 __asm__ __volatile__("%0 = cycles; %1 = cycles2;" : "=d"(tmp), "=d"(tmp2));
7432 return tmp | ((cycles_t)tmp2 << 32);
7433}
7434# 171 "include/linux/timex.h" 2
7435# 230 "include/linux/timex.h"
7436extern unsigned long tick_usec;
7437extern unsigned long tick_nsec;
7438extern int tickadj;
7439
7440
7441
7442
7443extern int time_status;
7444extern long time_maxerror;
7445extern long time_esterror;
7446
7447extern long time_adjust;
7448
7449extern void ntp_init(void);
7450extern void ntp_clear(void);
7451
7452
7453
7454
7455
7456static inline __attribute__((always_inline)) int ntp_synced(void)
7457{
7458 return !(time_status & 0x0040);
7459}
7460# 272 "include/linux/timex.h"
7461extern u64 tick_length;
7462
7463extern void second_overflow(void);
7464extern void update_ntp_one_tick(void);
7465extern int do_adjtimex(struct timex *);
7466
7467
7468
7469
7470int read_current_timer(unsigned long *timer_val);
7471# 9 "include/linux/jiffies.h" 2
7472# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/param.h" 1
7473# 10 "include/linux/jiffies.h" 2
7474# 81 "include/linux/jiffies.h"
7475extern u64 __attribute__((section(".data"))) jiffies_64;
7476extern unsigned long volatile __attribute__((section(".data"))) jiffies;
7477
7478
7479u64 get_jiffies_64(void);
7480# 183 "include/linux/jiffies.h"
7481extern unsigned long preset_lpj;
7482# 296 "include/linux/jiffies.h"
7483extern unsigned int jiffies_to_msecs(const unsigned long j);
7484extern unsigned int jiffies_to_usecs(const unsigned long j);
7485extern unsigned long msecs_to_jiffies(const unsigned int m);
7486extern unsigned long usecs_to_jiffies(const unsigned int u);
7487extern unsigned long timespec_to_jiffies(const struct timespec *value);
7488extern void jiffies_to_timespec(const unsigned long jiffies,
7489 struct timespec *value);
7490extern unsigned long timeval_to_jiffies(const struct timeval *value);
7491extern void jiffies_to_timeval(const unsigned long jiffies,
7492 struct timeval *value);
7493extern clock_t jiffies_to_clock_t(long x);
7494extern unsigned long clock_t_to_jiffies(unsigned long x);
7495extern u64 jiffies_64_to_clock_t(u64 x);
7496extern u64 nsec_to_clock_t(u64 x);
7497# 26 "include/linux/ktime.h" 2
7498# 46 "include/linux/ktime.h"
7499union ktime {
7500 s64 tv64;
7501
7502 struct {
7503
7504
7505
7506 s32 nsec, sec;
7507
7508 } tv;
7509
7510};
7511
7512typedef union ktime ktime_t;
7513# 151 "include/linux/ktime.h"
7514static inline __attribute__((always_inline)) ktime_t ktime_set(const long secs, const unsigned long nsecs)
7515{
7516 return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } };
7517}
7518# 163 "include/linux/ktime.h"
7519static inline __attribute__((always_inline)) ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
7520{
7521 ktime_t res;
7522
7523 res.tv64 = lhs.tv64 - rhs.tv64;
7524 if (res.tv.nsec < 0)
7525 res.tv.nsec += 1000000000L;
7526
7527 return res;
7528}
7529# 181 "include/linux/ktime.h"
7530static inline __attribute__((always_inline)) ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
7531{
7532 ktime_t res;
7533
7534 res.tv64 = add1.tv64 + add2.tv64;
7535# 194 "include/linux/ktime.h"
7536 if (res.tv.nsec >= 1000000000L)
7537 res.tv64 += (u32)-1000000000L;
7538
7539 return res;
7540}
7541# 207 "include/linux/ktime.h"
7542extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
7543# 216 "include/linux/ktime.h"
7544extern ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec);
7545
7546
7547
7548
7549
7550
7551
7552static inline __attribute__((always_inline)) ktime_t timespec_to_ktime(const struct timespec ts)
7553{
7554 return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec,
7555 .nsec = (s32)ts.tv_nsec } };
7556}
7557
7558
7559
7560
7561
7562
7563
7564static inline __attribute__((always_inline)) ktime_t timeval_to_ktime(const struct timeval tv)
7565{
7566 return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec,
7567 .nsec = (s32)tv.tv_usec * 1000 } };
7568}
7569
7570
7571
7572
7573
7574
7575
7576static inline __attribute__((always_inline)) struct timespec ktime_to_timespec(const ktime_t kt)
7577{
7578 return (struct timespec) { .tv_sec = (time_t) kt.tv.sec,
7579 .tv_nsec = (long) kt.tv.nsec };
7580}
7581
7582
7583
7584
7585
7586
7587
7588static inline __attribute__((always_inline)) struct timeval ktime_to_timeval(const ktime_t kt)
7589{
7590 return (struct timeval) {
7591 .tv_sec = (time_t) kt.tv.sec,
7592 .tv_usec = (suseconds_t) (kt.tv.nsec / 1000L) };
7593}
7594
7595
7596
7597
7598
7599
7600
7601static inline __attribute__((always_inline)) s64 ktime_to_ns(const ktime_t kt)
7602{
7603 return (s64) kt.tv.sec * 1000000000L + kt.tv.nsec;
7604}
7605# 287 "include/linux/ktime.h"
7606static inline __attribute__((always_inline)) int ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
7607{
7608 return cmp1.tv64 == cmp2.tv64;
7609}
7610
7611static inline __attribute__((always_inline)) s64 ktime_to_us(const ktime_t kt)
7612{
7613 struct timeval tv = ktime_to_timeval(kt);
7614 return (s64) tv.tv_sec * 1000000L + tv.tv_usec;
7615}
7616
7617static inline __attribute__((always_inline)) s64 ktime_us_delta(const ktime_t later, const ktime_t earlier)
7618{
7619 return ktime_to_us(ktime_sub(later, earlier));
7620}
7621
7622static inline __attribute__((always_inline)) ktime_t ktime_add_us(const ktime_t kt, const u64 usec)
7623{
7624 return ktime_add_ns(kt, usec * 1000);
7625}
7626
7627static inline __attribute__((always_inline)) ktime_t ktime_sub_us(const ktime_t kt, const u64 usec)
7628{
7629 return ktime_sub_ns(kt, usec * 1000);
7630}
7631
7632extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs);
7633# 325 "include/linux/ktime.h"
7634extern void ktime_get_ts(struct timespec *ts);
7635
7636
7637
7638
7639static inline __attribute__((always_inline)) ktime_t ns_to_ktime(u64 ns)
7640{
7641 static const ktime_t ktime_zero = { .tv64 = 0 };
7642 return ktime_add_ns(ktime_zero, ns);
7643}
7644# 6 "include/linux/timer.h" 2
7645
7646# 1 "include/linux/debugobjects.h" 1
7647
7648
7649
7650
7651
7652
7653enum debug_obj_state {
7654 ODEBUG_STATE_NONE,
7655 ODEBUG_STATE_INIT,
7656 ODEBUG_STATE_INACTIVE,
7657 ODEBUG_STATE_ACTIVE,
7658 ODEBUG_STATE_DESTROYED,
7659 ODEBUG_STATE_NOTAVAILABLE,
7660 ODEBUG_STATE_MAX,
7661};
7662
7663struct debug_obj_descr;
7664# 26 "include/linux/debugobjects.h"
7665struct debug_obj {
7666 struct hlist_node node;
7667 enum debug_obj_state state;
7668 void *object;
7669 struct debug_obj_descr *descr;
7670};
7671# 45 "include/linux/debugobjects.h"
7672struct debug_obj_descr {
7673 const char *name;
7674
7675 int (*fixup_init) (void *addr, enum debug_obj_state state);
7676 int (*fixup_activate) (void *addr, enum debug_obj_state state);
7677 int (*fixup_destroy) (void *addr, enum debug_obj_state state);
7678 int (*fixup_free) (void *addr, enum debug_obj_state state);
7679};
7680
7681
7682extern void debug_object_init (void *addr, struct debug_obj_descr *descr);
7683extern void
7684debug_object_init_on_stack(void *addr, struct debug_obj_descr *descr);
7685extern void debug_object_activate (void *addr, struct debug_obj_descr *descr);
7686extern void debug_object_deactivate(void *addr, struct debug_obj_descr *descr);
7687extern void debug_object_destroy (void *addr, struct debug_obj_descr *descr);
7688extern void debug_object_free (void *addr, struct debug_obj_descr *descr);
7689
7690extern void debug_objects_early_init(void);
7691extern void debug_objects_mem_init(void);
7692# 86 "include/linux/debugobjects.h"
7693static inline __attribute__((always_inline)) void
7694debug_check_no_obj_freed(const void *address, unsigned long size) { }
7695# 8 "include/linux/timer.h" 2
7696
7697
7698struct tvec_base;
7699
7700struct timer_list {
7701 struct list_head entry;
7702 unsigned long expires;
7703
7704 void (*function)(unsigned long);
7705 unsigned long data;
7706
7707 struct tvec_base *base;
7708
7709 void *start_site;
7710 char start_comm[16];
7711 int start_pid;
7712
7713
7714 struct lockdep_map lockdep_map;
7715
7716};
7717
7718extern struct tvec_base boot_tvec_bases;
7719# 59 "include/linux/timer.h"
7720void init_timer_key(struct timer_list *timer,
7721 const char *name,
7722 struct lock_class_key *key);
7723void init_timer_deferrable_key(struct timer_list *timer,
7724 const char *name,
7725 struct lock_class_key *key);
7726# 111 "include/linux/timer.h"
7727extern void init_timer_on_stack_key(struct timer_list *timer,
7728 const char *name,
7729 struct lock_class_key *key);
7730extern void destroy_timer_on_stack(struct timer_list *timer);
7731# 125 "include/linux/timer.h"
7732static inline __attribute__((always_inline)) void setup_timer_key(struct timer_list * timer,
7733 const char *name,
7734 struct lock_class_key *key,
7735 void (*function)(unsigned long),
7736 unsigned long data)
7737{
7738 timer->function = function;
7739 timer->data = data;
7740 init_timer_key(timer, name, key);
7741}
7742
7743static inline __attribute__((always_inline)) void setup_timer_on_stack_key(struct timer_list *timer,
7744 const char *name,
7745 struct lock_class_key *key,
7746 void (*function)(unsigned long),
7747 unsigned long data)
7748{
7749 timer->function = function;
7750 timer->data = data;
7751 init_timer_on_stack_key(timer, name, key);
7752}
7753# 157 "include/linux/timer.h"
7754static inline __attribute__((always_inline)) int timer_pending(const struct timer_list * timer)
7755{
7756 return timer->entry.next != ((void *)0);
7757}
7758
7759extern void add_timer_on(struct timer_list *timer, int cpu);
7760extern int del_timer(struct timer_list * timer);
7761extern int mod_timer(struct timer_list *timer, unsigned long expires);
7762extern int mod_timer_pending(struct timer_list *timer, unsigned long expires);
7763extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires);
7764# 181 "include/linux/timer.h"
7765extern unsigned long get_next_timer_interrupt(unsigned long now);
7766
7767
7768
7769
7770
7771
7772extern int timer_stats_active;
7773
7774
7775
7776extern void init_timer_stats(void);
7777
7778extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
7779 void *timerf, char *comm,
7780 unsigned int timer_flag);
7781
7782extern void __timer_stats_timer_set_start_info(struct timer_list *timer,
7783 void *addr);
7784
7785static inline __attribute__((always_inline)) void timer_stats_timer_set_start_info(struct timer_list *timer)
7786{
7787 if (__builtin_expect(!!(!timer_stats_active), 1))
7788 return;
7789 __timer_stats_timer_set_start_info(timer, __builtin_return_address(0));
7790}
7791
7792static inline __attribute__((always_inline)) void timer_stats_timer_clear_start_info(struct timer_list *timer)
7793{
7794 timer->start_site = ((void *)0);
7795}
7796# 226 "include/linux/timer.h"
7797extern void add_timer(struct timer_list *timer);
7798# 238 "include/linux/timer.h"
7799extern void init_timers(void);
7800extern void run_local_timers(void);
7801struct hrtimer;
7802extern enum hrtimer_restart it_real_fn(struct hrtimer *);
7803
7804unsigned long __round_jiffies(unsigned long j, int cpu);
7805unsigned long __round_jiffies_relative(unsigned long j, int cpu);
7806unsigned long round_jiffies(unsigned long j);
7807unsigned long round_jiffies_relative(unsigned long j);
7808
7809unsigned long __round_jiffies_up(unsigned long j, int cpu);
7810unsigned long __round_jiffies_up_relative(unsigned long j, int cpu);
7811unsigned long round_jiffies_up(unsigned long j);
7812unsigned long round_jiffies_up_relative(unsigned long j);
7813# 9 "include/linux/workqueue.h" 2
7814
7815
7816
7817
7818
7819struct workqueue_struct;
7820
7821struct work_struct;
7822typedef void (*work_func_t)(struct work_struct *work);
7823
7824
7825
7826
7827
7828
7829
7830struct work_struct {
7831 atomic_long_t data;
7832
7833
7834
7835 struct list_head entry;
7836 work_func_t func;
7837
7838 struct lockdep_map lockdep_map;
7839
7840};
7841
7842
7843
7844struct delayed_work {
7845 struct work_struct work;
7846 struct timer_list timer;
7847};
7848
7849static inline __attribute__((always_inline)) struct delayed_work *to_delayed_work(struct work_struct *work)
7850{
7851 return ({ const typeof( ((struct delayed_work *)0)->work ) *__mptr = (work); (struct delayed_work *)( (char *)__mptr - __builtin_offsetof(struct delayed_work,work) );});
7852}
7853
7854struct execute_work {
7855 struct work_struct work;
7856};
7857# 167 "include/linux/workqueue.h"
7858extern struct workqueue_struct *
7859__create_workqueue_key(const char *name, int singlethread,
7860 int freezeable, int rt, struct lock_class_key *key,
7861 const char *lock_name);
7862# 198 "include/linux/workqueue.h"
7863extern void destroy_workqueue(struct workqueue_struct *wq);
7864
7865extern int queue_work(struct workqueue_struct *wq, struct work_struct *work);
7866extern int queue_work_on(int cpu, struct workqueue_struct *wq,
7867 struct work_struct *work);
7868extern int queue_delayed_work(struct workqueue_struct *wq,
7869 struct delayed_work *work, unsigned long delay);
7870extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
7871 struct delayed_work *work, unsigned long delay);
7872
7873extern void flush_workqueue(struct workqueue_struct *wq);
7874extern void flush_scheduled_work(void);
7875extern void flush_delayed_work(struct delayed_work *work);
7876
7877extern int schedule_work(struct work_struct *work);
7878extern int schedule_work_on(int cpu, struct work_struct *work);
7879extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay);
7880extern int schedule_delayed_work_on(int cpu, struct delayed_work *work,
7881 unsigned long delay);
7882extern int schedule_on_each_cpu(work_func_t func);
7883extern int current_is_keventd(void);
7884extern int keventd_up(void);
7885
7886extern void init_workqueues(void);
7887int execute_in_process_context(work_func_t fn, struct execute_work *);
7888
7889extern int flush_work(struct work_struct *work);
7890
7891extern int cancel_work_sync(struct work_struct *work);
7892
7893
7894
7895
7896
7897
7898
7899static inline __attribute__((always_inline)) int cancel_delayed_work(struct delayed_work *work)
7900{
7901 int ret;
7902
7903 ret = del_timer(&work->timer);
7904 if (ret)
7905 clear_bit(0, ((unsigned long *)(&(&work->work)->data)));
7906 return ret;
7907}
7908
7909
7910
7911
7912
7913
7914static inline __attribute__((always_inline)) int __cancel_delayed_work(struct delayed_work *work)
7915{
7916 int ret;
7917
7918 ret = del_timer(&work->timer);
7919 if (ret)
7920 clear_bit(0, ((unsigned long *)(&(&work->work)->data)));
7921 return ret;
7922}
7923
7924extern int cancel_delayed_work_sync(struct delayed_work *work);
7925
7926
7927static inline __attribute__((always_inline))
7928void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
7929 struct delayed_work *work)
7930{
7931 cancel_delayed_work_sync(work);
7932}
7933
7934
7935static inline __attribute__((always_inline))
7936void cancel_rearming_delayed_work(struct delayed_work *work)
7937{
7938 cancel_delayed_work_sync(work);
7939}
7940
7941
7942static inline __attribute__((always_inline)) long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg)
7943{
7944 return fn(arg);
7945}
7946# 12 "include/linux/slub_def.h" 2
7947
7948# 1 "include/linux/kmemtrace.h" 1
7949# 12 "include/linux/kmemtrace.h"
7950# 1 "include/trace/events/kmem.h" 1
7951
7952
7953
7954
7955
7956
7957
7958# 1 "include/linux/tracepoint.h" 1
7959# 9 "include/trace/events/kmem.h" 2
7960# 47 "include/trace/events/kmem.h"
7961extern struct tracepoint __tracepoint_kmalloc; static inline __attribute__((always_inline)) void trace_kmalloc(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags) { if (__builtin_expect(!!(__tracepoint_kmalloc.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_kmalloc)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_kmalloc)->funcs) *)&((&__tracepoint_kmalloc)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags))(*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_kmalloc(void (*probe)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags)) { return tracepoint_probe_register("kmalloc", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_kmalloc(void (*probe)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags)) { return tracepoint_probe_unregister("kmalloc", (void *)probe); };
7962# 81 "include/trace/events/kmem.h"
7963extern struct tracepoint __tracepoint_kmem_cache_alloc; static inline __attribute__((always_inline)) void trace_kmem_cache_alloc(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags) { if (__builtin_expect(!!(__tracepoint_kmem_cache_alloc.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_kmem_cache_alloc)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_kmem_cache_alloc)->funcs) *)&((&__tracepoint_kmem_cache_alloc)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags))(*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_kmem_cache_alloc(void (*probe)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags)) { return tracepoint_probe_register("kmem_cache_alloc", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_kmem_cache_alloc(void (*probe)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags)) { return tracepoint_probe_unregister("kmem_cache_alloc", (void *)probe); };
7964# 115 "include/trace/events/kmem.h"
7965extern struct tracepoint __tracepoint_kmalloc_node; static inline __attribute__((always_inline)) void trace_kmalloc_node(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags, int node) { if (__builtin_expect(!!(__tracepoint_kmalloc_node.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_kmalloc_node)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_kmalloc_node)->funcs) *)&((&__tracepoint_kmalloc_node)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags, int node))(*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_kmalloc_node(void (*probe)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags, int node)) { return tracepoint_probe_register("kmalloc_node", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_kmalloc_node(void (*probe)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags, int node)) { return tracepoint_probe_unregister("kmalloc_node", (void *)probe); };
7966# 153 "include/trace/events/kmem.h"
7967extern struct tracepoint __tracepoint_kmem_cache_alloc_node; static inline __attribute__((always_inline)) void trace_kmem_cache_alloc_node(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags, int node) { if (__builtin_expect(!!(__tracepoint_kmem_cache_alloc_node.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_kmem_cache_alloc_node)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_kmem_cache_alloc_node)->funcs) *)&((&__tracepoint_kmem_cache_alloc_node)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags, int node))(*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_kmem_cache_alloc_node(void (*probe)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags, int node)) { return tracepoint_probe_register("kmem_cache_alloc_node", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_kmem_cache_alloc_node(void (*probe)(unsigned long call_site, const void *ptr, size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags, int node)) { return tracepoint_probe_unregister("kmem_cache_alloc_node", (void *)probe); };
7968# 191 "include/trace/events/kmem.h"
7969extern struct tracepoint __tracepoint_kfree; static inline __attribute__((always_inline)) void trace_kfree(unsigned long call_site, const void *ptr) { if (__builtin_expect(!!(__tracepoint_kfree.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_kfree)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_kfree)->funcs) *)&((&__tracepoint_kfree)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(unsigned long call_site, const void *ptr))(*it_func))(call_site, ptr); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_kfree(void (*probe)(unsigned long call_site, const void *ptr)) { return tracepoint_probe_register("kfree", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_kfree(void (*probe)(unsigned long call_site, const void *ptr)) { return tracepoint_probe_unregister("kfree", (void *)probe); };
7970# 210 "include/trace/events/kmem.h"
7971extern struct tracepoint __tracepoint_kmem_cache_free; static inline __attribute__((always_inline)) void trace_kmem_cache_free(unsigned long call_site, const void *ptr) { if (__builtin_expect(!!(__tracepoint_kmem_cache_free.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_kmem_cache_free)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_kmem_cache_free)->funcs) *)&((&__tracepoint_kmem_cache_free)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(unsigned long call_site, const void *ptr))(*it_func))(call_site, ptr); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_kmem_cache_free(void (*probe)(unsigned long call_site, const void *ptr)) { return tracepoint_probe_register("kmem_cache_free", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_kmem_cache_free(void (*probe)(unsigned long call_site, const void *ptr)) { return tracepoint_probe_unregister("kmem_cache_free", (void *)probe); };
7972# 229 "include/trace/events/kmem.h"
7973extern struct tracepoint __tracepoint_mm_page_free_direct; static inline __attribute__((always_inline)) void trace_mm_page_free_direct(struct page *page, unsigned int order) { if (__builtin_expect(!!(__tracepoint_mm_page_free_direct.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_mm_page_free_direct)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_mm_page_free_direct)->funcs) *)&((&__tracepoint_mm_page_free_direct)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct page *page, unsigned int order))(*it_func))(page, order); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_mm_page_free_direct(void (*probe)(struct page *page, unsigned int order)) { return tracepoint_probe_register("mm_page_free_direct", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_mm_page_free_direct(void (*probe)(struct page *page, unsigned int order)) { return tracepoint_probe_unregister("mm_page_free_direct", (void *)probe); };
7974# 251 "include/trace/events/kmem.h"
7975extern struct tracepoint __tracepoint_mm_pagevec_free; static inline __attribute__((always_inline)) void trace_mm_pagevec_free(struct page *page, int cold) { if (__builtin_expect(!!(__tracepoint_mm_pagevec_free.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_mm_pagevec_free)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_mm_pagevec_free)->funcs) *)&((&__tracepoint_mm_pagevec_free)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct page *page, int cold))(*it_func))(page, cold); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_mm_pagevec_free(void (*probe)(struct page *page, int cold)) { return tracepoint_probe_register("mm_pagevec_free", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_mm_pagevec_free(void (*probe)(struct page *page, int cold)) { return tracepoint_probe_unregister("mm_pagevec_free", (void *)probe); };
7976# 273 "include/trace/events/kmem.h"
7977extern struct tracepoint __tracepoint_mm_page_alloc; static inline __attribute__((always_inline)) void trace_mm_page_alloc(struct page *page, unsigned int order, gfp_t gfp_flags, int migratetype) { if (__builtin_expect(!!(__tracepoint_mm_page_alloc.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_mm_page_alloc)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_mm_page_alloc)->funcs) *)&((&__tracepoint_mm_page_alloc)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct page *page, unsigned int order, gfp_t gfp_flags, int migratetype))(*it_func))(page, order, gfp_flags, migratetype); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_mm_page_alloc(void (*probe)(struct page *page, unsigned int order, gfp_t gfp_flags, int migratetype)) { return tracepoint_probe_register("mm_page_alloc", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_mm_page_alloc(void (*probe)(struct page *page, unsigned int order, gfp_t gfp_flags, int migratetype)) { return tracepoint_probe_unregister("mm_page_alloc", (void *)probe); };
7978# 302 "include/trace/events/kmem.h"
7979extern struct tracepoint __tracepoint_mm_page_alloc_zone_locked; static inline __attribute__((always_inline)) void trace_mm_page_alloc_zone_locked(struct page *page, unsigned int order, int migratetype) { if (__builtin_expect(!!(__tracepoint_mm_page_alloc_zone_locked.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_mm_page_alloc_zone_locked)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_mm_page_alloc_zone_locked)->funcs) *)&((&__tracepoint_mm_page_alloc_zone_locked)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct page *page, unsigned int order, int migratetype))(*it_func))(page, order, migratetype); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_mm_page_alloc_zone_locked(void (*probe)(struct page *page, unsigned int order, int migratetype)) { return tracepoint_probe_register("mm_page_alloc_zone_locked", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_mm_page_alloc_zone_locked(void (*probe)(struct page *page, unsigned int order, int migratetype)) { return tracepoint_probe_unregister("mm_page_alloc_zone_locked", (void *)probe); };
7980# 328 "include/trace/events/kmem.h"
7981extern struct tracepoint __tracepoint_mm_page_pcpu_drain; static inline __attribute__((always_inline)) void trace_mm_page_pcpu_drain(struct page *page, int order, int migratetype) { if (__builtin_expect(!!(__tracepoint_mm_page_pcpu_drain.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_mm_page_pcpu_drain)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_mm_page_pcpu_drain)->funcs) *)&((&__tracepoint_mm_page_pcpu_drain)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct page *page, int order, int migratetype))(*it_func))(page, order, migratetype); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_mm_page_pcpu_drain(void (*probe)(struct page *page, int order, int migratetype)) { return tracepoint_probe_register("mm_page_pcpu_drain", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_mm_page_pcpu_drain(void (*probe)(struct page *page, int order, int migratetype)) { return tracepoint_probe_unregister("mm_page_pcpu_drain", (void *)probe); };
7982# 353 "include/trace/events/kmem.h"
7983extern struct tracepoint __tracepoint_mm_page_alloc_extfrag; static inline __attribute__((always_inline)) void trace_mm_page_alloc_extfrag(struct page *page, int alloc_order, int fallback_order, int alloc_migratetype, int fallback_migratetype) { if (__builtin_expect(!!(__tracepoint_mm_page_alloc_extfrag.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_mm_page_alloc_extfrag)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_mm_page_alloc_extfrag)->funcs) *)&((&__tracepoint_mm_page_alloc_extfrag)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct page *page, int alloc_order, int fallback_order, int alloc_migratetype, int fallback_migratetype))(*it_func))(page, alloc_order, fallback_order, alloc_migratetype, fallback_migratetype); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_mm_page_alloc_extfrag(void (*probe)(struct page *page, int alloc_order, int fallback_order, int alloc_migratetype, int fallback_migratetype)) { return tracepoint_probe_register("mm_page_alloc_extfrag", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_mm_page_alloc_extfrag(void (*probe)(struct page *page, int alloc_order, int fallback_order, int alloc_migratetype, int fallback_migratetype)) { return tracepoint_probe_unregister("mm_page_alloc_extfrag", (void *)probe); };
7984# 394 "include/trace/events/kmem.h"
7985# 1 "include/trace/define_trace.h" 1
7986# 394 "include/trace/events/kmem.h" 2
7987# 13 "include/linux/kmemtrace.h" 2
7988
7989
7990
7991
7992static inline __attribute__((always_inline)) void kmemtrace_init(void)
7993{
7994}
7995# 14 "include/linux/slub_def.h" 2
7996# 1 "include/linux/kmemleak.h" 1
7997# 60 "include/linux/kmemleak.h"
7998static inline __attribute__((always_inline)) void kmemleak_init(void)
7999{
8000}
8001static inline __attribute__((always_inline)) void kmemleak_alloc(const void *ptr, size_t size, int min_count,
8002 gfp_t gfp)
8003{
8004}
8005static inline __attribute__((always_inline)) void kmemleak_alloc_recursive(const void *ptr, size_t size,
8006 int min_count, unsigned long flags,
8007 gfp_t gfp)
8008{
8009}
8010static inline __attribute__((always_inline)) void kmemleak_free(const void *ptr)
8011{
8012}
8013static inline __attribute__((always_inline)) void kmemleak_free_part(const void *ptr, size_t size)
8014{
8015}
8016static inline __attribute__((always_inline)) void kmemleak_free_recursive(const void *ptr, unsigned long flags)
8017{
8018}
8019static inline __attribute__((always_inline)) void kmemleak_not_leak(const void *ptr)
8020{
8021}
8022static inline __attribute__((always_inline)) void kmemleak_ignore(const void *ptr)
8023{
8024}
8025static inline __attribute__((always_inline)) void kmemleak_scan_area(const void *ptr, unsigned long offset,
8026 size_t length, gfp_t gfp)
8027{
8028}
8029static inline __attribute__((always_inline)) void kmemleak_erase(void **ptr)
8030{
8031}
8032static inline __attribute__((always_inline)) void kmemleak_no_scan(const void *ptr)
8033{
8034}
8035# 15 "include/linux/slub_def.h" 2
8036
8037enum stat_item {
8038 ALLOC_FASTPATH,
8039 ALLOC_SLOWPATH,
8040 FREE_FASTPATH,
8041 FREE_SLOWPATH,
8042 FREE_FROZEN,
8043 FREE_ADD_PARTIAL,
8044 FREE_REMOVE_PARTIAL,
8045 ALLOC_FROM_PARTIAL,
8046 ALLOC_SLAB,
8047 ALLOC_REFILL,
8048 FREE_SLAB,
8049 CPUSLAB_FLUSH,
8050 DEACTIVATE_FULL,
8051 DEACTIVATE_EMPTY,
8052 DEACTIVATE_TO_HEAD,
8053 DEACTIVATE_TO_TAIL,
8054 DEACTIVATE_REMOTE_FREES,
8055 ORDER_FALLBACK,
8056 NR_SLUB_STAT_ITEMS };
8057
8058struct kmem_cache_cpu {
8059 void **freelist;
8060 struct page *page;
8061 int node;
8062 unsigned int offset;
8063 unsigned int objsize;
8064
8065 unsigned stat[NR_SLUB_STAT_ITEMS];
8066
8067};
8068
8069struct kmem_cache_node {
8070 spinlock_t list_lock;
8071 unsigned long nr_partial;
8072 struct list_head partial;
8073
8074 atomic_long_t nr_slabs;
8075 atomic_long_t total_objects;
8076 struct list_head full;
8077
8078};
8079
8080
8081
8082
8083
8084
8085struct kmem_cache_order_objects {
8086 unsigned long x;
8087};
8088
8089
8090
8091
8092struct kmem_cache {
8093
8094 unsigned long flags;
8095 int size;
8096 int objsize;
8097 int offset;
8098 struct kmem_cache_order_objects oo;
8099
8100
8101
8102
8103
8104 struct kmem_cache_node local_node;
8105
8106
8107 struct kmem_cache_order_objects max;
8108 struct kmem_cache_order_objects min;
8109 gfp_t allocflags;
8110 int refcount;
8111 void (*ctor)(void *);
8112 int inuse;
8113 int align;
8114 unsigned long min_partial;
8115 const char *name;
8116 struct list_head list;
8117
8118 struct kobject kobj;
8119# 110 "include/linux/slub_def.h"
8120 struct kmem_cache_cpu cpu_slab;
8121
8122};
8123# 142 "include/linux/slub_def.h"
8124extern struct kmem_cache kmalloc_caches[(12 + 2)];
8125
8126
8127
8128
8129
8130static inline __attribute__((always_inline)) __attribute__((always_inline)) int kmalloc_index(size_t size)
8131{
8132 if (!size)
8133 return 0;
8134
8135 if (size <= 8)
8136 return ( __builtin_constant_p(8) ? ( (8) < 1 ? ____ilog2_NaN() : (8) & (1ULL << 63) ? 63 : (8) & (1ULL << 62) ? 62 : (8) & (1ULL << 61) ? 61 : (8) & (1ULL << 60) ? 60 : (8) & (1ULL << 59) ? 59 : (8) & (1ULL << 58) ? 58 : (8) & (1ULL << 57) ? 57 : (8) & (1ULL << 56) ? 56 : (8) & (1ULL << 55) ? 55 : (8) & (1ULL << 54) ? 54 : (8) & (1ULL << 53) ? 53 : (8) & (1ULL << 52) ? 52 : (8) & (1ULL << 51) ? 51 : (8) & (1ULL << 50) ? 50 : (8) & (1ULL << 49) ? 49 : (8) & (1ULL << 48) ? 48 : (8) & (1ULL << 47) ? 47 : (8) & (1ULL << 46) ? 46 : (8) & (1ULL << 45) ? 45 : (8) & (1ULL << 44) ? 44 : (8) & (1ULL << 43) ? 43 : (8) & (1ULL << 42) ? 42 : (8) & (1ULL << 41) ? 41 : (8) & (1ULL << 40) ? 40 : (8) & (1ULL << 39) ? 39 : (8) & (1ULL << 38) ? 38 : (8) & (1ULL << 37) ? 37 : (8) & (1ULL << 36) ? 36 : (8) & (1ULL << 35) ? 35 : (8) & (1ULL << 34) ? 34 : (8) & (1ULL << 33) ? 33 : (8) & (1ULL << 32) ? 32 : (8) & (1ULL << 31) ? 31 : (8) & (1ULL << 30) ? 30 : (8) & (1ULL << 29) ? 29 : (8) & (1ULL << 28) ? 28 : (8) & (1ULL << 27) ? 27 : (8) & (1ULL << 26) ? 26 : (8) & (1ULL << 25) ? 25 : (8) & (1ULL << 24) ? 24 : (8) & (1ULL << 23) ? 23 : (8) & (1ULL << 22) ? 22 : (8) & (1ULL << 21) ? 21 : (8) & (1ULL << 20) ? 20 : (8) & (1ULL << 19) ? 19 : (8) & (1ULL << 18) ? 18 : (8) & (1ULL << 17) ? 17 : (8) & (1ULL << 16) ? 16 : (8) & (1ULL << 15) ? 15 : (8) & (1ULL << 14) ? 14 : (8) & (1ULL << 13) ? 13 : (8) & (1ULL << 12) ? 12 : (8) & (1ULL << 11) ? 11 : (8) & (1ULL << 10) ? 10 : (8) & (1ULL << 9) ? 9 : (8) & (1ULL << 8) ? 8 : (8) & (1ULL << 7) ? 7 : (8) & (1ULL << 6) ? 6 : (8) & (1ULL << 5) ? 5 : (8) & (1ULL << 4) ? 4 : (8) & (1ULL << 3) ? 3 : (8) & (1ULL << 2) ? 2 : (8) & (1ULL << 1) ? 1 : (8) & (1ULL << 0) ? 0 : ____ilog2_NaN() ) : (sizeof(8) <= 4) ? __ilog2_u32(8) : __ilog2_u64(8) );
8137
8138 if (8 <= 32 && size > 64 && size <= 96)
8139 return 1;
8140 if (8 <= 64 && size > 128 && size <= 192)
8141 return 2;
8142 if (size <= 8) return 3;
8143 if (size <= 16) return 4;
8144 if (size <= 32) return 5;
8145 if (size <= 64) return 6;
8146 if (size <= 128) return 7;
8147 if (size <= 256) return 8;
8148 if (size <= 512) return 9;
8149 if (size <= 1024) return 10;
8150 if (size <= 2 * 1024) return 11;
8151 if (size <= 4 * 1024) return 12;
8152
8153
8154
8155
8156 if (size <= 8 * 1024) return 13;
8157 if (size <= 16 * 1024) return 14;
8158 if (size <= 32 * 1024) return 15;
8159 if (size <= 64 * 1024) return 16;
8160 if (size <= 128 * 1024) return 17;
8161 if (size <= 256 * 1024) return 18;
8162 if (size <= 512 * 1024) return 19;
8163 if (size <= 1024 * 1024) return 20;
8164 if (size <= 2 * 1024 * 1024) return 21;
8165 return -1;
8166# 192 "include/linux/slub_def.h"
8167}
8168
8169
8170
8171
8172
8173
8174
8175static inline __attribute__((always_inline)) __attribute__((always_inline)) struct kmem_cache *kmalloc_slab(size_t size)
8176{
8177 int index = kmalloc_index(size);
8178
8179 if (index == 0)
8180 return ((void *)0);
8181
8182 return &kmalloc_caches[index];
8183}
8184# 217 "include/linux/slub_def.h"
8185void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
8186void *__kmalloc(size_t size, gfp_t flags);
8187
8188
8189
8190
8191static inline __attribute__((always_inline)) __attribute__((always_inline)) void *
8192kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags)
8193{
8194 return kmem_cache_alloc(s, gfpflags);
8195}
8196
8197
8198static inline __attribute__((always_inline)) __attribute__((always_inline)) void *kmalloc_large(size_t size, gfp_t flags)
8199{
8200 unsigned int order = get_order(size);
8201 void *ret = (void *) __get_free_pages(flags | (( gfp_t)0x4000u), order);
8202
8203 kmemleak_alloc(ret, size, 1, flags);
8204 trace_kmalloc(({ __label__ __here; __here: (unsigned long)&&__here; }), ret, size, (1UL << 12) << order, flags);
8205
8206 return ret;
8207}
8208
8209static inline __attribute__((always_inline)) __attribute__((always_inline)) void *kmalloc(size_t size, gfp_t flags)
8210{
8211 void *ret;
8212
8213 if (__builtin_constant_p(size)) {
8214 if (size > (2 * (1UL << 12)))
8215 return kmalloc_large(size, flags);
8216
8217 if (!(flags & (( gfp_t)0x01u))) {
8218 struct kmem_cache *s = kmalloc_slab(size);
8219
8220 if (!s)
8221 return ((void *)16);
8222
8223 ret = kmem_cache_alloc_notrace(s, flags);
8224
8225 trace_kmalloc(({ __label__ __here; __here: (unsigned long)&&__here; }), ret, size, s->size, flags);
8226
8227 return ret;
8228 }
8229 }
8230 return __kmalloc(size, flags);
8231}
8232# 163 "include/linux/slab.h" 2
8233# 220 "include/linux/slab.h"
8234static inline __attribute__((always_inline)) void *kcalloc(size_t n, size_t size, gfp_t flags)
8235{
8236 if (size != 0 && n > (~0UL) / size)
8237 return ((void *)0);
8238 return __kmalloc(n * size, flags | (( gfp_t)0x8000u));
8239}
8240# 238 "include/linux/slab.h"
8241static inline __attribute__((always_inline)) void *kmalloc_node(size_t size, gfp_t flags, int node)
8242{
8243 return kmalloc(size, flags);
8244}
8245
8246static inline __attribute__((always_inline)) void *__kmalloc_node(size_t size, gfp_t flags, int node)
8247{
8248 return __kmalloc(size, flags);
8249}
8250
8251void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
8252
8253static inline __attribute__((always_inline)) void *kmem_cache_alloc_node(struct kmem_cache *cachep,
8254 gfp_t flags, int node)
8255{
8256 return kmem_cache_alloc(cachep, flags);
8257}
8258# 266 "include/linux/slab.h"
8259extern void *__kmalloc_track_caller(size_t, gfp_t, unsigned long);
8260# 303 "include/linux/slab.h"
8261static inline __attribute__((always_inline)) void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
8262{
8263 return kmem_cache_alloc(k, flags | (( gfp_t)0x8000u));
8264}
8265
8266
8267
8268
8269
8270
8271static inline __attribute__((always_inline)) void *kzalloc(size_t size, gfp_t flags)
8272{
8273 return kmalloc(size, flags | (( gfp_t)0x8000u));
8274}
8275
8276
8277
8278
8279
8280
8281
8282static inline __attribute__((always_inline)) void *kzalloc_node(size_t size, gfp_t flags, int node)
8283{
8284 return kmalloc_node(size, flags | (( gfp_t)0x8000u), node);
8285}
8286
8287void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) kmem_cache_init_late(void);
8288# 6 "include/linux/percpu.h" 2
8289
8290
8291# 1 "include/linux/pfn.h" 1
8292# 9 "include/linux/percpu.h" 2
8293
8294# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/percpu.h" 1
8295# 1 "include/asm-generic/percpu.h" 1
8296
8297
8298
8299
8300
8301# 1 "include/linux/percpu-defs.h" 1
8302# 7 "include/asm-generic/percpu.h" 2
8303# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/percpu.h" 2
8304# 11 "include/linux/percpu.h" 2
8305# 166 "include/linux/percpu.h"
8306static inline __attribute__((always_inline)) void *__alloc_percpu(size_t size, size_t align)
8307{
8308
8309
8310
8311
8312
8313 ({ static int __warned; int __ret_warn_once = !!(align > (1 << 5)); if (__builtin_expect(!!(__ret_warn_once), 0)) if (({ int __ret_warn_on = !!(!__warned); if (__builtin_expect(!!(__ret_warn_on), 0)) asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/percpu.h"), "i"(173), "i"((1<<0)), "i"(sizeof(struct bug_entry))); __builtin_expect(!!(__ret_warn_on), 0); })) __warned = 1; __builtin_expect(!!(__ret_warn_once), 0); });
8314 return kzalloc(size, ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)));
8315}
8316
8317static inline __attribute__((always_inline)) void free_percpu(void *p)
8318{
8319 kfree(p);
8320}
8321
8322static inline __attribute__((always_inline)) void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) setup_per_cpu_areas(void) { }
8323
8324static inline __attribute__((always_inline)) void *pcpu_lpage_remapped(void *kaddr)
8325{
8326 return ((void *)0);
8327}
8328# 5 "include/asm-generic/local.h" 2
8329
8330# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
8331# 7 "include/asm-generic/local.h" 2
8332# 21 "include/asm-generic/local.h"
8333typedef struct
8334{
8335 atomic_long_t a;
8336} local_t;
8337# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/local.h" 2
8338# 21 "include/linux/module.h" 2
8339# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/module.h" 1
8340# 16 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/module.h"
8341struct mod_arch_specific {
8342 Elf32_Shdr *text_l1;
8343 Elf32_Shdr *data_a_l1;
8344 Elf32_Shdr *bss_a_l1;
8345 Elf32_Shdr *data_b_l1;
8346 Elf32_Shdr *bss_b_l1;
8347 Elf32_Shdr *text_l2;
8348 Elf32_Shdr *data_l2;
8349 Elf32_Shdr *bss_l2;
8350};
8351# 22 "include/linux/module.h" 2
8352
8353# 1 "include/trace/events/module.h" 1
8354
8355
8356
8357
8358
8359
8360# 1 "include/linux/tracepoint.h" 1
8361# 8 "include/trace/events/module.h" 2
8362
8363
8364
8365struct module;
8366
8367
8368
8369
8370
8371
8372extern struct tracepoint __tracepoint_module_load; static inline __attribute__((always_inline)) void trace_module_load(struct module *mod) { if (__builtin_expect(!!(__tracepoint_module_load.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_module_load)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_module_load)->funcs) *)&((&__tracepoint_module_load)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct module *mod))(*it_func))(mod); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_module_load(void (*probe)(struct module *mod)) { return tracepoint_probe_register("module_load", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_module_load(void (*probe)(struct module *mod)) { return tracepoint_probe_unregister("module_load", (void *)probe); };
8373# 37 "include/trace/events/module.h"
8374extern struct tracepoint __tracepoint_module_free; static inline __attribute__((always_inline)) void trace_module_free(struct module *mod) { if (__builtin_expect(!!(__tracepoint_module_free.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_module_free)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_module_free)->funcs) *)&((&__tracepoint_module_free)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct module *mod))(*it_func))(mod); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_module_free(void (*probe)(struct module *mod)) { return tracepoint_probe_register("module_free", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_module_free(void (*probe)(struct module *mod)) { return tracepoint_probe_unregister("module_free", (void *)probe); };
8375# 54 "include/trace/events/module.h"
8376extern struct tracepoint __tracepoint_module_get; static inline __attribute__((always_inline)) void trace_module_get(struct module *mod, unsigned long ip, int refcnt) { if (__builtin_expect(!!(__tracepoint_module_get.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_module_get)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_module_get)->funcs) *)&((&__tracepoint_module_get)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct module *mod, unsigned long ip, int refcnt))(*it_func))(mod, ip, refcnt); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_module_get(void (*probe)(struct module *mod, unsigned long ip, int refcnt)) { return tracepoint_probe_register("module_get", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_module_get(void (*probe)(struct module *mod, unsigned long ip, int refcnt)) { return tracepoint_probe_unregister("module_get", (void *)probe); };
8377# 76 "include/trace/events/module.h"
8378extern struct tracepoint __tracepoint_module_put; static inline __attribute__((always_inline)) void trace_module_put(struct module *mod, unsigned long ip, int refcnt) { if (__builtin_expect(!!(__tracepoint_module_put.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_module_put)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_module_put)->funcs) *)&((&__tracepoint_module_put)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(struct module *mod, unsigned long ip, int refcnt))(*it_func))(mod, ip, refcnt); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_module_put(void (*probe)(struct module *mod, unsigned long ip, int refcnt)) { return tracepoint_probe_register("module_put", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_module_put(void (*probe)(struct module *mod, unsigned long ip, int refcnt)) { return tracepoint_probe_unregister("module_put", (void *)probe); };
8379# 98 "include/trace/events/module.h"
8380extern struct tracepoint __tracepoint_module_request; static inline __attribute__((always_inline)) void trace_module_request(char *name, bool wait, unsigned long ip) { if (__builtin_expect(!!(__tracepoint_module_request.state), 0)) do { void **it_func; rcu_read_lock_sched_notrace(); it_func = ({ typeof((&__tracepoint_module_request)->funcs) _________p1 = (*(volatile typeof((&__tracepoint_module_request)->funcs) *)&((&__tracepoint_module_request)->funcs)); do { } while(0); (_________p1); }); if (it_func) { do { ((void(*)(char *name, bool wait, unsigned long ip))(*it_func))(name, wait, ip); } while (*(++it_func)); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int register_trace_module_request(void (*probe)(char *name, bool wait, unsigned long ip)) { return tracepoint_probe_register("module_request", (void *)probe); } static inline __attribute__((always_inline)) int unregister_trace_module_request(void (*probe)(char *name, bool wait, unsigned long ip)) { return tracepoint_probe_unregister("module_request", (void *)probe); };
8381# 125 "include/trace/events/module.h"
8382# 1 "include/trace/define_trace.h" 1
8383# 126 "include/trace/events/module.h" 2
8384# 24 "include/linux/module.h" 2
8385# 35 "include/linux/module.h"
8386struct kernel_symbol
8387{
8388 unsigned long value;
8389 const char *name;
8390};
8391
8392struct modversion_info
8393{
8394 unsigned long crc;
8395 char name[(64 - sizeof(unsigned long))];
8396};
8397
8398struct module;
8399
8400struct module_attribute {
8401 struct attribute attr;
8402 ssize_t (*show)(struct module_attribute *, struct module *, char *);
8403 ssize_t (*store)(struct module_attribute *, struct module *,
8404 const char *, size_t count);
8405 void (*setup)(struct module *, const char *);
8406 int (*test)(struct module *);
8407 void (*free)(struct module *);
8408};
8409
8410struct module_kobject
8411{
8412 struct kobject kobj;
8413 struct module *mod;
8414 struct kobject *drivers_dir;
8415 struct module_param_attrs *mp;
8416};
8417
8418
8419extern int init_module(void);
8420extern void cleanup_module(void);
8421
8422
8423struct exception_table_entry;
8424
8425const struct exception_table_entry *
8426search_extable(const struct exception_table_entry *first,
8427 const struct exception_table_entry *last,
8428 unsigned long value);
8429void sort_extable(struct exception_table_entry *start,
8430 struct exception_table_entry *finish);
8431void sort_main_extable(void);
8432void trim_init_extable(struct module *m);
8433
8434
8435
8436
8437
8438
8439extern struct module __this_module;
8440# 170 "include/linux/module.h"
8441const struct exception_table_entry *search_exception_tables(unsigned long add);
8442
8443struct notifier_block;
8444
8445
8446
8447
8448void *__symbol_get(const char *symbol);
8449void *__symbol_get_gpl(const char *symbol);
8450# 227 "include/linux/module.h"
8451enum module_state
8452{
8453 MODULE_STATE_LIVE,
8454 MODULE_STATE_COMING,
8455 MODULE_STATE_GOING,
8456};
8457
8458struct module
8459{
8460 enum module_state state;
8461
8462
8463 struct list_head list;
8464
8465
8466 char name[(64 - sizeof(unsigned long))];
8467
8468
8469 struct module_kobject mkobj;
8470 struct module_attribute *modinfo_attrs;
8471 const char *version;
8472 const char *srcversion;
8473 struct kobject *holders_dir;
8474
8475
8476 const struct kernel_symbol *syms;
8477 const unsigned long *crcs;
8478 unsigned int num_syms;
8479
8480
8481 struct kernel_param *kp;
8482 unsigned int num_kp;
8483
8484
8485 unsigned int num_gpl_syms;
8486 const struct kernel_symbol *gpl_syms;
8487 const unsigned long *gpl_crcs;
8488
8489
8490
8491 const struct kernel_symbol *unused_syms;
8492 const unsigned long *unused_crcs;
8493 unsigned int num_unused_syms;
8494
8495
8496 unsigned int num_unused_gpl_syms;
8497 const struct kernel_symbol *unused_gpl_syms;
8498 const unsigned long *unused_gpl_crcs;
8499
8500
8501
8502 const struct kernel_symbol *gpl_future_syms;
8503 const unsigned long *gpl_future_crcs;
8504 unsigned int num_gpl_future_syms;
8505
8506
8507 unsigned int num_exentries;
8508 struct exception_table_entry *extable;
8509
8510
8511 int (*init)(void);
8512
8513
8514 void *module_init;
8515
8516
8517 void *module_core;
8518
8519
8520 unsigned int init_size, core_size;
8521
8522
8523 unsigned int init_text_size, core_text_size;
8524
8525
8526 struct mod_arch_specific arch;
8527
8528 unsigned int taints;
8529
8530
8531
8532 unsigned num_bugs;
8533 struct list_head bug_list;
8534 struct bug_entry *bug_table;
8535# 319 "include/linux/module.h"
8536 Elf32_Sym *symtab, *core_symtab;
8537 unsigned int num_symtab, core_num_syms;
8538 char *strtab, *core_strtab;
8539
8540
8541 struct module_sect_attrs *sect_attrs;
8542
8543
8544 struct module_notes_attrs *notes_attrs;
8545
8546
8547
8548 void *percpu;
8549
8550
8551
8552 char *args;
8553
8554 struct tracepoint *tracepoints;
8555 unsigned int num_tracepoints;
8556
8557
8558
8559 const char **trace_bprintk_fmt_start;
8560 unsigned int num_trace_bprintk_fmt;
8561
8562
8563 struct ftrace_event_call *trace_events;
8564 unsigned int num_trace_events;
8565# 356 "include/linux/module.h"
8566 struct list_head modules_which_use_me;
8567
8568
8569 struct task_struct *waiter;
8570
8571
8572 void (*exit)(void);
8573
8574
8575
8576
8577 local_t ref;
8578
8579
8580
8581
8582
8583 ctor_fn_t *ctors;
8584 unsigned int num_ctors;
8585
8586};
8587
8588
8589
8590
8591extern struct mutex module_mutex;
8592
8593
8594
8595
8596static inline __attribute__((always_inline)) int module_is_live(struct module *mod)
8597{
8598 return mod->state != MODULE_STATE_GOING;
8599}
8600
8601struct module *__module_text_address(unsigned long addr);
8602struct module *__module_address(unsigned long addr);
8603bool is_module_address(unsigned long addr);
8604bool is_module_text_address(unsigned long addr);
8605
8606static inline __attribute__((always_inline)) int within_module_core(unsigned long addr, struct module *mod)
8607{
8608 return (unsigned long)mod->module_core <= addr &&
8609 addr < (unsigned long)mod->module_core + mod->core_size;
8610}
8611
8612static inline __attribute__((always_inline)) int within_module_init(unsigned long addr, struct module *mod)
8613{
8614 return (unsigned long)mod->module_init <= addr &&
8615 addr < (unsigned long)mod->module_init + mod->init_size;
8616}
8617
8618
8619struct module *find_module(const char *name);
8620
8621struct symsearch {
8622 const struct kernel_symbol *start, *stop;
8623 const unsigned long *crcs;
8624 enum {
8625 NOT_GPL_ONLY,
8626 GPL_ONLY,
8627 WILL_BE_GPL_ONLY,
8628 } licence;
8629 bool unused;
8630};
8631
8632
8633const struct kernel_symbol *find_symbol(const char *name,
8634 struct module **owner,
8635 const unsigned long **crc,
8636 bool gplok,
8637 bool warn);
8638
8639
8640bool each_symbol(bool (*fn)(const struct symsearch *arr, struct module *owner,
8641 unsigned int symnum, void *data), void *data);
8642
8643
8644
8645int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
8646 char *name, char *module_name, int *exported);
8647
8648
8649unsigned long module_kallsyms_lookup_name(const char *name);
8650
8651int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
8652 struct module *, unsigned long),
8653 void *data);
8654
8655extern void __module_put_and_exit(struct module *mod, long code)
8656 __attribute__((noreturn));
8657
8658
8659
8660unsigned int module_refcount(struct module *mod);
8661void __symbol_put(const char *symbol);
8662
8663void symbol_put_addr(void *addr);
8664
8665static inline __attribute__((always_inline)) local_t *__module_ref_addr(struct module *mod, int cpu)
8666{
8667
8668
8669
8670 return &mod->ref;
8671
8672}
8673
8674
8675
8676static inline __attribute__((always_inline)) void __module_get(struct module *module)
8677{
8678 if (module) {
8679 unsigned int cpu = ({ do { } while (0); 0; });
8680 atomic_long_inc(&(__module_ref_addr(module, cpu))->a);
8681 trace_module_get(module, ({ __label__ __here; __here: (unsigned long)&&__here; }),
8682 atomic_long_read(&(__module_ref_addr(module, cpu))->a));
8683 do { } while (0);
8684 }
8685}
8686
8687static inline __attribute__((always_inline)) int try_module_get(struct module *module)
8688{
8689 int ret = 1;
8690
8691 if (module) {
8692 unsigned int cpu = ({ do { } while (0); 0; });
8693 if (__builtin_expect(!!(module_is_live(module)), 1)) {
8694 atomic_long_inc(&(__module_ref_addr(module, cpu))->a);
8695 trace_module_get(module, ({ __label__ __here; __here: (unsigned long)&&__here; }),
8696 atomic_long_read(&(__module_ref_addr(module, cpu))->a));
8697 }
8698 else
8699 ret = 0;
8700 do { } while (0);
8701 }
8702 return ret;
8703}
8704
8705extern void module_put(struct module *module);
8706# 512 "include/linux/module.h"
8707int use_module(struct module *a, struct module *b);
8708# 524 "include/linux/module.h"
8709const char *module_address_lookup(unsigned long addr,
8710 unsigned long *symbolsize,
8711 unsigned long *offset,
8712 char **modname,
8713 char *namebuf);
8714int lookup_module_symbol_name(unsigned long addr, char *symname);
8715int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
8716
8717
8718const struct exception_table_entry *search_module_extables(unsigned long addr);
8719
8720int register_module_notifier(struct notifier_block * nb);
8721int unregister_module_notifier(struct notifier_block * nb);
8722
8723extern void print_modules(void);
8724
8725extern void module_update_tracepoints(void);
8726extern int module_get_iter_tracepoints(struct tracepoint_iter *iter);
8727# 665 "include/linux/module.h"
8728struct device_driver;
8729
8730struct module;
8731
8732extern struct kset *module_kset;
8733extern struct kobj_type module_ktype;
8734extern int module_sysfs_initialized;
8735
8736int mod_sysfs_init(struct module *mod);
8737int mod_sysfs_setup(struct module *mod,
8738 struct kernel_param *kparam,
8739 unsigned int num_params);
8740int module_add_modinfo_attrs(struct module *mod);
8741void module_remove_modinfo_attrs(struct module *mod);
8742# 712 "include/linux/module.h"
8743int module_bug_finalize(const Elf32_Ehdr *, const Elf32_Shdr *,
8744 struct module *);
8745void module_bug_cleanup(struct module *);
8746# 24 "fs/sysv/super.c" 2
8747
8748
8749# 1 "include/linux/buffer_head.h" 1
8750# 11 "include/linux/buffer_head.h"
8751# 1 "include/linux/fs.h" 1
8752# 9 "include/linux/fs.h"
8753# 1 "include/linux/limits.h" 1
8754# 10 "include/linux/fs.h" 2
8755# 1 "include/linux/ioctl.h" 1
8756
8757
8758
8759# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/ioctl.h" 1
8760# 1 "include/asm-generic/ioctl.h" 1
8761# 73 "include/asm-generic/ioctl.h"
8762extern unsigned int __invalid_size_argument_for_IOC;
8763# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/ioctl.h" 2
8764# 5 "include/linux/ioctl.h" 2
8765# 11 "include/linux/fs.h" 2
8766# 35 "include/linux/fs.h"
8767struct files_stat_struct {
8768 int nr_files;
8769 int nr_free_files;
8770 int max_files;
8771};
8772
8773struct inodes_stat_t {
8774 int nr_inodes;
8775 int nr_unused;
8776 int dummy[5];
8777};
8778# 365 "include/linux/fs.h"
8779# 1 "include/linux/kdev_t.h" 1
8780# 21 "include/linux/kdev_t.h"
8781static inline __attribute__((always_inline)) int old_valid_dev(dev_t dev)
8782{
8783 return ((unsigned int) ((dev) >> 20)) < 256 && ((unsigned int) ((dev) & ((1U << 20) - 1))) < 256;
8784}
8785
8786static inline __attribute__((always_inline)) u16 old_encode_dev(dev_t dev)
8787{
8788 return (((unsigned int) ((dev) >> 20)) << 8) | ((unsigned int) ((dev) & ((1U << 20) - 1)));
8789}
8790
8791static inline __attribute__((always_inline)) dev_t old_decode_dev(u16 val)
8792{
8793 return ((((val >> 8) & 255) << 20) | (val & 255));
8794}
8795
8796static inline __attribute__((always_inline)) int new_valid_dev(dev_t dev)
8797{
8798 return 1;
8799}
8800
8801static inline __attribute__((always_inline)) u32 new_encode_dev(dev_t dev)
8802{
8803 unsigned major = ((unsigned int) ((dev) >> 20));
8804 unsigned minor = ((unsigned int) ((dev) & ((1U << 20) - 1)));
8805 return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
8806}
8807
8808static inline __attribute__((always_inline)) dev_t new_decode_dev(u32 dev)
8809{
8810 unsigned major = (dev & 0xfff00) >> 8;
8811 unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00);
8812 return (((major) << 20) | (minor));
8813}
8814
8815static inline __attribute__((always_inline)) int huge_valid_dev(dev_t dev)
8816{
8817 return 1;
8818}
8819
8820static inline __attribute__((always_inline)) u64 huge_encode_dev(dev_t dev)
8821{
8822 return new_encode_dev(dev);
8823}
8824
8825static inline __attribute__((always_inline)) dev_t huge_decode_dev(u64 dev)
8826{
8827 return new_decode_dev(dev);
8828}
8829
8830static inline __attribute__((always_inline)) int sysv_valid_dev(dev_t dev)
8831{
8832 return ((unsigned int) ((dev) >> 20)) < (1<<14) && ((unsigned int) ((dev) & ((1U << 20) - 1))) < (1<<18);
8833}
8834
8835static inline __attribute__((always_inline)) u32 sysv_encode_dev(dev_t dev)
8836{
8837 return ((unsigned int) ((dev) & ((1U << 20) - 1))) | (((unsigned int) ((dev) >> 20)) << 18);
8838}
8839
8840static inline __attribute__((always_inline)) unsigned sysv_major(u32 dev)
8841{
8842 return (dev >> 18) & 0x3fff;
8843}
8844
8845static inline __attribute__((always_inline)) unsigned sysv_minor(u32 dev)
8846{
8847 return dev & 0x3ffff;
8848}
8849# 366 "include/linux/fs.h" 2
8850# 1 "include/linux/dcache.h" 1
8851
8852
8853
8854
8855
8856# 1 "include/linux/rculist.h" 1
8857# 18 "include/linux/rculist.h"
8858static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head *new,
8859 struct list_head *prev, struct list_head *next)
8860{
8861 new->next = next;
8862 new->prev = prev;
8863 ({ if (!__builtin_constant_p(new) || ((new) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (prev->next) = (new); });
8864 next->prev = new;
8865}
8866# 43 "include/linux/rculist.h"
8867static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head)
8868{
8869 __list_add_rcu(new, head, head->next);
8870}
8871# 64 "include/linux/rculist.h"
8872static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new,
8873 struct list_head *head)
8874{
8875 __list_add_rcu(new, head->prev, head);
8876}
8877# 94 "include/linux/rculist.h"
8878static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry)
8879{
8880 __list_del(entry->prev, entry->next);
8881 entry->prev = ((void *) 0x00200200);
8882}
8883# 120 "include/linux/rculist.h"
8884static inline __attribute__((always_inline)) void hlist_del_init_rcu(struct hlist_node *n)
8885{
8886 if (!hlist_unhashed(n)) {
8887 __hlist_del(n);
8888 n->pprev = ((void *)0);
8889 }
8890}
8891# 136 "include/linux/rculist.h"
8892static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old,
8893 struct list_head *new)
8894{
8895 new->next = old->next;
8896 new->prev = old->prev;
8897 ({ if (!__builtin_constant_p(new) || ((new) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (new->prev->next) = (new); });
8898 new->next->prev = new;
8899 old->prev = ((void *) 0x00200200);
8900}
8901# 163 "include/linux/rculist.h"
8902static inline __attribute__((always_inline)) void list_splice_init_rcu(struct list_head *list,
8903 struct list_head *head,
8904 void (*sync)(void))
8905{
8906 struct list_head *first = list->next;
8907 struct list_head *last = list->prev;
8908 struct list_head *at = head->next;
8909
8910 if (list_empty(head))
8911 return;
8912
8913
8914
8915 INIT_LIST_HEAD(list);
8916# 185 "include/linux/rculist.h"
8917 sync();
8918# 195 "include/linux/rculist.h"
8919 last->next = at;
8920 ({ if (!__builtin_constant_p(first) || ((first) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (head->next) = (first); });
8921 first->prev = head;
8922 at->prev = last;
8923}
8924# 283 "include/linux/rculist.h"
8925static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n)
8926{
8927 __hlist_del(n);
8928 n->pprev = ((void *) 0x00200200);
8929}
8930# 296 "include/linux/rculist.h"
8931static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old,
8932 struct hlist_node *new)
8933{
8934 struct hlist_node *next = old->next;
8935
8936 new->next = next;
8937 new->pprev = old->pprev;
8938 ({ if (!__builtin_constant_p(new) || ((new) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (*new->pprev) = (new); });
8939 if (next)
8940 new->next->pprev = &new->next;
8941 old->pprev = ((void *) 0x00200200);
8942}
8943# 328 "include/linux/rculist.h"
8944static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n,
8945 struct hlist_head *h)
8946{
8947 struct hlist_node *first = h->first;
8948
8949 n->next = first;
8950 n->pprev = &h->first;
8951 ({ if (!__builtin_constant_p(n) || ((n) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (h->first) = (n); });
8952 if (first)
8953 first->pprev = &n->next;
8954}
8955# 358 "include/linux/rculist.h"
8956static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n,
8957 struct hlist_node *next)
8958{
8959 n->pprev = next->pprev;
8960 n->next = next;
8961 ({ if (!__builtin_constant_p(n) || ((n) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (*(n->pprev)) = (n); });
8962 next->pprev = &n->next;
8963}
8964# 385 "include/linux/rculist.h"
8965static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev,
8966 struct hlist_node *n)
8967{
8968 n->next = prev->next;
8969 n->pprev = &prev->next;
8970 ({ if (!__builtin_constant_p(n) || ((n) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (prev->next) = (n); });
8971 if (n->next)
8972 n->next->pprev = &n->next;
8973}
8974# 7 "include/linux/dcache.h" 2
8975
8976
8977
8978
8979struct nameidata;
8980struct path;
8981struct vfsmount;
8982# 33 "include/linux/dcache.h"
8983struct qstr {
8984 unsigned int hash;
8985 unsigned int len;
8986 const unsigned char *name;
8987};
8988
8989struct dentry_stat_t {
8990 int nr_dentry;
8991 int nr_unused;
8992 int age_limit;
8993 int want_pages;
8994 int dummy[2];
8995};
8996extern struct dentry_stat_t dentry_stat;
8997
8998
8999
9000
9001
9002
9003static inline __attribute__((always_inline)) unsigned long
9004partial_name_hash(unsigned long c, unsigned long prevhash)
9005{
9006 return (prevhash + (c << 4) + (c >> 4)) * 11;
9007}
9008
9009
9010
9011
9012
9013static inline __attribute__((always_inline)) unsigned long end_name_hash(unsigned long hash)
9014{
9015 return (unsigned int) hash;
9016}
9017
9018
9019static inline __attribute__((always_inline)) unsigned int
9020full_name_hash(const unsigned char *name, unsigned int len)
9021{
9022 unsigned long hash = 0;
9023 while (len--)
9024 hash = partial_name_hash(*name++, hash);
9025 return end_name_hash(hash);
9026}
9027# 89 "include/linux/dcache.h"
9028struct dentry {
9029 atomic_t d_count;
9030 unsigned int d_flags;
9031 spinlock_t d_lock;
9032 int d_mounted;
9033 struct inode *d_inode;
9034
9035
9036
9037
9038
9039 struct hlist_node d_hash;
9040 struct dentry *d_parent;
9041 struct qstr d_name;
9042
9043 struct list_head d_lru;
9044
9045
9046
9047 union {
9048 struct list_head d_child;
9049 struct rcu_head d_rcu;
9050 } d_u;
9051 struct list_head d_subdirs;
9052 struct list_head d_alias;
9053 unsigned long d_time;
9054 const struct dentry_operations *d_op;
9055 struct super_block *d_sb;
9056 void *d_fsdata;
9057
9058 unsigned char d_iname[40];
9059};
9060
9061
9062
9063
9064
9065
9066
9067enum dentry_d_lock_class
9068{
9069 DENTRY_D_LOCK_NORMAL,
9070 DENTRY_D_LOCK_NESTED
9071};
9072
9073struct dentry_operations {
9074 int (*d_revalidate)(struct dentry *, struct nameidata *);
9075 int (*d_hash) (struct dentry *, struct qstr *);
9076 int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
9077 int (*d_delete)(struct dentry *);
9078 void (*d_release)(struct dentry *);
9079 void (*d_iput)(struct dentry *, struct inode *);
9080 char *(*d_dname)(struct dentry *, char *, int);
9081};
9082# 189 "include/linux/dcache.h"
9083extern spinlock_t dcache_lock;
9084extern seqlock_t rename_lock;
9085# 208 "include/linux/dcache.h"
9086static inline __attribute__((always_inline)) void __d_drop(struct dentry *dentry)
9087{
9088 if (!(dentry->d_flags & 0x0010)) {
9089 dentry->d_flags |= 0x0010;
9090 hlist_del_rcu(&dentry->d_hash);
9091 }
9092}
9093
9094static inline __attribute__((always_inline)) void d_drop(struct dentry *dentry)
9095{
9096 _spin_lock(&dcache_lock);
9097 _spin_lock(&dentry->d_lock);
9098 __d_drop(dentry);
9099 _spin_unlock(&dentry->d_lock);
9100 _spin_unlock(&dcache_lock);
9101}
9102
9103static inline __attribute__((always_inline)) int dname_external(struct dentry *dentry)
9104{
9105 return dentry->d_name.name != dentry->d_iname;
9106}
9107
9108
9109
9110
9111extern void d_instantiate(struct dentry *, struct inode *);
9112extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
9113extern struct dentry * d_materialise_unique(struct dentry *, struct inode *);
9114extern void d_delete(struct dentry *);
9115
9116
9117extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
9118extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
9119extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
9120extern struct dentry * d_obtain_alias(struct inode *);
9121extern void shrink_dcache_sb(struct super_block *);
9122extern void shrink_dcache_parent(struct dentry *);
9123extern void shrink_dcache_for_umount(struct super_block *);
9124extern int d_invalidate(struct dentry *);
9125
9126
9127extern struct dentry * d_alloc_root(struct inode *);
9128
9129
9130extern void d_genocide(struct dentry *);
9131
9132extern struct dentry *d_find_alias(struct inode *);
9133extern void d_prune_aliases(struct inode *);
9134
9135
9136extern int have_submounts(struct dentry *);
9137
9138
9139
9140
9141extern void d_rehash(struct dentry *);
9142# 274 "include/linux/dcache.h"
9143static inline __attribute__((always_inline)) void d_add(struct dentry *entry, struct inode *inode)
9144{
9145 d_instantiate(entry, inode);
9146 d_rehash(entry);
9147}
9148# 288 "include/linux/dcache.h"
9149static inline __attribute__((always_inline)) struct dentry *d_add_unique(struct dentry *entry, struct inode *inode)
9150{
9151 struct dentry *res;
9152
9153 res = d_instantiate_unique(entry, inode);
9154 d_rehash(res != ((void *)0) ? res : entry);
9155 return res;
9156}
9157
9158
9159extern void d_move(struct dentry *, struct dentry *);
9160extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
9161
9162
9163extern struct dentry * d_lookup(struct dentry *, struct qstr *);
9164extern struct dentry * __d_lookup(struct dentry *, struct qstr *);
9165extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *);
9166
9167
9168extern int d_validate(struct dentry *, struct dentry *);
9169
9170
9171
9172
9173extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
9174
9175extern char *__d_path(const struct path *path, struct path *root, char *, int);
9176extern char *d_path(const struct path *, char *, int);
9177extern char *dentry_path(struct dentry *, char *, int);
9178# 333 "include/linux/dcache.h"
9179static inline __attribute__((always_inline)) struct dentry *dget(struct dentry *dentry)
9180{
9181 if (dentry) {
9182 do { if (__builtin_expect(!!(!((&dentry->d_count)->counter)), 0)) do { asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/dcache.h"), "i"(336), "i"(0), "i"(sizeof(struct bug_entry))); for (;;); } while (0); } while(0);
9183 atomic_inc(&dentry->d_count);
9184 }
9185 return dentry;
9186}
9187
9188extern struct dentry * dget_locked(struct dentry *);
9189# 351 "include/linux/dcache.h"
9190static inline __attribute__((always_inline)) int d_unhashed(struct dentry *dentry)
9191{
9192 return (dentry->d_flags & 0x0010);
9193}
9194
9195static inline __attribute__((always_inline)) int d_unlinked(struct dentry *dentry)
9196{
9197 return d_unhashed(dentry) && !((dentry) == (dentry)->d_parent);
9198}
9199
9200static inline __attribute__((always_inline)) struct dentry *dget_parent(struct dentry *dentry)
9201{
9202 struct dentry *ret;
9203
9204 _spin_lock(&dentry->d_lock);
9205 ret = dget(dentry->d_parent);
9206 _spin_unlock(&dentry->d_lock);
9207 return ret;
9208}
9209
9210extern void dput(struct dentry *);
9211
9212static inline __attribute__((always_inline)) int d_mountpoint(struct dentry *dentry)
9213{
9214 return dentry->d_mounted;
9215}
9216
9217extern struct vfsmount *lookup_mnt(struct path *);
9218extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
9219
9220extern int sysctl_vfs_cache_pressure;
9221# 367 "include/linux/fs.h" 2
9222# 1 "include/linux/path.h" 1
9223
9224
9225
9226struct dentry;
9227struct vfsmount;
9228
9229struct path {
9230 struct vfsmount *mnt;
9231 struct dentry *dentry;
9232};
9233
9234extern void path_get(struct path *);
9235extern void path_put(struct path *);
9236# 368 "include/linux/fs.h" 2
9237
9238
9239
9240
9241# 1 "include/linux/radix-tree.h" 1
9242# 41 "include/linux/radix-tree.h"
9243static inline __attribute__((always_inline)) void *radix_tree_ptr_to_indirect(void *ptr)
9244{
9245 return (void *)((unsigned long)ptr | 1);
9246}
9247
9248static inline __attribute__((always_inline)) void *radix_tree_indirect_to_ptr(void *ptr)
9249{
9250 return (void *)((unsigned long)ptr & ~1);
9251}
9252
9253static inline __attribute__((always_inline)) int radix_tree_is_indirect_ptr(void *ptr)
9254{
9255 return (int)((unsigned long)ptr & 1);
9256}
9257
9258
9259
9260
9261
9262
9263struct radix_tree_root {
9264 unsigned int height;
9265 gfp_t gfp_mask;
9266 struct radix_tree_node *rnode;
9267};
9268# 137 "include/linux/radix-tree.h"
9269static inline __attribute__((always_inline)) void *radix_tree_deref_slot(void **pslot)
9270{
9271 void *ret = ({ typeof(*pslot) _________p1 = (*(volatile typeof(*pslot) *)&(*pslot)); do { } while(0); (_________p1); });
9272 if (__builtin_expect(!!(radix_tree_is_indirect_ptr(ret)), 0))
9273 ret = ((void *)-1UL);
9274 return ret;
9275}
9276# 152 "include/linux/radix-tree.h"
9277static inline __attribute__((always_inline)) void radix_tree_replace_slot(void **pslot, void *item)
9278{
9279 do { if (__builtin_expect(!!(radix_tree_is_indirect_ptr(item)), 0)) do { asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/radix-tree.h"), "i"(154), "i"(0), "i"(sizeof(struct bug_entry))); for (;;); } while (0); } while(0);
9280 ({ if (!__builtin_constant_p(item) || ((item) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (*pslot) = (item); });
9281}
9282
9283int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
9284void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
9285void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long);
9286void *radix_tree_delete(struct radix_tree_root *, unsigned long);
9287unsigned int
9288radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
9289 unsigned long first_index, unsigned int max_items);
9290unsigned int
9291radix_tree_gang_lookup_slot(struct radix_tree_root *root, void ***results,
9292 unsigned long first_index, unsigned int max_items);
9293unsigned long radix_tree_next_hole(struct radix_tree_root *root,
9294 unsigned long index, unsigned long max_scan);
9295unsigned long radix_tree_prev_hole(struct radix_tree_root *root,
9296 unsigned long index, unsigned long max_scan);
9297int radix_tree_preload(gfp_t gfp_mask);
9298void radix_tree_init(void);
9299void *radix_tree_tag_set(struct radix_tree_root *root,
9300 unsigned long index, unsigned int tag);
9301void *radix_tree_tag_clear(struct radix_tree_root *root,
9302 unsigned long index, unsigned int tag);
9303int radix_tree_tag_get(struct radix_tree_root *root,
9304 unsigned long index, unsigned int tag);
9305unsigned int
9306radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results,
9307 unsigned long first_index, unsigned int max_items,
9308 unsigned int tag);
9309unsigned int
9310radix_tree_gang_lookup_tag_slot(struct radix_tree_root *root, void ***results,
9311 unsigned long first_index, unsigned int max_items,
9312 unsigned int tag);
9313int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag);
9314
9315static inline __attribute__((always_inline)) void radix_tree_preload_end(void)
9316{
9317 do { } while (0);
9318}
9319# 373 "include/linux/fs.h" 2
9320# 1 "include/linux/prio_tree.h" 1
9321# 14 "include/linux/prio_tree.h"
9322struct raw_prio_tree_node {
9323 struct prio_tree_node *left;
9324 struct prio_tree_node *right;
9325 struct prio_tree_node *parent;
9326};
9327
9328struct prio_tree_node {
9329 struct prio_tree_node *left;
9330 struct prio_tree_node *right;
9331 struct prio_tree_node *parent;
9332 unsigned long start;
9333 unsigned long last;
9334};
9335
9336struct prio_tree_root {
9337 struct prio_tree_node *prio_tree_node;
9338 unsigned short index_bits;
9339 unsigned short raw;
9340
9341
9342
9343
9344};
9345
9346struct prio_tree_iter {
9347 struct prio_tree_node *cur;
9348 unsigned long mask;
9349 unsigned long value;
9350 int size_level;
9351
9352 struct prio_tree_root *root;
9353 unsigned long r_index;
9354 unsigned long h_index;
9355};
9356
9357static inline __attribute__((always_inline)) void prio_tree_iter_init(struct prio_tree_iter *iter,
9358 struct prio_tree_root *root, unsigned long r_index, unsigned long h_index)
9359{
9360 iter->root = root;
9361 iter->r_index = r_index;
9362 iter->h_index = h_index;
9363 iter->cur = ((void *)0);
9364}
9365# 84 "include/linux/prio_tree.h"
9366static inline __attribute__((always_inline)) int prio_tree_empty(const struct prio_tree_root *root)
9367{
9368 return root->prio_tree_node == ((void *)0);
9369}
9370
9371static inline __attribute__((always_inline)) int prio_tree_root(const struct prio_tree_node *node)
9372{
9373 return node->parent == node;
9374}
9375
9376static inline __attribute__((always_inline)) int prio_tree_left_empty(const struct prio_tree_node *node)
9377{
9378 return node->left == node;
9379}
9380
9381static inline __attribute__((always_inline)) int prio_tree_right_empty(const struct prio_tree_node *node)
9382{
9383 return node->right == node;
9384}
9385
9386
9387struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
9388 struct prio_tree_node *old, struct prio_tree_node *node);
9389struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
9390 struct prio_tree_node *node);
9391void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node);
9392struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter);
9393# 374 "include/linux/fs.h" 2
9394
9395# 1 "include/linux/pid.h" 1
9396
9397
9398
9399
9400
9401enum pid_type
9402{
9403 PIDTYPE_PID,
9404 PIDTYPE_PGID,
9405 PIDTYPE_SID,
9406 PIDTYPE_MAX
9407};
9408# 50 "include/linux/pid.h"
9409struct upid {
9410
9411 int nr;
9412 struct pid_namespace *ns;
9413 struct hlist_node pid_chain;
9414};
9415
9416struct pid
9417{
9418 atomic_t count;
9419 unsigned int level;
9420
9421 struct hlist_head tasks[PIDTYPE_MAX];
9422 struct rcu_head rcu;
9423 struct upid numbers[1];
9424};
9425
9426extern struct pid init_struct_pid;
9427
9428struct pid_link
9429{
9430 struct hlist_node node;
9431 struct pid *pid;
9432};
9433
9434static inline __attribute__((always_inline)) struct pid *get_pid(struct pid *pid)
9435{
9436 if (pid)
9437 atomic_inc(&pid->count);
9438 return pid;
9439}
9440
9441extern void put_pid(struct pid *pid);
9442extern struct task_struct *pid_task(struct pid *pid, enum pid_type);
9443extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type);
9444
9445extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
9446
9447
9448
9449
9450
9451extern void attach_pid(struct task_struct *task, enum pid_type type,
9452 struct pid *pid);
9453extern void detach_pid(struct task_struct *task, enum pid_type);
9454extern void change_pid(struct task_struct *task, enum pid_type,
9455 struct pid *pid);
9456extern void transfer_pid(struct task_struct *old, struct task_struct *new,
9457 enum pid_type);
9458
9459struct pid_namespace;
9460extern struct pid_namespace init_pid_ns;
9461# 112 "include/linux/pid.h"
9462extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
9463extern struct pid *find_vpid(int nr);
9464
9465
9466
9467
9468extern struct pid *find_get_pid(int nr);
9469extern struct pid *find_ge_pid(int nr, struct pid_namespace *);
9470int next_pidmap(struct pid_namespace *pid_ns, int last);
9471
9472extern struct pid *alloc_pid(struct pid_namespace *ns);
9473extern void free_pid(struct pid *pid);
9474# 135 "include/linux/pid.h"
9475static inline __attribute__((always_inline)) struct pid_namespace *ns_of_pid(struct pid *pid)
9476{
9477 struct pid_namespace *ns = ((void *)0);
9478 if (pid)
9479 ns = pid->numbers[pid->level].ns;
9480 return ns;
9481}
9482# 154 "include/linux/pid.h"
9483static inline __attribute__((always_inline)) pid_t pid_nr(struct pid *pid)
9484{
9485 pid_t nr = 0;
9486 if (pid)
9487 nr = pid->numbers[0].nr;
9488 return nr;
9489}
9490
9491pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns);
9492pid_t pid_vnr(struct pid *pid);
9493# 376 "include/linux/fs.h" 2
9494
9495# 1 "include/linux/capability.h" 1
9496# 18 "include/linux/capability.h"
9497struct task_struct;
9498# 40 "include/linux/capability.h"
9499typedef struct __user_cap_header_struct {
9500 __u32 version;
9501 int pid;
9502} *cap_user_header_t;
9503
9504typedef struct __user_cap_data_struct {
9505 __u32 effective;
9506 __u32 permitted;
9507 __u32 inheritable;
9508} *cap_user_data_t;
9509# 72 "include/linux/capability.h"
9510struct vfs_cap_data {
9511 __le32 magic_etc;
9512 struct {
9513 __le32 permitted;
9514 __le32 inheritable;
9515 } data[2];
9516};
9517# 96 "include/linux/capability.h"
9518extern int file_caps_enabled;
9519
9520
9521typedef struct kernel_cap_struct {
9522 __u32 cap[2];
9523} kernel_cap_t;
9524
9525
9526struct cpu_vfs_cap_data {
9527 __u32 magic_etc;
9528 kernel_cap_t permitted;
9529 kernel_cap_t inheritable;
9530};
9531# 444 "include/linux/capability.h"
9532static inline __attribute__((always_inline)) kernel_cap_t cap_combine(const kernel_cap_t a,
9533 const kernel_cap_t b)
9534{
9535 kernel_cap_t dest;
9536 do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] | b.cap[__capi]; } } while (0);
9537 return dest;
9538}
9539
9540static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(const kernel_cap_t a,
9541 const kernel_cap_t b)
9542{
9543 kernel_cap_t dest;
9544 do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] & b.cap[__capi]; } } while (0);
9545 return dest;
9546}
9547
9548static inline __attribute__((always_inline)) kernel_cap_t cap_drop(const kernel_cap_t a,
9549 const kernel_cap_t drop)
9550{
9551 kernel_cap_t dest;
9552 do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] &~ drop.cap[__capi]; } } while (0);
9553 return dest;
9554}
9555
9556static inline __attribute__((always_inline)) kernel_cap_t cap_invert(const kernel_cap_t c)
9557{
9558 kernel_cap_t dest;
9559 do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = ~ c.cap[__capi]; } } while (0);
9560 return dest;
9561}
9562
9563static inline __attribute__((always_inline)) int cap_isclear(const kernel_cap_t a)
9564{
9565 unsigned __capi;
9566 for (__capi = 0; __capi < 2; ++__capi) {
9567 if (a.cap[__capi] != 0)
9568 return 0;
9569 }
9570 return 1;
9571}
9572# 492 "include/linux/capability.h"
9573static inline __attribute__((always_inline)) int cap_issubset(const kernel_cap_t a, const kernel_cap_t set)
9574{
9575 kernel_cap_t dest;
9576 dest = cap_drop(a, set);
9577 return cap_isclear(dest);
9578}
9579
9580
9581
9582static inline __attribute__((always_inline)) int cap_is_fs_cap(int cap)
9583{
9584 const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((9) & 31)), ((1 << ((32) & 31))) } });
9585 return !!((1 << ((cap) & 31)) & __cap_fs_set.cap[((cap) >> 5)]);
9586}
9587
9588static inline __attribute__((always_inline)) kernel_cap_t cap_drop_fs_set(const kernel_cap_t a)
9589{
9590 const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((9) & 31)), ((1 << ((32) & 31))) } });
9591 return cap_drop(a, __cap_fs_set);
9592}
9593
9594static inline __attribute__((always_inline)) kernel_cap_t cap_raise_fs_set(const kernel_cap_t a,
9595 const kernel_cap_t permitted)
9596{
9597 const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((9) & 31)), ((1 << ((32) & 31))) } });
9598 return cap_combine(a,
9599 cap_intersect(permitted, __cap_fs_set));
9600}
9601
9602static inline __attribute__((always_inline)) kernel_cap_t cap_drop_nfsd_set(const kernel_cap_t a)
9603{
9604 const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((24) & 31)), ((1 << ((32) & 31))) } });
9605 return cap_drop(a, __cap_fs_set);
9606}
9607
9608static inline __attribute__((always_inline)) kernel_cap_t cap_raise_nfsd_set(const kernel_cap_t a,
9609 const kernel_cap_t permitted)
9610{
9611 const kernel_cap_t __cap_nfsd_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((24) & 31)), ((1 << ((32) & 31))) } });
9612 return cap_combine(a,
9613 cap_intersect(permitted, __cap_nfsd_set));
9614}
9615
9616extern const kernel_cap_t __cap_empty_set;
9617extern const kernel_cap_t __cap_full_set;
9618extern const kernel_cap_t __cap_init_eff_set;
9619# 565 "include/linux/capability.h"
9620extern int capable(int cap);
9621
9622
9623struct dentry;
9624extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);
9625# 378 "include/linux/fs.h" 2
9626# 1 "include/linux/semaphore.h" 1
9627# 16 "include/linux/semaphore.h"
9628struct semaphore {
9629 spinlock_t lock;
9630 unsigned int count;
9631 struct list_head wait_list;
9632};
9633# 32 "include/linux/semaphore.h"
9634static inline __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val)
9635{
9636 static struct lock_class_key __key;
9637 *sem = (struct semaphore) { .lock = (spinlock_t) { .raw_lock = { 1 }, .magic = 0xdead4ead, .owner = ((void *)-1L), .owner_cpu = -1, .dep_map = { .name = "(*sem).lock" } }, .count = val, .wait_list = { &((*sem).wait_list), &((*sem).wait_list) }, };
9638 lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0);
9639}
9640
9641
9642
9643
9644extern void down(struct semaphore *sem);
9645extern int __attribute__((warn_unused_result)) down_interruptible(struct semaphore *sem);
9646extern int __attribute__((warn_unused_result)) down_killable(struct semaphore *sem);
9647extern int __attribute__((warn_unused_result)) down_trylock(struct semaphore *sem);
9648extern int __attribute__((warn_unused_result)) down_timeout(struct semaphore *sem, long jiffies);
9649extern void up(struct semaphore *sem);
9650# 379 "include/linux/fs.h" 2
9651# 1 "include/linux/fiemap.h" 1
9652# 16 "include/linux/fiemap.h"
9653struct fiemap_extent {
9654 __u64 fe_logical;
9655
9656 __u64 fe_physical;
9657
9658 __u64 fe_length;
9659 __u64 fe_reserved64[2];
9660 __u32 fe_flags;
9661 __u32 fe_reserved[3];
9662};
9663
9664struct fiemap {
9665 __u64 fm_start;
9666
9667 __u64 fm_length;
9668
9669 __u32 fm_flags;
9670 __u32 fm_mapped_extents;
9671 __u32 fm_extent_count;
9672 __u32 fm_reserved;
9673 struct fiemap_extent fm_extents[0];
9674};
9675# 380 "include/linux/fs.h" 2
9676
9677
9678# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/byteorder.h" 1
9679# 383 "include/linux/fs.h" 2
9680
9681struct export_operations;
9682struct hd_geometry;
9683struct iovec;
9684struct nameidata;
9685struct kiocb;
9686struct pipe_inode_info;
9687struct poll_table_struct;
9688struct kstatfs;
9689struct vm_area_struct;
9690struct vfsmount;
9691struct cred;
9692
9693extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) inode_init(void);
9694extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) inode_init_early(void);
9695extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) files_init(unsigned long);
9696
9697extern struct files_stat_struct files_stat;
9698extern int get_max_files(void);
9699extern int sysctl_nr_open;
9700extern struct inodes_stat_t inodes_stat;
9701extern int leases_enable, lease_break_time;
9702
9703extern int dir_notify_enable;
9704
9705
9706struct buffer_head;
9707typedef int (get_block_t)(struct inode *inode, sector_t iblock,
9708 struct buffer_head *bh_result, int create);
9709typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
9710 ssize_t bytes, void *private);
9711# 446 "include/linux/fs.h"
9712struct iattr {
9713 unsigned int ia_valid;
9714 umode_t ia_mode;
9715 uid_t ia_uid;
9716 gid_t ia_gid;
9717 loff_t ia_size;
9718 struct timespec ia_atime;
9719 struct timespec ia_mtime;
9720 struct timespec ia_ctime;
9721
9722
9723
9724
9725
9726
9727 struct file *ia_file;
9728};
9729
9730
9731
9732
9733# 1 "include/linux/quota.h" 1
9734# 86 "include/linux/quota.h"
9735enum {
9736 QIF_BLIMITS_B = 0,
9737 QIF_SPACE_B,
9738 QIF_ILIMITS_B,
9739 QIF_INODES_B,
9740 QIF_BTIME_B,
9741 QIF_ITIME_B,
9742};
9743# 106 "include/linux/quota.h"
9744struct if_dqblk {
9745 __u64 dqb_bhardlimit;
9746 __u64 dqb_bsoftlimit;
9747 __u64 dqb_curspace;
9748 __u64 dqb_ihardlimit;
9749 __u64 dqb_isoftlimit;
9750 __u64 dqb_curinodes;
9751 __u64 dqb_btime;
9752 __u64 dqb_itime;
9753 __u32 dqb_valid;
9754};
9755# 127 "include/linux/quota.h"
9756struct if_dqinfo {
9757 __u64 dqi_bgrace;
9758 __u64 dqi_igrace;
9759 __u32 dqi_flags;
9760 __u32 dqi_valid;
9761};
9762# 149 "include/linux/quota.h"
9763enum {
9764 QUOTA_NL_C_UNSPEC,
9765 QUOTA_NL_C_WARNING,
9766 __QUOTA_NL_C_MAX,
9767};
9768
9769
9770enum {
9771 QUOTA_NL_A_UNSPEC,
9772 QUOTA_NL_A_QTYPE,
9773 QUOTA_NL_A_EXCESS_ID,
9774 QUOTA_NL_A_WARNING,
9775 QUOTA_NL_A_DEV_MAJOR,
9776 QUOTA_NL_A_DEV_MINOR,
9777 QUOTA_NL_A_CAUSED_ID,
9778 __QUOTA_NL_A_MAX,
9779};
9780# 176 "include/linux/quota.h"
9781# 1 "include/linux/dqblk_xfs.h" 1
9782# 50 "include/linux/dqblk_xfs.h"
9783typedef struct fs_disk_quota {
9784 __s8 d_version;
9785 __s8 d_flags;
9786 __u16 d_fieldmask;
9787 __u32 d_id;
9788 __u64 d_blk_hardlimit;
9789 __u64 d_blk_softlimit;
9790 __u64 d_ino_hardlimit;
9791 __u64 d_ino_softlimit;
9792 __u64 d_bcount;
9793 __u64 d_icount;
9794 __s32 d_itimer;
9795
9796 __s32 d_btimer;
9797 __u16 d_iwarns;
9798 __u16 d_bwarns;
9799 __s32 d_padding2;
9800 __u64 d_rtb_hardlimit;
9801 __u64 d_rtb_softlimit;
9802 __u64 d_rtbcount;
9803 __s32 d_rtbtimer;
9804 __u16 d_rtbwarns;
9805 __s16 d_padding3;
9806 char d_padding4[8];
9807} fs_disk_quota_t;
9808# 137 "include/linux/dqblk_xfs.h"
9809typedef struct fs_qfilestat {
9810 __u64 qfs_ino;
9811 __u64 qfs_nblks;
9812 __u32 qfs_nextents;
9813} fs_qfilestat_t;
9814
9815typedef struct fs_quota_stat {
9816 __s8 qs_version;
9817 __u16 qs_flags;
9818 __s8 qs_pad;
9819 fs_qfilestat_t qs_uquota;
9820 fs_qfilestat_t qs_gquota;
9821 __u32 qs_incoredqs;
9822 __s32 qs_btimelimit;
9823 __s32 qs_itimelimit;
9824 __s32 qs_rtbtimelimit;
9825 __u16 qs_bwarnlimit;
9826 __u16 qs_iwarnlimit;
9827} fs_quota_stat_t;
9828# 177 "include/linux/quota.h" 2
9829# 1 "include/linux/dqblk_v1.h" 1
9830# 178 "include/linux/quota.h" 2
9831# 1 "include/linux/dqblk_v2.h" 1
9832
9833
9834
9835
9836
9837
9838
9839# 1 "include/linux/dqblk_qtree.h" 1
9840# 17 "include/linux/dqblk_qtree.h"
9841struct dquot;
9842
9843
9844struct qtree_fmt_operations {
9845 void (*mem2disk_dqblk)(void *disk, struct dquot *dquot);
9846 void (*disk2mem_dqblk)(struct dquot *dquot, void *disk);
9847 int (*is_id)(void *disk, struct dquot *dquot);
9848};
9849
9850
9851struct qtree_mem_dqinfo {
9852 struct super_block *dqi_sb;
9853 int dqi_type;
9854 unsigned int dqi_blocks;
9855 unsigned int dqi_free_blk;
9856 unsigned int dqi_free_entry;
9857 unsigned int dqi_blocksize_bits;
9858 unsigned int dqi_entry_size;
9859 unsigned int dqi_usable_bs;
9860 unsigned int dqi_qtree_depth;
9861 struct qtree_fmt_operations *dqi_ops;
9862};
9863
9864int qtree_write_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot);
9865int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot);
9866int qtree_delete_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot);
9867int qtree_release_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot);
9868int qtree_entry_unused(struct qtree_mem_dqinfo *info, char *disk);
9869static inline __attribute__((always_inline)) int qtree_depth(struct qtree_mem_dqinfo *info)
9870{
9871 unsigned int epb = info->dqi_usable_bs >> 2;
9872 unsigned long long entries = epb;
9873 int i;
9874
9875 for (i = 1; entries < (1ULL << 32); i++)
9876 entries *= epb;
9877 return i;
9878}
9879# 9 "include/linux/dqblk_v2.h" 2
9880# 179 "include/linux/quota.h" 2
9881
9882
9883
9884typedef __kernel_uid32_t qid_t;
9885typedef long long qsize_t;
9886
9887extern spinlock_t dq_data_lock;
9888# 197 "include/linux/quota.h"
9889struct mem_dqblk {
9890 qsize_t dqb_bhardlimit;
9891 qsize_t dqb_bsoftlimit;
9892 qsize_t dqb_curspace;
9893 qsize_t dqb_rsvspace;
9894 qsize_t dqb_ihardlimit;
9895 qsize_t dqb_isoftlimit;
9896 qsize_t dqb_curinodes;
9897 time_t dqb_btime;
9898 time_t dqb_itime;
9899};
9900
9901
9902
9903
9904struct quota_format_type;
9905
9906struct mem_dqinfo {
9907 struct quota_format_type *dqi_format;
9908 int dqi_fmt_id;
9909
9910 struct list_head dqi_dirty_list;
9911 unsigned long dqi_flags;
9912 unsigned int dqi_bgrace;
9913 unsigned int dqi_igrace;
9914 qsize_t dqi_maxblimit;
9915 qsize_t dqi_maxilimit;
9916 void *dqi_priv;
9917};
9918
9919struct super_block;
9920
9921
9922
9923
9924
9925extern void mark_info_dirty(struct super_block *sb, int type);
9926static inline __attribute__((always_inline)) int info_dirty(struct mem_dqinfo *info)
9927{
9928 return test_bit(16, &info->dqi_flags);
9929}
9930
9931struct dqstats {
9932 int lookups;
9933 int drops;
9934 int reads;
9935 int writes;
9936 int cache_hits;
9937 int allocated_dquots;
9938 int free_dquots;
9939 int syncs;
9940};
9941
9942extern struct dqstats dqstats;
9943# 264 "include/linux/quota.h"
9944struct dquot {
9945 struct hlist_node dq_hash;
9946 struct list_head dq_inuse;
9947 struct list_head dq_free;
9948 struct list_head dq_dirty;
9949 struct mutex dq_lock;
9950 atomic_t dq_count;
9951 wait_queue_head_t dq_wait_unused;
9952 struct super_block *dq_sb;
9953 unsigned int dq_id;
9954 loff_t dq_off;
9955 unsigned long dq_flags;
9956 short dq_type;
9957 struct mem_dqblk dq_dqb;
9958};
9959
9960
9961
9962
9963
9964struct quota_format_ops {
9965 int (*check_quota_file)(struct super_block *sb, int type);
9966 int (*read_file_info)(struct super_block *sb, int type);
9967 int (*write_file_info)(struct super_block *sb, int type);
9968 int (*free_file_info)(struct super_block *sb, int type);
9969 int (*read_dqblk)(struct dquot *dquot);
9970 int (*commit_dqblk)(struct dquot *dquot);
9971 int (*release_dqblk)(struct dquot *dquot);
9972};
9973
9974
9975struct dquot_operations {
9976 int (*initialize) (struct inode *, int);
9977 int (*drop) (struct inode *);
9978 int (*alloc_space) (struct inode *, qsize_t, int);
9979 int (*alloc_inode) (const struct inode *, qsize_t);
9980 int (*free_space) (struct inode *, qsize_t);
9981 int (*free_inode) (const struct inode *, qsize_t);
9982 int (*transfer) (struct inode *, struct iattr *);
9983 int (*write_dquot) (struct dquot *);
9984 struct dquot *(*alloc_dquot)(struct super_block *, int);
9985 void (*destroy_dquot)(struct dquot *);
9986 int (*acquire_dquot) (struct dquot *);
9987 int (*release_dquot) (struct dquot *);
9988 int (*mark_dirty) (struct dquot *);
9989 int (*write_info) (struct super_block *, int);
9990
9991 int (*reserve_space) (struct inode *, qsize_t, int);
9992
9993 int (*claim_space) (struct inode *, qsize_t);
9994
9995 void (*release_rsv) (struct inode *, qsize_t);
9996
9997 qsize_t (*get_reserved_space) (struct inode *);
9998};
9999
10000
10001struct quotactl_ops {
10002 int (*quota_on)(struct super_block *, int, int, char *, int);
10003 int (*quota_off)(struct super_block *, int, int);
10004 int (*quota_sync)(struct super_block *, int);
10005 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
10006 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
10007 int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
10008 int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
10009 int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
10010 int (*set_xstate)(struct super_block *, unsigned int, int);
10011 int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
10012 int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
10013};
10014
10015struct quota_format_type {
10016 int qf_fmt_id;
10017 struct quota_format_ops *qf_ops;
10018 struct module *qf_owner;
10019 struct quota_format_type *qf_next;
10020};
10021
10022
10023enum {
10024 _DQUOT_USAGE_ENABLED = 0,
10025 _DQUOT_LIMITS_ENABLED,
10026 _DQUOT_SUSPENDED,
10027
10028
10029 _DQUOT_STATE_FLAGS
10030};
10031# 365 "include/linux/quota.h"
10032static inline __attribute__((always_inline)) unsigned int dquot_state_flag(unsigned int flags, int type)
10033{
10034 if (type == 0)
10035 return flags;
10036 return flags << _DQUOT_STATE_FLAGS;
10037}
10038
10039static inline __attribute__((always_inline)) unsigned int dquot_generic_flag(unsigned int flags, int type)
10040{
10041 if (type == 0)
10042 return flags;
10043 return flags >> _DQUOT_STATE_FLAGS;
10044}
10045
10046struct quota_info {
10047 unsigned int flags;
10048 struct mutex dqio_mutex;
10049 struct mutex dqonoff_mutex;
10050 struct rw_semaphore dqptr_sem;
10051 struct inode *files[2];
10052 struct mem_dqinfo info[2];
10053 struct quota_format_ops *ops[2];
10054};
10055
10056int register_quota_format(struct quota_format_type *fmt);
10057void unregister_quota_format(struct quota_format_type *fmt);
10058
10059struct quota_module_name {
10060 int qm_fmt_id;
10061 char *qm_mod_name;
10062};
10063# 468 "include/linux/fs.h" 2
10064# 495 "include/linux/fs.h"
10065enum positive_aop_returns {
10066 AOP_WRITEPAGE_ACTIVATE = 0x80000,
10067 AOP_TRUNCATED_PAGE = 0x80001,
10068};
10069# 509 "include/linux/fs.h"
10070struct page;
10071struct address_space;
10072struct writeback_control;
10073
10074struct iov_iter {
10075 const struct iovec *iov;
10076 unsigned long nr_segs;
10077 size_t iov_offset;
10078 size_t count;
10079};
10080
10081size_t iov_iter_copy_from_user_atomic(struct page *page,
10082 struct iov_iter *i, unsigned long offset, size_t bytes);
10083size_t iov_iter_copy_from_user(struct page *page,
10084 struct iov_iter *i, unsigned long offset, size_t bytes);
10085void iov_iter_advance(struct iov_iter *i, size_t bytes);
10086int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes);
10087size_t iov_iter_single_seg_count(struct iov_iter *i);
10088
10089static inline __attribute__((always_inline)) void iov_iter_init(struct iov_iter *i,
10090 const struct iovec *iov, unsigned long nr_segs,
10091 size_t count, size_t written)
10092{
10093 i->iov = iov;
10094 i->nr_segs = nr_segs;
10095 i->iov_offset = 0;
10096 i->count = count + written;
10097
10098 iov_iter_advance(i, written);
10099}
10100
10101static inline __attribute__((always_inline)) size_t iov_iter_count(struct iov_iter *i)
10102{
10103 return i->count;
10104}
10105# 554 "include/linux/fs.h"
10106typedef struct {
10107 size_t written;
10108 size_t count;
10109 union {
10110 char *buf;
10111 void *data;
10112 } arg;
10113 int error;
10114} read_descriptor_t;
10115
10116typedef int (*read_actor_t)(read_descriptor_t *, struct page *,
10117 unsigned long, unsigned long);
10118
10119struct address_space_operations {
10120 int (*writepage)(struct page *page, struct writeback_control *wbc);
10121 int (*readpage)(struct file *, struct page *);
10122 void (*sync_page)(struct page *);
10123
10124
10125 int (*writepages)(struct address_space *, struct writeback_control *);
10126
10127
10128 int (*set_page_dirty)(struct page *page);
10129
10130 int (*readpages)(struct file *filp, struct address_space *mapping,
10131 struct list_head *pages, unsigned nr_pages);
10132
10133 int (*write_begin)(struct file *, struct address_space *mapping,
10134 loff_t pos, unsigned len, unsigned flags,
10135 struct page **pagep, void **fsdata);
10136 int (*write_end)(struct file *, struct address_space *mapping,
10137 loff_t pos, unsigned len, unsigned copied,
10138 struct page *page, void *fsdata);
10139
10140
10141 sector_t (*bmap)(struct address_space *, sector_t);
10142 void (*invalidatepage) (struct page *, unsigned long);
10143 int (*releasepage) (struct page *, gfp_t);
10144 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
10145 loff_t offset, unsigned long nr_segs);
10146 int (*get_xip_mem)(struct address_space *, unsigned long, int,
10147 void **, unsigned long *);
10148
10149 int (*migratepage) (struct address_space *,
10150 struct page *, struct page *);
10151 int (*launder_page) (struct page *);
10152 int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
10153 unsigned long);
10154 int (*error_remove_page)(struct address_space *, struct page *);
10155};
10156
10157
10158
10159
10160
10161int pagecache_write_begin(struct file *, struct address_space *mapping,
10162 loff_t pos, unsigned len, unsigned flags,
10163 struct page **pagep, void **fsdata);
10164
10165int pagecache_write_end(struct file *, struct address_space *mapping,
10166 loff_t pos, unsigned len, unsigned copied,
10167 struct page *page, void *fsdata);
10168
10169struct backing_dev_info;
10170struct address_space {
10171 struct inode *host;
10172 struct radix_tree_root page_tree;
10173 spinlock_t tree_lock;
10174 unsigned int i_mmap_writable;
10175 struct prio_tree_root i_mmap;
10176 struct list_head i_mmap_nonlinear;
10177 spinlock_t i_mmap_lock;
10178 unsigned int truncate_count;
10179 unsigned long nrpages;
10180 unsigned long writeback_index;
10181 const struct address_space_operations *a_ops;
10182 unsigned long flags;
10183 struct backing_dev_info *backing_dev_info;
10184 spinlock_t private_lock;
10185 struct list_head private_list;
10186 struct address_space *assoc_mapping;
10187} __attribute__((aligned(sizeof(long))));
10188
10189
10190
10191
10192
10193
10194struct block_device {
10195 dev_t bd_dev;
10196 struct inode * bd_inode;
10197 struct super_block * bd_super;
10198 int bd_openers;
10199 struct mutex bd_mutex;
10200 struct list_head bd_inodes;
10201 void * bd_holder;
10202 int bd_holders;
10203
10204 struct list_head bd_holder_list;
10205
10206 struct block_device * bd_contains;
10207 unsigned bd_block_size;
10208 struct hd_struct * bd_part;
10209
10210 unsigned bd_part_count;
10211 int bd_invalidated;
10212 struct gendisk * bd_disk;
10213 struct list_head bd_list;
10214
10215
10216
10217
10218
10219
10220 unsigned long bd_private;
10221
10222
10223 int bd_fsfreeze_count;
10224
10225 struct mutex bd_fsfreeze_mutex;
10226};
10227# 683 "include/linux/fs.h"
10228int mapping_tagged(struct address_space *mapping, int tag);
10229
10230
10231
10232
10233static inline __attribute__((always_inline)) int mapping_mapped(struct address_space *mapping)
10234{
10235 return !prio_tree_empty(&mapping->i_mmap) ||
10236 !list_empty(&mapping->i_mmap_nonlinear);
10237}
10238
10239
10240
10241
10242
10243
10244
10245static inline __attribute__((always_inline)) int mapping_writably_mapped(struct address_space *mapping)
10246{
10247 return mapping->i_mmap_writable != 0;
10248}
10249# 716 "include/linux/fs.h"
10250struct posix_acl;
10251
10252
10253struct inode {
10254 struct hlist_node i_hash;
10255 struct list_head i_list;
10256 struct list_head i_sb_list;
10257 struct list_head i_dentry;
10258 unsigned long i_ino;
10259 atomic_t i_count;
10260 unsigned int i_nlink;
10261 uid_t i_uid;
10262 gid_t i_gid;
10263 dev_t i_rdev;
10264 u64 i_version;
10265 loff_t i_size;
10266
10267
10268
10269 struct timespec i_atime;
10270 struct timespec i_mtime;
10271 struct timespec i_ctime;
10272 blkcnt_t i_blocks;
10273 unsigned int i_blkbits;
10274 unsigned short i_bytes;
10275 umode_t i_mode;
10276 spinlock_t i_lock;
10277 struct mutex i_mutex;
10278 struct rw_semaphore i_alloc_sem;
10279 const struct inode_operations *i_op;
10280 const struct file_operations *i_fop;
10281 struct super_block *i_sb;
10282 struct file_lock *i_flock;
10283 struct address_space *i_mapping;
10284 struct address_space i_data;
10285
10286 struct dquot *i_dquot[2];
10287
10288 struct list_head i_devices;
10289 union {
10290 struct pipe_inode_info *i_pipe;
10291 struct block_device *i_bdev;
10292 struct cdev *i_cdev;
10293 };
10294
10295 __u32 i_generation;
10296
10297
10298 __u32 i_fsnotify_mask;
10299 struct hlist_head i_fsnotify_mark_entries;
10300
10301
10302
10303 struct list_head inotify_watches;
10304 struct mutex inotify_mutex;
10305
10306
10307 unsigned long i_state;
10308 unsigned long dirtied_when;
10309
10310 unsigned int i_flags;
10311
10312 atomic_t i_writecount;
10313
10314 void *i_security;
10315
10316
10317 struct posix_acl *i_acl;
10318 struct posix_acl *i_default_acl;
10319
10320 void *i_private;
10321};
10322# 800 "include/linux/fs.h"
10323enum inode_i_mutex_lock_class
10324{
10325 I_MUTEX_NORMAL,
10326 I_MUTEX_PARENT,
10327 I_MUTEX_CHILD,
10328 I_MUTEX_XATTR,
10329 I_MUTEX_QUOTA
10330};
10331# 819 "include/linux/fs.h"
10332static inline __attribute__((always_inline)) loff_t i_size_read(const struct inode *inode)
10333{
10334# 838 "include/linux/fs.h"
10335 return inode->i_size;
10336
10337}
10338
10339
10340
10341
10342
10343
10344static inline __attribute__((always_inline)) void i_size_write(struct inode *inode, loff_t i_size)
10345{
10346# 858 "include/linux/fs.h"
10347 inode->i_size = i_size;
10348
10349}
10350
10351static inline __attribute__((always_inline)) unsigned iminor(const struct inode *inode)
10352{
10353 return ((unsigned int) ((inode->i_rdev) & ((1U << 20) - 1)));
10354}
10355
10356static inline __attribute__((always_inline)) unsigned imajor(const struct inode *inode)
10357{
10358 return ((unsigned int) ((inode->i_rdev) >> 20));
10359}
10360
10361extern struct block_device *I_BDEV(struct inode *inode);
10362
10363struct fown_struct {
10364 rwlock_t lock;
10365 struct pid *pid;
10366 enum pid_type pid_type;
10367 uid_t uid, euid;
10368 int signum;
10369};
10370
10371
10372
10373
10374struct file_ra_state {
10375 unsigned long start;
10376 unsigned int size;
10377 unsigned int async_size;
10378
10379
10380 unsigned int ra_pages;
10381 unsigned int mmap_miss;
10382 loff_t prev_pos;
10383};
10384
10385
10386
10387
10388static inline __attribute__((always_inline)) int ra_has_index(struct file_ra_state *ra, unsigned long index)
10389{
10390 return (index >= ra->start &&
10391 index < ra->start + ra->size);
10392}
10393
10394
10395
10396
10397struct file {
10398
10399
10400
10401
10402 union {
10403 struct list_head fu_list;
10404 struct rcu_head fu_rcuhead;
10405 } f_u;
10406 struct path f_path;
10407
10408
10409 const struct file_operations *f_op;
10410 spinlock_t f_lock;
10411 atomic_long_t f_count;
10412 unsigned int f_flags;
10413 fmode_t f_mode;
10414 loff_t f_pos;
10415 struct fown_struct f_owner;
10416 const struct cred *f_cred;
10417 struct file_ra_state f_ra;
10418
10419 u64 f_version;
10420
10421 void *f_security;
10422
10423
10424 void *private_data;
10425
10426
10427
10428 struct list_head f_ep_links;
10429
10430 struct address_space *f_mapping;
10431
10432 unsigned long f_mnt_write_state;
10433
10434};
10435extern spinlock_t files_lock;
10436
10437
10438
10439
10440
10441
10442
10443static inline __attribute__((always_inline)) void file_take_write(struct file *f)
10444{
10445 ({ int __ret_warn_on = !!(f->f_mnt_write_state != 0); if (__builtin_expect(!!(__ret_warn_on), 0)) asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/fs.h"), "i"(956), "i"((1<<0)), "i"(sizeof(struct bug_entry))); __builtin_expect(!!(__ret_warn_on), 0); });
10446 f->f_mnt_write_state = 1;
10447}
10448static inline __attribute__((always_inline)) void file_release_write(struct file *f)
10449{
10450 f->f_mnt_write_state |= 2;
10451}
10452static inline __attribute__((always_inline)) void file_reset_write(struct file *f)
10453{
10454 f->f_mnt_write_state = 0;
10455}
10456static inline __attribute__((always_inline)) void file_check_state(struct file *f)
10457{
10458
10459
10460
10461
10462 ({ int __ret_warn_on = !!(f->f_mnt_write_state == 1); if (__builtin_expect(!!(__ret_warn_on), 0)) asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/fs.h"), "i"(973), "i"((1<<0)), "i"(sizeof(struct bug_entry))); __builtin_expect(!!(__ret_warn_on), 0); });
10463 ({ int __ret_warn_on = !!(f->f_mnt_write_state == 2); if (__builtin_expect(!!(__ret_warn_on), 0)) asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/fs.h"), "i"(974), "i"((1<<0)), "i"(sizeof(struct bug_entry))); __builtin_expect(!!(__ret_warn_on), 0); });
10464}
10465static inline __attribute__((always_inline)) int file_check_writeable(struct file *f)
10466{
10467 if (f->f_mnt_write_state == 1)
10468 return 0;
10469 printk("<4>" "writeable file with no "
10470 "mnt_want_write()\n");
10471 ({ int __ret_warn_on = !!(1); if (__builtin_expect(!!(__ret_warn_on), 0)) asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/fs.h"), "i"(982), "i"((1<<0)), "i"(sizeof(struct bug_entry))); __builtin_expect(!!(__ret_warn_on), 0); });
10472 return -22;
10473}
10474# 1027 "include/linux/fs.h"
10475typedef struct files_struct *fl_owner_t;
10476
10477struct file_lock_operations {
10478 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
10479 void (*fl_release_private)(struct file_lock *);
10480};
10481
10482struct lock_manager_operations {
10483 int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
10484 void (*fl_notify)(struct file_lock *);
10485 int (*fl_grant)(struct file_lock *, struct file_lock *, int);
10486 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
10487 void (*fl_release_private)(struct file_lock *);
10488 void (*fl_break)(struct file_lock *);
10489 int (*fl_mylease)(struct file_lock *, struct file_lock *);
10490 int (*fl_change)(struct file_lock **, int);
10491};
10492
10493struct lock_manager {
10494 struct list_head list;
10495};
10496
10497void locks_start_grace(struct lock_manager *);
10498void locks_end_grace(struct lock_manager *);
10499int locks_in_grace(void);
10500
10501
10502# 1 "include/linux/nfs_fs_i.h" 1
10503
10504
10505
10506# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/types.h" 1
10507# 5 "include/linux/nfs_fs_i.h" 2
10508
10509# 1 "include/linux/nfs.h" 1
10510# 40 "include/linux/nfs.h"
10511 enum nfs_stat {
10512 NFS_OK = 0,
10513 NFSERR_PERM = 1,
10514 NFSERR_NOENT = 2,
10515 NFSERR_IO = 5,
10516 NFSERR_NXIO = 6,
10517 NFSERR_EAGAIN = 11,
10518 NFSERR_ACCES = 13,
10519 NFSERR_EXIST = 17,
10520 NFSERR_XDEV = 18,
10521 NFSERR_NODEV = 19,
10522 NFSERR_NOTDIR = 20,
10523 NFSERR_ISDIR = 21,
10524 NFSERR_INVAL = 22,
10525 NFSERR_FBIG = 27,
10526 NFSERR_NOSPC = 28,
10527 NFSERR_ROFS = 30,
10528 NFSERR_MLINK = 31,
10529 NFSERR_OPNOTSUPP = 45,
10530 NFSERR_NAMETOOLONG = 63,
10531 NFSERR_NOTEMPTY = 66,
10532 NFSERR_DQUOT = 69,
10533 NFSERR_STALE = 70,
10534 NFSERR_REMOTE = 71,
10535 NFSERR_WFLUSH = 99,
10536 NFSERR_BADHANDLE = 10001,
10537 NFSERR_NOT_SYNC = 10002,
10538 NFSERR_BAD_COOKIE = 10003,
10539 NFSERR_NOTSUPP = 10004,
10540 NFSERR_TOOSMALL = 10005,
10541 NFSERR_SERVERFAULT = 10006,
10542 NFSERR_BADTYPE = 10007,
10543 NFSERR_JUKEBOX = 10008,
10544 NFSERR_SAME = 10009,
10545 NFSERR_DENIED = 10010,
10546 NFSERR_EXPIRED = 10011,
10547 NFSERR_LOCKED = 10012,
10548 NFSERR_GRACE = 10013,
10549 NFSERR_FHEXPIRED = 10014,
10550 NFSERR_SHARE_DENIED = 10015,
10551 NFSERR_WRONGSEC = 10016,
10552 NFSERR_CLID_INUSE = 10017,
10553 NFSERR_RESOURCE = 10018,
10554 NFSERR_MOVED = 10019,
10555 NFSERR_NOFILEHANDLE = 10020,
10556 NFSERR_MINOR_VERS_MISMATCH = 10021,
10557 NFSERR_STALE_CLIENTID = 10022,
10558 NFSERR_STALE_STATEID = 10023,
10559 NFSERR_OLD_STATEID = 10024,
10560 NFSERR_BAD_STATEID = 10025,
10561 NFSERR_BAD_SEQID = 10026,
10562 NFSERR_NOT_SAME = 10027,
10563 NFSERR_LOCK_RANGE = 10028,
10564 NFSERR_SYMLINK = 10029,
10565 NFSERR_RESTOREFH = 10030,
10566 NFSERR_LEASE_MOVED = 10031,
10567 NFSERR_ATTRNOTSUPP = 10032,
10568 NFSERR_NO_GRACE = 10033,
10569 NFSERR_RECLAIM_BAD = 10034,
10570 NFSERR_RECLAIM_CONFLICT = 10035,
10571 NFSERR_BAD_XDR = 10036,
10572 NFSERR_LOCKS_HELD = 10037,
10573 NFSERR_OPENMODE = 10038,
10574 NFSERR_BADOWNER = 10039,
10575 NFSERR_BADCHAR = 10040,
10576 NFSERR_BADNAME = 10041,
10577 NFSERR_BAD_RANGE = 10042,
10578 NFSERR_LOCK_NOTSUPP = 10043,
10579 NFSERR_OP_ILLEGAL = 10044,
10580 NFSERR_DEADLOCK = 10045,
10581 NFSERR_FILE_OPEN = 10046,
10582 NFSERR_ADMIN_REVOKED = 10047,
10583 NFSERR_CB_PATH_DOWN = 10048,
10584};
10585
10586
10587
10588enum nfs_ftype {
10589 NFNON = 0,
10590 NFREG = 1,
10591 NFDIR = 2,
10592 NFBLK = 3,
10593 NFCHR = 4,
10594 NFLNK = 5,
10595 NFSOCK = 6,
10596 NFBAD = 7,
10597 NFFIFO = 8
10598};
10599
10600
10601# 1 "include/linux/sunrpc/msg_prot.h" 1
10602# 18 "include/linux/sunrpc/msg_prot.h"
10603typedef u32 rpc_authflavor_t;
10604
10605enum rpc_auth_flavors {
10606 RPC_AUTH_NULL = 0,
10607 RPC_AUTH_UNIX = 1,
10608 RPC_AUTH_SHORT = 2,
10609 RPC_AUTH_DES = 3,
10610 RPC_AUTH_KRB = 4,
10611 RPC_AUTH_GSS = 6,
10612 RPC_AUTH_MAXFLAVOR = 8,
10613
10614 RPC_AUTH_GSS_KRB5 = 390003,
10615 RPC_AUTH_GSS_KRB5I = 390004,
10616 RPC_AUTH_GSS_KRB5P = 390005,
10617 RPC_AUTH_GSS_LKEY = 390006,
10618 RPC_AUTH_GSS_LKEYI = 390007,
10619 RPC_AUTH_GSS_LKEYP = 390008,
10620 RPC_AUTH_GSS_SPKM = 390009,
10621 RPC_AUTH_GSS_SPKMI = 390010,
10622 RPC_AUTH_GSS_SPKMP = 390011,
10623};
10624
10625
10626
10627
10628enum rpc_msg_type {
10629 RPC_CALL = 0,
10630 RPC_REPLY = 1
10631};
10632
10633enum rpc_reply_stat {
10634 RPC_MSG_ACCEPTED = 0,
10635 RPC_MSG_DENIED = 1
10636};
10637
10638enum rpc_accept_stat {
10639 RPC_SUCCESS = 0,
10640 RPC_PROG_UNAVAIL = 1,
10641 RPC_PROG_MISMATCH = 2,
10642 RPC_PROC_UNAVAIL = 3,
10643 RPC_GARBAGE_ARGS = 4,
10644 RPC_SYSTEM_ERR = 5,
10645
10646 RPC_DROP_REPLY = 60000,
10647};
10648
10649enum rpc_reject_stat {
10650 RPC_MISMATCH = 0,
10651 RPC_AUTH_ERROR = 1
10652};
10653
10654enum rpc_auth_stat {
10655 RPC_AUTH_OK = 0,
10656 RPC_AUTH_BADCRED = 1,
10657 RPC_AUTH_REJECTEDCRED = 2,
10658 RPC_AUTH_BADVERF = 3,
10659 RPC_AUTH_REJECTEDVERF = 4,
10660 RPC_AUTH_TOOWEAK = 5,
10661
10662 RPCSEC_GSS_CREDPROBLEM = 13,
10663 RPCSEC_GSS_CTXPROBLEM = 14
10664};
10665# 102 "include/linux/sunrpc/msg_prot.h"
10666typedef __be32 rpc_fraghdr;
10667# 193 "include/linux/sunrpc/msg_prot.h"
10668# 1 "include/linux/inet.h" 1
10669# 54 "include/linux/inet.h"
10670extern __be32 in_aton(const char *str);
10671extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
10672extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
10673# 194 "include/linux/sunrpc/msg_prot.h" 2
10674# 131 "include/linux/nfs.h" 2
10675
10676
10677
10678
10679
10680
10681struct nfs_fh {
10682 unsigned short size;
10683 unsigned char data[128];
10684};
10685
10686
10687
10688
10689
10690static inline __attribute__((always_inline)) int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
10691{
10692 return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
10693}
10694
10695static inline __attribute__((always_inline)) void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
10696{
10697 target->size = source->size;
10698 memcpy(target->data, source->data, source->size);
10699}
10700# 165 "include/linux/nfs.h"
10701enum nfs3_stable_how {
10702 NFS_UNSTABLE = 0,
10703 NFS_DATA_SYNC = 1,
10704 NFS_FILE_SYNC = 2
10705};
10706# 7 "include/linux/nfs_fs_i.h" 2
10707
10708struct nlm_lockowner;
10709
10710
10711
10712
10713struct nfs_lock_info {
10714 u32 state;
10715 struct nlm_lockowner *owner;
10716 struct list_head list;
10717};
10718
10719struct nfs4_lock_state;
10720struct nfs4_lock_info {
10721 struct nfs4_lock_state *owner;
10722};
10723# 1055 "include/linux/fs.h" 2
10724
10725struct file_lock {
10726 struct file_lock *fl_next;
10727 struct list_head fl_link;
10728 struct list_head fl_block;
10729 fl_owner_t fl_owner;
10730 unsigned char fl_flags;
10731 unsigned char fl_type;
10732 unsigned int fl_pid;
10733 struct pid *fl_nspid;
10734 wait_queue_head_t fl_wait;
10735 struct file *fl_file;
10736 loff_t fl_start;
10737 loff_t fl_end;
10738
10739 struct fasync_struct * fl_fasync;
10740 unsigned long fl_break_time;
10741
10742 const struct file_lock_operations *fl_ops;
10743 const struct lock_manager_operations *fl_lmops;
10744 union {
10745 struct nfs_lock_info nfs_fl;
10746 struct nfs4_lock_info nfs4_fl;
10747 struct {
10748 struct list_head link;
10749 int state;
10750 } afs;
10751 } fl_u;
10752};
10753# 1092 "include/linux/fs.h"
10754# 1 "include/linux/fcntl.h" 1
10755
10756
10757
10758# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/fcntl.h" 1
10759# 17 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/fcntl.h"
10760# 1 "include/asm-generic/fcntl.h" 1
10761# 94 "include/asm-generic/fcntl.h"
10762struct f_owner_ex {
10763 int type;
10764 pid_t pid;
10765};
10766# 139 "include/asm-generic/fcntl.h"
10767struct flock {
10768 short l_type;
10769 short l_whence;
10770 __kernel_off_t l_start;
10771 __kernel_off_t l_len;
10772 __kernel_pid_t l_pid;
10773
10774};
10775# 156 "include/asm-generic/fcntl.h"
10776struct flock64 {
10777 short l_type;
10778 short l_whence;
10779 __kernel_loff_t l_start;
10780 __kernel_loff_t l_len;
10781 __kernel_pid_t l_pid;
10782
10783};
10784# 18 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/fcntl.h" 2
10785# 5 "include/linux/fcntl.h" 2
10786# 1093 "include/linux/fs.h" 2
10787
10788extern void send_sigio(struct fown_struct *fown, int fd, int band);
10789
10790
10791extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
10792 loff_t endbyte, unsigned int flags);
10793
10794
10795extern int fcntl_getlk(struct file *, struct flock *);
10796extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
10797 struct flock *);
10798
10799
10800extern int fcntl_getlk64(struct file *, struct flock64 *);
10801extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
10802 struct flock64 *);
10803
10804
10805extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg);
10806extern int fcntl_getlease(struct file *filp);
10807
10808
10809extern void locks_init_lock(struct file_lock *);
10810extern void locks_copy_lock(struct file_lock *, struct file_lock *);
10811extern void __locks_copy_lock(struct file_lock *, const struct file_lock *);
10812extern void locks_remove_posix(struct file *, fl_owner_t);
10813extern void locks_remove_flock(struct file *);
10814extern void locks_release_private(struct file_lock *);
10815extern void posix_test_lock(struct file *, struct file_lock *);
10816extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *);
10817extern int posix_lock_file_wait(struct file *, struct file_lock *);
10818extern int posix_unblock_lock(struct file *, struct file_lock *);
10819extern int vfs_test_lock(struct file *, struct file_lock *);
10820extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *);
10821extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl);
10822extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
10823extern int __break_lease(struct inode *inode, unsigned int flags);
10824extern void lease_get_mtime(struct inode *, struct timespec *time);
10825extern int generic_setlease(struct file *, long, struct file_lock **);
10826extern int vfs_setlease(struct file *, long, struct file_lock **);
10827extern int lease_modify(struct file_lock **, int);
10828extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
10829extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
10830# 1281 "include/linux/fs.h"
10831struct fasync_struct {
10832 int magic;
10833 int fa_fd;
10834 struct fasync_struct *fa_next;
10835 struct file *fa_file;
10836};
10837
10838
10839
10840
10841extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
10842
10843extern void kill_fasync(struct fasync_struct **, int, int);
10844
10845extern void __kill_fasync(struct fasync_struct *, int, int);
10846
10847extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
10848extern int f_setown(struct file *filp, unsigned long arg, int force);
10849extern void f_delown(struct file *filp);
10850extern pid_t f_getown(struct file *filp);
10851extern int send_sigurg(struct fown_struct *fown);
10852# 1311 "include/linux/fs.h"
10853extern struct list_head super_blocks;
10854extern spinlock_t sb_lock;
10855
10856
10857
10858struct super_block {
10859 struct list_head s_list;
10860 dev_t s_dev;
10861 unsigned long s_blocksize;
10862 unsigned char s_blocksize_bits;
10863 unsigned char s_dirt;
10864 loff_t s_maxbytes;
10865 struct file_system_type *s_type;
10866 const struct super_operations *s_op;
10867 const struct dquot_operations *dq_op;
10868 const struct quotactl_ops *s_qcop;
10869 const struct export_operations *s_export_op;
10870 unsigned long s_flags;
10871 unsigned long s_magic;
10872 struct dentry *s_root;
10873 struct rw_semaphore s_umount;
10874 struct mutex s_lock;
10875 int s_count;
10876 int s_need_sync;
10877 atomic_t s_active;
10878
10879 void *s_security;
10880
10881 struct xattr_handler **s_xattr;
10882
10883 struct list_head s_inodes;
10884 struct hlist_head s_anon;
10885 struct list_head s_files;
10886
10887 struct list_head s_dentry_lru;
10888 int s_nr_dentry_unused;
10889
10890 struct block_device *s_bdev;
10891 struct backing_dev_info *s_bdi;
10892 struct mtd_info *s_mtd;
10893 struct list_head s_instances;
10894 struct quota_info s_dquot;
10895
10896 int s_frozen;
10897 wait_queue_head_t s_wait_unfrozen;
10898
10899 char s_id[32];
10900
10901 void *s_fs_info;
10902 fmode_t s_mode;
10903
10904
10905
10906
10907
10908 struct mutex s_vfs_rename_mutex;
10909
10910
10911
10912 u32 s_time_gran;
10913
10914
10915
10916
10917
10918 char *s_subtype;
10919
10920
10921
10922
10923
10924 char *s_options;
10925};
10926
10927extern struct timespec current_fs_time(struct super_block *sb);
10928
10929
10930
10931
10932enum {
10933 SB_UNFROZEN = 0,
10934 SB_FREEZE_WRITE = 1,
10935 SB_FREEZE_TRANS = 2,
10936};
10937# 1407 "include/linux/fs.h"
10938extern void lock_super(struct super_block *);
10939extern void unlock_super(struct super_block *);
10940
10941
10942
10943
10944extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
10945extern int vfs_mkdir(struct inode *, struct dentry *, int);
10946extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
10947extern int vfs_symlink(struct inode *, struct dentry *, const char *);
10948extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
10949extern int vfs_rmdir(struct inode *, struct dentry *);
10950extern int vfs_unlink(struct inode *, struct dentry *);
10951extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
10952
10953
10954
10955
10956extern void dentry_unhash(struct dentry *dentry);
10957
10958
10959
10960
10961extern int file_permission(struct file *, int);
10962
10963
10964
10965
10966struct fiemap_extent_info {
10967 unsigned int fi_flags;
10968 unsigned int fi_extents_mapped;
10969 unsigned int fi_extents_max;
10970 struct fiemap_extent *fi_extents_start;
10971
10972};
10973int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
10974 u64 phys, u64 len, u32 flags);
10975int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
10976# 1468 "include/linux/fs.h"
10977typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
10978struct block_device_operations;
10979# 1482 "include/linux/fs.h"
10980struct file_operations {
10981 struct module *owner;
10982 loff_t (*llseek) (struct file *, loff_t, int);
10983 ssize_t (*read) (struct file *, char *, size_t, loff_t *);
10984 ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
10985 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
10986 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
10987 int (*readdir) (struct file *, void *, filldir_t);
10988 unsigned int (*poll) (struct file *, struct poll_table_struct *);
10989 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
10990 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
10991 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
10992 int (*mmap) (struct file *, struct vm_area_struct *);
10993 int (*open) (struct inode *, struct file *);
10994 int (*flush) (struct file *, fl_owner_t id);
10995 int (*release) (struct inode *, struct file *);
10996 int (*fsync) (struct file *, struct dentry *, int datasync);
10997 int (*aio_fsync) (struct kiocb *, int datasync);
10998 int (*fasync) (int, struct file *, int);
10999 int (*lock) (struct file *, int, struct file_lock *);
11000 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
11001 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
11002 int (*check_flags)(int);
11003 int (*flock) (struct file *, int, struct file_lock *);
11004 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
11005 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
11006 int (*setlease)(struct file *, long, struct file_lock **);
11007};
11008
11009struct inode_operations {
11010 int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
11011 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
11012 int (*link) (struct dentry *,struct inode *,struct dentry *);
11013 int (*unlink) (struct inode *,struct dentry *);
11014 int (*symlink) (struct inode *,struct dentry *,const char *);
11015 int (*mkdir) (struct inode *,struct dentry *,int);
11016 int (*rmdir) (struct inode *,struct dentry *);
11017 int (*mknod) (struct inode *,struct dentry *,int,dev_t);
11018 int (*rename) (struct inode *, struct dentry *,
11019 struct inode *, struct dentry *);
11020 int (*readlink) (struct dentry *, char *,int);
11021 void * (*follow_link) (struct dentry *, struct nameidata *);
11022 void (*put_link) (struct dentry *, struct nameidata *, void *);
11023 void (*truncate) (struct inode *);
11024 int (*permission) (struct inode *, int);
11025 int (*check_acl)(struct inode *, int);
11026 int (*setattr) (struct dentry *, struct iattr *);
11027 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
11028 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
11029 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
11030 ssize_t (*listxattr) (struct dentry *, char *, size_t);
11031 int (*removexattr) (struct dentry *, const char *);
11032 void (*truncate_range)(struct inode *, loff_t, loff_t);
11033 long (*fallocate)(struct inode *inode, int mode, loff_t offset,
11034 loff_t len);
11035 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
11036 u64 len);
11037};
11038
11039struct seq_file;
11040
11041ssize_t rw_copy_check_uvector(int type, const struct iovec * uvector,
11042 unsigned long nr_segs, unsigned long fast_segs,
11043 struct iovec *fast_pointer,
11044 struct iovec **ret_pointer);
11045
11046extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *);
11047extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *);
11048extern ssize_t vfs_readv(struct file *, const struct iovec *,
11049 unsigned long, loff_t *);
11050extern ssize_t vfs_writev(struct file *, const struct iovec *,
11051 unsigned long, loff_t *);
11052
11053struct super_operations {
11054 struct inode *(*alloc_inode)(struct super_block *sb);
11055 void (*destroy_inode)(struct inode *);
11056
11057 void (*dirty_inode) (struct inode *);
11058 int (*write_inode) (struct inode *, int);
11059 void (*drop_inode) (struct inode *);
11060 void (*delete_inode) (struct inode *);
11061 void (*put_super) (struct super_block *);
11062 void (*write_super) (struct super_block *);
11063 int (*sync_fs)(struct super_block *sb, int wait);
11064 int (*freeze_fs) (struct super_block *);
11065 int (*unfreeze_fs) (struct super_block *);
11066 int (*statfs) (struct dentry *, struct kstatfs *);
11067 int (*remount_fs) (struct super_block *, int *, char *);
11068 void (*clear_inode) (struct inode *);
11069 void (*umount_begin) (struct super_block *);
11070
11071 int (*show_options)(struct seq_file *, struct vfsmount *);
11072 int (*show_stats)(struct seq_file *, struct vfsmount *);
11073
11074 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
11075 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
11076
11077 int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
11078};
11079# 1649 "include/linux/fs.h"
11080extern void __mark_inode_dirty(struct inode *, int);
11081static inline __attribute__((always_inline)) void mark_inode_dirty(struct inode *inode)
11082{
11083 __mark_inode_dirty(inode, (1 | 2 | 4));
11084}
11085
11086static inline __attribute__((always_inline)) void mark_inode_dirty_sync(struct inode *inode)
11087{
11088 __mark_inode_dirty(inode, 1);
11089}
11090# 1668 "include/linux/fs.h"
11091static inline __attribute__((always_inline)) void inc_nlink(struct inode *inode)
11092{
11093 inode->i_nlink++;
11094}
11095
11096static inline __attribute__((always_inline)) void inode_inc_link_count(struct inode *inode)
11097{
11098 inc_nlink(inode);
11099 mark_inode_dirty(inode);
11100}
11101# 1690 "include/linux/fs.h"
11102static inline __attribute__((always_inline)) void drop_nlink(struct inode *inode)
11103{
11104 inode->i_nlink--;
11105}
11106# 1703 "include/linux/fs.h"
11107static inline __attribute__((always_inline)) void clear_nlink(struct inode *inode)
11108{
11109 inode->i_nlink = 0;
11110}
11111
11112static inline __attribute__((always_inline)) void inode_dec_link_count(struct inode *inode)
11113{
11114 drop_nlink(inode);
11115 mark_inode_dirty(inode);
11116}
11117# 1722 "include/linux/fs.h"
11118static inline __attribute__((always_inline)) void inode_inc_iversion(struct inode *inode)
11119{
11120 _spin_lock(&inode->i_lock);
11121 inode->i_version++;
11122 _spin_unlock(&inode->i_lock);
11123}
11124
11125extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
11126static inline __attribute__((always_inline)) void file_accessed(struct file *file)
11127{
11128 if (!(file->f_flags & 01000000))
11129 touch_atime(file->f_path.mnt, file->f_path.dentry);
11130}
11131
11132int sync_inode(struct inode *inode, struct writeback_control *wbc);
11133
11134struct file_system_type {
11135 const char *name;
11136 int fs_flags;
11137 int (*get_sb) (struct file_system_type *, int,
11138 const char *, void *, struct vfsmount *);
11139 void (*kill_sb) (struct super_block *);
11140 struct module *owner;
11141 struct file_system_type * next;
11142 struct list_head fs_supers;
11143
11144 struct lock_class_key s_lock_key;
11145 struct lock_class_key s_umount_key;
11146
11147 struct lock_class_key i_lock_key;
11148 struct lock_class_key i_mutex_key;
11149 struct lock_class_key i_mutex_dir_key;
11150 struct lock_class_key i_alloc_sem_key;
11151};
11152
11153extern int get_sb_ns(struct file_system_type *fs_type, int flags, void *data,
11154 int (*fill_super)(struct super_block *, void *, int),
11155 struct vfsmount *mnt);
11156extern int get_sb_bdev(struct file_system_type *fs_type,
11157 int flags, const char *dev_name, void *data,
11158 int (*fill_super)(struct super_block *, void *, int),
11159 struct vfsmount *mnt);
11160extern int get_sb_single(struct file_system_type *fs_type,
11161 int flags, void *data,
11162 int (*fill_super)(struct super_block *, void *, int),
11163 struct vfsmount *mnt);
11164extern int get_sb_nodev(struct file_system_type *fs_type,
11165 int flags, void *data,
11166 int (*fill_super)(struct super_block *, void *, int),
11167 struct vfsmount *mnt);
11168void generic_shutdown_super(struct super_block *sb);
11169void kill_block_super(struct super_block *sb);
11170void kill_anon_super(struct super_block *sb);
11171void kill_litter_super(struct super_block *sb);
11172void deactivate_super(struct super_block *sb);
11173void deactivate_locked_super(struct super_block *sb);
11174int set_anon_super(struct super_block *s, void *data);
11175struct super_block *sget(struct file_system_type *type,
11176 int (*test)(struct super_block *,void *),
11177 int (*set)(struct super_block *,void *),
11178 void *data);
11179extern int get_sb_pseudo(struct file_system_type *, char *,
11180 const struct super_operations *ops, unsigned long,
11181 struct vfsmount *mnt);
11182extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
11183int __put_super_and_need_restart(struct super_block *sb);
11184void put_super(struct super_block *sb);
11185
11186
11187
11188
11189
11190
11191
11192extern int register_filesystem(struct file_system_type *);
11193extern int unregister_filesystem(struct file_system_type *);
11194extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
11195
11196extern int may_umount_tree(struct vfsmount *);
11197extern int may_umount(struct vfsmount *);
11198extern long do_mount(char *, char *, char *, unsigned long, void *);
11199extern struct vfsmount *collect_mounts(struct path *);
11200extern void drop_collected_mounts(struct vfsmount *);
11201
11202extern int vfs_statfs(struct dentry *, struct kstatfs *);
11203
11204extern int current_umask(void);
11205
11206
11207extern struct kobject *fs_kobj;
11208
11209extern int rw_verify_area(int, struct file *, loff_t *, size_t);
11210
11211
11212
11213
11214
11215extern int locks_mandatory_locked(struct inode *);
11216extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
11217
11218
11219
11220
11221
11222
11223static inline __attribute__((always_inline)) int __mandatory_lock(struct inode *ino)
11224{
11225 return (ino->i_mode & (0002000 | 00010)) == 0002000;
11226}
11227
11228
11229
11230
11231
11232
11233static inline __attribute__((always_inline)) int mandatory_lock(struct inode *ino)
11234{
11235 return ((ino)->i_sb->s_flags & (64)) && __mandatory_lock(ino);
11236}
11237
11238static inline __attribute__((always_inline)) int locks_verify_locked(struct inode *inode)
11239{
11240 if (mandatory_lock(inode))
11241 return locks_mandatory_locked(inode);
11242 return 0;
11243}
11244
11245static inline __attribute__((always_inline)) int locks_verify_truncate(struct inode *inode,
11246 struct file *filp,
11247 loff_t size)
11248{
11249 if (inode->i_flock && mandatory_lock(inode))
11250 return locks_mandatory_area(
11251 2, inode, filp,
11252 size < inode->i_size ? size : inode->i_size,
11253 (size < inode->i_size ? inode->i_size - size
11254 : size - inode->i_size)
11255 );
11256 return 0;
11257}
11258
11259static inline __attribute__((always_inline)) int break_lease(struct inode *inode, unsigned int mode)
11260{
11261 if (inode->i_flock)
11262 return __break_lease(inode, mode);
11263 return 0;
11264}
11265# 1912 "include/linux/fs.h"
11266extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
11267 struct file *filp);
11268extern int do_fallocate(struct file *file, int mode, loff_t offset,
11269 loff_t len);
11270extern long do_sys_open(int dfd, const char *filename, int flags,
11271 int mode);
11272extern struct file *filp_open(const char *, int, int);
11273extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
11274 const struct cred *);
11275extern int filp_close(struct file *, fl_owner_t id);
11276extern char * getname(const char *);
11277
11278
11279
11280extern int ioctl_preallocate(struct file *filp, void *argp);
11281
11282
11283extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) vfs_caches_init_early(void);
11284extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) vfs_caches_init(unsigned long);
11285
11286extern struct kmem_cache *names_cachep;
11287# 1944 "include/linux/fs.h"
11288extern int register_blkdev(unsigned int, const char *);
11289extern void unregister_blkdev(unsigned int, const char *);
11290extern struct block_device *bdget(dev_t);
11291extern struct block_device *bdgrab(struct block_device *bdev);
11292extern void bd_set_size(struct block_device *, loff_t size);
11293extern void bd_forget(struct inode *inode);
11294extern void bdput(struct block_device *);
11295extern struct block_device *open_by_devnum(dev_t, fmode_t);
11296extern void invalidate_bdev(struct block_device *);
11297extern int sync_blockdev(struct block_device *bdev);
11298extern struct super_block *freeze_bdev(struct block_device *);
11299extern void emergency_thaw_all(void);
11300extern int thaw_bdev(struct block_device *bdev, struct super_block *sb);
11301extern int fsync_bdev(struct block_device *);
11302# 1973 "include/linux/fs.h"
11303extern int sync_filesystem(struct super_block *);
11304extern const struct file_operations def_blk_fops;
11305extern const struct file_operations def_chr_fops;
11306extern const struct file_operations bad_sock_fops;
11307extern const struct file_operations def_fifo_fops;
11308
11309extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
11310extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long);
11311extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
11312extern int blkdev_get(struct block_device *, fmode_t);
11313extern int blkdev_put(struct block_device *, fmode_t);
11314extern int bd_claim(struct block_device *, void *);
11315extern void bd_release(struct block_device *);
11316
11317extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
11318extern void bd_release_from_disk(struct block_device *, struct gendisk *);
11319# 1997 "include/linux/fs.h"
11320extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
11321extern int register_chrdev_region(dev_t, unsigned, const char *);
11322extern int __register_chrdev(unsigned int major, unsigned int baseminor,
11323 unsigned int count, const char *name,
11324 const struct file_operations *fops);
11325extern void __unregister_chrdev(unsigned int major, unsigned int baseminor,
11326 unsigned int count, const char *name);
11327extern void unregister_chrdev_region(dev_t, unsigned);
11328extern void chrdev_show(struct seq_file *,off_t);
11329
11330static inline __attribute__((always_inline)) int register_chrdev(unsigned int major, const char *name,
11331 const struct file_operations *fops)
11332{
11333 return __register_chrdev(major, 0, 256, name, fops);
11334}
11335
11336static inline __attribute__((always_inline)) void unregister_chrdev(unsigned int major, const char *name)
11337{
11338 __unregister_chrdev(major, 0, 256, name);
11339}
11340
11341
11342
11343
11344
11345
11346
11347extern const char *__bdevname(dev_t, char *buffer);
11348extern const char *bdevname(struct block_device *bdev, char *buffer);
11349extern struct block_device *lookup_bdev(const char *);
11350extern struct block_device *open_bdev_exclusive(const char *, fmode_t, void *);
11351extern void close_bdev_exclusive(struct block_device *, fmode_t);
11352extern void blkdev_show(struct seq_file *,off_t);
11353
11354
11355
11356
11357
11358extern void init_special_inode(struct inode *, umode_t, dev_t);
11359
11360
11361extern void make_bad_inode(struct inode *);
11362extern int is_bad_inode(struct inode *);
11363
11364extern const struct file_operations read_pipefifo_fops;
11365extern const struct file_operations write_pipefifo_fops;
11366extern const struct file_operations rdwr_pipefifo_fops;
11367
11368extern int fs_may_remount_ro(struct super_block *);
11369# 2058 "include/linux/fs.h"
11370extern void check_disk_size_change(struct gendisk *disk,
11371 struct block_device *bdev);
11372extern int revalidate_disk(struct gendisk *);
11373extern int check_disk_change(struct block_device *);
11374extern int __invalidate_device(struct block_device *);
11375extern int invalidate_partition(struct gendisk *, int);
11376
11377extern int invalidate_inodes(struct super_block *);
11378unsigned long invalidate_mapping_pages(struct address_space *mapping,
11379 unsigned long start, unsigned long end);
11380
11381static inline __attribute__((always_inline)) unsigned long
11382invalidate_inode_pages(struct address_space *mapping)
11383{
11384 return invalidate_mapping_pages(mapping, 0, ~0UL);
11385}
11386
11387static inline __attribute__((always_inline)) void invalidate_remote_inode(struct inode *inode)
11388{
11389 if ((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) ||
11390 (((inode->i_mode) & 00170000) == 0120000))
11391 invalidate_mapping_pages(inode->i_mapping, 0, -1);
11392}
11393extern int invalidate_inode_pages2(struct address_space *mapping);
11394extern int invalidate_inode_pages2_range(struct address_space *mapping,
11395 unsigned long start, unsigned long end);
11396extern int write_inode_now(struct inode *, int);
11397extern int filemap_fdatawrite(struct address_space *);
11398extern int filemap_flush(struct address_space *);
11399extern int filemap_fdatawait(struct address_space *);
11400extern int filemap_fdatawait_range(struct address_space *, loff_t lstart,
11401 loff_t lend);
11402extern int filemap_write_and_wait(struct address_space *mapping);
11403extern int filemap_write_and_wait_range(struct address_space *mapping,
11404 loff_t lstart, loff_t lend);
11405extern int wait_on_page_writeback_range(struct address_space *mapping,
11406 unsigned long start, unsigned long end);
11407extern int __filemap_fdatawrite_range(struct address_space *mapping,
11408 loff_t start, loff_t end, int sync_mode);
11409extern int filemap_fdatawrite_range(struct address_space *mapping,
11410 loff_t start, loff_t end);
11411
11412extern int vfs_fsync_range(struct file *file, struct dentry *dentry,
11413 loff_t start, loff_t end, int datasync);
11414extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync);
11415extern int generic_write_sync(struct file *file, loff_t pos, loff_t count);
11416extern void sync_supers(void);
11417extern void emergency_sync(void);
11418extern void emergency_remount(void);
11419
11420extern sector_t bmap(struct inode *, sector_t);
11421
11422extern int notify_change(struct dentry *, struct iattr *);
11423extern int inode_permission(struct inode *, int);
11424extern int generic_permission(struct inode *, int,
11425 int (*check_acl)(struct inode *, int));
11426
11427static inline __attribute__((always_inline)) bool execute_ok(struct inode *inode)
11428{
11429 return (inode->i_mode & (00100|00010|00001)) || (((inode->i_mode) & 00170000) == 0040000);
11430}
11431
11432extern int get_write_access(struct inode *);
11433extern int deny_write_access(struct file *);
11434static inline __attribute__((always_inline)) void put_write_access(struct inode * inode)
11435{
11436 atomic_dec(&inode->i_writecount);
11437}
11438static inline __attribute__((always_inline)) void allow_write_access(struct file *file)
11439{
11440 if (file)
11441 atomic_inc(&file->f_path.dentry->d_inode->i_writecount);
11442}
11443extern int do_pipe_flags(int *, int);
11444extern struct file *create_read_pipe(struct file *f, int flags);
11445extern struct file *create_write_pipe(int flags);
11446extern void free_write_pipe(struct file *);
11447
11448extern struct file *do_filp_open(int dfd, const char *pathname,
11449 int open_flag, int mode, int acc_mode);
11450extern int may_open(struct path *, int, int);
11451
11452extern int kernel_read(struct file *, loff_t, char *, unsigned long);
11453extern struct file * open_exec(const char *);
11454
11455
11456extern int is_subdir(struct dentry *, struct dentry *);
11457extern ino_t find_inode_number(struct dentry *, struct qstr *);
11458
11459# 1 "include/linux/err.h" 1
11460
11461
11462
11463
11464
11465# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/errno.h" 1
11466# 7 "include/linux/err.h" 2
11467# 22 "include/linux/err.h"
11468static inline __attribute__((always_inline)) void *ERR_PTR(long error)
11469{
11470 return (void *) error;
11471}
11472
11473static inline __attribute__((always_inline)) long PTR_ERR(const void *ptr)
11474{
11475 return (long) ptr;
11476}
11477
11478static inline __attribute__((always_inline)) long IS_ERR(const void *ptr)
11479{
11480 return __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0);
11481}
11482# 44 "include/linux/err.h"
11483static inline __attribute__((always_inline)) void *ERR_CAST(const void *ptr)
11484{
11485
11486 return (void *) ptr;
11487}
11488# 2148 "include/linux/fs.h" 2
11489
11490
11491extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
11492
11493extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
11494
11495extern int inode_init_always(struct super_block *, struct inode *);
11496extern void inode_init_once(struct inode *);
11497extern void inode_add_to_lists(struct super_block *, struct inode *);
11498extern void iput(struct inode *);
11499extern struct inode * igrab(struct inode *);
11500extern ino_t iunique(struct super_block *, ino_t);
11501extern int inode_needs_sync(struct inode *inode);
11502extern void generic_delete_inode(struct inode *inode);
11503extern void generic_drop_inode(struct inode *inode);
11504extern int generic_detach_inode(struct inode *inode);
11505
11506extern struct inode *ilookup5_nowait(struct super_block *sb,
11507 unsigned long hashval, int (*test)(struct inode *, void *),
11508 void *data);
11509extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
11510 int (*test)(struct inode *, void *), void *data);
11511extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
11512
11513extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
11514extern struct inode * iget_locked(struct super_block *, unsigned long);
11515extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *);
11516extern int insert_inode_locked(struct inode *);
11517extern void unlock_new_inode(struct inode *);
11518
11519extern void __iget(struct inode * inode);
11520extern void iget_failed(struct inode *);
11521extern void clear_inode(struct inode *);
11522extern void destroy_inode(struct inode *);
11523extern void __destroy_inode(struct inode *);
11524extern struct inode *new_inode(struct super_block *);
11525extern int should_remove_suid(struct dentry *);
11526extern int file_remove_suid(struct file *);
11527
11528extern void __insert_inode_hash(struct inode *, unsigned long hashval);
11529extern void remove_inode_hash(struct inode *);
11530static inline __attribute__((always_inline)) void insert_inode_hash(struct inode *inode) {
11531 __insert_inode_hash(inode, inode->i_ino);
11532}
11533
11534extern struct file * get_empty_filp(void);
11535extern void file_move(struct file *f, struct list_head *list);
11536extern void file_kill(struct file *f);
11537
11538struct bio;
11539extern void submit_bio(int, struct bio *);
11540extern int bdev_read_only(struct block_device *);
11541
11542extern int set_blocksize(struct block_device *, int);
11543extern int sb_set_blocksize(struct super_block *, int);
11544extern int sb_min_blocksize(struct super_block *, int);
11545
11546extern int generic_file_mmap(struct file *, struct vm_area_struct *);
11547extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
11548extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
11549int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
11550extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
11551extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long,
11552 loff_t *);
11553extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
11554extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
11555 unsigned long *, loff_t, loff_t *, size_t, size_t);
11556extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
11557 unsigned long, loff_t, loff_t *, size_t, ssize_t);
11558extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos);
11559extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos);
11560extern int generic_segment_checks(const struct iovec *iov,
11561 unsigned long *nr_segs, size_t *count, int access_flags);
11562
11563
11564extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
11565 unsigned long nr_segs, loff_t pos);
11566
11567
11568extern ssize_t generic_file_splice_read(struct file *, loff_t *,
11569 struct pipe_inode_info *, size_t, unsigned int);
11570extern ssize_t default_file_splice_read(struct file *, loff_t *,
11571 struct pipe_inode_info *, size_t, unsigned int);
11572extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
11573 struct file *, loff_t *, size_t, unsigned int);
11574extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
11575 struct file *out, loff_t *, size_t len, unsigned int flags);
11576extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
11577 size_t len, unsigned int flags);
11578
11579extern void
11580file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
11581extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
11582extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
11583extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset,
11584 int origin);
11585extern int generic_file_open(struct inode * inode, struct file * filp);
11586extern int nonseekable_open(struct inode * inode, struct file * filp);
11587# 2255 "include/linux/fs.h"
11588static inline __attribute__((always_inline)) int xip_truncate_page(struct address_space *mapping, loff_t from)
11589{
11590 return 0;
11591}
11592
11593
11594
11595ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
11596 struct block_device *bdev, const struct iovec *iov, loff_t offset,
11597 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
11598 int lock_type);
11599
11600enum {
11601 DIO_LOCKING = 1,
11602 DIO_NO_LOCKING,
11603 DIO_OWN_LOCKING,
11604};
11605
11606static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
11607 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
11608 loff_t offset, unsigned long nr_segs, get_block_t get_block,
11609 dio_iodone_t end_io)
11610{
11611 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
11612 nr_segs, get_block, end_io, DIO_LOCKING);
11613}
11614
11615static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
11616 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
11617 loff_t offset, unsigned long nr_segs, get_block_t get_block,
11618 dio_iodone_t end_io)
11619{
11620 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
11621 nr_segs, get_block, end_io, DIO_NO_LOCKING);
11622}
11623
11624static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb,
11625 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
11626 loff_t offset, unsigned long nr_segs, get_block_t get_block,
11627 dio_iodone_t end_io)
11628{
11629 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
11630 nr_segs, get_block, end_io, DIO_OWN_LOCKING);
11631}
11632
11633
11634extern const struct file_operations generic_ro_fops;
11635
11636
11637
11638extern int vfs_readlink(struct dentry *, char *, int, const char *);
11639extern int vfs_follow_link(struct nameidata *, const char *);
11640extern int page_readlink(struct dentry *, char *, int);
11641extern void *page_follow_link_light(struct dentry *, struct nameidata *);
11642extern void page_put_link(struct dentry *, struct nameidata *, void *);
11643extern int __page_symlink(struct inode *inode, const char *symname, int len,
11644 int nofs);
11645extern int page_symlink(struct inode *inode, const char *symname, int len);
11646extern const struct inode_operations page_symlink_inode_operations;
11647extern int generic_readlink(struct dentry *, char *, int);
11648extern void generic_fillattr(struct inode *, struct kstat *);
11649extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
11650void inode_add_bytes(struct inode *inode, loff_t bytes);
11651void inode_sub_bytes(struct inode *inode, loff_t bytes);
11652loff_t inode_get_bytes(struct inode *inode);
11653void inode_set_bytes(struct inode *inode, loff_t bytes);
11654
11655extern int vfs_readdir(struct file *, filldir_t, void *);
11656
11657extern int vfs_stat(char *, struct kstat *);
11658extern int vfs_lstat(char *, struct kstat *);
11659extern int vfs_fstat(unsigned int, struct kstat *);
11660extern int vfs_fstatat(int , char *, struct kstat *, int);
11661
11662extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
11663 unsigned long arg);
11664extern int __generic_block_fiemap(struct inode *inode,
11665 struct fiemap_extent_info *fieinfo, u64 start,
11666 u64 len, get_block_t *get_block);
11667extern int generic_block_fiemap(struct inode *inode,
11668 struct fiemap_extent_info *fieinfo, u64 start,
11669 u64 len, get_block_t *get_block);
11670
11671extern void get_filesystem(struct file_system_type *fs);
11672extern void put_filesystem(struct file_system_type *fs);
11673extern struct file_system_type *get_fs_type(const char *name);
11674extern struct super_block *get_super(struct block_device *);
11675extern struct super_block *get_active_super(struct block_device *bdev);
11676extern struct super_block *user_get_super(dev_t);
11677extern void drop_super(struct super_block *sb);
11678
11679extern int dcache_dir_open(struct inode *, struct file *);
11680extern int dcache_dir_close(struct inode *, struct file *);
11681extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
11682extern int dcache_readdir(struct file *, void *, filldir_t);
11683extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
11684extern int simple_statfs(struct dentry *, struct kstatfs *);
11685extern int simple_link(struct dentry *, struct inode *, struct dentry *);
11686extern int simple_unlink(struct inode *, struct dentry *);
11687extern int simple_rmdir(struct inode *, struct dentry *);
11688extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
11689extern int simple_sync_file(struct file *, struct dentry *, int);
11690extern int simple_empty(struct dentry *);
11691extern int simple_readpage(struct file *file, struct page *page);
11692extern int simple_prepare_write(struct file *file, struct page *page,
11693 unsigned offset, unsigned to);
11694extern int simple_write_begin(struct file *file, struct address_space *mapping,
11695 loff_t pos, unsigned len, unsigned flags,
11696 struct page **pagep, void **fsdata);
11697extern int simple_write_end(struct file *file, struct address_space *mapping,
11698 loff_t pos, unsigned len, unsigned copied,
11699 struct page *page, void *fsdata);
11700
11701extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
11702extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
11703extern const struct file_operations simple_dir_operations;
11704extern const struct inode_operations simple_dir_inode_operations;
11705struct tree_descr { char *name; const struct file_operations *ops; int mode; };
11706struct dentry *d_alloc_name(struct dentry *, const char *);
11707extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
11708extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
11709extern void simple_release_fs(struct vfsmount **mount, int *count);
11710
11711extern ssize_t simple_read_from_buffer(void *to, size_t count,
11712 loff_t *ppos, const void *from, size_t available);
11713
11714extern int simple_fsync(struct file *, struct dentry *, int);
11715# 2390 "include/linux/fs.h"
11716extern int inode_change_ok(const struct inode *, struct iattr *);
11717extern int inode_newsize_ok(const struct inode *, loff_t offset);
11718extern int __attribute__((warn_unused_result)) inode_setattr(struct inode *, struct iattr *);
11719
11720extern void file_update_time(struct file *file);
11721
11722extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt);
11723extern void save_mount_options(struct super_block *sb, char *options);
11724extern void replace_mount_options(struct super_block *sb, char *options);
11725
11726static inline __attribute__((always_inline)) ino_t parent_ino(struct dentry *dentry)
11727{
11728 ino_t res;
11729
11730 _spin_lock(&dentry->d_lock);
11731 res = dentry->d_parent->d_inode->i_ino;
11732 _spin_unlock(&dentry->d_lock);
11733 return res;
11734}
11735
11736
11737
11738
11739
11740
11741
11742struct simple_transaction_argresp {
11743 ssize_t size;
11744 char data[0];
11745};
11746
11747
11748
11749char *simple_transaction_get(struct file *file, const char *buf,
11750 size_t size);
11751ssize_t simple_transaction_read(struct file *file, char *buf,
11752 size_t size, loff_t *pos);
11753int simple_transaction_release(struct inode *inode, struct file *file);
11754
11755void simple_transaction_set(struct file *file, size_t n);
11756# 2461 "include/linux/fs.h"
11757static inline __attribute__((always_inline)) void __attribute__((format(printf, 1, 2)))
11758__simple_attr_check_format(const char *fmt, ...)
11759{
11760
11761}
11762
11763int simple_attr_open(struct inode *inode, struct file *file,
11764 int (*get)(void *, u64 *), int (*set)(void *, u64),
11765 const char *fmt);
11766int simple_attr_release(struct inode *inode, struct file *file);
11767ssize_t simple_attr_read(struct file *file, char *buf,
11768 size_t len, loff_t *ppos);
11769ssize_t simple_attr_write(struct file *file, const char *buf,
11770 size_t len, loff_t *ppos);
11771
11772struct ctl_table;
11773int proc_nr_files(struct ctl_table *table, int write,
11774 void *buffer, size_t *lenp, loff_t *ppos);
11775
11776int __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) get_filesystem_list(char *buf);
11777# 12 "include/linux/buffer_head.h" 2
11778
11779# 1 "include/linux/pagemap.h" 1
11780
11781
11782
11783
11784
11785
11786# 1 "include/linux/mm.h" 1
11787# 11 "include/linux/mm.h"
11788# 1 "include/linux/rbtree.h" 1
11789# 100 "include/linux/rbtree.h"
11790struct rb_node
11791{
11792 unsigned long rb_parent_color;
11793
11794
11795 struct rb_node *rb_right;
11796 struct rb_node *rb_left;
11797} __attribute__((aligned(sizeof(long))));
11798
11799
11800struct rb_root
11801{
11802 struct rb_node *rb_node;
11803};
11804# 123 "include/linux/rbtree.h"
11805static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p)
11806{
11807 rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
11808}
11809static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color)
11810{
11811 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
11812}
11813# 139 "include/linux/rbtree.h"
11814extern void rb_insert_color(struct rb_node *, struct rb_root *);
11815extern void rb_erase(struct rb_node *, struct rb_root *);
11816
11817
11818extern struct rb_node *rb_next(const struct rb_node *);
11819extern struct rb_node *rb_prev(const struct rb_node *);
11820extern struct rb_node *rb_first(const struct rb_root *);
11821extern struct rb_node *rb_last(const struct rb_root *);
11822
11823
11824extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
11825 struct rb_root *root);
11826
11827static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent,
11828 struct rb_node ** rb_link)
11829{
11830 node->rb_parent_color = (unsigned long )parent;
11831 node->rb_left = node->rb_right = ((void *)0);
11832
11833 *rb_link = node;
11834}
11835# 12 "include/linux/mm.h" 2
11836
11837
11838# 1 "include/linux/mm_types.h" 1
11839
11840
11841
11842# 1 "include/linux/auxvec.h" 1
11843
11844
11845
11846# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/auxvec.h" 1
11847# 1 "include/asm-generic/auxvec.h" 1
11848# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/auxvec.h" 2
11849# 5 "include/linux/auxvec.h" 2
11850# 5 "include/linux/mm_types.h" 2
11851# 14 "include/linux/mm_types.h"
11852# 1 "include/linux/page-debug-flags.h" 1
11853# 14 "include/linux/page-debug-flags.h"
11854enum page_debug_flags {
11855 PAGE_DEBUG_FLAG_POISON,
11856};
11857# 15 "include/linux/mm_types.h" 2
11858
11859# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/mmu.h" 1
11860# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/mmu.h"
11861struct sram_list_struct {
11862 struct sram_list_struct *next;
11863 void *addr;
11864 size_t length;
11865};
11866
11867typedef struct {
11868 unsigned long end_brk;
11869 unsigned long stack_start;
11870
11871
11872
11873 void *l1_stack_save;
11874
11875 struct sram_list_struct *sram_list;
11876
11877
11878 unsigned long exec_fdpic_loadmap;
11879 unsigned long interp_fdpic_loadmap;
11880
11881
11882
11883
11884} mm_context_t;
11885# 17 "include/linux/mm_types.h" 2
11886
11887
11888
11889
11890
11891
11892struct address_space;
11893
11894
11895
11896
11897
11898
11899typedef unsigned long mm_counter_t;
11900# 40 "include/linux/mm_types.h"
11901struct page {
11902 unsigned long flags;
11903
11904 atomic_t _count;
11905 union {
11906 atomic_t _mapcount;
11907
11908
11909
11910 struct {
11911 u16 inuse;
11912 u16 objects;
11913 };
11914 };
11915 union {
11916 struct {
11917 unsigned long private;
11918
11919
11920
11921
11922
11923
11924 struct address_space *mapping;
11925
11926
11927
11928
11929
11930
11931 };
11932
11933
11934
11935 struct kmem_cache *slab;
11936 struct page *first_page;
11937 };
11938 union {
11939 unsigned long index;
11940 void *freelist;
11941 };
11942 struct list_head lru;
11943# 99 "include/linux/mm_types.h"
11944 unsigned long debug_flags;
11945# 109 "include/linux/mm_types.h"
11946};
11947
11948
11949
11950
11951
11952
11953struct vm_region {
11954 struct rb_node vm_rb;
11955 unsigned long vm_flags;
11956 unsigned long vm_start;
11957 unsigned long vm_end;
11958 unsigned long vm_top;
11959 unsigned long vm_pgoff;
11960 struct file *vm_file;
11961
11962 atomic_t vm_usage;
11963};
11964
11965
11966
11967
11968
11969
11970
11971struct vm_area_struct {
11972 struct mm_struct * vm_mm;
11973 unsigned long vm_start;
11974 unsigned long vm_end;
11975
11976
11977
11978 struct vm_area_struct *vm_next;
11979
11980 pgprot_t vm_page_prot;
11981 unsigned long vm_flags;
11982
11983 struct rb_node vm_rb;
11984
11985
11986
11987
11988
11989
11990
11991 union {
11992 struct {
11993 struct list_head list;
11994 void *parent;
11995 struct vm_area_struct *head;
11996 } vm_set;
11997
11998 struct raw_prio_tree_node prio_tree_node;
11999 } shared;
12000
12001
12002
12003
12004
12005
12006
12007 struct list_head anon_vma_node;
12008 struct anon_vma *anon_vma;
12009
12010
12011 const struct vm_operations_struct *vm_ops;
12012
12013
12014 unsigned long vm_pgoff;
12015
12016 struct file * vm_file;
12017 void * vm_private_data;
12018 unsigned long vm_truncate_count;
12019
12020
12021 struct vm_region *vm_region;
12022
12023
12024
12025
12026};
12027
12028struct core_thread {
12029 struct task_struct *task;
12030 struct core_thread *next;
12031};
12032
12033struct core_state {
12034 atomic_t nr_threads;
12035 struct core_thread dumper;
12036 struct completion startup;
12037};
12038
12039struct mm_struct {
12040 struct vm_area_struct * mmap;
12041 struct rb_root mm_rb;
12042 struct vm_area_struct * mmap_cache;
12043 unsigned long (*get_unmapped_area) (struct file *filp,
12044 unsigned long addr, unsigned long len,
12045 unsigned long pgoff, unsigned long flags);
12046 void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
12047 unsigned long mmap_base;
12048 unsigned long task_size;
12049 unsigned long cached_hole_size;
12050 unsigned long free_area_cache;
12051 pgd_t * pgd;
12052 atomic_t mm_users;
12053 atomic_t mm_count;
12054 int map_count;
12055 struct rw_semaphore mmap_sem;
12056 spinlock_t page_table_lock;
12057
12058 struct list_head mmlist;
12059
12060
12061
12062
12063
12064
12065
12066 mm_counter_t _file_rss;
12067 mm_counter_t _anon_rss;
12068
12069 unsigned long hiwater_rss;
12070 unsigned long hiwater_vm;
12071
12072 unsigned long total_vm, locked_vm, shared_vm, exec_vm;
12073 unsigned long stack_vm, reserved_vm, def_flags, nr_ptes;
12074 unsigned long start_code, end_code, start_data, end_data;
12075 unsigned long start_brk, brk, start_stack;
12076 unsigned long arg_start, arg_end, env_start, env_end;
12077
12078 unsigned long saved_auxv[(2*(0 + 19 + 1))];
12079
12080 struct linux_binfmt *binfmt;
12081
12082 cpumask_t cpu_vm_mask;
12083
12084
12085 mm_context_t context;
12086# 257 "include/linux/mm_types.h"
12087 unsigned int faultstamp;
12088 unsigned int token_priority;
12089 unsigned int last_interval;
12090
12091 unsigned long flags;
12092
12093 struct core_state *core_state;
12094
12095 spinlock_t ioctx_lock;
12096 struct hlist_head ioctx_list;
12097# 284 "include/linux/mm_types.h"
12098 struct file *exe_file;
12099 unsigned long num_exe_file_vmas;
12100
12101
12102
12103
12104};
12105# 15 "include/linux/mm.h" 2
12106
12107struct mempolicy;
12108struct anon_vma;
12109struct file_ra_state;
12110struct user_struct;
12111struct writeback_control;
12112struct rlimit;
12113
12114
12115extern unsigned long max_mapnr;
12116
12117
12118extern unsigned long num_physpages;
12119extern unsigned long totalram_pages;
12120extern void * high_memory;
12121extern int page_cluster;
12122
12123
12124extern int sysctl_legacy_va_layout;
12125
12126
12127
12128
12129
12130# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pgtable.h" 1
12131# 10 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pgtable.h"
12132# 1 "include/asm-generic/4level-fixup.h" 1
12133# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pgtable.h" 2
12134
12135
12136
12137
12138typedef pte_t *pte_addr_t;
12139# 40 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pgtable.h"
12140extern void paging_init(void);
12141
12142
12143
12144
12145
12146
12147
12148static inline __attribute__((always_inline)) int pte_file(pte_t pte)
12149{
12150 return 0;
12151}
12152# 68 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pgtable.h"
12153static inline __attribute__((always_inline)) pte_t pte_rdprotect(pte_t _pte) { _pte.pte &= ~(0x00000004); return _pte; };
12154static inline __attribute__((always_inline)) pte_t pte_mkread(pte_t _pte) { _pte.pte |= (0x00000004); return _pte; };
12155static inline __attribute__((always_inline)) pte_t pte_wrprotect(pte_t _pte) { _pte.pte &= ~(0x00000008); return _pte; };
12156static inline __attribute__((always_inline)) pte_t pte_mkwrite(pte_t _pte) { _pte.pte |= (0x00000008); return _pte; };
12157static inline __attribute__((always_inline)) pte_t pte_exprotect(pte_t _pte) { _pte.pte &= ~(0x00000004 | 0x00000008); return _pte; };
12158static inline __attribute__((always_inline)) pte_t pte_mkexec(pte_t _pte) { _pte.pte |= (0x00000004 | 0x00000008); return _pte; };
12159static inline __attribute__((always_inline)) pte_t pte_mkclean(pte_t _pte) { _pte.pte &= ~(0x00000080); return _pte; };
12160static inline __attribute__((always_inline)) pte_t pte_mkdirty(pte_t _pte) { _pte.pte |= (0x00000080); return _pte; };
12161static inline __attribute__((always_inline)) pte_t pte_mkold(pte_t _pte) { _pte.pte &= ~0x00000010 | 0x00000004 | 0x00000008; return _pte; };
12162static inline __attribute__((always_inline)) pte_t pte_mkyoung(pte_t _pte) { _pte.pte |= 0x00000010 | 0x00000004 | 0x00000008; return _pte; };
12163
12164
12165
12166
12167
12168
12169extern char empty_zero_page[];
12170
12171extern unsigned int kobjsize(const void *objp);
12172# 103 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pgtable.h"
12173extern unsigned long get_fb_unmapped_area(struct file *filp, unsigned long,
12174 unsigned long, unsigned long,
12175 unsigned long);
12176
12177
12178# 1 "include/asm-generic/pgtable.h" 1
12179# 309 "include/asm-generic/pgtable.h"
12180static inline __attribute__((always_inline)) int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
12181 unsigned long pfn, unsigned long size)
12182{
12183 return 0;
12184}
12185# 322 "include/asm-generic/pgtable.h"
12186static inline __attribute__((always_inline)) int track_pfn_vma_copy(struct vm_area_struct *vma)
12187{
12188 return 0;
12189}
12190# 335 "include/asm-generic/pgtable.h"
12191static inline __attribute__((always_inline)) void untrack_pfn_vma(struct vm_area_struct *vma,
12192 unsigned long pfn, unsigned long size)
12193{
12194}
12195# 109 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/pgtable.h" 2
12196# 40 "include/linux/mm.h" 2
12197# 56 "include/linux/mm.h"
12198extern struct kmem_cache *vm_area_cachep;
12199
12200
12201extern struct rb_root nommu_region_tree;
12202extern struct rw_semaphore nommu_region_sem;
12203
12204extern unsigned int kobjsize(const void *objp);
12205# 134 "include/linux/mm.h"
12206extern pgprot_t protection_map[16];
12207# 148 "include/linux/mm.h"
12208static inline __attribute__((always_inline)) int is_linear_pfn_mapping(struct vm_area_struct *vma)
12209{
12210 return (vma->vm_flags & 0x40000000);
12211}
12212
12213static inline __attribute__((always_inline)) int is_pfn_mapping(struct vm_area_struct *vma)
12214{
12215 return (vma->vm_flags & 0x00000400);
12216}
12217# 167 "include/linux/mm.h"
12218struct vm_fault {
12219 unsigned int flags;
12220 unsigned long pgoff;
12221 void *virtual_address;
12222
12223 struct page *page;
12224
12225
12226
12227
12228};
12229
12230
12231
12232
12233
12234
12235struct vm_operations_struct {
12236 void (*open)(struct vm_area_struct * area);
12237 void (*close)(struct vm_area_struct * area);
12238 int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
12239
12240
12241
12242 int (*page_mkwrite)(struct vm_area_struct *vma, struct vm_fault *vmf);
12243
12244
12245
12246
12247 int (*access)(struct vm_area_struct *vma, unsigned long addr,
12248 void *buf, int len, int write);
12249# 223 "include/linux/mm.h"
12250};
12251
12252struct mmu_gather;
12253struct inode;
12254# 235 "include/linux/mm.h"
12255# 1 "include/linux/page-flags.h" 1
12256# 75 "include/linux/page-flags.h"
12257enum pageflags {
12258 PG_locked,
12259 PG_error,
12260 PG_referenced,
12261 PG_uptodate,
12262 PG_dirty,
12263 PG_lru,
12264 PG_active,
12265 PG_slab,
12266 PG_owner_priv_1,
12267 PG_arch_1,
12268 PG_reserved,
12269 PG_private,
12270 PG_private_2,
12271 PG_writeback,
12272
12273 PG_head,
12274 PG_tail,
12275
12276
12277
12278 PG_swapcache,
12279 PG_mappedtodisk,
12280 PG_reclaim,
12281 PG_buddy,
12282 PG_swapbacked,
12283 PG_unevictable,
12284# 111 "include/linux/page-flags.h"
12285 __NR_PAGEFLAGS,
12286
12287
12288 PG_checked = PG_owner_priv_1,
12289
12290
12291
12292
12293
12294 PG_fscache = PG_private_2,
12295
12296
12297 PG_pinned = PG_owner_priv_1,
12298 PG_savepinned = PG_dirty,
12299
12300
12301 PG_slob_free = PG_private,
12302
12303
12304 PG_slub_frozen = PG_active,
12305 PG_slub_debug = PG_error,
12306};
12307# 199 "include/linux/page-flags.h"
12308struct page;
12309
12310static inline __attribute__((always_inline)) int PageLocked(struct page *page) { return test_bit(PG_locked, &page->flags); } static inline __attribute__((always_inline)) int TestSetPageLocked(struct page *page) { return test_and_set_bit(PG_locked, &page->flags); }
12311static inline __attribute__((always_inline)) int PageError(struct page *page) { return test_bit(PG_error, &page->flags); } static inline __attribute__((always_inline)) void SetPageError(struct page *page) { set_bit(PG_error, &page->flags); } static inline __attribute__((always_inline)) void ClearPageError(struct page *page) { clear_bit(PG_error, &page->flags); }
12312static inline __attribute__((always_inline)) int PageReferenced(struct page *page) { return test_bit(PG_referenced, &page->flags); } static inline __attribute__((always_inline)) void SetPageReferenced(struct page *page) { set_bit(PG_referenced, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReferenced(struct page *page) { clear_bit(PG_referenced, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageReferenced(struct page *page) { return test_and_clear_bit(PG_referenced, &page->flags); }
12313static inline __attribute__((always_inline)) int PageDirty(struct page *page) { return test_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) void SetPageDirty(struct page *page) { set_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) void ClearPageDirty(struct page *page) { clear_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) int TestSetPageDirty(struct page *page) { return test_and_set_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageDirty(struct page *page) { return test_and_clear_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageDirty(struct page *page) { __clear_bit(PG_dirty, &page->flags); }
12314static inline __attribute__((always_inline)) int PageLRU(struct page *page) { return test_bit(PG_lru, &page->flags); } static inline __attribute__((always_inline)) void SetPageLRU(struct page *page) { set_bit(PG_lru, &page->flags); } static inline __attribute__((always_inline)) void ClearPageLRU(struct page *page) { clear_bit(PG_lru, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageLRU(struct page *page) { __clear_bit(PG_lru, &page->flags); }
12315static inline __attribute__((always_inline)) int PageActive(struct page *page) { return test_bit(PG_active, &page->flags); } static inline __attribute__((always_inline)) void SetPageActive(struct page *page) { set_bit(PG_active, &page->flags); } static inline __attribute__((always_inline)) void ClearPageActive(struct page *page) { clear_bit(PG_active, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageActive(struct page *page) { __clear_bit(PG_active, &page->flags); }
12316 static inline __attribute__((always_inline)) int TestClearPageActive(struct page *page) { return test_and_clear_bit(PG_active, &page->flags); }
12317static inline __attribute__((always_inline)) int PageSlab(struct page *page) { return test_bit(PG_slab, &page->flags); } static inline __attribute__((always_inline)) void __SetPageSlab(struct page *page) { __set_bit(PG_slab, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSlab(struct page *page) { __clear_bit(PG_slab, &page->flags); }
12318static inline __attribute__((always_inline)) int PageChecked(struct page *page) { return test_bit(PG_checked, &page->flags); } static inline __attribute__((always_inline)) void SetPageChecked(struct page *page) { set_bit(PG_checked, &page->flags); } static inline __attribute__((always_inline)) void ClearPageChecked(struct page *page) { clear_bit(PG_checked, &page->flags); }
12319static inline __attribute__((always_inline)) int PagePinned(struct page *page) { return test_bit(PG_pinned, &page->flags); } static inline __attribute__((always_inline)) void SetPagePinned(struct page *page) { set_bit(PG_pinned, &page->flags); } static inline __attribute__((always_inline)) void ClearPagePinned(struct page *page) { clear_bit(PG_pinned, &page->flags); } static inline __attribute__((always_inline)) int TestSetPagePinned(struct page *page) { return test_and_set_bit(PG_pinned, &page->flags); } static inline __attribute__((always_inline)) int TestClearPagePinned(struct page *page) { return test_and_clear_bit(PG_pinned, &page->flags); }
12320static inline __attribute__((always_inline)) int PageSavePinned(struct page *page) { return test_bit(PG_savepinned, &page->flags); } static inline __attribute__((always_inline)) void SetPageSavePinned(struct page *page) { set_bit(PG_savepinned, &page->flags); } static inline __attribute__((always_inline)) void ClearPageSavePinned(struct page *page) { clear_bit(PG_savepinned, &page->flags); };
12321static inline __attribute__((always_inline)) int PageReserved(struct page *page) { return test_bit(PG_reserved, &page->flags); } static inline __attribute__((always_inline)) void SetPageReserved(struct page *page) { set_bit(PG_reserved, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReserved(struct page *page) { clear_bit(PG_reserved, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageReserved(struct page *page) { __clear_bit(PG_reserved, &page->flags); }
12322static inline __attribute__((always_inline)) int PageSwapBacked(struct page *page) { return test_bit(PG_swapbacked, &page->flags); } static inline __attribute__((always_inline)) void SetPageSwapBacked(struct page *page) { set_bit(PG_swapbacked, &page->flags); } static inline __attribute__((always_inline)) void ClearPageSwapBacked(struct page *page) { clear_bit(PG_swapbacked, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSwapBacked(struct page *page) { __clear_bit(PG_swapbacked, &page->flags); }
12323
12324static inline __attribute__((always_inline)) int PageSlobFree(struct page *page) { return test_bit(PG_slob_free, &page->flags); } static inline __attribute__((always_inline)) void __SetPageSlobFree(struct page *page) { __set_bit(PG_slob_free, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSlobFree(struct page *page) { __clear_bit(PG_slob_free, &page->flags); }
12325
12326static inline __attribute__((always_inline)) int PageSlubFrozen(struct page *page) { return test_bit(PG_slub_frozen, &page->flags); } static inline __attribute__((always_inline)) void __SetPageSlubFrozen(struct page *page) { __set_bit(PG_slub_frozen, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSlubFrozen(struct page *page) { __clear_bit(PG_slub_frozen, &page->flags); }
12327static inline __attribute__((always_inline)) int PageSlubDebug(struct page *page) { return test_bit(PG_slub_debug, &page->flags); } static inline __attribute__((always_inline)) void __SetPageSlubDebug(struct page *page) { __set_bit(PG_slub_debug, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSlubDebug(struct page *page) { __clear_bit(PG_slub_debug, &page->flags); }
12328
12329
12330
12331
12332
12333
12334static inline __attribute__((always_inline)) int PagePrivate(struct page *page) { return test_bit(PG_private, &page->flags); } static inline __attribute__((always_inline)) void SetPagePrivate(struct page *page) { set_bit(PG_private, &page->flags); } static inline __attribute__((always_inline)) void ClearPagePrivate(struct page *page) { clear_bit(PG_private, &page->flags); } static inline __attribute__((always_inline)) void __SetPagePrivate(struct page *page) { __set_bit(PG_private, &page->flags); }
12335 static inline __attribute__((always_inline)) void __ClearPagePrivate(struct page *page) { __clear_bit(PG_private, &page->flags); }
12336static inline __attribute__((always_inline)) int PagePrivate2(struct page *page) { return test_bit(PG_private_2, &page->flags); } static inline __attribute__((always_inline)) void SetPagePrivate2(struct page *page) { set_bit(PG_private_2, &page->flags); } static inline __attribute__((always_inline)) void ClearPagePrivate2(struct page *page) { clear_bit(PG_private_2, &page->flags); } static inline __attribute__((always_inline)) int TestSetPagePrivate2(struct page *page) { return test_and_set_bit(PG_private_2, &page->flags); } static inline __attribute__((always_inline)) int TestClearPagePrivate2(struct page *page) { return test_and_clear_bit(PG_private_2, &page->flags); }
12337static inline __attribute__((always_inline)) int PageOwnerPriv1(struct page *page) { return test_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) void SetPageOwnerPriv1(struct page *page) { set_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) void ClearPageOwnerPriv1(struct page *page) { clear_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageOwnerPriv1(struct page *page) { return test_and_clear_bit(PG_owner_priv_1, &page->flags); }
12338
12339
12340
12341
12342
12343static inline __attribute__((always_inline)) int PageWriteback(struct page *page) { return test_bit(PG_writeback, &page->flags); } static inline __attribute__((always_inline)) int TestSetPageWriteback(struct page *page) { return test_and_set_bit(PG_writeback, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageWriteback(struct page *page) { return test_and_clear_bit(PG_writeback, &page->flags); }
12344static inline __attribute__((always_inline)) int PageBuddy(struct page *page) { return test_bit(PG_buddy, &page->flags); } static inline __attribute__((always_inline)) void __SetPageBuddy(struct page *page) { __set_bit(PG_buddy, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageBuddy(struct page *page) { __clear_bit(PG_buddy, &page->flags); }
12345static inline __attribute__((always_inline)) int PageMappedToDisk(struct page *page) { return test_bit(PG_mappedtodisk, &page->flags); } static inline __attribute__((always_inline)) void SetPageMappedToDisk(struct page *page) { set_bit(PG_mappedtodisk, &page->flags); } static inline __attribute__((always_inline)) void ClearPageMappedToDisk(struct page *page) { clear_bit(PG_mappedtodisk, &page->flags); }
12346
12347
12348static inline __attribute__((always_inline)) int PageReclaim(struct page *page) { return test_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) void SetPageReclaim(struct page *page) { set_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReclaim(struct page *page) { clear_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageReclaim(struct page *page) { return test_and_clear_bit(PG_reclaim, &page->flags); }
12349static inline __attribute__((always_inline)) int PageReadahead(struct page *page) { return test_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) void SetPageReadahead(struct page *page) { set_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReadahead(struct page *page) { clear_bit(PG_reclaim, &page->flags); }
12350# 249 "include/linux/page-flags.h"
12351static inline __attribute__((always_inline)) int PageHighMem(struct page *page) { return 0; }
12352
12353
12354
12355
12356
12357static inline __attribute__((always_inline)) int PageSwapCache(struct page *page) { return 0; }
12358 static inline __attribute__((always_inline)) void SetPageSwapCache(struct page *page) { } static inline __attribute__((always_inline)) void ClearPageSwapCache(struct page *page) { }
12359
12360
12361static inline __attribute__((always_inline)) int PageUnevictable(struct page *page) { return test_bit(PG_unevictable, &page->flags); } static inline __attribute__((always_inline)) void SetPageUnevictable(struct page *page) { set_bit(PG_unevictable, &page->flags); } static inline __attribute__((always_inline)) void ClearPageUnevictable(struct page *page) { clear_bit(PG_unevictable, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageUnevictable(struct page *page) { __clear_bit(PG_unevictable, &page->flags); }
12362 static inline __attribute__((always_inline)) int TestClearPageUnevictable(struct page *page) { return test_and_clear_bit(PG_unevictable, &page->flags); }
12363
12364
12365
12366
12367
12368
12369
12370static inline __attribute__((always_inline)) int PageMlocked(struct page *page) { return 0; } static inline __attribute__((always_inline)) void SetPageMlocked(struct page *page) { }
12371 static inline __attribute__((always_inline)) int TestClearPageMlocked(struct page *page) { return 0; } static inline __attribute__((always_inline)) int __TestClearPageMlocked(struct page *page) { return 0; }
12372
12373
12374
12375
12376
12377static inline __attribute__((always_inline)) int PageUncached(struct page *page) { return 0; }
12378
12379
12380
12381
12382
12383
12384
12385static inline __attribute__((always_inline)) int PageHWPoison(struct page *page) { return 0; }
12386
12387
12388
12389static inline __attribute__((always_inline)) int PageUptodate(struct page *page)
12390{
12391 int ret = test_bit(PG_uptodate, &(page)->flags);
12392# 299 "include/linux/page-flags.h"
12393 if (ret)
12394 __asm__ __volatile__("": : :"memory");
12395
12396 return ret;
12397}
12398
12399static inline __attribute__((always_inline)) void __SetPageUptodate(struct page *page)
12400{
12401 __asm__ __volatile__("": : :"memory");
12402 __set_bit(PG_uptodate, &(page)->flags);
12403}
12404
12405static inline __attribute__((always_inline)) void SetPageUptodate(struct page *page)
12406{
12407# 325 "include/linux/page-flags.h"
12408 __asm__ __volatile__("": : :"memory");
12409 set_bit(PG_uptodate, &(page)->flags);
12410
12411}
12412
12413static inline __attribute__((always_inline)) void ClearPageUptodate(struct page *page) { clear_bit(PG_uptodate, &page->flags); }
12414
12415extern void cancel_dirty_page(struct page *page, unsigned int account_size);
12416
12417int test_clear_page_writeback(struct page *page);
12418int test_set_page_writeback(struct page *page);
12419
12420static inline __attribute__((always_inline)) void set_page_writeback(struct page *page)
12421{
12422 test_set_page_writeback(page);
12423}
12424# 349 "include/linux/page-flags.h"
12425static inline __attribute__((always_inline)) int PageHead(struct page *page) { return test_bit(PG_head, &page->flags); } static inline __attribute__((always_inline)) void __SetPageHead(struct page *page) { __set_bit(PG_head, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageHead(struct page *page) { __clear_bit(PG_head, &page->flags); }
12426static inline __attribute__((always_inline)) int PageTail(struct page *page) { return test_bit(PG_tail, &page->flags); } static inline __attribute__((always_inline)) void __SetPageTail(struct page *page) { __set_bit(PG_tail, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageTail(struct page *page) { __clear_bit(PG_tail, &page->flags); }
12427
12428static inline __attribute__((always_inline)) int PageCompound(struct page *page)
12429{
12430 return page->flags & ((1L << PG_head) | (1L << PG_tail));
12431
12432}
12433# 429 "include/linux/page-flags.h"
12434static inline __attribute__((always_inline)) int page_has_private(struct page *page)
12435{
12436 return !!(page->flags & (1 << PG_private | 1 << PG_private_2));
12437}
12438# 236 "include/linux/mm.h" 2
12439# 253 "include/linux/mm.h"
12440static inline __attribute__((always_inline)) int put_page_testzero(struct page *page)
12441{
12442 do { } while (0);
12443 return (atomic_sub_return(1, (&page->_count)) == 0);
12444}
12445
12446
12447
12448
12449
12450static inline __attribute__((always_inline)) int get_page_unless_zero(struct page *page)
12451{
12452 return ({ int c, old; c = (((&page->_count))->counter); while (c != (0) && (old = (((__typeof__(*((&((((&page->_count)))->counter)))))__cmpxchg_local_generic(((&((((&page->_count)))->counter))), (unsigned long)(((c))), (unsigned long)(((c + (1)))), sizeof(*((&((((&page->_count)))->counter)))))))) != c) c = old; c != (0); });
12453}
12454
12455
12456struct page *vmalloc_to_page(const void *addr);
12457unsigned long vmalloc_to_pfn(const void *addr);
12458
12459
12460
12461
12462
12463
12464
12465static inline __attribute__((always_inline)) int is_vmalloc_addr(const void *x)
12466{
12467
12468
12469
12470
12471
12472 return 0;
12473
12474}
12475
12476
12477
12478static inline __attribute__((always_inline)) int is_vmalloc_or_module_addr(const void *x)
12479{
12480 return 0;
12481}
12482
12483
12484static inline __attribute__((always_inline)) struct page *compound_head(struct page *page)
12485{
12486 if (__builtin_expect(!!(PageTail(page)), 0))
12487 return page->first_page;
12488 return page;
12489}
12490
12491static inline __attribute__((always_inline)) int page_count(struct page *page)
12492{
12493 return ((&compound_head(page)->_count)->counter);
12494}
12495
12496static inline __attribute__((always_inline)) void get_page(struct page *page)
12497{
12498 page = compound_head(page);
12499 do { } while (0);
12500 atomic_inc(&page->_count);
12501}
12502
12503static inline __attribute__((always_inline)) struct page *virt_to_head_page(const void *x)
12504{
12505 struct page *page = (mem_map + (((unsigned long)(x)-(0)) >> 12));
12506 return compound_head(page);
12507}
12508
12509
12510
12511
12512
12513static inline __attribute__((always_inline)) void init_page_count(struct page *page)
12514{
12515 (((&page->_count)->counter) = (1));
12516}
12517
12518void put_page(struct page *page);
12519void put_pages_list(struct list_head *pages);
12520
12521void split_page(struct page *page, unsigned int order);
12522
12523
12524
12525
12526
12527
12528typedef void compound_page_dtor(struct page *);
12529
12530static inline __attribute__((always_inline)) void set_compound_page_dtor(struct page *page,
12531 compound_page_dtor *dtor)
12532{
12533 page[1].lru.next = (void *)dtor;
12534}
12535
12536static inline __attribute__((always_inline)) compound_page_dtor *get_compound_page_dtor(struct page *page)
12537{
12538 return (compound_page_dtor *)page[1].lru.next;
12539}
12540
12541static inline __attribute__((always_inline)) int compound_order(struct page *page)
12542{
12543 if (!PageHead(page))
12544 return 0;
12545 return (unsigned long)page[1].lru.prev;
12546}
12547
12548static inline __attribute__((always_inline)) void set_compound_order(struct page *page, unsigned long order)
12549{
12550 page[1].lru.prev = (void *)order;
12551}
12552# 511 "include/linux/mm.h"
12553static inline __attribute__((always_inline)) enum zone_type page_zonenum(struct page *page)
12554{
12555 return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0))) & ((1UL << 2) - 1);
12556}
12557# 524 "include/linux/mm.h"
12558static inline __attribute__((always_inline)) int page_zone_id(struct page *page)
12559{
12560 return (page->flags >> ((((((sizeof(unsigned long)*8) - 0) - 0) < ((((sizeof(unsigned long)*8) - 0) - 0) - 2))? (((sizeof(unsigned long)*8) - 0) - 0) : ((((sizeof(unsigned long)*8) - 0) - 0) - 2)) * ((0 + 2) != 0))) & ((1UL << (0 + 2)) - 1);
12561}
12562
12563static inline __attribute__((always_inline)) int zone_to_nid(struct zone *zone)
12564{
12565
12566
12567
12568 return 0;
12569
12570}
12571
12572
12573
12574
12575static inline __attribute__((always_inline)) int page_to_nid(struct page *page)
12576{
12577 return (page->flags >> ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))) & ((1UL << 0) - 1);
12578}
12579
12580
12581static inline __attribute__((always_inline)) struct zone *page_zone(struct page *page)
12582{
12583 return &(&contig_page_data)->node_zones[page_zonenum(page)];
12584}
12585# 559 "include/linux/mm.h"
12586static inline __attribute__((always_inline)) void set_page_zone(struct page *page, enum zone_type zone)
12587{
12588 page->flags &= ~(((1UL << 2) - 1) << (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0)));
12589 page->flags |= (zone & ((1UL << 2) - 1)) << (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0));
12590}
12591
12592static inline __attribute__((always_inline)) void set_page_node(struct page *page, unsigned long node)
12593{
12594 page->flags &= ~(((1UL << 0) - 1) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0)));
12595 page->flags |= (node & ((1UL << 0) - 1)) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0));
12596}
12597
12598static inline __attribute__((always_inline)) void set_page_section(struct page *page, unsigned long section)
12599{
12600 page->flags &= ~(((1UL << 0) - 1) << (((sizeof(unsigned long)*8) - 0) * (0 != 0)));
12601 page->flags |= (section & ((1UL << 0) - 1)) << (((sizeof(unsigned long)*8) - 0) * (0 != 0));
12602}
12603
12604static inline __attribute__((always_inline)) void set_page_links(struct page *page, enum zone_type zone,
12605 unsigned long node, unsigned long pfn)
12606{
12607 set_page_zone(page, zone);
12608 set_page_node(page, node);
12609 set_page_section(page, ((pfn) >> 0));
12610}
12611
12612
12613
12614
12615# 1 "include/linux/vmstat.h" 1
12616
12617
12618
12619
12620
12621# 1 "include/linux/mm.h" 1
12622# 7 "include/linux/vmstat.h" 2
12623# 31 "include/linux/vmstat.h"
12624enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
12625 PGALLOC_DMA, PGALLOC_NORMAL , PGALLOC_MOVABLE,
12626 PGFREE, PGACTIVATE, PGDEACTIVATE,
12627 PGFAULT, PGMAJFAULT,
12628 PGREFILL_DMA, PGREFILL_NORMAL , PGREFILL_MOVABLE,
12629 PGSTEAL_DMA, PGSTEAL_NORMAL , PGSTEAL_MOVABLE,
12630 PGSCAN_KSWAPD_DMA, PGSCAN_KSWAPD_NORMAL , PGSCAN_KSWAPD_MOVABLE,
12631 PGSCAN_DIRECT_DMA, PGSCAN_DIRECT_NORMAL , PGSCAN_DIRECT_MOVABLE,
12632
12633
12634
12635 PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL,
12636 PAGEOUTRUN, ALLOCSTALL, PGROTATED,
12637
12638
12639
12640 UNEVICTABLE_PGCULLED,
12641 UNEVICTABLE_PGSCANNED,
12642 UNEVICTABLE_PGRESCUED,
12643 UNEVICTABLE_PGMLOCKED,
12644 UNEVICTABLE_PGMUNLOCKED,
12645 UNEVICTABLE_PGCLEARED,
12646 UNEVICTABLE_PGSTRANDED,
12647 UNEVICTABLE_MLOCKFREED,
12648 NR_VM_EVENT_ITEMS
12649};
12650
12651extern int sysctl_stat_interval;
12652# 71 "include/linux/vmstat.h"
12653struct vm_event_state {
12654 unsigned long event[NR_VM_EVENT_ITEMS];
12655};
12656
12657extern __attribute__((section(".discard"), unused)) char __pcpu_scope_vm_event_states; extern __attribute__((section(".data" ""))) __typeof__(struct vm_event_state) per_cpu__vm_event_states;
12658
12659static inline __attribute__((always_inline)) void __count_vm_event(enum vm_event_item item)
12660{
12661 per_cpu__vm_event_states.event[item]++;
12662}
12663
12664static inline __attribute__((always_inline)) void count_vm_event(enum vm_event_item item)
12665{
12666 (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &per_cpu__vm_event_states; })).event[item]++;
12667 do { } while (0);
12668}
12669
12670static inline __attribute__((always_inline)) void __count_vm_events(enum vm_event_item item, long delta)
12671{
12672 per_cpu__vm_event_states.event[item] += delta;
12673}
12674
12675static inline __attribute__((always_inline)) void count_vm_events(enum vm_event_item item, long delta)
12676{
12677 (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &per_cpu__vm_event_states; })).event[item] += delta;
12678 do { } while (0);
12679}
12680
12681extern void all_vm_events(unsigned long *);
12682
12683
12684
12685static inline __attribute__((always_inline)) void vm_events_fold_cpu(int cpu)
12686{
12687}
12688# 139 "include/linux/vmstat.h"
12689extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
12690
12691static inline __attribute__((always_inline)) void zone_page_state_add(long x, struct zone *zone,
12692 enum zone_stat_item item)
12693{
12694 atomic_long_add(x, &zone->vm_stat[item]);
12695 atomic_long_add(x, &vm_stat[item]);
12696}
12697
12698static inline __attribute__((always_inline)) unsigned long global_page_state(enum zone_stat_item item)
12699{
12700 long x = atomic_long_read(&vm_stat[item]);
12701
12702
12703
12704
12705 return x;
12706}
12707
12708static inline __attribute__((always_inline)) unsigned long zone_page_state(struct zone *zone,
12709 enum zone_stat_item item)
12710{
12711 long x = atomic_long_read(&zone->vm_stat[item]);
12712
12713
12714
12715
12716 return x;
12717}
12718
12719extern unsigned long global_reclaimable_pages(void);
12720extern unsigned long zone_reclaimable_pages(struct zone *zone);
12721# 209 "include/linux/vmstat.h"
12722static inline __attribute__((always_inline)) void zap_zone_vm_stats(struct zone *zone)
12723{
12724 memset(zone->vm_stat, 0, sizeof(zone->vm_stat));
12725}
12726
12727extern void inc_zone_state(struct zone *, enum zone_stat_item);
12728# 237 "include/linux/vmstat.h"
12729static inline __attribute__((always_inline)) void __mod_zone_page_state(struct zone *zone,
12730 enum zone_stat_item item, int delta)
12731{
12732 zone_page_state_add(delta, zone, item);
12733}
12734
12735static inline __attribute__((always_inline)) void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
12736{
12737 atomic_long_inc(&zone->vm_stat[item]);
12738 atomic_long_inc(&vm_stat[item]);
12739}
12740
12741static inline __attribute__((always_inline)) void __inc_zone_page_state(struct page *page,
12742 enum zone_stat_item item)
12743{
12744 __inc_zone_state(page_zone(page), item);
12745}
12746
12747static inline __attribute__((always_inline)) void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
12748{
12749 atomic_long_dec(&zone->vm_stat[item]);
12750 atomic_long_dec(&vm_stat[item]);
12751}
12752
12753static inline __attribute__((always_inline)) void __dec_zone_page_state(struct page *page,
12754 enum zone_stat_item item)
12755{
12756 __dec_zone_state(page_zone(page), item);
12757}
12758# 275 "include/linux/vmstat.h"
12759static inline __attribute__((always_inline)) void refresh_cpu_vm_stats(int cpu) { }
12760# 589 "include/linux/mm.h" 2
12761
12762static inline __attribute__((always_inline)) __attribute__((always_inline)) void *lowmem_page_address(struct page *page)
12763{
12764 return ((void *)((unsigned long)(((unsigned long)((page) - mem_map) + (0UL)) << 12) + (0)));
12765}
12766# 631 "include/linux/mm.h"
12767extern struct address_space swapper_space;
12768static inline __attribute__((always_inline)) struct address_space *page_mapping(struct page *page)
12769{
12770 struct address_space *mapping = page->mapping;
12771
12772 do { } while (0);
12773
12774
12775
12776
12777
12778 if (__builtin_expect(!!((unsigned long)mapping & 1), 0))
12779 mapping = ((void *)0);
12780 return mapping;
12781}
12782
12783static inline __attribute__((always_inline)) int PageAnon(struct page *page)
12784{
12785 return ((unsigned long)page->mapping & 1) != 0;
12786}
12787
12788
12789
12790
12791
12792static inline __attribute__((always_inline)) unsigned long page_index(struct page *page)
12793{
12794 if (__builtin_expect(!!(PageSwapCache(page)), 0))
12795 return ((page)->private);
12796 return page->index;
12797}
12798
12799
12800
12801
12802
12803
12804static inline __attribute__((always_inline)) void reset_page_mapcount(struct page *page)
12805{
12806 (((&(page)->_mapcount)->counter) = (-1));
12807}
12808
12809static inline __attribute__((always_inline)) int page_mapcount(struct page *page)
12810{
12811 return ((&(page)->_mapcount)->counter) + 1;
12812}
12813
12814
12815
12816
12817static inline __attribute__((always_inline)) int page_mapped(struct page *page)
12818{
12819 return ((&(page)->_mapcount)->counter) >= 0;
12820}
12821# 708 "include/linux/mm.h"
12822extern void pagefault_out_of_memory(void);
12823
12824
12825
12826extern void show_free_areas(void);
12827
12828int shmem_lock(struct file *file, int lock, struct user_struct *user);
12829struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
12830int shmem_zero_setup(struct vm_area_struct *);
12831
12832
12833extern unsigned long shmem_get_unmapped_area(struct file *file,
12834 unsigned long addr,
12835 unsigned long len,
12836 unsigned long pgoff,
12837 unsigned long flags);
12838
12839
12840extern int can_do_mlock(void);
12841extern int user_shm_lock(size_t, struct user_struct *);
12842extern void user_shm_unlock(size_t, struct user_struct *);
12843
12844
12845
12846
12847struct zap_details {
12848 struct vm_area_struct *nonlinear_vma;
12849 struct address_space *check_mapping;
12850 unsigned long first_index;
12851 unsigned long last_index;
12852 spinlock_t *i_mmap_lock;
12853 unsigned long truncate_count;
12854};
12855
12856struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
12857 pte_t pte);
12858
12859int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
12860 unsigned long size);
12861unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address,
12862 unsigned long size, struct zap_details *);
12863unsigned long unmap_vmas(struct mmu_gather **tlb,
12864 struct vm_area_struct *start_vma, unsigned long start_addr,
12865 unsigned long end_addr, unsigned long *nr_accounted,
12866 struct zap_details *);
12867# 764 "include/linux/mm.h"
12868struct mm_walk {
12869 int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *);
12870 int (*pud_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *);
12871 int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *);
12872 int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *);
12873 int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *);
12874 struct mm_struct *mm;
12875 void *private;
12876};
12877
12878int walk_page_range(unsigned long addr, unsigned long end,
12879 struct mm_walk *walk);
12880void free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
12881 unsigned long end, unsigned long floor, unsigned long ceiling);
12882int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
12883 struct vm_area_struct *vma);
12884void unmap_mapping_range(struct address_space *mapping,
12885 loff_t const holebegin, loff_t const holelen, int even_cows);
12886int follow_pfn(struct vm_area_struct *vma, unsigned long address,
12887 unsigned long *pfn);
12888int follow_phys(struct vm_area_struct *vma, unsigned long address,
12889 unsigned int flags, unsigned long *prot, resource_size_t *phys);
12890int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
12891 void *buf, int len, int write);
12892
12893static inline __attribute__((always_inline)) void unmap_shared_mapping_range(struct address_space *mapping,
12894 loff_t const holebegin, loff_t const holelen)
12895{
12896 unmap_mapping_range(mapping, holebegin, holelen, 0);
12897}
12898
12899extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new);
12900extern int vmtruncate(struct inode *inode, loff_t offset);
12901extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end);
12902
12903int truncate_inode_page(struct address_space *mapping, struct page *page);
12904int generic_error_remove_page(struct address_space *mapping, struct page *page);
12905
12906int invalidate_inode_page(struct page *page);
12907
12908
12909
12910
12911
12912static inline __attribute__((always_inline)) int handle_mm_fault(struct mm_struct *mm,
12913 struct vm_area_struct *vma, unsigned long address,
12914 unsigned int flags)
12915{
12916
12917 do { asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/mm.h"), "i"(813), "i"(0), "i"(sizeof(struct bug_entry))); for (;;); } while (0);
12918 return 0x0002;
12919}
12920
12921
12922extern int make_pages_present(unsigned long addr, unsigned long end);
12923extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
12924
12925int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
12926 unsigned long start, int nr_pages, int write, int force,
12927 struct page **pages, struct vm_area_struct **vmas);
12928int get_user_pages_fast(unsigned long start, int nr_pages, int write,
12929 struct page **pages);
12930struct page *get_dump_page(unsigned long addr);
12931
12932extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
12933extern void do_invalidatepage(struct page *page, unsigned long offset);
12934
12935int __set_page_dirty_nobuffers(struct page *page);
12936int __set_page_dirty_no_writeback(struct page *page);
12937int redirty_page_for_writepage(struct writeback_control *wbc,
12938 struct page *page);
12939void account_page_dirtied(struct page *page, struct address_space *mapping);
12940int set_page_dirty(struct page *page);
12941int set_page_dirty_lock(struct page *page);
12942int clear_page_dirty_for_io(struct page *page);
12943
12944extern unsigned long move_page_tables(struct vm_area_struct *vma,
12945 unsigned long old_addr, struct vm_area_struct *new_vma,
12946 unsigned long new_addr, unsigned long len);
12947extern unsigned long do_mremap(unsigned long addr,
12948 unsigned long old_len, unsigned long new_len,
12949 unsigned long flags, unsigned long new_addr);
12950extern int mprotect_fixup(struct vm_area_struct *vma,
12951 struct vm_area_struct **pprev, unsigned long start,
12952 unsigned long end, unsigned long newflags);
12953
12954
12955
12956
12957int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
12958 struct page **pages);
12959# 871 "include/linux/mm.h"
12960struct shrinker {
12961 int (*shrink)(int nr_to_scan, gfp_t gfp_mask);
12962 int seeks;
12963
12964
12965 struct list_head list;
12966 long nr;
12967};
12968
12969extern void register_shrinker(struct shrinker *);
12970extern void unregister_shrinker(struct shrinker *);
12971
12972int vma_wants_writenotify(struct vm_area_struct *vma);
12973
12974extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl);
12975
12976
12977static inline __attribute__((always_inline)) int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
12978 unsigned long address)
12979{
12980 return 0;
12981}
12982# 904 "include/linux/mm.h"
12983int __pmd_alloc(struct mm_struct *mm, pgd_t *pud, unsigned long address);
12984
12985
12986int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address);
12987int __pte_alloc_kernel(pmd_t *pmd, unsigned long address);
12988# 950 "include/linux/mm.h"
12989static inline __attribute__((always_inline)) void pgtable_page_ctor(struct page *page)
12990{
12991 do {} while (0);
12992 __inc_zone_page_state(page, NR_PAGETABLE);
12993}
12994
12995static inline __attribute__((always_inline)) void pgtable_page_dtor(struct page *page)
12996{
12997 do {} while (0);
12998 __dec_zone_page_state(page, NR_PAGETABLE);
12999}
13000# 988 "include/linux/mm.h"
13001extern void free_area_init(unsigned long * zones_size);
13002extern void free_area_init_node(int nid, unsigned long * zones_size,
13003 unsigned long zone_start_pfn, unsigned long *zholes_size);
13004# 1039 "include/linux/mm.h"
13005static inline __attribute__((always_inline)) int __early_pfn_to_nid(unsigned long pfn)
13006{
13007 return 0;
13008}
13009# 1052 "include/linux/mm.h"
13010extern void set_dma_reserve(unsigned long new_dma_reserve);
13011extern void memmap_init_zone(unsigned long, int, unsigned long,
13012 unsigned long, enum memmap_context);
13013extern void setup_per_zone_wmarks(void);
13014extern void calculate_zone_inactive_ratio(struct zone *zone);
13015extern void mem_init(void);
13016extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) mmap_init(void);
13017extern void show_mem(void);
13018extern void si_meminfo(struct sysinfo * val);
13019extern void si_meminfo_node(struct sysinfo *val, int nid);
13020extern int after_bootmem;
13021
13022
13023
13024
13025static inline __attribute__((always_inline)) void setup_per_cpu_pageset(void) {}
13026
13027
13028extern void zone_pcp_update(struct zone *zone);
13029
13030
13031extern atomic_long_t mmap_pages_allocated;
13032
13033
13034void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
13035void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);
13036void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *);
13037struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma,
13038 struct prio_tree_iter *iter);
13039
13040
13041
13042
13043
13044static inline __attribute__((always_inline)) void vma_nonlinear_insert(struct vm_area_struct *vma,
13045 struct list_head *list)
13046{
13047 vma->shared.vm_set.parent = ((void *)0);
13048 list_add_tail(&vma->shared.vm_set.list, list);
13049}
13050
13051
13052extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin);
13053extern void vma_adjust(struct vm_area_struct *vma, unsigned long start,
13054 unsigned long end, unsigned long pgoff, struct vm_area_struct *insert);
13055extern struct vm_area_struct *vma_merge(struct mm_struct *,
13056 struct vm_area_struct *prev, unsigned long addr, unsigned long end,
13057 unsigned long vm_flags, struct anon_vma *, struct file *, unsigned long,
13058 struct mempolicy *);
13059extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
13060extern int split_vma(struct mm_struct *,
13061 struct vm_area_struct *, unsigned long addr, int new_below);
13062extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
13063extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
13064 struct rb_node **, struct rb_node *);
13065extern void unlink_file_vma(struct vm_area_struct *);
13066extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
13067 unsigned long addr, unsigned long len, unsigned long pgoff);
13068extern void exit_mmap(struct mm_struct *);
13069
13070extern int mm_take_all_locks(struct mm_struct *mm);
13071extern void mm_drop_all_locks(struct mm_struct *mm);
13072
13073
13074
13075extern void added_exe_file_vma(struct mm_struct *mm);
13076extern void removed_exe_file_vma(struct mm_struct *mm);
13077# 1127 "include/linux/mm.h"
13078extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
13079extern int install_special_mapping(struct mm_struct *mm,
13080 unsigned long addr, unsigned long len,
13081 unsigned long flags, struct page **pages);
13082
13083extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
13084
13085extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
13086 unsigned long len, unsigned long prot,
13087 unsigned long flag, unsigned long pgoff);
13088extern unsigned long mmap_region(struct file *file, unsigned long addr,
13089 unsigned long len, unsigned long flags,
13090 unsigned int vm_flags, unsigned long pgoff);
13091
13092static inline __attribute__((always_inline)) unsigned long do_mmap(struct file *file, unsigned long addr,
13093 unsigned long len, unsigned long prot,
13094 unsigned long flag, unsigned long offset)
13095{
13096 unsigned long ret = -22;
13097 if ((offset + (((len)+((typeof(len))((1UL << 12))-1))&~((typeof(len))((1UL << 12))-1))) < offset)
13098 goto out;
13099 if (!(offset & ~(~((1UL << 12)-1))))
13100 ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> 12);
13101out:
13102 return ret;
13103}
13104
13105extern int do_munmap(struct mm_struct *, unsigned long, size_t);
13106
13107extern unsigned long do_brk(unsigned long, unsigned long);
13108
13109
13110extern unsigned long page_unuse(struct page *);
13111extern void truncate_inode_pages(struct address_space *, loff_t);
13112extern void truncate_inode_pages_range(struct address_space *,
13113 loff_t lstart, loff_t lend);
13114
13115
13116extern int filemap_fault(struct vm_area_struct *, struct vm_fault *);
13117
13118
13119int write_one_page(struct page *page, int wait);
13120void task_dirty_inc(struct task_struct *tsk);
13121
13122
13123
13124
13125
13126int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
13127 unsigned long offset, unsigned long nr_to_read);
13128
13129void page_cache_sync_readahead(struct address_space *mapping,
13130 struct file_ra_state *ra,
13131 struct file *filp,
13132 unsigned long offset,
13133 unsigned long size);
13134
13135void page_cache_async_readahead(struct address_space *mapping,
13136 struct file_ra_state *ra,
13137 struct file *filp,
13138 struct page *pg,
13139 unsigned long offset,
13140 unsigned long size);
13141
13142unsigned long max_sane_readahead(unsigned long nr);
13143unsigned long ra_submit(struct file_ra_state *ra,
13144 struct address_space *mapping,
13145 struct file *filp);
13146
13147
13148extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
13149
13150
13151
13152extern int expand_stack_downwards(struct vm_area_struct *vma,
13153 unsigned long address);
13154
13155
13156extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
13157extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
13158 struct vm_area_struct **pprev);
13159
13160
13161
13162static inline __attribute__((always_inline)) struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
13163{
13164 struct vm_area_struct * vma = find_vma(mm,start_addr);
13165
13166 if (vma && end_addr <= vma->vm_start)
13167 vma = ((void *)0);
13168 return vma;
13169}
13170
13171static inline __attribute__((always_inline)) unsigned long vma_pages(struct vm_area_struct *vma)
13172{
13173 return (vma->vm_end - vma->vm_start) >> 12;
13174}
13175
13176pgprot_t vm_get_page_prot(unsigned long vm_flags);
13177struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
13178int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
13179 unsigned long pfn, unsigned long size, pgprot_t);
13180int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
13181int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
13182 unsigned long pfn);
13183int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
13184 unsigned long pfn);
13185
13186struct page *follow_page(struct vm_area_struct *, unsigned long address,
13187 unsigned int foll_flags);
13188
13189
13190
13191
13192
13193
13194typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
13195 void *data);
13196extern int apply_to_page_range(struct mm_struct *mm, unsigned long address,
13197 unsigned long size, pte_fn_t fn, void *data);
13198
13199
13200void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
13201# 1258 "include/linux/mm.h"
13202extern int debug_pagealloc_enabled;
13203
13204extern void kernel_map_pages(struct page *page, int numpages, int enable);
13205
13206static inline __attribute__((always_inline)) void enable_debug_pagealloc(void)
13207{
13208 debug_pagealloc_enabled = 1;
13209}
13210# 1280 "include/linux/mm.h"
13211extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
13212
13213
13214
13215
13216int in_gate_area_no_task(unsigned long addr);
13217
13218
13219
13220int drop_caches_sysctl_handler(struct ctl_table *, int,
13221 void *, size_t *, loff_t *);
13222unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
13223 unsigned long lru_pages);
13224void drop_pagecache(void);
13225
13226
13227
13228
13229
13230
13231
13232const char * arch_vma_name(struct vm_area_struct *vma);
13233void print_vma_addr(char *prefix, unsigned long rip);
13234
13235struct page *sparse_mem_map_populate(unsigned long pnum, int nid);
13236pgd_t *vmemmap_pgd_populate(unsigned long addr, int node);
13237pgd_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node);
13238pmd_t *vmemmap_pmd_populate(pgd_t *pud, unsigned long addr, int node);
13239pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node);
13240void *vmemmap_alloc_block(unsigned long size, int node);
13241void vmemmap_verify(pte_t *, int, unsigned long, unsigned long);
13242int vmemmap_populate_basepages(struct page *start_page,
13243 unsigned long pages, int node);
13244int vmemmap_populate(struct page *start_page, unsigned long pages, int node);
13245void vmemmap_populate_print_last(void);
13246
13247extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim,
13248 size_t size);
13249extern void refund_locked_memory(struct mm_struct *mm, size_t size);
13250
13251extern void memory_failure(unsigned long pfn, int trapno);
13252extern int __memory_failure(unsigned long pfn, int trapno, int ref);
13253extern int sysctl_memory_failure_early_kill;
13254extern int sysctl_memory_failure_recovery;
13255extern atomic_long_t mce_bad_pages;
13256# 8 "include/linux/pagemap.h" 2
13257
13258
13259# 1 "include/linux/highmem.h" 1
13260
13261
13262
13263
13264
13265# 1 "include/linux/uaccess.h" 1
13266
13267
13268
13269
13270# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h" 1
13271# 15 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
13272# 1 "include/linux/sched.h" 1
13273# 46 "include/linux/sched.h"
13274struct sched_param {
13275 int sched_priority;
13276};
13277
13278# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/param.h" 1
13279# 51 "include/linux/sched.h" 2
13280# 68 "include/linux/sched.h"
13281# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cputime.h" 1
13282# 1 "include/asm-generic/cputime.h" 1
13283
13284
13285
13286
13287
13288
13289typedef unsigned long cputime_t;
13290# 25 "include/asm-generic/cputime.h"
13291typedef u64 cputime64_t;
13292# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cputime.h" 2
13293# 69 "include/linux/sched.h" 2
13294
13295
13296# 1 "include/linux/sem.h" 1
13297
13298
13299
13300# 1 "include/linux/ipc.h" 1
13301# 9 "include/linux/ipc.h"
13302struct ipc_perm
13303{
13304 __kernel_key_t key;
13305 __kernel_uid_t uid;
13306 __kernel_gid_t gid;
13307 __kernel_uid_t cuid;
13308 __kernel_gid_t cgid;
13309 __kernel_mode_t mode;
13310 unsigned short seq;
13311};
13312
13313
13314# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/ipcbuf.h" 1
13315# 1 "include/asm-generic/ipcbuf.h" 1
13316# 19 "include/asm-generic/ipcbuf.h"
13317struct ipc64_perm {
13318 __kernel_key_t key;
13319 __kernel_uid32_t uid;
13320 __kernel_gid32_t gid;
13321 __kernel_uid32_t cuid;
13322 __kernel_gid32_t cgid;
13323 __kernel_mode_t mode;
13324
13325 unsigned char __pad1[4 - sizeof(__kernel_mode_t)];
13326 unsigned short seq;
13327 unsigned short __pad2;
13328 unsigned long __unused1;
13329 unsigned long __unused2;
13330};
13331# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/ipcbuf.h" 2
13332# 22 "include/linux/ipc.h" 2
13333# 57 "include/linux/ipc.h"
13334struct ipc_kludge {
13335 struct msgbuf *msgp;
13336 long msgtyp;
13337};
13338# 86 "include/linux/ipc.h"
13339struct kern_ipc_perm
13340{
13341 spinlock_t lock;
13342 int deleted;
13343 int id;
13344 key_t key;
13345 uid_t uid;
13346 gid_t gid;
13347 uid_t cuid;
13348 gid_t cgid;
13349 mode_t mode;
13350 unsigned long seq;
13351 void *security;
13352};
13353# 5 "include/linux/sem.h" 2
13354# 23 "include/linux/sem.h"
13355struct semid_ds {
13356 struct ipc_perm sem_perm;
13357 __kernel_time_t sem_otime;
13358 __kernel_time_t sem_ctime;
13359 struct sem *sem_base;
13360 struct sem_queue *sem_pending;
13361 struct sem_queue **sem_pending_last;
13362 struct sem_undo *undo;
13363 unsigned short sem_nsems;
13364};
13365
13366
13367# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/sembuf.h" 1
13368# 1 "include/asm-generic/sembuf.h" 1
13369
13370
13371
13372# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/bitsperlong.h" 1
13373# 5 "include/asm-generic/sembuf.h" 2
13374# 23 "include/asm-generic/sembuf.h"
13375struct semid64_ds {
13376 struct ipc64_perm sem_perm;
13377 __kernel_time_t sem_otime;
13378
13379 unsigned long __unused1;
13380
13381 __kernel_time_t sem_ctime;
13382
13383 unsigned long __unused2;
13384
13385 unsigned long sem_nsems;
13386 unsigned long __unused3;
13387 unsigned long __unused4;
13388};
13389# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/sembuf.h" 2
13390# 36 "include/linux/sem.h" 2
13391
13392
13393struct sembuf {
13394 unsigned short sem_num;
13395 short sem_op;
13396 short sem_flg;
13397};
13398
13399
13400union semun {
13401 int val;
13402 struct semid_ds *buf;
13403 unsigned short *array;
13404 struct seminfo *__buf;
13405 void *__pad;
13406};
13407
13408struct seminfo {
13409 int semmap;
13410 int semmni;
13411 int semmns;
13412 int semmnu;
13413 int semmsl;
13414 int semopm;
13415 int semume;
13416 int semusz;
13417 int semvmx;
13418 int semaem;
13419};
13420# 83 "include/linux/sem.h"
13421struct task_struct;
13422
13423
13424struct sem {
13425 int semval;
13426 int sempid;
13427};
13428
13429
13430struct sem_array {
13431 struct kern_ipc_perm sem_perm;
13432 time_t sem_otime;
13433 time_t sem_ctime;
13434 struct sem *sem_base;
13435 struct list_head sem_pending;
13436 struct list_head list_id;
13437 unsigned long sem_nsems;
13438};
13439
13440
13441struct sem_queue {
13442 struct list_head list;
13443 struct task_struct *sleeper;
13444 struct sem_undo *undo;
13445 int pid;
13446 int status;
13447 struct sembuf *sops;
13448 int nsops;
13449 int alter;
13450};
13451
13452
13453
13454
13455struct sem_undo {
13456 struct list_head list_proc;
13457
13458 struct rcu_head rcu;
13459 struct sem_undo_list *ulp;
13460 struct list_head list_id;
13461 int semid;
13462 short * semadj;
13463};
13464
13465
13466
13467
13468struct sem_undo_list {
13469 atomic_t refcnt;
13470 spinlock_t lock;
13471 struct list_head list_proc;
13472};
13473
13474struct sysv_sem {
13475 struct sem_undo_list *undo_list;
13476};
13477
13478
13479
13480
13481
13482
13483
13484static inline __attribute__((always_inline)) int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
13485{
13486 return 0;
13487}
13488
13489static inline __attribute__((always_inline)) void exit_sem(struct task_struct *tsk)
13490{
13491 return;
13492}
13493# 72 "include/linux/sched.h" 2
13494# 1 "include/linux/signal.h" 1
13495
13496
13497
13498# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/signal.h" 1
13499
13500
13501
13502
13503# 1 "include/asm-generic/signal.h" 1
13504# 93 "include/asm-generic/signal.h"
13505typedef struct {
13506 unsigned long sig[(64 / 32)];
13507} sigset_t;
13508
13509
13510typedef unsigned long old_sigset_t;
13511
13512# 1 "include/asm-generic/signal-defs.h" 1
13513# 17 "include/asm-generic/signal-defs.h"
13514typedef void __signalfn_t(int);
13515typedef __signalfn_t *__sighandler_t;
13516
13517typedef void __restorefn_t(void);
13518typedef __restorefn_t *__sigrestore_t;
13519# 101 "include/asm-generic/signal.h" 2
13520
13521struct sigaction {
13522 __sighandler_t sa_handler;
13523 unsigned long sa_flags;
13524
13525 __sigrestore_t sa_restorer;
13526
13527 sigset_t sa_mask;
13528};
13529
13530struct k_sigaction {
13531 struct sigaction sa;
13532};
13533
13534typedef struct sigaltstack {
13535 void *ss_sp;
13536 int ss_flags;
13537 size_t ss_size;
13538} stack_t;
13539
13540
13541
13542# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/sigcontext.h" 1
13543# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/sigcontext.h"
13544struct sigcontext {
13545 unsigned long sc_r0;
13546 unsigned long sc_r1;
13547 unsigned long sc_r2;
13548 unsigned long sc_r3;
13549 unsigned long sc_r4;
13550 unsigned long sc_r5;
13551 unsigned long sc_r6;
13552 unsigned long sc_r7;
13553 unsigned long sc_p0;
13554 unsigned long sc_p1;
13555 unsigned long sc_p2;
13556 unsigned long sc_p3;
13557 unsigned long sc_p4;
13558 unsigned long sc_p5;
13559 unsigned long sc_usp;
13560 unsigned long sc_a0w;
13561 unsigned long sc_a1w;
13562 unsigned long sc_a0x;
13563 unsigned long sc_a1x;
13564 unsigned long sc_astat;
13565 unsigned long sc_rets;
13566 unsigned long sc_pc;
13567 unsigned long sc_retx;
13568 unsigned long sc_fp;
13569 unsigned long sc_i0;
13570 unsigned long sc_i1;
13571 unsigned long sc_i2;
13572 unsigned long sc_i3;
13573 unsigned long sc_m0;
13574 unsigned long sc_m1;
13575 unsigned long sc_m2;
13576 unsigned long sc_m3;
13577 unsigned long sc_l0;
13578 unsigned long sc_l1;
13579 unsigned long sc_l2;
13580 unsigned long sc_l3;
13581 unsigned long sc_b0;
13582 unsigned long sc_b1;
13583 unsigned long sc_b2;
13584 unsigned long sc_b3;
13585 unsigned long sc_lc0;
13586 unsigned long sc_lc1;
13587 unsigned long sc_lt0;
13588 unsigned long sc_lt1;
13589 unsigned long sc_lb0;
13590 unsigned long sc_lb1;
13591 unsigned long sc_seqstat;
13592};
13593# 124 "include/asm-generic/signal.h" 2
13594# 6 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/signal.h" 2
13595# 5 "include/linux/signal.h" 2
13596# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/siginfo.h" 1
13597# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/siginfo.h"
13598# 1 "include/asm-generic/siginfo.h" 1
13599
13600
13601
13602
13603
13604
13605typedef union sigval {
13606 int sival_int;
13607 void *sival_ptr;
13608} sigval_t;
13609# 40 "include/asm-generic/siginfo.h"
13610typedef struct siginfo {
13611 int si_signo;
13612 int si_errno;
13613 int si_code;
13614
13615 union {
13616 int _pad[((128 - (3 * sizeof(int))) / sizeof(int))];
13617
13618
13619 struct {
13620 __kernel_pid_t _pid;
13621 __kernel_uid32_t _uid;
13622 } _kill;
13623
13624
13625 struct {
13626 __kernel_timer_t _tid;
13627 int _overrun;
13628 char _pad[sizeof( __kernel_uid32_t) - sizeof(int)];
13629 sigval_t _sigval;
13630 int _sys_private;
13631 } _timer;
13632
13633
13634 struct {
13635 __kernel_pid_t _pid;
13636 __kernel_uid32_t _uid;
13637 sigval_t _sigval;
13638 } _rt;
13639
13640
13641 struct {
13642 __kernel_pid_t _pid;
13643 __kernel_uid32_t _uid;
13644 int _status;
13645 __kernel_clock_t _utime;
13646 __kernel_clock_t _stime;
13647 } _sigchld;
13648
13649
13650 struct {
13651 void *_addr;
13652
13653
13654
13655 short _addr_lsb;
13656 } _sigfault;
13657
13658
13659 struct {
13660 long _band;
13661 int _fd;
13662 } _sigpoll;
13663 } _sifields;
13664} siginfo_t;
13665# 259 "include/asm-generic/siginfo.h"
13666typedef struct sigevent {
13667 sigval_t sigev_value;
13668 int sigev_signo;
13669 int sigev_notify;
13670 union {
13671 int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))];
13672 int _tid;
13673
13674 struct {
13675 void (*_function)(sigval_t);
13676 void *_attribute;
13677 } _sigev_thread;
13678 } _sigev_un;
13679} sigevent_t;
13680
13681
13682
13683
13684
13685
13686
13687struct siginfo;
13688void do_schedule_next_timer(struct siginfo *info);
13689
13690
13691
13692
13693
13694static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from)
13695{
13696 if (from->si_code < 0)
13697 memcpy(to, from, sizeof(*to));
13698 else
13699
13700 memcpy(to, from, (3 * sizeof(int)) + sizeof(from->_sifields._sigchld));
13701}
13702
13703
13704
13705extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from);
13706# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/siginfo.h" 2
13707# 6 "include/linux/signal.h" 2
13708# 14 "include/linux/signal.h"
13709struct sigqueue {
13710 struct list_head list;
13711 int flags;
13712 siginfo_t info;
13713 struct user_struct *user;
13714};
13715
13716
13717
13718
13719struct sigpending {
13720 struct list_head list;
13721 sigset_t signal;
13722};
13723# 38 "include/linux/signal.h"
13724static inline __attribute__((always_inline)) void sigaddset(sigset_t *set, int _sig)
13725{
13726 unsigned long sig = _sig - 1;
13727 if ((64 / 32) == 1)
13728 set->sig[0] |= 1UL << sig;
13729 else
13730 set->sig[sig / 32] |= 1UL << (sig % 32);
13731}
13732
13733static inline __attribute__((always_inline)) void sigdelset(sigset_t *set, int _sig)
13734{
13735 unsigned long sig = _sig - 1;
13736 if ((64 / 32) == 1)
13737 set->sig[0] &= ~(1UL << sig);
13738 else
13739 set->sig[sig / 32] &= ~(1UL << (sig % 32));
13740}
13741
13742static inline __attribute__((always_inline)) int sigismember(sigset_t *set, int _sig)
13743{
13744 unsigned long sig = _sig - 1;
13745 if ((64 / 32) == 1)
13746 return 1 & (set->sig[0] >> sig);
13747 else
13748 return 1 & (set->sig[sig / 32] >> (sig % 32));
13749}
13750
13751static inline __attribute__((always_inline)) int sigfindinword(unsigned long word)
13752{
13753 return __ffs(~(~word));
13754}
13755
13756
13757
13758static inline __attribute__((always_inline)) int sigisemptyset(sigset_t *set)
13759{
13760 extern void _NSIG_WORDS_is_unsupported_size(void);
13761 switch ((64 / 32)) {
13762 case 4:
13763 return (set->sig[3] | set->sig[2] |
13764 set->sig[1] | set->sig[0]) == 0;
13765 case 2:
13766 return (set->sig[1] | set->sig[0]) == 0;
13767 case 1:
13768 return set->sig[0] == 0;
13769 default:
13770 _NSIG_WORDS_is_unsupported_size();
13771 return 0;
13772 }
13773}
13774# 119 "include/linux/signal.h"
13775static inline __attribute__((always_inline)) void sigorsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) | (b3)); r->sig[2] = ((a2) | (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) | (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) | (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
13776
13777
13778static inline __attribute__((always_inline)) void sigandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & (b3)); r->sig[2] = ((a2) & (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
13779
13780
13781static inline __attribute__((always_inline)) void signandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & ~(b3)); r->sig[2] = ((a2) & ~(b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & ~(b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & ~(b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
13782# 149 "include/linux/signal.h"
13783static inline __attribute__((always_inline)) void signotset(sigset_t *set) { extern void _NSIG_WORDS_is_unsupported_size(void); switch ((64 / 32)) { case 4: set->sig[3] = (~(set->sig[3])); set->sig[2] = (~(set->sig[2])); case 2: set->sig[1] = (~(set->sig[1])); case 1: set->sig[0] = (~(set->sig[0])); break; default: _NSIG_WORDS_is_unsupported_size(); } }
13784
13785
13786
13787
13788static inline __attribute__((always_inline)) void sigemptyset(sigset_t *set)
13789{
13790 switch ((64 / 32)) {
13791 default:
13792 memset(set, 0, sizeof(sigset_t));
13793 break;
13794 case 2: set->sig[1] = 0;
13795 case 1: set->sig[0] = 0;
13796 break;
13797 }
13798}
13799
13800static inline __attribute__((always_inline)) void sigfillset(sigset_t *set)
13801{
13802 switch ((64 / 32)) {
13803 default:
13804 memset(set, -1, sizeof(sigset_t));
13805 break;
13806 case 2: set->sig[1] = -1;
13807 case 1: set->sig[0] = -1;
13808 break;
13809 }
13810}
13811
13812
13813
13814static inline __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask)
13815{
13816 set->sig[0] |= mask;
13817}
13818
13819static inline __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask)
13820{
13821 set->sig[0] &= ~mask;
13822}
13823
13824static inline __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask)
13825{
13826 return (set->sig[0] & mask) != 0;
13827}
13828
13829static inline __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask)
13830{
13831 set->sig[0] = mask;
13832 switch ((64 / 32)) {
13833 default:
13834 memset(&set->sig[1], 0, sizeof(long)*((64 / 32)-1));
13835 break;
13836 case 2: set->sig[1] = 0;
13837 case 1: ;
13838 }
13839}
13840
13841static inline __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask)
13842{
13843 set->sig[0] = ~mask;
13844 switch ((64 / 32)) {
13845 default:
13846 memset(&set->sig[1], -1, sizeof(long)*((64 / 32)-1));
13847 break;
13848 case 2: set->sig[1] = -1;
13849 case 1: ;
13850 }
13851}
13852
13853
13854
13855static inline __attribute__((always_inline)) void init_sigpending(struct sigpending *sig)
13856{
13857 sigemptyset(&sig->signal);
13858 INIT_LIST_HEAD(&sig->list);
13859}
13860
13861extern void flush_sigqueue(struct sigpending *queue);
13862
13863
13864static inline __attribute__((always_inline)) int valid_signal(unsigned long sig)
13865{
13866 return sig <= 64 ? 1 : 0;
13867}
13868
13869extern int next_signal(struct sigpending *pending, sigset_t *mask);
13870extern int do_send_sig_info(int sig, struct siginfo *info,
13871 struct task_struct *p, bool group);
13872extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
13873extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
13874extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig,
13875 siginfo_t *info);
13876extern long do_sigpending(void *, unsigned long);
13877extern int sigprocmask(int, sigset_t *, sigset_t *);
13878extern int show_unhandled_signals;
13879
13880struct pt_regs;
13881extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
13882extern void exit_signals(struct task_struct *tsk);
13883
13884extern struct kmem_cache *sighand_cachep;
13885
13886int unhandled_signal(struct task_struct *tsk, int sig);
13887# 377 "include/linux/signal.h"
13888void signals_init(void);
13889# 73 "include/linux/sched.h" 2
13890
13891
13892
13893
13894
13895
13896# 1 "include/linux/proportions.h" 1
13897# 12 "include/linux/proportions.h"
13898# 1 "include/linux/percpu_counter.h" 1
13899# 82 "include/linux/percpu_counter.h"
13900struct percpu_counter {
13901 s64 count;
13902};
13903
13904static inline __attribute__((always_inline)) int percpu_counter_init(struct percpu_counter *fbc, s64 amount)
13905{
13906 fbc->count = amount;
13907 return 0;
13908}
13909
13910static inline __attribute__((always_inline)) void percpu_counter_destroy(struct percpu_counter *fbc)
13911{
13912}
13913
13914static inline __attribute__((always_inline)) void percpu_counter_set(struct percpu_counter *fbc, s64 amount)
13915{
13916 fbc->count = amount;
13917}
13918
13919
13920
13921
13922static inline __attribute__((always_inline)) void
13923percpu_counter_add(struct percpu_counter *fbc, s64 amount)
13924{
13925 do { } while (0);
13926 fbc->count += amount;
13927 do { } while (0);
13928}
13929
13930static inline __attribute__((always_inline)) s64 percpu_counter_read(struct percpu_counter *fbc)
13931{
13932 return fbc->count;
13933}
13934
13935static inline __attribute__((always_inline)) s64 percpu_counter_read_positive(struct percpu_counter *fbc)
13936{
13937 return fbc->count;
13938}
13939
13940static inline __attribute__((always_inline)) s64 percpu_counter_sum_positive(struct percpu_counter *fbc)
13941{
13942 return percpu_counter_read_positive(fbc);
13943}
13944
13945static inline __attribute__((always_inline)) s64 percpu_counter_sum(struct percpu_counter *fbc)
13946{
13947 return percpu_counter_read(fbc);
13948}
13949
13950
13951
13952static inline __attribute__((always_inline)) void percpu_counter_inc(struct percpu_counter *fbc)
13953{
13954 percpu_counter_add(fbc, 1);
13955}
13956
13957static inline __attribute__((always_inline)) void percpu_counter_dec(struct percpu_counter *fbc)
13958{
13959 percpu_counter_add(fbc, -1);
13960}
13961
13962static inline __attribute__((always_inline)) void percpu_counter_sub(struct percpu_counter *fbc, s64 amount)
13963{
13964 percpu_counter_add(fbc, -amount);
13965}
13966# 13 "include/linux/proportions.h" 2
13967
13968
13969
13970struct prop_global {
13971
13972
13973
13974
13975
13976 int shift;
13977
13978
13979
13980
13981
13982
13983 struct percpu_counter events;
13984};
13985
13986
13987
13988
13989
13990
13991struct prop_descriptor {
13992 int index;
13993 struct prop_global pg[2];
13994 struct mutex mutex;
13995};
13996
13997int prop_descriptor_init(struct prop_descriptor *pd, int shift);
13998void prop_change_shift(struct prop_descriptor *pd, int new_shift);
13999
14000
14001
14002
14003
14004struct prop_local_percpu {
14005
14006
14007
14008 struct percpu_counter events;
14009
14010
14011
14012
14013 int shift;
14014 unsigned long period;
14015 spinlock_t lock;
14016};
14017
14018int prop_local_init_percpu(struct prop_local_percpu *pl);
14019void prop_local_destroy_percpu(struct prop_local_percpu *pl);
14020void __prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl);
14021void prop_fraction_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl,
14022 long *numerator, long *denominator);
14023
14024static inline __attribute__((always_inline))
14025void prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl)
14026{
14027 unsigned long flags;
14028
14029 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
14030 __prop_inc_percpu(pd, pl);
14031 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);
14032}
14033# 89 "include/linux/proportions.h"
14034void __prop_inc_percpu_max(struct prop_descriptor *pd,
14035 struct prop_local_percpu *pl, long frac);
14036
14037
14038
14039
14040
14041
14042struct prop_local_single {
14043
14044
14045
14046 unsigned long events;
14047
14048
14049
14050
14051
14052 unsigned long period;
14053 int shift;
14054 spinlock_t lock;
14055};
14056
14057
14058
14059
14060
14061int prop_local_init_single(struct prop_local_single *pl);
14062void prop_local_destroy_single(struct prop_local_single *pl);
14063void __prop_inc_single(struct prop_descriptor *pd, struct prop_local_single *pl);
14064void prop_fraction_single(struct prop_descriptor *pd, struct prop_local_single *pl,
14065 long *numerator, long *denominator);
14066
14067static inline __attribute__((always_inline))
14068void prop_inc_single(struct prop_descriptor *pd, struct prop_local_single *pl)
14069{
14070 unsigned long flags;
14071
14072 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); do { (flags) = __raw_local_irq_save(); } while (0); do { } while (0); } while (0);
14073 __prop_inc_single(pd, pl);
14074 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);
14075}
14076# 80 "include/linux/sched.h" 2
14077# 1 "include/linux/seccomp.h" 1
14078# 26 "include/linux/seccomp.h"
14079typedef struct { } seccomp_t;
14080
14081
14082
14083static inline __attribute__((always_inline)) long prctl_get_seccomp(void)
14084{
14085 return -22;
14086}
14087
14088static inline __attribute__((always_inline)) long prctl_set_seccomp(unsigned long arg2)
14089{
14090 return -22;
14091}
14092# 81 "include/linux/sched.h" 2
14093
14094
14095# 1 "include/linux/rtmutex.h" 1
14096# 16 "include/linux/rtmutex.h"
14097# 1 "include/linux/plist.h" 1
14098# 80 "include/linux/plist.h"
14099struct plist_head {
14100 struct list_head prio_list;
14101 struct list_head node_list;
14102
14103
14104
14105};
14106
14107struct plist_node {
14108 int prio;
14109 struct plist_head plist;
14110};
14111# 130 "include/linux/plist.h"
14112static inline __attribute__((always_inline)) void
14113plist_head_init(struct plist_head *head, spinlock_t *lock)
14114{
14115 INIT_LIST_HEAD(&head->prio_list);
14116 INIT_LIST_HEAD(&head->node_list);
14117
14118
14119
14120}
14121
14122
14123
14124
14125
14126
14127static inline __attribute__((always_inline)) void plist_node_init(struct plist_node *node, int prio)
14128{
14129 node->prio = prio;
14130 plist_head_init(&node->plist, ((void *)0));
14131}
14132
14133extern void plist_add(struct plist_node *node, struct plist_head *head);
14134extern void plist_del(struct plist_node *node, struct plist_head *head);
14135# 198 "include/linux/plist.h"
14136static inline __attribute__((always_inline)) int plist_head_empty(const struct plist_head *head)
14137{
14138 return list_empty(&head->node_list);
14139}
14140
14141
14142
14143
14144
14145static inline __attribute__((always_inline)) int plist_node_empty(const struct plist_node *node)
14146{
14147 return plist_head_empty(&node->plist);
14148}
14149# 237 "include/linux/plist.h"
14150static inline __attribute__((always_inline)) struct plist_node* plist_first(const struct plist_head *head)
14151{
14152 return ({ const typeof( ((struct plist_node *)0)->plist.node_list ) *__mptr = (head->node_list.next); (struct plist_node *)( (char *)__mptr - __builtin_offsetof(struct plist_node,plist.node_list) );});
14153
14154}
14155# 17 "include/linux/rtmutex.h" 2
14156# 26 "include/linux/rtmutex.h"
14157struct rt_mutex {
14158 spinlock_t wait_lock;
14159 struct plist_head wait_list;
14160 struct task_struct *owner;
14161
14162
14163
14164
14165
14166
14167};
14168
14169struct rt_mutex_waiter;
14170struct hrtimer_sleeper;
14171
14172
14173
14174
14175
14176
14177 static inline __attribute__((always_inline)) int rt_mutex_debug_check_no_locks_freed(const void *from,
14178 unsigned long len)
14179 {
14180 return 0;
14181 }
14182# 80 "include/linux/rtmutex.h"
14183static inline __attribute__((always_inline)) int rt_mutex_is_locked(struct rt_mutex *lock)
14184{
14185 return lock->owner != ((void *)0);
14186}
14187
14188extern void __rt_mutex_init(struct rt_mutex *lock, const char *name);
14189extern void rt_mutex_destroy(struct rt_mutex *lock);
14190
14191extern void rt_mutex_lock(struct rt_mutex *lock);
14192extern int rt_mutex_lock_interruptible(struct rt_mutex *lock,
14193 int detect_deadlock);
14194extern int rt_mutex_timed_lock(struct rt_mutex *lock,
14195 struct hrtimer_sleeper *timeout,
14196 int detect_deadlock);
14197
14198extern int rt_mutex_trylock(struct rt_mutex *lock);
14199
14200extern void rt_mutex_unlock(struct rt_mutex *lock);
14201# 84 "include/linux/sched.h" 2
14202
14203
14204
14205# 1 "include/linux/resource.h" 1
14206
14207
14208
14209
14210
14211struct task_struct;
14212# 24 "include/linux/resource.h"
14213struct rusage {
14214 struct timeval ru_utime;
14215 struct timeval ru_stime;
14216 long ru_maxrss;
14217 long ru_ixrss;
14218 long ru_idrss;
14219 long ru_isrss;
14220 long ru_minflt;
14221 long ru_majflt;
14222 long ru_nswap;
14223 long ru_inblock;
14224 long ru_oublock;
14225 long ru_msgsnd;
14226 long ru_msgrcv;
14227 long ru_nsignals;
14228 long ru_nvcsw;
14229 long ru_nivcsw;
14230};
14231
14232struct rlimit {
14233 unsigned long rlim_cur;
14234 unsigned long rlim_max;
14235};
14236# 71 "include/linux/resource.h"
14237# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/resource.h" 1
14238# 1 "include/asm-generic/resource.h" 1
14239# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/resource.h" 2
14240# 72 "include/linux/resource.h" 2
14241
14242int getrusage(struct task_struct *p, int who, struct rusage *ru);
14243# 88 "include/linux/sched.h" 2
14244
14245# 1 "include/linux/hrtimer.h" 1
14246# 27 "include/linux/hrtimer.h"
14247struct hrtimer_clock_base;
14248struct hrtimer_cpu_base;
14249
14250
14251
14252
14253enum hrtimer_mode {
14254 HRTIMER_MODE_ABS = 0x0,
14255 HRTIMER_MODE_REL = 0x1,
14256 HRTIMER_MODE_PINNED = 0x02,
14257 HRTIMER_MODE_ABS_PINNED = 0x02,
14258 HRTIMER_MODE_REL_PINNED = 0x03,
14259};
14260
14261
14262
14263
14264enum hrtimer_restart {
14265 HRTIMER_NORESTART,
14266 HRTIMER_RESTART,
14267};
14268# 103 "include/linux/hrtimer.h"
14269struct hrtimer {
14270 struct rb_node node;
14271 ktime_t _expires;
14272 ktime_t _softexpires;
14273 enum hrtimer_restart (*function)(struct hrtimer *);
14274 struct hrtimer_clock_base *base;
14275 unsigned long state;
14276
14277 int start_pid;
14278 void *start_site;
14279 char start_comm[16];
14280
14281};
14282# 124 "include/linux/hrtimer.h"
14283struct hrtimer_sleeper {
14284 struct hrtimer timer;
14285 struct task_struct *task;
14286};
14287# 141 "include/linux/hrtimer.h"
14288struct hrtimer_clock_base {
14289 struct hrtimer_cpu_base *cpu_base;
14290 clockid_t index;
14291 struct rb_root active;
14292 struct rb_node *first;
14293 ktime_t resolution;
14294 ktime_t (*get_time)(void);
14295 ktime_t softirq_time;
14296
14297 ktime_t offset;
14298
14299};
14300# 170 "include/linux/hrtimer.h"
14301struct hrtimer_cpu_base {
14302 spinlock_t lock;
14303 struct hrtimer_clock_base clock_base[2];
14304
14305 ktime_t expires_next;
14306 int hres_active;
14307 unsigned long nr_events;
14308
14309};
14310
14311static inline __attribute__((always_inline)) void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
14312{
14313 timer->_expires = time;
14314 timer->_softexpires = time;
14315}
14316
14317static inline __attribute__((always_inline)) void hrtimer_set_expires_range(struct hrtimer *timer, ktime_t time, ktime_t delta)
14318{
14319 timer->_softexpires = time;
14320 timer->_expires = ktime_add_safe(time, delta);
14321}
14322
14323static inline __attribute__((always_inline)) void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t time, unsigned long delta)
14324{
14325 timer->_softexpires = time;
14326 timer->_expires = ktime_add_safe(time, ns_to_ktime(delta));
14327}
14328
14329static inline __attribute__((always_inline)) void hrtimer_set_expires_tv64(struct hrtimer *timer, s64 tv64)
14330{
14331 timer->_expires.tv64 = tv64;
14332 timer->_softexpires.tv64 = tv64;
14333}
14334
14335static inline __attribute__((always_inline)) void hrtimer_add_expires(struct hrtimer *timer, ktime_t time)
14336{
14337 timer->_expires = ktime_add_safe(timer->_expires, time);
14338 timer->_softexpires = ktime_add_safe(timer->_softexpires, time);
14339}
14340
14341static inline __attribute__((always_inline)) void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns)
14342{
14343 timer->_expires = ktime_add_ns(timer->_expires, ns);
14344 timer->_softexpires = ktime_add_ns(timer->_softexpires, ns);
14345}
14346
14347static inline __attribute__((always_inline)) ktime_t hrtimer_get_expires(const struct hrtimer *timer)
14348{
14349 return timer->_expires;
14350}
14351
14352static inline __attribute__((always_inline)) ktime_t hrtimer_get_softexpires(const struct hrtimer *timer)
14353{
14354 return timer->_softexpires;
14355}
14356
14357static inline __attribute__((always_inline)) s64 hrtimer_get_expires_tv64(const struct hrtimer *timer)
14358{
14359 return timer->_expires.tv64;
14360}
14361static inline __attribute__((always_inline)) s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer)
14362{
14363 return timer->_softexpires.tv64;
14364}
14365
14366static inline __attribute__((always_inline)) s64 hrtimer_get_expires_ns(const struct hrtimer *timer)
14367{
14368 return ktime_to_ns(timer->_expires);
14369}
14370
14371static inline __attribute__((always_inline)) ktime_t hrtimer_expires_remaining(const struct hrtimer *timer)
14372{
14373 return ktime_sub(timer->_expires, timer->base->get_time());
14374}
14375
14376
14377struct clock_event_device;
14378
14379extern void clock_was_set(void);
14380extern void hres_timers_resume(void);
14381extern void hrtimer_interrupt(struct clock_event_device *dev);
14382
14383
14384
14385
14386static inline __attribute__((always_inline)) ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
14387{
14388 return timer->base->get_time();
14389}
14390
14391static inline __attribute__((always_inline)) int hrtimer_is_hres_active(struct hrtimer *timer)
14392{
14393 return timer->base->cpu_base->hres_active;
14394}
14395
14396extern void hrtimer_peek_ahead_timers(void);
14397# 308 "include/linux/hrtimer.h"
14398extern ktime_t ktime_get(void);
14399extern ktime_t ktime_get_real(void);
14400
14401
14402extern __attribute__((section(".discard"), unused)) char __pcpu_scope_tick_cpu_device; extern __attribute__((section(".data" ""))) __typeof__(struct tick_device) per_cpu__tick_cpu_device;
14403
14404
14405
14406
14407
14408extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock,
14409 enum hrtimer_mode mode);
14410
14411
14412extern void hrtimer_init_on_stack(struct hrtimer *timer, clockid_t which_clock,
14413 enum hrtimer_mode mode);
14414
14415extern void destroy_hrtimer_on_stack(struct hrtimer *timer);
14416# 337 "include/linux/hrtimer.h"
14417extern int hrtimer_start(struct hrtimer *timer, ktime_t tim,
14418 const enum hrtimer_mode mode);
14419extern int hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
14420 unsigned long range_ns, const enum hrtimer_mode mode);
14421extern int
14422__hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
14423 unsigned long delta_ns,
14424 const enum hrtimer_mode mode, int wakeup);
14425
14426extern int hrtimer_cancel(struct hrtimer *timer);
14427extern int hrtimer_try_to_cancel(struct hrtimer *timer);
14428
14429static inline __attribute__((always_inline)) int hrtimer_start_expires(struct hrtimer *timer,
14430 enum hrtimer_mode mode)
14431{
14432 unsigned long delta;
14433 ktime_t soft, hard;
14434 soft = hrtimer_get_softexpires(timer);
14435 hard = hrtimer_get_expires(timer);
14436 delta = ktime_to_ns(ktime_sub(hard, soft));
14437 return hrtimer_start_range_ns(timer, soft, delta, mode);
14438}
14439
14440static inline __attribute__((always_inline)) int hrtimer_restart(struct hrtimer *timer)
14441{
14442 return hrtimer_start_expires(timer, HRTIMER_MODE_ABS);
14443}
14444
14445
14446extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer);
14447extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp);
14448
14449extern ktime_t hrtimer_get_next_event(void);
14450
14451
14452
14453
14454
14455static inline __attribute__((always_inline)) int hrtimer_active(const struct hrtimer *timer)
14456{
14457 return timer->state != 0x00;
14458}
14459
14460
14461
14462
14463static inline __attribute__((always_inline)) int hrtimer_is_queued(struct hrtimer *timer)
14464{
14465 return timer->state & 0x01;
14466}
14467
14468
14469
14470
14471
14472static inline __attribute__((always_inline)) int hrtimer_callback_running(struct hrtimer *timer)
14473{
14474 return timer->state & 0x02;
14475}
14476
14477
14478extern u64
14479hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
14480
14481
14482static inline __attribute__((always_inline)) u64 hrtimer_forward_now(struct hrtimer *timer,
14483 ktime_t interval)
14484{
14485 return hrtimer_forward(timer, timer->base->get_time(), interval);
14486}
14487
14488
14489extern long hrtimer_nanosleep(struct timespec *rqtp,
14490 struct timespec *rmtp,
14491 const enum hrtimer_mode mode,
14492 const clockid_t clockid);
14493extern long hrtimer_nanosleep_restart(struct restart_block *restart_block);
14494
14495extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
14496 struct task_struct *tsk);
14497
14498extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta,
14499 const enum hrtimer_mode mode);
14500extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode);
14501
14502
14503extern void hrtimer_run_queues(void);
14504extern void hrtimer_run_pending(void);
14505
14506
14507extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) hrtimers_init(void);
14508
14509
14510extern u64 ktime_divns(const ktime_t kt, s64 div);
14511
14512
14513
14514
14515
14516extern void sysrq_timer_list_show(void);
14517
14518
14519
14520
14521
14522
14523extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
14524 void *timerf, char *comm,
14525 unsigned int timer_flag);
14526
14527static inline __attribute__((always_inline)) void timer_stats_account_hrtimer(struct hrtimer *timer)
14528{
14529 if (__builtin_expect(!!(!timer->start_site), 1))
14530 return;
14531 timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
14532 timer->function, timer->start_comm, 0);
14533}
14534
14535extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer,
14536 void *addr);
14537
14538static inline __attribute__((always_inline)) void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
14539{
14540 if (__builtin_expect(!!(!timer_stats_active), 1))
14541 return;
14542 __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0));
14543}
14544
14545static inline __attribute__((always_inline)) void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer)
14546{
14547 timer->start_site = ((void *)0);
14548}
14549# 90 "include/linux/sched.h" 2
14550# 1 "include/linux/task_io_accounting.h" 1
14551# 11 "include/linux/task_io_accounting.h"
14552struct task_io_accounting {
14553# 45 "include/linux/task_io_accounting.h"
14554};
14555# 91 "include/linux/sched.h" 2
14556
14557# 1 "include/linux/latencytop.h" 1
14558# 41 "include/linux/latencytop.h"
14559static inline __attribute__((always_inline)) void
14560account_scheduler_latency(struct task_struct *task, int usecs, int inter)
14561{
14562}
14563
14564static inline __attribute__((always_inline)) void clear_all_latency_tracing(struct task_struct *p)
14565{
14566}
14567# 93 "include/linux/sched.h" 2
14568# 1 "include/linux/cred.h" 1
14569# 17 "include/linux/cred.h"
14570# 1 "include/linux/key.h" 1
14571# 22 "include/linux/key.h"
14572# 1 "include/linux/sysctl.h" 1
14573# 32 "include/linux/sysctl.h"
14574struct completion;
14575
14576
14577
14578
14579
14580
14581struct __sysctl_args {
14582 int *name;
14583 int nlen;
14584 void *oldval;
14585 size_t *oldlenp;
14586 void *newval;
14587 size_t newlen;
14588 unsigned long __unused[4];
14589};
14590# 59 "include/linux/sysctl.h"
14591enum
14592{
14593 CTL_KERN=1,
14594 CTL_VM=2,
14595 CTL_NET=3,
14596 CTL_PROC=4,
14597 CTL_FS=5,
14598 CTL_DEBUG=6,
14599 CTL_DEV=7,
14600 CTL_BUS=8,
14601 CTL_ABI=9,
14602 CTL_CPU=10,
14603 CTL_ARLAN=254,
14604 CTL_S390DBF=5677,
14605 CTL_SUNRPC=7249,
14606 CTL_PM=9899,
14607 CTL_FRV=9898,
14608};
14609
14610
14611enum
14612{
14613 CTL_BUS_ISA=1
14614};
14615
14616
14617enum
14618{
14619 INOTIFY_MAX_USER_INSTANCES=1,
14620 INOTIFY_MAX_USER_WATCHES=2,
14621 INOTIFY_MAX_QUEUED_EVENTS=3
14622};
14623
14624
14625enum
14626{
14627 KERN_OSTYPE=1,
14628 KERN_OSRELEASE=2,
14629 KERN_OSREV=3,
14630 KERN_VERSION=4,
14631 KERN_SECUREMASK=5,
14632 KERN_PROF=6,
14633 KERN_NODENAME=7,
14634 KERN_DOMAINNAME=8,
14635
14636 KERN_PANIC=15,
14637 KERN_REALROOTDEV=16,
14638
14639 KERN_SPARC_REBOOT=21,
14640 KERN_CTLALTDEL=22,
14641 KERN_PRINTK=23,
14642 KERN_NAMETRANS=24,
14643 KERN_PPC_HTABRECLAIM=25,
14644 KERN_PPC_ZEROPAGED=26,
14645 KERN_PPC_POWERSAVE_NAP=27,
14646 KERN_MODPROBE=28,
14647 KERN_SG_BIG_BUFF=29,
14648 KERN_ACCT=30,
14649 KERN_PPC_L2CR=31,
14650
14651 KERN_RTSIGNR=32,
14652 KERN_RTSIGMAX=33,
14653
14654 KERN_SHMMAX=34,
14655 KERN_MSGMAX=35,
14656 KERN_MSGMNB=36,
14657 KERN_MSGPOOL=37,
14658 KERN_SYSRQ=38,
14659 KERN_MAX_THREADS=39,
14660 KERN_RANDOM=40,
14661 KERN_SHMALL=41,
14662 KERN_MSGMNI=42,
14663 KERN_SEM=43,
14664 KERN_SPARC_STOP_A=44,
14665 KERN_SHMMNI=45,
14666 KERN_OVERFLOWUID=46,
14667 KERN_OVERFLOWGID=47,
14668 KERN_SHMPATH=48,
14669 KERN_HOTPLUG=49,
14670 KERN_IEEE_EMULATION_WARNINGS=50,
14671 KERN_S390_USER_DEBUG_LOGGING=51,
14672 KERN_CORE_USES_PID=52,
14673 KERN_TAINTED=53,
14674 KERN_CADPID=54,
14675 KERN_PIDMAX=55,
14676 KERN_CORE_PATTERN=56,
14677 KERN_PANIC_ON_OOPS=57,
14678 KERN_HPPA_PWRSW=58,
14679 KERN_HPPA_UNALIGNED=59,
14680 KERN_PRINTK_RATELIMIT=60,
14681 KERN_PRINTK_RATELIMIT_BURST=61,
14682 KERN_PTY=62,
14683 KERN_NGROUPS_MAX=63,
14684 KERN_SPARC_SCONS_PWROFF=64,
14685 KERN_HZ_TIMER=65,
14686 KERN_UNKNOWN_NMI_PANIC=66,
14687 KERN_BOOTLOADER_TYPE=67,
14688 KERN_RANDOMIZE=68,
14689 KERN_SETUID_DUMPABLE=69,
14690 KERN_SPIN_RETRY=70,
14691 KERN_ACPI_VIDEO_FLAGS=71,
14692 KERN_IA64_UNALIGNED=72,
14693 KERN_COMPAT_LOG=73,
14694 KERN_MAX_LOCK_DEPTH=74,
14695 KERN_NMI_WATCHDOG=75,
14696 KERN_PANIC_ON_NMI=76,
14697};
14698
14699
14700
14701
14702enum
14703{
14704 VM_UNUSED1=1,
14705 VM_UNUSED2=2,
14706 VM_UNUSED3=3,
14707 VM_UNUSED4=4,
14708 VM_OVERCOMMIT_MEMORY=5,
14709 VM_UNUSED5=6,
14710 VM_UNUSED7=7,
14711 VM_UNUSED8=8,
14712 VM_UNUSED9=9,
14713 VM_PAGE_CLUSTER=10,
14714 VM_DIRTY_BACKGROUND=11,
14715 VM_DIRTY_RATIO=12,
14716 VM_DIRTY_WB_CS=13,
14717 VM_DIRTY_EXPIRE_CS=14,
14718 VM_NR_PDFLUSH_THREADS=15,
14719 VM_OVERCOMMIT_RATIO=16,
14720 VM_PAGEBUF=17,
14721 VM_HUGETLB_PAGES=18,
14722 VM_SWAPPINESS=19,
14723 VM_LOWMEM_RESERVE_RATIO=20,
14724 VM_MIN_FREE_KBYTES=21,
14725 VM_MAX_MAP_COUNT=22,
14726 VM_LAPTOP_MODE=23,
14727 VM_BLOCK_DUMP=24,
14728 VM_HUGETLB_GROUP=25,
14729 VM_VFS_CACHE_PRESSURE=26,
14730 VM_LEGACY_VA_LAYOUT=27,
14731 VM_SWAP_TOKEN_TIMEOUT=28,
14732 VM_DROP_PAGECACHE=29,
14733 VM_PERCPU_PAGELIST_FRACTION=30,
14734 VM_ZONE_RECLAIM_MODE=31,
14735 VM_MIN_UNMAPPED=32,
14736 VM_PANIC_ON_OOM=33,
14737 VM_VDSO_ENABLED=34,
14738 VM_MIN_SLAB=35,
14739};
14740
14741
14742
14743enum
14744{
14745 NET_CORE=1,
14746 NET_ETHER=2,
14747 NET_802=3,
14748 NET_UNIX=4,
14749 NET_IPV4=5,
14750 NET_IPX=6,
14751 NET_ATALK=7,
14752 NET_NETROM=8,
14753 NET_AX25=9,
14754 NET_BRIDGE=10,
14755 NET_ROSE=11,
14756 NET_IPV6=12,
14757 NET_X25=13,
14758 NET_TR=14,
14759 NET_DECNET=15,
14760 NET_ECONET=16,
14761 NET_SCTP=17,
14762 NET_LLC=18,
14763 NET_NETFILTER=19,
14764 NET_DCCP=20,
14765 NET_IRDA=412,
14766};
14767
14768
14769enum
14770{
14771 RANDOM_POOLSIZE=1,
14772 RANDOM_ENTROPY_COUNT=2,
14773 RANDOM_READ_THRESH=3,
14774 RANDOM_WRITE_THRESH=4,
14775 RANDOM_BOOT_ID=5,
14776 RANDOM_UUID=6
14777};
14778
14779
14780enum
14781{
14782 PTY_MAX=1,
14783 PTY_NR=2
14784};
14785
14786
14787enum
14788{
14789 BUS_ISA_MEM_BASE=1,
14790 BUS_ISA_PORT_BASE=2,
14791 BUS_ISA_PORT_SHIFT=3
14792};
14793
14794
14795enum
14796{
14797 NET_CORE_WMEM_MAX=1,
14798 NET_CORE_RMEM_MAX=2,
14799 NET_CORE_WMEM_DEFAULT=3,
14800 NET_CORE_RMEM_DEFAULT=4,
14801
14802 NET_CORE_MAX_BACKLOG=6,
14803 NET_CORE_FASTROUTE=7,
14804 NET_CORE_MSG_COST=8,
14805 NET_CORE_MSG_BURST=9,
14806 NET_CORE_OPTMEM_MAX=10,
14807 NET_CORE_HOT_LIST_LENGTH=11,
14808 NET_CORE_DIVERT_VERSION=12,
14809 NET_CORE_NO_CONG_THRESH=13,
14810 NET_CORE_NO_CONG=14,
14811 NET_CORE_LO_CONG=15,
14812 NET_CORE_MOD_CONG=16,
14813 NET_CORE_DEV_WEIGHT=17,
14814 NET_CORE_SOMAXCONN=18,
14815 NET_CORE_BUDGET=19,
14816 NET_CORE_AEVENT_ETIME=20,
14817 NET_CORE_AEVENT_RSEQTH=21,
14818 NET_CORE_WARNINGS=22,
14819};
14820
14821
14822
14823
14824
14825
14826
14827enum
14828{
14829 NET_UNIX_DESTROY_DELAY=1,
14830 NET_UNIX_DELETE_DELAY=2,
14831 NET_UNIX_MAX_DGRAM_QLEN=3,
14832};
14833
14834
14835enum
14836{
14837 NET_NF_CONNTRACK_MAX=1,
14838 NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
14839 NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
14840 NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
14841 NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
14842 NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
14843 NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
14844 NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
14845 NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
14846 NET_NF_CONNTRACK_UDP_TIMEOUT=10,
14847 NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
14848 NET_NF_CONNTRACK_ICMP_TIMEOUT=12,
14849 NET_NF_CONNTRACK_GENERIC_TIMEOUT=13,
14850 NET_NF_CONNTRACK_BUCKETS=14,
14851 NET_NF_CONNTRACK_LOG_INVALID=15,
14852 NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
14853 NET_NF_CONNTRACK_TCP_LOOSE=17,
14854 NET_NF_CONNTRACK_TCP_BE_LIBERAL=18,
14855 NET_NF_CONNTRACK_TCP_MAX_RETRANS=19,
14856 NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
14857 NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
14858 NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
14859 NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
14860 NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
14861 NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
14862 NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
14863 NET_NF_CONNTRACK_COUNT=27,
14864 NET_NF_CONNTRACK_ICMPV6_TIMEOUT=28,
14865 NET_NF_CONNTRACK_FRAG6_TIMEOUT=29,
14866 NET_NF_CONNTRACK_FRAG6_LOW_THRESH=30,
14867 NET_NF_CONNTRACK_FRAG6_HIGH_THRESH=31,
14868 NET_NF_CONNTRACK_CHECKSUM=32,
14869};
14870
14871
14872enum
14873{
14874
14875 NET_IPV4_FORWARD=8,
14876 NET_IPV4_DYNADDR=9,
14877
14878 NET_IPV4_CONF=16,
14879 NET_IPV4_NEIGH=17,
14880 NET_IPV4_ROUTE=18,
14881 NET_IPV4_FIB_HASH=19,
14882 NET_IPV4_NETFILTER=20,
14883
14884 NET_IPV4_TCP_TIMESTAMPS=33,
14885 NET_IPV4_TCP_WINDOW_SCALING=34,
14886 NET_IPV4_TCP_SACK=35,
14887 NET_IPV4_TCP_RETRANS_COLLAPSE=36,
14888 NET_IPV4_DEFAULT_TTL=37,
14889 NET_IPV4_AUTOCONFIG=38,
14890 NET_IPV4_NO_PMTU_DISC=39,
14891 NET_IPV4_TCP_SYN_RETRIES=40,
14892 NET_IPV4_IPFRAG_HIGH_THRESH=41,
14893 NET_IPV4_IPFRAG_LOW_THRESH=42,
14894 NET_IPV4_IPFRAG_TIME=43,
14895 NET_IPV4_TCP_MAX_KA_PROBES=44,
14896 NET_IPV4_TCP_KEEPALIVE_TIME=45,
14897 NET_IPV4_TCP_KEEPALIVE_PROBES=46,
14898 NET_IPV4_TCP_RETRIES1=47,
14899 NET_IPV4_TCP_RETRIES2=48,
14900 NET_IPV4_TCP_FIN_TIMEOUT=49,
14901 NET_IPV4_IP_MASQ_DEBUG=50,
14902 NET_TCP_SYNCOOKIES=51,
14903 NET_TCP_STDURG=52,
14904 NET_TCP_RFC1337=53,
14905 NET_TCP_SYN_TAILDROP=54,
14906 NET_TCP_MAX_SYN_BACKLOG=55,
14907 NET_IPV4_LOCAL_PORT_RANGE=56,
14908 NET_IPV4_ICMP_ECHO_IGNORE_ALL=57,
14909 NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58,
14910 NET_IPV4_ICMP_SOURCEQUENCH_RATE=59,
14911 NET_IPV4_ICMP_DESTUNREACH_RATE=60,
14912 NET_IPV4_ICMP_TIMEEXCEED_RATE=61,
14913 NET_IPV4_ICMP_PARAMPROB_RATE=62,
14914 NET_IPV4_ICMP_ECHOREPLY_RATE=63,
14915 NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
14916 NET_IPV4_IGMP_MAX_MEMBERSHIPS=65,
14917 NET_TCP_TW_RECYCLE=66,
14918 NET_IPV4_ALWAYS_DEFRAG=67,
14919 NET_IPV4_TCP_KEEPALIVE_INTVL=68,
14920 NET_IPV4_INET_PEER_THRESHOLD=69,
14921 NET_IPV4_INET_PEER_MINTTL=70,
14922 NET_IPV4_INET_PEER_MAXTTL=71,
14923 NET_IPV4_INET_PEER_GC_MINTIME=72,
14924 NET_IPV4_INET_PEER_GC_MAXTIME=73,
14925 NET_TCP_ORPHAN_RETRIES=74,
14926 NET_TCP_ABORT_ON_OVERFLOW=75,
14927 NET_TCP_SYNACK_RETRIES=76,
14928 NET_TCP_MAX_ORPHANS=77,
14929 NET_TCP_MAX_TW_BUCKETS=78,
14930 NET_TCP_FACK=79,
14931 NET_TCP_REORDERING=80,
14932 NET_TCP_ECN=81,
14933 NET_TCP_DSACK=82,
14934 NET_TCP_MEM=83,
14935 NET_TCP_WMEM=84,
14936 NET_TCP_RMEM=85,
14937 NET_TCP_APP_WIN=86,
14938 NET_TCP_ADV_WIN_SCALE=87,
14939 NET_IPV4_NONLOCAL_BIND=88,
14940 NET_IPV4_ICMP_RATELIMIT=89,
14941 NET_IPV4_ICMP_RATEMASK=90,
14942 NET_TCP_TW_REUSE=91,
14943 NET_TCP_FRTO=92,
14944 NET_TCP_LOW_LATENCY=93,
14945 NET_IPV4_IPFRAG_SECRET_INTERVAL=94,
14946 NET_IPV4_IGMP_MAX_MSF=96,
14947 NET_TCP_NO_METRICS_SAVE=97,
14948 NET_TCP_DEFAULT_WIN_SCALE=105,
14949 NET_TCP_MODERATE_RCVBUF=106,
14950 NET_TCP_TSO_WIN_DIVISOR=107,
14951 NET_TCP_BIC_BETA=108,
14952 NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109,
14953 NET_TCP_CONG_CONTROL=110,
14954 NET_TCP_ABC=111,
14955 NET_IPV4_IPFRAG_MAX_DIST=112,
14956 NET_TCP_MTU_PROBING=113,
14957 NET_TCP_BASE_MSS=114,
14958 NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115,
14959 NET_TCP_DMA_COPYBREAK=116,
14960 NET_TCP_SLOW_START_AFTER_IDLE=117,
14961 NET_CIPSOV4_CACHE_ENABLE=118,
14962 NET_CIPSOV4_CACHE_BUCKET_SIZE=119,
14963 NET_CIPSOV4_RBM_OPTFMT=120,
14964 NET_CIPSOV4_RBM_STRICTVALID=121,
14965 NET_TCP_AVAIL_CONG_CONTROL=122,
14966 NET_TCP_ALLOWED_CONG_CONTROL=123,
14967 NET_TCP_MAX_SSTHRESH=124,
14968 NET_TCP_FRTO_RESPONSE=125,
14969};
14970
14971enum {
14972 NET_IPV4_ROUTE_FLUSH=1,
14973 NET_IPV4_ROUTE_MIN_DELAY=2,
14974 NET_IPV4_ROUTE_MAX_DELAY=3,
14975 NET_IPV4_ROUTE_GC_THRESH=4,
14976 NET_IPV4_ROUTE_MAX_SIZE=5,
14977 NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
14978 NET_IPV4_ROUTE_GC_TIMEOUT=7,
14979 NET_IPV4_ROUTE_GC_INTERVAL=8,
14980 NET_IPV4_ROUTE_REDIRECT_LOAD=9,
14981 NET_IPV4_ROUTE_REDIRECT_NUMBER=10,
14982 NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
14983 NET_IPV4_ROUTE_ERROR_COST=12,
14984 NET_IPV4_ROUTE_ERROR_BURST=13,
14985 NET_IPV4_ROUTE_GC_ELASTICITY=14,
14986 NET_IPV4_ROUTE_MTU_EXPIRES=15,
14987 NET_IPV4_ROUTE_MIN_PMTU=16,
14988 NET_IPV4_ROUTE_MIN_ADVMSS=17,
14989 NET_IPV4_ROUTE_SECRET_INTERVAL=18,
14990 NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19,
14991};
14992
14993enum
14994{
14995 NET_PROTO_CONF_ALL=-2,
14996 NET_PROTO_CONF_DEFAULT=-3
14997
14998
14999};
15000
15001enum
15002{
15003 NET_IPV4_CONF_FORWARDING=1,
15004 NET_IPV4_CONF_MC_FORWARDING=2,
15005 NET_IPV4_CONF_PROXY_ARP=3,
15006 NET_IPV4_CONF_ACCEPT_REDIRECTS=4,
15007 NET_IPV4_CONF_SECURE_REDIRECTS=5,
15008 NET_IPV4_CONF_SEND_REDIRECTS=6,
15009 NET_IPV4_CONF_SHARED_MEDIA=7,
15010 NET_IPV4_CONF_RP_FILTER=8,
15011 NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9,
15012 NET_IPV4_CONF_BOOTP_RELAY=10,
15013 NET_IPV4_CONF_LOG_MARTIANS=11,
15014 NET_IPV4_CONF_TAG=12,
15015 NET_IPV4_CONF_ARPFILTER=13,
15016 NET_IPV4_CONF_MEDIUM_ID=14,
15017 NET_IPV4_CONF_NOXFRM=15,
15018 NET_IPV4_CONF_NOPOLICY=16,
15019 NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
15020 NET_IPV4_CONF_ARP_ANNOUNCE=18,
15021 NET_IPV4_CONF_ARP_IGNORE=19,
15022 NET_IPV4_CONF_PROMOTE_SECONDARIES=20,
15023 NET_IPV4_CONF_ARP_ACCEPT=21,
15024 NET_IPV4_CONF_ARP_NOTIFY=22,
15025 __NET_IPV4_CONF_MAX
15026};
15027
15028
15029enum
15030{
15031 NET_IPV4_NF_CONNTRACK_MAX=1,
15032 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
15033 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
15034 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
15035 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
15036 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
15037 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
15038 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
15039 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
15040 NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT=10,
15041 NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
15042 NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12,
15043 NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13,
15044 NET_IPV4_NF_CONNTRACK_BUCKETS=14,
15045 NET_IPV4_NF_CONNTRACK_LOG_INVALID=15,
15046 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
15047 NET_IPV4_NF_CONNTRACK_TCP_LOOSE=17,
15048 NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL=18,
15049 NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS=19,
15050 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
15051 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
15052 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
15053 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
15054 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
15055 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
15056 NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
15057 NET_IPV4_NF_CONNTRACK_COUNT=27,
15058 NET_IPV4_NF_CONNTRACK_CHECKSUM=28,
15059};
15060
15061
15062enum {
15063 NET_IPV6_CONF=16,
15064 NET_IPV6_NEIGH=17,
15065 NET_IPV6_ROUTE=18,
15066 NET_IPV6_ICMP=19,
15067 NET_IPV6_BINDV6ONLY=20,
15068 NET_IPV6_IP6FRAG_HIGH_THRESH=21,
15069 NET_IPV6_IP6FRAG_LOW_THRESH=22,
15070 NET_IPV6_IP6FRAG_TIME=23,
15071 NET_IPV6_IP6FRAG_SECRET_INTERVAL=24,
15072 NET_IPV6_MLD_MAX_MSF=25,
15073};
15074
15075enum {
15076 NET_IPV6_ROUTE_FLUSH=1,
15077 NET_IPV6_ROUTE_GC_THRESH=2,
15078 NET_IPV6_ROUTE_MAX_SIZE=3,
15079 NET_IPV6_ROUTE_GC_MIN_INTERVAL=4,
15080 NET_IPV6_ROUTE_GC_TIMEOUT=5,
15081 NET_IPV6_ROUTE_GC_INTERVAL=6,
15082 NET_IPV6_ROUTE_GC_ELASTICITY=7,
15083 NET_IPV6_ROUTE_MTU_EXPIRES=8,
15084 NET_IPV6_ROUTE_MIN_ADVMSS=9,
15085 NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS=10
15086};
15087
15088enum {
15089 NET_IPV6_FORWARDING=1,
15090 NET_IPV6_HOP_LIMIT=2,
15091 NET_IPV6_MTU=3,
15092 NET_IPV6_ACCEPT_RA=4,
15093 NET_IPV6_ACCEPT_REDIRECTS=5,
15094 NET_IPV6_AUTOCONF=6,
15095 NET_IPV6_DAD_TRANSMITS=7,
15096 NET_IPV6_RTR_SOLICITS=8,
15097 NET_IPV6_RTR_SOLICIT_INTERVAL=9,
15098 NET_IPV6_RTR_SOLICIT_DELAY=10,
15099 NET_IPV6_USE_TEMPADDR=11,
15100 NET_IPV6_TEMP_VALID_LFT=12,
15101 NET_IPV6_TEMP_PREFERED_LFT=13,
15102 NET_IPV6_REGEN_MAX_RETRY=14,
15103 NET_IPV6_MAX_DESYNC_FACTOR=15,
15104 NET_IPV6_MAX_ADDRESSES=16,
15105 NET_IPV6_FORCE_MLD_VERSION=17,
15106 NET_IPV6_ACCEPT_RA_DEFRTR=18,
15107 NET_IPV6_ACCEPT_RA_PINFO=19,
15108 NET_IPV6_ACCEPT_RA_RTR_PREF=20,
15109 NET_IPV6_RTR_PROBE_INTERVAL=21,
15110 NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22,
15111 NET_IPV6_PROXY_NDP=23,
15112 NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
15113 __NET_IPV6_MAX
15114};
15115
15116
15117enum {
15118 NET_IPV6_ICMP_RATELIMIT=1
15119};
15120
15121
15122enum {
15123 NET_NEIGH_MCAST_SOLICIT=1,
15124 NET_NEIGH_UCAST_SOLICIT=2,
15125 NET_NEIGH_APP_SOLICIT=3,
15126 NET_NEIGH_RETRANS_TIME=4,
15127 NET_NEIGH_REACHABLE_TIME=5,
15128 NET_NEIGH_DELAY_PROBE_TIME=6,
15129 NET_NEIGH_GC_STALE_TIME=7,
15130 NET_NEIGH_UNRES_QLEN=8,
15131 NET_NEIGH_PROXY_QLEN=9,
15132 NET_NEIGH_ANYCAST_DELAY=10,
15133 NET_NEIGH_PROXY_DELAY=11,
15134 NET_NEIGH_LOCKTIME=12,
15135 NET_NEIGH_GC_INTERVAL=13,
15136 NET_NEIGH_GC_THRESH1=14,
15137 NET_NEIGH_GC_THRESH2=15,
15138 NET_NEIGH_GC_THRESH3=16,
15139 NET_NEIGH_RETRANS_TIME_MS=17,
15140 NET_NEIGH_REACHABLE_TIME_MS=18,
15141 __NET_NEIGH_MAX
15142};
15143
15144
15145enum {
15146 NET_DCCP_DEFAULT=1,
15147};
15148
15149
15150enum {
15151 NET_IPX_PPROP_BROADCASTING=1,
15152 NET_IPX_FORWARDING=2
15153};
15154
15155
15156enum {
15157 NET_LLC2=1,
15158 NET_LLC_STATION=2,
15159};
15160
15161
15162enum {
15163 NET_LLC2_TIMEOUT=1,
15164};
15165
15166
15167enum {
15168 NET_LLC_STATION_ACK_TIMEOUT=1,
15169};
15170
15171
15172enum {
15173 NET_LLC2_ACK_TIMEOUT=1,
15174 NET_LLC2_P_TIMEOUT=2,
15175 NET_LLC2_REJ_TIMEOUT=3,
15176 NET_LLC2_BUSY_TIMEOUT=4,
15177};
15178
15179
15180enum {
15181 NET_ATALK_AARP_EXPIRY_TIME=1,
15182 NET_ATALK_AARP_TICK_TIME=2,
15183 NET_ATALK_AARP_RETRANSMIT_LIMIT=3,
15184 NET_ATALK_AARP_RESOLVE_TIME=4
15185};
15186
15187
15188
15189enum {
15190 NET_NETROM_DEFAULT_PATH_QUALITY=1,
15191 NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2,
15192 NET_NETROM_NETWORK_TTL_INITIALISER=3,
15193 NET_NETROM_TRANSPORT_TIMEOUT=4,
15194 NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5,
15195 NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6,
15196 NET_NETROM_TRANSPORT_BUSY_DELAY=7,
15197 NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8,
15198 NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9,
15199 NET_NETROM_ROUTING_CONTROL=10,
15200 NET_NETROM_LINK_FAILS_COUNT=11,
15201 NET_NETROM_RESET=12
15202};
15203
15204
15205enum {
15206 NET_AX25_IP_DEFAULT_MODE=1,
15207 NET_AX25_DEFAULT_MODE=2,
15208 NET_AX25_BACKOFF_TYPE=3,
15209 NET_AX25_CONNECT_MODE=4,
15210 NET_AX25_STANDARD_WINDOW=5,
15211 NET_AX25_EXTENDED_WINDOW=6,
15212 NET_AX25_T1_TIMEOUT=7,
15213 NET_AX25_T2_TIMEOUT=8,
15214 NET_AX25_T3_TIMEOUT=9,
15215 NET_AX25_IDLE_TIMEOUT=10,
15216 NET_AX25_N2=11,
15217 NET_AX25_PACLEN=12,
15218 NET_AX25_PROTOCOL=13,
15219 NET_AX25_DAMA_SLAVE_TIMEOUT=14
15220};
15221
15222
15223enum {
15224 NET_ROSE_RESTART_REQUEST_TIMEOUT=1,
15225 NET_ROSE_CALL_REQUEST_TIMEOUT=2,
15226 NET_ROSE_RESET_REQUEST_TIMEOUT=3,
15227 NET_ROSE_CLEAR_REQUEST_TIMEOUT=4,
15228 NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5,
15229 NET_ROSE_ROUTING_CONTROL=6,
15230 NET_ROSE_LINK_FAIL_TIMEOUT=7,
15231 NET_ROSE_MAX_VCS=8,
15232 NET_ROSE_WINDOW_SIZE=9,
15233 NET_ROSE_NO_ACTIVITY_TIMEOUT=10
15234};
15235
15236
15237enum {
15238 NET_X25_RESTART_REQUEST_TIMEOUT=1,
15239 NET_X25_CALL_REQUEST_TIMEOUT=2,
15240 NET_X25_RESET_REQUEST_TIMEOUT=3,
15241 NET_X25_CLEAR_REQUEST_TIMEOUT=4,
15242 NET_X25_ACK_HOLD_BACK_TIMEOUT=5,
15243 NET_X25_FORWARD=6
15244};
15245
15246
15247enum
15248{
15249 NET_TR_RIF_TIMEOUT=1
15250};
15251
15252
15253enum {
15254 NET_DECNET_NODE_TYPE = 1,
15255 NET_DECNET_NODE_ADDRESS = 2,
15256 NET_DECNET_NODE_NAME = 3,
15257 NET_DECNET_DEFAULT_DEVICE = 4,
15258 NET_DECNET_TIME_WAIT = 5,
15259 NET_DECNET_DN_COUNT = 6,
15260 NET_DECNET_DI_COUNT = 7,
15261 NET_DECNET_DR_COUNT = 8,
15262 NET_DECNET_DST_GC_INTERVAL = 9,
15263 NET_DECNET_CONF = 10,
15264 NET_DECNET_NO_FC_MAX_CWND = 11,
15265 NET_DECNET_MEM = 12,
15266 NET_DECNET_RMEM = 13,
15267 NET_DECNET_WMEM = 14,
15268 NET_DECNET_DEBUG_LEVEL = 255
15269};
15270
15271
15272enum {
15273 NET_DECNET_CONF_LOOPBACK = -2,
15274 NET_DECNET_CONF_DDCMP = -3,
15275 NET_DECNET_CONF_PPP = -4,
15276 NET_DECNET_CONF_X25 = -5,
15277 NET_DECNET_CONF_GRE = -6,
15278 NET_DECNET_CONF_ETHER = -7
15279
15280
15281};
15282
15283
15284enum {
15285 NET_DECNET_CONF_DEV_PRIORITY = 1,
15286 NET_DECNET_CONF_DEV_T1 = 2,
15287 NET_DECNET_CONF_DEV_T2 = 3,
15288 NET_DECNET_CONF_DEV_T3 = 4,
15289 NET_DECNET_CONF_DEV_FORWARDING = 5,
15290 NET_DECNET_CONF_DEV_BLKSIZE = 6,
15291 NET_DECNET_CONF_DEV_STATE = 7
15292};
15293
15294
15295enum {
15296 NET_SCTP_RTO_INITIAL = 1,
15297 NET_SCTP_RTO_MIN = 2,
15298 NET_SCTP_RTO_MAX = 3,
15299 NET_SCTP_RTO_ALPHA = 4,
15300 NET_SCTP_RTO_BETA = 5,
15301 NET_SCTP_VALID_COOKIE_LIFE = 6,
15302 NET_SCTP_ASSOCIATION_MAX_RETRANS = 7,
15303 NET_SCTP_PATH_MAX_RETRANS = 8,
15304 NET_SCTP_MAX_INIT_RETRANSMITS = 9,
15305 NET_SCTP_HB_INTERVAL = 10,
15306 NET_SCTP_PRESERVE_ENABLE = 11,
15307 NET_SCTP_MAX_BURST = 12,
15308 NET_SCTP_ADDIP_ENABLE = 13,
15309 NET_SCTP_PRSCTP_ENABLE = 14,
15310 NET_SCTP_SNDBUF_POLICY = 15,
15311 NET_SCTP_SACK_TIMEOUT = 16,
15312 NET_SCTP_RCVBUF_POLICY = 17,
15313};
15314
15315
15316enum {
15317 NET_BRIDGE_NF_CALL_ARPTABLES = 1,
15318 NET_BRIDGE_NF_CALL_IPTABLES = 2,
15319 NET_BRIDGE_NF_CALL_IP6TABLES = 3,
15320 NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4,
15321 NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5,
15322};
15323
15324
15325enum {
15326 NET_IRDA_DISCOVERY=1,
15327 NET_IRDA_DEVNAME=2,
15328 NET_IRDA_DEBUG=3,
15329 NET_IRDA_FAST_POLL=4,
15330 NET_IRDA_DISCOVERY_SLOTS=5,
15331 NET_IRDA_DISCOVERY_TIMEOUT=6,
15332 NET_IRDA_SLOT_TIMEOUT=7,
15333 NET_IRDA_MAX_BAUD_RATE=8,
15334 NET_IRDA_MIN_TX_TURN_TIME=9,
15335 NET_IRDA_MAX_TX_DATA_SIZE=10,
15336 NET_IRDA_MAX_TX_WINDOW=11,
15337 NET_IRDA_MAX_NOREPLY_TIME=12,
15338 NET_IRDA_WARN_NOREPLY_TIME=13,
15339 NET_IRDA_LAP_KEEPALIVE_TIME=14,
15340};
15341
15342
15343
15344enum
15345{
15346 FS_NRINODE=1,
15347 FS_STATINODE=2,
15348 FS_MAXINODE=3,
15349 FS_NRDQUOT=4,
15350 FS_MAXDQUOT=5,
15351 FS_NRFILE=6,
15352 FS_MAXFILE=7,
15353 FS_DENTRY=8,
15354 FS_NRSUPER=9,
15355 FS_MAXSUPER=10,
15356 FS_OVERFLOWUID=11,
15357 FS_OVERFLOWGID=12,
15358 FS_LEASES=13,
15359 FS_DIR_NOTIFY=14,
15360 FS_LEASE_TIME=15,
15361 FS_DQSTATS=16,
15362 FS_XFS=17,
15363 FS_AIO_NR=18,
15364 FS_AIO_MAX_NR=19,
15365 FS_INOTIFY=20,
15366 FS_OCFS2=988,
15367};
15368
15369
15370enum {
15371 FS_DQ_LOOKUPS = 1,
15372 FS_DQ_DROPS = 2,
15373 FS_DQ_READS = 3,
15374 FS_DQ_WRITES = 4,
15375 FS_DQ_CACHE_HITS = 5,
15376 FS_DQ_ALLOCATED = 6,
15377 FS_DQ_FREE = 7,
15378 FS_DQ_SYNCS = 8,
15379 FS_DQ_WARNINGS = 9,
15380};
15381
15382
15383
15384
15385enum {
15386 DEV_CDROM=1,
15387 DEV_HWMON=2,
15388 DEV_PARPORT=3,
15389 DEV_RAID=4,
15390 DEV_MAC_HID=5,
15391 DEV_SCSI=6,
15392 DEV_IPMI=7,
15393};
15394
15395
15396enum {
15397 DEV_CDROM_INFO=1,
15398 DEV_CDROM_AUTOCLOSE=2,
15399 DEV_CDROM_AUTOEJECT=3,
15400 DEV_CDROM_DEBUG=4,
15401 DEV_CDROM_LOCK=5,
15402 DEV_CDROM_CHECK_MEDIA=6
15403};
15404
15405
15406enum {
15407 DEV_PARPORT_DEFAULT=-3
15408};
15409
15410
15411enum {
15412 DEV_RAID_SPEED_LIMIT_MIN=1,
15413 DEV_RAID_SPEED_LIMIT_MAX=2
15414};
15415
15416
15417enum {
15418 DEV_PARPORT_DEFAULT_TIMESLICE=1,
15419 DEV_PARPORT_DEFAULT_SPINTIME=2
15420};
15421
15422
15423enum {
15424 DEV_PARPORT_SPINTIME=1,
15425 DEV_PARPORT_BASE_ADDR=2,
15426 DEV_PARPORT_IRQ=3,
15427 DEV_PARPORT_DMA=4,
15428 DEV_PARPORT_MODES=5,
15429 DEV_PARPORT_DEVICES=6,
15430 DEV_PARPORT_AUTOPROBE=16
15431};
15432
15433
15434enum {
15435 DEV_PARPORT_DEVICES_ACTIVE=-3,
15436};
15437
15438
15439enum {
15440 DEV_PARPORT_DEVICE_TIMESLICE=1,
15441};
15442
15443
15444enum {
15445 DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES=1,
15446 DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES=2,
15447 DEV_MAC_HID_MOUSE_BUTTON_EMULATION=3,
15448 DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4,
15449 DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5,
15450 DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6
15451};
15452
15453
15454enum {
15455 DEV_SCSI_LOGGING_LEVEL=1,
15456};
15457
15458
15459enum {
15460 DEV_IPMI_POWEROFF_POWERCYCLE=1,
15461};
15462
15463
15464enum
15465{
15466 ABI_DEFHANDLER_COFF=1,
15467 ABI_DEFHANDLER_ELF=2,
15468 ABI_DEFHANDLER_LCALL7=3,
15469 ABI_DEFHANDLER_LIBCSO=4,
15470 ABI_TRACE=5,
15471 ABI_FAKE_UTSNAME=6,
15472};
15473
15474
15475
15476
15477
15478struct ctl_table;
15479struct nsproxy;
15480struct ctl_table_root;
15481
15482struct ctl_table_set {
15483 struct list_head list;
15484 struct ctl_table_set *parent;
15485 int (*is_seen)(struct ctl_table_set *);
15486};
15487
15488extern void setup_sysctl_set(struct ctl_table_set *p,
15489 struct ctl_table_set *parent,
15490 int (*is_seen)(struct ctl_table_set *));
15491
15492struct ctl_table_header;
15493
15494extern void sysctl_head_get(struct ctl_table_header *);
15495extern void sysctl_head_put(struct ctl_table_header *);
15496extern int sysctl_is_seen(struct ctl_table_header *);
15497extern struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *);
15498extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev);
15499extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces,
15500 struct ctl_table_header *prev);
15501extern void sysctl_head_finish(struct ctl_table_header *prev);
15502extern int sysctl_perm(struct ctl_table_root *root,
15503 struct ctl_table *table, int op);
15504
15505typedef struct ctl_table ctl_table;
15506
15507typedef int ctl_handler (struct ctl_table *table,
15508 void *oldval, size_t *oldlenp,
15509 void *newval, size_t newlen);
15510
15511typedef int proc_handler (struct ctl_table *ctl, int write,
15512 void *buffer, size_t *lenp, loff_t *ppos);
15513
15514extern int proc_dostring(struct ctl_table *, int,
15515 void *, size_t *, loff_t *);
15516extern int proc_dointvec(struct ctl_table *, int,
15517 void *, size_t *, loff_t *);
15518extern int proc_dointvec_minmax(struct ctl_table *, int,
15519 void *, size_t *, loff_t *);
15520extern int proc_dointvec_jiffies(struct ctl_table *, int,
15521 void *, size_t *, loff_t *);
15522extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,
15523 void *, size_t *, loff_t *);
15524extern int proc_dointvec_ms_jiffies(struct ctl_table *, int,
15525 void *, size_t *, loff_t *);
15526extern int proc_doulongvec_minmax(struct ctl_table *, int,
15527 void *, size_t *, loff_t *);
15528extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
15529 void *, size_t *, loff_t *);
15530
15531extern int do_sysctl (int *name, int nlen,
15532 void *oldval, size_t *oldlenp,
15533 void *newval, size_t newlen);
15534
15535extern ctl_handler sysctl_data;
15536extern ctl_handler sysctl_string;
15537extern ctl_handler sysctl_intvec;
15538extern ctl_handler sysctl_jiffies;
15539extern ctl_handler sysctl_ms_jiffies;
15540# 1051 "include/linux/sysctl.h"
15541struct ctl_table
15542{
15543 int ctl_name;
15544 const char *procname;
15545 void *data;
15546 int maxlen;
15547 mode_t mode;
15548 struct ctl_table *child;
15549 struct ctl_table *parent;
15550 proc_handler *proc_handler;
15551 ctl_handler *strategy;
15552 void *extra1;
15553 void *extra2;
15554};
15555
15556struct ctl_table_root {
15557 struct list_head root_list;
15558 struct ctl_table_set default_set;
15559 struct ctl_table_set *(*lookup)(struct ctl_table_root *root,
15560 struct nsproxy *namespaces);
15561 int (*permissions)(struct ctl_table_root *root,
15562 struct nsproxy *namespaces, struct ctl_table *table);
15563};
15564
15565
15566
15567struct ctl_table_header
15568{
15569 struct ctl_table *ctl_table;
15570 struct list_head ctl_entry;
15571 int used;
15572 int count;
15573 struct completion *unregistering;
15574 struct ctl_table *ctl_table_arg;
15575 struct ctl_table_root *root;
15576 struct ctl_table_set *set;
15577 struct ctl_table *attached_by;
15578 struct ctl_table *attached_to;
15579 struct ctl_table_header *parent;
15580};
15581
15582
15583struct ctl_path {
15584 const char *procname;
15585 int ctl_name;
15586};
15587
15588void register_sysctl_root(struct ctl_table_root *root);
15589struct ctl_table_header *__register_sysctl_paths(
15590 struct ctl_table_root *root, struct nsproxy *namespaces,
15591 const struct ctl_path *path, struct ctl_table *table);
15592struct ctl_table_header *register_sysctl_table(struct ctl_table * table);
15593struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
15594 struct ctl_table *table);
15595
15596void unregister_sysctl_table(struct ctl_table_header * table);
15597int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table);
15598# 23 "include/linux/key.h" 2
15599
15600
15601
15602
15603
15604
15605typedef int32_t key_serial_t;
15606
15607
15608typedef uint32_t key_perm_t;
15609
15610struct key;
15611# 74 "include/linux/key.h"
15612struct seq_file;
15613struct user_struct;
15614struct signal_struct;
15615struct cred;
15616
15617struct key_type;
15618struct key_owner;
15619struct keyring_list;
15620struct keyring_name;
15621# 98 "include/linux/key.h"
15622typedef struct __key_reference_with_attributes *key_ref_t;
15623
15624static inline __attribute__((always_inline)) key_ref_t make_key_ref(const struct key *key,
15625 unsigned long possession)
15626{
15627 return (key_ref_t) ((unsigned long) key | possession);
15628}
15629
15630static inline __attribute__((always_inline)) struct key *key_ref_to_ptr(const key_ref_t key_ref)
15631{
15632 return (struct key *) ((unsigned long) key_ref & ~1UL);
15633}
15634
15635static inline __attribute__((always_inline)) unsigned long is_key_possessed(const key_ref_t key_ref)
15636{
15637 return (unsigned long) key_ref & 1UL;
15638}
15639# 124 "include/linux/key.h"
15640struct key {
15641 atomic_t usage;
15642 key_serial_t serial;
15643 struct rb_node serial_node;
15644 struct key_type *type;
15645 struct rw_semaphore sem;
15646 struct key_user *user;
15647 void *security;
15648 union {
15649 time_t expiry;
15650 time_t revoked_at;
15651 };
15652 uid_t uid;
15653 gid_t gid;
15654 key_perm_t perm;
15655 unsigned short quotalen;
15656 unsigned short datalen;
15657# 151 "include/linux/key.h"
15658 unsigned long flags;
15659# 164 "include/linux/key.h"
15660 char *description;
15661
15662
15663
15664
15665 union {
15666 struct list_head link;
15667 unsigned long x[2];
15668 void *p[2];
15669 } type_data;
15670
15671
15672
15673
15674
15675 union {
15676 unsigned long value;
15677 void *data;
15678 struct keyring_list *subscriptions;
15679 } payload;
15680};
15681
15682extern struct key *key_alloc(struct key_type *type,
15683 const char *desc,
15684 uid_t uid, gid_t gid,
15685 const struct cred *cred,
15686 key_perm_t perm,
15687 unsigned long flags);
15688
15689
15690
15691
15692
15693
15694extern void key_revoke(struct key *key);
15695extern void key_put(struct key *key);
15696
15697static inline __attribute__((always_inline)) struct key *key_get(struct key *key)
15698{
15699 if (key)
15700 atomic_inc(&key->usage);
15701 return key;
15702}
15703
15704static inline __attribute__((always_inline)) void key_ref_put(key_ref_t key_ref)
15705{
15706 key_put(key_ref_to_ptr(key_ref));
15707}
15708
15709extern struct key *request_key(struct key_type *type,
15710 const char *description,
15711 const char *callout_info);
15712
15713extern struct key *request_key_with_auxdata(struct key_type *type,
15714 const char *description,
15715 const void *callout_info,
15716 size_t callout_len,
15717 void *aux);
15718
15719extern struct key *request_key_async(struct key_type *type,
15720 const char *description,
15721 const void *callout_info,
15722 size_t callout_len);
15723
15724extern struct key *request_key_async_with_auxdata(struct key_type *type,
15725 const char *description,
15726 const void *callout_info,
15727 size_t callout_len,
15728 void *aux);
15729
15730extern int wait_for_key_construction(struct key *key, bool intr);
15731
15732extern int key_validate(struct key *key);
15733
15734extern key_ref_t key_create_or_update(key_ref_t keyring,
15735 const char *type,
15736 const char *description,
15737 const void *payload,
15738 size_t plen,
15739 key_perm_t perm,
15740 unsigned long flags);
15741
15742extern int key_update(key_ref_t key,
15743 const void *payload,
15744 size_t plen);
15745
15746extern int key_link(struct key *keyring,
15747 struct key *key);
15748
15749extern int key_unlink(struct key *keyring,
15750 struct key *key);
15751
15752extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
15753 const struct cred *cred,
15754 unsigned long flags,
15755 struct key *dest);
15756
15757extern int keyring_clear(struct key *keyring);
15758
15759extern key_ref_t keyring_search(key_ref_t keyring,
15760 struct key_type *type,
15761 const char *description);
15762
15763extern int keyring_add_key(struct key *keyring,
15764 struct key *key);
15765
15766extern struct key *key_lookup(key_serial_t id);
15767
15768static inline __attribute__((always_inline)) key_serial_t key_serial(struct key *key)
15769{
15770 return key ? key->serial : 0;
15771}
15772
15773
15774extern ctl_table key_sysctls[];
15775
15776
15777extern void key_replace_session_keyring(void);
15778
15779
15780
15781
15782extern int install_thread_keyring_to_cred(struct cred *cred);
15783extern void key_fsuid_changed(struct task_struct *tsk);
15784extern void key_fsgid_changed(struct task_struct *tsk);
15785extern void key_init(void);
15786# 18 "include/linux/cred.h" 2
15787# 1 "include/linux/selinux.h" 1
15788# 17 "include/linux/selinux.h"
15789struct selinux_audit_rule;
15790struct audit_context;
15791struct kern_ipc_perm;
15792# 71 "include/linux/selinux.h"
15793static inline __attribute__((always_inline)) int selinux_string_to_sid(const char *str, u32 *sid)
15794{
15795 *sid = 0;
15796 return 0;
15797}
15798
15799static inline __attribute__((always_inline)) int selinux_secmark_relabel_packet_permission(u32 sid)
15800{
15801 return 0;
15802}
15803
15804static inline __attribute__((always_inline)) void selinux_secmark_refcount_inc(void)
15805{
15806 return;
15807}
15808
15809static inline __attribute__((always_inline)) void selinux_secmark_refcount_dec(void)
15810{
15811 return;
15812}
15813
15814static inline __attribute__((always_inline)) bool selinux_is_enabled(void)
15815{
15816 return false;
15817}
15818# 19 "include/linux/cred.h" 2
15819
15820
15821struct user_struct;
15822struct cred;
15823struct inode;
15824
15825
15826
15827
15828
15829
15830
15831struct group_info {
15832 atomic_t usage;
15833 int ngroups;
15834 int nblocks;
15835 gid_t small_block[32];
15836 gid_t *blocks[0];
15837};
15838# 48 "include/linux/cred.h"
15839static inline __attribute__((always_inline)) struct group_info *get_group_info(struct group_info *gi)
15840{
15841 atomic_inc(&gi->usage);
15842 return gi;
15843}
15844# 64 "include/linux/cred.h"
15845extern struct group_info *groups_alloc(int);
15846extern struct group_info init_groups;
15847extern void groups_free(struct group_info *);
15848extern int set_current_groups(struct group_info *);
15849extern int set_groups(struct cred *, struct group_info *);
15850extern int groups_search(const struct group_info *, gid_t);
15851
15852
15853
15854
15855
15856extern int in_group_p(gid_t);
15857extern int in_egroup_p(gid_t);
15858
15859
15860
15861
15862
15863
15864struct thread_group_cred {
15865 atomic_t usage;
15866 pid_t tgid;
15867 spinlock_t lock;
15868 struct key *session_keyring;
15869 struct key *process_keyring;
15870 struct rcu_head rcu;
15871};
15872# 116 "include/linux/cred.h"
15873struct cred {
15874 atomic_t usage;
15875
15876 atomic_t subscribers;
15877 void *put_addr;
15878 unsigned magic;
15879
15880
15881
15882 uid_t uid;
15883 gid_t gid;
15884 uid_t suid;
15885 gid_t sgid;
15886 uid_t euid;
15887 gid_t egid;
15888 uid_t fsuid;
15889 gid_t fsgid;
15890 unsigned securebits;
15891 kernel_cap_t cap_inheritable;
15892 kernel_cap_t cap_permitted;
15893 kernel_cap_t cap_effective;
15894 kernel_cap_t cap_bset;
15895
15896 unsigned char jit_keyring;
15897
15898 struct key *thread_keyring;
15899 struct key *request_key_auth;
15900 struct thread_group_cred *tgcred;
15901
15902
15903 void *security;
15904
15905 struct user_struct *user;
15906 struct group_info *group_info;
15907 struct rcu_head rcu;
15908};
15909
15910extern void __put_cred(struct cred *);
15911extern void exit_creds(struct task_struct *);
15912extern int copy_creds(struct task_struct *, unsigned long);
15913extern struct cred *cred_alloc_blank(void);
15914extern struct cred *prepare_creds(void);
15915extern struct cred *prepare_exec_creds(void);
15916extern struct cred *prepare_usermodehelper_creds(void);
15917extern int commit_creds(struct cred *);
15918extern void abort_creds(struct cred *);
15919extern const struct cred *override_creds(const struct cred *);
15920extern void revert_creds(const struct cred *);
15921extern struct cred *prepare_kernel_cred(struct task_struct *);
15922extern int change_create_files_as(struct cred *, struct inode *);
15923extern int set_security_override(struct cred *, u32);
15924extern int set_security_override_from_ctx(struct cred *, const char *);
15925extern int set_create_files_as(struct cred *, struct inode *);
15926extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) cred_init(void);
15927
15928
15929
15930
15931
15932extern void __invalid_creds(const struct cred *, const char *, unsigned);
15933extern void __validate_process_creds(struct task_struct *,
15934 const char *, unsigned);
15935
15936extern bool creds_are_invalid(const struct cred *cred);
15937
15938static inline __attribute__((always_inline)) void __validate_creds(const struct cred *cred,
15939 const char *file, unsigned line)
15940{
15941 if (__builtin_expect(!!(creds_are_invalid(cred)), 0))
15942 __invalid_creds(cred, file, line);
15943}
15944# 198 "include/linux/cred.h"
15945extern void validate_creds_for_do_exit(struct task_struct *);
15946# 218 "include/linux/cred.h"
15947static inline __attribute__((always_inline)) struct cred *get_new_cred(struct cred *cred)
15948{
15949 atomic_inc(&cred->usage);
15950 return cred;
15951}
15952# 237 "include/linux/cred.h"
15953static inline __attribute__((always_inline)) const struct cred *get_cred(const struct cred *cred)
15954{
15955 struct cred *nonconst_cred = (struct cred *) cred;
15956 do { __validate_creds((cred), "include/linux/cred.h", 240); } while(0);
15957 return get_new_cred(nonconst_cred);
15958}
15959# 255 "include/linux/cred.h"
15960static inline __attribute__((always_inline)) void put_cred(const struct cred *_cred)
15961{
15962 struct cred *cred = (struct cred *) _cred;
15963
15964 do { __validate_creds((cred), "include/linux/cred.h", 259); } while(0);
15965 if ((atomic_sub_return(1, (&(cred)->usage)) == 0))
15966 __put_cred(cred);
15967}
15968# 94 "include/linux/sched.h" 2
15969
15970
15971
15972struct exec_domain;
15973struct futex_pi_state;
15974struct robust_list_head;
15975struct bio;
15976struct fs_struct;
15977struct bts_context;
15978struct perf_event_context;
15979# 121 "include/linux/sched.h"
15980extern unsigned long avenrun[];
15981extern void get_avenrun(unsigned long *loads, unsigned long offset, int shift);
15982# 136 "include/linux/sched.h"
15983extern unsigned long total_forks;
15984extern int nr_threads;
15985extern __attribute__((section(".discard"), unused)) char __pcpu_scope_process_counts; extern __attribute__((section(".data" ""))) __typeof__(unsigned long) per_cpu__process_counts;
15986extern int nr_processes(void);
15987extern unsigned long nr_running(void);
15988extern unsigned long nr_uninterruptible(void);
15989extern unsigned long nr_iowait(void);
15990extern unsigned long nr_iowait_cpu(void);
15991extern unsigned long this_cpu_load(void);
15992
15993
15994extern void calc_global_load(void);
15995extern u64 cpu_nr_migrations(int cpu);
15996
15997extern unsigned long get_parent_ip(unsigned long addr);
15998
15999struct seq_file;
16000struct cfs_rq;
16001struct task_group;
16002
16003
16004
16005
16006
16007
16008static inline __attribute__((always_inline)) void
16009proc_sched_show_task(struct task_struct *p, struct seq_file *m)
16010{
16011}
16012static inline __attribute__((always_inline)) void proc_sched_set_task(struct task_struct *p)
16013{
16014}
16015static inline __attribute__((always_inline)) void
16016print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
16017{
16018}
16019
16020
16021extern unsigned long long time_sync_thresh;
16022# 253 "include/linux/sched.h"
16023extern rwlock_t tasklist_lock;
16024extern spinlock_t mmlist_lock;
16025
16026struct task_struct;
16027
16028extern void sched_init(void);
16029extern void sched_init_smp(void);
16030extern void schedule_tail(struct task_struct *prev);
16031extern void init_idle(struct task_struct *idle, int cpu);
16032extern void init_idle_bootup_task(struct task_struct *idle);
16033
16034extern int runqueue_is_locked(int cpu);
16035extern void task_rq_unlock_wait(struct task_struct *p);
16036
16037extern cpumask_var_t nohz_cpu_mask;
16038
16039
16040
16041
16042static inline __attribute__((always_inline)) int select_nohz_load_balancer(int cpu)
16043{
16044 return 0;
16045}
16046
16047
16048
16049
16050
16051extern void show_state_filter(unsigned long state_filter);
16052
16053static inline __attribute__((always_inline)) void show_state(void)
16054{
16055 show_state_filter(0);
16056}
16057
16058extern void show_regs(struct pt_regs *);
16059
16060
16061
16062
16063
16064
16065extern void show_stack(struct task_struct *task, unsigned long *sp);
16066
16067void io_schedule(void);
16068long io_schedule_timeout(long timeout);
16069
16070extern void cpu_init (void);
16071extern void trap_init(void);
16072extern void update_process_times(int user);
16073extern void scheduler_tick(void);
16074
16075extern void sched_show_task(struct task_struct *p);
16076# 317 "include/linux/sched.h"
16077static inline __attribute__((always_inline)) void softlockup_tick(void)
16078{
16079}
16080static inline __attribute__((always_inline)) void touch_softlockup_watchdog(void)
16081{
16082}
16083static inline __attribute__((always_inline)) void touch_all_softlockup_watchdogs(void)
16084{
16085}
16086
16087
16088
16089extern unsigned int sysctl_hung_task_panic;
16090extern unsigned long sysctl_hung_task_check_count;
16091extern unsigned long sysctl_hung_task_timeout_secs;
16092extern unsigned long sysctl_hung_task_warnings;
16093extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
16094 void *buffer,
16095 size_t *lenp, loff_t *ppos);
16096
16097
16098
16099
16100
16101
16102extern char __sched_text_start[], __sched_text_end[];
16103
16104
16105extern int in_sched_functions(unsigned long addr);
16106
16107
16108extern signed long schedule_timeout(signed long timeout);
16109extern signed long schedule_timeout_interruptible(signed long timeout);
16110extern signed long schedule_timeout_killable(signed long timeout);
16111extern signed long schedule_timeout_uninterruptible(signed long timeout);
16112 void __schedule(void);
16113 void schedule(void);
16114extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner);
16115
16116struct nsproxy;
16117struct user_namespace;
16118# 374 "include/linux/sched.h"
16119extern int sysctl_max_map_count;
16120
16121# 1 "include/linux/aio.h" 1
16122
16123
16124
16125
16126
16127# 1 "include/linux/aio_abi.h" 1
16128# 31 "include/linux/aio_abi.h"
16129# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/byteorder.h" 1
16130# 32 "include/linux/aio_abi.h" 2
16131
16132typedef unsigned long aio_context_t;
16133
16134enum {
16135 IOCB_CMD_PREAD = 0,
16136 IOCB_CMD_PWRITE = 1,
16137 IOCB_CMD_FSYNC = 2,
16138 IOCB_CMD_FDSYNC = 3,
16139
16140
16141
16142
16143 IOCB_CMD_NOOP = 6,
16144 IOCB_CMD_PREADV = 7,
16145 IOCB_CMD_PWRITEV = 8,
16146};
16147# 58 "include/linux/aio_abi.h"
16148struct io_event {
16149 __u64 data;
16150 __u64 obj;
16151 __s64 res;
16152 __s64 res2;
16153};
16154# 79 "include/linux/aio_abi.h"
16155struct iocb {
16156
16157 __u64 aio_data;
16158 __u32 aio_key, aio_reserved1;
16159
16160
16161
16162 __u16 aio_lio_opcode;
16163 __s16 aio_reqprio;
16164 __u32 aio_fildes;
16165
16166 __u64 aio_buf;
16167 __u64 aio_nbytes;
16168 __s64 aio_offset;
16169
16170
16171 __u64 aio_reserved2;
16172
16173
16174 __u32 aio_flags;
16175
16176
16177
16178
16179
16180 __u32 aio_resfd;
16181};
16182# 7 "include/linux/aio.h" 2
16183# 1 "include/linux/uio.h" 1
16184# 16 "include/linux/uio.h"
16185struct iovec
16186{
16187 void *iov_base;
16188 __kernel_size_t iov_len;
16189};
16190# 31 "include/linux/uio.h"
16191struct kvec {
16192 void *iov_base;
16193 size_t iov_len;
16194};
16195# 43 "include/linux/uio.h"
16196static inline __attribute__((always_inline)) size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
16197{
16198 unsigned long seg;
16199 size_t ret = 0;
16200
16201 for (seg = 0; seg < nr_segs; seg++)
16202 ret += iov[seg].iov_len;
16203 return ret;
16204}
16205
16206unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
16207# 8 "include/linux/aio.h" 2
16208
16209
16210
16211
16212
16213
16214
16215struct kioctx;
16216# 87 "include/linux/aio.h"
16217struct kiocb {
16218 struct list_head ki_run_list;
16219 unsigned long ki_flags;
16220 int ki_users;
16221 unsigned ki_key;
16222
16223 struct file *ki_filp;
16224 struct kioctx *ki_ctx;
16225 int (*ki_cancel)(struct kiocb *, struct io_event *);
16226 ssize_t (*ki_retry)(struct kiocb *);
16227 void (*ki_dtor)(struct kiocb *);
16228
16229 union {
16230 void *user;
16231 struct task_struct *tsk;
16232 } ki_obj;
16233
16234 __u64 ki_user_data;
16235 wait_queue_t ki_wait;
16236 loff_t ki_pos;
16237
16238 void *private;
16239
16240 unsigned short ki_opcode;
16241 size_t ki_nbytes;
16242 char *ki_buf;
16243 size_t ki_left;
16244 struct iovec ki_inline_vec;
16245 struct iovec *ki_iovec;
16246 unsigned long ki_nr_segs;
16247 unsigned long ki_cur_seg;
16248
16249 struct list_head ki_list;
16250
16251
16252
16253
16254
16255
16256 struct eventfd_ctx *ki_eventfd;
16257};
16258# 149 "include/linux/aio.h"
16259struct aio_ring {
16260 unsigned id;
16261 unsigned nr;
16262 unsigned head;
16263 unsigned tail;
16264
16265 unsigned magic;
16266 unsigned compat_features;
16267 unsigned incompat_features;
16268 unsigned header_length;
16269
16270
16271 struct io_event io_events[0];
16272};
16273
16274
16275
16276
16277struct aio_ring_info {
16278 unsigned long mmap_base;
16279 unsigned long mmap_size;
16280
16281 struct page **ring_pages;
16282 spinlock_t ring_lock;
16283 long nr_pages;
16284
16285 unsigned nr, tail;
16286
16287 struct page *internal_pages[8];
16288};
16289
16290struct kioctx {
16291 atomic_t users;
16292 int dead;
16293 struct mm_struct *mm;
16294
16295
16296 unsigned long user_id;
16297 struct hlist_node list;
16298
16299 wait_queue_head_t wait;
16300
16301 spinlock_t ctx_lock;
16302
16303 int reqs_active;
16304 struct list_head active_reqs;
16305 struct list_head run_list;
16306
16307
16308 unsigned max_reqs;
16309
16310 struct aio_ring_info ring_info;
16311
16312 struct delayed_work wq;
16313
16314 struct rcu_head rcu_head;
16315};
16316
16317
16318extern unsigned aio_max_size;
16319
16320
16321extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
16322extern int aio_put_req(struct kiocb *iocb);
16323extern void kick_iocb(struct kiocb *iocb);
16324extern int aio_complete(struct kiocb *iocb, long res, long res2);
16325struct mm_struct;
16326extern void exit_aio(struct mm_struct *mm);
16327# 228 "include/linux/aio.h"
16328static inline __attribute__((always_inline)) struct kiocb *list_kiocb(struct list_head *h)
16329{
16330 return ({ const typeof( ((struct kiocb *)0)->ki_list ) *__mptr = (h); (struct kiocb *)( (char *)__mptr - __builtin_offsetof(struct kiocb,ki_list) );});
16331}
16332
16333
16334extern unsigned long aio_nr;
16335extern unsigned long aio_max_nr;
16336# 377 "include/linux/sched.h" 2
16337
16338extern unsigned long
16339arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
16340 unsigned long, unsigned long);
16341extern unsigned long
16342arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
16343 unsigned long len, unsigned long pgoff,
16344 unsigned long flags);
16345extern void arch_unmap_area(struct mm_struct *, unsigned long);
16346extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
16347# 424 "include/linux/sched.h"
16348static inline __attribute__((always_inline)) unsigned long get_mm_hiwater_rss(struct mm_struct *mm)
16349{
16350 return ({ typeof(mm->hiwater_rss) _max1 = (mm->hiwater_rss); typeof((((mm)->_file_rss) + ((mm)->_anon_rss))) _max2 = ((((mm)->_file_rss) + ((mm)->_anon_rss))); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; });
16351}
16352
16353static inline __attribute__((always_inline)) void setmax_mm_hiwater_rss(unsigned long *maxrss,
16354 struct mm_struct *mm)
16355{
16356 unsigned long hiwater_rss = get_mm_hiwater_rss(mm);
16357
16358 if (*maxrss < hiwater_rss)
16359 *maxrss = hiwater_rss;
16360}
16361
16362static inline __attribute__((always_inline)) unsigned long get_mm_hiwater_vm(struct mm_struct *mm)
16363{
16364 return ({ typeof(mm->hiwater_vm) _max1 = (mm->hiwater_vm); typeof(mm->total_vm) _max2 = (mm->total_vm); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; });
16365}
16366
16367extern void set_dumpable(struct mm_struct *mm, int value);
16368extern int get_dumpable(struct mm_struct *mm);
16369# 481 "include/linux/sched.h"
16370struct sighand_struct {
16371 atomic_t count;
16372 struct k_sigaction action[64];
16373 spinlock_t siglock;
16374 wait_queue_head_t signalfd_wqh;
16375};
16376
16377struct pacct_struct {
16378 int ac_flag;
16379 long ac_exitcode;
16380 unsigned long ac_mem;
16381 cputime_t ac_utime, ac_stime;
16382 unsigned long ac_minflt, ac_majflt;
16383};
16384
16385struct cpu_itimer {
16386 cputime_t expires;
16387 cputime_t incr;
16388 u32 error;
16389 u32 incr_error;
16390};
16391# 514 "include/linux/sched.h"
16392struct task_cputime {
16393 cputime_t utime;
16394 cputime_t stime;
16395 unsigned long long sum_exec_runtime;
16396};
16397# 550 "include/linux/sched.h"
16398struct thread_group_cputimer {
16399 struct task_cputime cputime;
16400 int running;
16401 spinlock_t lock;
16402};
16403# 563 "include/linux/sched.h"
16404struct signal_struct {
16405 atomic_t count;
16406 atomic_t live;
16407
16408 wait_queue_head_t wait_chldexit;
16409
16410
16411 struct task_struct *curr_target;
16412
16413
16414 struct sigpending shared_pending;
16415
16416
16417 int group_exit_code;
16418
16419
16420
16421
16422
16423 int notify_count;
16424 struct task_struct *group_exit_task;
16425
16426
16427 int group_stop_count;
16428 unsigned int flags;
16429
16430
16431 struct list_head posix_timers;
16432
16433
16434 struct hrtimer real_timer;
16435 struct pid *leader_pid;
16436 ktime_t it_real_incr;
16437
16438
16439
16440
16441
16442
16443 struct cpu_itimer it[2];
16444
16445
16446
16447
16448
16449 struct thread_group_cputimer cputimer;
16450
16451
16452 struct task_cputime cputime_expires;
16453
16454 struct list_head cpu_timers[3];
16455
16456 struct pid *tty_old_pgrp;
16457
16458
16459 int leader;
16460
16461 struct tty_struct *tty;
16462
16463
16464
16465
16466
16467
16468
16469 cputime_t utime, stime, cutime, cstime;
16470 cputime_t gtime;
16471 cputime_t cgtime;
16472 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
16473 unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
16474 unsigned long inblock, oublock, cinblock, coublock;
16475 unsigned long maxrss, cmaxrss;
16476 struct task_io_accounting ioac;
16477
16478
16479
16480
16481
16482
16483
16484 unsigned long long sum_sched_runtime;
16485# 654 "include/linux/sched.h"
16486 struct rlimit rlim[16];
16487# 663 "include/linux/sched.h"
16488 unsigned audit_tty;
16489 struct tty_audit_buf *tty_audit_buf;
16490
16491
16492 int oom_adj;
16493};
16494# 692 "include/linux/sched.h"
16495static inline __attribute__((always_inline)) int signal_group_exit(const struct signal_struct *sig)
16496{
16497 return (sig->flags & 0x00000008) ||
16498 (sig->group_exit_task != ((void *)0));
16499}
16500
16501
16502
16503
16504struct user_struct {
16505 atomic_t __count;
16506 atomic_t processes;
16507 atomic_t files;
16508 atomic_t sigpending;
16509
16510 atomic_t inotify_watches;
16511 atomic_t inotify_devs;
16512
16513
16514 atomic_t epoll_watches;
16515
16516
16517
16518 unsigned long mq_bytes;
16519
16520 unsigned long locked_shm;
16521
16522
16523 struct key *uid_keyring;
16524 struct key *session_keyring;
16525
16526
16527
16528 struct hlist_node uidhash_node;
16529 uid_t uid;
16530 struct user_namespace *user_ns;
16531
16532
16533 struct task_group *tg;
16534
16535 struct kobject kobj;
16536 struct delayed_work work;
16537
16538
16539
16540
16541
16542
16543};
16544
16545extern int uids_sysfs_init(void);
16546
16547extern struct user_struct *find_user(uid_t);
16548
16549extern struct user_struct root_user;
16550
16551
16552
16553struct backing_dev_info;
16554struct reclaim_state;
16555
16556
16557struct sched_info {
16558
16559 unsigned long pcount;
16560 unsigned long long run_delay;
16561
16562
16563 unsigned long long last_arrival,
16564 last_queued;
16565
16566
16567 unsigned int bkl_count;
16568
16569};
16570# 803 "include/linux/sched.h"
16571static inline __attribute__((always_inline)) int sched_info_on(void)
16572{
16573
16574 return 1;
16575
16576
16577
16578
16579
16580
16581}
16582
16583enum cpu_idle_type {
16584 CPU_IDLE,
16585 CPU_NOT_IDLE,
16586 CPU_NEWLY_IDLE,
16587 CPU_MAX_IDLE_TYPES
16588};
16589# 1033 "include/linux/sched.h"
16590struct sched_domain_attr;
16591
16592static inline __attribute__((always_inline)) void
16593partition_sched_domains(int ndoms_new, struct cpumask *doms_new,
16594 struct sched_domain_attr *dattr_new)
16595{
16596}
16597
16598
16599
16600struct io_context;
16601
16602
16603
16604
16605
16606static inline __attribute__((always_inline)) void prefetch_stack(struct task_struct *t) { }
16607
16608
16609struct audit_context;
16610struct mempolicy;
16611struct pipe_inode_info;
16612struct uts_namespace;
16613
16614struct rq;
16615struct sched_domain;
16616
16617
16618
16619
16620
16621
16622
16623struct sched_class {
16624 const struct sched_class *next;
16625
16626 void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup);
16627 void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep);
16628 void (*yield_task) (struct rq *rq);
16629
16630 void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags);
16631
16632 struct task_struct * (*pick_next_task) (struct rq *rq);
16633 void (*put_prev_task) (struct rq *rq, struct task_struct *p);
16634# 1100 "include/linux/sched.h"
16635 void (*set_curr_task) (struct rq *rq);
16636 void (*task_tick) (struct rq *rq, struct task_struct *p, int queued);
16637 void (*task_new) (struct rq *rq, struct task_struct *p);
16638
16639 void (*switched_from) (struct rq *this_rq, struct task_struct *task,
16640 int running);
16641 void (*switched_to) (struct rq *this_rq, struct task_struct *task,
16642 int running);
16643 void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
16644 int oldprio, int running);
16645
16646 unsigned int (*get_rr_interval) (struct task_struct *task);
16647
16648
16649 void (*moved_group) (struct task_struct *p);
16650
16651};
16652
16653struct load_weight {
16654 unsigned long weight, inv_weight;
16655};
16656# 1132 "include/linux/sched.h"
16657struct sched_entity {
16658 struct load_weight load;
16659 struct rb_node run_node;
16660 struct list_head group_node;
16661 unsigned int on_rq;
16662
16663 u64 exec_start;
16664 u64 sum_exec_runtime;
16665 u64 vruntime;
16666 u64 prev_sum_exec_runtime;
16667
16668 u64 last_wakeup;
16669 u64 avg_overlap;
16670
16671 u64 nr_migrations;
16672
16673 u64 start_runtime;
16674 u64 avg_wakeup;
16675
16676 u64 avg_running;
16677
16678
16679 u64 wait_start;
16680 u64 wait_max;
16681 u64 wait_count;
16682 u64 wait_sum;
16683 u64 iowait_count;
16684 u64 iowait_sum;
16685
16686 u64 sleep_start;
16687 u64 sleep_max;
16688 s64 sum_sleep_runtime;
16689
16690 u64 block_start;
16691 u64 block_max;
16692 u64 exec_max;
16693 u64 slice_max;
16694
16695 u64 nr_migrations_cold;
16696 u64 nr_failed_migrations_affine;
16697 u64 nr_failed_migrations_running;
16698 u64 nr_failed_migrations_hot;
16699 u64 nr_forced_migrations;
16700 u64 nr_forced2_migrations;
16701
16702 u64 nr_wakeups;
16703 u64 nr_wakeups_sync;
16704 u64 nr_wakeups_migrate;
16705 u64 nr_wakeups_local;
16706 u64 nr_wakeups_remote;
16707 u64 nr_wakeups_affine;
16708 u64 nr_wakeups_affine_attempts;
16709 u64 nr_wakeups_passive;
16710 u64 nr_wakeups_idle;
16711
16712
16713
16714 struct sched_entity *parent;
16715
16716 struct cfs_rq *cfs_rq;
16717
16718 struct cfs_rq *my_q;
16719
16720};
16721
16722struct sched_rt_entity {
16723 struct list_head run_list;
16724 unsigned long timeout;
16725 unsigned int time_slice;
16726 int nr_cpus_allowed;
16727
16728 struct sched_rt_entity *back;
16729
16730
16731
16732
16733
16734
16735
16736};
16737
16738struct rcu_node;
16739
16740struct task_struct {
16741 volatile long state;
16742 void *stack;
16743 atomic_t usage;
16744 unsigned int flags;
16745 unsigned int ptrace;
16746
16747 int lock_depth;
16748
16749
16750
16751
16752
16753
16754
16755 int prio, static_prio, normal_prio;
16756 unsigned int rt_priority;
16757 const struct sched_class *sched_class;
16758 struct sched_entity se;
16759 struct sched_rt_entity rt;
16760# 1249 "include/linux/sched.h"
16761 unsigned char fpu_counter;
16762
16763
16764
16765
16766 unsigned int policy;
16767 cpumask_t cpus_allowed;
16768# 1265 "include/linux/sched.h"
16769 struct sched_info sched_info;
16770
16771
16772 struct list_head tasks;
16773 struct plist_node pushable_tasks;
16774
16775 struct mm_struct *mm, *active_mm;
16776
16777
16778 int exit_state;
16779 int exit_code, exit_signal;
16780 int pdeath_signal;
16781
16782 unsigned int personality;
16783 unsigned did_exec:1;
16784 unsigned in_execve:1;
16785
16786 unsigned in_iowait:1;
16787
16788
16789
16790 unsigned sched_reset_on_fork:1;
16791
16792 pid_t pid;
16793 pid_t tgid;
16794# 1301 "include/linux/sched.h"
16795 struct task_struct *real_parent;
16796 struct task_struct *parent;
16797
16798
16799
16800 struct list_head children;
16801 struct list_head sibling;
16802 struct task_struct *group_leader;
16803
16804
16805
16806
16807
16808
16809 struct list_head ptraced;
16810 struct list_head ptrace_entry;
16811
16812
16813
16814
16815
16816 struct bts_context *bts;
16817
16818
16819 struct pid_link pids[PIDTYPE_MAX];
16820 struct list_head thread_group;
16821
16822 struct completion *vfork_done;
16823 int *set_child_tid;
16824 int *clear_child_tid;
16825
16826 cputime_t utime, stime, utimescaled, stimescaled;
16827 cputime_t gtime;
16828 cputime_t prev_utime, prev_stime;
16829 unsigned long nvcsw, nivcsw;
16830 struct timespec start_time;
16831 struct timespec real_start_time;
16832
16833 unsigned long min_flt, maj_flt;
16834
16835 struct task_cputime cputime_expires;
16836 struct list_head cpu_timers[3];
16837
16838
16839 const struct cred *real_cred;
16840
16841 const struct cred *cred;
16842
16843 struct mutex cred_guard_mutex;
16844
16845
16846 struct cred *replacement_session_keyring;
16847
16848 char comm[16];
16849
16850
16851
16852
16853 int link_count, total_link_count;
16854
16855
16856
16857
16858
16859
16860 unsigned long last_switch_count;
16861
16862
16863 struct thread_struct thread;
16864
16865 struct fs_struct *fs;
16866
16867 struct files_struct *files;
16868
16869 struct nsproxy *nsproxy;
16870
16871 struct signal_struct *signal;
16872 struct sighand_struct *sighand;
16873
16874 sigset_t blocked, real_blocked;
16875 sigset_t saved_sigmask;
16876 struct sigpending pending;
16877
16878 unsigned long sas_ss_sp;
16879 size_t sas_ss_size;
16880 int (*notifier)(void *priv);
16881 void *notifier_data;
16882 sigset_t *notifier_mask;
16883 struct audit_context *audit_context;
16884
16885
16886
16887
16888 seccomp_t seccomp;
16889
16890
16891 u32 parent_exec_id;
16892 u32 self_exec_id;
16893
16894
16895 spinlock_t alloc_lock;
16896
16897
16898
16899 struct irqaction *irqaction;
16900
16901
16902
16903 spinlock_t pi_lock;
16904
16905
16906
16907 struct plist_head pi_waiters;
16908
16909 struct rt_mutex_waiter *pi_blocked_on;
16910
16911
16912
16913
16914 struct mutex_waiter *blocked_on;
16915# 1439 "include/linux/sched.h"
16916 u64 curr_chain_key;
16917 int lockdep_depth;
16918 unsigned int lockdep_recursion;
16919 struct held_lock held_locks[48UL];
16920 gfp_t lockdep_reclaim_gfp;
16921
16922
16923
16924 void *journal_info;
16925
16926
16927 struct bio *bio_list, **bio_tail;
16928
16929
16930 struct reclaim_state *reclaim_state;
16931
16932 struct backing_dev_info *backing_dev_info;
16933
16934 struct io_context *io_context;
16935
16936 unsigned long ptrace_message;
16937 siginfo_t *last_siginfo;
16938 struct task_io_accounting ioac;
16939# 1478 "include/linux/sched.h"
16940 struct robust_list_head *robust_list;
16941
16942
16943
16944 struct list_head pi_state_list;
16945 struct futex_pi_state *pi_state_cache;
16946# 1494 "include/linux/sched.h"
16947 atomic_t fs_excl;
16948 struct rcu_head rcu;
16949
16950
16951
16952
16953 struct pipe_inode_info *splice_pipe;
16954
16955
16956
16957
16958 int make_it_fail;
16959
16960 struct prop_local_single dirties;
16961# 1516 "include/linux/sched.h"
16962 unsigned long timer_slack_ns;
16963 unsigned long default_timer_slack_ns;
16964
16965 struct list_head *scm_work_list;
16966# 1537 "include/linux/sched.h"
16967 unsigned long trace;
16968
16969 unsigned long trace_recursion;
16970
16971 unsigned long stack_start;
16972};
16973# 1566 "include/linux/sched.h"
16974static inline __attribute__((always_inline)) int rt_prio(int prio)
16975{
16976 if (__builtin_expect(!!(prio < 100), 0))
16977 return 1;
16978 return 0;
16979}
16980
16981static inline __attribute__((always_inline)) int rt_task(struct task_struct *p)
16982{
16983 return rt_prio(p->prio);
16984}
16985
16986static inline __attribute__((always_inline)) struct pid *task_pid(struct task_struct *task)
16987{
16988 return task->pids[PIDTYPE_PID].pid;
16989}
16990
16991static inline __attribute__((always_inline)) struct pid *task_tgid(struct task_struct *task)
16992{
16993 return task->group_leader->pids[PIDTYPE_PID].pid;
16994}
16995
16996
16997
16998
16999
17000
17001static inline __attribute__((always_inline)) struct pid *task_pgrp(struct task_struct *task)
17002{
17003 return task->group_leader->pids[PIDTYPE_PGID].pid;
17004}
17005
17006static inline __attribute__((always_inline)) struct pid *task_session(struct task_struct *task)
17007{
17008 return task->group_leader->pids[PIDTYPE_SID].pid;
17009}
17010
17011struct pid_namespace;
17012# 1618 "include/linux/sched.h"
17013pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
17014 struct pid_namespace *ns);
17015
17016static inline __attribute__((always_inline)) pid_t task_pid_nr(struct task_struct *tsk)
17017{
17018 return tsk->pid;
17019}
17020
17021static inline __attribute__((always_inline)) pid_t task_pid_nr_ns(struct task_struct *tsk,
17022 struct pid_namespace *ns)
17023{
17024 return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns);
17025}
17026
17027static inline __attribute__((always_inline)) pid_t task_pid_vnr(struct task_struct *tsk)
17028{
17029 return __task_pid_nr_ns(tsk, PIDTYPE_PID, ((void *)0));
17030}
17031
17032
17033static inline __attribute__((always_inline)) pid_t task_tgid_nr(struct task_struct *tsk)
17034{
17035 return tsk->tgid;
17036}
17037
17038pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns);
17039
17040static inline __attribute__((always_inline)) pid_t task_tgid_vnr(struct task_struct *tsk)
17041{
17042 return pid_vnr(task_tgid(tsk));
17043}
17044
17045
17046static inline __attribute__((always_inline)) pid_t task_pgrp_nr_ns(struct task_struct *tsk,
17047 struct pid_namespace *ns)
17048{
17049 return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns);
17050}
17051
17052static inline __attribute__((always_inline)) pid_t task_pgrp_vnr(struct task_struct *tsk)
17053{
17054 return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ((void *)0));
17055}
17056
17057
17058static inline __attribute__((always_inline)) pid_t task_session_nr_ns(struct task_struct *tsk,
17059 struct pid_namespace *ns)
17060{
17061 return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns);
17062}
17063
17064static inline __attribute__((always_inline)) pid_t task_session_vnr(struct task_struct *tsk)
17065{
17066 return __task_pid_nr_ns(tsk, PIDTYPE_SID, ((void *)0));
17067}
17068
17069
17070static inline __attribute__((always_inline)) pid_t task_pgrp_nr(struct task_struct *tsk)
17071{
17072 return task_pgrp_nr_ns(tsk, &init_pid_ns);
17073}
17074# 1688 "include/linux/sched.h"
17075static inline __attribute__((always_inline)) int pid_alive(struct task_struct *p)
17076{
17077 return p->pids[PIDTYPE_PID].pid != ((void *)0);
17078}
17079
17080
17081
17082
17083
17084
17085
17086static inline __attribute__((always_inline)) int is_global_init(struct task_struct *tsk)
17087{
17088 return tsk->pid == 1;
17089}
17090
17091
17092
17093
17094
17095extern int is_container_init(struct task_struct *tsk);
17096
17097extern struct pid *cad_pid;
17098
17099extern void free_task(struct task_struct *tsk);
17100
17101
17102extern void __put_task_struct(struct task_struct *t);
17103
17104static inline __attribute__((always_inline)) void put_task_struct(struct task_struct *t)
17105{
17106 if ((atomic_sub_return(1, (&t->usage)) == 0))
17107 __put_task_struct(t);
17108}
17109
17110extern cputime_t task_utime(struct task_struct *p);
17111extern cputime_t task_stime(struct task_struct *p);
17112extern cputime_t task_gtime(struct task_struct *p);
17113# 1803 "include/linux/sched.h"
17114static inline __attribute__((always_inline)) void rcu_copy_process(struct task_struct *p)
17115{
17116}
17117
17118
17119
17120
17121
17122
17123
17124static inline __attribute__((always_inline)) int set_cpus_allowed_ptr(struct task_struct *p,
17125 const struct cpumask *new_mask)
17126{
17127 if (!test_bit(cpumask_check(0), (((new_mask))->bits)))
17128 return -22;
17129 return 0;
17130}
17131
17132
17133
17134static inline __attribute__((always_inline)) int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
17135{
17136 return set_cpus_allowed_ptr(p, &new_mask);
17137}
17138# 1839 "include/linux/sched.h"
17139extern unsigned long long sched_clock(void);
17140
17141extern void sched_clock_init(void);
17142extern u64 sched_clock_cpu(int cpu);
17143
17144
17145static inline __attribute__((always_inline)) void sched_clock_tick(void)
17146{
17147}
17148
17149static inline __attribute__((always_inline)) void sched_clock_idle_sleep_event(void)
17150{
17151}
17152
17153static inline __attribute__((always_inline)) void sched_clock_idle_wakeup_event(u64 delta_ns)
17154{
17155}
17156# 1866 "include/linux/sched.h"
17157extern unsigned long long cpu_clock(int cpu);
17158
17159extern unsigned long long
17160task_sched_runtime(struct task_struct *task);
17161extern unsigned long long thread_group_sched_runtime(struct task_struct *task);
17162# 1879 "include/linux/sched.h"
17163extern void sched_clock_idle_sleep_event(void);
17164extern void sched_clock_idle_wakeup_event(u64 delta_ns);
17165
17166
17167
17168
17169static inline __attribute__((always_inline)) void idle_task_exit(void) {}
17170
17171
17172extern void sched_idle_next(void);
17173
17174
17175
17176
17177static inline __attribute__((always_inline)) void wake_up_idle_cpu(int cpu) { }
17178
17179
17180extern unsigned int sysctl_sched_latency;
17181extern unsigned int sysctl_sched_min_granularity;
17182extern unsigned int sysctl_sched_wakeup_granularity;
17183extern unsigned int sysctl_sched_shares_ratelimit;
17184extern unsigned int sysctl_sched_shares_thresh;
17185extern unsigned int sysctl_sched_child_runs_first;
17186# 1919 "include/linux/sched.h"
17187static inline __attribute__((always_inline)) unsigned int get_sysctl_timer_migration(void)
17188{
17189 return 1;
17190}
17191
17192extern unsigned int sysctl_sched_rt_period;
17193extern int sysctl_sched_rt_runtime;
17194
17195int sched_rt_handler(struct ctl_table *table, int write,
17196 void *buffer, size_t *lenp,
17197 loff_t *ppos);
17198
17199extern unsigned int sysctl_sched_compat_yield;
17200
17201
17202extern int rt_mutex_getprio(struct task_struct *p);
17203extern void rt_mutex_setprio(struct task_struct *p, int prio);
17204extern void rt_mutex_adjust_pi(struct task_struct *p);
17205# 1945 "include/linux/sched.h"
17206extern void set_user_nice(struct task_struct *p, long nice);
17207extern int task_prio(const struct task_struct *p);
17208extern int task_nice(const struct task_struct *p);
17209extern int can_nice(const struct task_struct *p, const int nice);
17210extern int task_curr(const struct task_struct *p);
17211extern int idle_cpu(int cpu);
17212extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
17213extern int sched_setscheduler_nocheck(struct task_struct *, int,
17214 struct sched_param *);
17215extern struct task_struct *idle_task(int cpu);
17216extern struct task_struct *curr_task(int cpu);
17217extern void set_curr_task(int cpu, struct task_struct *p);
17218
17219void yield(void);
17220
17221
17222
17223
17224extern struct exec_domain default_exec_domain;
17225
17226union thread_union {
17227 struct thread_info thread_info;
17228 unsigned long stack[8192/sizeof(long)];
17229};
17230
17231
17232static inline __attribute__((always_inline)) int kstack_end(void *addr)
17233{
17234
17235
17236
17237 return !(((unsigned long)addr+sizeof(void*)-1) & (8192 -sizeof(void*)));
17238}
17239
17240
17241extern union thread_union init_thread_union;
17242extern struct task_struct init_task;
17243
17244extern struct mm_struct init_mm;
17245
17246extern struct pid_namespace init_pid_ns;
17247# 1998 "include/linux/sched.h"
17248extern struct task_struct *find_task_by_vpid(pid_t nr);
17249extern struct task_struct *find_task_by_pid_ns(pid_t nr,
17250 struct pid_namespace *ns);
17251
17252extern void __set_special_pids(struct pid *pid);
17253
17254
17255extern struct user_struct * alloc_uid(struct user_namespace *, uid_t);
17256static inline __attribute__((always_inline)) struct user_struct *get_uid(struct user_struct *u)
17257{
17258 atomic_inc(&u->__count);
17259 return u;
17260}
17261extern void free_uid(struct user_struct *);
17262extern void release_uids(struct user_namespace *ns);
17263
17264# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/current.h" 1
17265# 2015 "include/linux/sched.h" 2
17266
17267extern void do_timer(unsigned long ticks);
17268
17269extern int wake_up_state(struct task_struct *tsk, unsigned int state);
17270extern int wake_up_process(struct task_struct *tsk);
17271extern void wake_up_new_task(struct task_struct *tsk,
17272 unsigned long clone_flags);
17273
17274
17275
17276 static inline __attribute__((always_inline)) void kick_process(struct task_struct *tsk) { }
17277
17278extern void sched_fork(struct task_struct *p, int clone_flags);
17279extern void sched_dead(struct task_struct *p);
17280
17281extern void proc_caches_init(void);
17282extern void flush_signals(struct task_struct *);
17283extern void __flush_signals(struct task_struct *);
17284extern void ignore_signals(struct task_struct *);
17285extern void flush_signal_handlers(struct task_struct *, int force_default);
17286extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
17287
17288static inline __attribute__((always_inline)) int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
17289{
17290 unsigned long flags;
17291 int ret;
17292
17293 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = _spin_lock_irqsave(&tsk->sighand->siglock); } while (0);
17294 ret = dequeue_signal(tsk, mask, info);
17295 do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); _spin_unlock_irqrestore(&tsk->sighand->siglock, flags); } while (0);
17296
17297 return ret;
17298}
17299
17300extern void block_all_signals(int (*notifier)(void *priv), void *priv,
17301 sigset_t *mask);
17302extern void unblock_all_signals(void);
17303extern void release_task(struct task_struct * p);
17304extern int send_sig_info(int, struct siginfo *, struct task_struct *);
17305extern int force_sigsegv(int, struct task_struct *);
17306extern int force_sig_info(int, struct siginfo *, struct task_struct *);
17307extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
17308extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid);
17309extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32);
17310extern int kill_pgrp(struct pid *pid, int sig, int priv);
17311extern int kill_pid(struct pid *pid, int sig, int priv);
17312extern int kill_proc_info(int, struct siginfo *, pid_t);
17313extern int do_notify_parent(struct task_struct *, int);
17314extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent);
17315extern void force_sig(int, struct task_struct *);
17316extern void force_sig_specific(int, struct task_struct *);
17317extern int send_sig(int, struct task_struct *, int);
17318extern void zap_other_threads(struct task_struct *p);
17319extern struct sigqueue *sigqueue_alloc(void);
17320extern void sigqueue_free(struct sigqueue *);
17321extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group);
17322extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *);
17323extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long);
17324
17325static inline __attribute__((always_inline)) int kill_cad_pid(int sig, int priv)
17326{
17327 return kill_pid(cad_pid, sig, priv);
17328}
17329
17330
17331
17332
17333
17334
17335static inline __attribute__((always_inline)) int is_si_special(const struct siginfo *info)
17336{
17337 return info <= ((struct siginfo *) 2);
17338}
17339
17340
17341
17342static inline __attribute__((always_inline)) int on_sig_stack(unsigned long sp)
17343{
17344 return (sp - (current_thread_info()->task)->sas_ss_sp < (current_thread_info()->task)->sas_ss_size);
17345}
17346
17347static inline __attribute__((always_inline)) int sas_ss_flags(unsigned long sp)
17348{
17349 return ((current_thread_info()->task)->sas_ss_size == 0 ? 2
17350 : on_sig_stack(sp) ? 1 : 0);
17351}
17352
17353
17354
17355
17356extern struct mm_struct * mm_alloc(void);
17357
17358
17359extern void __mmdrop(struct mm_struct *);
17360static inline __attribute__((always_inline)) void mmdrop(struct mm_struct * mm)
17361{
17362 if (__builtin_expect(!!((atomic_sub_return(1, (&mm->mm_count)) == 0)), 0))
17363 __mmdrop(mm);
17364}
17365
17366
17367extern void mmput(struct mm_struct *);
17368
17369extern struct mm_struct *get_task_mm(struct task_struct *task);
17370
17371extern void mm_release(struct task_struct *, struct mm_struct *);
17372
17373extern struct mm_struct *dup_mm(struct task_struct *tsk);
17374
17375extern int copy_thread(unsigned long, unsigned long, unsigned long,
17376 struct task_struct *, struct pt_regs *);
17377extern void flush_thread(void);
17378extern void exit_thread(void);
17379
17380extern void exit_files(struct task_struct *);
17381extern void __cleanup_signal(struct signal_struct *);
17382extern void __cleanup_sighand(struct sighand_struct *);
17383
17384extern void exit_itimers(struct signal_struct *);
17385extern void flush_itimer_signals(void);
17386
17387extern void do_group_exit(int);
17388
17389extern void daemonize(const char *, ...);
17390extern int allow_signal(int);
17391extern int disallow_signal(int);
17392
17393extern int do_execve(char *, char * *, char * *, struct pt_regs *);
17394extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *);
17395struct task_struct *fork_idle(int);
17396
17397extern void set_task_comm(struct task_struct *tsk, char *from);
17398extern char *get_task_comm(char *to, struct task_struct *tsk);
17399
17400
17401
17402
17403
17404static inline __attribute__((always_inline)) void wait_task_context_switch(struct task_struct *p) {}
17405static inline __attribute__((always_inline)) unsigned long wait_task_inactive(struct task_struct *p,
17406 long match_state)
17407{
17408 return 1;
17409}
17410# 2167 "include/linux/sched.h"
17411extern bool current_is_single_threaded(void);
17412# 2188 "include/linux/sched.h"
17413static inline __attribute__((always_inline)) int has_group_leader_pid(struct task_struct *p)
17414{
17415 return p->pid == p->tgid;
17416}
17417
17418static inline __attribute__((always_inline))
17419int same_thread_group(struct task_struct *p1, struct task_struct *p2)
17420{
17421 return p1->tgid == p2->tgid;
17422}
17423
17424static inline __attribute__((always_inline)) struct task_struct *next_thread(const struct task_struct *p)
17425{
17426 return ({ const typeof( ((struct task_struct *)0)->thread_group ) *__mptr = (({ typeof(p->thread_group.next) _________p1 = (*(volatile typeof(p->thread_group.next) *)&(p->thread_group.next)); do { } while(0); (_________p1); })); (struct task_struct *)( (char *)__mptr - __builtin_offsetof(struct task_struct,thread_group) );});
17427
17428}
17429
17430static inline __attribute__((always_inline)) int thread_group_empty(struct task_struct *p)
17431{
17432 return list_empty(&p->thread_group);
17433}
17434
17435
17436
17437
17438static inline __attribute__((always_inline)) int task_detached(struct task_struct *p)
17439{
17440 return p->exit_signal == -1;
17441}
17442# 2228 "include/linux/sched.h"
17443static inline __attribute__((always_inline)) void task_lock(struct task_struct *p)
17444{
17445 _spin_lock(&p->alloc_lock);
17446}
17447
17448static inline __attribute__((always_inline)) void task_unlock(struct task_struct *p)
17449{
17450 _spin_unlock(&p->alloc_lock);
17451}
17452
17453extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk,
17454 unsigned long *flags);
17455
17456static inline __attribute__((always_inline)) void unlock_task_sighand(struct task_struct *tsk,
17457 unsigned long *flags)
17458{
17459 do { ({ unsigned long __dummy; typeof(*flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); _spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); } while (0);
17460}
17461
17462
17463
17464
17465
17466
17467static inline __attribute__((always_inline)) void setup_thread_stack(struct task_struct *p, struct task_struct *org)
17468{
17469 *((struct thread_info *)(p)->stack) = *((struct thread_info *)(org)->stack);
17470 ((struct thread_info *)(p)->stack)->task = p;
17471}
17472
17473static inline __attribute__((always_inline)) unsigned long *end_of_stack(struct task_struct *p)
17474{
17475 return (unsigned long *)(((struct thread_info *)(p)->stack) + 1);
17476}
17477
17478
17479
17480static inline __attribute__((always_inline)) int object_is_on_stack(void *obj)
17481{
17482 void *stack = (((current_thread_info()->task))->stack);
17483
17484 return (obj >= stack) && (obj < (stack + 8192));
17485}
17486
17487extern void thread_info_cache_init(void);
17488
17489
17490static inline __attribute__((always_inline)) unsigned long stack_not_used(struct task_struct *p)
17491{
17492 unsigned long *n = end_of_stack(p);
17493
17494 do {
17495 n++;
17496 } while (!*n);
17497
17498 return (unsigned long)n - (unsigned long)end_of_stack(p);
17499}
17500
17501
17502
17503
17504
17505static inline __attribute__((always_inline)) void set_tsk_thread_flag(struct task_struct *tsk, int flag)
17506{
17507 set_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag);
17508}
17509
17510static inline __attribute__((always_inline)) void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
17511{
17512 clear_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag);
17513}
17514
17515static inline __attribute__((always_inline)) int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
17516{
17517 return test_and_set_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag);
17518}
17519
17520static inline __attribute__((always_inline)) int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
17521{
17522 return test_and_clear_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag);
17523}
17524
17525static inline __attribute__((always_inline)) int test_tsk_thread_flag(struct task_struct *tsk, int flag)
17526{
17527 return test_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag);
17528}
17529
17530static inline __attribute__((always_inline)) void set_tsk_need_resched(struct task_struct *tsk)
17531{
17532 set_tsk_thread_flag(tsk,2);
17533}
17534
17535static inline __attribute__((always_inline)) void clear_tsk_need_resched(struct task_struct *tsk)
17536{
17537 clear_tsk_thread_flag(tsk,2);
17538}
17539
17540static inline __attribute__((always_inline)) int test_tsk_need_resched(struct task_struct *tsk)
17541{
17542 return __builtin_expect(!!(test_tsk_thread_flag(tsk,2)), 0);
17543}
17544
17545static inline __attribute__((always_inline)) int restart_syscall(void)
17546{
17547 set_tsk_thread_flag((current_thread_info()->task), 1);
17548 return -513;
17549}
17550
17551static inline __attribute__((always_inline)) int signal_pending(struct task_struct *p)
17552{
17553 return __builtin_expect(!!(test_tsk_thread_flag(p,1)), 0);
17554}
17555
17556static inline __attribute__((always_inline)) int __fatal_signal_pending(struct task_struct *p)
17557{
17558 return __builtin_expect(!!(sigismember(&p->pending.signal, 9)), 0);
17559}
17560
17561static inline __attribute__((always_inline)) int fatal_signal_pending(struct task_struct *p)
17562{
17563 return signal_pending(p) && __fatal_signal_pending(p);
17564}
17565
17566static inline __attribute__((always_inline)) int signal_pending_state(long state, struct task_struct *p)
17567{
17568 if (!(state & (1 | 128)))
17569 return 0;
17570 if (!signal_pending(p))
17571 return 0;
17572
17573 return (state & 1) || __fatal_signal_pending(p);
17574}
17575
17576static inline __attribute__((always_inline)) int need_resched(void)
17577{
17578 return __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 2)), 0);
17579}
17580# 2373 "include/linux/sched.h"
17581extern int _cond_resched(void);
17582
17583
17584
17585
17586
17587
17588extern int __cond_resched_lock(spinlock_t *lock);
17589# 2393 "include/linux/sched.h"
17590extern int __cond_resched_softirq(void);
17591# 2405 "include/linux/sched.h"
17592static inline __attribute__((always_inline)) int spin_needbreak(spinlock_t *lock)
17593{
17594
17595
17596
17597 return 0;
17598
17599}
17600
17601
17602
17603
17604void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times);
17605void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times);
17606
17607static inline __attribute__((always_inline)) void thread_group_cputime_init(struct signal_struct *sig)
17608{
17609 sig->cputimer.cputime = (struct task_cputime) { .utime = (0UL), .stime = (0UL), .sum_exec_runtime = 0, };
17610 do { static struct lock_class_key __key; __spin_lock_init((&sig->cputimer.lock), "&sig->cputimer.lock", &__key); } while (0);
17611 sig->cputimer.running = 0;
17612}
17613
17614static inline __attribute__((always_inline)) void thread_group_cputime_free(struct signal_struct *sig)
17615{
17616}
17617
17618
17619
17620
17621
17622
17623
17624extern void recalc_sigpending_and_wake(struct task_struct *t);
17625extern void recalc_sigpending(void);
17626
17627extern void signal_wake_up(struct task_struct *t, int resume_stopped);
17628# 2456 "include/linux/sched.h"
17629static inline __attribute__((always_inline)) unsigned int task_cpu(const struct task_struct *p)
17630{
17631 return 0;
17632}
17633
17634static inline __attribute__((always_inline)) void set_task_cpu(struct task_struct *p, unsigned int cpu)
17635{
17636}
17637
17638
17639
17640extern void arch_pick_mmap_layout(struct mm_struct *mm);
17641
17642
17643extern void
17644__trace_special(void *__tr, void *__data,
17645 unsigned long arg1, unsigned long arg2, unsigned long arg3);
17646# 2481 "include/linux/sched.h"
17647extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask);
17648extern long sched_getaffinity(pid_t pid, struct cpumask *mask);
17649
17650extern void normalize_rt_tasks(void);
17651
17652
17653
17654extern struct task_group init_task_group;
17655
17656extern struct task_group root_task_group;
17657extern void set_tg_uid(struct user_struct *user);
17658
17659
17660extern struct task_group *sched_create_group(struct task_group *parent);
17661extern void sched_destroy_group(struct task_group *tg);
17662extern void sched_move_task(struct task_struct *tsk);
17663
17664extern int sched_group_set_shares(struct task_group *tg, unsigned long shares);
17665extern unsigned long sched_group_shares(struct task_group *tg);
17666# 2512 "include/linux/sched.h"
17667extern int task_can_switch_user(struct user_struct *up,
17668 struct task_struct *tsk);
17669# 2536 "include/linux/sched.h"
17670static inline __attribute__((always_inline)) void add_rchar(struct task_struct *tsk, ssize_t amt)
17671{
17672}
17673
17674static inline __attribute__((always_inline)) void add_wchar(struct task_struct *tsk, ssize_t amt)
17675{
17676}
17677
17678static inline __attribute__((always_inline)) void inc_syscr(struct task_struct *tsk)
17679{
17680}
17681
17682static inline __attribute__((always_inline)) void inc_syscw(struct task_struct *tsk)
17683{
17684}
17685# 2560 "include/linux/sched.h"
17686extern void task_oncpu_function_call(struct task_struct *p,
17687 void (*func) (void *info), void *info);
17688
17689
17690
17691
17692
17693
17694static inline __attribute__((always_inline)) void mm_update_next_owner(struct mm_struct *mm)
17695{
17696}
17697
17698static inline __attribute__((always_inline)) void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
17699{
17700}
17701# 16 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h" 2
17702
17703
17704
17705# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/segment.h" 1
17706# 20 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h" 2
17707# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/sections.h" 1
17708# 11 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/sections.h"
17709extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;
17710
17711extern unsigned long _ramstart, _ramend, _rambase;
17712extern unsigned long memory_start, memory_end, physical_mem_end;
17713
17714
17715
17716
17717
17718
17719extern char _stext_l1[], _etext_l1[], _text_l1_lma[], __attribute__((weak)) _text_l1_len[];
17720extern char _sdata_l1[], _edata_l1[], _sbss_l1[], _ebss_l1[],
17721 _data_l1_lma[], __attribute__((weak)) _data_l1_len[];
17722extern char _sdata_b_l1[], _edata_b_l1[], _sbss_b_l1[], _ebss_b_l1[],
17723 _data_b_l1_lma[], __attribute__((weak)) _data_b_l1_len[];
17724extern char _stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[],
17725 _sbss_l2[], _ebss_l2[], _l2_lma[], __attribute__((weak)) _l2_len[];
17726
17727
17728
17729
17730static inline __attribute__((always_inline)) int arch_is_kernel_text(unsigned long addr)
17731{
17732 return
17733 ((0x14000 - 0x4000) &&
17734 addr >= (unsigned long)_stext_l1 &&
17735 addr < (unsigned long)_etext_l1)
17736 ||
17737 (0 &&
17738 addr >= (unsigned long)_stext_l2 &&
17739 addr < (unsigned long)_etext_l2);
17740}
17741
17742
17743static inline __attribute__((always_inline)) int arch_is_kernel_data(unsigned long addr)
17744{
17745 return
17746 ((0x8000 - 0x4000) &&
17747 addr >= (unsigned long)_sdata_l1 &&
17748 addr < (unsigned long)_ebss_l1)
17749 ||
17750 (0x8000 &&
17751 addr >= (unsigned long)_sdata_b_l1 &&
17752 addr < (unsigned long)_ebss_b_l1)
17753 ||
17754 (0 &&
17755 addr >= (unsigned long)_sdata_l2 &&
17756 addr < (unsigned long)_ebss_l2);
17757}
17758
17759
17760# 1 "include/asm-generic/sections.h" 1
17761
17762
17763
17764
17765
17766extern char _text[], _stext[], _etext[];
17767extern char _data[], _sdata[], _edata[];
17768extern char __bss_start[], __bss_stop[];
17769extern char __init_begin[], __init_end[];
17770extern char _sinittext[], _einittext[];
17771extern char _end[];
17772extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[];
17773extern char __kprobes_text_start[], __kprobes_text_end[];
17774extern char __initdata_begin[], __initdata_end[];
17775extern char __start_rodata[], __end_rodata[];
17776
17777
17778extern char __ctors_start[], __ctors_end[];
17779# 63 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/sections.h" 2
17780# 21 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h" 2
17781
17782
17783
17784
17785static inline __attribute__((always_inline)) void set_fs(mm_segment_t fs)
17786{
17787 current_thread_info()->addr_limit = fs;
17788}
17789# 37 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
17790static inline __attribute__((always_inline)) int is_in_rom(unsigned long addr)
17791{
17792# 47 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
17793 if ((addr < _ramstart) || (addr >= _ramend))
17794 return (1);
17795
17796
17797 return (0);
17798}
17799# 63 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
17800extern int _access_ok(unsigned long addr, unsigned long size);
17801# 79 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
17802struct exception_table_entry {
17803 unsigned long insn, fixup;
17804};
17805# 123 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
17806static inline __attribute__((always_inline)) int bad_user_access_length(void)
17807{
17808 panic("bad_user_access_length");
17809 return -1;
17810}
17811# 194 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
17812static inline __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result))
17813copy_from_user(void *to, const void *from, unsigned long n)
17814{
17815 if (_access_ok((unsigned long)(from), (n)))
17816 memcpy(to, from, n);
17817 else
17818 return n;
17819 return 0;
17820}
17821
17822static inline __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result))
17823copy_to_user(void *to, const void *from, unsigned long n)
17824{
17825 if (_access_ok((unsigned long)(to), (n)))
17826 memcpy(to, from, n);
17827 else
17828 return n;
17829 return 0;
17830}
17831
17832
17833
17834
17835
17836static inline __attribute__((always_inline)) long __attribute__((warn_unused_result))
17837strncpy_from_user(char *dst, const char *src, long count)
17838{
17839 char *tmp;
17840 if (!_access_ok((unsigned long)(src), (1)))
17841 return -14;
17842 strncpy(dst, src, count);
17843 for (tmp = dst; *tmp && count > 0; tmp++, count--) ;
17844 return (tmp - dst);
17845}
17846# 240 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
17847static inline __attribute__((always_inline)) long __attribute__((warn_unused_result)) strnlen_user(const char *src, long n)
17848{
17849 if (!_access_ok((unsigned long)(src), (1)))
17850 return 0;
17851 return strnlen(src, n) + 1;
17852}
17853
17854static inline __attribute__((always_inline)) long __attribute__((warn_unused_result)) strlen_user(const char *src)
17855{
17856 if (!_access_ok((unsigned long)(src), (1)))
17857 return 0;
17858 return strlen(src) + 1;
17859}
17860
17861
17862
17863
17864
17865static inline __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result))
17866__clear_user(void *to, unsigned long n)
17867{
17868 if (!_access_ok((unsigned long)(to), (n)))
17869 return n;
17870 memset(to, 0, n);
17871 return 0;
17872}
17873# 276 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/uaccess.h"
17874enum {
17875 BFIN_MEM_ACCESS_CORE = 0,
17876 BFIN_MEM_ACCESS_CORE_ONLY,
17877 BFIN_MEM_ACCESS_DMA,
17878 BFIN_MEM_ACCESS_IDMA,
17879 BFIN_MEM_ACCESS_ITEST,
17880};
17881
17882
17883
17884
17885
17886
17887int bfin_mem_access_type(unsigned long addr, unsigned long size);
17888# 6 "include/linux/uaccess.h" 2
17889# 16 "include/linux/uaccess.h"
17890static inline __attribute__((always_inline)) void pagefault_disable(void)
17891{
17892 do { (current_thread_info()->preempt_count) += (1); } while (0);
17893
17894
17895
17896
17897 __asm__ __volatile__("": : :"memory");
17898}
17899
17900static inline __attribute__((always_inline)) void pagefault_enable(void)
17901{
17902
17903
17904
17905
17906 __asm__ __volatile__("": : :"memory");
17907 do { (current_thread_info()->preempt_count) -= (1); } while (0);
17908
17909
17910
17911 __asm__ __volatile__("": : :"memory");
17912 do { } while (0);
17913}
17914
17915
17916
17917static inline __attribute__((always_inline)) unsigned long __copy_from_user_inatomic_nocache(void *to,
17918 const void *from, unsigned long n)
17919{
17920 return copy_from_user(to, from, n);
17921}
17922
17923static inline __attribute__((always_inline)) unsigned long __copy_from_user_nocache(void *to,
17924 const void *from, unsigned long n)
17925{
17926 return copy_from_user(to, from, n);
17927}
17928# 96 "include/linux/uaccess.h"
17929extern long probe_kernel_read(void *dst, void *src, size_t size);
17930# 107 "include/linux/uaccess.h"
17931extern long probe_kernel_write(void *dst, void *src, size_t size);
17932# 7 "include/linux/highmem.h" 2
17933
17934# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cacheflush.h" 1
17935# 15 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cacheflush.h"
17936extern void blackfin_icache_flush_range(unsigned long start_address, unsigned long end_address);
17937extern void blackfin_dcache_flush_range(unsigned long start_address, unsigned long end_address);
17938extern void blackfin_dcache_invalidate_range(unsigned long start_address, unsigned long end_address);
17939extern void blackfin_dflush_page(void *page);
17940extern void blackfin_invalidate_entire_dcache(void);
17941extern void blackfin_invalidate_entire_icache(void);
17942# 37 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cacheflush.h"
17943static inline __attribute__((always_inline)) void flush_icache_range(unsigned start, unsigned end)
17944{
17945# 56 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cacheflush.h"
17946 SSYNC();
17947
17948 if (end <= physical_mem_end) {
17949 blackfin_icache_flush_range(start, end);
17950 do { } while (0);
17951 }
17952
17953
17954
17955
17956
17957
17958
17959}
17960# 91 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/cacheflush.h"
17961extern unsigned long reserved_mem_dcache_on;
17962extern unsigned long reserved_mem_icache_on;
17963
17964static inline __attribute__((always_inline)) int bfin_addr_dcacheable(unsigned long addr)
17965{
17966
17967 if (addr < (_ramend - (1024 * 1024)))
17968 return 1;
17969
17970
17971 if (reserved_mem_dcache_on &&
17972 addr >= _ramend && addr < physical_mem_end)
17973 return 1;
17974
17975
17976
17977
17978
17979
17980 return 0;
17981}
17982# 9 "include/linux/highmem.h" 2
17983
17984
17985static inline __attribute__((always_inline)) void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr)
17986{
17987}
17988
17989
17990
17991static inline __attribute__((always_inline)) void flush_kernel_dcache_page(struct page *page)
17992{
17993}
17994
17995
17996# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/kmap_types.h" 1
17997# 1 "include/asm-generic/kmap_types.h" 1
17998# 10 "include/asm-generic/kmap_types.h"
17999enum km_type {
18000 KM_BOUNCE_READ,
18001 KM_SKB_SUNRPC_DATA,
18002 KM_SKB_DATA_SOFTIRQ,
18003 KM_USER0,
18004 KM_USER1,
18005 KM_BIO_SRC_IRQ,
18006 KM_BIO_DST_IRQ,
18007 KM_PTE0,
18008 KM_PTE1,
18009 KM_IRQ0,
18010 KM_IRQ1,
18011 KM_SOFTIRQ0,
18012 KM_SOFTIRQ1,
18013 KM_SYNC_ICACHE,
18014 KM_SYNC_DCACHE,
18015
18016 KM_UML_USERCOPY,
18017 KM_IRQ_PTE,
18018 KM_NMI,
18019 KM_NMI_PTE,
18020 KM_TYPE_NR
18021};
18022# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/kmap_types.h" 2
18023# 23 "include/linux/highmem.h" 2
18024
18025
18026
18027
18028
18029
18030
18031static inline __attribute__((always_inline)) void debug_kmap_atomic(enum km_type type)
18032{
18033}
18034# 47 "include/linux/highmem.h"
18035static inline __attribute__((always_inline)) unsigned int nr_free_highpages(void) { return 0; }
18036
18037
18038
18039
18040static inline __attribute__((always_inline)) void *kmap(struct page *page)
18041{
18042 do { __might_sleep("include/linux/highmem.h", 54, 0); _cond_resched(); } while (0);
18043 return lowmem_page_address(page);
18044}
18045
18046static inline __attribute__((always_inline)) void kunmap(struct page *page)
18047{
18048}
18049
18050static inline __attribute__((always_inline)) void *kmap_atomic(struct page *page, enum km_type idx)
18051{
18052 pagefault_disable();
18053 return lowmem_page_address(page);
18054}
18055# 80 "include/linux/highmem.h"
18056static inline __attribute__((always_inline)) void clear_user_highpage(struct page *page, unsigned long vaddr)
18057{
18058 void *addr = kmap_atomic(page, KM_USER0);
18059 memset((addr), 0, (1UL << 12));
18060 do { pagefault_enable(); } while (0);
18061}
18062# 103 "include/linux/highmem.h"
18063static inline __attribute__((always_inline)) struct page *
18064__alloc_zeroed_user_highpage(gfp_t movableflags,
18065 struct vm_area_struct *vma,
18066 unsigned long vaddr)
18067{
18068 struct page *page = alloc_pages_node((((void)(0),0)), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u) | (( gfp_t)0x02u)) | movableflags, 0);
18069
18070
18071 if (page)
18072 clear_user_highpage(page, vaddr);
18073
18074 return page;
18075}
18076# 126 "include/linux/highmem.h"
18077static inline __attribute__((always_inline)) struct page *
18078alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma,
18079 unsigned long vaddr)
18080{
18081 return __alloc_zeroed_user_highpage((( gfp_t)0x08u), vma, vaddr);
18082}
18083
18084static inline __attribute__((always_inline)) void clear_highpage(struct page *page)
18085{
18086 void *kaddr = kmap_atomic(page, KM_USER0);
18087 memset((kaddr), 0, (1UL << 12));
18088 do { pagefault_enable(); } while (0);
18089}
18090
18091static inline __attribute__((always_inline)) void zero_user_segments(struct page *page,
18092 unsigned start1, unsigned end1,
18093 unsigned start2, unsigned end2)
18094{
18095 void *kaddr = kmap_atomic(page, KM_USER0);
18096
18097 do { if (__builtin_expect(!!(end1 > (1UL << 12) || end2 > (1UL << 12)), 0)) do { asm volatile( "1: .hword %0\n" " .section __bug_table,\"a\",@progbits\n" "2: .long 1b\n" " .long %1\n" " .short %2\n" " .short %3\n" " .org 2b + %4\n" " .previous" : : "i"(0xefcd), "i"("include/linux/highmem.h"), "i"(146), "i"(0), "i"(sizeof(struct bug_entry))); for (;;); } while (0); } while(0);
18098
18099 if (end1 > start1)
18100 memset(kaddr + start1, 0, end1 - start1);
18101
18102 if (end2 > start2)
18103 memset(kaddr + start2, 0, end2 - start2);
18104
18105 do { pagefault_enable(); } while (0);
18106 do { } while (0);
18107}
18108
18109static inline __attribute__((always_inline)) void zero_user_segment(struct page *page,
18110 unsigned start, unsigned end)
18111{
18112 zero_user_segments(page, start, end, 0, 0);
18113}
18114
18115static inline __attribute__((always_inline)) void zero_user(struct page *page,
18116 unsigned start, unsigned size)
18117{
18118 zero_user_segments(page, start, start + size, 0, 0);
18119}
18120
18121static inline __attribute__((always_inline)) void memclear_highpage_flush(struct page *page,
18122 unsigned int offset, unsigned int size)
18123{
18124 zero_user(page, offset, size);
18125}
18126
18127
18128
18129static inline __attribute__((always_inline)) void copy_user_highpage(struct page *to, struct page *from,
18130 unsigned long vaddr, struct vm_area_struct *vma)
18131{
18132 char *vfrom, *vto;
18133
18134 vfrom = kmap_atomic(from, KM_USER0);
18135 vto = kmap_atomic(to, KM_USER1);
18136 memcpy((vto), (vfrom), (1UL << 12));
18137 do { pagefault_enable(); } while (0);
18138 do { pagefault_enable(); } while (0);
18139}
18140
18141
18142
18143static inline __attribute__((always_inline)) void copy_highpage(struct page *to, struct page *from)
18144{
18145 char *vfrom, *vto;
18146
18147 vfrom = kmap_atomic(from, KM_USER0);
18148 vto = kmap_atomic(to, KM_USER1);
18149 memcpy((vto), (vfrom), (1UL << 12));
18150 do { pagefault_enable(); } while (0);
18151 do { pagefault_enable(); } while (0);
18152}
18153# 11 "include/linux/pagemap.h" 2
18154
18155
18156
18157
18158# 1 "include/linux/hardirq.h" 1
18159# 9 "include/linux/hardirq.h"
18160# 1 "include/linux/ftrace_irq.h" 1
18161# 9 "include/linux/ftrace_irq.h"
18162static inline __attribute__((always_inline)) void ftrace_nmi_enter(void) { }
18163static inline __attribute__((always_inline)) void ftrace_nmi_exit(void) { }
18164# 10 "include/linux/hardirq.h" 2
18165# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/hardirq.h" 1
18166# 12 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/hardirq.h"
18167extern void ack_bad_irq(unsigned int irq);
18168
18169
18170
18171
18172
18173# 1 "include/asm-generic/hardirq.h" 1
18174
18175
18176
18177
18178
18179# 1 "include/linux/irq.h" 1
18180# 21 "include/linux/irq.h"
18181# 1 "include/linux/irqreturn.h" 1
18182# 10 "include/linux/irqreturn.h"
18183enum irqreturn {
18184 IRQ_NONE,
18185 IRQ_HANDLED,
18186 IRQ_WAKE_THREAD,
18187};
18188
18189typedef enum irqreturn irqreturn_t;
18190# 22 "include/linux/irq.h" 2
18191# 1 "include/linux/irqnr.h" 1
18192# 26 "include/linux/irqnr.h"
18193extern int nr_irqs;
18194extern struct irq_desc *irq_to_desc(unsigned int irq);
18195# 23 "include/linux/irq.h" 2
18196
18197
18198
18199
18200
18201
18202# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irq_regs.h" 1
18203# 1 "include/asm-generic/irq_regs.h" 1
18204# 21 "include/asm-generic/irq_regs.h"
18205extern __attribute__((section(".discard"), unused)) char __pcpu_scope___irq_regs; extern __attribute__((section(".data" ""))) __typeof__(struct pt_regs *) per_cpu____irq_regs;
18206
18207static inline __attribute__((always_inline)) struct pt_regs *get_irq_regs(void)
18208{
18209 return per_cpu____irq_regs;
18210}
18211
18212static inline __attribute__((always_inline)) struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
18213{
18214 struct pt_regs *old_regs, **pp_regs = &per_cpu____irq_regs;
18215
18216 old_regs = *pp_regs;
18217 *pp_regs = new_regs;
18218 return old_regs;
18219}
18220# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/irq_regs.h" 2
18221# 30 "include/linux/irq.h" 2
18222
18223struct irq_desc;
18224typedef void (*irq_flow_handler_t)(unsigned int irq,
18225 struct irq_desc *desc);
18226# 83 "include/linux/irq.h"
18227struct proc_dir_entry;
18228struct msi_desc;
18229# 111 "include/linux/irq.h"
18230struct irq_chip {
18231 const char *name;
18232 unsigned int (*startup)(unsigned int irq);
18233 void (*shutdown)(unsigned int irq);
18234 void (*enable)(unsigned int irq);
18235 void (*disable)(unsigned int irq);
18236
18237 void (*ack)(unsigned int irq);
18238 void (*mask)(unsigned int irq);
18239 void (*mask_ack)(unsigned int irq);
18240 void (*unmask)(unsigned int irq);
18241 void (*eoi)(unsigned int irq);
18242
18243 void (*end)(unsigned int irq);
18244 int (*set_affinity)(unsigned int irq,
18245 const struct cpumask *dest);
18246 int (*retrigger)(unsigned int irq);
18247 int (*set_type)(unsigned int irq, unsigned int flow_type);
18248 int (*set_wake)(unsigned int irq, unsigned int on);
18249
18250 void (*bus_lock)(unsigned int irq);
18251 void (*bus_sync_unlock)(unsigned int irq);
18252# 142 "include/linux/irq.h"
18253 const char *typename;
18254};
18255
18256struct timer_rand_state;
18257struct irq_2_iommu;
18258# 175 "include/linux/irq.h"
18259struct irq_desc {
18260 unsigned int irq;
18261 struct timer_rand_state *timer_rand_state;
18262 unsigned int *kstat_irqs;
18263
18264
18265
18266 irq_flow_handler_t handle_irq;
18267 struct irq_chip *chip;
18268 struct msi_desc *msi_desc;
18269 void *handler_data;
18270 void *chip_data;
18271 struct irqaction *action;
18272 unsigned int status;
18273
18274 unsigned int depth;
18275 unsigned int wake_depth;
18276 unsigned int irq_count;
18277 unsigned long last_unhandled;
18278 unsigned int irqs_unhandled;
18279 spinlock_t lock;
18280
18281
18282
18283
18284
18285
18286
18287 atomic_t threads_active;
18288 wait_queue_head_t wait_for_threads;
18289
18290 struct proc_dir_entry *dir;
18291
18292 const char *name;
18293} ;
18294
18295extern void arch_init_copy_chip_data(struct irq_desc *old_desc,
18296 struct irq_desc *desc, int node);
18297extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc);
18298
18299
18300extern struct irq_desc irq_desc[(48 +1)];
18301
18302
18303
18304
18305
18306static inline __attribute__((always_inline)) struct irq_desc *move_irq_desc(struct irq_desc *desc, int node)
18307{
18308 return desc;
18309}
18310
18311
18312extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node);
18313
18314
18315
18316
18317# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/hw_irq.h" 1
18318# 1 "include/asm-generic/hw_irq.h" 1
18319# 1 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/hw_irq.h" 2
18320# 234 "include/linux/irq.h" 2
18321
18322extern int setup_irq(unsigned int irq, struct irqaction *new);
18323extern void remove_irq(unsigned int irq, struct irqaction *act);
18324# 270 "include/linux/irq.h"
18325extern int no_irq_affinity;
18326
18327static inline __attribute__((always_inline)) int irq_balancing_disabled(unsigned int irq)
18328{
18329 struct irq_desc *desc;
18330
18331 desc = irq_to_desc(irq);
18332 return desc->status & 0x00400000;
18333}
18334
18335
18336extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action);
18337
18338
18339
18340
18341
18342extern void handle_level_irq(unsigned int irq, struct irq_desc *desc);
18343extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc);
18344extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc);
18345extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc);
18346extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc);
18347extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc);
18348extern void handle_nested_irq(unsigned int irq);
18349# 308 "include/linux/irq.h"
18350static inline __attribute__((always_inline)) void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
18351{
18352
18353 desc->handle_irq(irq, desc);
18354
18355
18356
18357
18358
18359
18360}
18361
18362static inline __attribute__((always_inline)) void generic_handle_irq(unsigned int irq)
18363{
18364 generic_handle_irq_desc(irq, irq_to_desc(irq));
18365}
18366
18367
18368extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
18369 irqreturn_t action_ret);
18370
18371
18372void check_irq_resend(struct irq_desc *desc, unsigned int irq);
18373
18374
18375extern int noirqdebug_setup(char *str);
18376
18377
18378extern int can_request_irq(unsigned int irq, unsigned long irqflags);
18379
18380
18381extern struct irq_chip no_irq_chip;
18382extern struct irq_chip dummy_irq_chip;
18383
18384extern void
18385set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
18386 irq_flow_handler_t handle);
18387extern void
18388set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
18389 irq_flow_handler_t handle, const char *name);
18390
18391extern void
18392__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
18393 const char *name);
18394
18395
18396static inline __attribute__((always_inline)) void __set_irq_handler_unlocked(int irq,
18397 irq_flow_handler_t handler)
18398{
18399 struct irq_desc *desc;
18400
18401 desc = irq_to_desc(irq);
18402 desc->handle_irq = handler;
18403}
18404
18405
18406
18407
18408static inline __attribute__((always_inline)) void
18409set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
18410{
18411 __set_irq_handler(irq, handle, 0, ((void *)0));
18412}
18413
18414
18415
18416
18417
18418
18419static inline __attribute__((always_inline)) void
18420set_irq_chained_handler(unsigned int irq,
18421 irq_flow_handler_t handle)
18422{
18423 __set_irq_handler(irq, handle, 1, ((void *)0));
18424}
18425
18426extern void set_irq_nested_thread(unsigned int irq, int nest);
18427
18428extern void set_irq_noprobe(unsigned int irq);
18429extern void set_irq_probe(unsigned int irq);
18430
18431
18432extern unsigned int create_irq_nr(unsigned int irq_want, int node);
18433extern int create_irq(void);
18434extern void destroy_irq(unsigned int irq);
18435
18436
18437static inline __attribute__((always_inline)) int irq_has_action(unsigned int irq)
18438{
18439 struct irq_desc *desc = irq_to_desc(irq);
18440 return desc->action != ((void *)0);
18441}
18442
18443
18444extern void dynamic_irq_init(unsigned int irq);
18445extern void dynamic_irq_cleanup(unsigned int irq);
18446
18447
18448extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
18449extern int set_irq_data(unsigned int irq, void *data);
18450extern int set_irq_chip_data(unsigned int irq, void *data);
18451extern int set_irq_type(unsigned int irq, unsigned int type);
18452extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
18453# 500 "include/linux/irq.h"
18454static inline __attribute__((always_inline)) bool alloc_desc_masks(struct irq_desc *desc, int node,
18455 bool boot)
18456{
18457 return true;
18458}
18459
18460static inline __attribute__((always_inline)) void init_desc_masks(struct irq_desc *desc)
18461{
18462}
18463
18464static inline __attribute__((always_inline)) void init_copy_desc_masks(struct irq_desc *old_desc,
18465 struct irq_desc *new_desc)
18466{
18467}
18468
18469static inline __attribute__((always_inline)) void free_desc_masks(struct irq_desc *old_desc,
18470 struct irq_desc *new_desc)
18471{
18472}
18473# 7 "include/asm-generic/hardirq.h" 2
18474
18475typedef struct {
18476 unsigned int __softirq_pending;
18477} irq_cpustat_t;
18478
18479# 1 "include/linux/irq_cpustat.h" 1
18480# 20 "include/linux/irq_cpustat.h"
18481extern irq_cpustat_t irq_stat[];
18482# 13 "include/asm-generic/hardirq.h" 2
18483# 19 "/usr/local/src/blackfin/git/linux-kernel/arch/blackfin/include/asm/hardirq.h" 2
18484# 11 "include/linux/hardirq.h" 2
18485# 128 "include/linux/hardirq.h"
18486extern void synchronize_irq(unsigned int irq);
18487
18488
18489
18490
18491struct task_struct;
18492
18493
18494static inline __attribute__((always_inline)) void account_system_vtime(struct task_struct *tsk)
18495{
18496}
18497
18498
18499
18500extern void rcu_irq_enter(void);
18501extern void rcu_irq_exit(void);
18502extern void rcu_nmi_enter(void);
18503extern void rcu_nmi_exit(void);
18504# 169 "include/linux/hardirq.h"
18505extern void irq_enter(void);
18506# 184 "include/linux/hardirq.h"
18507extern void irq_exit(void);
18508# 16 "include/linux/pagemap.h" 2
18509
18510
18511
18512
18513
18514enum mapping_flags {
18515 AS_EIO = 22 + 0,
18516 AS_ENOSPC = 22 + 1,
18517 AS_MM_ALL_LOCKS = 22 + 2,
18518 AS_UNEVICTABLE = 22 + 3,
18519};
18520
18521static inline __attribute__((always_inline)) void mapping_set_error(struct address_space *mapping, int error)
18522{
18523 if (__builtin_expect(!!(error), 0)) {
18524 if (error == -28)
18525 set_bit(AS_ENOSPC, &mapping->flags);
18526 else
18527 set_bit(AS_EIO, &mapping->flags);
18528 }
18529}
18530
18531static inline __attribute__((always_inline)) void mapping_set_unevictable(struct address_space *mapping)
18532{
18533 set_bit(AS_UNEVICTABLE, &mapping->flags);
18534}
18535
18536static inline __attribute__((always_inline)) void mapping_clear_unevictable(struct address_space *mapping)
18537{
18538 clear_bit(AS_UNEVICTABLE, &mapping->flags);
18539}
18540
18541static inline __attribute__((always_inline)) int mapping_unevictable(struct address_space *mapping)
18542{
18543 if (__builtin_expect(!!(mapping), 1))
18544 return test_bit(AS_UNEVICTABLE, &mapping->flags);
18545 return !!mapping;
18546}
18547
18548static inline __attribute__((always_inline)) gfp_t mapping_gfp_mask(struct address_space * mapping)
18549{
18550 return ( gfp_t)mapping->flags & (( gfp_t)((1 << 22) - 1));
18551}
18552
18553
18554
18555
18556
18557static inline __attribute__((always_inline)) void mapping_set_gfp_mask(struct address_space *m, gfp_t mask)
18558{
18559 m->flags = (m->flags & ~( unsigned long)(( gfp_t)((1 << 22) - 1))) |
18560 ( unsigned long)mask;
18561}
18562# 85 "include/linux/pagemap.h"
18563void release_pages(struct page **pages, int nr, int cold);
18564# 131 "include/linux/pagemap.h"
18565static inline __attribute__((always_inline)) int page_cache_get_speculative(struct page *page)
18566{
18567 do { } while (0);
18568# 148 "include/linux/pagemap.h"
18569 do { } while (0);
18570 atomic_inc(&page->_count);
18571# 161 "include/linux/pagemap.h"
18572 do { } while (0);
18573
18574 return 1;
18575}
18576
18577
18578
18579
18580static inline __attribute__((always_inline)) int page_cache_add_speculative(struct page *page, int count)
18581{
18582 do { } while (0);
18583
18584
18585
18586
18587
18588 do { } while (0);
18589 atomic_add(count, &page->_count);
18590
18591
18592
18593
18594
18595 do { } while (0);
18596
18597 return 1;
18598}
18599
18600static inline __attribute__((always_inline)) int page_freeze_refs(struct page *page, int count)
18601{
18602 return __builtin_expect(!!((((__typeof__(*((&((&page->_count)->counter)))))__cmpxchg_local_generic(((&((&page->_count)->counter))), (unsigned long)(((count))), (unsigned long)(((0))), sizeof(*((&((&page->_count)->counter))))))) == count), 1);
18603}
18604
18605static inline __attribute__((always_inline)) void page_unfreeze_refs(struct page *page, int count)
18606{
18607 do { } while (0);
18608 do { } while (0);
18609
18610 (((&page->_count)->counter) = (count));
18611}
18612
18613
18614
18615
18616static inline __attribute__((always_inline)) struct page *__page_cache_alloc(gfp_t gfp)
18617{
18618 return alloc_pages_node((((void)(0),0)), gfp, 0);
18619}
18620
18621
18622static inline __attribute__((always_inline)) struct page *page_cache_alloc(struct address_space *x)
18623{
18624 return __page_cache_alloc(mapping_gfp_mask(x));
18625}
18626
18627static inline __attribute__((always_inline)) struct page *page_cache_alloc_cold(struct address_space *x)
18628{
18629 return __page_cache_alloc(mapping_gfp_mask(x)|(( gfp_t)0x100u));
18630}
18631
18632typedef int filler_t(void *, struct page *);
18633
18634extern struct page * find_get_page(struct address_space *mapping,
18635 unsigned long index);
18636extern struct page * find_lock_page(struct address_space *mapping,
18637 unsigned long index);
18638extern struct page * find_or_create_page(struct address_space *mapping,
18639 unsigned long index, gfp_t gfp_mask);
18640unsigned find_get_pages(struct address_space *mapping, unsigned long start,
18641 unsigned int nr_pages, struct page **pages);
18642unsigned find_get_pages_contig(struct address_space *mapping, unsigned long start,
18643 unsigned int nr_pages, struct page **pages);
18644unsigned find_get_pages_tag(struct address_space *mapping, unsigned long *index,
18645 int tag, unsigned int nr_pages, struct page **pages);
18646
18647struct page *grab_cache_page_write_begin(struct address_space *mapping,
18648 unsigned long index, unsigned flags);
18649
18650
18651
18652
18653static inline __attribute__((always_inline)) struct page *grab_cache_page(struct address_space *mapping,
18654 unsigned long index)
18655{
18656 return find_or_create_page(mapping, index, mapping_gfp_mask(mapping));
18657}
18658
18659extern struct page * grab_cache_page_nowait(struct address_space *mapping,
18660 unsigned long index);
18661extern struct page * read_cache_page_async(struct address_space *mapping,
18662 unsigned long index, filler_t *filler,
18663 void *data);
18664extern struct page * read_cache_page(struct address_space *mapping,
18665 unsigned long index, filler_t *filler,
18666 void *data);
18667extern int read_cache_pages(struct address_space *mapping,
18668 struct list_head *pages, filler_t *filler, void *data);
18669
18670static inline __attribute__((always_inline)) struct page *read_mapping_page_async(
18671 struct address_space *mapping,
18672 unsigned long index, void *data)
18673{
18674 filler_t *filler = (filler_t *)mapping->a_ops->readpage;
18675 return read_cache_page_async(mapping, index, filler, data);
18676}
18677
18678static inline __attribute__((always_inline)) struct page *read_mapping_page(struct address_space *mapping,
18679 unsigned long index, void *data)
18680{
18681 filler_t *filler = (filler_t *)mapping->a_ops->readpage;
18682 return read_cache_page(mapping, index, filler, data);
18683}
18684
18685
18686
18687
18688static inline __attribute__((always_inline)) loff_t page_offset(struct page *page)
18689{
18690 return ((loff_t)page->index) << 12;
18691}
18692
18693static inline __attribute__((always_inline)) unsigned long linear_page_index(struct vm_area_struct *vma,
18694 unsigned long address)
18695{
18696 unsigned long pgoff = (address - vma->vm_start) >> 12;
18697 pgoff += vma->vm_pgoff;
18698 return pgoff >> (12 - 12);
18699}
18700
18701extern void __lock_page(struct page *page);
18702extern int __lock_page_killable(struct page *page);
18703extern void __lock_page_nosync(struct page *page);
18704extern void unlock_page(struct page *page);
18705
18706static inline __attribute__((always_inline)) void __set_page_locked(struct page *page)
18707{
18708 __set_bit(PG_locked, &page->flags);
18709}
18710
18711static inline __attribute__((always_inline)) void __clear_page_locked(struct page *page)
18712{
18713 __clear_bit(PG_locked, &page->flags);
18714}
18715
18716static inline __attribute__((always_inline)) int trylock_page(struct page *page)
18717{
18718 return (__builtin_expect(!!(!test_and_set_bit(PG_locked, &page->flags)), 1));
18719}
18720
18721
18722
18723
18724static inline __attribute__((always_inline)) void lock_page(struct page *page)
18725{
18726 do { __might_sleep("include/linux/pagemap.h", 315, 0); _cond_resched(); } while (0);
18727 if (!trylock_page(page))
18728 __lock_page(page);
18729}
18730
18731
18732
18733
18734
18735
18736static inline __attribute__((always_inline)) int lock_page_killable(struct page *page)
18737{
18738 do { __might_sleep("include/linux/pagemap.h", 327, 0); _cond_resched(); } while (0);
18739 if (!trylock_page(page))
18740 return __lock_page_killable(page);
18741 return 0;
18742}
18743
18744
18745
18746
18747
18748static inline __attribute__((always_inline)) void lock_page_nosync(struct page *page)
18749{
18750 do { __might_sleep("include/linux/pagemap.h", 339, 0); _cond_resched(); } while (0);
18751 if (!trylock_page(page))
18752 __lock_page_nosync(page);
18753}
18754
18755
18756
18757
18758
18759extern void wait_on_page_bit(struct page *page, int bit_nr);
18760# 357 "include/linux/pagemap.h"
18761static inline __attribute__((always_inline)) void wait_on_page_locked(struct page *page)
18762{
18763 if (PageLocked(page))
18764 wait_on_page_bit(page, PG_locked);
18765}
18766
18767
18768
18769
18770static inline __attribute__((always_inline)) void wait_on_page_writeback(struct page *page)
18771{
18772 if (PageWriteback(page))
18773 wait_on_page_bit(page, PG_writeback);
18774}
18775
18776extern void end_page_writeback(struct page *page);
18777
18778
18779
18780
18781extern void add_page_wait_queue(struct page *page, wait_queue_t *waiter);
18782
18783
18784
18785
18786
18787
18788
18789static inline __attribute__((always_inline)) int fault_in_pages_writeable(char *uaddr, int size)
18790{
18791 int ret;
18792
18793 if (__builtin_expect(!!(size == 0), 0))
18794 return 0;
18795
18796
18797
18798
18799
18800 ret = ({ int _err = 0; typeof(*(uaddr)) _x = (0); typeof(*(uaddr)) *_p = (uaddr); if (!_access_ok((unsigned long)(_p), (sizeof(*(_p))))) { _err = -14; } else { switch (sizeof (*(_p))) { case 1: __asm__ ("B""[%1] = %0;\n\t" : :"d" (_x),"a" (((unsigned long *)(_p))) : "memory"); break; case 2: __asm__ ("W""[%1] = %0;\n\t" : :"d" (_x),"a" (((unsigned long *)(_p))) : "memory"); break; case 4: __asm__ ("""[%1] = %0;\n\t" : :"d" (_x),"a" (((unsigned long *)(_p))) : "memory"); break; case 8: { long _xl, _xh; _xl = ((long *)&_x)[0]; _xh = ((long *)&_x)[1]; __asm__ ("""[%1] = %0;\n\t" : :"d" (_xl),"a" (((unsigned long *)(((long *)_p)+0))) : "memory"); __asm__ ("""[%1] = %0;\n\t" : :"d" (_xh),"a" (((unsigned long *)(((long *)_p)+1))) : "memory"); } break; default: _err = (printk("<6>" "put_user_bad %s:%d %s\n", "include/linux/pagemap.h", 396, __func__), bad_user_access_length(), (-14)); break; } } _err; });
18801 if (ret == 0) {
18802 char *end = uaddr + size - 1;
18803
18804
18805
18806
18807
18808 if (((unsigned long)uaddr & (~((1UL << 12)-1))) !=
18809 ((unsigned long)end & (~((1UL << 12)-1))))
18810 ret = ({ int _err = 0; typeof(*(end)) _x = (0); typeof(*(end)) *_p = (end); if (!_access_ok((unsigned long)(_p), (sizeof(*(_p))))) { _err = -14; } else { switch (sizeof (*(_p))) { case 1: __asm__ ("B""[%1] = %0;\n\t" : :"d" (_x),"a" (((unsigned long *)(_p))) : "memory"); break; case 2: __asm__ ("W""[%1] = %0;\n\t" : :"d" (_x),"a" (((unsigned long *)(_p))) : "memory"); break; case 4: __asm__ ("""[%1] = %0;\n\t" : :"d" (_x),"a" (((unsigned long *)(_p))) : "memory"); break; case 8: { long _xl, _xh; _xl = ((long *)&_x)[0]; _xh = ((long *)&_x)[1]; __asm__ ("""[%1] = %0;\n\t" : :"d" (_xl),"a" (((unsigned long *)(((long *)_p)+0))) : "memory"); __asm__ ("""[%1] = %0;\n\t" : :"d" (_xh),"a" (((unsigned long *)(((long *)_p)+1))) : "memory"); } break; default: _err = (printk("<6>" "put_user_bad %s:%d %s\n", "include/linux/pagemap.h", 406, __func__), bad_user_access_length(), (-14)); break; } } _err; });
18811 }
18812 return ret;
18813}
18814
18815static inline __attribute__((always_inline)) int fault_in_pages_readable(const char *uaddr, int size)
18816{
18817 volatile char c;
18818 int ret;
18819
18820 if (__builtin_expect(!!(size == 0), 0))
18821 return 0;
18822
18823 ret = ({ int _err = 0; unsigned long _val = 0; const typeof(*(uaddr)) *_p = (uaddr); const size_t ptr_size = sizeof(*(_p)); if (__builtin_expect(!!(_access_ok((unsigned long)(_p), (ptr_size))), 1)) { ((void)(sizeof(struct { int:-!!(ptr_size >= 8); }))); switch (ptr_size) { case 1: ({ __asm__ __volatile__ ( "%0 =" "B" "[%1]" "(Z)" ";" : "=d" (_val) : "a" (((unsigned long *)(_p)))); }); break; case 2: ({ __asm__ __volatile__ ( "%0 =" "W" "[%1]" "(Z)" ";" : "=d" (_val) : "a" (((unsigned long *)(_p)))); }); break; case 4: ({ __asm__ __volatile__ ( "%0 =" "" "[%1]" "" ";" : "=d" (_val) : "a" (((unsigned long *)(_p)))); }); break; } } else _err = -14; c = (typeof(*(uaddr)))_val; _err; });
18824 if (ret == 0) {
18825 const char *end = uaddr + size - 1;
18826
18827 if (((unsigned long)uaddr & (~((1UL << 12)-1))) !=
18828 ((unsigned long)end & (~((1UL << 12)-1))))
18829 ret = ({ int _err = 0; unsigned long _val = 0; const typeof(*(end)) *_p = (end); const size_t ptr_size = sizeof(*(_p)); if (__builtin_expect(!!(_access_ok((unsigned long)(_p), (ptr_size))), 1)) { ((void)(sizeof(struct { int:-!!(ptr_size >= 8); }))); switch (ptr_size) { case 1: ({ __asm__ __volatile__ ( "%0 =" "B" "[%1]" "(Z)" ";" : "=d" (_val) : "a" (((unsigned long *)(_p)))); }); break; case 2: ({ __asm__ __volatile__ ( "%0 =" "W" "[%1]" "(Z)" ";" : "=d" (_val) : "a" (((unsigned long *)(_p)))); }); break; case 4: ({ __asm__ __volatile__ ( "%0 =" "" "[%1]" "" ";" : "=d" (_val) : "a" (((unsigned long *)(_p)))); }); break; } } else _err = -14; c = (typeof(*(end)))_val; _err; });
18830 }
18831 return ret;
18832}
18833
18834int add_to_page_cache_locked(struct page *page, struct address_space *mapping,
18835 unsigned long index, gfp_t gfp_mask);
18836int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
18837 unsigned long index, gfp_t gfp_mask);
18838extern void remove_from_page_cache(struct page *page);
18839extern void __remove_from_page_cache(struct page *page);
18840
18841
18842
18843
18844
18845static inline __attribute__((always_inline)) int add_to_page_cache(struct page *page,
18846 struct address_space *mapping, unsigned long offset, gfp_t gfp_mask)
18847{
18848 int error;
18849
18850 __set_page_locked(page);
18851 error = add_to_page_cache_locked(page, mapping, offset, gfp_mask);
18852 if (__builtin_expect(!!(error), 0))
18853 __clear_page_locked(page);
18854 return error;
18855}
18856# 14 "include/linux/buffer_head.h" 2
18857
18858
18859
18860
18861
18862enum bh_state_bits {
18863 BH_Uptodate,
18864 BH_Dirty,
18865 BH_Lock,
18866 BH_Req,
18867 BH_Uptodate_Lock,
18868
18869
18870
18871 BH_Mapped,
18872 BH_New,
18873 BH_Async_Read,
18874 BH_Async_Write,
18875 BH_Delay,
18876 BH_Boundary,
18877 BH_Write_EIO,
18878 BH_Ordered,
18879 BH_Eopnotsupp,
18880 BH_Unwritten,
18881 BH_Quiet,
18882
18883 BH_PrivateStart,
18884
18885
18886};
18887
18888
18889
18890struct page;
18891struct buffer_head;
18892struct address_space;
18893typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
18894# 61 "include/linux/buffer_head.h"
18895struct buffer_head {
18896 unsigned long b_state;
18897 struct buffer_head *b_this_page;
18898 struct page *b_page;
18899
18900 sector_t b_blocknr;
18901 size_t b_size;
18902 char *b_data;
18903
18904 struct block_device *b_bdev;
18905 bh_end_io_t *b_end_io;
18906 void *b_private;
18907 struct list_head b_assoc_buffers;
18908 struct address_space *b_assoc_map;
18909
18910 atomic_t b_count;
18911};
18912# 115 "include/linux/buffer_head.h"
18913static inline __attribute__((always_inline)) void set_buffer_uptodate(struct buffer_head *bh) { set_bit(BH_Uptodate, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_uptodate(struct buffer_head *bh) { clear_bit(BH_Uptodate, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_uptodate(const struct buffer_head *bh) { return test_bit(BH_Uptodate, &(bh)->b_state); }
18914static inline __attribute__((always_inline)) void set_buffer_dirty(struct buffer_head *bh) { set_bit(BH_Dirty, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_dirty(struct buffer_head *bh) { clear_bit(BH_Dirty, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_dirty(const struct buffer_head *bh) { return test_bit(BH_Dirty, &(bh)->b_state); }
18915static inline __attribute__((always_inline)) int test_set_buffer_dirty(struct buffer_head *bh) { return test_and_set_bit(BH_Dirty, &(bh)->b_state); } static inline __attribute__((always_inline)) int test_clear_buffer_dirty(struct buffer_head *bh) { return test_and_clear_bit(BH_Dirty, &(bh)->b_state); }
18916static inline __attribute__((always_inline)) void set_buffer_locked(struct buffer_head *bh) { set_bit(BH_Lock, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_locked(struct buffer_head *bh) { clear_bit(BH_Lock, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_locked(const struct buffer_head *bh) { return test_bit(BH_Lock, &(bh)->b_state); }
18917static inline __attribute__((always_inline)) void set_buffer_req(struct buffer_head *bh) { set_bit(BH_Req, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_req(struct buffer_head *bh) { clear_bit(BH_Req, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_req(const struct buffer_head *bh) { return test_bit(BH_Req, &(bh)->b_state); }
18918static inline __attribute__((always_inline)) int test_set_buffer_req(struct buffer_head *bh) { return test_and_set_bit(BH_Req, &(bh)->b_state); } static inline __attribute__((always_inline)) int test_clear_buffer_req(struct buffer_head *bh) { return test_and_clear_bit(BH_Req, &(bh)->b_state); }
18919static inline __attribute__((always_inline)) void set_buffer_mapped(struct buffer_head *bh) { set_bit(BH_Mapped, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_mapped(struct buffer_head *bh) { clear_bit(BH_Mapped, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_mapped(const struct buffer_head *bh) { return test_bit(BH_Mapped, &(bh)->b_state); }
18920static inline __attribute__((always_inline)) void set_buffer_new(struct buffer_head *bh) { set_bit(BH_New, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_new(struct buffer_head *bh) { clear_bit(BH_New, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_new(const struct buffer_head *bh) { return test_bit(BH_New, &(bh)->b_state); }
18921static inline __attribute__((always_inline)) void set_buffer_async_read(struct buffer_head *bh) { set_bit(BH_Async_Read, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_async_read(struct buffer_head *bh) { clear_bit(BH_Async_Read, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_async_read(const struct buffer_head *bh) { return test_bit(BH_Async_Read, &(bh)->b_state); }
18922static inline __attribute__((always_inline)) void set_buffer_async_write(struct buffer_head *bh) { set_bit(BH_Async_Write, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_async_write(struct buffer_head *bh) { clear_bit(BH_Async_Write, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_async_write(const struct buffer_head *bh) { return test_bit(BH_Async_Write, &(bh)->b_state); }
18923static inline __attribute__((always_inline)) void set_buffer_delay(struct buffer_head *bh) { set_bit(BH_Delay, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_delay(struct buffer_head *bh) { clear_bit(BH_Delay, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_delay(const struct buffer_head *bh) { return test_bit(BH_Delay, &(bh)->b_state); }
18924static inline __attribute__((always_inline)) void set_buffer_boundary(struct buffer_head *bh) { set_bit(BH_Boundary, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_boundary(struct buffer_head *bh) { clear_bit(BH_Boundary, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_boundary(const struct buffer_head *bh) { return test_bit(BH_Boundary, &(bh)->b_state); }
18925static inline __attribute__((always_inline)) void set_buffer_write_io_error(struct buffer_head *bh) { set_bit(BH_Write_EIO, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_write_io_error(struct buffer_head *bh) { clear_bit(BH_Write_EIO, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_write_io_error(const struct buffer_head *bh) { return test_bit(BH_Write_EIO, &(bh)->b_state); }
18926static inline __attribute__((always_inline)) void set_buffer_ordered(struct buffer_head *bh) { set_bit(BH_Ordered, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_ordered(struct buffer_head *bh) { clear_bit(BH_Ordered, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_ordered(const struct buffer_head *bh) { return test_bit(BH_Ordered, &(bh)->b_state); }
18927static inline __attribute__((always_inline)) void set_buffer_eopnotsupp(struct buffer_head *bh) { set_bit(BH_Eopnotsupp, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_eopnotsupp(struct buffer_head *bh) { clear_bit(BH_Eopnotsupp, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_eopnotsupp(const struct buffer_head *bh) { return test_bit(BH_Eopnotsupp, &(bh)->b_state); }
18928static inline __attribute__((always_inline)) void set_buffer_unwritten(struct buffer_head *bh) { set_bit(BH_Unwritten, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_unwritten(struct buffer_head *bh) { clear_bit(BH_Unwritten, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_unwritten(const struct buffer_head *bh) { return test_bit(BH_Unwritten, &(bh)->b_state); }
18929# 147 "include/linux/buffer_head.h"
18930void mark_buffer_dirty(struct buffer_head *bh);
18931void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
18932void set_bh_page(struct buffer_head *bh,
18933 struct page *page, unsigned long offset);
18934int try_to_free_buffers(struct page *);
18935struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size,
18936 int retry);
18937void create_empty_buffers(struct page *, unsigned long,
18938 unsigned long b_state);
18939void end_buffer_read_sync(struct buffer_head *bh, int uptodate);
18940void end_buffer_write_sync(struct buffer_head *bh, int uptodate);
18941void end_buffer_async_write(struct buffer_head *bh, int uptodate);
18942
18943
18944void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode);
18945int inode_has_buffers(struct inode *);
18946void invalidate_inode_buffers(struct inode *);
18947int remove_inode_buffers(struct inode *inode);
18948int sync_mapping_buffers(struct address_space *mapping);
18949void unmap_underlying_metadata(struct block_device *bdev, sector_t block);
18950
18951void mark_buffer_async_write(struct buffer_head *bh);
18952void __wait_on_buffer(struct buffer_head *);
18953wait_queue_head_t *bh_waitq_head(struct buffer_head *bh);
18954struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
18955 unsigned size);
18956struct buffer_head *__getblk(struct block_device *bdev, sector_t block,
18957 unsigned size);
18958void __brelse(struct buffer_head *);
18959void __bforget(struct buffer_head *);
18960void __breadahead(struct block_device *, sector_t block, unsigned int size);
18961struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size);
18962void invalidate_bh_lrus(void);
18963struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
18964void free_buffer_head(struct buffer_head * bh);
18965void unlock_buffer(struct buffer_head *bh);
18966void __lock_buffer(struct buffer_head *bh);
18967void ll_rw_block(int, int, struct buffer_head * bh[]);
18968int sync_dirty_buffer(struct buffer_head *bh);
18969int submit_bh(int, struct buffer_head *);
18970void write_boundary_block(struct block_device *bdev,
18971 sector_t bblock, unsigned blocksize);
18972int bh_uptodate_or_lock(struct buffer_head *bh);
18973int bh_submit_read(struct buffer_head *bh);
18974
18975extern int buffer_heads_over_limit;
18976
18977
18978
18979
18980
18981void block_invalidatepage(struct page *page, unsigned long offset);
18982int block_write_full_page(struct page *page, get_block_t *get_block,
18983 struct writeback_control *wbc);
18984int block_write_full_page_endio(struct page *page, get_block_t *get_block,
18985 struct writeback_control *wbc, bh_end_io_t *handler);
18986int block_read_full_page(struct page*, get_block_t*);
18987int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc,
18988 unsigned long from);
18989int block_write_begin(struct file *, struct address_space *,
18990 loff_t, unsigned, unsigned,
18991 struct page **, void **, get_block_t*);
18992int block_write_end(struct file *, struct address_space *,
18993 loff_t, unsigned, unsigned,
18994 struct page *, void *);
18995int generic_write_end(struct file *, struct address_space *,
18996 loff_t, unsigned, unsigned,
18997 struct page *, void *);
18998void page_zero_new_buffers(struct page *page, unsigned from, unsigned to);
18999int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*);
19000int cont_write_begin(struct file *, struct address_space *, loff_t,
19001 unsigned, unsigned, struct page **, void **,
19002 get_block_t *, loff_t *);
19003int generic_cont_expand_simple(struct inode *inode, loff_t size);
19004int block_commit_write(struct page *page, unsigned from, unsigned to);
19005int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
19006 get_block_t get_block);
19007void block_sync_page(struct page *);
19008sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
19009int block_truncate_page(struct address_space *, loff_t, get_block_t *);
19010int file_fsync(struct file *, struct dentry *, int);
19011int nobh_write_begin(struct file *, struct address_space *,
19012 loff_t, unsigned, unsigned,
19013 struct page **, void **, get_block_t*);
19014int nobh_write_end(struct file *, struct address_space *,
19015 loff_t, unsigned, unsigned,
19016 struct page *, void *);
19017int nobh_truncate_page(struct address_space *, loff_t, get_block_t *);
19018int nobh_writepage(struct page *page, get_block_t *get_block,
19019 struct writeback_control *wbc);
19020
19021void buffer_init(void);
19022
19023
19024
19025
19026
19027static inline __attribute__((always_inline)) void attach_page_buffers(struct page *page,
19028 struct buffer_head *head)
19029{
19030 get_page(page);
19031 SetPagePrivate(page);
19032 ((page)->private = ((unsigned long)head));
19033}
19034
19035static inline __attribute__((always_inline)) void get_bh(struct buffer_head *bh)
19036{
19037 atomic_inc(&bh->b_count);
19038}
19039
19040static inline __attribute__((always_inline)) void put_bh(struct buffer_head *bh)
19041{
19042 __asm__ __volatile__("": : :"memory");
19043 atomic_dec(&bh->b_count);
19044}
19045
19046static inline __attribute__((always_inline)) void brelse(struct buffer_head *bh)
19047{
19048 if (bh)
19049 __brelse(bh);
19050}
19051
19052static inline __attribute__((always_inline)) void bforget(struct buffer_head *bh)
19053{
19054 if (bh)
19055 __bforget(bh);
19056}
19057
19058static inline __attribute__((always_inline)) struct buffer_head *
19059sb_bread(struct super_block *sb, sector_t block)
19060{
19061 return __bread(sb->s_bdev, block, sb->s_blocksize);
19062}
19063
19064static inline __attribute__((always_inline)) void
19065sb_breadahead(struct super_block *sb, sector_t block)
19066{
19067 __breadahead(sb->s_bdev, block, sb->s_blocksize);
19068}
19069
19070static inline __attribute__((always_inline)) struct buffer_head *
19071sb_getblk(struct super_block *sb, sector_t block)
19072{
19073 return __getblk(sb->s_bdev, block, sb->s_blocksize);
19074}
19075
19076static inline __attribute__((always_inline)) struct buffer_head *
19077sb_find_get_block(struct super_block *sb, sector_t block)
19078{
19079 return __find_get_block(sb->s_bdev, block, sb->s_blocksize);
19080}
19081
19082static inline __attribute__((always_inline)) void
19083map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block)
19084{
19085 set_buffer_mapped(bh);
19086 bh->b_bdev = sb->s_bdev;
19087 bh->b_blocknr = block;
19088 bh->b_size = sb->s_blocksize;
19089}
19090
19091
19092
19093
19094
19095
19096static inline __attribute__((always_inline)) void wait_on_buffer(struct buffer_head *bh)
19097{
19098 do { __might_sleep("include/linux/buffer_head.h", 315, 0); _cond_resched(); } while (0);
19099 if (buffer_locked(bh) || ((&bh->b_count)->counter) == 0)
19100 __wait_on_buffer(bh);
19101}
19102
19103static inline __attribute__((always_inline)) int trylock_buffer(struct buffer_head *bh)
19104{
19105 return __builtin_expect(!!(!test_and_set_bit(BH_Lock, &bh->b_state)), 1);
19106}
19107
19108static inline __attribute__((always_inline)) void lock_buffer(struct buffer_head *bh)
19109{
19110 do { __might_sleep("include/linux/buffer_head.h", 327, 0); _cond_resched(); } while (0);
19111 if (!trylock_buffer(bh))
19112 __lock_buffer(bh);
19113}
19114
19115extern int __set_page_dirty_buffers(struct page *page);
19116# 27 "fs/sysv/super.c" 2
19117# 1 "fs/sysv/sysv.h" 1
19118
19119
19120
19121
19122
19123typedef __u16 __fs16;
19124typedef __u32 __fs32;
19125
19126# 1 "include/linux/sysv_fs.h" 1
19127# 13 "include/linux/sysv_fs.h"
19128typedef __fs16 sysv_ino_t;
19129
19130
19131
19132
19133typedef __fs32 sysv_zone_t;
19134# 28 "include/linux/sysv_fs.h"
19135struct xenix_super_block {
19136 __fs16 s_isize;
19137 __fs32 s_fsize __attribute__((packed, aligned(2)));
19138
19139 __fs16 s_nfree;
19140 sysv_zone_t s_free[100];
19141
19142 __fs16 s_ninode;
19143 sysv_ino_t s_inode[100];
19144
19145 char s_flock;
19146 char s_ilock;
19147 char s_fmod;
19148 char s_ronly;
19149 __fs32 s_time __attribute__((packed, aligned(2)));
19150 __fs32 s_tfree __attribute__((packed, aligned(2)));
19151 __fs16 s_tinode;
19152 __fs16 s_dinfo[4];
19153 char s_fname[6];
19154 char s_fpack[6];
19155 char s_clean;
19156 char s_fill[371];
19157 s32 s_magic;
19158 __fs32 s_type;
19159
19160
19161
19162};
19163# 66 "include/linux/sysv_fs.h"
19164struct sysv4_super_block {
19165 __fs16 s_isize;
19166 u16 s_pad0;
19167 __fs32 s_fsize;
19168
19169 __fs16 s_nfree;
19170 u16 s_pad1;
19171 sysv_zone_t s_free[50];
19172
19173 __fs16 s_ninode;
19174 u16 s_pad2;
19175 sysv_ino_t s_inode[100];
19176
19177 char s_flock;
19178 char s_ilock;
19179 char s_fmod;
19180 char s_ronly;
19181 __fs32 s_time;
19182 __fs16 s_dinfo[4];
19183 __fs32 s_tfree;
19184 __fs16 s_tinode;
19185 u16 s_pad3;
19186 char s_fname[6];
19187 char s_fpack[6];
19188 s32 s_fill[12];
19189 __fs32 s_state;
19190 s32 s_magic;
19191 __fs32 s_type;
19192
19193};
19194
19195
19196struct sysv2_super_block {
19197 __fs16 s_isize;
19198 __fs32 s_fsize __attribute__((packed, aligned(2)));
19199
19200 __fs16 s_nfree;
19201 sysv_zone_t s_free[50];
19202
19203 __fs16 s_ninode;
19204 sysv_ino_t s_inode[100];
19205
19206 char s_flock;
19207 char s_ilock;
19208 char s_fmod;
19209 char s_ronly;
19210 __fs32 s_time __attribute__((packed, aligned(2)));
19211 __fs16 s_dinfo[4];
19212 __fs32 s_tfree __attribute__((packed, aligned(2)));
19213 __fs16 s_tinode;
19214 char s_fname[6];
19215 char s_fpack[6];
19216 s32 s_fill[14];
19217 __fs32 s_state;
19218 s32 s_magic;
19219 __fs32 s_type;
19220
19221};
19222
19223
19224
19225
19226struct v7_super_block {
19227 __fs16 s_isize;
19228 __fs32 s_fsize __attribute__((packed, aligned(2)));
19229
19230 __fs16 s_nfree;
19231 sysv_zone_t s_free[50];
19232
19233 __fs16 s_ninode;
19234 sysv_ino_t s_inode[100];
19235
19236 char s_flock;
19237 char s_ilock;
19238 char s_fmod;
19239 char s_ronly;
19240 __fs32 s_time __attribute__((packed, aligned(2)));
19241
19242 __fs32 s_tfree __attribute__((packed, aligned(2)));
19243 __fs16 s_tinode;
19244 __fs16 s_m;
19245 __fs16 s_n;
19246 char s_fname[6];
19247 char s_fpack[6];
19248};
19249
19250
19251
19252
19253struct coh_super_block {
19254 __fs16 s_isize;
19255 __fs32 s_fsize __attribute__((packed, aligned(2)));
19256
19257 __fs16 s_nfree;
19258 sysv_zone_t s_free[64] __attribute__((packed, aligned(2)));
19259
19260 __fs16 s_ninode;
19261 sysv_ino_t s_inode[100];
19262
19263 char s_flock;
19264 char s_ilock;
19265 char s_fmod;
19266 char s_ronly;
19267 __fs32 s_time __attribute__((packed, aligned(2)));
19268 __fs32 s_tfree __attribute__((packed, aligned(2)));
19269 __fs16 s_tinode;
19270 __fs16 s_interleave_m;
19271 __fs16 s_interleave_n;
19272 char s_fname[6];
19273 char s_fpack[6];
19274 __fs32 s_unique;
19275};
19276
19277
19278struct sysv_inode {
19279 __fs16 i_mode;
19280 __fs16 i_nlink;
19281 __fs16 i_uid;
19282 __fs16 i_gid;
19283 __fs32 i_size;
19284 u8 i_data[3*(10+1+1+1)];
19285 u8 i_gen;
19286 __fs32 i_atime;
19287 __fs32 i_mtime;
19288 __fs32 i_ctime;
19289};
19290
19291
19292
19293struct sysv_dir_entry {
19294 sysv_ino_t inode;
19295 char name[14];
19296};
19297# 10 "fs/sysv/sysv.h" 2
19298# 21 "fs/sysv/sysv.h"
19299struct sysv_sb_info {
19300 struct super_block *s_sb;
19301 int s_type;
19302 char s_bytesex;
19303 char s_truncate;
19304
19305 nlink_t s_link_max;
19306 unsigned int s_inodes_per_block;
19307 unsigned int s_inodes_per_block_1;
19308 unsigned int s_inodes_per_block_bits;
19309 unsigned int s_ind_per_block;
19310 unsigned int s_ind_per_block_bits;
19311 unsigned int s_ind_per_block_2;
19312 unsigned int s_toobig_block;
19313 unsigned int s_block_base;
19314 unsigned short s_fic_size;
19315 unsigned short s_flc_size;
19316
19317 struct buffer_head *s_bh1;
19318 struct buffer_head *s_bh2;
19319
19320
19321 char * s_sbd1;
19322 char * s_sbd2;
19323 __fs16 *s_sb_fic_count;
19324 sysv_ino_t *s_sb_fic_inodes;
19325 __fs16 *s_sb_total_free_inodes;
19326 __fs16 *s_bcache_count;
19327 sysv_zone_t *s_bcache;
19328 __fs32 *s_free_blocks;
19329 __fs32 *s_sb_time;
19330 __fs32 *s_sb_state;
19331
19332
19333 u32 s_firstinodezone;
19334 u32 s_firstdatazone;
19335 u32 s_ninodes;
19336 u32 s_ndatazones;
19337 u32 s_nzones;
19338 u16 s_namelen;
19339 int s_forced_ro;
19340};
19341
19342
19343
19344
19345struct sysv_inode_info {
19346 __fs32 i_data[13];
19347 u32 i_dir_start_lookup;
19348 struct inode vfs_inode;
19349};
19350
19351
19352static inline __attribute__((always_inline)) struct sysv_inode_info *SYSV_I(struct inode *inode)
19353{
19354 return ({ const typeof( ((struct sysv_inode_info *)0)->vfs_inode ) *__mptr = (inode); (struct sysv_inode_info *)( (char *)__mptr - __builtin_offsetof(struct sysv_inode_info,vfs_inode) );});
19355}
19356
19357static inline __attribute__((always_inline)) struct sysv_sb_info *SYSV_SB(struct super_block *sb)
19358{
19359 return sb->s_fs_info;
19360}
19361
19362
19363
19364enum {
19365 FSTYPE_NONE = 0,
19366 FSTYPE_XENIX,
19367 FSTYPE_SYSV4,
19368 FSTYPE_SYSV2,
19369 FSTYPE_COH,
19370 FSTYPE_V7,
19371 FSTYPE_AFS,
19372 FSTYPE_END,
19373};
19374# 106 "fs/sysv/sysv.h"
19375enum {
19376 XENIX_LINK_MAX = 126,
19377 SYSV_LINK_MAX = 126,
19378 V7_LINK_MAX = 126,
19379 COH_LINK_MAX = 10000,
19380};
19381
19382
19383static inline __attribute__((always_inline)) void dirty_sb(struct super_block *sb)
19384{
19385 struct sysv_sb_info *sbi = SYSV_SB(sb);
19386
19387 mark_buffer_dirty(sbi->s_bh1);
19388 if (sbi->s_bh1 != sbi->s_bh2)
19389 mark_buffer_dirty(sbi->s_bh2);
19390 sb->s_dirt = 1;
19391}
19392
19393
19394
19395extern struct sysv_inode *sysv_raw_inode(struct super_block *, unsigned,
19396 struct buffer_head **);
19397extern struct inode * sysv_new_inode(const struct inode *, mode_t);
19398extern void sysv_free_inode(struct inode *);
19399extern unsigned long sysv_count_free_inodes(struct super_block *);
19400
19401
19402extern sysv_zone_t sysv_new_block(struct super_block *);
19403extern void sysv_free_block(struct super_block *, sysv_zone_t);
19404extern unsigned long sysv_count_free_blocks(struct super_block *);
19405
19406
19407extern void sysv_truncate(struct inode *);
19408extern int __sysv_write_begin(struct file *file, struct address_space *mapping,
19409 loff_t pos, unsigned len, unsigned flags,
19410 struct page **pagep, void **fsdata);
19411
19412
19413extern struct inode *sysv_iget(struct super_block *, unsigned int);
19414extern int sysv_write_inode(struct inode *, int);
19415extern int sysv_sync_inode(struct inode *);
19416extern void sysv_set_inode(struct inode *, dev_t);
19417extern int sysv_getattr(struct vfsmount *, struct dentry *, struct kstat *);
19418extern int sysv_init_icache(void);
19419extern void sysv_destroy_icache(void);
19420
19421
19422
19423extern struct sysv_dir_entry *sysv_find_entry(struct dentry *, struct page **);
19424extern int sysv_add_link(struct dentry *, struct inode *);
19425extern int sysv_delete_entry(struct sysv_dir_entry *, struct page *);
19426extern int sysv_make_empty(struct inode *, struct inode *);
19427extern int sysv_empty_dir(struct inode *);
19428extern void sysv_set_link(struct sysv_dir_entry *, struct page *,
19429 struct inode *);
19430extern struct sysv_dir_entry *sysv_dotdot(struct inode *, struct page **);
19431extern ino_t sysv_inode_by_name(struct dentry *);
19432
19433
19434extern const struct inode_operations sysv_file_inode_operations;
19435extern const struct inode_operations sysv_dir_inode_operations;
19436extern const struct inode_operations sysv_fast_symlink_inode_operations;
19437extern const struct file_operations sysv_file_operations;
19438extern const struct file_operations sysv_dir_operations;
19439extern const struct address_space_operations sysv_aops;
19440extern const struct super_operations sysv_sops;
19441extern const struct dentry_operations sysv_dentry_operations;
19442
19443
19444enum {
19445 BYTESEX_LE,
19446 BYTESEX_PDP,
19447 BYTESEX_BE,
19448};
19449
19450static inline __attribute__((always_inline)) u32 PDP_swab(u32 x)
19451{
19452
19453 return ((x & 0xffff) << 16) | ((x & 0xffff0000) >> 16);
19454
19455
19456
19457
19458
19459
19460
19461}
19462
19463static inline __attribute__((always_inline)) __u32 fs32_to_cpu(struct sysv_sb_info *sbi, __fs32 n)
19464{
19465 if (sbi->s_bytesex == BYTESEX_PDP)
19466 return PDP_swab(( __u32)n);
19467 else if (sbi->s_bytesex == BYTESEX_LE)
19468 return (( __u32)(__le32)(( __le32)n));
19469 else
19470 return (__builtin_constant_p((__u32)(( __u32)(__be32)(( __be32)n))) ? ((__u32)( (((__u32)(( __u32)(__be32)(( __be32)n)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(( __be32)n)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(( __be32)n)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(( __be32)n)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(( __be32)n)));
19471}
19472
19473static inline __attribute__((always_inline)) __fs32 cpu_to_fs32(struct sysv_sb_info *sbi, __u32 n)
19474{
19475 if (sbi->s_bytesex == BYTESEX_PDP)
19476 return ( __fs32)PDP_swab(n);
19477 else if (sbi->s_bytesex == BYTESEX_LE)
19478 return ( __fs32)(( __le32)(__u32)(n));
19479 else
19480 return ( __fs32)(( __be32)(__builtin_constant_p((__u32)((n))) ? ((__u32)( (((__u32)((n)) & (__u32)0x000000ffUL) << 24) | (((__u32)((n)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((n)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((n)) & (__u32)0xff000000UL) >> 24))) : __fswab32((n))));
19481}
19482
19483static inline __attribute__((always_inline)) __fs32 fs32_add(struct sysv_sb_info *sbi, __fs32 *n, int d)
19484{
19485 if (sbi->s_bytesex == BYTESEX_PDP)
19486 *(__u32*)n = PDP_swab(PDP_swab(*(__u32*)n)+d);
19487 else if (sbi->s_bytesex == BYTESEX_LE)
19488 le32_add_cpu((__le32 *)n, d);
19489 else
19490 be32_add_cpu((__be32 *)n, d);
19491 return *n;
19492}
19493
19494static inline __attribute__((always_inline)) __u16 fs16_to_cpu(struct sysv_sb_info *sbi, __fs16 n)
19495{
19496 if (sbi->s_bytesex != BYTESEX_BE)
19497 return (( __u16)(__le16)(( __le16)n));
19498 else
19499 return (__builtin_constant_p((__u16)(( __u16)(__be16)(( __be16)n))) ? ((__u16)( (((__u16)(( __u16)(__be16)(( __be16)n)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(( __be16)n)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(( __be16)n)));
19500}
19501
19502static inline __attribute__((always_inline)) __fs16 cpu_to_fs16(struct sysv_sb_info *sbi, __u16 n)
19503{
19504 if (sbi->s_bytesex != BYTESEX_BE)
19505 return ( __fs16)(( __le16)(__u16)(n));
19506 else
19507 return ( __fs16)(( __be16)(__builtin_constant_p((__u16)((n))) ? ((__u16)( (((__u16)((n)) & (__u16)0x00ffU) << 8) | (((__u16)((n)) & (__u16)0xff00U) >> 8))) : __fswab16((n))));
19508}
19509
19510static inline __attribute__((always_inline)) __fs16 fs16_add(struct sysv_sb_info *sbi, __fs16 *n, int d)
19511{
19512 if (sbi->s_bytesex != BYTESEX_BE)
19513 le16_add_cpu((__le16 *)n, d);
19514 else
19515 be16_add_cpu((__be16 *)n, d);
19516 return *n;
19517}
19518# 28 "fs/sysv/super.c" 2
19519# 43 "fs/sysv/super.c"
19520enum {
19521 JAN_1_1980 = (10*365 + 2) * 24 * 60 * 60
19522};
19523
19524static void detected_xenix(struct sysv_sb_info *sbi)
19525{
19526 struct buffer_head *bh1 = sbi->s_bh1;
19527 struct buffer_head *bh2 = sbi->s_bh2;
19528 struct xenix_super_block * sbd1;
19529 struct xenix_super_block * sbd2;
19530
19531 if (bh1 != bh2)
19532 sbd1 = sbd2 = (struct xenix_super_block *) bh1->b_data;
19533 else {
19534
19535 sbd1 = (struct xenix_super_block *) bh1->b_data;
19536 sbd2 = (struct xenix_super_block *) (bh2->b_data - 512);
19537 }
19538
19539 sbi->s_link_max = XENIX_LINK_MAX;
19540 sbi->s_fic_size = 100;
19541 sbi->s_flc_size = 100;
19542 sbi->s_sbd1 = (char *)sbd1;
19543 sbi->s_sbd2 = (char *)sbd2;
19544 sbi->s_sb_fic_count = &sbd1->s_ninode;
19545 sbi->s_sb_fic_inodes = &sbd1->s_inode[0];
19546 sbi->s_sb_total_free_inodes = &sbd2->s_tinode;
19547 sbi->s_bcache_count = &sbd1->s_nfree;
19548 sbi->s_bcache = &sbd1->s_free[0];
19549 sbi->s_free_blocks = &sbd2->s_tfree;
19550 sbi->s_sb_time = &sbd2->s_time;
19551 sbi->s_firstdatazone = fs16_to_cpu(sbi, sbd1->s_isize);
19552 sbi->s_nzones = fs32_to_cpu(sbi, sbd1->s_fsize);
19553}
19554
19555static void detected_sysv4(struct sysv_sb_info *sbi)
19556{
19557 struct sysv4_super_block * sbd;
19558 struct buffer_head *bh1 = sbi->s_bh1;
19559 struct buffer_head *bh2 = sbi->s_bh2;
19560
19561 if (bh1 == bh2)
19562 sbd = (struct sysv4_super_block *) (bh1->b_data + (1<<10)/2);
19563 else
19564 sbd = (struct sysv4_super_block *) bh2->b_data;
19565
19566 sbi->s_link_max = SYSV_LINK_MAX;
19567 sbi->s_fic_size = 100;
19568 sbi->s_flc_size = 50;
19569 sbi->s_sbd1 = (char *)sbd;
19570 sbi->s_sbd2 = (char *)sbd;
19571 sbi->s_sb_fic_count = &sbd->s_ninode;
19572 sbi->s_sb_fic_inodes = &sbd->s_inode[0];
19573 sbi->s_sb_total_free_inodes = &sbd->s_tinode;
19574 sbi->s_bcache_count = &sbd->s_nfree;
19575 sbi->s_bcache = &sbd->s_free[0];
19576 sbi->s_free_blocks = &sbd->s_tfree;
19577 sbi->s_sb_time = &sbd->s_time;
19578 sbi->s_sb_state = &sbd->s_state;
19579 sbi->s_firstdatazone = fs16_to_cpu(sbi, sbd->s_isize);
19580 sbi->s_nzones = fs32_to_cpu(sbi, sbd->s_fsize);
19581}
19582
19583static void detected_sysv2(struct sysv_sb_info *sbi)
19584{
19585 struct sysv2_super_block *sbd;
19586 struct buffer_head *bh1 = sbi->s_bh1;
19587 struct buffer_head *bh2 = sbi->s_bh2;
19588
19589 if (bh1 == bh2)
19590 sbd = (struct sysv2_super_block *) (bh1->b_data + (1<<10)/2);
19591 else
19592 sbd = (struct sysv2_super_block *) bh2->b_data;
19593
19594 sbi->s_link_max = SYSV_LINK_MAX;
19595 sbi->s_fic_size = 100;
19596 sbi->s_flc_size = 50;
19597 sbi->s_sbd1 = (char *)sbd;
19598 sbi->s_sbd2 = (char *)sbd;
19599 sbi->s_sb_fic_count = &sbd->s_ninode;
19600 sbi->s_sb_fic_inodes = &sbd->s_inode[0];
19601 sbi->s_sb_total_free_inodes = &sbd->s_tinode;
19602 sbi->s_bcache_count = &sbd->s_nfree;
19603 sbi->s_bcache = &sbd->s_free[0];
19604 sbi->s_free_blocks = &sbd->s_tfree;
19605 sbi->s_sb_time = &sbd->s_time;
19606 sbi->s_sb_state = &sbd->s_state;
19607 sbi->s_firstdatazone = fs16_to_cpu(sbi, sbd->s_isize);
19608 sbi->s_nzones = fs32_to_cpu(sbi, sbd->s_fsize);
19609}
19610
19611static void detected_coherent(struct sysv_sb_info *sbi)
19612{
19613 struct coh_super_block * sbd;
19614 struct buffer_head *bh1 = sbi->s_bh1;
19615
19616 sbd = (struct coh_super_block *) bh1->b_data;
19617
19618 sbi->s_link_max = COH_LINK_MAX;
19619 sbi->s_fic_size = 100;
19620 sbi->s_flc_size = 64;
19621 sbi->s_sbd1 = (char *)sbd;
19622 sbi->s_sbd2 = (char *)sbd;
19623 sbi->s_sb_fic_count = &sbd->s_ninode;
19624 sbi->s_sb_fic_inodes = &sbd->s_inode[0];
19625 sbi->s_sb_total_free_inodes = &sbd->s_tinode;
19626 sbi->s_bcache_count = &sbd->s_nfree;
19627 sbi->s_bcache = &sbd->s_free[0];
19628 sbi->s_free_blocks = &sbd->s_tfree;
19629 sbi->s_sb_time = &sbd->s_time;
19630 sbi->s_firstdatazone = fs16_to_cpu(sbi, sbd->s_isize);
19631 sbi->s_nzones = fs32_to_cpu(sbi, sbd->s_fsize);
19632}
19633
19634static void detected_v7(struct sysv_sb_info *sbi)
19635{
19636 struct buffer_head *bh2 = sbi->s_bh2;
19637 struct v7_super_block *sbd = (struct v7_super_block *)bh2->b_data;
19638
19639 sbi->s_link_max = V7_LINK_MAX;
19640 sbi->s_fic_size = 100;
19641 sbi->s_flc_size = 50;
19642 sbi->s_sbd1 = (char *)sbd;
19643 sbi->s_sbd2 = (char *)sbd;
19644 sbi->s_sb_fic_count = &sbd->s_ninode;
19645 sbi->s_sb_fic_inodes = &sbd->s_inode[0];
19646 sbi->s_sb_total_free_inodes = &sbd->s_tinode;
19647 sbi->s_bcache_count = &sbd->s_nfree;
19648 sbi->s_bcache = &sbd->s_free[0];
19649 sbi->s_free_blocks = &sbd->s_tfree;
19650 sbi->s_sb_time = &sbd->s_time;
19651 sbi->s_firstdatazone = fs16_to_cpu(sbi, sbd->s_isize);
19652 sbi->s_nzones = fs32_to_cpu(sbi, sbd->s_fsize);
19653}
19654
19655static int detect_xenix(struct sysv_sb_info *sbi, struct buffer_head *bh)
19656{
19657 struct xenix_super_block *sbd = (struct xenix_super_block *)bh->b_data;
19658 if (*(__le32 *)&sbd->s_magic == (( __le32)(__u32)(0x2b5544)))
19659 sbi->s_bytesex = BYTESEX_LE;
19660 else if (*(__be32 *)&sbd->s_magic == (( __be32)(__builtin_constant_p((__u32)((0x2b5544))) ? ((__u32)( (((__u32)((0x2b5544)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x2b5544)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x2b5544)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x2b5544)) & (__u32)0xff000000UL) >> 24))) : __fswab32((0x2b5544)))))
19661 sbi->s_bytesex = BYTESEX_BE;
19662 else
19663 return 0;
19664 switch (fs32_to_cpu(sbi, sbd->s_type)) {
19665 case 1:
19666 sbi->s_type = FSTYPE_XENIX;
19667 return 1;
19668 case 2:
19669 sbi->s_type = FSTYPE_XENIX;
19670 return 2;
19671 default:
19672 return 0;
19673 }
19674}
19675
19676static int detect_sysv(struct sysv_sb_info *sbi, struct buffer_head *bh)
19677{
19678 struct super_block *sb = sbi->s_sb;
19679
19680 struct sysv4_super_block * sbd;
19681 u32 type;
19682
19683 sbd = (struct sysv4_super_block *) (bh->b_data + (1<<10)/2);
19684 if (*(__le32 *)&sbd->s_magic == (( __le32)(__u32)(0xfd187e20)))
19685 sbi->s_bytesex = BYTESEX_LE;
19686 else if (*(__be32 *)&sbd->s_magic == (( __be32)(__builtin_constant_p((__u32)((0xfd187e20))) ? ((__u32)( (((__u32)((0xfd187e20)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0xfd187e20)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0xfd187e20)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0xfd187e20)) & (__u32)0xff000000UL) >> 24))) : __fswab32((0xfd187e20)))))
19687 sbi->s_bytesex = BYTESEX_BE;
19688 else
19689 return 0;
19690
19691 type = fs32_to_cpu(sbi, sbd->s_type);
19692
19693 if (fs16_to_cpu(sbi, sbd->s_nfree) == 0xffff) {
19694 sbi->s_type = FSTYPE_AFS;
19695 sbi->s_forced_ro = 1;
19696 if (!(sb->s_flags & 1)) {
19697 printk("SysV FS: SCO EAFS on %s detected, "
19698 "forcing read-only mode.\n",
19699 sb->s_id);
19700 }
19701 return type;
19702 }
19703
19704 if (fs32_to_cpu(sbi, sbd->s_time) < JAN_1_1980) {
19705
19706 if (type > 3 || type < 1)
19707 return 0;
19708 sbi->s_type = FSTYPE_SYSV2;
19709 return type;
19710 }
19711 if ((type > 3 || type < 1) && (type > 0x30 || type < 0x10))
19712 return 0;
19713
19714
19715
19716
19717
19718
19719 if (type >= 0x10) {
19720 printk("SysV FS: can't handle long file names on %s, "
19721 "forcing read-only mode.\n", sb->s_id);
19722 sbi->s_forced_ro = 1;
19723 }
19724
19725 sbi->s_type = FSTYPE_SYSV4;
19726 return type >= 0x10 ? type >> 4 : type;
19727}
19728
19729static int detect_coherent(struct sysv_sb_info *sbi, struct buffer_head *bh)
19730{
19731 struct coh_super_block * sbd;
19732
19733 sbd = (struct coh_super_block *) (bh->b_data + (1<<10)/2);
19734 if ((memcmp(sbd->s_fname,"noname",6) && memcmp(sbd->s_fname,"xxxxx ",6))
19735 || (memcmp(sbd->s_fpack,"nopack",6) && memcmp(sbd->s_fpack,"xxxxx\n",6)))
19736 return 0;
19737 sbi->s_bytesex = BYTESEX_PDP;
19738 sbi->s_type = FSTYPE_COH;
19739 return 1;
19740}
19741
19742static int detect_sysv_odd(struct sysv_sb_info *sbi, struct buffer_head *bh)
19743{
19744 int size = detect_sysv(sbi, bh);
19745
19746 return size>2 ? 0 : size;
19747}
19748
19749static struct {
19750 int block;
19751 int (*test)(struct sysv_sb_info *, struct buffer_head *);
19752} flavours[] = {
19753 {1, detect_xenix},
19754 {0, detect_sysv},
19755 {0, detect_coherent},
19756 {9, detect_sysv_odd},
19757 {15,detect_sysv_odd},
19758 {18,detect_sysv},
19759};
19760
19761static char *flavour_names[] = {
19762 [FSTYPE_XENIX] = "Xenix",
19763 [FSTYPE_SYSV4] = "SystemV",
19764 [FSTYPE_SYSV2] = "SystemV Release 2",
19765 [FSTYPE_COH] = "Coherent",
19766 [FSTYPE_V7] = "V7",
19767 [FSTYPE_AFS] = "AFS",
19768};
19769
19770static void (*flavour_setup[])(struct sysv_sb_info *) = {
19771 [FSTYPE_XENIX] = detected_xenix,
19772 [FSTYPE_SYSV4] = detected_sysv4,
19773 [FSTYPE_SYSV2] = detected_sysv2,
19774 [FSTYPE_COH] = detected_coherent,
19775 [FSTYPE_V7] = detected_v7,
19776 [FSTYPE_AFS] = detected_sysv4,
19777};
19778
19779static int complete_read_super(struct super_block *sb, int silent, int size)
19780{
19781 struct sysv_sb_info *sbi = SYSV_SB(sb);
19782 struct inode *root_inode;
19783 char *found = flavour_names[sbi->s_type];
19784 u_char n_bits = size+8;
19785 int bsize = 1 << n_bits;
19786 int bsize_4 = bsize >> 2;
19787
19788 sbi->s_firstinodezone = 2;
19789
19790 flavour_setup[sbi->s_type](sbi);
19791
19792 sbi->s_truncate = 1;
19793 sbi->s_ndatazones = sbi->s_nzones - sbi->s_firstdatazone;
19794 sbi->s_inodes_per_block = bsize >> 6;
19795 sbi->s_inodes_per_block_1 = (bsize >> 6)-1;
19796 sbi->s_inodes_per_block_bits = n_bits-6;
19797 sbi->s_ind_per_block = bsize_4;
19798 sbi->s_ind_per_block_2 = bsize_4*bsize_4;
19799 sbi->s_toobig_block = 10 + bsize_4 * (1 + bsize_4 * (1 + bsize_4));
19800 sbi->s_ind_per_block_bits = n_bits-2;
19801
19802 sbi->s_ninodes = (sbi->s_firstdatazone - sbi->s_firstinodezone)
19803 << sbi->s_inodes_per_block_bits;
19804
19805 if (!silent)
19806 printk("VFS: Found a %s FS (block size = %ld) on device %s\n",
19807 found, sb->s_blocksize, sb->s_id);
19808
19809 sb->s_magic = 0x012FF7B3 + sbi->s_type;
19810
19811 sb->s_op = &sysv_sops;
19812 root_inode = sysv_iget(sb, 2);
19813 if (IS_ERR(root_inode)) {
19814 printk("SysV FS: get root inode failed\n");
19815 return 0;
19816 }
19817 sb->s_root = d_alloc_root(root_inode);
19818 if (!sb->s_root) {
19819 iput(root_inode);
19820 printk("SysV FS: get root dentry failed\n");
19821 return 0;
19822 }
19823 if (sbi->s_forced_ro)
19824 sb->s_flags |= 1;
19825 if (sbi->s_truncate)
19826 sb->s_root->d_op = &sysv_dentry_operations;
19827 sb->s_dirt = 1;
19828 return 1;
19829}
19830
19831static int sysv_fill_super(struct super_block *sb, void *data, int silent)
19832{
19833 struct buffer_head *bh1, *bh = ((void *)0);
19834 struct sysv_sb_info *sbi;
19835 unsigned long blocknr;
19836 int size = 0, i;
19837
19838 ((void)(sizeof(struct { int:-!!(1024 != sizeof (struct xenix_super_block)); })));
19839 ((void)(sizeof(struct { int:-!!(512 != sizeof (struct sysv4_super_block)); })));
19840 ((void)(sizeof(struct { int:-!!(512 != sizeof (struct sysv2_super_block)); })));
19841 ((void)(sizeof(struct { int:-!!(500 != sizeof (struct coh_super_block)); })));
19842 ((void)(sizeof(struct { int:-!!(64 != sizeof (struct sysv_inode)); })));
19843
19844 sbi = kzalloc(sizeof(struct sysv_sb_info), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)));
19845 if (!sbi)
19846 return -12;
19847
19848 sbi->s_sb = sb;
19849 sbi->s_block_base = 0;
19850 sb->s_fs_info = sbi;
19851
19852 sb_set_blocksize(sb, (1<<10));
19853
19854 for (i = 0; i < (sizeof(flavours) / sizeof((flavours)[0]) + (sizeof(struct { int:-!!(__builtin_types_compatible_p(typeof(flavours), typeof(&flavours[0]))); }))) && !size; i++) {
19855 brelse(bh);
19856 bh = sb_bread(sb, flavours[i].block);
19857 if (!bh)
19858 continue;
19859 size = flavours[i].test(SYSV_SB(sb), bh);
19860 }
19861
19862 if (!size)
19863 goto Eunknown;
19864
19865 switch (size) {
19866 case 1:
19867 blocknr = bh->b_blocknr << 1;
19868 brelse(bh);
19869 sb_set_blocksize(sb, 512);
19870 bh1 = sb_bread(sb, blocknr);
19871 bh = sb_bread(sb, blocknr + 1);
19872 break;
19873 case 2:
19874 bh1 = bh;
19875 break;
19876 case 3:
19877 blocknr = bh->b_blocknr >> 1;
19878 brelse(bh);
19879 sb_set_blocksize(sb, 2048);
19880 bh1 = bh = sb_bread(sb, blocknr);
19881 break;
19882 default:
19883 goto Ebadsize;
19884 }
19885
19886 if (bh && bh1) {
19887 sbi->s_bh1 = bh1;
19888 sbi->s_bh2 = bh;
19889 if (complete_read_super(sb, silent, size))
19890 return 0;
19891 }
19892
19893 brelse(bh1);
19894 brelse(bh);
19895 sb_set_blocksize(sb, (1<<10));
19896 printk("oldfs: cannot read superblock\n");
19897failed:
19898 kfree(sbi);
19899 return -22;
19900
19901Eunknown:
19902 brelse(bh);
19903 if (!silent)
19904 printk("VFS: unable to find oldfs superblock on device %s\n",
19905 sb->s_id);
19906 goto failed;
19907Ebadsize:
19908 brelse(bh);
19909 if (!silent)
19910 printk("VFS: oldfs: unsupported block size (%dKb)\n",
19911 1<<(size-2));
19912 goto failed;
19913}
19914
19915static int v7_fill_super(struct super_block *sb, void *data, int silent)
19916{
19917 struct sysv_sb_info *sbi;
19918 struct buffer_head *bh, *bh2 = ((void *)0);
19919 struct v7_super_block *v7sb;
19920 struct sysv_inode *v7i;
19921
19922 if (440 != sizeof (struct v7_super_block))
19923 panic("V7 FS: bad super-block size");
19924 if (64 != sizeof (struct sysv_inode))
19925 panic("sysv fs: bad i-node size");
19926
19927 sbi = kzalloc(sizeof(struct sysv_sb_info), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)));
19928 if (!sbi)
19929 return -12;
19930
19931 sbi->s_sb = sb;
19932 sbi->s_block_base = 0;
19933 sbi->s_type = FSTYPE_V7;
19934 sbi->s_bytesex = BYTESEX_PDP;
19935 sb->s_fs_info = sbi;
19936
19937 sb_set_blocksize(sb, 512);
19938
19939 if ((bh = sb_bread(sb, 1)) == ((void *)0)) {
19940 if (!silent)
19941 printk("VFS: unable to read V7 FS superblock on "
19942 "device %s.\n", sb->s_id);
19943 goto failed;
19944 }
19945
19946
19947 v7sb = (struct v7_super_block *) bh->b_data;
19948 if (fs16_to_cpu(sbi, v7sb->s_nfree) > 50 ||
19949 fs16_to_cpu(sbi, v7sb->s_ninode) > 100 ||
19950 fs32_to_cpu(sbi, v7sb->s_time) == 0)
19951 goto failed;
19952
19953
19954
19955 if ((bh2 = sb_bread(sb, 2)) == ((void *)0))
19956 goto failed;
19957 v7i = (struct sysv_inode *)(bh2->b_data + 64);
19958 if ((fs16_to_cpu(sbi, v7i->i_mode) & ~0777) != 0040000 ||
19959 (fs32_to_cpu(sbi, v7i->i_size) == 0) ||
19960 (fs32_to_cpu(sbi, v7i->i_size) & 017) != 0)
19961 goto failed;
19962 brelse(bh2);
19963 bh2 = ((void *)0);
19964
19965 sbi->s_bh1 = bh;
19966 sbi->s_bh2 = bh;
19967 if (complete_read_super(sb, silent, 1))
19968 return 0;
19969
19970failed:
19971 brelse(bh2);
19972 brelse(bh);
19973 kfree(sbi);
19974 return -22;
19975}
19976
19977
19978
19979static int sysv_get_sb(struct file_system_type *fs_type,
19980 int flags, const char *dev_name, void *data, struct vfsmount *mnt)
19981{
19982 return get_sb_bdev(fs_type, flags, dev_name, data, sysv_fill_super,
19983 mnt);
19984}
19985
19986static int v7_get_sb(struct file_system_type *fs_type,
19987 int flags, const char *dev_name, void *data, struct vfsmount *mnt)
19988{
19989 return get_sb_bdev(fs_type, flags, dev_name, data, v7_fill_super, mnt);
19990}
19991
19992static struct file_system_type sysv_fs_type = {
19993 .owner = (&__this_module),
19994 .name = "sysv",
19995 .get_sb = sysv_get_sb,
19996 .kill_sb = kill_block_super,
19997 .fs_flags = 1,
19998};
19999
20000static struct file_system_type v7_fs_type = {
20001 .owner = (&__this_module),
20002 .name = "v7",
20003 .get_sb = v7_get_sb,
20004 .kill_sb = kill_block_super,
20005 .fs_flags = 1,
20006};
20007
20008static int __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) init_sysv_fs(void)
20009{
20010 int error;
20011
20012 error = sysv_init_icache();
20013 if (error)
20014 goto out;
20015 error = register_filesystem(&sysv_fs_type);
20016 if (error)
20017 goto destroy_icache;
20018 error = register_filesystem(&v7_fs_type);
20019 if (error)
20020 goto unregister;
20021 return 0;
20022
20023unregister:
20024 unregister_filesystem(&sysv_fs_type);
20025destroy_icache:
20026 sysv_destroy_icache();
20027out:
20028 return error;
20029}
20030
20031static void __attribute__ ((__section__(".exit.text"))) __attribute__((__cold__)) exit_sysv_fs(void)
20032{
20033 unregister_filesystem(&sysv_fs_type);
20034 unregister_filesystem(&v7_fs_type);
20035 sysv_destroy_icache();
20036}
20037
20038static inline __attribute__((always_inline)) initcall_t __inittest(void) { return init_sysv_fs; } int init_module(void) __attribute__((alias("init_sysv_fs")));
20039static inline __attribute__((always_inline)) exitcall_t __exittest(void) { return exit_sysv_fs; } void cleanup_module(void) __attribute__((alias("exit_sysv_fs")));
20040static const char __mod_license563[] __attribute__((__used__)) __attribute__((section(".modinfo"),unused)) = "license" "=" "GPL";