4 # 1 "./include/linux/autoconf.h" 1
7 # 1 "include/linux/init.h" 1
11 # 1 "include/linux/compiler.h" 1
12 # 40 "include/linux/compiler.h"
13 # 1 "include/linux/compiler-gcc4.h" 1
17 # 1 "include/linux/compiler-gcc.h" 1
18 # 5 "include/linux/compiler-gcc4.h" 2
19 # 41 "include/linux/compiler.h" 2
20 # 5 "include/linux/init.h" 2
21 # 76 "include/linux/init.h"
22 typedef int (*initcall_t)(void);
23 typedef void (*exitcall_t)(void);
25 extern initcall_t __con_initcall_start[], __con_initcall_end[];
26 extern initcall_t __security_initcall_start[], __security_initcall_end[];
29 extern char __attribute__ ((__section__ (".init.data"))) boot_command_line[];
30 extern char *saved_command_line;
31 extern unsigned int reset_devices;
34 void setup_arch(char **);
35 void prepare_namespace(void);
36 # 148 "include/linux/init.h"
37 struct obs_kernel_param {
39 int (*setup_func)(char *);
42 # 183 "include/linux/init.h"
43 void __attribute__ ((__section__ (".init.text"))) parse_early_param(void);
44 # 2 "init/initramfs.c" 2
45 # 1 "include/linux/fs.h" 1
46 # 9 "include/linux/fs.h"
47 # 1 "include/linux/limits.h" 1
48 # 10 "include/linux/fs.h" 2
49 # 1 "include/linux/ioctl.h" 1
53 # 1 "include/asm/ioctl.h" 1
54 # 1 "include/asm-generic/ioctl.h" 1
55 # 51 "include/asm-generic/ioctl.h"
56 extern unsigned int __invalid_size_argument_for_IOC;
57 # 1 "include/asm/ioctl.h" 2
58 # 5 "include/linux/ioctl.h" 2
59 # 11 "include/linux/fs.h" 2
60 # 36 "include/linux/fs.h"
61 struct files_stat_struct {
66 extern struct files_stat_struct files_stat;
67 extern int get_max_files(void);
69 struct inodes_stat_t {
74 extern struct inodes_stat_t inodes_stat;
76 extern int leases_enable, lease_break_time;
77 # 271 "include/linux/fs.h"
78 # 1 "include/linux/linkage.h" 1
82 # 1 "include/asm/linkage.h" 1
83 # 5 "include/linux/linkage.h" 2
84 # 272 "include/linux/fs.h" 2
85 # 1 "include/linux/wait.h" 1
86 # 22 "include/linux/wait.h"
87 # 1 "include/linux/list.h" 1
93 # 1 "include/linux/stddef.h" 1
94 # 15 "include/linux/stddef.h"
99 # 7 "include/linux/list.h" 2
100 # 1 "include/linux/poison.h" 1
101 # 8 "include/linux/list.h" 2
102 # 1 "include/linux/prefetch.h" 1
103 # 13 "include/linux/prefetch.h"
104 # 1 "include/linux/types.h" 1
105 # 14 "include/linux/types.h"
106 # 1 "include/linux/posix_types.h" 1
107 # 36 "include/linux/posix_types.h"
109 unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
113 typedef void (*__kernel_sighandler_t)(int);
116 typedef int __kernel_key_t;
117 typedef int __kernel_mqd_t;
119 # 1 "include/asm/posix_types.h" 1
120 # 10 "include/asm/posix_types.h"
121 typedef unsigned long __kernel_ino_t;
122 typedef unsigned short __kernel_mode_t;
123 typedef unsigned short __kernel_nlink_t;
124 typedef long __kernel_off_t;
125 typedef int __kernel_pid_t;
126 typedef unsigned int __kernel_ipc_pid_t;
127 typedef unsigned int __kernel_uid_t;
128 typedef unsigned int __kernel_gid_t;
129 typedef unsigned long __kernel_size_t;
130 typedef long __kernel_ssize_t;
131 typedef int __kernel_ptrdiff_t;
132 typedef long __kernel_time_t;
133 typedef long __kernel_suseconds_t;
134 typedef long __kernel_clock_t;
135 typedef int __kernel_timer_t;
136 typedef int __kernel_clockid_t;
137 typedef int __kernel_daddr_t;
138 typedef char *__kernel_caddr_t;
139 typedef unsigned short __kernel_uid16_t;
140 typedef unsigned short __kernel_gid16_t;
141 typedef unsigned int __kernel_uid32_t;
142 typedef unsigned int __kernel_gid32_t;
144 typedef unsigned short __kernel_old_uid_t;
145 typedef unsigned short __kernel_old_gid_t;
146 typedef unsigned short __kernel_old_dev_t;
149 typedef long long __kernel_loff_t;
159 # 48 "include/linux/posix_types.h" 2
160 # 15 "include/linux/types.h" 2
161 # 1 "include/asm/types.h" 1
162 # 13 "include/asm/types.h"
163 typedef unsigned short umode_t;
170 typedef __signed__ char __s8;
171 typedef unsigned char __u8;
173 typedef __signed__ short __s16;
174 typedef unsigned short __u16;
176 typedef __signed__ int __s32;
177 typedef unsigned int __u32;
181 typedef __signed__ long long __s64;
182 typedef unsigned long long __u64;
183 # 45 "include/asm/types.h"
184 typedef signed char s8;
185 typedef unsigned char u8;
187 typedef signed short s16;
188 typedef unsigned short u16;
190 typedef signed int s32;
191 typedef unsigned int u32;
193 typedef signed long long s64;
194 typedef unsigned long long u64;
198 typedef u32 dma_addr_t;
199 typedef u64 dma64_addr_t;
200 # 16 "include/linux/types.h" 2
204 typedef __u32 __kernel_dev_t;
206 typedef __kernel_fd_set fd_set;
207 typedef __kernel_dev_t dev_t;
208 typedef __kernel_ino_t ino_t;
209 typedef __kernel_mode_t mode_t;
210 typedef __kernel_nlink_t nlink_t;
211 typedef __kernel_off_t off_t;
212 typedef __kernel_pid_t pid_t;
213 typedef __kernel_daddr_t daddr_t;
214 typedef __kernel_key_t key_t;
215 typedef __kernel_suseconds_t suseconds_t;
216 typedef __kernel_timer_t timer_t;
217 typedef __kernel_clockid_t clockid_t;
218 typedef __kernel_mqd_t mqd_t;
223 typedef __kernel_uid32_t uid_t;
224 typedef __kernel_gid32_t gid_t;
225 typedef __kernel_uid16_t uid16_t;
226 typedef __kernel_gid16_t gid16_t;
230 typedef __kernel_old_uid_t old_uid_t;
231 typedef __kernel_old_gid_t old_gid_t;
232 # 58 "include/linux/types.h"
233 typedef __kernel_loff_t loff_t;
234 # 67 "include/linux/types.h"
235 typedef __kernel_size_t size_t;
240 typedef __kernel_ssize_t ssize_t;
245 typedef __kernel_ptrdiff_t ptrdiff_t;
250 typedef __kernel_time_t time_t;
255 typedef __kernel_clock_t clock_t;
260 typedef __kernel_caddr_t caddr_t;
264 typedef unsigned char u_char;
265 typedef unsigned short u_short;
266 typedef unsigned int u_int;
267 typedef unsigned long u_long;
270 typedef unsigned char unchar;
271 typedef unsigned short ushort;
272 typedef unsigned int uint;
273 typedef unsigned long ulong;
278 typedef __u8 u_int8_t;
280 typedef __u16 u_int16_t;
281 typedef __s16 int16_t;
282 typedef __u32 u_int32_t;
283 typedef __s32 int32_t;
287 typedef __u8 uint8_t;
288 typedef __u16 uint16_t;
289 typedef __u32 uint32_t;
292 typedef __u64 uint64_t;
293 typedef __u64 u_int64_t;
294 typedef __s64 int64_t;
295 # 143 "include/linux/types.h"
296 typedef unsigned long sector_t;
297 # 152 "include/linux/types.h"
298 typedef unsigned long blkcnt_t;
299 # 181 "include/linux/types.h"
300 typedef __u16 __le16;
301 typedef __u16 __be16;
302 typedef __u32 __le32;
303 typedef __u32 __be32;
305 typedef __u64 __le64;
306 typedef __u64 __be64;
308 typedef __u16 __sum16;
309 typedef __u32 __wsum;
312 typedef unsigned gfp_t;
317 typedef u32 resource_size_t;
323 __kernel_daddr_t f_tfree;
324 __kernel_ino_t f_tinode;
328 # 14 "include/linux/prefetch.h" 2
329 # 1 "include/asm/processor.h" 1
330 # 10 "include/asm/processor.h"
331 # 1 "include/asm/blackfin.h" 1
332 # 14 "include/asm/blackfin.h"
333 # 1 "include/asm/mach/anomaly.h" 1
334 # 15 "include/asm/blackfin.h" 2
339 static inline __attribute__((always_inline)) void SSYNC(void)
343 __asm__ __volatile__(
351 else if ((0x0002 < 3))
352 __asm__ __volatile__(
359 __asm__ __volatile__("ssync;");
363 static inline __attribute__((always_inline)) void CSYNC(void)
367 __asm__ __volatile__(
375 else if ((0x0002 < 3))
376 __asm__ __volatile__(
383 __asm__ __volatile__("csync;");
385 # 89 "include/asm/blackfin.h"
386 # 1 "include/asm/mach/blackfin.h" 1
387 # 37 "include/asm/mach/blackfin.h"
388 # 1 "include/asm/mach/bf537.h" 1
389 # 38 "include/asm/mach/blackfin.h" 2
390 # 1 "include/asm/mach/mem_map.h" 1
391 # 39 "include/asm/mach/blackfin.h" 2
392 # 1 "include/asm/mach/defBF534.h" 1
393 # 35 "include/asm/mach/defBF534.h"
394 # 1 "include/asm/mach-common/def_LPBlackfin.h" 1
395 # 36 "include/asm/mach/defBF534.h" 2
396 # 40 "include/asm/mach/blackfin.h" 2
397 # 1 "include/asm/mach/anomaly.h" 1
398 # 41 "include/asm/mach/blackfin.h" 2
401 # 1 "include/asm/mach/defBF537.h" 1
402 # 36 "include/asm/mach/defBF537.h"
403 # 1 "include/asm/mach-common/cdef_LPBlackfin.h" 1
404 # 37 "include/asm/mach/defBF537.h" 2
405 # 44 "include/asm/mach/blackfin.h" 2
409 # 1 "include/asm/mach/cdefBF534.h" 1
410 # 35 "include/asm/mach/cdefBF534.h"
411 # 1 "include/asm/blackfin.h" 1
412 # 36 "include/asm/mach/cdefBF534.h" 2
420 # 1 "include/asm/system.h" 1
421 # 45 "include/asm/system.h"
422 extern unsigned long irq_flags;
423 # 151 "include/asm/system.h"
424 struct __xchg_dummy {
425 unsigned long a[100];
429 static inline __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void *ptr,
432 unsigned long tmp = 0;
433 unsigned long flags = 0;
435 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
442 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
448 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
454 : "=&d" (tmp) : "d" (x), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
457 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
466 static inline __attribute__((always_inline)) unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
467 unsigned long new, int size)
469 unsigned long tmp = 0;
470 unsigned long flags = 0;
472 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
479 "IF !CC JUMP 1f;\n\t"
482 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
488 "IF !CC JUMP 1f;\n\t"
491 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
497 "IF !CC JUMP 1f;\n\t"
500 : "=&d" (tmp) : "d" (old), "d" (new), "m" (*((volatile struct __xchg_dummy *)(ptr))) : "memory");
503 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
506 # 247 "include/asm/system.h"
507 struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
508 # 44 "include/asm/mach/cdefBF534.h" 2
509 # 52 "include/asm/mach/cdefBF534.h"
510 static __inline__ __attribute__((always_inline)) void bfin_write_VR_CTL(unsigned int val)
512 unsigned long flags, iwr;
515 iwr = ({ uint32_t __v; __asm__ __volatile__( "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00124) ); __v; });
517 __asm__ __volatile__( "[%0] = %1;" : : "a" (0xFFC00124), "d" ((1 << ((0)&0x1F))) : "memory" );
519 __asm__ __volatile__( "w[%0] = %1;" : : "a" (0xFFC00008), "d" ((uint16_t)(val)) : "memory" );
522 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
524 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
525 __asm__ __volatile__( "[%0] = %1;" : : "a" (0xFFC00124), "d" (iwr) : "memory" );
527 # 48 "include/asm/mach/blackfin.h" 2
528 # 74 "include/asm/mach/blackfin.h"
529 # 1 "include/asm/mach/cdefBF537.h" 1
530 # 75 "include/asm/mach/blackfin.h" 2
531 # 90 "include/asm/blackfin.h" 2
532 # 1 "include/asm/bfin-global.h" 1
533 # 34 "include/asm/bfin-global.h"
534 # 1 "include/asm-generic/sections.h" 1
540 extern char _text[], _stext[], _etext[];
541 extern char _data[], _sdata[], _edata[];
542 extern char __bss_start[], __bss_stop[];
543 extern char __init_begin[], __init_end[];
544 extern char _sinittext[], _einittext[];
546 extern char __per_cpu_start[], __per_cpu_end[];
547 extern char __kprobes_text_start[], __kprobes_text_end[];
548 extern char __initdata_begin[], __initdata_end[];
549 extern char __start_rodata[], __end_rodata[];
550 # 35 "include/asm/bfin-global.h" 2
551 # 1 "include/asm/ptrace.h" 1
552 # 24 "include/asm/ptrace.h"
610 # 99 "include/asm/ptrace.h"
611 extern void show_regs(struct pt_regs *);
612 # 36 "include/asm/bfin-global.h" 2
613 # 1 "include/asm/user.h" 1
614 # 36 "include/asm/user.h"
615 struct user_bfinfp_struct {
621 struct user_regs_struct {
622 long r0, r1, r2, r3, r4, r5, r6, r7;
623 long p0, p1, p2, p3, p4, p5, usp, fp;
633 unsigned long orig_p0;
644 struct user_regs_struct regs;
647 unsigned long int u_tsize;
648 unsigned long int u_dsize;
649 unsigned long int u_ssize;
650 unsigned long start_code;
651 unsigned long start_stack;
657 struct user_regs_struct *u_ar0;
663 # 37 "include/asm/bfin-global.h" 2
664 # 48 "include/asm/bfin-global.h"
665 extern unsigned long get_cclk(void);
666 extern unsigned long get_sclk(void);
667 extern unsigned long sclk_to_usecs(unsigned long sclk);
668 extern unsigned long usecs_to_sclk(unsigned long usecs);
670 extern void dump_bfin_process(struct pt_regs *regs);
671 extern void dump_bfin_mem(struct pt_regs *regs);
672 extern void dump_bfin_trace_buffer(void);
674 extern int init_arch_irq(void);
675 extern void bfin_reset(void);
676 extern void _cplb_hdr(void);
678 extern void bfin_icache_init(void);
679 extern void bfin_dcache_init(void);
680 extern int read_iloc(void);
681 extern int bfin_console_init(void);
682 extern void lower_to_irq14(void);
683 extern void bfin_return_from_exception(void);
684 extern void init_exception_vectors(void);
685 extern void init_dma(void);
686 extern void program_IAR(void);
687 extern void evt14_softirq(void);
688 extern void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
689 extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type);
691 extern void finish_atomic_sections (struct pt_regs *regs);
692 extern char fixed_code_start;
693 extern char fixed_code_end;
694 extern int atomic_xchg32(void);
695 extern int atomic_cas32(void);
696 extern int atomic_add32(void);
697 extern int atomic_sub32(void);
698 extern int atomic_ior32(void);
699 extern int atomic_and32(void);
700 extern int atomic_xor32(void);
701 extern void safe_user_instruction(void);
702 extern void sigreturn_stub(void);
704 extern void *l1_data_A_sram_alloc(size_t);
705 extern void *l1_data_B_sram_alloc(size_t);
706 extern void *l1_inst_sram_alloc(size_t);
707 extern void *l1_data_sram_alloc(size_t);
708 extern void *l1_data_sram_zalloc(size_t);
709 extern int l1_data_A_sram_free(const void*);
710 extern int l1_data_B_sram_free(const void*);
711 extern int l1_inst_sram_free(const void*);
712 extern int l1_data_sram_free(const void*);
713 extern int sram_free(const void*);
719 extern void *sram_alloc_with_lsl(size_t, unsigned long);
720 extern int sram_free_with_lsl(const void*);
722 extern void led_on(int);
723 extern void led_off(int);
724 extern void led_toggle(int);
725 extern void led_disp_num(int);
726 extern void led_toggle_num(int);
727 extern void init_leds(void);
729 extern const char bfin_board_name[];
730 extern unsigned long wall_jiffies;
731 extern unsigned long ipdt_table[];
732 extern unsigned long dpdt_table[];
733 extern unsigned long icplb_table[];
734 extern unsigned long dcplb_table[];
736 extern unsigned long ipdt_swapcount_table[];
737 extern unsigned long dpdt_swapcount_table[];
739 extern unsigned long table_start, table_end;
741 extern u16 _bfin_swrst;
742 extern struct file_operations dpmc_fops;
744 extern unsigned long _ramstart, _ramend, _rambase;
745 extern unsigned long memory_start, memory_end, physical_mem_end;
746 extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
747 _ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _ebss_b_l1[];
748 # 91 "include/asm/blackfin.h" 2
749 # 11 "include/asm/processor.h" 2
750 # 1 "include/asm/segment.h" 1
751 # 12 "include/asm/processor.h" 2
754 static inline __attribute__((always_inline)) unsigned long rdusp(void)
758 __asm__ __volatile__("%0 = usp;\n\t":"=da"(usp));
762 static inline __attribute__((always_inline)) void wrusp(unsigned long usp)
764 __asm__ __volatile__("usp = %0;\n\t"::"da"(usp));
770 extern unsigned long memory_end;
775 struct thread_struct {
778 unsigned short seqstat;
783 # 70 "include/asm/processor.h"
787 static inline __attribute__((always_inline)) void release_thread(struct task_struct *dead_task)
793 extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags);
798 static inline __attribute__((always_inline)) void exit_thread(void)
807 unsigned long get_wchan(struct task_struct *p);
808 # 107 "include/asm/processor.h"
809 static inline __attribute__((always_inline)) __attribute__((pure)) uint32_t bfin_revid(void)
812 return ({ uint32_t __v; __asm__ __volatile__( "%0 = [%1];" : "=d" (__v) : "a" (0xFFC00014) ); __v; }) >> 28;
815 static inline __attribute__((always_inline)) __attribute__((pure)) uint32_t bfin_compiled_revid(void)
823 # 132 "include/asm/processor.h"
825 # 15 "include/linux/prefetch.h" 2
826 # 1 "include/asm/cache.h" 1
827 # 16 "include/linux/prefetch.h" 2
828 # 43 "include/linux/prefetch.h"
829 static inline __attribute__((always_inline)) void prefetch(const void *x) {;}
833 static inline __attribute__((always_inline)) void prefetchw(const void *x) {;}
834 # 58 "include/linux/prefetch.h"
835 static inline __attribute__((always_inline)) void prefetch_range(void *addr, size_t len)
845 # 9 "include/linux/list.h" 2
846 # 21 "include/linux/list.h"
848 struct list_head *next, *prev;
856 static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list)
861 # 43 "include/linux/list.h"
862 static inline __attribute__((always_inline)) void __list_add(struct list_head *new,
863 struct list_head *prev,
864 struct list_head *next)
871 # 67 "include/linux/list.h"
872 static inline __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head)
874 __list_add(new, head, head->next);
876 # 84 "include/linux/list.h"
877 static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head)
879 __list_add(new, head->prev, head);
888 static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head * new,
889 struct list_head * prev, struct list_head * next)
893 __asm__ __volatile__("": : :"memory");
897 # 121 "include/linux/list.h"
898 static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head)
900 __list_add_rcu(new, head, head->next);
902 # 142 "include/linux/list.h"
903 static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new,
904 struct list_head *head)
906 __list_add_rcu(new, head->prev, head);
908 # 155 "include/linux/list.h"
909 static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next)
914 # 168 "include/linux/list.h"
915 static inline __attribute__((always_inline)) void list_del(struct list_head *entry)
917 __list_del(entry->prev, entry->next);
918 entry->next = ((void *) 0x00100100);
919 entry->prev = ((void *) 0x00200200);
921 # 202 "include/linux/list.h"
922 static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry)
924 __list_del(entry->prev, entry->next);
925 entry->prev = ((void *) 0x00200200);
927 # 215 "include/linux/list.h"
928 static inline __attribute__((always_inline)) void list_replace(struct list_head *old,
929 struct list_head *new)
931 new->next = old->next;
932 new->next->prev = new;
933 new->prev = old->prev;
934 new->prev->next = new;
937 static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old,
938 struct list_head *new)
940 list_replace(old, new);
943 # 239 "include/linux/list.h"
944 static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old,
945 struct list_head *new)
947 new->next = old->next;
948 new->prev = old->prev;
949 __asm__ __volatile__("": : :"memory");
950 new->next->prev = new;
951 new->prev->next = new;
952 old->prev = ((void *) 0x00200200);
959 static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry)
961 __list_del(entry->prev, entry->next);
962 INIT_LIST_HEAD(entry);
970 static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head)
972 __list_del(list->prev, list->next);
973 list_add(list, head);
981 static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list,
982 struct list_head *head)
984 __list_del(list->prev, list->next);
985 list_add_tail(list, head);
993 static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list,
994 const struct list_head *head)
996 return list->next == head;
1003 static inline __attribute__((always_inline)) int list_empty(const struct list_head *head)
1005 return head->next == head;
1007 # 316 "include/linux/list.h"
1008 static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head)
1010 struct list_head *next = head->next;
1011 return (next == head) && (next == head->prev);
1014 static inline __attribute__((always_inline)) void __list_splice(struct list_head *list,
1015 struct list_head *head)
1017 struct list_head *first = list->next;
1018 struct list_head *last = list->prev;
1019 struct list_head *at = head->next;
1033 static inline __attribute__((always_inline)) void list_splice(struct list_head *list, struct list_head *head)
1035 if (!list_empty(list))
1036 __list_splice(list, head);
1038 # 354 "include/linux/list.h"
1039 static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list,
1040 struct list_head *head)
1042 if (!list_empty(list)) {
1043 __list_splice(list, head);
1044 INIT_LIST_HEAD(list);
1047 # 380 "include/linux/list.h"
1048 static inline __attribute__((always_inline)) void list_splice_init_rcu(struct list_head *list,
1049 struct list_head *head,
1052 struct list_head *first = list->next;
1053 struct list_head *last = list->prev;
1054 struct list_head *at = head->next;
1056 if (list_empty(head))
1061 INIT_LIST_HEAD(list);
1062 # 402 "include/linux/list.h"
1064 # 412 "include/linux/list.h"
1066 __asm__ __volatile__("": : :"memory");
1071 # 675 "include/linux/list.h"
1073 struct hlist_node *first;
1077 struct hlist_node *next, **pprev;
1083 static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h)
1085 h->next = ((void *)0);
1086 h->pprev = ((void *)0);
1089 static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h)
1094 static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h)
1099 static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n)
1101 struct hlist_node *next = n->next;
1102 struct hlist_node **pprev = n->pprev;
1105 next->pprev = pprev;
1108 static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n)
1111 n->next = ((void *) 0x00100100);
1112 n->pprev = ((void *) 0x00200200);
1114 # 737 "include/linux/list.h"
1115 static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n)
1118 n->pprev = ((void *) 0x00200200);
1121 static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n)
1123 if (!hlist_unhashed(n)) {
1128 # 758 "include/linux/list.h"
1129 static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old,
1130 struct hlist_node *new)
1132 struct hlist_node *next = old->next;
1135 new->pprev = old->pprev;
1136 __asm__ __volatile__("": : :"memory");
1138 new->next->pprev = &new->next;
1140 old->pprev = ((void *) 0x00200200);
1143 static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
1145 struct hlist_node *first = h->first;
1148 first->pprev = &n->next;
1150 n->pprev = &h->first;
1152 # 802 "include/linux/list.h"
1153 static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n,
1154 struct hlist_head *h)
1156 struct hlist_node *first = h->first;
1158 n->pprev = &h->first;
1159 __asm__ __volatile__("": : :"memory");
1161 first->pprev = &n->next;
1166 static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n,
1167 struct hlist_node *next)
1169 n->pprev = next->pprev;
1171 next->pprev = &n->next;
1175 static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n,
1176 struct hlist_node *next)
1178 next->next = n->next;
1180 next->pprev = &n->next;
1183 next->next->pprev = &next->next;
1185 # 853 "include/linux/list.h"
1186 static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n,
1187 struct hlist_node *next)
1189 n->pprev = next->pprev;
1191 __asm__ __volatile__("": : :"memory");
1192 next->pprev = &n->next;
1195 # 881 "include/linux/list.h"
1196 static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev,
1197 struct hlist_node *n)
1199 n->next = prev->next;
1200 n->pprev = &prev->next;
1201 __asm__ __volatile__("": : :"memory");
1204 n->next->pprev = &n->next;
1206 # 23 "include/linux/wait.h" 2
1208 # 1 "include/linux/spinlock.h" 1
1209 # 49 "include/linux/spinlock.h"
1210 # 1 "include/linux/preempt.h" 1
1211 # 9 "include/linux/preempt.h"
1212 # 1 "include/linux/thread_info.h" 1
1213 # 15 "include/linux/thread_info.h"
1214 struct restart_block {
1215 long (*fn)(struct restart_block *);
1218 unsigned long arg0, arg1, arg2, arg3;
1230 extern long do_no_restart_syscall(struct restart_block *parm);
1232 # 1 "include/linux/bitops.h" 1
1233 # 9 "include/linux/bitops.h"
1234 # 1 "include/asm/bitops.h" 1
1235 # 9 "include/asm/bitops.h"
1236 # 1 "include/asm/byteorder.h" 1
1237 # 9 "include/asm/byteorder.h"
1238 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swahb32(__u32 xx)
1241 __asm__("%1 = %0 >> 8 (V);\n\t"
1242 "%0 = %0 << 8 (V);\n\t"
1244 : "+d"(xx), "=&d"(tmp));
1248 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swahw32(__u32 xx)
1251 __asm__("%0 = PACK(%1.L, %1.H);\n\t": "=d"(rv): "d"(xx));
1259 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 ___arch__swab16(__u16 xx)
1262 __asm__("%0 <<= 8;\n %0.L = %0.L + %0.H (NS);\n": "+d"(xw));
1265 # 46 "include/asm/byteorder.h"
1266 # 1 "include/linux/byteorder/little_endian.h" 1
1267 # 12 "include/linux/byteorder/little_endian.h"
1268 # 1 "include/linux/byteorder/swab.h" 1
1269 # 64 "include/linux/byteorder/swab.h"
1270 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 ___swab16(__u16 x)
1274 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___swab32(__u32 x)
1276 return x<<24 | x>>24 |
1277 (x & (__u32)0x0000ff00UL)<<8 |
1278 (x & (__u32)0x00ff0000UL)>>8;
1280 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 ___swab64(__u64 x)
1282 return x<<56 | x>>56 |
1283 (x & (__u64)0x000000000000ff00ULL)<<40 |
1284 (x & (__u64)0x0000000000ff0000ULL)<<24 |
1285 (x & (__u64)0x00000000ff000000ULL)<< 8 |
1286 (x & (__u64)0x000000ff00000000ULL)>> 8 |
1287 (x & (__u64)0x0000ff0000000000ULL)>>24 |
1288 (x & (__u64)0x00ff000000000000ULL)>>40;
1290 # 163 "include/linux/byteorder/swab.h"
1291 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 x)
1293 return ___arch__swab16(x);
1295 static __inline__ __attribute__((always_inline)) __u16 __swab16p(const __u16 *x)
1297 return ___arch__swab16(*(x));
1299 static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr)
1301 ((void)(*(addr) = ___arch__swab16(*(addr))));
1304 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 x)
1306 return ___arch__swahb32(___arch__swahw32(x));
1308 static __inline__ __attribute__((always_inline)) __u32 __swab32p(const __u32 *x)
1310 return ___arch__swahb32(___arch__swahw32(*(x)));
1312 static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr)
1314 ((void)(*(addr) = ___arch__swahb32(___arch__swahw32(*(addr)))));
1318 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 x)
1322 __u32 l = x & ((1ULL<<32)-1);
1323 return (((__u64)(__builtin_constant_p((__u32)(l)) ? ((__u32)( (((__u32)((l)) & (__u32)0x000000ffUL) << 24) | (((__u32)((l)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((l)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((l)) & (__u32)0xff000000UL) >> 24) )) : __fswab32((l)))) << 32) | ((__u64)((__builtin_constant_p((__u32)(h)) ? ((__u32)( (((__u32)((h)) & (__u32)0x000000ffUL) << 24) | (((__u32)((h)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((h)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((h)) & (__u32)0xff000000UL) >> 24) )) : __fswab32((h)))));
1328 static __inline__ __attribute__((always_inline)) __u64 __swab64p(const __u64 *x)
1330 return ___swab64(*(x));
1332 static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr)
1334 ((void)(*(addr) = ___swab64(*(addr))));
1336 # 13 "include/linux/byteorder/little_endian.h" 2
1337 # 43 "include/linux/byteorder/little_endian.h"
1338 static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p)
1342 static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p)
1346 static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p)
1350 static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p)
1354 static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p)
1358 static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p)
1362 static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p)
1364 return ( __be64)__swab64p(p);
1366 static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p)
1368 return __swab64p((__u64 *)p);
1370 static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p)
1372 return ( __be32)__swab32p(p);
1374 static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p)
1376 return __swab32p((__u32 *)p);
1378 static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p)
1380 return ( __be16)__swab16p(p);
1382 static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p)
1384 return __swab16p((__u16 *)p);
1386 # 104 "include/linux/byteorder/little_endian.h"
1387 # 1 "include/linux/byteorder/generic.h" 1
1388 # 105 "include/linux/byteorder/little_endian.h" 2
1389 # 47 "include/asm/byteorder.h" 2
1390 # 10 "include/asm/bitops.h" 2
1395 # 1 "include/asm-generic/bitops/ffs.h" 1
1396 # 12 "include/asm-generic/bitops/ffs.h"
1397 static inline __attribute__((always_inline)) int ffs(int x)
1403 if (!(x & 0xffff)) {
1425 # 15 "include/asm/bitops.h" 2
1426 # 1 "include/asm-generic/bitops/__ffs.h" 1
1427 # 12 "include/asm-generic/bitops/__ffs.h"
1428 static inline __attribute__((always_inline)) unsigned long __ffs(unsigned long word)
1438 if ((word & 0xffff) == 0) {
1442 if ((word & 0xff) == 0) {
1446 if ((word & 0xf) == 0) {
1450 if ((word & 0x3) == 0) {
1454 if ((word & 0x1) == 0)
1458 # 16 "include/asm/bitops.h" 2
1459 # 1 "include/asm-generic/bitops/sched.h" 1
1460 # 13 "include/asm-generic/bitops/sched.h"
1461 static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b)
1470 if (__builtin_expect(!!(b[0]), 0))
1472 if (__builtin_expect(!!(b[1]), 0))
1473 return __ffs(b[1]) + 32;
1474 if (__builtin_expect(!!(b[2]), 0))
1475 return __ffs(b[2]) + 64;
1477 return __ffs(b[3]) + 96;
1478 return __ffs(b[4]) + 128;
1483 # 17 "include/asm/bitops.h" 2
1484 # 1 "include/asm-generic/bitops/ffz.h" 1
1485 # 18 "include/asm/bitops.h" 2
1487 static __inline__ __attribute__((always_inline)) void set_bit(int nr, volatile unsigned long *addr)
1489 int *a = (int *)addr;
1491 unsigned long flags;
1494 mask = 1 << (nr & 0x1f);
1495 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
1497 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
1500 static __inline__ __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long *addr)
1502 int *a = (int *)addr;
1506 mask = 1 << (nr & 0x1f);
1516 static __inline__ __attribute__((always_inline)) void clear_bit(int nr, volatile unsigned long *addr)
1518 int *a = (int *)addr;
1520 unsigned long flags;
1522 mask = 1 << (nr & 0x1f);
1523 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
1525 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
1528 static __inline__ __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *addr)
1530 int *a = (int *)addr;
1534 mask = 1 << (nr & 0x1f);
1538 static __inline__ __attribute__((always_inline)) void change_bit(int nr, volatile unsigned long *addr)
1541 unsigned long *ADDR = (unsigned long *)addr;
1544 mask = 1 << (nr & 31);
1545 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
1547 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
1550 static __inline__ __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *addr)
1553 unsigned long *ADDR = (unsigned long *)addr;
1556 mask = 1 << (nr & 31);
1560 static __inline__ __attribute__((always_inline)) int test_and_set_bit(int nr, void *addr)
1563 volatile unsigned int *a = (volatile unsigned int *)addr;
1564 unsigned long flags;
1567 mask = 1 << (nr & 0x1f);
1568 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
1569 retval = (mask & *a) != 0;
1571 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
1576 static __inline__ __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long *addr)
1579 volatile unsigned int *a = (volatile unsigned int *)addr;
1582 mask = 1 << (nr & 0x1f);
1583 retval = (mask & *a) != 0;
1588 static __inline__ __attribute__((always_inline)) int test_and_clear_bit(int nr, volatile unsigned long *addr)
1591 volatile unsigned int *a = (volatile unsigned int *)addr;
1592 unsigned long flags;
1595 mask = 1 << (nr & 0x1f);
1596 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
1597 retval = (mask & *a) != 0;
1599 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
1604 static __inline__ __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *addr)
1607 volatile unsigned int *a = (volatile unsigned int *)addr;
1610 mask = 1 << (nr & 0x1f);
1611 retval = (mask & *a) != 0;
1616 static __inline__ __attribute__((always_inline)) int test_and_change_bit(int nr, volatile unsigned long *addr)
1619 volatile unsigned int *a = (volatile unsigned int *)addr;
1620 unsigned long flags;
1623 mask = 1 << (nr & 0x1f);
1624 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
1625 retval = (mask & *a) != 0;
1627 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
1631 static __inline__ __attribute__((always_inline)) int __test_and_change_bit(int nr,
1632 volatile unsigned long *addr)
1635 volatile unsigned int *a = (volatile unsigned int *)addr;
1638 mask = 1 << (nr & 0x1f);
1639 retval = (mask & *a) != 0;
1647 static __inline__ __attribute__((always_inline)) int __constant_test_bit(int nr, const void *addr)
1649 return ((1UL << (nr & 31)) &
1650 (((const volatile unsigned int *)addr)[nr >> 5])) != 0;
1653 static __inline__ __attribute__((always_inline)) int __test_bit(int nr, const void *addr)
1655 int *a = (int *)addr;
1659 mask = 1 << (nr & 0x1f);
1660 return ((mask & *a) != 0);
1668 # 1 "include/asm-generic/bitops/find.h" 1
1672 extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
1673 size, unsigned long offset);
1675 extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
1676 long size, unsigned long offset);
1677 # 201 "include/asm/bitops.h" 2
1678 # 1 "include/asm-generic/bitops/hweight.h" 1
1684 extern unsigned int hweight32(unsigned int w);
1685 extern unsigned int hweight16(unsigned int w);
1686 extern unsigned int hweight8(unsigned int w);
1687 extern unsigned long hweight64(__u64 w);
1688 # 202 "include/asm/bitops.h" 2
1690 # 1 "include/asm-generic/bitops/ext2-atomic.h" 1
1691 # 204 "include/asm/bitops.h" 2
1692 # 1 "include/asm-generic/bitops/ext2-non-atomic.h" 1
1696 # 1 "include/asm-generic/bitops/le.h" 1
1697 # 5 "include/asm-generic/bitops/ext2-non-atomic.h" 2
1698 # 205 "include/asm/bitops.h" 2
1700 # 1 "include/asm-generic/bitops/minix.h" 1
1701 # 207 "include/asm/bitops.h" 2
1705 # 1 "include/asm-generic/bitops/fls.h" 1
1706 # 12 "include/asm-generic/bitops/fls.h"
1707 static inline __attribute__((always_inline)) int fls(int x)
1713 if (!(x & 0xffff0000u)) {
1717 if (!(x & 0xff000000u)) {
1721 if (!(x & 0xf0000000u)) {
1725 if (!(x & 0xc0000000u)) {
1729 if (!(x & 0x80000000u)) {
1735 # 211 "include/asm/bitops.h" 2
1736 # 1 "include/asm-generic/bitops/fls64.h" 1
1742 static inline __attribute__((always_inline)) int fls64(__u64 x)
1749 # 212 "include/asm/bitops.h" 2
1750 # 10 "include/linux/bitops.h" 2
1752 static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count)
1760 static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count)
1764 order = fls(count) - 1;
1765 if (count & (count - 1))
1770 static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
1772 return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
1780 static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift)
1782 return (word << shift) | (word >> (32 - shift));
1790 static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift)
1792 return (word >> shift) | (word << (32 - shift));
1795 static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l)
1801 # 34 "include/linux/thread_info.h" 2
1802 # 1 "include/asm/thread_info.h" 1
1803 # 30 "include/asm/thread_info.h"
1804 # 1 "include/asm/page.h" 1
1805 # 16 "include/asm/page.h"
1806 # 1 "include/asm/setup.h" 1
1807 # 17 "include/asm/page.h" 2
1808 # 32 "include/asm/page.h"
1813 unsigned long pmd[16];
1819 unsigned long pgprot;
1821 # 58 "include/asm/page.h"
1822 extern unsigned long memory_start;
1823 extern unsigned long memory_end;
1827 # 1 "include/asm/page_offset.h" 1
1828 # 64 "include/asm/page.h" 2
1829 # 1 "include/asm/io.h" 1
1830 # 23 "include/asm/io.h"
1831 static inline __attribute__((always_inline)) unsigned char readb(const volatile void *addr)
1836 __asm__ __volatile__ ("cli %1;\n\t"
1837 "NOP; NOP; SSYNC;\n\t"
1838 "%0 = b [%2] (z);\n\t"
1840 : "=d"(val), "=d"(tmp): "a"(addr)
1843 return (unsigned char) val;
1846 static inline __attribute__((always_inline)) unsigned short readw(const volatile void *addr)
1851 __asm__ __volatile__ ("cli %1;\n\t"
1852 "NOP; NOP; SSYNC;\n\t"
1853 "%0 = w [%2] (z);\n\t"
1855 : "=d"(val), "=d"(tmp): "a"(addr)
1858 return (unsigned short) val;
1861 static inline __attribute__((always_inline)) unsigned int readl(const volatile void *addr)
1866 __asm__ __volatile__ ("cli %1;\n\t"
1867 "NOP; NOP; SSYNC;\n\t"
1870 : "=d"(val), "=d"(tmp): "a"(addr)
1874 # 118 "include/asm/io.h"
1875 extern void outsb(unsigned long port, const void *addr, unsigned long count);
1876 extern void outsw(unsigned long port, const void *addr, unsigned long count);
1877 extern void outsl(unsigned long port, const void *addr, unsigned long count);
1879 extern void insb(unsigned long port, void *addr, unsigned long count);
1880 extern void insw(unsigned long port, void *addr, unsigned long count);
1881 extern void insl(unsigned long port, void *addr, unsigned long count);
1882 extern void insl_16(unsigned long port, void *addr, unsigned long count);
1884 extern void dma_outsb(unsigned long port, const void *addr, unsigned short count);
1885 extern void dma_outsw(unsigned long port, const void *addr, unsigned short count);
1886 extern void dma_outsl(unsigned long port, const void *addr, unsigned short count);
1888 extern void dma_insb(unsigned long port, void *addr, unsigned short count);
1889 extern void dma_insw(unsigned long port, void *addr, unsigned short count);
1890 extern void dma_insl(unsigned long port, void *addr, unsigned short count);
1895 static inline __attribute__((always_inline)) void *__ioremap(unsigned long physaddr, unsigned long size,
1898 return (void *)physaddr;
1904 static inline __attribute__((always_inline)) void iounmap(void *addr)
1913 static inline __attribute__((always_inline)) void __iounmap(void *addr, unsigned long size)
1922 static inline __attribute__((always_inline)) void kernel_set_cachemode(void *addr, unsigned long size,
1927 static inline __attribute__((always_inline)) void *ioremap(unsigned long physaddr, unsigned long size)
1929 return __ioremap(physaddr, size, 1);
1931 static inline __attribute__((always_inline)) void *ioremap_nocache(unsigned long physaddr,
1934 return __ioremap(physaddr, size, 1);
1937 extern void blkfin_inv_cache_all(void);
1938 # 65 "include/asm/page.h" 2
1939 # 88 "include/asm/page.h"
1940 # 1 "include/asm-generic/page.h" 1
1941 # 10 "include/asm-generic/page.h"
1942 static __inline__ __attribute__((always_inline)) __attribute__((__const__)) int get_order(unsigned long size)
1946 size = (size - 1) >> (12 - 1);
1954 # 89 "include/asm/page.h" 2
1955 # 31 "include/asm/thread_info.h" 2
1956 # 1 "include/asm/entry.h" 1
1957 # 32 "include/asm/thread_info.h" 2
1958 # 1 "include/asm/l1layout.h" 1
1959 # 16 "include/asm/l1layout.h"
1960 struct l1_scratch_task_info
1969 # 33 "include/asm/thread_info.h" 2
1970 # 49 "include/asm/thread_info.h"
1971 typedef unsigned long mm_segment_t;
1978 struct thread_info {
1979 struct task_struct *task;
1980 struct exec_domain *exec_domain;
1981 unsigned long flags;
1984 mm_segment_t addr_limit;
1985 struct restart_block restart_block;
1986 struct l1_scratch_task_info l1_task_info;
1988 # 86 "include/asm/thread_info.h"
1989 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
1990 __attribute__ ((__const__));
1995 static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void)
1997 struct thread_info *ti;
1998 __asm__("%0 = sp;": "=&d"(ti):
2000 return (struct thread_info *)((long)ti & ~((long)8192 -1));
2002 # 35 "include/linux/thread_info.h" 2
2003 # 43 "include/linux/thread_info.h"
2004 static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag)
2006 set_bit(flag,&ti->flags);
2009 static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag)
2011 clear_bit(flag,&ti->flags);
2014 static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
2016 return test_and_set_bit(flag,&ti->flags);
2019 static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
2021 return test_and_clear_bit(flag,&ti->flags);
2024 static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag)
2026 return (__builtin_constant_p(flag) ? __constant_test_bit((flag),(&ti->flags)) : __test_bit((flag),(&ti->flags)));
2028 # 10 "include/linux/preempt.h" 2
2029 # 50 "include/linux/spinlock.h" 2
2033 # 1 "include/linux/kernel.h" 1
2034 # 10 "include/linux/kernel.h"
2035 # 1 "/usr/local/src/blackfin/toolchains/20071218/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/include/stdarg.h" 1 3 4
2036 # 43 "/usr/local/src/blackfin/toolchains/20071218/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/include/stdarg.h" 3 4
2037 typedef __builtin_va_list __gnuc_va_list;
2038 # 105 "/usr/local/src/blackfin/toolchains/20071218/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/include/stdarg.h" 3 4
2039 typedef __gnuc_va_list va_list;
2040 # 11 "include/linux/kernel.h" 2
2046 # 1 "include/linux/log2.h" 1
2047 # 21 "include/linux/log2.h"
2048 extern __attribute__((const, noreturn))
2049 int ____ilog2_NaN(void);
2050 # 31 "include/linux/log2.h"
2051 static inline __attribute__((always_inline)) __attribute__((const))
2052 int __ilog2_u32(u32 n)
2059 static inline __attribute__((always_inline)) __attribute__((const))
2060 int __ilog2_u64(u64 n)
2062 return fls64(n) - 1;
2071 static inline __attribute__((always_inline)) __attribute__((const))
2072 bool is_power_of_2(unsigned long n)
2074 return (n != 0 && ((n & (n - 1)) == 0));
2080 static inline __attribute__((always_inline)) __attribute__((const))
2081 unsigned long __roundup_pow_of_two(unsigned long n)
2083 return 1UL << fls_long(n - 1);
2085 # 17 "include/linux/kernel.h" 2
2087 # 1 "include/asm/bug.h" 1
2090 # 1 "include/asm-generic/bug.h" 1
2091 # 4 "include/asm/bug.h" 2
2092 # 19 "include/linux/kernel.h" 2
2094 extern const char linux_banner[];
2095 extern const char linux_proc_banner[];
2096 # 63 "include/linux/kernel.h"
2097 extern int console_printk[];
2107 # 85 "include/linux/kernel.h"
2108 extern int cond_resched(void);
2109 # 106 "include/linux/kernel.h"
2110 extern struct atomic_notifier_head panic_notifier_list;
2111 extern long (*panic_blink)(long time);
2112 void panic(const char * fmt, ...)
2113 __attribute__ ((noreturn, format (printf, 1, 2)));
2114 extern void oops_enter(void);
2115 extern void oops_exit(void);
2116 extern int oops_may_print(void);
2117 void do_exit(long error_code)
2118 __attribute__((noreturn));
2119 void complete_and_exit(struct completion *, long)
2120 __attribute__((noreturn));
2121 extern unsigned long simple_strtoul(const char *,char **,unsigned int);
2122 extern long simple_strtol(const char *,char **,unsigned int);
2123 extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
2124 extern long long simple_strtoll(const char *,char **,unsigned int);
2125 extern int sprintf(char * buf, const char * fmt, ...)
2126 __attribute__ ((format (printf, 2, 3)));
2127 extern int vsprintf(char *buf, const char *, va_list)
2128 __attribute__ ((format (printf, 2, 0)));
2129 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
2130 __attribute__ ((format (printf, 3, 4)));
2131 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
2132 __attribute__ ((format (printf, 3, 0)));
2133 extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
2134 __attribute__ ((format (printf, 3, 4)));
2135 extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
2136 __attribute__ ((format (printf, 3, 0)));
2137 extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
2138 __attribute__ ((format (printf, 2, 3)));
2139 extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
2141 extern int sscanf(const char *, const char *, ...)
2142 __attribute__ ((format (scanf, 2, 3)));
2143 extern int vsscanf(const char *, const char *, va_list)
2144 __attribute__ ((format (scanf, 2, 0)));
2146 extern int get_option(char **str, int *pint);
2147 extern char *get_options(const char *str, int nints, int *ints);
2148 extern unsigned long long memparse(char *ptr, char **retptr);
2150 extern int core_kernel_text(unsigned long addr);
2151 extern int __kernel_text_address(unsigned long addr);
2152 extern int kernel_text_address(unsigned long addr);
2154 extern struct pid *session_of_pgrp(struct pid *pgrp);
2156 extern void dump_thread(struct pt_regs *regs, struct user *dump);
2159 int vprintk(const char *fmt, va_list args)
2160 __attribute__ ((format (printf, 1, 0)));
2161 int printk(const char * fmt, ...)
2162 __attribute__ ((format (printf, 1, 2)));
2163 extern int log_buf_get_len(void);
2164 extern int log_buf_read(int idx);
2165 extern int log_buf_copy(char *dest, int idx, int len);
2166 # 174 "include/linux/kernel.h"
2167 unsigned long int_sqrt(unsigned long);
2169 extern int printk_ratelimit(void);
2170 extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
2171 extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
2172 unsigned int interval_msec);
2174 static inline __attribute__((always_inline)) void console_silent(void)
2176 (console_printk[0]) = 0;
2179 static inline __attribute__((always_inline)) void console_verbose(void)
2181 if ((console_printk[0]))
2182 (console_printk[0]) = 15;
2185 extern void bust_spinlocks(int yes);
2186 extern void wake_up_klogd(void);
2187 extern int oops_in_progress;
2188 extern int panic_timeout;
2189 extern int panic_on_oops;
2190 extern int panic_on_unrecovered_nmi;
2192 extern const char *print_tainted(void);
2193 extern void add_taint(unsigned);
2196 extern enum system_states {
2202 SYSTEM_SUSPEND_DISK,
2204 # 220 "include/linux/kernel.h"
2205 extern void dump_stack(void);
2209 DUMP_PREFIX_ADDRESS,
2212 extern void hex_dump_to_buffer(const void *buf, size_t len,
2213 int rowsize, int groupsize,
2214 char *linebuf, size_t linebuflen, bool ascii);
2215 extern void print_hex_dump(const char *level, const char *prefix_str,
2216 int prefix_type, int rowsize, int groupsize,
2217 void *buf, size_t len, bool ascii);
2218 extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
2219 void *buf, size_t len);
2227 static inline __attribute__((always_inline)) int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...)
2231 # 346 "include/linux/kernel.h"
2233 extern int do_sysinfo(struct sysinfo *info);
2240 unsigned long loads[3];
2241 unsigned long totalram;
2242 unsigned long freeram;
2243 unsigned long sharedram;
2244 unsigned long bufferram;
2245 unsigned long totalswap;
2246 unsigned long freeswap;
2247 unsigned short procs;
2249 unsigned long totalhigh;
2250 unsigned long freehigh;
2251 unsigned int mem_unit;
2252 char _f[20-2*sizeof(long)-sizeof(int)];
2254 # 54 "include/linux/spinlock.h" 2
2255 # 1 "include/linux/stringify.h" 1
2256 # 55 "include/linux/spinlock.h" 2
2257 # 1 "include/linux/bottom_half.h" 1
2261 extern void local_bh_disable(void);
2262 extern void __local_bh_enable(void);
2263 extern void _local_bh_enable(void);
2264 extern void local_bh_enable(void);
2265 extern void local_bh_enable_ip(unsigned long ip);
2266 # 56 "include/linux/spinlock.h" 2
2267 # 79 "include/linux/spinlock.h"
2268 # 1 "include/linux/spinlock_types.h" 1
2269 # 12 "include/linux/spinlock_types.h"
2270 # 1 "include/linux/lockdep.h" 1
2271 # 11 "include/linux/lockdep.h"
2273 # 252 "include/linux/lockdep.h"
2274 static inline __attribute__((always_inline)) void lockdep_off(void)
2278 static inline __attribute__((always_inline)) void lockdep_on(void)
2281 # 278 "include/linux/lockdep.h"
2282 struct lock_class_key { };
2283 # 287 "include/linux/lockdep.h"
2284 static inline __attribute__((always_inline)) void early_init_irq_lock_class(void)
2294 static inline __attribute__((always_inline)) void early_boot_irqs_off(void)
2297 static inline __attribute__((always_inline)) void early_boot_irqs_on(void)
2300 static inline __attribute__((always_inline)) void print_irqtrace_events(struct task_struct *curr)
2303 # 13 "include/linux/spinlock_types.h" 2
2308 # 1 "include/linux/spinlock_types_up.h" 1
2309 # 29 "include/linux/spinlock_types_up.h"
2310 typedef struct { } raw_spinlock_t;
2322 # 18 "include/linux/spinlock_types.h" 2
2326 raw_spinlock_t raw_lock;
2327 # 32 "include/linux/spinlock_types.h"
2333 raw_rwlock_t raw_lock;
2334 # 48 "include/linux/spinlock_types.h"
2336 # 80 "include/linux/spinlock.h" 2
2338 extern int __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock);
2346 # 1 "include/linux/spinlock_up.h" 1
2347 # 90 "include/linux/spinlock.h" 2
2348 # 135 "include/linux/spinlock.h"
2349 # 1 "include/linux/spinlock_api_up.h" 1
2350 # 136 "include/linux/spinlock.h" 2
2351 # 289 "include/linux/spinlock.h"
2352 static inline __attribute__((always_inline)) void double_spin_lock(spinlock_t *l1, spinlock_t *l2,
2358 do { do { } while (0); (void)0; (void)(l1); } while (0);
2359 do { do { } while (0); (void)0; (void)(l2); } while (0);
2361 do { do { } while (0); (void)0; (void)(l2); } while (0);
2362 do { do { } while (0); (void)0; (void)(l1); } while (0);
2371 static inline __attribute__((always_inline)) void double_spin_unlock(spinlock_t *l1, spinlock_t *l2,
2372 bool l1_taken_first)
2376 if (l1_taken_first) {
2377 do { do { } while (0); (void)0; (void)(l2); } while (0);
2378 do { do { } while (0); (void)0; (void)(l1); } while (0);
2380 do { do { } while (0); (void)0; (void)(l1); } while (0);
2381 do { do { } while (0); (void)0; (void)(l2); } while (0);
2389 # 1 "include/asm/atomic.h" 1
2390 # 16 "include/asm/atomic.h"
2399 static __inline__ __attribute__((always_inline)) void atomic_add(int i, atomic_t * v)
2403 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
2405 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
2408 static __inline__ __attribute__((always_inline)) void atomic_sub(int i, atomic_t * v)
2412 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
2414 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
2418 static inline __attribute__((always_inline)) int atomic_add_return(int i, atomic_t * v)
2423 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
2425 __temp = v->counter;
2426 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
2433 static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t * v)
2438 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
2440 __temp = v->counter;
2441 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
2446 static __inline__ __attribute__((always_inline)) void atomic_inc(volatile atomic_t * v)
2450 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
2452 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
2454 # 93 "include/asm/atomic.h"
2455 static __inline__ __attribute__((always_inline)) void atomic_dec(volatile atomic_t * v)
2459 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
2461 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
2464 static __inline__ __attribute__((always_inline)) void atomic_clear_mask(unsigned int mask, atomic_t * v)
2468 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
2469 v->counter &= ~mask;
2470 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
2473 static __inline__ __attribute__((always_inline)) void atomic_set_mask(unsigned int mask, atomic_t * v)
2477 __asm__ __volatile__( "cli %0;" : "=&d" (flags) );
2479 do { if (((flags) != 0x1f)) __asm__ __volatile__( "sti %0;" : : "d" (irq_flags) ); } while (0);
2481 # 142 "include/asm/atomic.h"
2482 # 1 "include/asm-generic/atomic.h" 1
2483 # 141 "include/asm-generic/atomic.h"
2484 typedef atomic_t atomic_long_t;
2487 static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l)
2489 atomic_t *v = (atomic_t *)l;
2491 return (long)((v)->counter);
2494 static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i)
2496 atomic_t *v = (atomic_t *)l;
2498 (((v)->counter) = i);
2501 static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l)
2503 atomic_t *v = (atomic_t *)l;
2508 static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l)
2510 atomic_t *v = (atomic_t *)l;
2515 static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l)
2517 atomic_t *v = (atomic_t *)l;
2522 static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l)
2524 atomic_t *v = (atomic_t *)l;
2529 static inline __attribute__((always_inline)) int atomic_long_sub_and_test(long i, atomic_long_t *l)
2531 atomic_t *v = (atomic_t *)l;
2533 return (atomic_sub_return((i), (v)) == 0);
2536 static inline __attribute__((always_inline)) int atomic_long_dec_and_test(atomic_long_t *l)
2538 atomic_t *v = (atomic_t *)l;
2540 return (atomic_sub_return(1, (v)) == 0);
2543 static inline __attribute__((always_inline)) int atomic_long_inc_and_test(atomic_long_t *l)
2545 atomic_t *v = (atomic_t *)l;
2547 return (atomic_add_return(1,(v)) == 0);
2550 static inline __attribute__((always_inline)) int atomic_long_add_negative(long i, atomic_long_t *l)
2552 atomic_t *v = (atomic_t *)l;
2554 return (atomic_add_return((i), (v)) < 0);
2557 static inline __attribute__((always_inline)) long atomic_long_add_return(long i, atomic_long_t *l)
2559 atomic_t *v = (atomic_t *)l;
2561 return (long)atomic_add_return(i, v);
2564 static inline __attribute__((always_inline)) long atomic_long_sub_return(long i, atomic_long_t *l)
2566 atomic_t *v = (atomic_t *)l;
2568 return (long)atomic_sub_return(i, v);
2571 static inline __attribute__((always_inline)) long atomic_long_inc_return(atomic_long_t *l)
2573 atomic_t *v = (atomic_t *)l;
2575 return (long)atomic_add_return(1,(v));
2578 static inline __attribute__((always_inline)) long atomic_long_dec_return(atomic_long_t *l)
2580 atomic_t *v = (atomic_t *)l;
2582 return (long)atomic_sub_return(1,(v));
2585 static inline __attribute__((always_inline)) long atomic_long_add_unless(atomic_long_t *l, long a, long u)
2587 atomic_t *v = (atomic_t *)l;
2589 return (long)({ int c, old; c = ((v)->counter); while (c != (u) && (old = ((int)((__typeof__(*(&(((v))->counter))))__cmpxchg((&(((v))->counter)),(unsigned long)((c)), (unsigned long)((c + (a))),sizeof(*(&(((v))->counter))))))) != c) c = old; c != (u); });
2591 # 143 "include/asm/atomic.h" 2
2592 # 327 "include/linux/spinlock.h" 2
2598 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
2599 # 25 "include/linux/wait.h" 2
2601 # 1 "include/asm/current.h" 1
2602 # 13 "include/asm/current.h"
2605 static inline __attribute__((always_inline)) struct task_struct *get_current(void) __attribute__ ((__const__));
2606 static inline __attribute__((always_inline)) struct task_struct *get_current(void)
2608 return (current_thread_info()->task);
2610 # 27 "include/linux/wait.h" 2
2612 typedef struct __wait_queue wait_queue_t;
2613 typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key);
2614 int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
2616 struct __wait_queue {
2620 wait_queue_func_t func;
2621 struct list_head task_list;
2624 struct wait_bit_key {
2629 struct wait_bit_queue {
2630 struct wait_bit_key key;
2634 struct __wait_queue_head {
2636 struct list_head task_list;
2638 typedef struct __wait_queue_head wait_queue_head_t;
2641 # 80 "include/linux/wait.h"
2642 extern void init_waitqueue_head(wait_queue_head_t *q);
2643 # 91 "include/linux/wait.h"
2644 static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
2648 q->func = default_wake_function;
2651 static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q,
2652 wait_queue_func_t func)
2655 q->private = ((void *)0);
2659 static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q)
2661 return !list_empty(&q->task_list);
2663 # 120 "include/linux/wait.h"
2664 extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
2665 extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait);
2666 extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
2668 static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
2670 list_add(&new->task_list, &head->task_list);
2676 static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head,
2679 list_add_tail(&new->task_list, &head->task_list);
2682 static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head,
2685 list_del(&old->task_list);
2688 void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
2689 extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
2690 extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
2691 void __wake_up_bit(wait_queue_head_t *, void *, int);
2692 int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
2693 int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned);
2694 void wake_up_bit(void *, int);
2695 int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned);
2696 int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned);
2697 wait_queue_head_t *bit_waitqueue(void *, int);
2698 # 351 "include/linux/wait.h"
2699 static inline __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
2700 wait_queue_t * wait)
2702 wait->flags |= 0x01;
2703 __add_wait_queue_tail(q, wait);
2709 static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q,
2710 wait_queue_t * wait)
2712 __remove_wait_queue(q, wait);
2720 extern void sleep_on(wait_queue_head_t *q);
2721 extern long sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
2723 extern void interruptible_sleep_on(wait_queue_head_t *q);
2724 extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
2730 void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
2732 void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
2734 void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
2735 int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
2736 int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
2737 # 429 "include/linux/wait.h"
2738 static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit,
2739 int (*action)(void *), unsigned mode)
2741 if (!(__builtin_constant_p(bit) ? __constant_test_bit((bit),(word)) : __test_bit((bit),(word))))
2743 return out_of_line_wait_on_bit(word, bit, action, mode);
2745 # 453 "include/linux/wait.h"
2746 static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit,
2747 int (*action)(void *), unsigned mode)
2749 if (!test_and_set_bit(bit, word))
2751 return out_of_line_wait_on_bit_lock(word, bit, action, mode);
2753 # 273 "include/linux/fs.h" 2
2755 # 1 "include/linux/kdev_t.h" 1
2756 # 21 "include/linux/kdev_t.h"
2757 static inline __attribute__((always_inline)) int old_valid_dev(dev_t dev)
2759 return ((unsigned int) ((dev) >> 20)) < 256 && ((unsigned int) ((dev) & ((1U << 20) - 1))) < 256;
2762 static inline __attribute__((always_inline)) u16 old_encode_dev(dev_t dev)
2764 return (((unsigned int) ((dev) >> 20)) << 8) | ((unsigned int) ((dev) & ((1U << 20) - 1)));
2767 static inline __attribute__((always_inline)) dev_t old_decode_dev(u16 val)
2769 return ((((val >> 8) & 255) << 20) | (val & 255));
2772 static inline __attribute__((always_inline)) int new_valid_dev(dev_t dev)
2777 static inline __attribute__((always_inline)) u32 new_encode_dev(dev_t dev)
2779 unsigned major = ((unsigned int) ((dev) >> 20));
2780 unsigned minor = ((unsigned int) ((dev) & ((1U << 20) - 1)));
2781 return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
2784 static inline __attribute__((always_inline)) dev_t new_decode_dev(u32 dev)
2786 unsigned major = (dev & 0xfff00) >> 8;
2787 unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00);
2788 return (((major) << 20) | (minor));
2791 static inline __attribute__((always_inline)) int huge_valid_dev(dev_t dev)
2796 static inline __attribute__((always_inline)) u64 huge_encode_dev(dev_t dev)
2798 return new_encode_dev(dev);
2801 static inline __attribute__((always_inline)) dev_t huge_decode_dev(u64 dev)
2803 return new_decode_dev(dev);
2806 static inline __attribute__((always_inline)) int sysv_valid_dev(dev_t dev)
2808 return ((unsigned int) ((dev) >> 20)) < (1<<14) && ((unsigned int) ((dev) & ((1U << 20) - 1))) < (1<<18);
2811 static inline __attribute__((always_inline)) u32 sysv_encode_dev(dev_t dev)
2813 return ((unsigned int) ((dev) & ((1U << 20) - 1))) | (((unsigned int) ((dev) >> 20)) << 18);
2816 static inline __attribute__((always_inline)) unsigned sysv_major(u32 dev)
2818 return (dev >> 18) & 0x3fff;
2821 static inline __attribute__((always_inline)) unsigned sysv_minor(u32 dev)
2823 return dev & 0x3ffff;
2825 # 275 "include/linux/fs.h" 2
2826 # 1 "include/linux/dcache.h" 1
2827 # 9 "include/linux/dcache.h"
2828 # 1 "include/linux/cache.h" 1
2829 # 10 "include/linux/dcache.h" 2
2830 # 1 "include/linux/rcupdate.h" 1
2831 # 40 "include/linux/rcupdate.h"
2832 # 1 "include/linux/threads.h" 1
2833 # 41 "include/linux/rcupdate.h" 2
2834 # 1 "include/linux/percpu.h" 1
2839 # 1 "include/linux/slab.h" 1
2840 # 14 "include/linux/slab.h"
2841 # 1 "include/linux/gfp.h" 1
2845 # 1 "include/linux/mmzone.h" 1
2846 # 12 "include/linux/mmzone.h"
2847 # 1 "include/linux/numa.h" 1
2848 # 13 "include/linux/mmzone.h" 2
2850 # 1 "include/linux/seqlock.h" 1
2851 # 32 "include/linux/seqlock.h"
2856 # 60 "include/linux/seqlock.h"
2857 static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl)
2859 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
2861 __asm__ __volatile__("": : :"memory");
2864 static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl)
2866 __asm__ __volatile__("": : :"memory");
2868 do { do { } while (0); (void)0; (void)(&sl->lock); } while (0);
2871 static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl)
2873 int ret = (({ do { do { } while (0); (void)0; (void)(&sl->lock); } while (0); 1; }));
2877 __asm__ __volatile__("": : :"memory");
2883 static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl)
2885 unsigned ret = sl->sequence;
2886 __asm__ __volatile__("": : :"memory");
2889 # 101 "include/linux/seqlock.h"
2890 static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned iv)
2892 __asm__ __volatile__("": : :"memory");
2893 return (iv & 1) | (sl->sequence ^ iv);
2895 # 115 "include/linux/seqlock.h"
2896 typedef struct seqcount {
2904 static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s)
2906 unsigned ret = s->sequence;
2907 __asm__ __volatile__("": : :"memory");
2916 static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned iv)
2918 __asm__ __volatile__("": : :"memory");
2919 return (iv & 1) | (s->sequence ^ iv);
2927 static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s)
2930 __asm__ __volatile__("": : :"memory");
2933 static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s)
2935 __asm__ __volatile__("": : :"memory");
2938 # 15 "include/linux/mmzone.h" 2
2939 # 1 "include/linux/nodemask.h" 1
2940 # 85 "include/linux/nodemask.h"
2941 # 1 "include/linux/bitmap.h" 1
2949 # 1 "include/linux/string.h" 1
2950 # 16 "include/linux/string.h"
2951 extern char *strndup_user(const char *, long);
2956 # 1 "include/asm/string.h" 1
2957 # 9 "include/asm/string.h"
2958 extern inline __attribute__((always_inline)) char *strcpy(char *dest, const char *src)
2963 __asm__ __volatile__ (
2965 "%2 = B [%1++] (Z);"
2968 "if cc jump 1b (bp);"
2969 : "+&a" (dest), "+&a" (src), "=&d" (temp)
2977 extern inline __attribute__((always_inline)) char *strncpy(char *dest, const char *src, size_t n)
2985 __asm__ __volatile__ (
2987 "%3 = B [%1++] (Z);"
2993 "if ! cc jump 1b (bp);"
3005 : "+&a" (dest), "+&a" (src), "+&da" (n), "=&d" (temp)
3013 extern inline __attribute__((always_inline)) int strcmp(const char *cs, const char *ct)
3020 __asm__ __volatile__ (
3027 "if cc jump 1b (bp);"
3032 : "+&a" (cs), "+&a" (ct), "=&d" (__res1), "=&d" (__res2)
3040 extern inline __attribute__((always_inline)) int strncmp(const char *cs, const char *ct, size_t count)
3050 __asm__ __volatile__ (
3067 : "+&a" (cs), "+&a" (ct), "+&da" (count), "=&d" (__res1), "=&d" (__res2)
3075 extern void *memset(void *s, int c, size_t count);
3077 extern void *memcpy(void *d, const void *s, size_t count);
3079 extern int memcmp(const void *, const void *, __kernel_size_t);
3081 extern void *memchr(const void *s, int c, size_t n);
3083 extern void *memmove(void *dest, const void *src, size_t count);
3084 # 22 "include/linux/string.h" 2
3085 # 30 "include/linux/string.h"
3086 size_t strlcpy(char *, const char *, size_t);
3089 extern char * strcat(char *, const char *);
3092 extern char * strncat(char *, const char *, __kernel_size_t);
3095 extern size_t strlcat(char *, const char *, __kernel_size_t);
3096 # 48 "include/linux/string.h"
3097 extern int strnicmp(const char *, const char *, __kernel_size_t);
3100 extern int strcasecmp(const char *s1, const char *s2);
3103 extern int strncasecmp(const char *s1, const char *s2, size_t n);
3106 extern char * strchr(const char *,int);
3109 extern char * strnchr(const char *, size_t, int);
3112 extern char * strrchr(const char *,int);
3114 extern char * strstrip(char *);
3116 extern char * strstr(const char *,const char *);
3119 extern __kernel_size_t strlen(const char *);
3122 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
3125 extern char * strpbrk(const char *,const char *);
3128 extern char * strsep(char **,const char *);
3131 extern __kernel_size_t strspn(const char *,const char *);
3134 extern __kernel_size_t strcspn(const char *,const char *);
3135 # 98 "include/linux/string.h"
3136 extern void * memscan(void *,int,__kernel_size_t);
3137 # 107 "include/linux/string.h"
3138 extern char *kstrdup(const char *s, gfp_t gfp);
3139 extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
3140 # 9 "include/linux/bitmap.h" 2
3141 # 84 "include/linux/bitmap.h"
3142 extern int __bitmap_empty(const unsigned long *bitmap, int bits);
3143 extern int __bitmap_full(const unsigned long *bitmap, int bits);
3144 extern int __bitmap_equal(const unsigned long *bitmap1,
3145 const unsigned long *bitmap2, int bits);
3146 extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
3148 extern void __bitmap_shift_right(unsigned long *dst,
3149 const unsigned long *src, int shift, int bits);
3150 extern void __bitmap_shift_left(unsigned long *dst,
3151 const unsigned long *src, int shift, int bits);
3152 extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
3153 const unsigned long *bitmap2, int bits);
3154 extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
3155 const unsigned long *bitmap2, int bits);
3156 extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
3157 const unsigned long *bitmap2, int bits);
3158 extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
3159 const unsigned long *bitmap2, int bits);
3160 extern int __bitmap_intersects(const unsigned long *bitmap1,
3161 const unsigned long *bitmap2, int bits);
3162 extern int __bitmap_subset(const unsigned long *bitmap1,
3163 const unsigned long *bitmap2, int bits);
3164 extern int __bitmap_weight(const unsigned long *bitmap, int bits);
3166 extern int bitmap_scnprintf(char *buf, unsigned int len,
3167 const unsigned long *src, int nbits);
3168 extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
3169 unsigned long *dst, int nbits);
3170 extern int bitmap_parse_user(const char *ubuf, unsigned int ulen,
3171 unsigned long *dst, int nbits);
3172 extern int bitmap_scnlistprintf(char *buf, unsigned int len,
3173 const unsigned long *src, int nbits);
3174 extern int bitmap_parselist(const char *buf, unsigned long *maskp,
3176 extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
3177 const unsigned long *old, const unsigned long *new, int bits);
3178 extern int bitmap_bitremap(int oldbit,
3179 const unsigned long *old, const unsigned long *new, int bits);
3180 extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
3181 extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
3182 extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
3190 static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits)
3195 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
3196 memset(dst, 0, len);
3200 static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits)
3202 size_t nlongs = (((nbits)+32 -1)/32);
3204 int len = (nlongs - 1) * sizeof(unsigned long);
3205 memset(dst, 0xff, len);
3207 dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
3210 static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src,
3216 int len = (((nbits)+32 -1)/32) * sizeof(unsigned long);
3217 memcpy(dst, src, len);
3221 static inline __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *src1,
3222 const unsigned long *src2, int nbits)
3225 *dst = *src1 & *src2;
3227 __bitmap_and(dst, src1, src2, nbits);
3230 static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1,
3231 const unsigned long *src2, int nbits)
3234 *dst = *src1 | *src2;
3236 __bitmap_or(dst, src1, src2, nbits);
3239 static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1,
3240 const unsigned long *src2, int nbits)
3243 *dst = *src1 ^ *src2;
3245 __bitmap_xor(dst, src1, src2, nbits);
3248 static inline __attribute__((always_inline)) void bitmap_andnot(unsigned long *dst, const unsigned long *src1,
3249 const unsigned long *src2, int nbits)
3252 *dst = *src1 & ~(*src2);
3254 __bitmap_andnot(dst, src1, src2, nbits);
3257 static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src,
3261 *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
3263 __bitmap_complement(dst, src, nbits);
3266 static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1,
3267 const unsigned long *src2, int nbits)
3270 return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
3272 return __bitmap_equal(src1, src2, nbits);
3275 static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1,
3276 const unsigned long *src2, int nbits)
3279 return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0;
3281 return __bitmap_intersects(src1, src2, nbits);
3284 static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1,
3285 const unsigned long *src2, int nbits)
3288 return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
3290 return __bitmap_subset(src1, src2, nbits);
3293 static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits)
3296 return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
3298 return __bitmap_empty(src, nbits);
3301 static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits)
3304 return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
3306 return __bitmap_full(src, nbits);
3309 static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits)
3312 return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ));
3313 return __bitmap_weight(src, nbits);
3316 static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst,
3317 const unsigned long *src, int n, int nbits)
3322 __bitmap_shift_right(dst, src, n, nbits);
3325 static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst,
3326 const unsigned long *src, int n, int nbits)
3329 *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL );
3331 __bitmap_shift_left(dst, src, n, nbits);
3334 static inline __attribute__((always_inline)) int bitmap_parse(const char *buf, unsigned int buflen,
3335 unsigned long *maskp, int nmaskbits)
3337 return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
3339 # 86 "include/linux/nodemask.h" 2
3342 typedef struct { unsigned long bits[((((1 << 0))+32 -1)/32)]; } nodemask_t;
3343 extern nodemask_t _unused_nodemask_arg_;
3346 static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp)
3348 set_bit(node, dstp->bits);
3352 static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp)
3354 clear_bit(node, dstp->bits);
3358 static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits)
3360 bitmap_fill(dstp->bits, nbits);
3364 static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits)
3366 bitmap_zero(dstp->bits, nbits);
3374 static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr)
3376 return test_and_set_bit(node, addr->bits);
3381 static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
3382 const nodemask_t *src2p, int nbits)
3384 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
3389 static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
3390 const nodemask_t *src2p, int nbits)
3392 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
3397 static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
3398 const nodemask_t *src2p, int nbits)
3400 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
3405 static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
3406 const nodemask_t *src2p, int nbits)
3408 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
3413 static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp,
3414 const nodemask_t *srcp, int nbits)
3416 bitmap_complement(dstp->bits, srcp->bits, nbits);
3421 static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p,
3422 const nodemask_t *src2p, int nbits)
3424 return bitmap_equal(src1p->bits, src2p->bits, nbits);
3429 static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p,
3430 const nodemask_t *src2p, int nbits)
3432 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
3437 static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p,
3438 const nodemask_t *src2p, int nbits)
3440 return bitmap_subset(src1p->bits, src2p->bits, nbits);
3444 static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits)
3446 return bitmap_empty(srcp->bits, nbits);
3450 static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits)
3452 return bitmap_full(srcp->bits, nbits);
3456 static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits)
3458 return bitmap_weight(srcp->bits, nbits);
3463 static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp,
3464 const nodemask_t *srcp, int n, int nbits)
3466 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
3471 static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp,
3472 const nodemask_t *srcp, int n, int nbits)
3474 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
3481 static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp)
3483 return ({ int __x = ((1 << 0)); int __y = (find_next_bit((srcp->bits), ((1 << 0)), 0)); __x < __y ? __x: __y; });
3487 static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp)
3489 return ({ int __x = ((1 << 0)); int __y = (find_next_bit(srcp->bits, (1 << 0), n+1)); __x < __y ? __x: __y; });
3491 # 251 "include/linux/nodemask.h"
3492 static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp)
3494 return ({ int __x = ((1 << 0)); int __y = (find_next_zero_bit((maskp->bits), ((1 << 0)), 0)); __x < __y ? __x: __y; });
3497 # 285 "include/linux/nodemask.h"
3498 static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len,
3499 const nodemask_t *srcp, int nbits)
3501 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
3506 static inline __attribute__((always_inline)) int __nodemask_parse_user(const char *buf, int len,
3507 nodemask_t *dstp, int nbits)
3509 return bitmap_parse_user(buf, len, dstp->bits, nbits);
3514 static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len,
3515 const nodemask_t *srcp, int nbits)
3517 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
3521 static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
3523 return bitmap_parselist(buf, dstp->bits, nbits);
3528 static inline __attribute__((always_inline)) int __node_remap(int oldbit,
3529 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3531 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
3536 static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp,
3537 const nodemask_t *oldp, const nodemask_t *newp, int nbits)
3539 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
3541 # 345 "include/linux/nodemask.h"
3542 extern nodemask_t node_online_map;
3543 extern nodemask_t node_possible_map;
3544 # 16 "include/linux/mmzone.h" 2
3545 # 27 "include/linux/mmzone.h"
3547 struct list_head free_list;
3548 unsigned long nr_free;
3552 # 49 "include/linux/mmzone.h"
3553 enum zone_stat_item {
3565 NR_SLAB_RECLAIMABLE,
3566 NR_SLAB_UNRECLAIMABLE,
3571 # 75 "include/linux/mmzone.h"
3572 NR_VM_ZONE_STAT_ITEMS };
3574 struct per_cpu_pages {
3578 struct list_head list;
3581 struct per_cpu_pageset {
3582 struct per_cpu_pages pcp[2];
3599 # 122 "include/linux/mmzone.h"
3601 # 137 "include/linux/mmzone.h"
3603 # 149 "include/linux/mmzone.h"
3606 # 182 "include/linux/mmzone.h"
3609 unsigned long pages_min, pages_low, pages_high;
3610 # 193 "include/linux/mmzone.h"
3611 unsigned long lowmem_reserve[MAX_NR_ZONES];
3613 unsigned long max_pagecache_pages;
3614 # 206 "include/linux/mmzone.h"
3615 struct per_cpu_pageset pageset[1];
3625 struct free_area free_area[14];
3633 spinlock_t lru_lock;
3634 struct list_head active_list;
3635 struct list_head inactive_list;
3636 unsigned long nr_scan_active;
3637 unsigned long nr_scan_inactive;
3638 unsigned long pages_scanned;
3639 int all_unreclaimable;
3642 atomic_t reclaim_in_progress;
3645 atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
3646 # 251 "include/linux/mmzone.h"
3651 # 281 "include/linux/mmzone.h"
3652 wait_queue_head_t * wait_table;
3653 unsigned long wait_table_hash_nr_entries;
3654 unsigned long wait_table_bits;
3659 struct pglist_data *zone_pgdat;
3661 unsigned long zone_start_pfn;
3662 # 302 "include/linux/mmzone.h"
3663 unsigned long spanned_pages;
3664 unsigned long present_pages;
3671 # 387 "include/linux/mmzone.h"
3672 struct zonelist_cache;
3673 # 400 "include/linux/mmzone.h"
3675 struct zonelist_cache *zlcache_ptr;
3676 struct zone *zones[((1 << 0) * MAX_NR_ZONES) + 1];
3681 # 418 "include/linux/mmzone.h"
3682 extern struct page *mem_map;
3683 # 432 "include/linux/mmzone.h"
3684 struct bootmem_data;
3685 typedef struct pglist_data {
3686 struct zone node_zones[MAX_NR_ZONES];
3687 struct zonelist node_zonelists[MAX_NR_ZONES];
3690 struct page *node_mem_map;
3692 struct bootmem_data *bdata;
3693 # 451 "include/linux/mmzone.h"
3694 unsigned long node_start_pfn;
3695 unsigned long node_present_pages;
3696 unsigned long node_spanned_pages;
3699 wait_queue_head_t kswapd_wait;
3700 struct task_struct *kswapd;
3701 int kswapd_max_order;
3703 # 470 "include/linux/mmzone.h"
3704 # 1 "include/linux/memory_hotplug.h" 1
3708 # 1 "include/linux/mmzone.h" 1
3709 # 5 "include/linux/memory_hotplug.h" 2
3712 # 1 "include/linux/notifier.h" 1
3713 # 12 "include/linux/notifier.h"
3714 # 1 "include/linux/errno.h" 1
3718 # 1 "include/asm/errno.h" 1
3722 # 1 "include/asm-generic/errno.h" 1
3726 # 1 "include/asm-generic/errno-base.h" 1
3727 # 5 "include/asm-generic/errno.h" 2
3728 # 5 "include/asm/errno.h" 2
3729 # 5 "include/linux/errno.h" 2
3730 # 13 "include/linux/notifier.h" 2
3731 # 1 "include/linux/mutex.h" 1
3732 # 47 "include/linux/mutex.h"
3736 spinlock_t wait_lock;
3737 struct list_head wait_list;
3738 # 60 "include/linux/mutex.h"
3745 struct mutex_waiter {
3746 struct list_head list;
3747 struct task_struct *task;
3753 # 105 "include/linux/mutex.h"
3754 extern void __mutex_init(struct mutex *lock, const char *name,
3755 struct lock_class_key *key);
3763 static inline __attribute__((always_inline)) int mutex_is_locked(struct mutex *lock)
3765 return ((&lock->count)->counter) != 1;
3772 extern void mutex_lock(struct mutex *lock);
3773 extern int __attribute__((warn_unused_result)) mutex_lock_interruptible(struct mutex *lock);
3774 # 139 "include/linux/mutex.h"
3775 extern int mutex_trylock(struct mutex *lock);
3776 extern void mutex_unlock(struct mutex *lock);
3777 # 14 "include/linux/notifier.h" 2
3778 # 1 "include/linux/rwsem.h" 1
3779 # 19 "include/linux/rwsem.h"
3780 struct rw_semaphore;
3783 # 1 "include/linux/rwsem-spinlock.h" 1
3784 # 22 "include/linux/rwsem-spinlock.h"
3785 struct rwsem_waiter;
3786 # 31 "include/linux/rwsem-spinlock.h"
3787 struct rw_semaphore {
3789 spinlock_t wait_lock;
3790 struct list_head wait_list;
3795 # 53 "include/linux/rwsem-spinlock.h"
3796 extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
3797 struct lock_class_key *key);
3798 # 63 "include/linux/rwsem-spinlock.h"
3799 extern void __down_read(struct rw_semaphore *sem);
3800 extern int __down_read_trylock(struct rw_semaphore *sem);
3801 extern void __down_write(struct rw_semaphore *sem);
3802 extern void __down_write_nested(struct rw_semaphore *sem, int subclass);
3803 extern int __down_write_trylock(struct rw_semaphore *sem);
3804 extern void __up_read(struct rw_semaphore *sem);
3805 extern void __up_write(struct rw_semaphore *sem);
3806 extern void __downgrade_write(struct rw_semaphore *sem);
3808 static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem)
3810 return (sem->activity != 0);
3812 # 23 "include/linux/rwsem.h" 2
3820 extern void down_read(struct rw_semaphore *sem);
3825 extern int down_read_trylock(struct rw_semaphore *sem);
3830 extern void down_write(struct rw_semaphore *sem);
3835 extern int down_write_trylock(struct rw_semaphore *sem);
3840 extern void up_read(struct rw_semaphore *sem);
3845 extern void up_write(struct rw_semaphore *sem);
3850 extern void downgrade_write(struct rw_semaphore *sem);
3851 # 15 "include/linux/notifier.h" 2
3852 # 1 "include/linux/srcu.h" 1
3853 # 30 "include/linux/srcu.h"
3854 struct srcu_struct_array {
3858 struct srcu_struct {
3860 struct srcu_struct_array *per_cpu_ref;
3870 int init_srcu_struct(struct srcu_struct *sp);
3871 void cleanup_srcu_struct(struct srcu_struct *sp);
3872 int srcu_read_lock(struct srcu_struct *sp) ;
3873 void srcu_read_unlock(struct srcu_struct *sp, int idx) ;
3874 void synchronize_srcu(struct srcu_struct *sp);
3875 long srcu_batches_completed(struct srcu_struct *sp);
3876 # 16 "include/linux/notifier.h" 2
3877 # 50 "include/linux/notifier.h"
3878 struct notifier_block {
3879 int (*notifier_call)(struct notifier_block *, unsigned long, void *);
3880 struct notifier_block *next;
3884 struct atomic_notifier_head {
3886 struct notifier_block *head;
3889 struct blocking_notifier_head {
3890 struct rw_semaphore rwsem;
3891 struct notifier_block *head;
3894 struct raw_notifier_head {
3895 struct notifier_block *head;
3898 struct srcu_notifier_head {
3900 struct srcu_struct srcu;
3901 struct notifier_block *head;
3903 # 89 "include/linux/notifier.h"
3904 extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
3905 # 115 "include/linux/notifier.h"
3906 extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh,
3907 struct notifier_block *nb);
3908 extern int blocking_notifier_chain_register(struct blocking_notifier_head *nh,
3909 struct notifier_block *nb);
3910 extern int raw_notifier_chain_register(struct raw_notifier_head *nh,
3911 struct notifier_block *nb);
3912 extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh,
3913 struct notifier_block *nb);
3915 extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
3916 struct notifier_block *nb);
3917 extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh,
3918 struct notifier_block *nb);
3919 extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh,
3920 struct notifier_block *nb);
3921 extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh,
3922 struct notifier_block *nb);
3924 extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh,
3925 unsigned long val, void *v);
3926 extern int __atomic_notifier_call_chain(struct atomic_notifier_head *nh,
3927 unsigned long val, void *v, int nr_to_call, int *nr_calls);
3928 extern int blocking_notifier_call_chain(struct blocking_notifier_head *nh,
3929 unsigned long val, void *v);
3930 extern int __blocking_notifier_call_chain(struct blocking_notifier_head *nh,
3931 unsigned long val, void *v, int nr_to_call, int *nr_calls);
3932 extern int raw_notifier_call_chain(struct raw_notifier_head *nh,
3933 unsigned long val, void *v);
3934 extern int __raw_notifier_call_chain(struct raw_notifier_head *nh,
3935 unsigned long val, void *v, int nr_to_call, int *nr_calls);
3936 extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh,
3937 unsigned long val, void *v);
3938 extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh,
3939 unsigned long val, void *v, int nr_to_call, int *nr_calls);
3940 # 8 "include/linux/memory_hotplug.h" 2
3945 # 140 "include/linux/memory_hotplug.h"
3946 static inline __attribute__((always_inline)) void pgdat_resize_lock(struct pglist_data *p, unsigned long *f) {}
3947 static inline __attribute__((always_inline)) void pgdat_resize_unlock(struct pglist_data *p, unsigned long *f) {}
3948 static inline __attribute__((always_inline)) void pgdat_resize_init(struct pglist_data *pgdat) {}
3950 static inline __attribute__((always_inline)) unsigned zone_span_seqbegin(struct zone *zone)
3954 static inline __attribute__((always_inline)) int zone_span_seqretry(struct zone *zone, unsigned iv)
3958 static inline __attribute__((always_inline)) void zone_span_writelock(struct zone *zone) {}
3959 static inline __attribute__((always_inline)) void zone_span_writeunlock(struct zone *zone) {}
3960 static inline __attribute__((always_inline)) void zone_seqlock_init(struct zone *zone) {}
3962 static inline __attribute__((always_inline)) int mhp_notimplemented(const char *func)
3964 printk("<4>" "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
3970 static inline __attribute__((always_inline)) int __remove_pages(struct zone *zone, unsigned long start_pfn,
3971 unsigned long nr_pages)
3973 printk("<4>" "%s() called, not yet supported\n", (__func__));
3978 extern int add_memory(int nid, u64 start, u64 size);
3979 extern int arch_add_memory(int nid, u64 start, u64 size);
3980 extern int remove_memory(u64 start, u64 size);
3981 extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
3983 # 471 "include/linux/mmzone.h" 2
3985 void get_zone_counts(unsigned long *active, unsigned long *inactive,
3986 unsigned long *free);
3987 void build_all_zonelists(void);
3988 void wakeup_kswapd(struct zone *zone, int order);
3989 int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
3990 int classzone_idx, int alloc_flags);
3991 enum memmap_context {
3995 extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
3997 enum memmap_context context);
4002 static inline __attribute__((always_inline)) void memory_present(int nid, unsigned long start, unsigned long end) {}
4003 # 501 "include/linux/mmzone.h"
4004 static inline __attribute__((always_inline)) int populated_zone(struct zone *zone)
4006 return (!!zone->present_pages);
4009 static inline __attribute__((always_inline)) int is_highmem_idx(enum zone_type idx)
4018 static inline __attribute__((always_inline)) int is_normal_idx(enum zone_type idx)
4020 return (idx == ZONE_NORMAL);
4029 static inline __attribute__((always_inline)) int is_highmem(struct zone *zone)
4038 static inline __attribute__((always_inline)) int is_normal(struct zone *zone)
4040 return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL;
4043 static inline __attribute__((always_inline)) int is_dma32(struct zone *zone)
4052 static inline __attribute__((always_inline)) int is_dma(struct zone *zone)
4055 return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
4064 int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *,
4065 void *, size_t *, loff_t *);
4066 extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];
4067 int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,
4068 void *, size_t *, loff_t *);
4069 int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *,
4070 void *, size_t *, loff_t *);
4071 int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
4072 struct file *, void *, size_t *, loff_t *);
4073 int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
4074 struct file *, void *, size_t *, loff_t *);
4075 int sysctl_pagecache_ratio_sysctl_handler(struct ctl_table *, int,
4076 struct file *, void *, size_t *, loff_t *);
4078 # 1 "include/linux/topology.h" 1
4079 # 30 "include/linux/topology.h"
4080 # 1 "include/linux/cpumask.h" 1
4081 # 88 "include/linux/cpumask.h"
4082 typedef struct { unsigned long bits[(((1)+32 -1)/32)]; } cpumask_t;
4083 extern cpumask_t _unused_cpumask_arg_;
4086 static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp)
4088 set_bit(cpu, dstp->bits);
4092 static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp)
4094 clear_bit(cpu, dstp->bits);
4098 static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits)
4100 bitmap_fill(dstp->bits, nbits);
4104 static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits)
4106 bitmap_zero(dstp->bits, nbits);
4113 static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr)
4115 return test_and_set_bit(cpu, addr->bits);
4119 static inline __attribute__((always_inline)) void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
4120 const cpumask_t *src2p, int nbits)
4122 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
4126 static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
4127 const cpumask_t *src2p, int nbits)
4129 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
4133 static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
4134 const cpumask_t *src2p, int nbits)
4136 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
4141 static inline __attribute__((always_inline)) void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
4142 const cpumask_t *src2p, int nbits)
4144 bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
4148 static inline __attribute__((always_inline)) void __cpus_complement(cpumask_t *dstp,
4149 const cpumask_t *srcp, int nbits)
4151 bitmap_complement(dstp->bits, srcp->bits, nbits);
4155 static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p,
4156 const cpumask_t *src2p, int nbits)
4158 return bitmap_equal(src1p->bits, src2p->bits, nbits);
4162 static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p,
4163 const cpumask_t *src2p, int nbits)
4165 return bitmap_intersects(src1p->bits, src2p->bits, nbits);
4169 static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p,
4170 const cpumask_t *src2p, int nbits)
4172 return bitmap_subset(src1p->bits, src2p->bits, nbits);
4176 static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits)
4178 return bitmap_empty(srcp->bits, nbits);
4182 static inline __attribute__((always_inline)) int __cpus_full(const cpumask_t *srcp, int nbits)
4184 return bitmap_full(srcp->bits, nbits);
4188 static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits)
4190 return bitmap_weight(srcp->bits, nbits);
4195 static inline __attribute__((always_inline)) void __cpus_shift_right(cpumask_t *dstp,
4196 const cpumask_t *srcp, int n, int nbits)
4198 bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
4203 static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp,
4204 const cpumask_t *srcp, int n, int nbits)
4206 bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
4208 # 270 "include/linux/cpumask.h"
4209 static inline __attribute__((always_inline)) int __cpumask_scnprintf(char *buf, int len,
4210 const cpumask_t *srcp, int nbits)
4212 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
4217 static inline __attribute__((always_inline)) int __cpumask_parse_user(const char *buf, int len,
4218 cpumask_t *dstp, int nbits)
4220 return bitmap_parse_user(buf, len, dstp->bits, nbits);
4225 static inline __attribute__((always_inline)) int __cpulist_scnprintf(char *buf, int len,
4226 const cpumask_t *srcp, int nbits)
4228 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
4232 static inline __attribute__((always_inline)) int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
4234 return bitmap_parselist(buf, dstp->bits, nbits);
4239 static inline __attribute__((always_inline)) int __cpu_remap(int oldbit,
4240 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
4242 return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
4247 static inline __attribute__((always_inline)) void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp,
4248 const cpumask_t *oldp, const cpumask_t *newp, int nbits)
4250 bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
4252 # 380 "include/linux/cpumask.h"
4253 extern cpumask_t cpu_possible_map;
4254 extern cpumask_t cpu_online_map;
4255 extern cpumask_t cpu_present_map;
4256 # 31 "include/linux/topology.h" 2
4259 # 1 "include/linux/smp.h" 1
4260 # 11 "include/linux/smp.h"
4261 extern void cpu_idle(void);
4262 # 87 "include/linux/smp.h"
4263 static inline __attribute__((always_inline)) int up_smp_call_function(void)
4267 # 99 "include/linux/smp.h"
4268 static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) { }
4271 static inline __attribute__((always_inline)) int smp_call_function_single(int cpuid, void (*func) (void *info),
4272 void *info, int retry, int wait)
4276 # 136 "include/linux/smp.h"
4277 void smp_setup_processor_id(void);
4278 # 34 "include/linux/topology.h" 2
4279 # 1 "include/asm/topology.h" 1
4283 # 1 "include/asm-generic/topology.h" 1
4284 # 5 "include/asm/topology.h" 2
4285 # 35 "include/linux/topology.h" 2
4286 # 576 "include/linux/mmzone.h" 2
4294 extern struct pglist_data contig_page_data;
4295 # 594 "include/linux/mmzone.h"
4296 extern struct pglist_data *first_online_pgdat(void);
4297 extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
4298 extern struct zone *next_zone(struct zone *zone);
4299 # 793 "include/linux/mmzone.h"
4300 void memory_present(int nid, unsigned long start, unsigned long end);
4301 unsigned long __attribute__ ((__section__ (".init.text"))) node_memmap_size_bytes(int, unsigned long, unsigned long);
4302 # 5 "include/linux/gfp.h" 2
4306 struct vm_area_struct;
4307 # 86 "include/linux/gfp.h"
4308 static inline __attribute__((always_inline)) enum zone_type gfp_zone(gfp_t flags)
4311 if (flags & (( gfp_t)0x01u))
4313 # 100 "include/linux/gfp.h"
4316 # 119 "include/linux/gfp.h"
4317 static inline __attribute__((always_inline)) void arch_free_page(struct page *page, int order) { }
4320 static inline __attribute__((always_inline)) void arch_alloc_page(struct page *page, int order) { }
4323 extern struct page *
4324 __alloc_pages(gfp_t, unsigned int, struct zonelist *);
4326 static inline __attribute__((always_inline)) struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
4329 if (__builtin_expect(!!(order >= 14), 0))
4336 return __alloc_pages(gfp_mask, order,
4337 (&contig_page_data)->node_zonelists + gfp_zone(gfp_mask));
4339 # 162 "include/linux/gfp.h"
4340 extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
4341 extern unsigned long get_zeroed_page(gfp_t gfp_mask);
4349 extern void __free_pages(struct page *page, unsigned int order);
4350 extern void free_pages(unsigned long addr, unsigned int order);
4351 extern void free_hot_page(struct page *page);
4352 extern void free_cold_page(struct page *page);
4357 void page_alloc_init(void);
4358 void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
4359 # 15 "include/linux/slab.h" 2
4362 typedef struct kmem_cache kmem_cache_t __attribute__((deprecated));
4363 # 38 "include/linux/slab.h"
4364 void __attribute__ ((__section__ (".init.text"))) kmem_cache_init(void);
4365 int slab_is_available(void);
4367 struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
4369 void (*)(void *, struct kmem_cache *, unsigned long),
4370 void (*)(void *, struct kmem_cache *, unsigned long));
4371 void kmem_cache_destroy(struct kmem_cache *);
4372 int kmem_cache_shrink(struct kmem_cache *);
4373 void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
4374 void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
4375 void kmem_cache_free(struct kmem_cache *, void *);
4376 unsigned int kmem_cache_size(struct kmem_cache *);
4377 const char *kmem_cache_name(struct kmem_cache *);
4378 int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
4379 # 69 "include/linux/slab.h"
4380 static inline __attribute__((always_inline)) void *kmem_cache_alloc_node(struct kmem_cache *cachep,
4381 gfp_t flags, int node)
4383 return kmem_cache_alloc(cachep, flags);
4385 # 94 "include/linux/slab.h"
4386 void *__kmalloc(size_t, gfp_t);
4387 void *__kzalloc(size_t, gfp_t);
4388 void * __attribute__((warn_unused_result)) krealloc(const void *, size_t, gfp_t);
4389 void kfree(const void *);
4390 size_t ksize(const void *);
4398 static inline __attribute__((always_inline)) void *kcalloc(size_t n, size_t size, gfp_t flags)
4400 if (n != 0 && size > (~0UL) / n)
4402 return __kzalloc(n * size, flags);
4404 # 123 "include/linux/slab.h"
4405 # 1 "include/linux/slab_def.h" 1
4406 # 19 "include/linux/slab_def.h"
4407 struct cache_sizes {
4409 struct kmem_cache *cs_cachep;
4411 struct kmem_cache *cs_dmacachep;
4414 extern struct cache_sizes malloc_sizes[];
4416 static inline __attribute__((always_inline)) void *kmalloc(size_t size, gfp_t flags)
4418 if (__builtin_constant_p(size)) {
4425 # 1 "include/linux/kmalloc_sizes.h" 1
4427 if (size <= 32) goto found; else i++;
4429 if (size <= 64) goto found; else i++;
4431 if (size <= 96) goto found; else i++;
4433 if (size <= 128) goto found; else i++;
4435 if (size <= 192) goto found; else i++;
4437 if (size <= 256) goto found; else i++;
4438 if (size <= 512) goto found; else i++;
4439 if (size <= 1024) goto found; else i++;
4440 if (size <= 2048) goto found; else i++;
4441 if (size <= 4096) goto found; else i++;
4442 if (size <= 8192) goto found; else i++;
4443 if (size <= 16384) goto found; else i++;
4444 if (size <= 32768) goto found; else i++;
4445 if (size <= 65536) goto found; else i++;
4446 if (size <= 131072) goto found; else i++;
4448 if (size <= 262144) goto found; else i++;
4451 if (size <= 524288) goto found; else i++;
4454 if (size <= 1048576) goto found; else i++;
4457 if (size <= 2097152) goto found; else i++;
4460 if (size <= 4194304) goto found; else i++;
4463 if (size <= 8388608) goto found; else i++;
4466 if (size <= 16777216) goto found; else i++;
4469 if (size <= 33554432) goto found; else i++;
4470 # 38 "include/linux/slab_def.h" 2
4473 extern void __you_cannot_kmalloc_that_much(void);
4474 __you_cannot_kmalloc_that_much();
4478 if (flags & (( gfp_t)0x01u))
4479 return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep,
4482 return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags);
4484 return __kmalloc(size, flags);
4487 static inline __attribute__((always_inline)) void *kzalloc(size_t size, gfp_t flags)
4489 if (__builtin_constant_p(size)) {
4496 # 1 "include/linux/kmalloc_sizes.h" 1
4498 if (size <= 32) goto found; else i++;
4500 if (size <= 64) goto found; else i++;
4502 if (size <= 96) goto found; else i++;
4504 if (size <= 128) goto found; else i++;
4506 if (size <= 192) goto found; else i++;
4508 if (size <= 256) goto found; else i++;
4509 if (size <= 512) goto found; else i++;
4510 if (size <= 1024) goto found; else i++;
4511 if (size <= 2048) goto found; else i++;
4512 if (size <= 4096) goto found; else i++;
4513 if (size <= 8192) goto found; else i++;
4514 if (size <= 16384) goto found; else i++;
4515 if (size <= 32768) goto found; else i++;
4516 if (size <= 65536) goto found; else i++;
4517 if (size <= 131072) goto found; else i++;
4519 if (size <= 262144) goto found; else i++;
4522 if (size <= 524288) goto found; else i++;
4525 if (size <= 1048576) goto found; else i++;
4528 if (size <= 2097152) goto found; else i++;
4531 if (size <= 4194304) goto found; else i++;
4534 if (size <= 8388608) goto found; else i++;
4537 if (size <= 16777216) goto found; else i++;
4540 if (size <= 33554432) goto found; else i++;
4541 # 64 "include/linux/slab_def.h" 2
4544 extern void __you_cannot_kzalloc_that_much(void);
4545 __you_cannot_kzalloc_that_much();
4549 if (flags & (( gfp_t)0x01u))
4550 return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep,
4553 return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags);
4555 return __kzalloc(size, flags);
4557 # 112 "include/linux/slab_def.h"
4558 extern const struct seq_operations slabinfo_op;
4559 ssize_t slabinfo_write(struct file *, const char *, size_t, loff_t *);
4560 # 124 "include/linux/slab.h" 2
4561 # 194 "include/linux/slab.h"
4562 static inline __attribute__((always_inline)) void *kmalloc_node(size_t size, gfp_t flags, int node)
4564 return kmalloc(size, flags);
4567 static inline __attribute__((always_inline)) void *__kmalloc_node(size_t size, gfp_t flags, int node)
4569 return __kmalloc(size, flags);
4571 # 6 "include/linux/percpu.h" 2
4576 # 1 "include/asm/percpu.h" 1
4580 # 1 "include/asm-generic/percpu.h" 1
4581 # 5 "include/asm/percpu.h" 2
4582 # 11 "include/linux/percpu.h" 2
4583 # 64 "include/linux/percpu.h"
4584 static inline __attribute__((always_inline)) void percpu_depopulate(void *__pdata, int cpu)
4588 static inline __attribute__((always_inline)) void __percpu_depopulate_mask(void *__pdata, cpumask_t *mask)
4592 static inline __attribute__((always_inline)) void *percpu_populate(void *__pdata, size_t size, gfp_t gfp,
4595 return ({ (void)(cpu); (__pdata); });
4598 static inline __attribute__((always_inline)) int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp,
4604 static inline __attribute__((always_inline)) __attribute__((always_inline)) void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask)
4606 return kzalloc(size, gfp);
4609 static inline __attribute__((always_inline)) void percpu_free(void *__pdata)
4613 # 42 "include/linux/rcupdate.h" 2
4614 # 50 "include/linux/rcupdate.h"
4616 struct rcu_head *next;
4617 void (*func)(struct rcu_head *head);
4619 # 64 "include/linux/rcupdate.h"
4620 struct rcu_ctrlblk {
4633 static inline __attribute__((always_inline)) int rcu_batch_before(long a, long b)
4639 static inline __attribute__((always_inline)) int rcu_batch_after(long a, long b)
4657 struct rcu_head *nxtlist;
4658 struct rcu_head **nxttail;
4660 struct rcu_head *curlist;
4661 struct rcu_head **curtail;
4662 struct rcu_head *donelist;
4663 struct rcu_head **donetail;
4666 struct rcu_head barrier;
4669 extern __typeof__(struct rcu_data) per_cpu__rcu_data;
4670 extern __typeof__(struct rcu_data) per_cpu__rcu_bh_data;
4678 static inline __attribute__((always_inline)) void rcu_qsctr_inc(int cpu)
4680 struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_data));
4681 rdp->passed_quiesc = 1;
4683 static inline __attribute__((always_inline)) void rcu_bh_qsctr_inc(int cpu)
4685 struct rcu_data *rdp = &(*((void)(cpu), &per_cpu__rcu_bh_data));
4686 rdp->passed_quiesc = 1;
4689 extern int rcu_pending(int cpu);
4690 extern int rcu_needs_cpu(int cpu);
4691 # 272 "include/linux/rcupdate.h"
4692 extern void rcu_init(void);
4693 extern void rcu_check_callbacks(int cpu, int user);
4694 extern void rcu_restart_cpu(int cpu);
4695 extern long rcu_batches_completed(void);
4696 extern long rcu_batches_completed_bh(void);
4699 extern void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head));
4701 extern void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *head));
4703 extern void synchronize_rcu(void);
4704 void synchronize_idle(void);
4705 extern void rcu_barrier(void);
4706 # 11 "include/linux/dcache.h" 2
4710 # 33 "include/linux/dcache.h"
4714 const unsigned char *name;
4717 struct dentry_stat_t {
4724 extern struct dentry_stat_t dentry_stat;
4731 static inline __attribute__((always_inline)) unsigned long
4732 partial_name_hash(unsigned long c, unsigned long prevhash)
4734 return (prevhash + (c << 4) + (c >> 4)) * 11;
4741 static inline __attribute__((always_inline)) unsigned long end_name_hash(unsigned long hash)
4743 return (unsigned int) hash;
4747 static inline __attribute__((always_inline)) unsigned int
4748 full_name_hash(const unsigned char *name, unsigned int len)
4750 unsigned long hash = 0;
4752 hash = partial_name_hash(*name++, hash);
4753 return end_name_hash(hash);
4756 struct dcookie_struct;
4762 unsigned int d_flags;
4764 struct inode *d_inode;
4770 struct hlist_node d_hash;
4771 struct dentry *d_parent;
4774 struct list_head d_lru;
4779 struct list_head d_child;
4780 struct rcu_head d_rcu;
4782 struct list_head d_subdirs;
4783 struct list_head d_alias;
4784 unsigned long d_time;
4785 struct dentry_operations *d_op;
4786 struct super_block *d_sb;
4792 unsigned char d_iname[36];
4801 enum dentry_d_lock_class
4803 DENTRY_D_LOCK_NORMAL,
4804 DENTRY_D_LOCK_NESTED
4807 struct dentry_operations {
4808 int (*d_revalidate)(struct dentry *, struct nameidata *);
4809 int (*d_hash) (struct dentry *, struct qstr *);
4810 int (*d_compare) (struct dentry *, struct qstr *, struct qstr *);
4811 int (*d_delete)(struct dentry *);
4812 void (*d_release)(struct dentry *);
4813 void (*d_iput)(struct dentry *, struct inode *);
4814 char *(*d_dname)(struct dentry *, char *, int);
4816 # 180 "include/linux/dcache.h"
4817 extern spinlock_t dcache_lock;
4818 # 198 "include/linux/dcache.h"
4819 static inline __attribute__((always_inline)) void __d_drop(struct dentry *dentry)
4821 if (!(dentry->d_flags & 0x0010)) {
4822 dentry->d_flags |= 0x0010;
4823 hlist_del_rcu(&dentry->d_hash);
4827 static inline __attribute__((always_inline)) void d_drop(struct dentry *dentry)
4829 do { do { } while (0); (void)0; (void)(&dcache_lock); } while (0);
4830 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
4832 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
4833 do { do { } while (0); (void)0; (void)(&dcache_lock); } while (0);
4836 static inline __attribute__((always_inline)) int dname_external(struct dentry *dentry)
4838 return dentry->d_name.name != dentry->d_iname;
4844 extern void d_instantiate(struct dentry *, struct inode *);
4845 extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);
4846 extern struct dentry * d_materialise_unique(struct dentry *, struct inode *);
4847 extern void d_delete(struct dentry *);
4850 extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
4851 extern struct dentry * d_alloc_anon(struct inode *);
4852 extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
4853 extern void shrink_dcache_sb(struct super_block *);
4854 extern void shrink_dcache_parent(struct dentry *);
4855 extern void shrink_dcache_for_umount(struct super_block *);
4856 extern int d_invalidate(struct dentry *);
4859 extern struct dentry * d_alloc_root(struct inode *);
4862 extern void d_genocide(struct dentry *);
4864 extern struct dentry *d_find_alias(struct inode *);
4865 extern void d_prune_aliases(struct inode *);
4868 extern int have_submounts(struct dentry *);
4873 extern void d_rehash(struct dentry *);
4874 # 263 "include/linux/dcache.h"
4875 static inline __attribute__((always_inline)) void d_add(struct dentry *entry, struct inode *inode)
4877 d_instantiate(entry, inode);
4880 # 277 "include/linux/dcache.h"
4881 static inline __attribute__((always_inline)) struct dentry *d_add_unique(struct dentry *entry, struct inode *inode)
4885 res = d_instantiate_unique(entry, inode);
4886 d_rehash(res != ((void *)0) ? res : entry);
4891 extern void d_move(struct dentry *, struct dentry *);
4894 extern struct dentry * d_lookup(struct dentry *, struct qstr *);
4895 extern struct dentry * __d_lookup(struct dentry *, struct qstr *);
4896 extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *);
4899 extern int d_validate(struct dentry *, struct dentry *);
4904 extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
4906 extern char * d_path(struct dentry *, struct vfsmount *, char *, int);
4907 # 319 "include/linux/dcache.h"
4908 static inline __attribute__((always_inline)) struct dentry *dget(struct dentry *dentry)
4911 do { if (__builtin_expect(!!((!((&dentry->d_count)->counter))!=0), 0)) do { printk("BUG: failure at %s:%d/%s()!\n", "include/linux/dcache.h", 322, (__func__)); panic("BUG!"); } while (0); } while(0);
4912 atomic_inc(&dentry->d_count);
4917 extern struct dentry * dget_locked(struct dentry *);
4918 # 337 "include/linux/dcache.h"
4919 static inline __attribute__((always_inline)) int d_unhashed(struct dentry *dentry)
4921 return (dentry->d_flags & 0x0010);
4924 static inline __attribute__((always_inline)) struct dentry *dget_parent(struct dentry *dentry)
4928 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
4929 ret = dget(dentry->d_parent);
4930 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
4934 extern void dput(struct dentry *);
4936 static inline __attribute__((always_inline)) int d_mountpoint(struct dentry *dentry)
4938 return dentry->d_mounted;
4941 extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *);
4942 extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
4943 extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
4945 extern int sysctl_vfs_cache_pressure;
4946 # 276 "include/linux/fs.h" 2
4947 # 1 "include/linux/namei.h" 1
4956 struct open_intent {
4962 enum { MAX_NESTED_LINKS = 8 };
4965 struct dentry *dentry;
4966 struct vfsmount *mnt;
4971 char *saved_names[MAX_NESTED_LINKS + 1];
4975 struct open_intent open;
4980 struct vfsmount *mnt;
4981 struct dentry *dentry;
4987 enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
4988 # 65 "include/linux/namei.h"
4989 extern int __user_walk(const char *, unsigned, struct nameidata *);
4990 extern int __user_walk_fd(int dfd, const char *, unsigned, struct nameidata *);
4995 extern int path_lookup(const char *, unsigned, struct nameidata *);
4996 extern int path_walk(const char *, struct nameidata *);
4997 extern int link_path_walk(const char *, struct nameidata *);
4998 extern void path_release(struct nameidata *);
4999 extern void path_release_on_umount(struct nameidata *);
5001 extern int __user_path_lookup_open(const char *, unsigned lookup_flags, struct nameidata *nd, int open_flags);
5002 extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags);
5003 extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
5004 int (*open)(struct inode *, struct file *));
5005 extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
5006 extern void release_open_intent(struct nameidata *);
5008 extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
5009 extern struct dentry *lookup_one_len_kern(const char *, struct dentry *, int);
5011 extern int follow_down(struct vfsmount **, struct dentry **);
5012 extern int follow_up(struct vfsmount **, struct dentry **);
5014 extern struct dentry *lock_rename(struct dentry *, struct dentry *);
5015 extern void unlock_rename(struct dentry *, struct dentry *);
5017 static inline __attribute__((always_inline)) void nd_set_link(struct nameidata *nd, char *path)
5019 nd->saved_names[nd->depth] = path;
5022 static inline __attribute__((always_inline)) char *nd_get_link(struct nameidata *nd)
5024 return nd->saved_names[nd->depth];
5026 # 277 "include/linux/fs.h" 2
5027 # 1 "include/linux/stat.h" 1
5033 # 1 "include/asm/stat.h" 1
5038 unsigned short st_dev;
5039 unsigned short __pad1;
5040 unsigned long st_ino;
5041 unsigned short st_mode;
5042 unsigned short st_nlink;
5043 unsigned short st_uid;
5044 unsigned short st_gid;
5045 unsigned short st_rdev;
5046 unsigned short __pad2;
5047 unsigned long st_size;
5048 unsigned long st_blksize;
5049 unsigned long st_blocks;
5050 unsigned long st_atime;
5051 unsigned long __unused1;
5052 unsigned long st_mtime;
5053 unsigned long __unused2;
5054 unsigned long st_ctime;
5055 unsigned long __unused3;
5056 unsigned long __unused4;
5057 unsigned long __unused5;
5064 unsigned long long st_dev;
5065 unsigned char __pad1[4];
5068 unsigned long __st_ino;
5070 unsigned int st_mode;
5071 unsigned int st_nlink;
5073 unsigned long st_uid;
5074 unsigned long st_gid;
5076 unsigned long long st_rdev;
5077 unsigned char __pad2[4];
5080 unsigned long st_blksize;
5082 long long st_blocks;
5084 unsigned long st_atime;
5085 unsigned long st_atime_nsec;
5087 unsigned long st_mtime;
5088 unsigned long st_mtime_nsec;
5090 unsigned long st_ctime;
5091 unsigned long st_ctime_nsec;
5093 unsigned long long st_ino;
5095 # 7 "include/linux/stat.h" 2
5096 # 60 "include/linux/stat.h"
5097 # 1 "include/linux/time.h" 1
5098 # 12 "include/linux/time.h"
5107 suseconds_t tv_usec;
5114 # 39 "include/linux/time.h"
5115 static inline __attribute__((always_inline)) int timespec_equal(struct timespec *a, struct timespec *b)
5117 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
5125 static inline __attribute__((always_inline)) int timespec_compare(const struct timespec *lhs, const struct timespec *rhs)
5127 if (lhs->tv_sec < rhs->tv_sec)
5129 if (lhs->tv_sec > rhs->tv_sec)
5131 return lhs->tv_nsec - rhs->tv_nsec;
5134 static inline __attribute__((always_inline)) int timeval_compare(const struct timeval *lhs, const struct timeval *rhs)
5136 if (lhs->tv_sec < rhs->tv_sec)
5138 if (lhs->tv_sec > rhs->tv_sec)
5140 return lhs->tv_usec - rhs->tv_usec;
5143 extern unsigned long mktime(const unsigned int year, const unsigned int mon,
5144 const unsigned int day, const unsigned int hour,
5145 const unsigned int min, const unsigned int sec);
5147 extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
5152 static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs,
5153 struct timespec rhs)
5155 struct timespec ts_delta;
5156 set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,
5157 lhs.tv_nsec - rhs.tv_nsec);
5167 extern struct timespec xtime;
5168 extern struct timespec wall_to_monotonic;
5169 extern seqlock_t xtime_lock __attribute__((weak));
5171 extern unsigned long read_persistent_clock(void);
5172 void timekeeping_init(void);
5174 static inline __attribute__((always_inline)) unsigned long get_seconds(void)
5176 return xtime.tv_sec;
5179 struct timespec current_kernel_time(void);
5184 extern void do_gettimeofday(struct timeval *tv);
5185 extern int do_settimeofday(struct timespec *tv);
5186 extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
5188 extern long do_utimes(int dfd, char *filename, struct timespec *times, int flags);
5190 extern int do_setitimer(int which, struct itimerval *value,
5191 struct itimerval *ovalue);
5192 extern unsigned int alarm_setitimer(unsigned int seconds);
5193 extern int do_getitimer(int which, struct itimerval *value);
5194 extern void getnstimeofday(struct timespec *tv);
5196 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
5197 extern int timekeeping_is_continuous(void);
5198 extern void update_wall_time(void);
5199 # 131 "include/linux/time.h"
5200 static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts)
5202 return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
5204 # 143 "include/linux/time.h"
5205 static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv)
5207 return ((s64) tv->tv_sec * 1000000000L) +
5208 tv->tv_usec * 1000L;
5217 extern struct timespec ns_to_timespec(const s64 nsec);
5225 extern struct timeval ns_to_timeval(const s64 nsec);
5232 static inline __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns)
5235 while(__builtin_expect(!!(ns >= 1000000000L), 0)) {
5241 # 197 "include/linux/time.h"
5243 struct timespec it_interval;
5244 struct timespec it_value;
5248 struct timeval it_interval;
5249 struct timeval it_value;
5251 # 61 "include/linux/stat.h" 2
5262 struct timespec atime;
5263 struct timespec mtime;
5264 struct timespec ctime;
5265 unsigned long blksize;
5266 unsigned long long blocks;
5268 # 278 "include/linux/fs.h" 2
5270 # 1 "include/linux/kobject.h" 1
5271 # 22 "include/linux/kobject.h"
5272 # 1 "include/linux/sysfs.h" 1
5273 # 18 "include/linux/sysfs.h"
5281 struct module * owner;
5285 struct attribute_group {
5287 struct attribute ** attrs;
5289 # 56 "include/linux/sysfs.h"
5290 struct vm_area_struct;
5292 struct bin_attribute {
5293 struct attribute attr;
5296 ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
5297 ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
5298 int (*mmap)(struct kobject *, struct bin_attribute *attr,
5299 struct vm_area_struct *vma);
5303 ssize_t (*show)(struct kobject *, struct attribute *,char *);
5304 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
5306 # 82 "include/linux/sysfs.h"
5307 extern int sysfs_schedule_callback(struct kobject *kobj,
5308 void (*func)(void *), void *data, struct module *owner);
5310 extern int __attribute__((warn_unused_result))
5311 sysfs_create_dir(struct kobject *, struct dentry *);
5314 sysfs_remove_dir(struct kobject *);
5316 extern int __attribute__((warn_unused_result))
5317 sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name);
5319 extern int __attribute__((warn_unused_result))
5320 sysfs_move_dir(struct kobject *, struct kobject *);
5322 extern int __attribute__((warn_unused_result))
5323 sysfs_create_file(struct kobject *, const struct attribute *);
5325 extern int __attribute__((warn_unused_result))
5326 sysfs_update_file(struct kobject *, const struct attribute *);
5328 extern int __attribute__((warn_unused_result))
5329 sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode);
5332 sysfs_remove_file(struct kobject *, const struct attribute *);
5334 extern int __attribute__((warn_unused_result))
5335 sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name);
5338 sysfs_remove_link(struct kobject *, const char * name);
5340 int __attribute__((warn_unused_result)) sysfs_create_bin_file(struct kobject *kobj,
5341 struct bin_attribute *attr);
5342 void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr);
5344 int __attribute__((warn_unused_result)) sysfs_create_group(struct kobject *,
5345 const struct attribute_group *);
5346 void sysfs_remove_group(struct kobject *, const struct attribute_group *);
5347 int sysfs_add_file_to_group(struct kobject *kobj,
5348 const struct attribute *attr, const char *group);
5349 void sysfs_remove_file_from_group(struct kobject *kobj,
5350 const struct attribute *attr, const char *group);
5352 void sysfs_notify(struct kobject * k, char *dir, char *attr);
5355 extern int sysfs_make_shadowed_dir(struct kobject *kobj,
5356 void * (*follow_link)(struct dentry *, struct nameidata *));
5357 extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj);
5358 extern void sysfs_remove_shadow_dir(struct dentry *dir);
5360 extern int __attribute__((warn_unused_result)) sysfs_init(void);
5361 # 23 "include/linux/kobject.h" 2
5364 # 1 "include/linux/kref.h" 1
5365 # 23 "include/linux/kref.h"
5370 void kref_init(struct kref *kref);
5371 void kref_get(struct kref *kref);
5372 int kref_put(struct kref *kref, void (*release) (struct kref *kref));
5373 # 26 "include/linux/kobject.h" 2
5374 # 34 "include/linux/kobject.h"
5375 extern char uevent_helper[];
5378 extern u64 uevent_seqnum;
5381 typedef int kobject_action_t;
5382 enum kobject_action {
5383 KOBJ_ADD = ( kobject_action_t) 0x01,
5384 KOBJ_REMOVE = ( kobject_action_t) 0x02,
5385 KOBJ_CHANGE = ( kobject_action_t) 0x03,
5386 KOBJ_OFFLINE = ( kobject_action_t) 0x04,
5387 KOBJ_ONLINE = ( kobject_action_t) 0x05,
5388 KOBJ_MOVE = ( kobject_action_t) 0x06,
5392 const char * k_name;
5395 struct list_head entry;
5396 struct kobject * parent;
5398 struct kobj_type * ktype;
5399 struct dentry * dentry;
5400 wait_queue_head_t poll;
5403 extern int kobject_set_name(struct kobject *, const char *, ...)
5404 __attribute__((format(printf,2,3)));
5406 static inline __attribute__((always_inline)) const char * kobject_name(const struct kobject * kobj)
5408 return kobj->k_name;
5411 extern void kobject_init(struct kobject *);
5412 extern void kobject_cleanup(struct kobject *);
5414 extern int __attribute__((warn_unused_result)) kobject_add(struct kobject *);
5415 extern int __attribute__((warn_unused_result)) kobject_shadow_add(struct kobject *, struct dentry *);
5416 extern void kobject_del(struct kobject *);
5418 extern int __attribute__((warn_unused_result)) kobject_rename(struct kobject *, const char *new_name);
5419 extern int __attribute__((warn_unused_result)) kobject_shadow_rename(struct kobject *kobj,
5420 struct dentry *new_parent,
5421 const char *new_name);
5422 extern int __attribute__((warn_unused_result)) kobject_move(struct kobject *, struct kobject *);
5424 extern int __attribute__((warn_unused_result)) kobject_register(struct kobject *);
5425 extern void kobject_unregister(struct kobject *);
5427 extern struct kobject * kobject_get(struct kobject *);
5428 extern void kobject_put(struct kobject *);
5430 extern struct kobject *kobject_kset_add_dir(struct kset *kset,
5431 struct kobject *, const char *);
5432 extern struct kobject *kobject_add_dir(struct kobject *, const char *);
5434 extern char * kobject_get_path(struct kobject *, gfp_t);
5437 void (*release)(struct kobject *);
5438 struct sysfs_ops * sysfs_ops;
5439 struct attribute ** default_attrs;
5441 # 119 "include/linux/kobject.h"
5442 struct kset_uevent_ops {
5443 int (*filter)(struct kset *kset, struct kobject *kobj);
5444 const char *(*name)(struct kset *kset, struct kobject *kobj);
5445 int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp,
5446 int num_envp, char *buffer, int buffer_size);
5450 struct kobj_type * ktype;
5451 struct list_head list;
5452 spinlock_t list_lock;
5453 struct kobject kobj;
5454 struct kset_uevent_ops * uevent_ops;
5458 extern void kset_init(struct kset * k);
5459 extern int __attribute__((warn_unused_result)) kset_add(struct kset * k);
5460 extern int __attribute__((warn_unused_result)) kset_register(struct kset * k);
5461 extern void kset_unregister(struct kset * k);
5463 static inline __attribute__((always_inline)) struct kset * to_kset(struct kobject * kobj)
5465 return kobj ? ({ const typeof( ((struct kset *)0)->kobj ) *__mptr = (kobj); (struct kset *)( (char *)__mptr - __builtin_offsetof(struct kset,kobj) );}) : ((void *)0);
5468 static inline __attribute__((always_inline)) struct kset * kset_get(struct kset * k)
5470 return k ? to_kset(kobject_get(&k->kobj)) : ((void *)0);
5473 static inline __attribute__((always_inline)) void kset_put(struct kset * k)
5475 kobject_put(&k->kobj);
5478 static inline __attribute__((always_inline)) struct kobj_type * get_ktype(struct kobject * k)
5480 if (k->kset && k->kset->ktype)
5481 return k->kset->ktype;
5486 extern struct kobject * kset_find_obj(struct kset *, const char *);
5487 # 187 "include/linux/kobject.h"
5488 extern struct kset kernel_subsys;
5490 extern struct kset hypervisor_subsys;
5491 # 236 "include/linux/kobject.h"
5492 extern void subsystem_init(struct kset *);
5493 extern int __attribute__((warn_unused_result)) subsystem_register(struct kset *);
5494 extern void subsystem_unregister(struct kset *);
5496 static inline __attribute__((always_inline)) struct kset *subsys_get(struct kset *s)
5503 static inline __attribute__((always_inline)) void subsys_put(struct kset *s)
5508 struct subsys_attribute {
5509 struct attribute attr;
5510 ssize_t (*show)(struct kset *, char *);
5511 ssize_t (*store)(struct kset *, const char *, size_t);
5514 extern int __attribute__((warn_unused_result)) subsys_create_file(struct kset *,
5515 struct subsys_attribute *);
5518 int kobject_uevent(struct kobject *kobj, enum kobject_action action);
5519 int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
5522 int add_uevent_var(char **envp, int num_envp, int *cur_index,
5523 char *buffer, int buffer_size, int *cur_len,
5524 const char *format, ...)
5525 __attribute__((format (printf, 7, 8)));
5526 # 280 "include/linux/fs.h" 2
5528 # 1 "include/linux/radix-tree.h" 1
5529 # 38 "include/linux/radix-tree.h"
5530 static inline __attribute__((always_inline)) void *radix_tree_ptr_to_direct(void *ptr)
5532 return (void *)((unsigned long)ptr | 1);
5535 static inline __attribute__((always_inline)) void *radix_tree_direct_to_ptr(void *ptr)
5537 return (void *)((unsigned long)ptr & ~1);
5540 static inline __attribute__((always_inline)) int radix_tree_is_direct_ptr(void *ptr)
5542 return (int)((unsigned long)ptr & 1);
5550 struct radix_tree_root {
5551 unsigned int height;
5553 struct radix_tree_node *rnode;
5555 # 131 "include/linux/radix-tree.h"
5556 static inline __attribute__((always_inline)) void *radix_tree_deref_slot(void **pslot)
5558 return radix_tree_direct_to_ptr(*pslot);
5560 # 143 "include/linux/radix-tree.h"
5561 static inline __attribute__((always_inline)) void radix_tree_replace_slot(void **pslot, void *item)
5563 do { if (__builtin_expect(!!((radix_tree_is_direct_ptr(item))!=0), 0)) do { printk("BUG: failure at %s:%d/%s()!\n", "include/linux/radix-tree.h", 145, (__func__)); panic("BUG!"); } while (0); } while(0);
5564 ({ __asm__ __volatile__("": : :"memory"); (*pslot) = ((void *)((unsigned long)item | ((unsigned long)*pslot & 1))); });
5569 int radix_tree_insert(struct radix_tree_root *, unsigned long, void *);
5570 void *radix_tree_lookup(struct radix_tree_root *, unsigned long);
5571 void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long);
5572 void *radix_tree_delete(struct radix_tree_root *, unsigned long);
5574 radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
5575 unsigned long first_index, unsigned int max_items);
5576 int radix_tree_preload(gfp_t gfp_mask);
5577 void radix_tree_init(void);
5578 void *radix_tree_tag_set(struct radix_tree_root *root,
5579 unsigned long index, unsigned int tag);
5580 void *radix_tree_tag_clear(struct radix_tree_root *root,
5581 unsigned long index, unsigned int tag);
5582 int radix_tree_tag_get(struct radix_tree_root *root,
5583 unsigned long index, unsigned int tag);
5585 radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results,
5586 unsigned long first_index, unsigned int max_items,
5588 int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag);
5590 static inline __attribute__((always_inline)) void radix_tree_preload_end(void)
5594 # 282 "include/linux/fs.h" 2
5595 # 1 "include/linux/prio_tree.h" 1
5596 # 14 "include/linux/prio_tree.h"
5597 struct raw_prio_tree_node {
5598 struct prio_tree_node *left;
5599 struct prio_tree_node *right;
5600 struct prio_tree_node *parent;
5603 struct prio_tree_node {
5604 struct prio_tree_node *left;
5605 struct prio_tree_node *right;
5606 struct prio_tree_node *parent;
5607 unsigned long start;
5611 struct prio_tree_root {
5612 struct prio_tree_node *prio_tree_node;
5613 unsigned short index_bits;
5621 struct prio_tree_iter {
5622 struct prio_tree_node *cur;
5624 unsigned long value;
5627 struct prio_tree_root *root;
5628 unsigned long r_index;
5629 unsigned long h_index;
5632 static inline __attribute__((always_inline)) void prio_tree_iter_init(struct prio_tree_iter *iter,
5633 struct prio_tree_root *root, unsigned long r_index, unsigned long h_index)
5636 iter->r_index = r_index;
5637 iter->h_index = h_index;
5638 iter->cur = ((void *)0);
5640 # 84 "include/linux/prio_tree.h"
5641 static inline __attribute__((always_inline)) int prio_tree_empty(const struct prio_tree_root *root)
5643 return root->prio_tree_node == ((void *)0);
5646 static inline __attribute__((always_inline)) int prio_tree_root(const struct prio_tree_node *node)
5648 return node->parent == node;
5651 static inline __attribute__((always_inline)) int prio_tree_left_empty(const struct prio_tree_node *node)
5653 return node->left == node;
5656 static inline __attribute__((always_inline)) int prio_tree_right_empty(const struct prio_tree_node *node)
5658 return node->right == node;
5662 struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
5663 struct prio_tree_node *old, struct prio_tree_node *node);
5664 struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
5665 struct prio_tree_node *node);
5666 void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node);
5667 struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter);
5668 # 283 "include/linux/fs.h" 2
5670 # 1 "include/linux/pid.h" 1
5683 # 43 "include/linux/pid.h"
5689 struct hlist_node pid_chain;
5691 struct hlist_head tasks[PIDTYPE_MAX];
5692 struct rcu_head rcu;
5695 extern struct pid init_struct_pid;
5699 struct hlist_node node;
5703 static inline __attribute__((always_inline)) struct pid *get_pid(struct pid *pid)
5706 atomic_inc(&pid->count);
5710 extern void put_pid(struct pid *pid);
5711 extern struct task_struct *pid_task(struct pid *pid, enum pid_type);
5712 extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type);
5715 extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
5721 extern int attach_pid(struct task_struct *task, enum pid_type type, struct pid *pid);
5723 extern void detach_pid(struct task_struct *task, enum pid_type);
5724 extern void transfer_pid(struct task_struct *old, struct task_struct *new, enum pid_type);
5731 extern struct pid *find_pid(int nr);
5736 extern struct pid *find_get_pid(int nr);
5737 extern struct pid *find_ge_pid(int nr);
5739 extern struct pid *alloc_pid(void);
5740 extern void free_pid(struct pid *pid);
5742 static inline __attribute__((always_inline)) pid_t pid_nr(struct pid *pid)
5749 # 285 "include/linux/fs.h" 2
5753 # 1 "include/asm/semaphore.h" 1
5754 # 21 "include/asm/semaphore.h"
5758 wait_queue_head_t wait;
5760 # 40 "include/asm/semaphore.h"
5761 static inline __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val)
5763 *sem = (struct semaphore){ .count = { (val) }, .sleepers = 0, .wait = { .lock = (spinlock_t) { .raw_lock = { }, }, .task_list = { &((*sem).wait).task_list, &((*sem).wait).task_list } } };
5766 static inline __attribute__((always_inline)) void init_MUTEX(struct semaphore *sem)
5771 static inline __attribute__((always_inline)) void init_MUTEX_LOCKED(struct semaphore *sem)
5776 void __down(struct semaphore *sem);
5777 int __down_interruptible(struct semaphore *sem);
5778 int __down_trylock(struct semaphore *sem);
5779 void __up(struct semaphore *sem);
5781 extern spinlock_t semaphore_wake_lock;
5788 static inline __attribute__((always_inline)) void down(struct semaphore *sem)
5790 do { cond_resched(); } while (0);
5791 if (atomic_sub_return(1,(&sem->count)) < 0)
5795 static inline __attribute__((always_inline)) int down_interruptible(struct semaphore *sem)
5799 do { cond_resched(); } while (0);
5800 if (atomic_sub_return(1,(&sem->count)) < 0)
5801 ret = __down_interruptible(sem);
5805 static inline __attribute__((always_inline)) int down_trylock(struct semaphore *sem)
5809 if (atomic_sub_return(1,(&sem->count)) < 0)
5810 ret = __down_trylock(sem);
5820 static inline __attribute__((always_inline)) void up(struct semaphore *sem)
5822 if (atomic_add_return(1,(&sem->count)) <= 0)
5825 # 289 "include/linux/fs.h" 2
5832 struct pipe_inode_info;
5833 struct poll_table_struct;
5835 struct vm_area_struct;
5838 extern void __attribute__ ((__section__ (".init.text"))) inode_init(unsigned long);
5839 extern void __attribute__ ((__section__ (".init.text"))) inode_init_early(void);
5840 extern void __attribute__ ((__section__ (".init.text"))) mnt_init(unsigned long);
5841 extern void __attribute__ ((__section__ (".init.text"))) files_init(unsigned long);
5844 typedef int (get_block_t)(struct inode *inode, sector_t iblock,
5845 struct buffer_head *bh_result, int create);
5846 typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
5847 ssize_t bytes, void *private);
5848 # 340 "include/linux/fs.h"
5850 unsigned int ia_valid;
5855 struct timespec ia_atime;
5856 struct timespec ia_mtime;
5857 struct timespec ia_ctime;
5864 struct file *ia_file;
5870 # 1 "include/linux/quota.h" 1
5871 # 44 "include/linux/quota.h"
5872 typedef __kernel_uid32_t qid_t;
5873 typedef __u64 qsize_t;
5874 # 103 "include/linux/quota.h"
5876 __u64 dqb_bhardlimit;
5877 __u64 dqb_bsoftlimit;
5879 __u64 dqb_ihardlimit;
5880 __u64 dqb_isoftlimit;
5881 __u64 dqb_curinodes;
5886 # 124 "include/linux/quota.h"
5899 # 1 "include/linux/dqblk_xfs.h" 1
5900 # 50 "include/linux/dqblk_xfs.h"
5901 typedef struct fs_disk_quota {
5906 __u64 d_blk_hardlimit;
5907 __u64 d_blk_softlimit;
5908 __u64 d_ino_hardlimit;
5909 __u64 d_ino_softlimit;
5918 __u64 d_rtb_hardlimit;
5919 __u64 d_rtb_softlimit;
5926 # 137 "include/linux/dqblk_xfs.h"
5927 typedef struct fs_qfilestat {
5933 typedef struct fs_quota_stat {
5937 fs_qfilestat_t qs_uquota;
5938 fs_qfilestat_t qs_gquota;
5940 __s32 qs_btimelimit;
5941 __s32 qs_itimelimit;
5942 __s32 qs_rtbtimelimit;
5943 __u16 qs_bwarnlimit;
5944 __u16 qs_iwarnlimit;
5946 # 137 "include/linux/quota.h" 2
5947 # 1 "include/linux/dqblk_v1.h" 1
5948 # 21 "include/linux/dqblk_v1.h"
5949 struct v1_mem_dqinfo {
5951 # 138 "include/linux/quota.h" 2
5952 # 1 "include/linux/dqblk_v2.h" 1
5953 # 20 "include/linux/dqblk_v2.h"
5954 struct v2_mem_dqinfo {
5955 unsigned int dqi_blocks;
5956 unsigned int dqi_free_blk;
5957 unsigned int dqi_free_entry;
5959 # 139 "include/linux/quota.h" 2
5961 extern spinlock_t dq_data_lock;
5962 # 152 "include/linux/quota.h"
5964 __u32 dqb_bhardlimit;
5965 __u32 dqb_bsoftlimit;
5966 qsize_t dqb_curspace;
5967 __u32 dqb_ihardlimit;
5968 __u32 dqb_isoftlimit;
5969 __u32 dqb_curinodes;
5977 struct quota_format_type;
5980 struct quota_format_type *dqi_format;
5981 struct list_head dqi_dirty_list;
5982 unsigned long dqi_flags;
5983 unsigned int dqi_bgrace;
5984 unsigned int dqi_igrace;
5986 struct v1_mem_dqinfo v1_i;
5987 struct v2_mem_dqinfo v2_i;
5997 extern void mark_info_dirty(struct super_block *sb, int type);
6011 int allocated_dquots;
6016 extern struct dqstats dqstats;
6017 # 214 "include/linux/quota.h"
6019 struct hlist_node dq_hash;
6020 struct list_head dq_inuse;
6021 struct list_head dq_free;
6022 struct list_head dq_dirty;
6023 struct mutex dq_lock;
6025 wait_queue_head_t dq_wait_unused;
6026 struct super_block *dq_sb;
6029 unsigned long dq_flags;
6031 struct mem_dqblk dq_dqb;
6040 struct quota_format_ops {
6041 int (*check_quota_file)(struct super_block *sb, int type);
6042 int (*read_file_info)(struct super_block *sb, int type);
6043 int (*write_file_info)(struct super_block *sb, int type);
6044 int (*free_file_info)(struct super_block *sb, int type);
6045 int (*read_dqblk)(struct dquot *dquot);
6046 int (*commit_dqblk)(struct dquot *dquot);
6047 int (*release_dqblk)(struct dquot *dquot);
6051 struct dquot_operations {
6052 int (*initialize) (struct inode *, int);
6053 int (*drop) (struct inode *);
6054 int (*alloc_space) (struct inode *, qsize_t, int);
6055 int (*alloc_inode) (const struct inode *, unsigned long);
6056 int (*free_space) (struct inode *, qsize_t);
6057 int (*free_inode) (const struct inode *, unsigned long);
6058 int (*transfer) (struct inode *, struct iattr *);
6059 int (*write_dquot) (struct dquot *);
6060 int (*acquire_dquot) (struct dquot *);
6061 int (*release_dquot) (struct dquot *);
6062 int (*mark_dirty) (struct dquot *);
6063 int (*write_info) (struct super_block *, int);
6067 struct quotactl_ops {
6068 int (*quota_on)(struct super_block *, int, int, char *);
6069 int (*quota_off)(struct super_block *, int);
6070 int (*quota_sync)(struct super_block *, int);
6071 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
6072 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
6073 int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
6074 int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
6075 int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
6076 int (*set_xstate)(struct super_block *, unsigned int, int);
6077 int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
6078 int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
6081 struct quota_format_type {
6083 struct quota_format_ops *qf_ops;
6084 struct module *qf_owner;
6085 struct quota_format_type *qf_next;
6093 struct mutex dqio_mutex;
6094 struct mutex dqonoff_mutex;
6095 struct rw_semaphore dqptr_sem;
6096 struct inode *files[2];
6097 struct mem_dqinfo info[2];
6098 struct quota_format_ops *ops[2];
6102 int mark_dquot_dirty(struct dquot *dquot);
6103 # 308 "include/linux/quota.h"
6104 int register_quota_format(struct quota_format_type *fmt);
6105 void unregister_quota_format(struct quota_format_type *fmt);
6107 struct quota_module_name {
6111 # 362 "include/linux/fs.h" 2
6112 # 389 "include/linux/fs.h"
6113 enum positive_aop_returns {
6114 AOP_WRITEPAGE_ACTIVATE = 0x80000,
6115 AOP_TRUNCATED_PAGE = 0x80001,
6122 struct address_space;
6123 struct writeback_control;
6125 struct address_space_operations {
6126 int (*writepage)(struct page *page, struct writeback_control *wbc);
6127 int (*readpage)(struct file *, struct page *);
6128 void (*sync_page)(struct page *);
6131 int (*writepages)(struct address_space *, struct writeback_control *);
6134 int (*set_page_dirty)(struct page *page);
6136 int (*readpages)(struct file *filp, struct address_space *mapping,
6137 struct list_head *pages, unsigned nr_pages);
6143 int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
6144 int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
6146 sector_t (*bmap)(struct address_space *, sector_t);
6147 void (*invalidatepage) (struct page *, unsigned long);
6148 int (*releasepage) (struct page *, gfp_t);
6149 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
6150 loff_t offset, unsigned long nr_segs);
6151 struct page* (*get_xip_page)(struct address_space *, sector_t,
6154 int (*migratepage) (struct address_space *,
6155 struct page *, struct page *);
6156 int (*launder_page) (struct page *);
6159 struct backing_dev_info;
6160 struct address_space {
6162 struct radix_tree_root page_tree;
6164 unsigned int i_mmap_writable;
6165 struct prio_tree_root i_mmap;
6166 struct list_head i_mmap_nonlinear;
6167 spinlock_t i_mmap_lock;
6168 unsigned int truncate_count;
6169 unsigned long nrpages;
6170 unsigned long writeback_index;
6171 const struct address_space_operations *a_ops;
6172 unsigned long flags;
6173 struct backing_dev_info *backing_dev_info;
6174 spinlock_t private_lock;
6175 struct list_head private_list;
6176 struct address_space *assoc_mapping;
6177 } __attribute__((aligned(sizeof(long))));
6184 struct block_device {
6186 struct inode * bd_inode;
6188 struct mutex bd_mutex;
6189 struct semaphore bd_mount_sem;
6190 struct list_head bd_inodes;
6194 struct list_head bd_holder_list;
6196 struct block_device * bd_contains;
6197 unsigned bd_block_size;
6198 struct hd_struct * bd_part;
6200 unsigned bd_part_count;
6202 struct gendisk * bd_disk;
6203 struct list_head bd_list;
6204 struct backing_dev_info *bd_inode_backing_dev_info;
6211 unsigned long bd_private;
6213 # 497 "include/linux/fs.h"
6214 int mapping_tagged(struct address_space *mapping, int tag);
6219 static inline __attribute__((always_inline)) int mapping_mapped(struct address_space *mapping)
6221 return !prio_tree_empty(&mapping->i_mmap) ||
6222 !list_empty(&mapping->i_mmap_nonlinear);
6231 static inline __attribute__((always_inline)) int mapping_writably_mapped(struct address_space *mapping)
6233 return mapping->i_mmap_writable != 0;
6235 # 530 "include/linux/fs.h"
6237 struct hlist_node i_hash;
6238 struct list_head i_list;
6239 struct list_head i_sb_list;
6240 struct list_head i_dentry;
6241 unsigned long i_ino;
6243 unsigned int i_nlink;
6247 unsigned long i_version;
6252 struct timespec i_atime;
6253 struct timespec i_mtime;
6254 struct timespec i_ctime;
6255 unsigned int i_blkbits;
6257 unsigned short i_bytes;
6260 struct mutex i_mutex;
6261 struct rw_semaphore i_alloc_sem;
6262 const struct inode_operations *i_op;
6263 const struct file_operations *i_fop;
6264 struct super_block *i_sb;
6265 struct file_lock *i_flock;
6266 struct address_space *i_mapping;
6267 struct address_space i_data;
6271 struct list_head i_devices;
6273 struct pipe_inode_info *i_pipe;
6274 struct block_device *i_bdev;
6275 struct cdev *i_cdev;
6287 struct list_head inotify_watches;
6288 struct mutex inotify_mutex;
6291 unsigned long i_state;
6292 unsigned long dirtied_when;
6294 unsigned int i_flags;
6296 atomic_t i_writecount;
6302 # 608 "include/linux/fs.h"
6303 enum inode_i_mutex_lock_class
6312 extern void inode_double_lock(struct inode *inode1, struct inode *inode2);
6313 extern void inode_double_unlock(struct inode *inode1, struct inode *inode2);
6314 # 630 "include/linux/fs.h"
6315 static inline __attribute__((always_inline)) loff_t i_size_read(const struct inode *inode)
6317 # 649 "include/linux/fs.h"
6318 return inode->i_size;
6327 static inline __attribute__((always_inline)) void i_size_write(struct inode *inode, loff_t i_size)
6329 # 669 "include/linux/fs.h"
6330 inode->i_size = i_size;
6334 static inline __attribute__((always_inline)) unsigned iminor(const struct inode *inode)
6336 return ((unsigned int) ((inode->i_rdev) & ((1U << 20) - 1)));
6339 static inline __attribute__((always_inline)) unsigned imajor(const struct inode *inode)
6341 return ((unsigned int) ((inode->i_rdev) >> 20));
6344 extern struct block_device *I_BDEV(struct inode *inode);
6346 struct fown_struct {
6349 enum pid_type pid_type;
6357 struct file_ra_state {
6358 unsigned long start;
6360 unsigned long flags;
6361 unsigned long cache_hit;
6362 unsigned long prev_index;
6363 unsigned long ahead_start;
6364 unsigned long ahead_size;
6365 unsigned long ra_pages;
6366 unsigned long mmap_hit;
6367 unsigned long mmap_miss;
6368 unsigned int prev_offset;
6379 struct list_head fu_list;
6380 struct rcu_head fu_rcuhead;
6385 const struct file_operations *f_op;
6387 unsigned int f_flags;
6390 struct fown_struct f_owner;
6391 unsigned int f_uid, f_gid;
6392 struct file_ra_state f_ra;
6394 unsigned long f_version;
6403 struct list_head f_ep_links;
6404 spinlock_t f_ep_lock;
6406 struct address_space *f_mapping;
6408 extern spinlock_t files_lock;
6409 # 779 "include/linux/fs.h"
6410 typedef struct files_struct *fl_owner_t;
6412 struct file_lock_operations {
6413 void (*fl_insert)(struct file_lock *);
6414 void (*fl_remove)(struct file_lock *);
6415 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
6416 void (*fl_release_private)(struct file_lock *);
6419 struct lock_manager_operations {
6420 int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
6421 void (*fl_notify)(struct file_lock *);
6422 int (*fl_grant)(struct file_lock *, struct file_lock *, int);
6423 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
6424 void (*fl_release_private)(struct file_lock *);
6425 void (*fl_break)(struct file_lock *);
6426 int (*fl_mylease)(struct file_lock *, struct file_lock *);
6427 int (*fl_change)(struct file_lock **, int);
6431 # 1 "include/linux/nfs_fs_i.h" 1
6437 # 1 "include/linux/nfs.h" 1
6438 # 39 "include/linux/nfs.h"
6457 NFSERR_OPNOTSUPP = 45,
6458 NFSERR_NAMETOOLONG = 63,
6459 NFSERR_NOTEMPTY = 66,
6464 NFSERR_BADHANDLE = 10001,
6465 NFSERR_NOT_SYNC = 10002,
6466 NFSERR_BAD_COOKIE = 10003,
6467 NFSERR_NOTSUPP = 10004,
6468 NFSERR_TOOSMALL = 10005,
6469 NFSERR_SERVERFAULT = 10006,
6470 NFSERR_BADTYPE = 10007,
6471 NFSERR_JUKEBOX = 10008,
6472 NFSERR_SAME = 10009,
6473 NFSERR_DENIED = 10010,
6474 NFSERR_EXPIRED = 10011,
6475 NFSERR_LOCKED = 10012,
6476 NFSERR_GRACE = 10013,
6477 NFSERR_FHEXPIRED = 10014,
6478 NFSERR_SHARE_DENIED = 10015,
6479 NFSERR_WRONGSEC = 10016,
6480 NFSERR_CLID_INUSE = 10017,
6481 NFSERR_RESOURCE = 10018,
6482 NFSERR_MOVED = 10019,
6483 NFSERR_NOFILEHANDLE = 10020,
6484 NFSERR_MINOR_VERS_MISMATCH = 10021,
6485 NFSERR_STALE_CLIENTID = 10022,
6486 NFSERR_STALE_STATEID = 10023,
6487 NFSERR_OLD_STATEID = 10024,
6488 NFSERR_BAD_STATEID = 10025,
6489 NFSERR_BAD_SEQID = 10026,
6490 NFSERR_NOT_SAME = 10027,
6491 NFSERR_LOCK_RANGE = 10028,
6492 NFSERR_SYMLINK = 10029,
6493 NFSERR_RESTOREFH = 10030,
6494 NFSERR_LEASE_MOVED = 10031,
6495 NFSERR_ATTRNOTSUPP = 10032,
6496 NFSERR_NO_GRACE = 10033,
6497 NFSERR_RECLAIM_BAD = 10034,
6498 NFSERR_RECLAIM_CONFLICT = 10035,
6499 NFSERR_BAD_XDR = 10036,
6500 NFSERR_LOCKS_HELD = 10037,
6501 NFSERR_OPENMODE = 10038,
6502 NFSERR_BADOWNER = 10039,
6503 NFSERR_BADCHAR = 10040,
6504 NFSERR_BADNAME = 10041,
6505 NFSERR_BAD_RANGE = 10042,
6506 NFSERR_LOCK_NOTSUPP = 10043,
6507 NFSERR_OP_ILLEGAL = 10044,
6508 NFSERR_DEADLOCK = 10045,
6509 NFSERR_FILE_OPEN = 10046,
6510 NFSERR_ADMIN_REVOKED = 10047,
6511 NFSERR_CB_PATH_DOWN = 10048,
6512 NFSERR_REPLAY_ME = 10049
6530 # 1 "include/linux/sunrpc/msg_prot.h" 1
6531 # 18 "include/linux/sunrpc/msg_prot.h"
6532 typedef u32 rpc_authflavor_t;
6534 enum rpc_auth_flavors {
6541 RPC_AUTH_MAXFLAVOR = 8,
6543 RPC_AUTH_GSS_KRB5 = 390003,
6544 RPC_AUTH_GSS_KRB5I = 390004,
6545 RPC_AUTH_GSS_KRB5P = 390005,
6546 RPC_AUTH_GSS_LKEY = 390006,
6547 RPC_AUTH_GSS_LKEYI = 390007,
6548 RPC_AUTH_GSS_LKEYP = 390008,
6549 RPC_AUTH_GSS_SPKM = 390009,
6550 RPC_AUTH_GSS_SPKMI = 390010,
6551 RPC_AUTH_GSS_SPKMP = 390011,
6562 enum rpc_reply_stat {
6563 RPC_MSG_ACCEPTED = 0,
6567 enum rpc_accept_stat {
6569 RPC_PROG_UNAVAIL = 1,
6570 RPC_PROG_MISMATCH = 2,
6571 RPC_PROC_UNAVAIL = 3,
6572 RPC_GARBAGE_ARGS = 4,
6575 RPC_DROP_REPLY = 60000,
6578 enum rpc_reject_stat {
6583 enum rpc_auth_stat {
6585 RPC_AUTH_BADCRED = 1,
6586 RPC_AUTH_REJECTEDCRED = 2,
6587 RPC_AUTH_BADVERF = 3,
6588 RPC_AUTH_REJECTEDVERF = 4,
6589 RPC_AUTH_TOOWEAK = 5,
6591 RPCSEC_GSS_CREDPROBLEM = 13,
6592 RPCSEC_GSS_CTXPROBLEM = 14
6594 # 102 "include/linux/sunrpc/msg_prot.h"
6595 typedef __be32 rpc_fraghdr;
6596 # 131 "include/linux/nfs.h" 2
6604 unsigned short size;
6605 unsigned char data[128];
6612 static inline __attribute__((always_inline)) int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
6614 return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
6617 static inline __attribute__((always_inline)) void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
6619 target->size = source->size;
6620 memcpy(target->data, source->data, source->size);
6622 # 165 "include/linux/nfs.h"
6623 enum nfs3_stable_how {
6628 # 7 "include/linux/nfs_fs_i.h" 2
6630 struct nlm_lockowner;
6635 struct nfs_lock_info {
6637 struct nlm_lockowner *owner;
6638 struct list_head list;
6641 struct nfs4_lock_state;
6642 struct nfs4_lock_info {
6643 struct nfs4_lock_state *owner;
6645 # 801 "include/linux/fs.h" 2
6648 struct file_lock *fl_next;
6649 struct list_head fl_link;
6650 struct list_head fl_block;
6651 fl_owner_t fl_owner;
6652 unsigned int fl_pid;
6653 wait_queue_head_t fl_wait;
6654 struct file *fl_file;
6655 unsigned char fl_flags;
6656 unsigned char fl_type;
6660 struct fasync_struct * fl_fasync;
6661 unsigned long fl_break_time;
6663 struct file_lock_operations *fl_ops;
6664 struct lock_manager_operations *fl_lmops;
6666 struct nfs_lock_info nfs_fl;
6667 struct nfs4_lock_info nfs4_fl;
6670 # 833 "include/linux/fs.h"
6671 # 1 "include/linux/fcntl.h" 1
6675 # 1 "include/asm/fcntl.h" 1
6676 # 11 "include/asm/fcntl.h"
6677 # 1 "include/asm-generic/fcntl.h" 1
6678 # 114 "include/asm-generic/fcntl.h"
6687 # 137 "include/asm-generic/fcntl.h"
6696 # 12 "include/asm/fcntl.h" 2
6697 # 5 "include/linux/fcntl.h" 2
6698 # 834 "include/linux/fs.h" 2
6700 extern int fcntl_getlk(struct file *, struct flock *);
6701 extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
6705 extern int fcntl_getlk64(struct file *, struct flock64 *);
6706 extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
6710 extern void send_sigio(struct fown_struct *fown, int fd, int band);
6711 extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg);
6712 extern int fcntl_getlease(struct file *filp);
6715 extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
6716 loff_t endbyte, unsigned int flags);
6719 extern void locks_init_lock(struct file_lock *);
6720 extern void locks_copy_lock(struct file_lock *, struct file_lock *);
6721 extern void locks_remove_posix(struct file *, fl_owner_t);
6722 extern void locks_remove_flock(struct file *);
6723 extern int posix_test_lock(struct file *, struct file_lock *);
6724 extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *);
6725 extern int posix_lock_file_wait(struct file *, struct file_lock *);
6726 extern int posix_unblock_lock(struct file *, struct file_lock *);
6727 extern int vfs_test_lock(struct file *, struct file_lock *);
6728 extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *);
6729 extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl);
6730 extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
6731 extern int __break_lease(struct inode *inode, unsigned int flags);
6732 extern void lease_get_mtime(struct inode *, struct timespec *time);
6733 extern int setlease(struct file *, long, struct file_lock **);
6734 extern int lease_modify(struct file_lock **, int);
6735 extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
6736 extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
6738 struct fasync_struct {
6741 struct fasync_struct *fa_next;
6742 struct file *fa_file;
6748 extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
6750 extern void kill_fasync(struct fasync_struct **, int, int);
6752 extern void __kill_fasync(struct fasync_struct *, int, int);
6754 extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
6755 extern int f_setown(struct file *filp, unsigned long arg, int force);
6756 extern void f_delown(struct file *filp);
6757 extern pid_t f_getown(struct file *filp);
6758 extern int send_sigurg(struct fown_struct *fown);
6759 # 903 "include/linux/fs.h"
6760 extern struct list_head super_blocks;
6761 extern spinlock_t sb_lock;
6765 struct super_block {
6766 struct list_head s_list;
6768 unsigned long s_blocksize;
6769 unsigned char s_blocksize_bits;
6770 unsigned char s_dirt;
6771 unsigned long long s_maxbytes;
6772 struct file_system_type *s_type;
6773 const struct super_operations *s_op;
6774 struct dquot_operations *dq_op;
6775 struct quotactl_ops *s_qcop;
6776 struct export_operations *s_export_op;
6777 unsigned long s_flags;
6778 unsigned long s_magic;
6779 struct dentry *s_root;
6780 struct rw_semaphore s_umount;
6781 struct mutex s_lock;
6789 struct xattr_handler **s_xattr;
6791 struct list_head s_inodes;
6792 struct list_head s_dirty;
6793 struct list_head s_io;
6794 struct hlist_head s_anon;
6795 struct list_head s_files;
6797 struct block_device *s_bdev;
6798 struct mtd_info *s_mtd;
6799 struct list_head s_instances;
6800 struct quota_info s_dquot;
6803 wait_queue_head_t s_wait_unfrozen;
6813 struct mutex s_vfs_rename_mutex;
6826 extern struct timespec current_fs_time(struct super_block *sb);
6833 SB_FREEZE_WRITE = 1,
6834 SB_FREEZE_TRANS = 2,
6836 # 988 "include/linux/fs.h"
6837 extern void lock_super(struct super_block *);
6838 extern void unlock_super(struct super_block *);
6843 extern int vfs_permission(struct nameidata *, int);
6844 extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *);
6845 extern int vfs_mkdir(struct inode *, struct dentry *, int);
6846 extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t);
6847 extern int vfs_symlink(struct inode *, struct dentry *, const char *, int);
6848 extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
6849 extern int vfs_rmdir(struct inode *, struct dentry *);
6850 extern int vfs_unlink(struct inode *, struct dentry *);
6851 extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
6856 extern void dentry_unhash(struct dentry *dentry);
6861 extern int file_permission(struct file *, int);
6862 # 1033 "include/linux/fs.h"
6863 int generic_osync_inode(struct inode *, struct address_space *, int);
6871 typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
6873 struct block_device_operations {
6874 int (*open) (struct inode *, struct file *);
6875 int (*release) (struct inode *, struct file *);
6876 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
6877 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
6878 long (*compat_ioctl) (struct file *, unsigned, unsigned long);
6879 int (*direct_access) (struct block_device *, sector_t, unsigned long *);
6880 int (*media_changed) (struct gendisk *);
6881 int (*revalidate_disk) (struct gendisk *);
6882 int (*getgeo)(struct block_device *, struct hd_geometry *);
6883 struct module *owner;
6885 # 1065 "include/linux/fs.h"
6894 } read_descriptor_t;
6896 typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long);
6897 # 1088 "include/linux/fs.h"
6898 struct file_operations {
6899 struct module *owner;
6900 loff_t (*llseek) (struct file *, loff_t, int);
6901 ssize_t (*read) (struct file *, char *, size_t, loff_t *);
6902 ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
6903 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
6904 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
6905 int (*readdir) (struct file *, void *, filldir_t);
6906 unsigned int (*poll) (struct file *, struct poll_table_struct *);
6907 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
6908 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
6909 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
6910 int (*mmap) (struct file *, struct vm_area_struct *);
6911 int (*open) (struct inode *, struct file *);
6912 int (*flush) (struct file *, fl_owner_t id);
6913 int (*release) (struct inode *, struct file *);
6914 int (*fsync) (struct file *, struct dentry *, int datasync);
6915 int (*aio_fsync) (struct kiocb *, int datasync);
6916 int (*fasync) (int, struct file *, int);
6917 int (*lock) (struct file *, int, struct file_lock *);
6918 ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *);
6919 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
6920 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
6921 int (*check_flags)(int);
6922 int (*dir_notify)(struct file *filp, unsigned long arg);
6923 int (*flock) (struct file *, int, struct file_lock *);
6924 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
6925 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
6928 struct inode_operations {
6929 int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
6930 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
6931 int (*link) (struct dentry *,struct inode *,struct dentry *);
6932 int (*unlink) (struct inode *,struct dentry *);
6933 int (*symlink) (struct inode *,struct dentry *,const char *);
6934 int (*mkdir) (struct inode *,struct dentry *,int);
6935 int (*rmdir) (struct inode *,struct dentry *);
6936 int (*mknod) (struct inode *,struct dentry *,int,dev_t);
6937 int (*rename) (struct inode *, struct dentry *,
6938 struct inode *, struct dentry *);
6939 int (*readlink) (struct dentry *, char *,int);
6940 void * (*follow_link) (struct dentry *, struct nameidata *);
6941 void (*put_link) (struct dentry *, struct nameidata *, void *);
6942 void (*truncate) (struct inode *);
6943 int (*permission) (struct inode *, int, struct nameidata *);
6944 int (*setattr) (struct dentry *, struct iattr *);
6945 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
6946 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
6947 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
6948 ssize_t (*listxattr) (struct dentry *, char *, size_t);
6949 int (*removexattr) (struct dentry *, const char *);
6950 void (*truncate_range)(struct inode *, loff_t, loff_t);
6955 ssize_t rw_copy_check_uvector(int type, const struct iovec * uvector,
6956 unsigned long nr_segs, unsigned long fast_segs,
6957 struct iovec *fast_pointer,
6958 struct iovec **ret_pointer);
6960 extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *);
6961 extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *);
6962 extern ssize_t vfs_readv(struct file *, const struct iovec *,
6963 unsigned long, loff_t *);
6964 extern ssize_t vfs_writev(struct file *, const struct iovec *,
6965 unsigned long, loff_t *);
6971 struct super_operations {
6972 struct inode *(*alloc_inode)(struct super_block *sb);
6973 void (*destroy_inode)(struct inode *);
6975 void (*read_inode) (struct inode *);
6977 void (*dirty_inode) (struct inode *);
6978 int (*write_inode) (struct inode *, int);
6979 void (*put_inode) (struct inode *);
6980 void (*drop_inode) (struct inode *);
6981 void (*delete_inode) (struct inode *);
6982 void (*put_super) (struct super_block *);
6983 void (*write_super) (struct super_block *);
6984 int (*sync_fs)(struct super_block *sb, int wait);
6985 void (*write_super_lockfs) (struct super_block *);
6986 void (*unlockfs) (struct super_block *);
6987 int (*statfs) (struct dentry *, struct kstatfs *);
6988 int (*remount_fs) (struct super_block *, int *, char *);
6989 void (*clear_inode) (struct inode *);
6990 void (*umount_begin) (struct vfsmount *, int);
6992 int (*show_options)(struct seq_file *, struct vfsmount *);
6993 int (*show_stats)(struct seq_file *, struct vfsmount *);
6999 # 1203 "include/linux/fs.h"
7000 extern void __mark_inode_dirty(struct inode *, int);
7001 static inline __attribute__((always_inline)) void mark_inode_dirty(struct inode *inode)
7003 __mark_inode_dirty(inode, (1 | 2 | 4));
7006 static inline __attribute__((always_inline)) void mark_inode_dirty_sync(struct inode *inode)
7008 __mark_inode_dirty(inode, 1);
7010 # 1222 "include/linux/fs.h"
7011 static inline __attribute__((always_inline)) void inc_nlink(struct inode *inode)
7016 static inline __attribute__((always_inline)) void inode_inc_link_count(struct inode *inode)
7019 mark_inode_dirty(inode);
7021 # 1244 "include/linux/fs.h"
7022 static inline __attribute__((always_inline)) void drop_nlink(struct inode *inode)
7026 # 1257 "include/linux/fs.h"
7027 static inline __attribute__((always_inline)) void clear_nlink(struct inode *inode)
7032 static inline __attribute__((always_inline)) void inode_dec_link_count(struct inode *inode)
7035 mark_inode_dirty(inode);
7038 extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
7039 static inline __attribute__((always_inline)) void file_accessed(struct file *file)
7041 if (!(file->f_flags & 01000000))
7042 touch_atime(file->f_path.mnt, file->f_path.dentry);
7045 int sync_inode(struct inode *inode, struct writeback_control *wbc);
7046 # 1363 "include/linux/fs.h"
7047 struct export_operations {
7048 struct dentry *(*decode_fh)(struct super_block *sb, __u32 *fh, int fh_len, int fh_type,
7049 int (*acceptable)(void *context, struct dentry *de),
7051 int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len,
7055 int (*get_name)(struct dentry *parent, char *name,
7056 struct dentry *child);
7057 struct dentry * (*get_parent)(struct dentry *child);
7058 struct dentry * (*get_dentry)(struct super_block *sb, void *inump);
7061 struct dentry * (*find_exported_dentry)(
7062 struct super_block *sb, void *obj, void *parent,
7063 int (*acceptable)(void *context, struct dentry *de),
7069 extern struct dentry *
7070 find_exported_dentry(struct super_block *sb, void *obj, void *parent,
7071 int (*acceptable)(void *context, struct dentry *de),
7074 struct file_system_type {
7077 int (*get_sb) (struct file_system_type *, int,
7078 const char *, void *, struct vfsmount *);
7079 void (*kill_sb) (struct super_block *);
7080 struct module *owner;
7081 struct file_system_type * next;
7082 struct list_head fs_supers;
7083 struct lock_class_key s_lock_key;
7084 struct lock_class_key s_umount_key;
7087 extern int get_sb_bdev(struct file_system_type *fs_type,
7088 int flags, const char *dev_name, void *data,
7089 int (*fill_super)(struct super_block *, void *, int),
7090 struct vfsmount *mnt);
7091 extern int get_sb_single(struct file_system_type *fs_type,
7092 int flags, void *data,
7093 int (*fill_super)(struct super_block *, void *, int),
7094 struct vfsmount *mnt);
7095 extern int get_sb_nodev(struct file_system_type *fs_type,
7096 int flags, void *data,
7097 int (*fill_super)(struct super_block *, void *, int),
7098 struct vfsmount *mnt);
7099 void generic_shutdown_super(struct super_block *sb);
7100 void kill_block_super(struct super_block *sb);
7101 void kill_anon_super(struct super_block *sb);
7102 void kill_litter_super(struct super_block *sb);
7103 void deactivate_super(struct super_block *sb);
7104 int set_anon_super(struct super_block *s, void *data);
7105 struct super_block *sget(struct file_system_type *type,
7106 int (*test)(struct super_block *,void *),
7107 int (*set)(struct super_block *,void *),
7109 extern int get_sb_pseudo(struct file_system_type *, char *,
7110 const struct super_operations *ops, unsigned long,
7111 struct vfsmount *mnt);
7112 extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
7113 int __put_super(struct super_block *sb);
7114 int __put_super_and_need_restart(struct super_block *sb);
7115 void unnamed_dev_init(void);
7123 extern int register_filesystem(struct file_system_type *);
7124 extern int unregister_filesystem(struct file_system_type *);
7125 extern struct vfsmount *kern_mount(struct file_system_type *);
7126 extern int may_umount_tree(struct vfsmount *);
7127 extern int may_umount(struct vfsmount *);
7128 extern void umount_tree(struct vfsmount *, int, struct list_head *);
7129 extern void release_mounts(struct list_head *);
7130 extern long do_mount(char *, char *, char *, unsigned long, void *);
7131 extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
7132 extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
7135 extern int vfs_statfs(struct dentry *, struct kstatfs *);
7138 extern struct kset fs_subsys;
7143 extern int locks_mandatory_locked(struct inode *);
7144 extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
7145 # 1469 "include/linux/fs.h"
7146 static inline __attribute__((always_inline)) int locks_verify_locked(struct inode *inode)
7148 if ((((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000))
7149 return locks_mandatory_locked(inode);
7153 extern int rw_verify_area(int, struct file *, loff_t *, size_t);
7155 static inline __attribute__((always_inline)) int locks_verify_truncate(struct inode *inode,
7159 if (inode->i_flock && (((inode)->i_sb->s_flags & (64)) && ((inode)->i_mode & (0002000 | 00010)) == 0002000))
7160 return locks_mandatory_area(
7162 size < inode->i_size ? size : inode->i_size,
7163 (size < inode->i_size ? inode->i_size - size
7164 : size - inode->i_size)
7169 static inline __attribute__((always_inline)) int break_lease(struct inode *inode, unsigned int mode)
7172 return __break_lease(inode, mode);
7178 extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
7180 extern long do_sys_open(int fdf, const char *filename, int flags,
7182 extern struct file *filp_open(const char *, int, int);
7183 extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
7184 extern int filp_close(struct file *, fl_owner_t id);
7185 extern char * getname(const char *);
7188 extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init_early(void);
7189 extern void __attribute__ ((__section__ (".init.text"))) vfs_caches_init(unsigned long);
7191 extern struct kmem_cache *names_cachep;
7192 # 1525 "include/linux/fs.h"
7193 extern int register_blkdev(unsigned int, const char *);
7194 extern int unregister_blkdev(unsigned int, const char *);
7195 extern struct block_device *bdget(dev_t);
7196 extern void bd_set_size(struct block_device *, loff_t size);
7197 extern void bd_forget(struct inode *inode);
7198 extern void bdput(struct block_device *);
7199 extern struct block_device *open_by_devnum(dev_t, unsigned);
7200 extern const struct address_space_operations def_blk_aops;
7204 extern const struct file_operations def_blk_fops;
7205 extern const struct file_operations def_chr_fops;
7206 extern const struct file_operations bad_sock_fops;
7207 extern const struct file_operations def_fifo_fops;
7209 extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
7210 extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
7211 extern int blkdev_driver_ioctl(struct inode *inode, struct file *file,
7212 struct gendisk *disk, unsigned cmd,
7214 extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
7215 extern int blkdev_get(struct block_device *, mode_t, unsigned);
7216 extern int blkdev_put(struct block_device *);
7217 extern int bd_claim(struct block_device *, void *);
7218 extern void bd_release(struct block_device *);
7220 extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
7221 extern void bd_release_from_disk(struct block_device *, struct gendisk *);
7222 # 1562 "include/linux/fs.h"
7223 extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
7224 extern int register_chrdev_region(dev_t, unsigned, const char *);
7225 extern int register_chrdev(unsigned int, const char *,
7226 const struct file_operations *);
7227 extern int unregister_chrdev(unsigned int, const char *);
7228 extern void unregister_chrdev_region(dev_t, unsigned);
7229 extern int chrdev_open(struct inode *, struct file *);
7230 extern void chrdev_show(struct seq_file *,off_t);
7237 extern const char *__bdevname(dev_t, char *buffer);
7238 extern const char *bdevname(struct block_device *bdev, char *buffer);
7239 extern struct block_device *lookup_bdev(const char *);
7240 extern struct block_device *open_bdev_excl(const char *, int, void *);
7241 extern void close_bdev_excl(struct block_device *);
7242 extern void blkdev_show(struct seq_file *,off_t);
7247 extern void init_special_inode(struct inode *, umode_t, dev_t);
7250 extern void make_bad_inode(struct inode *);
7251 extern int is_bad_inode(struct inode *);
7253 extern const struct file_operations read_fifo_fops;
7254 extern const struct file_operations write_fifo_fops;
7255 extern const struct file_operations rdwr_fifo_fops;
7257 extern int fs_may_remount_ro(struct super_block *);
7258 # 1609 "include/linux/fs.h"
7259 extern int check_disk_change(struct block_device *);
7260 extern int __invalidate_device(struct block_device *);
7261 extern int invalidate_partition(struct gendisk *, int);
7263 extern int invalidate_inodes(struct super_block *);
7264 unsigned long invalidate_mapping_pages(struct address_space *mapping,
7265 unsigned long start, unsigned long end);
7267 static inline __attribute__((always_inline)) unsigned long __attribute__((deprecated))
7268 invalidate_inode_pages(struct address_space *mapping)
7270 return invalidate_mapping_pages(mapping, 0, ~0UL);
7273 static inline __attribute__((always_inline)) void invalidate_remote_inode(struct inode *inode)
7275 if ((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) ||
7276 (((inode->i_mode) & 00170000) == 0120000))
7277 invalidate_mapping_pages(inode->i_mapping, 0, -1);
7279 extern int invalidate_inode_pages2(struct address_space *mapping);
7280 extern int invalidate_inode_pages2_range(struct address_space *mapping,
7281 unsigned long start, unsigned long end);
7282 extern int write_inode_now(struct inode *, int);
7283 extern int filemap_fdatawrite(struct address_space *);
7284 extern int filemap_flush(struct address_space *);
7285 extern int filemap_fdatawait(struct address_space *);
7286 extern int filemap_write_and_wait(struct address_space *mapping);
7287 extern int filemap_write_and_wait_range(struct address_space *mapping,
7288 loff_t lstart, loff_t lend);
7289 extern int wait_on_page_writeback_range(struct address_space *mapping,
7290 unsigned long start, unsigned long end);
7291 extern int __filemap_fdatawrite_range(struct address_space *mapping,
7292 loff_t start, loff_t end, int sync_mode);
7294 extern long do_fsync(struct file *file, int datasync);
7295 extern void sync_supers(void);
7296 extern void sync_filesystems(int wait);
7297 extern void __fsync_super(struct super_block *sb);
7298 extern void emergency_sync(void);
7299 extern void emergency_remount(void);
7300 extern int do_remount_sb(struct super_block *sb, int flags,
7301 void *data, int force);
7303 extern sector_t bmap(struct inode *, sector_t);
7305 extern int notify_change(struct dentry *, struct iattr *);
7306 extern int permission(struct inode *, int, struct nameidata *);
7307 extern int generic_permission(struct inode *, int,
7308 int (*check_acl)(struct inode *, int));
7310 extern int get_write_access(struct inode *);
7311 extern int deny_write_access(struct file *);
7312 static inline __attribute__((always_inline)) void put_write_access(struct inode * inode)
7314 atomic_dec(&inode->i_writecount);
7316 static inline __attribute__((always_inline)) void allow_write_access(struct file *file)
7319 atomic_inc(&file->f_path.dentry->d_inode->i_writecount);
7321 extern int do_pipe(int *);
7322 extern struct file *create_read_pipe(struct file *f);
7323 extern struct file *create_write_pipe(void);
7324 extern void free_write_pipe(struct file *);
7326 extern int open_namei(int dfd, const char *, int, int, struct nameidata *);
7327 extern int may_open(struct nameidata *, int, int);
7329 extern int kernel_read(struct file *, unsigned long, char *, unsigned long);
7330 extern struct file * open_exec(const char *);
7333 extern int is_subdir(struct dentry *, struct dentry *);
7334 extern ino_t find_inode_number(struct dentry *, struct qstr *);
7336 # 1 "include/linux/err.h" 1
7337 # 22 "include/linux/err.h"
7338 static inline __attribute__((always_inline)) void *ERR_PTR(long error)
7340 return (void *) error;
7343 static inline __attribute__((always_inline)) long PTR_ERR(const void *ptr)
7348 static inline __attribute__((always_inline)) long IS_ERR(const void *ptr)
7350 return __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0);
7352 # 1687 "include/linux/fs.h" 2
7355 extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
7357 extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
7359 extern void inode_init_once(struct inode *);
7360 extern void iput(struct inode *);
7361 extern struct inode * igrab(struct inode *);
7362 extern ino_t iunique(struct super_block *, ino_t);
7363 extern int inode_needs_sync(struct inode *inode);
7364 extern void generic_delete_inode(struct inode *inode);
7365 extern void generic_drop_inode(struct inode *inode);
7367 extern struct inode *ilookup5_nowait(struct super_block *sb,
7368 unsigned long hashval, int (*test)(struct inode *, void *),
7370 extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
7371 int (*test)(struct inode *, void *), void *data);
7372 extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
7374 extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
7375 extern struct inode * iget_locked(struct super_block *, unsigned long);
7376 extern void unlock_new_inode(struct inode *);
7378 static inline __attribute__((always_inline)) struct inode *iget(struct super_block *sb, unsigned long ino)
7380 struct inode *inode = iget_locked(sb, ino);
7382 if (inode && (inode->i_state & 64)) {
7383 sb->s_op->read_inode(inode);
7384 unlock_new_inode(inode);
7390 extern void __iget(struct inode * inode);
7391 extern void clear_inode(struct inode *);
7392 extern void destroy_inode(struct inode *);
7393 extern struct inode *new_inode(struct super_block *);
7394 extern int __remove_suid(struct dentry *, int);
7395 extern int should_remove_suid(struct dentry *);
7396 extern int remove_suid(struct dentry *);
7398 extern void __insert_inode_hash(struct inode *, unsigned long hashval);
7399 extern void remove_inode_hash(struct inode *);
7400 static inline __attribute__((always_inline)) void insert_inode_hash(struct inode *inode) {
7401 __insert_inode_hash(inode, inode->i_ino);
7404 extern struct file * get_empty_filp(void);
7405 extern void file_move(struct file *f, struct list_head *list);
7406 extern void file_kill(struct file *f);
7409 extern void submit_bio(int, struct bio *);
7410 extern int bdev_read_only(struct block_device *);
7412 extern int set_blocksize(struct block_device *, int);
7413 extern int sb_set_blocksize(struct super_block *, int);
7414 extern int sb_min_blocksize(struct super_block *, int);
7416 extern int generic_file_mmap(struct file *, struct vm_area_struct *);
7417 extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
7418 extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
7419 extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
7420 int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
7421 extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
7422 extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
7423 extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *,
7424 unsigned long, loff_t);
7425 extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
7426 unsigned long *, loff_t, loff_t *, size_t, size_t);
7427 extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
7428 unsigned long, loff_t, loff_t *, size_t, ssize_t);
7429 extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos);
7430 extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos);
7431 extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
7432 extern void do_generic_mapping_read(struct address_space *mapping,
7433 struct file_ra_state *, struct file *,
7434 loff_t *, read_descriptor_t *, read_actor_t);
7435 extern int generic_segment_checks(const struct iovec *iov,
7436 unsigned long *nr_segs, size_t *count, int access_flags);
7439 extern ssize_t generic_file_splice_read(struct file *, loff_t *,
7440 struct pipe_inode_info *, size_t, unsigned int);
7441 extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
7442 struct file *, loff_t *, size_t, unsigned int);
7443 extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *,
7444 struct file *, loff_t *, size_t, unsigned int);
7445 extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
7446 struct file *out, loff_t *, size_t len, unsigned int flags);
7447 extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
7448 size_t len, unsigned int flags);
7451 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
7452 extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
7453 extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
7454 extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
7455 extern int generic_file_open(struct inode * inode, struct file * filp);
7456 extern int nonseekable_open(struct inode * inode, struct file * filp);
7457 # 1803 "include/linux/fs.h"
7458 static inline __attribute__((always_inline)) int xip_truncate_page(struct address_space *mapping, loff_t from)
7464 static inline __attribute__((always_inline)) void do_generic_file_read(struct file * filp, loff_t *ppos,
7465 read_descriptor_t * desc,
7468 do_generic_mapping_read(filp->f_mapping,
7477 ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
7478 struct block_device *bdev, const struct iovec *iov, loff_t offset,
7479 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
7488 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
7489 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
7490 loff_t offset, unsigned long nr_segs, get_block_t get_block,
7491 dio_iodone_t end_io)
7493 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
7494 nr_segs, get_block, end_io, DIO_LOCKING);
7497 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
7498 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
7499 loff_t offset, unsigned long nr_segs, get_block_t get_block,
7500 dio_iodone_t end_io)
7502 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
7503 nr_segs, get_block, end_io, DIO_NO_LOCKING);
7506 static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb,
7507 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
7508 loff_t offset, unsigned long nr_segs, get_block_t get_block,
7509 dio_iodone_t end_io)
7511 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
7512 nr_segs, get_block, end_io, DIO_OWN_LOCKING);
7516 extern const struct file_operations generic_ro_fops;
7520 extern int vfs_readlink(struct dentry *, char *, int, const char *);
7521 extern int vfs_follow_link(struct nameidata *, const char *);
7522 extern int page_readlink(struct dentry *, char *, int);
7523 extern void *page_follow_link_light(struct dentry *, struct nameidata *);
7524 extern void page_put_link(struct dentry *, struct nameidata *, void *);
7525 extern int __page_symlink(struct inode *inode, const char *symname, int len,
7527 extern int page_symlink(struct inode *inode, const char *symname, int len);
7528 extern const struct inode_operations page_symlink_inode_operations;
7529 extern int generic_readlink(struct dentry *, char *, int);
7530 extern void generic_fillattr(struct inode *, struct kstat *);
7531 extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
7532 void inode_add_bytes(struct inode *inode, loff_t bytes);
7533 void inode_sub_bytes(struct inode *inode, loff_t bytes);
7534 loff_t inode_get_bytes(struct inode *inode);
7535 void inode_set_bytes(struct inode *inode, loff_t bytes);
7537 extern int vfs_readdir(struct file *, filldir_t, void *);
7539 extern int vfs_stat(char *, struct kstat *);
7540 extern int vfs_lstat(char *, struct kstat *);
7541 extern int vfs_stat_fd(int dfd, char *, struct kstat *);
7542 extern int vfs_lstat_fd(int dfd, char *, struct kstat *);
7543 extern int vfs_fstat(unsigned int, struct kstat *);
7545 extern int vfs_ioctl(struct file *, unsigned int, unsigned int, unsigned long);
7547 extern struct file_system_type *get_fs_type(const char *name);
7548 extern struct super_block *get_super(struct block_device *);
7549 extern struct super_block *user_get_super(dev_t);
7550 extern void drop_super(struct super_block *sb);
7552 extern int dcache_dir_open(struct inode *, struct file *);
7553 extern int dcache_dir_close(struct inode *, struct file *);
7554 extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
7555 extern int dcache_readdir(struct file *, void *, filldir_t);
7556 extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
7557 extern int simple_statfs(struct dentry *, struct kstatfs *);
7558 extern int simple_link(struct dentry *, struct inode *, struct dentry *);
7559 extern int simple_unlink(struct inode *, struct dentry *);
7560 extern int simple_rmdir(struct inode *, struct dentry *);
7561 extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
7562 extern int simple_sync_file(struct file *, struct dentry *, int);
7563 extern int simple_empty(struct dentry *);
7564 extern int simple_readpage(struct file *file, struct page *page);
7565 extern int simple_prepare_write(struct file *file, struct page *page,
7566 unsigned offset, unsigned to);
7567 extern int simple_commit_write(struct file *file, struct page *page,
7568 unsigned offset, unsigned to);
7570 extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
7571 extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
7572 extern const struct file_operations simple_dir_operations;
7573 extern const struct inode_operations simple_dir_inode_operations;
7574 struct tree_descr { char *name; const struct file_operations *ops; int mode; };
7575 struct dentry *d_alloc_name(struct dentry *, const char *);
7576 extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
7577 extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
7578 extern void simple_release_fs(struct vfsmount **mount, int *count);
7580 extern ssize_t simple_read_from_buffer(void *, size_t, loff_t *, const void *, size_t);
7581 # 1934 "include/linux/fs.h"
7582 extern int inode_change_ok(struct inode *, struct iattr *);
7583 extern int __attribute__((warn_unused_result)) inode_setattr(struct inode *, struct iattr *);
7585 extern void file_update_time(struct file *file);
7587 static inline __attribute__((always_inline)) ino_t parent_ino(struct dentry *dentry)
7591 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
7592 res = dentry->d_parent->d_inode->i_ino;
7593 do { do { } while (0); (void)0; (void)(&dentry->d_lock); } while (0);
7598 extern int unshare_files(void);
7606 struct simple_transaction_argresp {
7613 char *simple_transaction_get(struct file *file, const char *buf,
7615 ssize_t simple_transaction_read(struct file *file, char *buf,
7616 size_t size, loff_t *pos);
7617 int simple_transaction_release(struct inode *inode, struct file *file);
7619 static inline __attribute__((always_inline)) void simple_transaction_set(struct file *file, size_t n)
7621 struct simple_transaction_argresp *ar = file->private_data;
7623 do { if (__builtin_expect(!!((n > ((1UL << 12) - sizeof(struct simple_transaction_argresp)))!=0), 0)) do { printk("BUG: failure at %s:%d/%s()!\n", "include/linux/fs.h", 1975, (__func__)); panic("BUG!"); } while (0); } while(0);
7629 __asm__ __volatile__("": : :"memory");
7632 # 2015 "include/linux/fs.h"
7633 static inline __attribute__((always_inline)) void __attribute__((format(printf, 1, 2)))
7634 __simple_attr_check_format(const char *fmt, ...)
7639 int simple_attr_open(struct inode *inode, struct file *file,
7640 u64 (*get)(void *), void (*set)(void *, u64),
7642 int simple_attr_close(struct inode *inode, struct file *file);
7643 ssize_t simple_attr_read(struct file *file, char *buf,
7644 size_t len, loff_t *ppos);
7645 ssize_t simple_attr_write(struct file *file, const char *buf,
7646 size_t len, loff_t *ppos);
7650 static inline __attribute__((always_inline)) char *alloc_secdata(void)
7652 return (char *)get_zeroed_page(((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)));
7655 static inline __attribute__((always_inline)) void free_secdata(void *secdata)
7657 free_pages(((unsigned long)secdata),0);
7659 # 3 "init/initramfs.c" 2
7663 # 1 "include/linux/delay.h" 1
7664 # 10 "include/linux/delay.h"
7665 extern unsigned long loops_per_jiffy;
7667 # 1 "include/asm/delay.h" 1
7668 # 14 "include/asm/delay.h"
7669 static inline __attribute__((always_inline)) void __delay(unsigned long loops)
7674 __asm__ __volatile__(
7678 "LSETUP (1f,1f) LC0 = %1;"
7693 __asm__ __volatile__ (
7694 "LSETUP(1f, 1f) LC0 = %0;"
7698 : "LT0", "LB0", "LC0"
7702 # 1 "include/linux/param.h" 1
7706 # 1 "include/asm/param.h" 1
7707 # 5 "include/linux/param.h" 2
7708 # 48 "include/asm/delay.h" 2
7709 # 56 "include/asm/delay.h"
7710 static inline __attribute__((always_inline)) void udelay(unsigned long usecs)
7712 extern unsigned long loops_per_jiffy;
7713 __delay(usecs * loops_per_jiffy / (1000000 / 250));
7715 # 13 "include/linux/delay.h" 2
7716 # 38 "include/linux/delay.h"
7717 void calibrate_delay(void);
7718 void msleep(unsigned int msecs);
7719 unsigned long msleep_interruptible(unsigned int msecs);
7721 static inline __attribute__((always_inline)) void ssleep(unsigned int seconds)
7723 msleep(seconds * 1000);
7725 # 7 "init/initramfs.c" 2
7727 # 1 "include/linux/syscalls.h" 1
7728 # 14 "include/linux/syscalls.h"
7737 struct kexec_segment;
7738 struct linux_dirent;
7739 struct linux_dirent64;
7746 struct __old_kernel_stat;
7759 struct __sysctl_args;
7769 struct compat_timeval;
7770 struct robust_list_head;
7771 struct getcpu_cache;
7774 # 1 "include/linux/aio_abi.h" 1
7775 # 32 "include/linux/aio_abi.h"
7776 typedef unsigned long aio_context_t;
7780 IOCB_CMD_PWRITE = 1,
7782 IOCB_CMD_FDSYNC = 3,
7788 IOCB_CMD_PREADV = 7,
7789 IOCB_CMD_PWRITEV = 8,
7791 # 57 "include/linux/aio_abi.h"
7798 # 78 "include/linux/aio_abi.h"
7802 __u32 aio_key, aio_reserved1;
7806 __u16 aio_lio_opcode;
7815 __u64 aio_reserved2;
7826 # 60 "include/linux/syscalls.h" 2
7827 # 1 "include/linux/capability.h" 1
7828 # 19 "include/linux/capability.h"
7830 # 34 "include/linux/capability.h"
7831 typedef struct __user_cap_header_struct {
7834 } *cap_user_header_t;
7836 typedef struct __user_cap_data_struct {
7841 # 60 "include/linux/capability.h"
7842 typedef __u32 kernel_cap_t;
7843 # 297 "include/linux/capability.h"
7844 extern kernel_cap_t cap_bset;
7845 # 325 "include/linux/capability.h"
7846 static inline __attribute__((always_inline)) kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
7853 static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b)
7860 static inline __attribute__((always_inline)) kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop)
7863 (dest) = (a) & ~(drop);
7867 static inline __attribute__((always_inline)) kernel_cap_t cap_invert(kernel_cap_t c)
7873 # 362 "include/linux/capability.h"
7874 int capable(int cap);
7875 int __capable(struct task_struct *t, int cap);
7876 # 61 "include/linux/syscalls.h" 2
7878 # 1 "include/linux/sem.h" 1
7882 # 1 "include/linux/ipc.h" 1
7883 # 9 "include/linux/ipc.h"
7889 __kernel_uid_t cuid;
7890 __kernel_gid_t cgid;
7891 __kernel_mode_t mode;
7896 # 1 "include/asm/ipcbuf.h" 1
7897 # 16 "include/asm/ipcbuf.h"
7900 __kernel_uid32_t uid;
7901 __kernel_gid32_t gid;
7902 __kernel_uid32_t cuid;
7903 __kernel_gid32_t cgid;
7904 __kernel_mode_t mode;
7905 unsigned short __pad1;
7907 unsigned short __pad2;
7908 unsigned long __unused1;
7909 unsigned long __unused2;
7911 # 22 "include/linux/ipc.h" 2
7912 # 59 "include/linux/ipc.h"
7913 struct kern_ipc_perm
7928 struct ipc_namespace {
7930 struct ipc_ids *ids[3];
7945 extern struct ipc_namespace init_ipc_ns;
7949 extern struct ipc_namespace *copy_ipcs(unsigned long flags,
7950 struct ipc_namespace *ns);
7951 # 110 "include/linux/ipc.h"
7952 static inline __attribute__((always_inline)) struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
7961 static inline __attribute__((always_inline)) void put_ipc_ns(struct ipc_namespace *ns)
7967 # 5 "include/linux/sem.h" 2
7968 # 23 "include/linux/sem.h"
7970 struct ipc_perm sem_perm;
7971 __kernel_time_t sem_otime;
7972 __kernel_time_t sem_ctime;
7973 struct sem *sem_base;
7974 struct sem_queue *sem_pending;
7975 struct sem_queue **sem_pending_last;
7976 struct sem_undo *undo;
7977 unsigned short sem_nsems;
7981 # 1 "include/asm/sembuf.h" 1
7982 # 14 "include/asm/sembuf.h"
7984 struct ipc64_perm sem_perm;
7985 __kernel_time_t sem_otime;
7986 unsigned long __unused1;
7987 __kernel_time_t sem_ctime;
7988 unsigned long __unused2;
7989 unsigned long sem_nsems;
7990 unsigned long __unused3;
7991 unsigned long __unused4;
7993 # 36 "include/linux/sem.h" 2
7997 unsigned short sem_num;
8005 struct semid_ds *buf;
8006 unsigned short *array;
8007 struct seminfo *__buf;
8023 # 82 "include/linux/sem.h"
8034 struct kern_ipc_perm sem_perm;
8038 struct sem *sem_base;
8039 struct sem_queue *sem_pending;
8040 struct sem_queue **sem_pending_last;
8041 struct sem_undo *undo;
8042 unsigned long sem_nsems;
8047 struct sem_queue * next;
8048 struct sem_queue ** prev;
8049 struct task_struct* sleeper;
8050 struct sem_undo * undo;
8053 struct sem_array * sma;
8055 struct sembuf * sops;
8064 struct sem_undo * proc_next;
8065 struct sem_undo * id_next;
8073 struct sem_undo_list {
8076 struct sem_undo *proc_list;
8080 struct sem_undo_list *undo_list;
8085 extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
8086 extern void exit_sem(struct task_struct *tsk);
8087 # 63 "include/linux/syscalls.h" 2
8089 # 1 "include/asm/siginfo.h" 1
8094 # 1 "include/asm-generic/siginfo.h" 1
8101 typedef union sigval {
8105 # 40 "include/asm-generic/siginfo.h"
8106 typedef struct siginfo {
8112 int _pad[((128 - (3 * sizeof(int))) / sizeof(int))];
8124 char _pad[sizeof( uid_t) - sizeof(int)];
8160 # 251 "include/asm-generic/siginfo.h"
8161 typedef struct sigevent {
8162 sigval_t sigev_value;
8166 int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))];
8170 void (*_function)(sigval_t);
8183 void do_schedule_next_timer(struct siginfo *info);
8189 static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from)
8191 if (from->si_code < 0)
8192 memcpy(to, from, sizeof(*to));
8195 memcpy(to, from, (3 * sizeof(int)) + sizeof(from->_sifields._sigchld));
8200 extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from);
8201 # 6 "include/asm/siginfo.h" 2
8202 # 65 "include/linux/syscalls.h" 2
8203 # 1 "include/asm/signal.h" 1
8211 # 17 "include/asm/signal.h"
8212 typedef unsigned long old_sigset_t;
8215 unsigned long sig[(64 / 32)];
8217 # 107 "include/asm/signal.h"
8218 # 1 "include/asm-generic/signal.h" 1
8219 # 17 "include/asm-generic/signal.h"
8220 typedef void __signalfn_t(int);
8221 typedef __signalfn_t *__sighandler_t;
8223 typedef void __restorefn_t(void);
8224 typedef __restorefn_t *__sigrestore_t;
8225 # 108 "include/asm/signal.h" 2
8228 struct old_sigaction {
8229 __sighandler_t sa_handler;
8230 old_sigset_t sa_mask;
8231 unsigned long sa_flags;
8232 void (*sa_restorer) (void);
8236 __sighandler_t sa_handler;
8237 unsigned long sa_flags;
8238 void (*sa_restorer) (void);
8242 struct k_sigaction {
8243 struct sigaction sa;
8245 # 145 "include/asm/signal.h"
8246 typedef struct sigaltstack {
8254 # 1 "include/asm/sigcontext.h" 1
8260 unsigned long sc_r0;
8261 unsigned long sc_r1;
8262 unsigned long sc_r2;
8263 unsigned long sc_r3;
8264 unsigned long sc_r4;
8265 unsigned long sc_r5;
8266 unsigned long sc_r6;
8267 unsigned long sc_r7;
8268 unsigned long sc_p0;
8269 unsigned long sc_p1;
8270 unsigned long sc_p2;
8271 unsigned long sc_p3;
8272 unsigned long sc_p4;
8273 unsigned long sc_p5;
8274 unsigned long sc_usp;
8275 unsigned long sc_a0w;
8276 unsigned long sc_a1w;
8277 unsigned long sc_a0x;
8278 unsigned long sc_a1x;
8279 unsigned long sc_astat;
8280 unsigned long sc_rets;
8281 unsigned long sc_pc;
8282 unsigned long sc_retx;
8283 unsigned long sc_fp;
8284 unsigned long sc_i0;
8285 unsigned long sc_i1;
8286 unsigned long sc_i2;
8287 unsigned long sc_i3;
8288 unsigned long sc_m0;
8289 unsigned long sc_m1;
8290 unsigned long sc_m2;
8291 unsigned long sc_m3;
8292 unsigned long sc_l0;
8293 unsigned long sc_l1;
8294 unsigned long sc_l2;
8295 unsigned long sc_l3;
8296 unsigned long sc_b0;
8297 unsigned long sc_b1;
8298 unsigned long sc_b2;
8299 unsigned long sc_b3;
8300 unsigned long sc_lc0;
8301 unsigned long sc_lc1;
8302 unsigned long sc_lt0;
8303 unsigned long sc_lt1;
8304 unsigned long sc_lb0;
8305 unsigned long sc_lb1;
8306 unsigned long sc_seqstat;
8308 # 154 "include/asm/signal.h" 2
8309 # 66 "include/linux/syscalls.h" 2
8311 # 1 "include/linux/key.h" 1
8312 # 20 "include/linux/key.h"
8313 # 1 "include/linux/rbtree.h" 1
8314 # 100 "include/linux/rbtree.h"
8317 unsigned long rb_parent_color;
8320 struct rb_node *rb_right;
8321 struct rb_node *rb_left;
8322 } __attribute__((aligned(sizeof(long))));
8327 struct rb_node *rb_node;
8329 # 123 "include/linux/rbtree.h"
8330 static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p)
8332 rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
8334 static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color)
8336 rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
8338 # 139 "include/linux/rbtree.h"
8339 extern void rb_insert_color(struct rb_node *, struct rb_root *);
8340 extern void rb_erase(struct rb_node *, struct rb_root *);
8343 extern struct rb_node *rb_next(struct rb_node *);
8344 extern struct rb_node *rb_prev(struct rb_node *);
8345 extern struct rb_node *rb_first(struct rb_root *);
8346 extern struct rb_node *rb_last(struct rb_root *);
8349 extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
8350 struct rb_root *root);
8352 static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent,
8353 struct rb_node ** rb_link)
8355 node->rb_parent_color = (unsigned long )parent;
8356 node->rb_left = node->rb_right = ((void *)0);
8360 # 21 "include/linux/key.h" 2
8367 typedef int32_t key_serial_t;
8370 typedef uint32_t key_perm_t;
8373 # 383 "include/linux/key.h"
8374 extern struct key root_user_keyring;
8375 extern struct key root_session_keyring;
8376 # 68 "include/linux/syscalls.h" 2
8378 long sys_time(time_t *tloc);
8379 long sys_stime(time_t *tptr);
8380 long sys_gettimeofday(struct timeval *tv,
8381 struct timezone *tz);
8382 long sys_settimeofday(struct timeval *tv,
8383 struct timezone *tz);
8384 long sys_adjtimex(struct timex *txc_p);
8386 long sys_times(struct tms *tbuf);
8388 long sys_gettid(void);
8389 long sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp);
8390 unsigned long sys_alarm(unsigned int seconds);
8391 long sys_getpid(void);
8392 long sys_getppid(void);
8393 long sys_getuid(void);
8394 long sys_geteuid(void);
8395 long sys_getgid(void);
8396 long sys_getegid(void);
8397 long sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
8398 long sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
8399 long sys_getpgid(pid_t pid);
8400 long sys_getpgrp(void);
8401 long sys_getsid(pid_t pid);
8402 long sys_getgroups(int gidsetsize, gid_t *grouplist);
8404 long sys_setregid(gid_t rgid, gid_t egid);
8405 long sys_setgid(gid_t gid);
8406 long sys_setreuid(uid_t ruid, uid_t euid);
8407 long sys_setuid(uid_t uid);
8408 long sys_setresuid(uid_t ruid, uid_t euid, uid_t suid);
8409 long sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid);
8410 long sys_setfsuid(uid_t uid);
8411 long sys_setfsgid(gid_t gid);
8412 long sys_setpgid(pid_t pid, pid_t pgid);
8413 long sys_setsid(void);
8414 long sys_setgroups(int gidsetsize, gid_t *grouplist);
8416 long sys_acct(const char *name);
8417 long sys_capget(cap_user_header_t header,
8418 cap_user_data_t dataptr);
8419 long sys_capset(cap_user_header_t header,
8420 const cap_user_data_t data);
8421 long sys_personality(u_long personality);
8423 long sys_sigpending(old_sigset_t *set);
8424 long sys_sigprocmask(int how, old_sigset_t *set,
8425 old_sigset_t *oset);
8426 long sys_getitimer(int which, struct itimerval *value);
8427 long sys_setitimer(int which,
8428 struct itimerval *value,
8429 struct itimerval *ovalue);
8430 long sys_timer_create(clockid_t which_clock,
8431 struct sigevent *timer_event_spec,
8432 timer_t * created_timer_id);
8433 long sys_timer_gettime(timer_t timer_id,
8434 struct itimerspec *setting);
8435 long sys_timer_getoverrun(timer_t timer_id);
8436 long sys_timer_settime(timer_t timer_id, int flags,
8437 const struct itimerspec *new_setting,
8438 struct itimerspec *old_setting);
8439 long sys_timer_delete(timer_t timer_id);
8440 long sys_clock_settime(clockid_t which_clock,
8441 const struct timespec *tp);
8442 long sys_clock_gettime(clockid_t which_clock,
8443 struct timespec *tp);
8444 long sys_clock_getres(clockid_t which_clock,
8445 struct timespec *tp);
8446 long sys_clock_nanosleep(clockid_t which_clock, int flags,
8447 const struct timespec *rqtp,
8448 struct timespec *rmtp);
8450 long sys_nice(int increment);
8451 long sys_sched_setscheduler(pid_t pid, int policy,
8452 struct sched_param *param);
8453 long sys_sched_setparam(pid_t pid,
8454 struct sched_param *param);
8455 long sys_sched_getscheduler(pid_t pid);
8456 long sys_sched_getparam(pid_t pid,
8457 struct sched_param *param);
8458 long sys_sched_setaffinity(pid_t pid, unsigned int len,
8459 unsigned long *user_mask_ptr);
8460 long sys_sched_getaffinity(pid_t pid, unsigned int len,
8461 unsigned long *user_mask_ptr);
8462 long sys_sched_yield(void);
8463 long sys_sched_get_priority_max(int policy);
8464 long sys_sched_get_priority_min(int policy);
8465 long sys_sched_rr_get_interval(pid_t pid,
8466 struct timespec *interval);
8467 long sys_setpriority(int which, int who, int niceval);
8468 long sys_getpriority(int which, int who);
8470 long sys_shutdown(int, int);
8471 long sys_reboot(int magic1, int magic2, unsigned int cmd,
8473 long sys_restart_syscall(void);
8474 long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
8475 struct kexec_segment *segments,
8476 unsigned long flags);
8478 long sys_exit(int error_code);
8479 void sys_exit_group(int error_code);
8480 long sys_wait4(pid_t pid, int *stat_addr,
8481 int options, struct rusage *ru);
8482 long sys_waitid(int which, pid_t pid,
8483 struct siginfo *infop,
8484 int options, struct rusage *ru);
8485 long sys_waitpid(pid_t pid, int *stat_addr, int options);
8486 long sys_set_tid_address(int *tidptr);
8487 long sys_futex(u32 *uaddr, int op, u32 val,
8488 struct timespec *utime, u32 *uaddr2,
8491 long sys_init_module(void *umod, unsigned long len,
8493 long sys_delete_module(const char *name_user,
8494 unsigned int flags);
8496 long sys_rt_sigprocmask(int how, sigset_t *set,
8497 sigset_t *oset, size_t sigsetsize);
8498 long sys_rt_sigpending(sigset_t *set, size_t sigsetsize);
8499 long sys_rt_sigtimedwait(const sigset_t *uthese,
8501 const struct timespec *uts,
8503 long sys_kill(int pid, int sig);
8504 long sys_tgkill(int tgid, int pid, int sig);
8505 long sys_tkill(int pid, int sig);
8506 long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t *uinfo);
8507 long sys_sgetmask(void);
8508 long sys_ssetmask(int newmask);
8509 unsigned long sys_signal(int sig, __sighandler_t handler);
8510 long sys_pause(void);
8512 long sys_sync(void);
8513 long sys_fsync(unsigned int fd);
8514 long sys_fdatasync(unsigned int fd);
8515 long sys_bdflush(int func, long data);
8516 long sys_mount(char *dev_name, char *dir_name,
8517 char *type, unsigned long flags,
8519 long sys_umount(char *name, int flags);
8520 long sys_oldumount(char *name);
8521 long sys_truncate(const char *path,
8522 unsigned long length);
8523 long sys_ftruncate(unsigned int fd, unsigned long length);
8524 long sys_stat(char *filename,
8525 struct __old_kernel_stat *statbuf);
8526 long sys_statfs(const char * path,
8527 struct statfs *buf);
8528 long sys_statfs64(const char *path, size_t sz,
8529 struct statfs64 *buf);
8530 long sys_fstatfs(unsigned int fd, struct statfs *buf);
8531 long sys_fstatfs64(unsigned int fd, size_t sz,
8532 struct statfs64 *buf);
8533 long sys_lstat(char *filename,
8534 struct __old_kernel_stat *statbuf);
8535 long sys_fstat(unsigned int fd,
8536 struct __old_kernel_stat *statbuf);
8537 long sys_newstat(char *filename,
8538 struct stat *statbuf);
8539 long sys_newlstat(char *filename,
8540 struct stat *statbuf);
8541 long sys_newfstat(unsigned int fd, struct stat *statbuf);
8542 long sys_ustat(unsigned dev, struct ustat *ubuf);
8544 long sys_stat64(char *filename,
8545 struct stat64 *statbuf);
8546 long sys_fstat64(unsigned long fd, struct stat64 *statbuf);
8547 long sys_lstat64(char *filename,
8548 struct stat64 *statbuf);
8549 long sys_truncate64(const char *path, loff_t length);
8550 long sys_ftruncate64(unsigned int fd, loff_t length);
8553 long sys_setxattr(char *path, char *name,
8554 void *value, size_t size, int flags);
8555 long sys_lsetxattr(char *path, char *name,
8556 void *value, size_t size, int flags);
8557 long sys_fsetxattr(int fd, char *name, void *value,
8558 size_t size, int flags);
8559 ssize_t sys_getxattr(char *path, char *name,
8560 void *value, size_t size);
8561 ssize_t sys_lgetxattr(char *path, char *name,
8562 void *value, size_t size);
8563 ssize_t sys_fgetxattr(int fd, char *name,
8564 void *value, size_t size);
8565 ssize_t sys_listxattr(char *path, char *list,
8567 ssize_t sys_llistxattr(char *path, char *list,
8569 ssize_t sys_flistxattr(int fd, char *list, size_t size);
8570 long sys_removexattr(char *path, char *name);
8571 long sys_lremovexattr(char *path, char *name);
8572 long sys_fremovexattr(int fd, char *name);
8574 unsigned long sys_brk(unsigned long brk);
8575 long sys_mprotect(unsigned long start, size_t len,
8576 unsigned long prot);
8577 unsigned long sys_mremap(unsigned long addr,
8578 unsigned long old_len, unsigned long new_len,
8579 unsigned long flags, unsigned long new_addr);
8580 long sys_remap_file_pages(unsigned long start, unsigned long size,
8581 unsigned long prot, unsigned long pgoff,
8582 unsigned long flags);
8583 long sys_msync(unsigned long start, size_t len, int flags);
8584 long sys_fadvise64(int fd, loff_t offset, size_t len, int advice);
8585 long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice);
8586 long sys_munmap(unsigned long addr, size_t len);
8587 long sys_mlock(unsigned long start, size_t len);
8588 long sys_munlock(unsigned long start, size_t len);
8589 long sys_mlockall(int flags);
8590 long sys_munlockall(void);
8591 long sys_madvise(unsigned long start, size_t len, int behavior);
8592 long sys_mincore(unsigned long start, size_t len,
8593 unsigned char * vec);
8595 long sys_pivot_root(const char *new_root,
8596 const char *put_old);
8597 long sys_chroot(const char *filename);
8598 long sys_mknod(const char *filename, int mode,
8600 long sys_link(const char *oldname,
8601 const char *newname);
8602 long sys_symlink(const char *old, const char *new);
8603 long sys_unlink(const char *pathname);
8604 long sys_rename(const char *oldname,
8605 const char *newname);
8606 long sys_chmod(const char *filename, mode_t mode);
8607 long sys_fchmod(unsigned int fd, mode_t mode);
8609 long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
8611 long sys_fcntl64(unsigned int fd,
8612 unsigned int cmd, unsigned long arg);
8614 long sys_dup(unsigned int fildes);
8615 long sys_dup2(unsigned int oldfd, unsigned int newfd);
8616 long sys_ioperm(unsigned long from, unsigned long num, int on);
8617 long sys_ioctl(unsigned int fd, unsigned int cmd,
8619 long sys_flock(unsigned int fd, unsigned int cmd);
8620 long sys_io_setup(unsigned nr_reqs, aio_context_t *ctx);
8621 long sys_io_destroy(aio_context_t ctx);
8622 long sys_io_getevents(aio_context_t ctx_id,
8625 struct io_event *events,
8626 struct timespec *timeout);
8627 long sys_io_submit(aio_context_t, long,
8629 long sys_io_cancel(aio_context_t ctx_id, struct iocb *iocb,
8630 struct io_event *result);
8631 ssize_t sys_sendfile(int out_fd, int in_fd,
8632 off_t *offset, size_t count);
8633 ssize_t sys_sendfile64(int out_fd, int in_fd,
8634 loff_t *offset, size_t count);
8635 long sys_readlink(const char *path,
8636 char *buf, int bufsiz);
8637 long sys_creat(const char *pathname, int mode);
8638 long sys_open(const char *filename,
8639 int flags, int mode);
8640 long sys_close(unsigned int fd);
8641 long sys_access(const char *filename, int mode);
8642 long sys_vhangup(void);
8643 long sys_chown(const char *filename,
8644 uid_t user, gid_t group);
8645 long sys_lchown(const char *filename,
8646 uid_t user, gid_t group);
8647 long sys_fchown(unsigned int fd, uid_t user, gid_t group);
8649 long sys_chown16(const char *filename,
8650 old_uid_t user, old_gid_t group);
8651 long sys_lchown16(const char *filename,
8652 old_uid_t user, old_gid_t group);
8653 long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group);
8654 long sys_setregid16(old_gid_t rgid, old_gid_t egid);
8655 long sys_setgid16(old_gid_t gid);
8656 long sys_setreuid16(old_uid_t ruid, old_uid_t euid);
8657 long sys_setuid16(old_uid_t uid);
8658 long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid);
8659 long sys_getresuid16(old_uid_t *ruid,
8660 old_uid_t *euid, old_uid_t *suid);
8661 long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid);
8662 long sys_getresgid16(old_gid_t *rgid,
8663 old_gid_t *egid, old_gid_t *sgid);
8664 long sys_setfsuid16(old_uid_t uid);
8665 long sys_setfsgid16(old_gid_t gid);
8666 long sys_getgroups16(int gidsetsize, old_gid_t *grouplist);
8667 long sys_setgroups16(int gidsetsize, old_gid_t *grouplist);
8668 long sys_getuid16(void);
8669 long sys_geteuid16(void);
8670 long sys_getgid16(void);
8671 long sys_getegid16(void);
8674 long sys_utime(char *filename,
8675 struct utimbuf *times);
8676 long sys_utimes(char *filename,
8677 struct timeval *utimes);
8678 off_t sys_lseek(unsigned int fd, off_t offset,
8679 unsigned int origin);
8680 long sys_llseek(unsigned int fd, unsigned long offset_high,
8681 unsigned long offset_low, loff_t *result,
8682 unsigned int origin);
8683 ssize_t sys_read(unsigned int fd, char *buf,
8685 ssize_t sys_readahead(int fd, loff_t offset, size_t count);
8686 ssize_t sys_readv(unsigned long fd,
8687 const struct iovec *vec,
8688 unsigned long vlen);
8689 ssize_t sys_write(unsigned int fd, const char *buf,
8691 ssize_t sys_writev(unsigned long fd,
8692 const struct iovec *vec,
8693 unsigned long vlen);
8694 ssize_t sys_pread64(unsigned int fd, char *buf,
8695 size_t count, loff_t pos);
8696 ssize_t sys_pwrite64(unsigned int fd, const char *buf,
8697 size_t count, loff_t pos);
8698 long sys_getcwd(char *buf, unsigned long size);
8699 long sys_mkdir(const char *pathname, int mode);
8700 long sys_chdir(const char *filename);
8701 long sys_fchdir(unsigned int fd);
8702 long sys_rmdir(const char *pathname);
8703 long sys_lookup_dcookie(u64 cookie64, char *buf, size_t len);
8704 long sys_quotactl(unsigned int cmd, const char *special,
8705 qid_t id, void *addr);
8706 long sys_getdents(unsigned int fd,
8707 struct linux_dirent *dirent,
8708 unsigned int count);
8709 long sys_getdents64(unsigned int fd,
8710 struct linux_dirent64 *dirent,
8711 unsigned int count);
8713 long sys_setsockopt(int fd, int level, int optname,
8714 char *optval, int optlen);
8715 long sys_getsockopt(int fd, int level, int optname,
8716 char *optval, int *optlen);
8717 long sys_bind(int, struct sockaddr *, int);
8718 long sys_connect(int, struct sockaddr *, int);
8719 long sys_accept(int, struct sockaddr *, int *);
8720 long sys_getsockname(int, struct sockaddr *, int *);
8721 long sys_getpeername(int, struct sockaddr *, int *);
8722 long sys_send(int, void *, size_t, unsigned);
8723 long sys_sendto(int, void *, size_t, unsigned,
8724 struct sockaddr *, int);
8725 long sys_sendmsg(int fd, struct msghdr *msg, unsigned flags);
8726 long sys_recv(int, void *, size_t, unsigned);
8727 long sys_recvfrom(int, void *, size_t, unsigned,
8728 struct sockaddr *, int *);
8729 long sys_recvmsg(int fd, struct msghdr *msg, unsigned flags);
8730 long sys_socket(int, int, int);
8731 long sys_socketpair(int, int, int, int *);
8732 long sys_socketcall(int call, unsigned long *args);
8733 long sys_listen(int, int);
8734 long sys_poll(struct pollfd *ufds, unsigned int nfds,
8736 long sys_select(int n, fd_set *inp, fd_set *outp,
8737 fd_set *exp, struct timeval *tvp);
8738 long sys_epoll_create(int size);
8739 long sys_epoll_ctl(int epfd, int op, int fd,
8740 struct epoll_event *event);
8741 long sys_epoll_wait(int epfd, struct epoll_event *events,
8742 int maxevents, int timeout);
8743 long sys_epoll_pwait(int epfd, struct epoll_event *events,
8744 int maxevents, int timeout,
8745 const sigset_t *sigmask,
8747 long sys_gethostname(char *name, int len);
8748 long sys_sethostname(char *name, int len);
8749 long sys_setdomainname(char *name, int len);
8750 long sys_newuname(struct new_utsname *name);
8752 long sys_getrlimit(unsigned int resource,
8753 struct rlimit *rlim);
8755 long sys_old_getrlimit(unsigned int resource, struct rlimit *rlim);
8757 long sys_setrlimit(unsigned int resource,
8758 struct rlimit *rlim);
8759 long sys_getrusage(int who, struct rusage *ru);
8760 long sys_umask(int mask);
8762 long sys_msgget(key_t key, int msgflg);
8763 long sys_msgsnd(int msqid, struct msgbuf *msgp,
8764 size_t msgsz, int msgflg);
8765 long sys_msgrcv(int msqid, struct msgbuf *msgp,
8766 size_t msgsz, long msgtyp, int msgflg);
8767 long sys_msgctl(int msqid, int cmd, struct msqid_ds *buf);
8769 long sys_semget(key_t key, int nsems, int semflg);
8770 long sys_semop(int semid, struct sembuf *sops,
8772 long sys_semctl(int semid, int semnum, int cmd, union semun arg);
8773 long sys_semtimedop(int semid, struct sembuf *sops,
8775 const struct timespec *timeout);
8776 long sys_shmat(int shmid, char *shmaddr, int shmflg);
8777 long sys_shmget(key_t key, size_t size, int flag);
8778 long sys_shmdt(char *shmaddr);
8779 long sys_shmctl(int shmid, int cmd, struct shmid_ds *buf);
8781 long sys_mq_open(const char *name, int oflag, mode_t mode, struct mq_attr *attr);
8782 long sys_mq_unlink(const char *name);
8783 long sys_mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout);
8784 ssize_t sys_mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abs_timeout);
8785 long sys_mq_notify(mqd_t mqdes, const struct sigevent *notification);
8786 long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat);
8788 long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn);
8789 long sys_pciconfig_read(unsigned long bus, unsigned long dfn,
8790 unsigned long off, unsigned long len,
8792 long sys_pciconfig_write(unsigned long bus, unsigned long dfn,
8793 unsigned long off, unsigned long len,
8796 long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
8797 unsigned long arg4, unsigned long arg5);
8798 long sys_swapon(const char *specialfile, int swap_flags);
8799 long sys_swapoff(const char *specialfile);
8800 long sys_sysctl(struct __sysctl_args *args);
8801 long sys_sysinfo(struct sysinfo *info);
8802 long sys_sysfs(int option,
8803 unsigned long arg1, unsigned long arg2);
8804 long sys_nfsservctl(int cmd,
8805 struct nfsctl_arg *arg,
8807 long sys_syslog(int type, char *buf, int len);
8808 long sys_uselib(const char *library);
8809 long sys_ni_syscall(void);
8810 long sys_ptrace(long request, long pid, long addr, long data);
8812 long sys_add_key(const char *_type,
8813 const char *_description,
8814 const void *_payload,
8816 key_serial_t destringid);
8818 long sys_request_key(const char *_type,
8819 const char *_description,
8820 const char *_callout_info,
8821 key_serial_t destringid);
8823 long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3,
8824 unsigned long arg4, unsigned long arg5);
8826 long sys_ioprio_set(int which, int who, int ioprio);
8827 long sys_ioprio_get(int which, int who);
8828 long sys_set_mempolicy(int mode, unsigned long *nmask,
8829 unsigned long maxnode);
8830 long sys_migrate_pages(pid_t pid, unsigned long maxnode,
8831 const unsigned long *from,
8832 const unsigned long *to);
8833 long sys_move_pages(pid_t pid, unsigned long nr_pages,
8834 const void * *pages,
8838 long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
8843 long sys_mbind(unsigned long start, unsigned long len,
8845 unsigned long *nmask,
8846 unsigned long maxnode,
8848 long sys_get_mempolicy(int *policy,
8849 unsigned long *nmask,
8850 unsigned long maxnode,
8851 unsigned long addr, unsigned long flags);
8853 long sys_inotify_init(void);
8854 long sys_inotify_add_watch(int fd, const char *path,
8856 long sys_inotify_rm_watch(int fd, u32 wd);
8858 long sys_spu_run(int fd, __u32 *unpc,
8860 long sys_spu_create(const char *name,
8861 unsigned int flags, mode_t mode);
8863 long sys_mknodat(int dfd, const char * filename, int mode,
8865 long sys_mkdirat(int dfd, const char * pathname, int mode);
8866 long sys_unlinkat(int dfd, const char * pathname, int flag);
8867 long sys_symlinkat(const char * oldname,
8868 int newdfd, const char * newname);
8869 long sys_linkat(int olddfd, const char *oldname,
8870 int newdfd, const char *newname, int flags);
8871 long sys_renameat(int olddfd, const char * oldname,
8872 int newdfd, const char * newname);
8873 long sys_futimesat(int dfd, char *filename,
8874 struct timeval *utimes);
8875 long sys_faccessat(int dfd, const char *filename, int mode);
8876 long sys_fchmodat(int dfd, const char * filename,
8878 long sys_fchownat(int dfd, const char *filename, uid_t user,
8879 gid_t group, int flag);
8880 long sys_openat(int dfd, const char *filename, int flags,
8882 long sys_newfstatat(int dfd, char *filename,
8883 struct stat *statbuf, int flag);
8884 long sys_fstatat64(int dfd, char *filename,
8885 struct stat64 *statbuf, int flag);
8886 long sys_readlinkat(int dfd, const char *path, char *buf,
8888 long sys_utimensat(int dfd, char *filename,
8889 struct timespec *utimes, int flags);
8890 long compat_sys_futimesat(unsigned int dfd, char *filename,
8891 struct compat_timeval *t);
8892 long compat_sys_newfstatat(unsigned int dfd, char * filename,
8893 struct compat_stat *statbuf,
8895 long compat_sys_openat(unsigned int dfd, const char *filename,
8896 int flags, int mode);
8897 long sys_unshare(unsigned long unshare_flags);
8899 long sys_splice(int fd_in, loff_t *off_in,
8900 int fd_out, loff_t *off_out,
8901 size_t len, unsigned int flags);
8903 long sys_vmsplice(int fd, const struct iovec *iov,
8904 unsigned long nr_segs, unsigned int flags);
8906 long sys_tee(int fdin, int fdout, size_t len, unsigned int flags);
8908 long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
8909 unsigned int flags);
8910 long sys_sync_file_range2(int fd, unsigned int flags,
8911 loff_t offset, loff_t nbytes);
8912 long sys_get_robust_list(int pid,
8913 struct robust_list_head * *head_ptr,
8915 long sys_set_robust_list(struct robust_list_head *head,
8917 long sys_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *cache);
8918 long sys_signalfd(int ufd, sigset_t *user_mask, size_t sizemask);
8919 long sys_timerfd(int ufd, int clockid, int flags,
8920 const struct itimerspec *utmr);
8921 long sys_eventfd(unsigned int count);
8923 int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
8924 # 9 "init/initramfs.c" 2
8926 static __attribute__ ((__section__ (".init.data"))) char *message;
8927 static void __attribute__ ((__section__ (".init.text"))) error(char *x)
8933 static void __attribute__ ((__section__ (".init.text"))) *malloc(size_t size)
8935 return kmalloc(size, ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)));
8938 static void __attribute__ ((__section__ (".init.text"))) free(void *where)
8947 static __attribute__ ((__section__ (".init.data"))) struct hash {
8948 int ino, minor, major;
8951 char name[((((4096) + 1) & ~3) + 2)];
8954 static inline __attribute__((always_inline)) int hash(int major, int minor, int ino)
8956 unsigned long tmp = ino + minor + (major << 3);
8961 static char __attribute__ ((__section__ (".init.text"))) *find_link(int major, int minor, int ino,
8962 mode_t mode, char *name)
8964 struct hash **p, *q;
8965 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) {
8966 if ((*p)->ino != ino)
8968 if ((*p)->minor != minor)
8970 if ((*p)->major != major)
8972 if (((*p)->mode ^ mode) & 00170000)
8976 q = (struct hash *)malloc(sizeof(struct hash));
8978 panic("can't allocate link hash entry");
8983 strcpy(q->name, name);
8984 q->next = ((void *)0);
8989 static void __attribute__ ((__section__ (".init.text"))) free_hash(void)
8991 struct hash **p, *q;
8992 for (p = head; p < head + 32; p++) {
9003 static __attribute__ ((__section__ (".init.data"))) unsigned long ino, major, minor, nlink;
9004 static __attribute__ ((__section__ (".init.data"))) mode_t mode;
9005 static __attribute__ ((__section__ (".init.data"))) unsigned long body_len, name_len;
9006 static __attribute__ ((__section__ (".init.data"))) uid_t uid;
9007 static __attribute__ ((__section__ (".init.data"))) gid_t gid;
9008 static __attribute__ ((__section__ (".init.data"))) unsigned rdev;
9010 static void __attribute__ ((__section__ (".init.text"))) parse_header(char *s)
9012 unsigned long parsed[12];
9017 for (i = 0, s += 6; i < 12; i++, s += 8) {
9019 parsed[i] = simple_strtoul(buf, ((void *)0), 16);
9026 body_len = parsed[6];
9029 rdev = new_encode_dev((((parsed[9]) << 20) | (parsed[10])));
9030 name_len = parsed[11];
9035 static __attribute__ ((__section__ (".init.data"))) enum state {
9044 } state, next_state;
9046 static __attribute__ ((__section__ (".init.data"))) char *victim;
9047 static __attribute__ ((__section__ (".init.data"))) unsigned count;
9048 static __attribute__ ((__section__ (".init.data"))) loff_t this_header, next_header;
9050 static __attribute__ ((__section__ (".init.data"))) int dry_run;
9052 static inline __attribute__((always_inline)) void eat(unsigned n)
9059 static __attribute__ ((__section__ (".init.data"))) char *collected;
9060 static __attribute__ ((__section__ (".init.data"))) int remains;
9061 static __attribute__ ((__section__ (".init.data"))) char *collect;
9063 static void __attribute__ ((__section__ (".init.text"))) read_into(char *buf, unsigned size, enum state next)
9065 if (count >= size) {
9070 collect = collected = buf;
9077 static __attribute__ ((__section__ (".init.data"))) char *header_buf, *symlink_buf, *name_buf;
9079 static int __attribute__ ((__section__ (".init.text"))) do_start(void)
9081 read_into(header_buf, 110, GotHeader);
9085 static int __attribute__ ((__section__ (".init.text"))) do_collect(void)
9087 unsigned n = remains;
9090 memcpy(collect, victim, n);
9093 if ((remains -= n) != 0)
9099 static int __attribute__ ((__section__ (".init.text"))) do_header(void)
9101 if (memcmp(collected, "070707", 6)==0) {
9102 error("incorrect cpio method used: use -H newc option");
9105 if (memcmp(collected, "070701", 6)) {
9106 error("no cpio magic");
9109 parse_header(collected);
9110 next_header = this_header + ((((name_len) + 1) & ~3) + 2) + body_len;
9111 next_header = (next_header + 3) & ~3;
9113 read_into(name_buf, ((((name_len) + 1) & ~3) + 2), GotName);
9117 if (name_len <= 0 || name_len > 4096)
9119 if ((((mode) & 00170000) == 0120000)) {
9120 if (body_len > 4096)
9122 collect = collected = symlink_buf;
9123 remains = ((((name_len) + 1) & ~3) + 2) + body_len;
9124 next_state = GotSymlink;
9128 if ((((mode) & 00170000) == 0100000) || !body_len)
9129 read_into(name_buf, ((((name_len) + 1) & ~3) + 2), GotName);
9133 static int __attribute__ ((__section__ (".init.text"))) do_skip(void)
9135 if (this_header + count < next_header) {
9139 eat(next_header - this_header);
9145 static int __attribute__ ((__section__ (".init.text"))) do_reset(void)
9147 while(count && *victim == '\0')
9149 if (count && (this_header & 3))
9150 error("broken padding");
9154 static int __attribute__ ((__section__ (".init.text"))) maybe_link(void)
9157 char *old = find_link(major, minor, ino, mode, collected);
9159 return (sys_link(old, collected) < 0) ? -1 : 1;
9164 static void __attribute__ ((__section__ (".init.text"))) clean_path(char *path, mode_t mode)
9168 if (!sys_newlstat(path, &st) && (st.st_mode^mode) & 00170000) {
9169 if ((((st.st_mode) & 00170000) == 0040000))
9176 static __attribute__ ((__section__ (".init.data"))) int wfd;
9178 static int __attribute__ ((__section__ (".init.text"))) do_name(void)
9182 if (strcmp(collected, "TRAILER!!!") == 0) {
9188 clean_path(collected, mode);
9189 if ((((mode) & 00170000) == 0100000)) {
9190 int ml = maybe_link();
9192 int openflags = 00000001|00000100;
9194 openflags |= 00001000;
9195 wfd = sys_open(collected, openflags, mode);
9198 sys_fchown(wfd, uid, gid);
9199 sys_fchmod(wfd, mode);
9203 } else if ((((mode) & 00170000) == 0040000)) {
9204 sys_mkdir(collected, mode);
9205 sys_chown(collected, uid, gid);
9206 sys_chmod(collected, mode);
9207 } else if ((((mode) & 00170000) == 0060000) || (((mode) & 00170000) == 0020000) ||
9208 (((mode) & 00170000) == 0010000) || (((mode) & 00170000) == 0140000)) {
9209 if (maybe_link() == 0) {
9210 sys_mknod(collected, mode, rdev);
9211 sys_chown(collected, uid, gid);
9212 sys_chmod(collected, mode);
9218 static int __attribute__ ((__section__ (".init.text"))) do_copy(void)
9220 if (count >= body_len) {
9221 sys_write(wfd, victim, body_len);
9227 sys_write(wfd, victim, count);
9234 static int __attribute__ ((__section__ (".init.text"))) do_symlink(void)
9236 collected[((((name_len) + 1) & ~3) + 2) + body_len] = '\0';
9237 clean_path(collected, 0);
9238 sys_symlink(collected + ((((name_len) + 1) & ~3) + 2), collected);
9239 sys_lchown(collected, uid, gid);
9245 static __attribute__ ((__section__ (".init.data"))) int (*actions[])(void) = {
9247 [Collect] = do_collect,
9248 [GotHeader] = do_header,
9250 [GotName] = do_name,
9251 [CopyFile] = do_copy,
9252 [GotSymlink] = do_symlink,
9256 static int __attribute__ ((__section__ (".init.text"))) write_buffer(char *buf, unsigned len)
9261 while (!actions[state]())
9266 static void __attribute__ ((__section__ (".init.text"))) flush_buffer(char *buf, unsigned len)
9271 while ((written = write_buffer(buf, len)) < len && !message) {
9272 char c = buf[written];
9277 } else if (c == 0) {
9282 error("junk in compressed archive");
9285 # 380 "init/initramfs.c"
9286 typedef unsigned char uch;
9287 typedef unsigned short ush;
9288 typedef unsigned long ulg;
9296 static unsigned insize;
9297 static unsigned inptr;
9298 static unsigned outcnt;
9299 static long bytes_out;
9300 # 408 "init/initramfs.c"
9301 static void __attribute__ ((__section__ (".init.text"))) flush_window(void);
9302 static void __attribute__ ((__section__ (".init.text"))) error(char *m);
9303 static void __attribute__ ((__section__ (".init.text"))) gzip_mark(void **);
9304 static void __attribute__ ((__section__ (".init.text"))) gzip_release(void **);
9306 # 1 "init/../lib/inflate.c" 1
9307 # 135 "init/../lib/inflate.c"
9319 static int __attribute__ ((__section__ (".init.text"))) huft_build (unsigned *, unsigned, unsigned, const ush *, const ush *, struct huft **, int *);
9321 static int __attribute__ ((__section__ (".init.text"))) huft_free (struct huft *);
9322 static int __attribute__ ((__section__ (".init.text"))) inflate_codes (struct huft *, struct huft *, int, int);
9323 static int __attribute__ ((__section__ (".init.text"))) inflate_stored (void);
9324 static int __attribute__ ((__section__ (".init.text"))) inflate_fixed (void);
9325 static int __attribute__ ((__section__ (".init.text"))) inflate_dynamic (void);
9326 static int __attribute__ ((__section__ (".init.text"))) inflate_block (int *);
9327 static int __attribute__ ((__section__ (".init.text"))) inflate (void);
9328 # 170 "init/../lib/inflate.c"
9329 static const unsigned border[] = {
9330 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
9331 static const ush cplens[] = {
9332 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
9333 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
9335 static const ush cplext[] = {
9336 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
9337 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99};
9338 static const ush cpdist[] = {
9339 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
9340 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
9341 8193, 12289, 16385, 24577};
9342 static const ush cpdext[] = {
9343 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
9344 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
9346 # 220 "init/../lib/inflate.c"
9350 static const ush mask_bits[] = {
9352 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
9353 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
9355 # 267 "init/../lib/inflate.c"
9356 static const int lbits = 9;
9357 static const int dbits = 6;
9365 static unsigned hufts;
9368 static int __attribute__ ((__section__ (".init.text"))) huft_build(
9387 register unsigned i;
9388 register unsigned j;
9391 register unsigned *p;
9392 register struct huft *q;
9404 unsigned *c, *v, *x;
9410 stk = malloc(sizeof(*stk));
9411 if (stk == ((void *)0))
9420 memset ((stk->c), 0, (sizeof(stk->c)));
9430 *t = (struct huft *)((void *)0);
9440 for (j = 1; j <= 16; j++)
9444 if ((unsigned)l < j)
9446 for (i = 16; i; i--)
9450 if ((unsigned)l > i)
9457 for (y = 1 << j; j < i; j++, y <<= 1)
9458 if ((y -= c[j]) < 0) {
9462 if ((y -= c[i]) < 0) {
9472 p = c + 1; xp = x + 2;
9474 *xp++ = (j += *p++);
9482 if ((j = *p++) != 0)
9494 u[0] = (struct huft *)((void *)0);
9495 q = (struct huft *)((void *)0);
9516 z = (z = g - w) > (unsigned)l ? l : z;
9517 if ((f = 1 << (j = k - w)) > a + 1)
9525 if ((f <<= 1) <= *++xp)
9534 if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) ==
9535 (struct huft *)((void *)0))
9545 *(t = &(q->v.t)) = (struct huft *)((void *)0);
9554 r.e = (uch)(16 + j);
9569 r.e = (uch)(*p < 256 ? 16 : 15);
9575 r.e = (uch)e[*p - s];
9576 r.v.n = d[*p++ - s];
9582 for (j = i >> w; j < z; j += f)
9586 for (j = 1 << (k - 1); i & j; j >>= 1)
9591 while ((i & ((1 << w) - 1)) != x[h])
9604 ret = y != 0 && g != 1;
9613 static int __attribute__ ((__section__ (".init.text"))) huft_free(
9620 register struct huft *p, *q;
9625 while (p != (struct huft *)((void *)0))
9635 static int __attribute__ ((__section__ (".init.text"))) inflate_codes(
9644 register unsigned e;
9650 register unsigned k;
9663 {while(k<((unsigned)bl)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9664 if ((e = (t = tl + ((unsigned)b & ml))->e) > 16)
9668 {b>>=(t->b);k-=(t->b);}
9670 {while(k<(e)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9671 } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16);
9672 {b>>=(t->b);k-=(t->b);}
9675 window[w++] = (uch)t->v.n;
9679 (outcnt=(w),flush_window());
9690 {while(k<(e)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9691 n = t->v.n + ((unsigned)b & mask_bits[e]);
9695 {while(k<((unsigned)bd)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9696 if ((e = (t = td + ((unsigned)b & md))->e) > 16)
9700 {b>>=(t->b);k-=(t->b);}
9702 {while(k<(e)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9703 } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16);
9704 {b>>=(t->b);k-=(t->b);}
9705 {while(k<(e)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9706 d = w - t->v.n - ((unsigned)b & mask_bits[e]);
9712 n -= (e = (e = 0x8000 - ((d &= 0x8000 -1) > w ? d : w)) > n ? n : e);
9716 memcpy(window + w, window + d, e);
9723 window[w++] = window[d++];
9728 (outcnt=(w),flush_window());
9750 static int __attribute__ ((__section__ (".init.text"))) inflate_stored(void)
9756 register unsigned k;
9772 {while(k<(16)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9773 n = ((unsigned)b & 0xffff);
9775 {while(k<(16)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9776 if (n != (unsigned)((~b) & 0xffff))
9784 {while(k<(8)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9785 window[w++] = (uch)b;
9788 (outcnt=(w),flush_window());
9811 static int __attribute__((noinline)) __attribute__ ((__section__ (".init.text"))) inflate_fixed(void)
9825 l = malloc(sizeof(*l) * 288);
9826 if (l == ((void *)0))
9830 for (i = 0; i < 144; i++)
9832 for (; i < 256; i++)
9834 for (; i < 280; i++)
9836 for (; i < 288; i++)
9839 if ((i = huft_build(l, 288, 257, cplens, cplext, &tl, &bl)) != 0) {
9845 for (i = 0; i < 30; i++)
9848 if ((i = huft_build(l, 30, 0, cpdist, cpdext, &td, &bd)) > 1)
9859 if (inflate_codes(tl, td, bl, bd)) {
9875 static int __attribute__((noinline)) __attribute__ ((__section__ (".init.text"))) inflate_dynamic(void)
9892 register unsigned k;
9900 ll = malloc(sizeof(*ll) * (286+30));
9909 {while(k<(5)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9910 nl = 257 + ((unsigned)b & 0x1f);
9912 {while(k<(5)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9913 nd = 1 + ((unsigned)b & 0x1f);
9915 {while(k<(4)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9916 nb = 4 + ((unsigned)b & 0xf);
9921 if (nl > 286 || nd > 30)
9931 for (j = 0; j < nb; j++)
9933 {while(k<(3)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9934 ll[border[j]] = (unsigned)b & 7;
9944 if ((i = huft_build(ll, 19, 19, ((void *)0), ((void *)0), &tl, &bl)) != 0)
9958 while ((unsigned)i < n)
9960 {while(k<((unsigned)bl)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9961 j = (td = tl + ((unsigned)b & m))->b;
9968 {while(k<(2)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9969 j = 3 + ((unsigned)b & 3);
9971 if ((unsigned)i + j > n) {
9980 {while(k<(3)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9981 j = 3 + ((unsigned)b & 7);
9983 if ((unsigned)i + j > n) {
9993 {while(k<(7)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
9994 j = 11 + ((unsigned)b & 0x7f);
9996 if ((unsigned)i + j > n) {
10021 if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0)
10025 error("incomplete literal tree");
10033 if ((i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &td, &bd)) != 0)
10037 error("incomplete distance tree");
10053 if (inflate_codes(tl, td, bl, bd)) {
10077 static int __attribute__ ((__section__ (".init.text"))) inflate_block(
10084 register unsigned k;
10094 {while(k<(1)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
10100 {while(k<(2)){b|=((ulg)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<k;k+=8;}}
10101 t = (unsigned)b & 3;
10111 return inflate_dynamic();
10113 return inflate_stored();
10115 return inflate_fixed();
10128 static int __attribute__ ((__section__ (".init.text"))) inflate(void)
10147 if ((r = inflate_block(&e)) != 0) {
10148 gzip_release(&ptr);
10151 gzip_release(&ptr);
10165 (outcnt=(outcnt),flush_window());
10181 static ulg crc_32_tab[256];
10190 static void __attribute__ ((__section__ (".init.text")))
10201 static const int p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
10205 for (i = 0; i < sizeof(p)/sizeof(int); i++)
10206 e |= 1L << (31 - p[i]);
10210 for (i = 1; i < 256; i++)
10213 for (k = i | 256; k != 1; k >>= 1)
10215 c = c & 1 ? (c >> 1) ^ e : c >> 1;
10223 crc = (ulg)0xffffffffUL;
10225 # 1149 "init/../lib/inflate.c"
10226 static int __attribute__ ((__section__ (".init.text"))) gunzip(void)
10229 unsigned char magic[2];
10235 magic[0] = ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10236 magic[1] = ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10237 method = ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10239 if (magic[0] != 037 ||
10240 ((magic[1] != 0213) && (magic[1] != 0236))) {
10241 error("bad gzip magic numbers");
10247 error("internal error, invalid method");
10251 flags = (uch)(inptr < insize ? inbuf[inptr++] : -1);
10252 if ((flags & 0x20) != 0) {
10253 error("Input is encrypted");
10256 if ((flags & 0x02) != 0) {
10257 error("Multi part input");
10260 if ((flags & 0xC0) != 0) {
10261 error("Input has invalid flags");
10264 ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10265 ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10266 ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10267 ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10269 (void)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10270 (void)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10272 if ((flags & 0x04) != 0) {
10273 unsigned len = (unsigned)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10274 len |= ((unsigned)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }))<<8;
10275 while (len--) (void)({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10279 if ((flags & 0x08) != 0) {
10281 while (({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }) != 0) ;
10285 if ((flags & 0x10) != 0) {
10286 while (({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }) != 0) ;
10290 if ((res = inflate())) {
10295 error("invalid compressed format (err=1)");
10298 error("invalid compressed format (err=2)");
10301 error("out of memory");
10304 error("out of input data");
10307 error("invalid compressed format (other)");
10316 orig_crc = (ulg) ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10317 orig_crc |= (ulg) ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }) << 8;
10318 orig_crc |= (ulg) ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }) << 16;
10319 orig_crc |= (ulg) ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }) << 24;
10321 orig_len = (ulg) ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; });
10322 orig_len |= (ulg) ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }) << 8;
10323 orig_len |= (ulg) ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }) << 16;
10324 orig_len |= (ulg) ({ int v = (inptr < insize ? inbuf[inptr++] : -1); if (v < 0) goto underrun; (uch)v; }) << 24;
10327 if (orig_crc != (crc ^ 0xffffffffUL)) {
10328 error("crc error");
10331 if (orig_len != bytes_out) {
10332 error("length error");
10338 error("out of input data");
10341 # 414 "init/initramfs.c" 2
10343 static void __attribute__ ((__section__ (".init.text"))) gzip_mark(void **ptr)
10347 static void __attribute__ ((__section__ (".init.text"))) gzip_release(void **ptr)
10355 static void __attribute__ ((__section__ (".init.text"))) flush_window(void)
10361 flush_buffer(window, outcnt);
10363 for (n = 0; n < outcnt; n++) {
10365 c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
10368 bytes_out += (ulg)outcnt;
10372 static char * __attribute__ ((__section__ (".init.text"))) unpack_to_rootfs(char *buf, unsigned len, int check_only)
10375 dry_run = check_only;
10376 header_buf = malloc(110);
10377 symlink_buf = malloc(4096 + ((((4096) + 1) & ~3) + 2) + 1);
10378 name_buf = malloc(((((4096) + 1) & ~3) + 2));
10379 window = malloc(0x8000);
10380 if (!window || !header_buf || !symlink_buf || !name_buf)
10381 panic("can't allocate buffers");
10384 message = ((void *)0);
10385 while (!message && len) {
10386 loff_t saved_offset = this_header;
10387 if (*buf == '0' && !(this_header & 3)) {
10389 written = write_buffer(buf, len);
10406 crc = (ulg)0xffffffffL;
10409 if (state != Reset)
10410 error("junk in gzipped archive");
10411 this_header = saved_offset + inptr;
10422 static int __attribute__ ((__section__ (".init.data"))) do_retain_initrd;
10424 static int __attribute__ ((__section__ (".init.text"))) retain_initrd_param(char *str)
10428 do_retain_initrd = 1;
10431 static char __setup_str_retain_initrd_param[] __attribute__ ((__section__ (".init.data"))) = "retain_initrd"; static struct obs_kernel_param __setup_retain_initrd_param __attribute__((__used__)) __attribute__((__section__(".init.setup"))) __attribute__((aligned((sizeof(long))))) = { __setup_str_retain_initrd_param, retain_initrd_param, 0 };
10433 extern char __initramfs_start[], __initramfs_end[];
10435 # 1 "include/linux/initrd.h" 1
10440 extern int rd_doload;
10443 extern int rd_prompt;
10446 extern int rd_image_start;
10449 extern int initrd_below_start_ok;
10452 extern unsigned long initrd_start, initrd_end;
10453 extern void free_initrd_mem(unsigned long, unsigned long);
10455 extern unsigned int real_root_dev;
10456 # 508 "init/initramfs.c" 2
10457 # 1 "include/linux/kexec.h" 1
10458 # 159 "include/linux/kexec.h"
10460 struct task_struct;
10461 static inline __attribute__((always_inline)) void crash_kexec(struct pt_regs *regs) { }
10462 static inline __attribute__((always_inline)) int kexec_should_crash(struct task_struct *p) { return 0; }
10463 # 509 "init/initramfs.c" 2
10465 static void __attribute__ ((__section__ (".init.text"))) free_initrd(void)
10471 if (do_retain_initrd)
10473 # 536 "init/initramfs.c"
10474 free_initrd_mem(initrd_start, initrd_end);
10482 static int __attribute__ ((__section__ (".init.text"))) populate_rootfs(void)
10484 char *err = unpack_to_rootfs(__initramfs_start,
10485 __initramfs_end - __initramfs_start, 0);
10489 if (initrd_start) {
10492 printk("<6>" "checking if image is initramfs...");
10493 err = unpack_to_rootfs((char *)initrd_start,
10494 initrd_end - initrd_start, 1);
10496 printk(" it is\n");
10497 unpack_to_rootfs((char *)initrd_start,
10498 initrd_end - initrd_start, 0);
10502 printk("it isn't (%s); looks like an initrd\n", err);
10503 fd = sys_open("/initrd.image", 00000001|00000100, 0700);
10505 sys_write(fd, (char *)initrd_start,
10506 initrd_end - initrd_start);
10510 # 581 "init/initramfs.c"
10515 static initcall_t __initcall_populate_rootfsrootfs __attribute__((__used__)) __attribute__((__section__(".initcall" "rootfs" ".init"))) = populate_rootfs;