Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 309166 Details for
Bug 451068
ext3: oops in do_split, miscompilation with gcc 4.3.1
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
preprocessed namei.i from 2.6.26-0.57.rc5.git3.fc10.i686
namei.i (text/plain), 715.85 KB, created by
Eric Sandeen
on 2008-06-13 04:19:47 UTC
(
hide
)
Description:
preprocessed namei.i from 2.6.26-0.57.rc5.git3.fc10.i686
Filename:
MIME Type:
Creator:
Eric Sandeen
Created:
2008-06-13 04:19:47 UTC
Size:
715.85 KB
patch
obsolete
># 1 "/root/ext3/namei.c" ># 1 "/usr/src/kernels/2.6.26-0.57.rc5.git3.fc10.i686//" ># 1 "<built-in>" ># 1 "<command-line>" ># 1 "./include/linux/autoconf.h" 1 ># 1 "<command-line>" 2 ># 1 "/root/ext3/namei.c" ># 27 "/root/ext3/namei.c" ># 1 "include/linux/fs.h" 1 ># 9 "include/linux/fs.h" ># 1 "include/linux/limits.h" 1 ># 10 "include/linux/fs.h" 2 ># 1 "include/linux/ioctl.h" 1 > > > ># 1 "include/asm/ioctl.h" 1 ># 1 "include/asm-generic/ioctl.h" 1 ># 72 "include/asm-generic/ioctl.h" >extern unsigned int __invalid_size_argument_for_IOC; ># 1 "include/asm/ioctl.h" 2 ># 5 "include/linux/ioctl.h" 2 ># 11 "include/linux/fs.h" 2 ># 24 "include/linux/fs.h" >extern int sysctl_nr_open; ># 36 "include/linux/fs.h" >struct files_stat_struct { > int nr_files; > int nr_free_files; > int max_files; >}; >extern struct files_stat_struct files_stat; >extern int get_max_files(void); > >struct inodes_stat_t { > int nr_inodes; > int nr_unused; > int dummy[5]; >}; >extern struct inodes_stat_t inodes_stat; > >extern int leases_enable, lease_break_time; > > >extern int dir_notify_enable; ># 274 "include/linux/fs.h" ># 1 "include/linux/linkage.h" 1 > > > ># 1 "include/asm/linkage.h" 1 ># 5 "include/linux/linkage.h" 2 ># 275 "include/linux/fs.h" 2 ># 1 "include/linux/wait.h" 1 ># 22 "include/linux/wait.h" ># 1 "include/linux/list.h" 1 > > > ># 1 "include/linux/stddef.h" 1 > > > ># 1 "include/linux/compiler.h" 1 ># 40 "include/linux/compiler.h" ># 1 "include/linux/compiler-gcc4.h" 1 > > > > > ># 1 "include/linux/compiler-gcc.h" 1 ># 7 "include/linux/compiler-gcc4.h" 2 ># 41 "include/linux/compiler.h" 2 ># 5 "include/linux/stddef.h" 2 ># 15 "include/linux/stddef.h" >enum { > false = 0, > true = 1 >}; ># 5 "include/linux/list.h" 2 ># 1 "include/linux/poison.h" 1 ># 6 "include/linux/list.h" 2 ># 1 "include/linux/prefetch.h" 1 ># 13 "include/linux/prefetch.h" ># 1 "include/linux/types.h" 1 ># 11 "include/linux/types.h" ># 1 "include/linux/posix_types.h" 1 ># 36 "include/linux/posix_types.h" >typedef struct { > unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; >} __kernel_fd_set; > > >typedef void (*__kernel_sighandler_t)(int); > > >typedef int __kernel_key_t; >typedef int __kernel_mqd_t; > ># 1 "include/asm/posix_types.h" 1 > > ># 1 "include/asm/posix_types_32.h" 1 ># 10 "include/asm/posix_types_32.h" >typedef unsigned long __kernel_ino_t; >typedef unsigned short __kernel_mode_t; >typedef unsigned short __kernel_nlink_t; >typedef long __kernel_off_t; >typedef int __kernel_pid_t; >typedef unsigned short __kernel_ipc_pid_t; >typedef unsigned short __kernel_uid_t; >typedef unsigned short __kernel_gid_t; >typedef unsigned int __kernel_size_t; >typedef int __kernel_ssize_t; >typedef int __kernel_ptrdiff_t; >typedef long __kernel_time_t; >typedef long __kernel_suseconds_t; >typedef long __kernel_clock_t; >typedef int __kernel_timer_t; >typedef int __kernel_clockid_t; >typedef int __kernel_daddr_t; >typedef char * __kernel_caddr_t; >typedef unsigned short __kernel_uid16_t; >typedef unsigned short __kernel_gid16_t; >typedef unsigned int __kernel_uid32_t; >typedef unsigned int __kernel_gid32_t; > >typedef unsigned short __kernel_old_uid_t; >typedef unsigned short __kernel_old_gid_t; >typedef unsigned short __kernel_old_dev_t; > > >typedef long long __kernel_loff_t; > > >typedef struct { > int val[2]; >} __kernel_fsid_t; ># 4 "include/asm/posix_types.h" 2 ># 48 "include/linux/posix_types.h" 2 ># 12 "include/linux/types.h" 2 ># 1 "include/asm/types.h" 1 > > > ># 1 "include/asm-generic/int-ll64.h" 1 ># 17 "include/asm-generic/int-ll64.h" >typedef __signed__ char __s8; >typedef unsigned char __u8; > >typedef __signed__ short __s16; >typedef unsigned short __u16; > >typedef __signed__ int __s32; >typedef unsigned int __u32; > > >__extension__ typedef __signed__ long long __s64; >__extension__ typedef unsigned long long __u64; ># 40 "include/asm-generic/int-ll64.h" >typedef signed char s8; >typedef unsigned char u8; > >typedef signed short s16; >typedef unsigned short u16; > >typedef signed int s32; >typedef unsigned int u32; > >typedef signed long long s64; >typedef unsigned long long u64; ># 5 "include/asm/types.h" 2 > > > >typedef unsigned short umode_t; ># 25 "include/asm/types.h" >typedef u64 dma64_addr_t; > > > > >typedef u32 dma_addr_t; ># 13 "include/linux/types.h" 2 > > > >typedef __u32 __kernel_dev_t; > >typedef __kernel_fd_set fd_set; >typedef __kernel_dev_t dev_t; >typedef __kernel_ino_t ino_t; >typedef __kernel_mode_t mode_t; >typedef __kernel_nlink_t nlink_t; >typedef __kernel_off_t off_t; >typedef __kernel_pid_t pid_t; >typedef __kernel_daddr_t daddr_t; >typedef __kernel_key_t key_t; >typedef __kernel_suseconds_t suseconds_t; >typedef __kernel_timer_t timer_t; >typedef __kernel_clockid_t clockid_t; >typedef __kernel_mqd_t mqd_t; > > >typedef _Bool bool; > >typedef __kernel_uid32_t uid_t; >typedef __kernel_gid32_t gid_t; >typedef __kernel_uid16_t uid16_t; >typedef __kernel_gid16_t gid16_t; > >typedef unsigned long uintptr_t; > > > >typedef __kernel_old_uid_t old_uid_t; >typedef __kernel_old_gid_t old_gid_t; ># 57 "include/linux/types.h" >typedef __kernel_loff_t loff_t; ># 66 "include/linux/types.h" >typedef __kernel_size_t size_t; > > > > >typedef __kernel_ssize_t ssize_t; > > > > >typedef __kernel_ptrdiff_t ptrdiff_t; > > > > >typedef __kernel_time_t time_t; > > > > >typedef __kernel_clock_t clock_t; > > > > >typedef __kernel_caddr_t caddr_t; > > > >typedef unsigned char u_char; >typedef unsigned short u_short; >typedef unsigned int u_int; >typedef unsigned long u_long; > > >typedef unsigned char unchar; >typedef unsigned short ushort; >typedef unsigned int uint; >typedef unsigned long ulong; > > > > >typedef __u8 u_int8_t; >typedef __s8 int8_t; >typedef __u16 u_int16_t; >typedef __s16 int16_t; >typedef __u32 u_int32_t; >typedef __s32 int32_t; > > > >typedef __u8 uint8_t; >typedef __u16 uint16_t; >typedef __u32 uint32_t; > > >typedef __u64 uint64_t; >typedef __u64 u_int64_t; >typedef __s64 int64_t; ># 140 "include/linux/types.h" >typedef u64 sector_t; ># 149 "include/linux/types.h" >typedef u64 blkcnt_t; ># 180 "include/linux/types.h" >typedef __u16 __le16; >typedef __u16 __be16; >typedef __u32 __le32; >typedef __u32 __be32; > >typedef __u64 __le64; >typedef __u64 __be64; > >typedef __u16 __sum16; >typedef __u32 __wsum; > > >typedef unsigned gfp_t; > > >typedef u64 resource_size_t; > > > > >struct ustat { > __kernel_daddr_t f_tfree; > __kernel_ino_t f_tinode; > char f_fname[6]; > char f_fpack[6]; >}; ># 14 "include/linux/prefetch.h" 2 ># 1 "include/asm/processor.h" 1 > > > ># 1 "include/asm/processor-flags.h" 1 ># 5 "include/asm/processor.h" 2 > > >struct task_struct; >struct mm_struct; > ># 1 "include/asm/vm86.h" 1 ># 68 "include/asm/vm86.h" >struct vm86_regs { > > > > long ebx; > long ecx; > long edx; > long esi; > long edi; > long ebp; > long eax; > long __null_ds; > long __null_es; > long __null_fs; > long __null_gs; > long orig_eax; > long eip; > unsigned short cs, __csh; > long eflags; > long esp; > unsigned short ss, __ssh; > > > > unsigned short es, __esh; > unsigned short ds, __dsh; > unsigned short fs, __fsh; > unsigned short gs, __gsh; >}; > >struct revectored_struct { > unsigned long __map[8]; >}; > >struct vm86_struct { > struct vm86_regs regs; > unsigned long flags; > unsigned long screen_bitmap; > unsigned long cpu_type; > struct revectored_struct int_revectored; > struct revectored_struct int21_revectored; >}; > > > > > > >struct vm86plus_info_struct { > unsigned long force_return_for_pic:1; > unsigned long vm86dbg_active:1; > unsigned long vm86dbg_TFpendig:1; > unsigned long unused:28; > unsigned long is_vm86pus:1; > unsigned char vm86dbg_intxxtab[32]; >}; > >struct vm86plus_struct { > struct vm86_regs regs; > unsigned long flags; > unsigned long screen_bitmap; > unsigned long cpu_type; > struct revectored_struct int_revectored; > struct revectored_struct int21_revectored; > struct vm86plus_info_struct vm86plus; >}; ># 144 "include/asm/vm86.h" ># 1 "include/asm/ptrace.h" 1 > > > > ># 1 "include/asm/ptrace-abi.h" 1 ># 90 "include/asm/ptrace-abi.h" >struct ptrace_bts_config { > > __u32 size; > > __u32 flags; > > __u32 signal; > > __u32 bts_size; >}; ># 6 "include/asm/ptrace.h" 2 ># 38 "include/asm/ptrace.h" >struct pt_regs { > unsigned long bx; > unsigned long cx; > unsigned long dx; > unsigned long si; > unsigned long di; > unsigned long bp; > unsigned long ax; > unsigned long ds; > unsigned long es; > unsigned long fs; > > unsigned long orig_ax; > unsigned long ip; > unsigned long cs; > unsigned long flags; > unsigned long sp; > unsigned long ss; >}; > ># 1 "include/asm/vm86.h" 1 ># 59 "include/asm/ptrace.h" 2 ># 1 "include/asm/segment.h" 1 ># 201 "include/asm/segment.h" >extern const char early_idt_handlers[32][10]; ># 60 "include/asm/ptrace.h" 2 ># 131 "include/asm/ptrace.h" ># 1 "include/asm/ds.h" 1 ># 24 "include/asm/ds.h" ># 1 "include/linux/init.h" 1 ># 135 "include/linux/init.h" >typedef int (*initcall_t)(void); >typedef void (*exitcall_t)(void); > >extern initcall_t __con_initcall_start[], __con_initcall_end[]; >extern initcall_t __security_initcall_start[], __security_initcall_end[]; > > >extern char __attribute__ ((__section__(".init.data"))) boot_command_line[]; >extern char *saved_command_line; >extern unsigned int reset_devices; > > >void setup_arch(char **); >void prepare_namespace(void); > >extern void (*late_time_init)(void); ># 25 "include/asm/ds.h" 2 > >struct cpuinfo_x86; > > > > > > > >enum bts_qualifier { > BTS_INVALID = 0, > BTS_BRANCH, > BTS_TASK_ARRIVES, > BTS_TASK_DEPARTS >}; > >struct bts_struct { > u64 qualifier; > union { > > struct { > u64 from_ip; > u64 to_ip; > } lbr; > > > u64 jiffies; > } variant; >}; > > > > > >extern int ds_allocate(void **, size_t); >extern int ds_free(void **); >extern int ds_get_bts_size(void *); >extern int ds_get_bts_end(void *); >extern int ds_get_bts_index(void *); >extern int ds_set_overflow(void *, int); >extern int ds_get_overflow(void *); >extern int ds_clear(void *); >extern int ds_read_bts(void *, int, struct bts_struct *); >extern int ds_write_bts(void *, const struct bts_struct *); >extern unsigned long ds_debugctl_mask(void); >extern void __attribute__ ((__section__(".cpuinit.text"))) __attribute__((__cold__)) ds_init_intel(struct cpuinfo_x86 *c); ># 132 "include/asm/ptrace.h" 2 > >struct task_struct; > >extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier); > >extern unsigned long profile_pc(struct pt_regs *regs); > >extern unsigned long >convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs); > > >extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, > int error_code); > > > > >static inline __attribute__((always_inline)) unsigned long regs_return_value(struct pt_regs *regs) >{ > return regs->ax; >} ># 161 "include/asm/ptrace.h" >static inline __attribute__((always_inline)) int user_mode(struct pt_regs *regs) >{ > > return (regs->cs & 0x3) == 0x3; > > > >} > >static inline __attribute__((always_inline)) int user_mode_vm(struct pt_regs *regs) >{ > > return ((regs->cs & 0x3) | (regs->flags & 0x00020000)) >= > 0x3; > > > >} > >static inline __attribute__((always_inline)) int v8086_mode(struct pt_regs *regs) >{ > > return (regs->flags & 0x00020000); > > > >} > > > > > > > >static inline __attribute__((always_inline)) unsigned long kernel_trap_sp(struct pt_regs *regs) >{ > > return (unsigned long)regs; > > > >} > >static inline __attribute__((always_inline)) unsigned long instruction_pointer(struct pt_regs *regs) >{ > return regs->ip; >} > >static inline __attribute__((always_inline)) unsigned long frame_pointer(struct pt_regs *regs) >{ > return regs->bp; >} > > > > > >extern void user_enable_single_step(struct task_struct *); >extern void user_disable_single_step(struct task_struct *); > >extern void user_enable_block_step(struct task_struct *); > > > > > > >struct user_desc; >extern int do_get_thread_area(struct task_struct *p, int idx, > struct user_desc *info); >extern int do_set_thread_area(struct task_struct *p, int idx, > struct user_desc *info, int can_allocate); ># 145 "include/asm/vm86.h" 2 > >struct kernel_vm86_regs { > > > > struct pt_regs pt; > > > > unsigned short es, __esh; > unsigned short ds, __dsh; > unsigned short fs, __fsh; > unsigned short gs, __gsh; >}; > >struct kernel_vm86_struct { > struct kernel_vm86_regs regs; ># 171 "include/asm/vm86.h" > unsigned long flags; > unsigned long screen_bitmap; > unsigned long cpu_type; > struct revectored_struct int_revectored; > struct revectored_struct int21_revectored; > struct vm86plus_info_struct vm86plus; > struct pt_regs *regs32; ># 188 "include/asm/vm86.h" >}; > > > >void handle_vm86_fault(struct kernel_vm86_regs *, long); >int handle_vm86_trap(struct kernel_vm86_regs *, long, int); >struct pt_regs *save_v86_state(struct kernel_vm86_regs *); > >struct task_struct; >void release_vm86_irqs(struct task_struct *); ># 11 "include/asm/processor.h" 2 ># 1 "include/asm/math_emu.h" 1 > > > > > > > >struct info { > long ___orig_eip; > long ___ebx; > long ___ecx; > long ___edx; > long ___esi; > long ___edi; > long ___ebp; > long ___eax; > long ___ds; > long ___es; > long ___fs; > long ___orig_eax; > long ___eip; > long ___cs; > long ___eflags; > long ___esp; > long ___ss; > long ___vm86_es; > long ___vm86_ds; > long ___vm86_fs; > long ___vm86_gs; >}; ># 12 "include/asm/processor.h" 2 > > ># 1 "include/asm/sigcontext.h" 1 ># 22 "include/asm/sigcontext.h" >struct _fpreg { > unsigned short significand[4]; > unsigned short exponent; >}; > >struct _fpxreg { > unsigned short significand[4]; > unsigned short exponent; > unsigned short padding[3]; >}; > >struct _xmmreg { > unsigned long element[4]; >}; > >struct _fpstate { > > unsigned long cw; > unsigned long sw; > unsigned long tag; > unsigned long ipoff; > unsigned long cssel; > unsigned long dataoff; > unsigned long datasel; > struct _fpreg _st[8]; > unsigned short status; > unsigned short magic; > > > unsigned long _fxsr_env[6]; > unsigned long mxcsr; > unsigned long reserved; > struct _fpxreg _fxsr_st[8]; > struct _xmmreg _xmm[8]; > unsigned long padding[56]; >}; > > > > >struct sigcontext { > unsigned short gs, __gsh; > unsigned short fs, __fsh; > unsigned short es, __esh; > unsigned short ds, __dsh; > unsigned long di; > unsigned long si; > unsigned long bp; > unsigned long sp; > unsigned long bx; > unsigned long dx; > unsigned long cx; > unsigned long ax; > unsigned long trapno; > unsigned long err; > unsigned long ip; > unsigned short cs, __csh; > unsigned long flags; > unsigned long sp_at_signal; > unsigned short ss, __ssh; > struct _fpstate *fpstate; > unsigned long oldmask; > unsigned long cr2; >}; ># 15 "include/asm/processor.h" 2 ># 1 "include/asm/current.h" 1 > ># 1 "include/asm/current_32.h" 1 > > > > ># 1 "include/asm/percpu.h" 1 ># 79 "include/asm/percpu.h" ># 1 "include/asm-generic/percpu.h" 1 > > > ># 1 "include/linux/threads.h" 1 ># 5 "include/asm-generic/percpu.h" 2 ># 22 "include/asm-generic/percpu.h" >extern unsigned long __per_cpu_offset[32]; ># 65 "include/asm-generic/percpu.h" >extern void setup_per_cpu_areas(void); ># 80 "include/asm/percpu.h" 2 > > >extern __typeof__(unsigned long) per_cpu__this_cpu_off; > > > >extern void __bad_percpu_size(void); ># 6 "include/asm/current_32.h" 2 > >struct task_struct; > >extern __typeof__(struct task_struct *) per_cpu__current_task; >static inline __attribute__((always_inline)) __attribute__((always_inline)) struct task_struct *get_current(void) >{ > return ({ typeof(per_cpu__current_task) ret__; switch (sizeof(per_cpu__current_task)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__current_task)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__current_task)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__current_task)); break; default: __bad_percpu_size(); } ret__; }); >} ># 3 "include/asm/current.h" 2 ># 16 "include/asm/processor.h" 2 ># 1 "include/asm/cpufeature.h" 1 > > > > > > ># 1 "include/asm/required-features.h" 1 ># 8 "include/asm/cpufeature.h" 2 ># 118 "include/asm/cpufeature.h" ># 1 "include/linux/bitops.h" 1 ># 17 "include/linux/bitops.h" ># 1 "include/asm/bitops.h" 1 ># 13 "include/asm/bitops.h" ># 1 "include/asm/alternative.h" 1 > > > > > ># 1 "include/asm/asm.h" 1 ># 7 "include/asm/alternative.h" 2 ># 42 "include/asm/alternative.h" ># 1 "include/asm/cpufeature.h" 1 ># 43 "include/asm/alternative.h" 2 > >struct alt_instr { > u8 *instr; > u8 *replacement; > u8 cpuid; > u8 instrlen; > u8 replacementlen; > u8 pad1; > > > >}; > >extern void alternative_instructions(void); >extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); > >struct module; > > >extern void alternatives_smp_module_add(struct module *mod, char *name, > void *locks, void *locks_end, > void *text, void *text_end); >extern void alternatives_smp_module_del(struct module *mod); >extern void alternatives_smp_switch(int smp); ># 146 "include/asm/alternative.h" >struct paravirt_patch_site; > >void apply_paravirt(struct paravirt_patch_site *start, > struct paravirt_patch_site *end); ># 158 "include/asm/alternative.h" >extern void add_nops(void *insns, unsigned int len); ># 178 "include/asm/alternative.h" >extern void *text_poke(void *addr, const void *opcode, size_t len); >extern void *text_poke_early(void *addr, const void *opcode, size_t len); ># 14 "include/asm/bitops.h" 2 ># 46 "include/asm/bitops.h" >static inline __attribute__((always_inline)) void set_bit(int nr, volatile void *addr) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "bts %1,%0" : "+m" (*(volatile long *) addr) : "Ir" (nr) : "memory"); >} ># 60 "include/asm/bitops.h" >static inline __attribute__((always_inline)) void __set_bit(int nr, volatile void *addr) >{ > asm volatile("bts %1,%0" : "+m" (*(volatile long *) addr) : "Ir" (nr) : "memory"); >} ># 75 "include/asm/bitops.h" >static inline __attribute__((always_inline)) void clear_bit(int nr, volatile void *addr) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "btr %1,%0" : "+m" (*(volatile long *) addr) : "Ir" (nr)); >} ># 88 "include/asm/bitops.h" >static inline __attribute__((always_inline)) void clear_bit_unlock(unsigned nr, volatile void *addr) >{ > __asm__ __volatile__("": : :"memory"); > clear_bit(nr, addr); >} > >static inline __attribute__((always_inline)) void __clear_bit(int nr, volatile void *addr) >{ > asm volatile("btr %1,%0" : "+m" (*(volatile long *) addr) : "Ir" (nr)); >} ># 111 "include/asm/bitops.h" >static inline __attribute__((always_inline)) void __clear_bit_unlock(unsigned nr, volatile void *addr) >{ > __asm__ __volatile__("": : :"memory"); > __clear_bit(nr, addr); >} ># 129 "include/asm/bitops.h" >static inline __attribute__((always_inline)) void __change_bit(int nr, volatile void *addr) >{ > asm volatile("btc %1,%0" : "+m" (*(volatile long *) addr) : "Ir" (nr)); >} ># 143 "include/asm/bitops.h" >static inline __attribute__((always_inline)) void change_bit(int nr, volatile void *addr) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "btc %1,%0" : "+m" (*(volatile long *) addr) : "Ir" (nr)); >} ># 156 "include/asm/bitops.h" >static inline __attribute__((always_inline)) int test_and_set_bit(int nr, volatile void *addr) >{ > int oldbit; > > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "bts %2,%1\n\t" > "sbb %0,%0" : "=r" (oldbit), "+m" (*(volatile long *) addr) : "Ir" (nr) : "memory"); > > return oldbit; >} ># 173 "include/asm/bitops.h" >static inline __attribute__((always_inline)) int test_and_set_bit_lock(int nr, volatile void *addr) >{ > return test_and_set_bit(nr, addr); >} ># 187 "include/asm/bitops.h" >static inline __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile void *addr) >{ > int oldbit; > > asm("bts %2,%1\n\t" > "sbb %0,%0" > : "=r" (oldbit), "+m" (*(volatile long *) addr) > : "Ir" (nr)); > return oldbit; >} ># 206 "include/asm/bitops.h" >static inline __attribute__((always_inline)) int test_and_clear_bit(int nr, volatile void *addr) >{ > int oldbit; > > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "btr %2,%1\n\t" > "sbb %0,%0" > : "=r" (oldbit), "+m" (*(volatile long *) addr) : "Ir" (nr) : "memory"); > > return oldbit; >} ># 226 "include/asm/bitops.h" >static inline __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile void *addr) >{ > int oldbit; > > asm volatile("btr %2,%1\n\t" > "sbb %0,%0" > : "=r" (oldbit), "+m" (*(volatile long *) addr) > : "Ir" (nr)); > return oldbit; >} > > >static inline __attribute__((always_inline)) int __test_and_change_bit(int nr, volatile void *addr) >{ > int oldbit; > > asm volatile("btc %2,%1\n\t" > "sbb %0,%0" > : "=r" (oldbit), "+m" (*(volatile long *) addr) > : "Ir" (nr) : "memory"); > > return oldbit; >} ># 258 "include/asm/bitops.h" >static inline __attribute__((always_inline)) int test_and_change_bit(int nr, volatile void *addr) >{ > int oldbit; > > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "btc %2,%1\n\t" > "sbb %0,%0" > : "=r" (oldbit), "+m" (*(volatile long *) addr) : "Ir" (nr) : "memory"); > > return oldbit; >} > >static inline __attribute__((always_inline)) int constant_test_bit(int nr, const volatile void *addr) >{ > return ((1UL << (nr % 32)) & > (((unsigned long *)addr)[nr / 32])) != 0; >} > >static inline __attribute__((always_inline)) int variable_test_bit(int nr, volatile const void *addr) >{ > int oldbit; > > asm volatile("bt %2,%1\n\t" > "sbb %0,%0" > : "=r" (oldbit) > : "m" (*(unsigned long *)addr), "Ir" (nr)); > > return oldbit; >} ># 307 "include/asm/bitops.h" >static inline __attribute__((always_inline)) unsigned long __ffs(unsigned long word) >{ > asm("bsf %1,%0" > : "=r" (word) > : "rm" (word)); > return word; >} > > > > > > > >static inline __attribute__((always_inline)) unsigned long ffz(unsigned long word) >{ > asm("bsf %1,%0" > : "=r" (word) > : "r" (~word)); > return word; >} > > > > > > > >static inline __attribute__((always_inline)) unsigned long __fls(unsigned long word) >{ > asm("bsr %1,%0" > : "=r" (word) > : "rm" (word)); > return word; >} ># 355 "include/asm/bitops.h" >static inline __attribute__((always_inline)) int ffs(int x) >{ > int r; > > asm("bsfl %1,%0\n\t" > "cmovzl %2,%0" > : "=r" (r) : "rm" (x), "r" (-1)); > > > > > > > return r + 1; >} ># 382 "include/asm/bitops.h" >static inline __attribute__((always_inline)) int fls(int x) >{ > int r; > > asm("bsrl %1,%0\n\t" > "cmovzl %2,%0" > : "=&r" (r) : "rm" (x), "rm" (-1)); > > > > > > > return r + 1; >} > > > > >static inline __attribute__((always_inline)) void set_bit_string(unsigned long *bitmap, > unsigned long i, int len) >{ > unsigned long end = i + len; > while (i < end) { > __set_bit(i, bitmap); > i++; > } >} > > > ># 1 "include/asm-generic/bitops/sched.h" 1 ># 12 "include/asm-generic/bitops/sched.h" >static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b) >{ > > > > > > if (b[0]) > return __ffs(b[0]); > if (b[1]) > return __ffs(b[1]) + 32; > if (b[2]) > return __ffs(b[2]) + 64; > return __ffs(b[3]) + 96; > > > >} ># 414 "include/asm/bitops.h" 2 > > > ># 1 "include/asm-generic/bitops/hweight.h" 1 > > > > > >extern unsigned int hweight32(unsigned int w); >extern unsigned int hweight16(unsigned int w); >extern unsigned int hweight8(unsigned int w); >extern unsigned long hweight64(__u64 w); ># 418 "include/asm/bitops.h" 2 > > > ># 1 "include/asm-generic/bitops/fls64.h" 1 ># 18 "include/asm-generic/bitops/fls64.h" >static inline __attribute__((always_inline)) int fls64(__u64 x) >{ > __u32 h = x >> 32; > if (h) > return fls(h) + 32; > return fls(x); >} ># 422 "include/asm/bitops.h" 2 > > > ># 1 "include/asm-generic/bitops/ext2-non-atomic.h" 1 > > > ># 1 "include/asm-generic/bitops/le.h" 1 > > > > ># 1 "include/asm/byteorder.h" 1 ># 11 "include/asm/byteorder.h" >static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 ___arch__swab32(__u32 x) >{ > > asm("bswap %0" : "=r" (x) : "0" (x)); > > > > > > > > return x; >} > >static inline __attribute__((always_inline)) __attribute__((__const__)) __u64 ___arch__swab64(__u64 val) >{ > union { > struct { > __u32 a; > __u32 b; > } s; > __u64 u; > } v; > v.u = val; > > asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1" > : "=r" (v.s.a), "=r" (v.s.b) > : "0" (v.s.a), "1" (v.s.b)); > > > > > > > > return v.u; >} ># 79 "include/asm/byteorder.h" ># 1 "include/linux/byteorder/little_endian.h" 1 ># 12 "include/linux/byteorder/little_endian.h" ># 1 "include/linux/byteorder/swab.h" 1 ># 64 "include/linux/byteorder/swab.h" >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 ___swab16(__u16 x) >{ > return x<<8 | x>>8; >} >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 ___swab32(__u32 x) >{ > return x<<24 | x>>24 | > (x & (__u32)0x0000ff00UL)<<8 | > (x & (__u32)0x00ff0000UL)>>8; >} >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 ___swab64(__u64 x) >{ > return x<<56 | x>>56 | > (x & (__u64)0x000000000000ff00ULL)<<40 | > (x & (__u64)0x0000000000ff0000ULL)<<24 | > (x & (__u64)0x00000000ff000000ULL)<< 8 | > (x & (__u64)0x000000ff00000000ULL)>> 8 | > (x & (__u64)0x0000ff0000000000ULL)>>24 | > (x & (__u64)0x00ff000000000000ULL)>>40; >} ># 163 "include/linux/byteorder/swab.h" >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 x) >{ > return ___swab16(x); >} >static __inline__ __attribute__((always_inline)) __u16 __swab16p(const __u16 *x) >{ > return ___swab16(*(x)); >} >static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr) >{ > ((void)(*(addr) = ___swab16(*(addr)))); >} > >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 x) >{ > return ___arch__swab32(x); >} >static __inline__ __attribute__((always_inline)) __u32 __swab32p(const __u32 *x) >{ > return ___arch__swab32(*(x)); >} >static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr) >{ > ((void)(*(addr) = ___arch__swab32(*(addr)))); >} > > >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 x) >{ > > > > > > return ___arch__swab64(x); > >} >static __inline__ __attribute__((always_inline)) __u64 __swab64p(const __u64 *x) >{ > return ___arch__swab64(*(x)); >} >static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr) >{ > ((void)(*(addr) = ___arch__swab64(*(addr)))); >} ># 13 "include/linux/byteorder/little_endian.h" 2 ># 43 "include/linux/byteorder/little_endian.h" >static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p) >{ > return ( __le64)*p; >} >static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p) >{ > return ( __u64)*p; >} >static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p) >{ > return ( __le32)*p; >} >static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p) >{ > return ( __u32)*p; >} >static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p) >{ > return ( __le16)*p; >} >static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p) >{ > return ( __u16)*p; >} >static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p) >{ > return ( __be64)__swab64p(p); >} >static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p) >{ > return __swab64p((__u64 *)p); >} >static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p) >{ > return ( __be32)__swab32p(p); >} >static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p) >{ > return __swab32p((__u32 *)p); >} >static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p) >{ > return ( __be16)__swab16p(p); >} >static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p) >{ > return __swab16p((__u16 *)p); >} ># 105 "include/linux/byteorder/little_endian.h" ># 1 "include/linux/byteorder/generic.h" 1 ># 143 "include/linux/byteorder/generic.h" >static inline __attribute__((always_inline)) void le16_add_cpu(__le16 *var, u16 val) >{ > *var = (( __le16)(__u16)((( __u16)(__le16)(*var)) + val)); >} > >static inline __attribute__((always_inline)) void le32_add_cpu(__le32 *var, u32 val) >{ > *var = (( __le32)(__u32)((( __u32)(__le32)(*var)) + val)); >} > >static inline __attribute__((always_inline)) void le64_add_cpu(__le64 *var, u64 val) >{ > *var = (( __le64)(__u64)((( __u64)(__le64)(*var)) + val)); >} > >static inline __attribute__((always_inline)) void be16_add_cpu(__be16 *var, u16 val) >{ > *var = (( __be16)(__builtin_constant_p((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)((( __u16)(__be16)(*var))) & (__u16)0x00ffU) << 8) | (((__u16)((( __u16)(__be16)(*var))) & (__u16)0xff00U) >> 8) )) : __fswab16((( __u16)(__be16)(*var)))) + val))) ? ((__u16)( (((__u16)((((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)((( __u16)(__be16)(*var))) & (__u16)0x00ffU) << 8) | (((__u16)((( __u16)(__be16)(*var))) & (__u16)0xff00U) >> 8) )) : __fswab16((( __u16)(__be16)(*var)))) + val))) & (__u16)0x00ffU) << 8) | (((__u16)((((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)((( __u16)(__be16)(*var))) & (__u16)0x00ffU) << 8) | (((__u16)((( __u16)(__be16)(*var))) & (__u16)0xff00U) >> 8) )) : __fswab16((( __u16)(__be16)(*var)))) + val))) & (__u16)0xff00U) >> 8) )) : __fswab16((((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)((( __u16)(__be16)(*var))) & (__u16)0x00ffU) << 8) | (((__u16)((( __u16)(__be16)(*var))) & (__u16)0xff00U) >> 8) )) : __fswab16((( __u16)(__be16)(*var)))) + val))))); >} > >static inline __attribute__((always_inline)) void be32_add_cpu(__be32 *var, u32 val) >{ > *var = (( __be32)(__builtin_constant_p((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x000000ffUL) << 24) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((( __u32)(__be32)(*var)))) + val))) ? ((__u32)( (((__u32)((((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x000000ffUL) << 24) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((( __u32)(__be32)(*var)))) + val))) & (__u32)0x000000ffUL) << 24) | (((__u32)((((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x000000ffUL) << 24) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((( __u32)(__be32)(*var)))) + val))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x000000ffUL) << 24) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((( __u32)(__be32)(*var)))) + val))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x000000ffUL) << 24) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((( __u32)(__be32)(*var)))) + val))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x000000ffUL) << 24) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((( __u32)(__be32)(*var))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((( __u32)(__be32)(*var)))) + val))))); >} > >static inline __attribute__((always_inline)) void be64_add_cpu(__be64 *var, u64 val) >{ > *var = (( __be64)(__builtin_constant_p((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) ? ((__u64)( (__u64)(((__u64)((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((( __u64)(__be64)(*var))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((( __u64)(__be64)(*var)))) + val))))); >} ># 106 "include/linux/byteorder/little_endian.h" 2 ># 80 "include/asm/byteorder.h" 2 ># 6 "include/asm-generic/bitops/le.h" 2 ># 5 "include/asm-generic/bitops/ext2-non-atomic.h" 2 ># 426 "include/asm/bitops.h" 2 > > > > > > ># 1 "include/asm-generic/bitops/minix.h" 1 ># 433 "include/asm/bitops.h" 2 ># 18 "include/linux/bitops.h" 2 > > > > > > > >static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count) >{ > int order; > > order = fls(count); > return order; >} > >static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count) >{ > int order; > > order = fls(count) - 1; > if (count & (count - 1)) > order++; > return order; >} > >static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w) >{ > return sizeof(w) == 4 ? hweight32(w) : hweight64(w); >} > > > > > > >static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift) >{ > return (word << shift) | (word >> (32 - shift)); >} > > > > > > >static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift) >{ > return (word >> shift) | (word << (32 - shift)); >} > > > > > > >static inline __attribute__((always_inline)) __u16 rol16(__u16 word, unsigned int shift) >{ > return (word << shift) | (word >> (16 - shift)); >} > > > > > > >static inline __attribute__((always_inline)) __u16 ror16(__u16 word, unsigned int shift) >{ > return (word >> shift) | (word << (16 - shift)); >} > > > > > > >static inline __attribute__((always_inline)) __u8 rol8(__u8 word, unsigned int shift) >{ > return (word << shift) | (word >> (8 - shift)); >} > > > > > > >static inline __attribute__((always_inline)) __u8 ror8(__u8 word, unsigned int shift) >{ > return (word >> shift) | (word << (8 - shift)); >} > >static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l) >{ > if (sizeof(l) == 4) > return fls(l); > return fls64(l); >} ># 125 "include/linux/bitops.h" >extern unsigned long find_first_bit(const unsigned long *addr, > unsigned long size); ># 135 "include/linux/bitops.h" >extern unsigned long find_first_zero_bit(const unsigned long *addr, > unsigned long size); ># 148 "include/linux/bitops.h" >extern unsigned long find_next_bit(const unsigned long *addr, > unsigned long size, unsigned long offset); ># 158 "include/linux/bitops.h" >extern unsigned long find_next_zero_bit(const unsigned long *addr, > unsigned long size, > unsigned long offset); ># 119 "include/asm/cpufeature.h" 2 > >extern const char * const x86_cap_flags[8*32]; >extern const char * const x86_power_flags[32]; ># 17 "include/asm/processor.h" 2 ># 1 "include/asm/system.h" 1 > > > > > > ># 1 "include/asm/cmpxchg.h" 1 > ># 1 "include/asm/cmpxchg_32.h" 1 ># 14 "include/asm/cmpxchg_32.h" >struct __xchg_dummy { > unsigned long a[100]; >}; ># 33 "include/asm/cmpxchg_32.h" >static inline __attribute__((always_inline)) void __set_64bit(unsigned long long *ptr, > unsigned int low, unsigned int high) >{ > asm volatile("\n1:\t" > "movl (%0), %%eax\n\t" > "movl 4(%0), %%edx\n\t" > ".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "cmpxchg8b (%0)\n\t" > "jnz 1b" > : > : "D"(ptr), > "b"(low), > "c"(high) > : "ax", "dx", "memory"); >} > >static inline __attribute__((always_inline)) void __set_64bit_constant(unsigned long long *ptr, > unsigned long long value) >{ > __set_64bit(ptr, (unsigned int)value, (unsigned int)(value >> 32)); >} > > > > >static inline __attribute__((always_inline)) void __set_64bit_var(unsigned long long *ptr, > unsigned long long value) >{ > __set_64bit(ptr, *(((unsigned int *)&(value)) + 0), *(((unsigned int *)&(value)) + 1)); >} ># 79 "include/asm/cmpxchg_32.h" >static inline __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void *ptr, > int size) >{ > switch (size) { > case 1: > asm volatile("xchgb %b0,%1" > : "=q" (x) > : "m" (*((struct __xchg_dummy *)(ptr))), "0" (x) > : "memory"); > break; > case 2: > asm volatile("xchgw %w0,%1" > : "=r" (x) > : "m" (*((struct __xchg_dummy *)(ptr))), "0" (x) > : "memory"); > break; > case 4: > asm volatile("xchgl %0,%1" > : "=r" (x) > : "m" (*((struct __xchg_dummy *)(ptr))), "0" (x) > : "memory"); > break; > } > return x; >} ># 136 "include/asm/cmpxchg_32.h" >static inline __attribute__((always_inline)) unsigned long __cmpxchg(volatile void *ptr, unsigned long old, > unsigned long new, int size) >{ > unsigned long prev; > switch (size) { > case 1: > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "cmpxchgb %b1,%2" > : "=a"(prev) > : "q"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 2: > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "cmpxchgw %w1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 4: > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "cmpxchgl %1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > } > return old; >} > > > > > > >static inline __attribute__((always_inline)) unsigned long __sync_cmpxchg(volatile void *ptr, > unsigned long old, > unsigned long new, int size) >{ > unsigned long prev; > switch (size) { > case 1: > asm volatile("lock; cmpxchgb %b1,%2" > : "=a"(prev) > : "q"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 2: > asm volatile("lock; cmpxchgw %w1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 4: > asm volatile("lock; cmpxchgl %1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > } > return old; >} > >static inline __attribute__((always_inline)) unsigned long __cmpxchg_local(volatile void *ptr, > unsigned long old, > unsigned long new, int size) >{ > unsigned long prev; > switch (size) { > case 1: > asm volatile("cmpxchgb %b1,%2" > : "=a"(prev) > : "q"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 2: > asm volatile("cmpxchgw %w1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > case 4: > asm volatile("cmpxchgl %1,%2" > : "=a"(prev) > : "r"(new), "m"(*((struct __xchg_dummy *)(ptr))), "0"(old) > : "memory"); > return prev; > } > return old; >} > >static inline __attribute__((always_inline)) unsigned long long __cmpxchg64(volatile void *ptr, > unsigned long long old, > unsigned long long new) >{ > unsigned long long prev; > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "cmpxchg8b %3" > : "=A"(prev) > : "b"((unsigned long)new), > "c"((unsigned long)(new >> 32)), > "m"(*((struct __xchg_dummy *)(ptr))), > "0"(old) > : "memory"); > return prev; >} > >static inline __attribute__((always_inline)) unsigned long long __cmpxchg64_local(volatile void *ptr, > unsigned long long old, > unsigned long long new) >{ > unsigned long long prev; > asm volatile("cmpxchg8b %3" > : "=A"(prev) > : "b"((unsigned long)new), > "c"((unsigned long)(new >> 32)), > "m"(*((struct __xchg_dummy *)(ptr))), > "0"(old) > : "memory"); > return prev; >} ># 313 "include/asm/cmpxchg_32.h" >extern unsigned long long cmpxchg_486_u64(volatile void *, u64, u64); ># 3 "include/asm/cmpxchg.h" 2 ># 8 "include/asm/system.h" 2 ># 1 "include/asm/nops.h" 1 ># 9 "include/asm/system.h" 2 > ># 1 "include/linux/kernel.h" 1 ># 10 "include/linux/kernel.h" ># 1 "/usr/lib/gcc/i386-redhat-linux/4.3.1/include/stdarg.h" 1 3 4 ># 43 "/usr/lib/gcc/i386-redhat-linux/4.3.1/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 105 "/usr/lib/gcc/i386-redhat-linux/4.3.1/include/stdarg.h" 3 4 >typedef __gnuc_va_list va_list; ># 11 "include/linux/kernel.h" 2 > > > > > ># 1 "include/linux/log2.h" 1 ># 21 "include/linux/log2.h" >extern __attribute__((const, noreturn)) >int ____ilog2_NaN(void); ># 31 "include/linux/log2.h" >static inline __attribute__((always_inline)) __attribute__((const)) >int __ilog2_u32(u32 n) >{ > return fls(n) - 1; >} > > > >static inline __attribute__((always_inline)) __attribute__((const)) >int __ilog2_u64(u64 n) >{ > return fls64(n) - 1; >} > > > > > > > >static inline __attribute__((always_inline)) __attribute__((const)) >bool is_power_of_2(unsigned long n) >{ > return (n != 0 && ((n & (n - 1)) == 0)); >} > > > > >static inline __attribute__((always_inline)) __attribute__((const)) >unsigned long __roundup_pow_of_two(unsigned long n) >{ > return 1UL << fls_long(n - 1); >} > > > > >static inline __attribute__((always_inline)) __attribute__((const)) >unsigned long __rounddown_pow_of_two(unsigned long n) >{ > return 1UL << (fls_long(n) - 1); >} ># 17 "include/linux/kernel.h" 2 > ># 1 "include/asm/bug.h" 1 ># 38 "include/asm/bug.h" ># 1 "include/asm-generic/bug.h" 1 ># 10 "include/asm-generic/bug.h" >struct bug_entry { > unsigned long bug_addr; > > const char *file; > unsigned short line; > > unsigned short flags; >}; ># 36 "include/asm-generic/bug.h" >extern void warn_on_slowpath(const char *file, const int line); ># 39 "include/asm/bug.h" 2 ># 19 "include/linux/kernel.h" 2 > >extern const char linux_banner[]; >extern const char linux_proc_banner[]; ># 50 "include/linux/kernel.h" ># 1 "include/asm/div64.h" 1 ># 36 "include/asm/div64.h" >static inline __attribute__((always_inline)) u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) >{ > union { > u64 v64; > u32 v32[2]; > } d = { dividend }; > u32 upper; > > upper = d.v32[1]; > d.v32[1] = 0; > if (upper >= divisor) { > d.v32[1] = upper / divisor; > upper %= divisor; > } > asm ("divl %2" : "=a" (d.v32[0]), "=d" (*remainder) : > "rm" (divisor), "0" (d.v32[0]), "1" (upper)); > return d.v64; >} ># 51 "include/linux/kernel.h" 2 ># 89 "include/linux/kernel.h" >extern int console_printk[]; > > > > > > >struct completion; >struct pt_regs; >struct user; ># 111 "include/linux/kernel.h" >extern int _cond_resched(void); > > > > > > > void __might_sleep(char *file, int line); ># 132 "include/linux/kernel.h" >extern struct atomic_notifier_head panic_notifier_list; >extern long (*panic_blink)(long time); > void panic(const char * fmt, ...) > __attribute__ ((noreturn, format (printf, 1, 2))) __attribute__((__cold__)); >extern void oops_enter(void); >extern void oops_exit(void); >extern int oops_may_print(void); > void do_exit(long error_code) > __attribute__((noreturn)); > void complete_and_exit(struct completion *, long) > __attribute__((noreturn)); >extern unsigned long simple_strtoul(const char *,char **,unsigned int); >extern long simple_strtol(const char *,char **,unsigned int); >extern unsigned long long simple_strtoull(const char *,char **,unsigned int); >extern long long simple_strtoll(const char *,char **,unsigned int); >extern int strict_strtoul(const char *, unsigned int, unsigned long *); >extern int strict_strtol(const char *, unsigned int, long *); >extern int strict_strtoull(const char *, unsigned int, unsigned long long *); >extern int strict_strtoll(const char *, unsigned int, long long *); >extern int sprintf(char * buf, const char * fmt, ...) > __attribute__ ((format (printf, 2, 3))); >extern int vsprintf(char *buf, const char *, va_list) > __attribute__ ((format (printf, 2, 0))); >extern int snprintf(char * buf, size_t size, const char * fmt, ...) > __attribute__ ((format (printf, 3, 4))); >extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) > __attribute__ ((format (printf, 3, 0))); >extern int scnprintf(char * buf, size_t size, const char * fmt, ...) > __attribute__ ((format (printf, 3, 4))); >extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) > __attribute__ ((format (printf, 3, 0))); >extern char *kasprintf(gfp_t gfp, const char *fmt, ...) > __attribute__ ((format (printf, 2, 3))); >extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); > >extern int sscanf(const char *, const char *, ...) > __attribute__ ((format (scanf, 2, 3))); >extern int vsscanf(const char *, const char *, va_list) > __attribute__ ((format (scanf, 2, 0))); > >extern int get_option(char **str, int *pint); >extern char *get_options(const char *str, int nints, int *ints); >extern unsigned long long memparse(char *ptr, char **retptr); > >extern int core_kernel_text(unsigned long addr); >extern int __kernel_text_address(unsigned long addr); >extern int kernel_text_address(unsigned long addr); >struct pid; >extern struct pid *session_of_pgrp(struct pid *pgrp); > > > __attribute__((regparm(0))) int vprintk(const char *fmt, va_list args) > __attribute__ ((format (printf, 1, 0))); > __attribute__((regparm(0))) int printk(const char * fmt, ...) > __attribute__ ((format (printf, 1, 2))) __attribute__((__cold__)); >extern int log_buf_get_len(void); >extern int log_buf_read(int idx); >extern int log_buf_copy(char *dest, int idx, int len); > >extern int printk_ratelimit_jiffies; >extern int printk_ratelimit_burst; >extern int printk_ratelimit(void); >extern int __ratelimit(int ratelimit_jiffies, int ratelimit_burst); >extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); >extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, > unsigned int interval_msec); ># 216 "include/linux/kernel.h" >extern void __attribute__((format(printf, 1, 2))) > early_printk(const char *fmt, ...); > >unsigned long int_sqrt(unsigned long); > >static inline __attribute__((always_inline)) void console_silent(void) >{ > (console_printk[0]) = 0; >} > >static inline __attribute__((always_inline)) void console_verbose(void) >{ > if ((console_printk[0])) > (console_printk[0]) = 15; >} > >extern void bust_spinlocks(int yes); >extern void wake_up_klogd(void); >extern int oops_in_progress; >extern int panic_timeout; >extern int panic_on_oops; >extern int panic_on_unrecovered_nmi; >extern int tainted; >extern const char *print_tainted(void); >extern void add_taint(unsigned); >extern int root_mountflags; > > >extern enum system_states { > SYSTEM_BOOTING, > SYSTEM_RUNNING, > SYSTEM_HALT, > SYSTEM_POWER_OFF, > SYSTEM_RESTART, > SYSTEM_SUSPEND_DISK, >} system_state; ># 264 "include/linux/kernel.h" >extern void dump_stack(void) __attribute__((__cold__)); > >enum { > DUMP_PREFIX_NONE, > DUMP_PREFIX_ADDRESS, > DUMP_PREFIX_OFFSET >}; >extern void hex_dump_to_buffer(const void *buf, size_t len, > int rowsize, int groupsize, > char *linebuf, size_t linebuflen, bool ascii); >extern void print_hex_dump(const char *level, const char *prefix_str, > int prefix_type, int rowsize, int groupsize, > const void *buf, size_t len, bool ascii); >extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, > const void *buf, size_t len); > >extern const char hex_asc[]; > > > >static inline __attribute__((always_inline)) char *pack_hex_byte(char *buf, u8 byte) >{ > *buf++ = hex_asc[((byte) & 0xf0) >> 4]; > *buf++ = hex_asc[((byte) & 0x0f)]; > return buf; >} ># 467 "include/linux/kernel.h" >struct sysinfo; >extern int do_sysinfo(struct sysinfo *info); > > > > >struct sysinfo { > long uptime; > unsigned long loads[3]; > unsigned long totalram; > unsigned long freeram; > unsigned long sharedram; > unsigned long bufferram; > unsigned long totalswap; > unsigned long freeswap; > unsigned short procs; > unsigned short pad; > unsigned long totalhigh; > unsigned long freehigh; > unsigned int mem_unit; > char _f[20-2*sizeof(long)-sizeof(int)]; >}; ># 11 "include/asm/system.h" 2 ># 1 "include/linux/irqflags.h" 1 ># 15 "include/linux/irqflags.h" > extern void trace_hardirqs_on(void); > extern void trace_hardirqs_off(void); > extern void trace_softirqs_on(unsigned long ip); > extern void trace_softirqs_off(unsigned long ip); ># 46 "include/linux/irqflags.h" ># 1 "include/asm/irqflags.h" 1 ># 11 "include/asm/irqflags.h" >static inline __attribute__((always_inline)) unsigned long native_save_fl(void) >{ > unsigned long flags; > > asm volatile("# __raw_save_flags\n\t" > "pushf ; pop %0" > : "=g" (flags) > : > : "memory"); > > return flags; >} > >static inline __attribute__((always_inline)) void native_restore_fl(unsigned long flags) >{ > asm volatile("push %0 ; popf" > : > :"g" (flags) > :"memory", "cc"); >} > >static inline __attribute__((always_inline)) void native_irq_disable(void) >{ > asm volatile("cli": : :"memory"); >} > >static inline __attribute__((always_inline)) void native_irq_enable(void) >{ > asm volatile("sti": : :"memory"); >} > >static inline __attribute__((always_inline)) void native_safe_halt(void) >{ > asm volatile("sti; hlt": : :"memory"); >} > >static inline __attribute__((always_inline)) void native_halt(void) >{ > asm volatile("hlt": : :"memory"); >} > > > > ># 1 "include/asm/paravirt.h" 1 > > > > > > ># 1 "include/asm/page.h" 1 > > > ># 1 "include/linux/const.h" 1 ># 5 "include/asm/page.h" 2 ># 42 "include/asm/page.h" ># 1 "include/asm/page_32.h" 1 ># 43 "include/asm/page_32.h" >typedef unsigned long pteval_t; >typedef unsigned long pmdval_t; >typedef unsigned long pudval_t; >typedef unsigned long pgdval_t; >typedef unsigned long pgprotval_t; >typedef unsigned long phys_addr_t; > >typedef union { > pteval_t pte; > pteval_t pte_low; >} pte_t; > > > > > >typedef struct page *pgtable_t; ># 74 "include/asm/page_32.h" >extern int nx_enabled; > > > > > >extern unsigned int __VMALLOC_RESERVE; >extern int sysctl_legacy_va_layout; ># 99 "include/asm/page_32.h" ># 1 "include/linux/string.h" 1 ># 14 "include/linux/string.h" >extern char *strndup_user(const char *, long); > > > > ># 1 "include/asm/string.h" 1 > ># 1 "include/asm/string_32.h" 1 ># 9 "include/asm/string_32.h" >extern char *strcpy(char *dest, const char *src); > > >extern char *strncpy(char *dest, const char *src, size_t count); > > >extern char *strcat(char *dest, const char *src); > > >extern char *strncat(char *dest, const char *src, size_t count); > > >extern int strcmp(const char *cs, const char *ct); > > >extern int strncmp(const char *cs, const char *ct, size_t count); > > >extern char *strchr(const char *s, int c); > > >extern size_t strlen(const char *s); > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void * __memcpy(void * to, const void * from, size_t n) >{ >int d0, d1, d2; >__asm__ __volatile__( > "rep ; movsl\n\t" > "movl %4,%%ecx\n\t" > "andl $3,%%ecx\n\t" > "jz 1f\n\t" > "rep ; movsb\n\t" > "1:" > : "=&c" (d0), "=&D" (d1), "=&S" (d2) > : "0" (n/4), "g" (n), "1" ((long) to), "2" ((long) from) > : "memory"); >return (to); >} > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void * __constant_memcpy(void * to, const void * from, size_t n) >{ > long esi, edi; > if (!n) return to; > > switch (n) { > case 1: *(char*)to = *(char*)from; return to; > case 2: *(short*)to = *(short*)from; return to; > case 4: *(int*)to = *(int*)from; return to; > > case 3: *(short*)to = *(short*)from; > *((char*)to+2) = *((char*)from+2); return to; > case 5: *(int*)to = *(int*)from; > *((char*)to+4) = *((char*)from+4); return to; > case 6: *(int*)to = *(int*)from; > *((short*)to+2) = *((short*)from+2); return to; > case 8: *(int*)to = *(int*)from; > *((int*)to+1) = *((int*)from+1); return to; > > } > > esi = (long) from; > edi = (long) to; > if (n >= 5*4) { > > int ecx; > __asm__ __volatile__( > "rep ; movsl" > : "=&c" (ecx), "=&D" (edi), "=&S" (esi) > : "0" (n/4), "1" (edi),"2" (esi) > : "memory" > ); > } else { > > if (n >= 4*4) __asm__ __volatile__("movsl" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > if (n >= 3*4) __asm__ __volatile__("movsl" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > if (n >= 2*4) __asm__ __volatile__("movsl" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > if (n >= 1*4) __asm__ __volatile__("movsl" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > } > switch (n % 4) { > > case 0: return to; > case 1: __asm__ __volatile__("movsb" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > return to; > case 2: __asm__ __volatile__("movsw" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > return to; > default: __asm__ __volatile__("movsw\n\tmovsb" > :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); > return to; > } >} ># 153 "include/asm/string_32.h" >void *memmove(void * dest,const void * src, size_t n); > > > > >extern void *memchr(const void * cs,int c,size_t count); > >static inline __attribute__((always_inline)) void * __memset_generic(void * s, char c,size_t count) >{ >int d0, d1; >__asm__ __volatile__( > "rep\n\t" > "stosb" > : "=&c" (d0), "=&D" (d1) > :"a" (c),"1" (s),"0" (count) > :"memory"); >return s; >} ># 180 "include/asm/string_32.h" >static inline __attribute__((always_inline)) __attribute__((always_inline)) void * __constant_c_memset(void * s, unsigned long c, size_t count) >{ >int d0, d1; >__asm__ __volatile__( > "rep ; stosl\n\t" > "testb $2,%b3\n\t" > "je 1f\n\t" > "stosw\n" > "1:\ttestb $1,%b3\n\t" > "je 2f\n\t" > "stosb\n" > "2:" > :"=&c" (d0), "=&D" (d1) > :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) > :"memory"); >return (s); >} > > > >extern size_t strnlen(const char * s, size_t count); > > > >extern char *strstr(const char *cs, const char *ct); > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count) >{ > switch (count) { > case 0: > return s; > case 1: > *(unsigned char *)s = pattern & 0xff; > return s; > case 2: > *(unsigned short *)s = pattern & 0xffff; > return s; > case 3: > *(unsigned short *)s = pattern & 0xffff; > *(2+(unsigned char *)s) = pattern & 0xff; > return s; > case 4: > *(unsigned long *)s = pattern; > return s; > } > > > > > > > >{ > int d0, d1; > switch (count % 4) { > case 0: __asm__ __volatile__( "rep ; stosl" "" : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory"); return s; > case 1: __asm__ __volatile__( "rep ; stosl" "\n\tstosb" : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory"); return s; > case 2: __asm__ __volatile__( "rep ; stosl" "\n\tstosw" : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory"); return s; > default: __asm__ __volatile__( "rep ; stosl" "\n\tstosw\n\tstosb" : "=&c" (d0), "=&D" (d1) : "a" (pattern),"0" (count/4),"1" ((long) s) : "memory"); return s; > } >} > > >} ># 269 "include/asm/string_32.h" >extern void *memscan(void * addr, int c, size_t size); ># 3 "include/asm/string.h" 2 ># 20 "include/linux/string.h" 2 ># 28 "include/linux/string.h" >size_t strlcpy(char *, const char *, size_t); ># 37 "include/linux/string.h" >extern size_t strlcat(char *, const char *, __kernel_size_t); ># 46 "include/linux/string.h" >extern int strnicmp(const char *, const char *, __kernel_size_t); > > >extern int strcasecmp(const char *s1, const char *s2); > > >extern int strncasecmp(const char *s1, const char *s2, size_t n); > > > > > >extern char * strnchr(const char *, size_t, int); > > >extern char * strrchr(const char *,int); > >extern char * strstrip(char *); ># 74 "include/linux/string.h" >extern char * strpbrk(const char *,const char *); > > >extern char * strsep(char **,const char *); > > >extern __kernel_size_t strspn(const char *,const char *); > > >extern __kernel_size_t strcspn(const char *,const char *); ># 99 "include/linux/string.h" >extern int __builtin_memcmp(const void *,const void *,__kernel_size_t); > > > > > >extern char *kstrdup(const char *s, gfp_t gfp); >extern char *kstrndup(const char *s, size_t len, gfp_t gfp); >extern void *kmemdup(const void *src, size_t len, gfp_t gfp); > >extern char **argv_split(gfp_t gfp, const char *str, int *argcp); >extern void argv_free(char **argv); > >extern bool sysfs_streq(const char *s1, const char *s2); ># 100 "include/asm/page_32.h" 2 > >static inline __attribute__((always_inline)) void clear_page(void *page) >{ > (__builtin_constant_p(0) ? (__builtin_constant_p((((1UL) << 12))) ? __constant_c_and_count_memset(((page)),((0x01010101UL*(unsigned char)(0))),((((1UL) << 12)))) : __constant_c_memset(((page)),((0x01010101UL*(unsigned char)(0))),((((1UL) << 12))))) : (__builtin_constant_p((((1UL) << 12))) ? __memset_generic((((page))),(((0))),(((((1UL) << 12))))) : __memset_generic(((page)),((0)),((((1UL) << 12)))))); >} > >static inline __attribute__((always_inline)) void copy_page(void *to, void *from) >{ > (__builtin_constant_p(((1UL) << 12)) ? __constant_memcpy((to),(from),(((1UL) << 12))) : __memcpy((to),(from),(((1UL) << 12)))); >} ># 43 "include/asm/page.h" 2 ># 54 "include/asm/page.h" >extern int page_is_ram(unsigned long pagenr); >extern int devmem_is_allowed(unsigned long pagenr); > >extern unsigned long max_pfn_mapped; > >struct page; > >static inline __attribute__((always_inline)) void clear_user_page(void *page, unsigned long vaddr, > struct page *pg) >{ > clear_page(page); >} > >static inline __attribute__((always_inline)) void copy_user_page(void *to, void *from, unsigned long vaddr, > struct page *topage) >{ > copy_page(to, from); >} > > > > > >typedef struct { pgdval_t pgd; } pgd_t; >typedef struct { pgprotval_t pgprot; } pgprot_t; > >static inline __attribute__((always_inline)) pgd_t native_make_pgd(pgdval_t val) >{ > return (pgd_t) { val }; >} > >static inline __attribute__((always_inline)) pgdval_t native_pgd_val(pgd_t pgd) >{ > return pgd.pgd; >} ># 124 "include/asm/page.h" ># 1 "include/asm-generic/pgtable-nopmd.h" 1 > > > > > ># 1 "include/asm-generic/pgtable-nopud.h" 1 ># 13 "include/asm-generic/pgtable-nopud.h" >typedef struct { pgd_t pgd; } pud_t; ># 25 "include/asm-generic/pgtable-nopud.h" >static inline __attribute__((always_inline)) int pgd_none(pgd_t pgd) { return 0; } >static inline __attribute__((always_inline)) int pgd_bad(pgd_t pgd) { return 0; } >static inline __attribute__((always_inline)) int pgd_present(pgd_t pgd) { return 1; } >static inline __attribute__((always_inline)) void pgd_clear(pgd_t *pgd) { } ># 38 "include/asm-generic/pgtable-nopud.h" >static inline __attribute__((always_inline)) pud_t * pud_offset(pgd_t * pgd, unsigned long address) >{ > return (pud_t *)pgd; >} ># 7 "include/asm-generic/pgtable-nopmd.h" 2 ># 15 "include/asm-generic/pgtable-nopmd.h" >typedef struct { pud_t pud; } pmd_t; ># 27 "include/asm-generic/pgtable-nopmd.h" >static inline __attribute__((always_inline)) int pud_none(pud_t pud) { return 0; } >static inline __attribute__((always_inline)) int pud_bad(pud_t pud) { return 0; } >static inline __attribute__((always_inline)) int pud_present(pud_t pud) { return 1; } >static inline __attribute__((always_inline)) void pud_clear(pud_t *pud) { } ># 41 "include/asm-generic/pgtable-nopmd.h" >static inline __attribute__((always_inline)) pmd_t * pmd_offset(pud_t * pud, unsigned long address) >{ > return (pmd_t *)pud; >} ># 125 "include/asm/page.h" 2 > >static inline __attribute__((always_inline)) pmdval_t native_pmd_val(pmd_t pmd) >{ > return native_pgd_val(pmd.pud.pgd); >} > > >static inline __attribute__((always_inline)) pte_t native_make_pte(pteval_t val) >{ > return (pte_t) { .pte = val }; >} > >static inline __attribute__((always_inline)) pteval_t native_pte_val(pte_t pte) >{ > return pte.pte; >} > > > > > ># 1 "include/asm/paravirt.h" 1 ># 147 "include/asm/page.h" 2 ># 183 "include/asm/page.h" ># 1 "include/asm-generic/memory_model.h" 1 ># 184 "include/asm/page.h" 2 ># 1 "include/asm-generic/page.h" 1 ># 9 "include/asm-generic/page.h" >static __inline__ __attribute__((always_inline)) __attribute__((__const__)) int get_order(unsigned long size) >{ > int order; > > size = (size - 1) >> (12 - 1); > order = -1; > do { > size >>= 1; > order++; > } while (size); > return order; >} ># 185 "include/asm/page.h" 2 ># 8 "include/asm/paravirt.h" 2 ># 32 "include/asm/paravirt.h" ># 1 "include/linux/cpumask.h" 1 ># 90 "include/linux/cpumask.h" ># 1 "include/linux/bitmap.h" 1 ># 87 "include/linux/bitmap.h" >extern int __bitmap_empty(const unsigned long *bitmap, int bits); >extern int __bitmap_full(const unsigned long *bitmap, int bits); >extern int __bitmap_equal(const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern void __bitmap_complement(unsigned long *dst, const unsigned long *src, > int bits); >extern void __bitmap_shift_right(unsigned long *dst, > const unsigned long *src, int shift, int bits); >extern void __bitmap_shift_left(unsigned long *dst, > const unsigned long *src, int shift, int bits); >extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern int __bitmap_intersects(const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern int __bitmap_subset(const unsigned long *bitmap1, > const unsigned long *bitmap2, int bits); >extern int __bitmap_weight(const unsigned long *bitmap, int bits); > >extern int bitmap_scnprintf(char *buf, unsigned int len, > const unsigned long *src, int nbits); >extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, > unsigned long *dst, int nbits); >extern int bitmap_parse_user(const char *ubuf, unsigned int ulen, > unsigned long *dst, int nbits); >extern int bitmap_scnlistprintf(char *buf, unsigned int len, > const unsigned long *src, int nbits); >extern int bitmap_parselist(const char *buf, unsigned long *maskp, > int nmaskbits); >extern void bitmap_remap(unsigned long *dst, const unsigned long *src, > const unsigned long *old, const unsigned long *new, int bits); >extern int bitmap_bitremap(int oldbit, > const unsigned long *old, const unsigned long *new, int bits); >extern void bitmap_onto(unsigned long *dst, const unsigned long *orig, > const unsigned long *relmap, int bits); >extern void bitmap_fold(unsigned long *dst, const unsigned long *orig, > int sz, int bits); >extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); >extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); >extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); > > > > > > > >static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits) >{ > if (nbits <= 32) > *dst = 0UL; > else { > int len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long); > (__builtin_constant_p(0) ? (__builtin_constant_p((len)) ? __constant_c_and_count_memset(((dst)),((0x01010101UL*(unsigned char)(0))),((len))) : __constant_c_memset(((dst)),((0x01010101UL*(unsigned char)(0))),((len)))) : (__builtin_constant_p((len)) ? __memset_generic((((dst))),(((0))),(((len)))) : __memset_generic(((dst)),((0)),((len))))); > } >} > >static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits) >{ > size_t nlongs = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))); > if (nlongs > 1) { > int len = (nlongs - 1) * sizeof(unsigned long); > (__builtin_constant_p(0xff) ? (__builtin_constant_p((len)) ? __constant_c_and_count_memset(((dst)),((0x01010101UL*(unsigned char)(0xff))),((len))) : __constant_c_memset(((dst)),((0x01010101UL*(unsigned char)(0xff))),((len)))) : (__builtin_constant_p((len)) ? __memset_generic((((dst))),(((0xff))),(((len)))) : __memset_generic(((dst)),((0xff)),((len))))); > } > dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); >} > >static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src, > int nbits) >{ > if (nbits <= 32) > *dst = *src; > else { > int len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long); > (__builtin_constant_p(len) ? __constant_memcpy((dst),(src),(len)) : __memcpy((dst),(src),(len))); > } >} > >static inline __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > *dst = *src1 & *src2; > else > __bitmap_and(dst, src1, src2, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > *dst = *src1 | *src2; > else > __bitmap_or(dst, src1, src2, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > *dst = *src1 ^ *src2; > else > __bitmap_xor(dst, src1, src2, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_andnot(unsigned long *dst, const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > *dst = *src1 & ~(*src2); > else > __bitmap_andnot(dst, src1, src2, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src, > int nbits) >{ > if (nbits <= 32) > *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); > else > __bitmap_complement(dst, src, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > else > return __bitmap_equal(src1, src2, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0; > else > return __bitmap_intersects(src1, src2, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1, > const unsigned long *src2, int nbits) >{ > if (nbits <= 32) > return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > else > return __bitmap_subset(src1, src2, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits) >{ > if (nbits <= 32) > return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > else > return __bitmap_empty(src, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits) >{ > if (nbits <= 32) > return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > else > return __bitmap_full(src, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits) >{ > if (nbits <= 32) > return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); > return __bitmap_weight(src, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst, > const unsigned long *src, int n, int nbits) >{ > if (nbits <= 32) > *dst = *src >> n; > else > __bitmap_shift_right(dst, src, n, nbits); >} > >static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst, > const unsigned long *src, int n, int nbits) >{ > if (nbits <= 32) > *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); > else > __bitmap_shift_left(dst, src, n, nbits); >} > >static inline __attribute__((always_inline)) int bitmap_parse(const char *buf, unsigned int buflen, > unsigned long *maskp, int nmaskbits) >{ > return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits); >} ># 91 "include/linux/cpumask.h" 2 > >typedef struct { unsigned long bits[(((32) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; } cpumask_t; >extern cpumask_t _unused_cpumask_arg_; > > >static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp) >{ > set_bit(cpu, dstp->bits); >} > > >static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp) >{ > clear_bit(cpu, dstp->bits); >} > > >static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits) >{ > bitmap_fill(dstp->bits, nbits); >} > > >static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits) >{ > bitmap_zero(dstp->bits, nbits); >} > > > > > >static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr) >{ > return test_and_set_bit(cpu, addr->bits); >} > > >static inline __attribute__((always_inline)) void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); >} > > >static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); >} > > >static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); >} > > >static inline __attribute__((always_inline)) void __cpus_complement(cpumask_t *dstp, > const cpumask_t *srcp, int nbits) >{ > bitmap_complement(dstp->bits, srcp->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > return bitmap_equal(src1p->bits, src2p->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > return bitmap_intersects(src1p->bits, src2p->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p, > const cpumask_t *src2p, int nbits) >{ > return bitmap_subset(src1p->bits, src2p->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits) >{ > return bitmap_empty(srcp->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __cpus_full(const cpumask_t *srcp, int nbits) >{ > return bitmap_full(srcp->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits) >{ > return bitmap_weight(srcp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __cpus_shift_right(cpumask_t *dstp, > const cpumask_t *srcp, int n, int nbits) >{ > bitmap_shift_right(dstp->bits, srcp->bits, n, nbits); >} > > > >static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp, > const cpumask_t *srcp, int n, int nbits) >{ > bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); >} > > >int __first_cpu(const cpumask_t *srcp); > >int __next_cpu(int n, const cpumask_t *srcp); ># 286 "include/linux/cpumask.h" >static inline __attribute__((always_inline)) int __cpumask_scnprintf(char *buf, int len, > const cpumask_t *srcp, int nbits) >{ > return bitmap_scnprintf(buf, len, srcp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __cpumask_parse_user(const char *buf, int len, > cpumask_t *dstp, int nbits) >{ > return bitmap_parse_user(buf, len, dstp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __cpulist_scnprintf(char *buf, int len, > const cpumask_t *srcp, int nbits) >{ > return bitmap_scnlistprintf(buf, len, srcp->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits) >{ > return bitmap_parselist(buf, dstp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __cpu_remap(int oldbit, > const cpumask_t *oldp, const cpumask_t *newp, int nbits) >{ > return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, > const cpumask_t *oldp, const cpumask_t *newp, int nbits) >{ > bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __cpus_onto(cpumask_t *dstp, const cpumask_t *origp, > const cpumask_t *relmapp, int nbits) >{ > bitmap_onto(dstp->bits, origp->bits, relmapp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp, > int sz, int nbits) >{ > bitmap_fold(dstp->bits, origp->bits, sz, nbits); >} ># 412 "include/linux/cpumask.h" >extern cpumask_t cpu_possible_map; >extern cpumask_t cpu_online_map; >extern cpumask_t cpu_present_map; ># 435 "include/linux/cpumask.h" >extern int nr_cpu_ids; > >int __any_online_cpu(const cpumask_t *mask); ># 33 "include/asm/paravirt.h" 2 ># 1 "include/asm/kmap_types.h" 1 ># 10 "include/asm/kmap_types.h" >enum km_type { >__KM_FENCE_0 , KM_BOUNCE_READ, >__KM_FENCE_1 , KM_SKB_SUNRPC_DATA, >__KM_FENCE_2 , KM_SKB_DATA_SOFTIRQ, >__KM_FENCE_3 , KM_USER0, >__KM_FENCE_4 , KM_USER1, >__KM_FENCE_5 , KM_BIO_SRC_IRQ, >__KM_FENCE_6 , KM_BIO_DST_IRQ, >__KM_FENCE_7 , KM_PTE0, >__KM_FENCE_8 , KM_PTE1, >__KM_FENCE_9 , KM_IRQ0, >__KM_FENCE_10 , KM_IRQ1, >__KM_FENCE_11 , KM_SOFTIRQ0, >__KM_FENCE_12 , KM_SOFTIRQ1, >__KM_FENCE_13 , KM_TYPE_NR >}; ># 34 "include/asm/paravirt.h" 2 ># 1 "include/asm/desc_defs.h" 1 ># 22 "include/asm/desc_defs.h" >struct desc_struct { > union { > struct { > unsigned int a; > unsigned int b; > }; > struct { > u16 limit0; > u16 base0; > unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1; > unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8; > }; > }; >} __attribute__((packed)); > >enum { > GATE_INTERRUPT = 0xE, > GATE_TRAP = 0xF, > GATE_CALL = 0xC, > GATE_TASK = 0x5, >}; > > >struct gate_struct64 { > u16 offset_low; > u16 segment; > unsigned ist : 3, zero0 : 5, type : 5, dpl : 2, p : 1; > u16 offset_middle; > u32 offset_high; > u32 zero1; >} __attribute__((packed)); > > > > > >enum { > DESC_TSS = 0x9, > DESC_LDT = 0x2, > DESCTYPE_S = 0x10, >}; > > >struct ldttss_desc64 { > u16 limit0; > u16 base0; > unsigned base1 : 8, type : 5, dpl : 2, p : 1; > unsigned limit1 : 4, zero0 : 3, g : 1, base2 : 8; > u32 base3; > u32 zero1; >} __attribute__((packed)); > > > > > > >typedef struct desc_struct gate_desc; >typedef struct desc_struct ldt_desc; >typedef struct desc_struct tss_desc; > > >struct desc_ptr { > unsigned short size; > unsigned long address; >} __attribute__((packed)) ; ># 35 "include/asm/paravirt.h" 2 > >struct page; >struct thread_struct; >struct desc_ptr; >struct tss_struct; >struct mm_struct; >struct desc_struct; > > >struct pv_info { > unsigned int kernel_rpl; > int shared_kernel_pmd; > int paravirt_enabled; > const char *name; >}; > >struct pv_init_ops { ># 60 "include/asm/paravirt.h" > unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, > unsigned long addr, unsigned len); > > > void (*arch_setup)(void); > char *(*memory_setup)(void); > void (*post_allocator_init)(void); > > > void (*banner)(void); >}; > > >struct pv_lazy_ops { > > void (*enter)(void); > void (*leave)(void); >}; > >struct pv_time_ops { > void (*time_init)(void); > > > unsigned long (*get_wallclock)(void); > int (*set_wallclock)(unsigned long); > > unsigned long long (*sched_clock)(void); > unsigned long (*get_cpu_khz)(void); >}; > >struct pv_cpu_ops { > > unsigned long (*get_debugreg)(int regno); > void (*set_debugreg)(int regno, unsigned long value); > > void (*clts)(void); > > unsigned long (*read_cr0)(void); > void (*write_cr0)(unsigned long); > > unsigned long (*read_cr4_safe)(void); > unsigned long (*read_cr4)(void); > void (*write_cr4)(unsigned long); > > > > > > > > void (*load_tr_desc)(void); > void (*load_gdt)(const struct desc_ptr *); > void (*load_idt)(const struct desc_ptr *); > void (*store_gdt)(struct desc_ptr *); > void (*store_idt)(struct desc_ptr *); > void (*set_ldt)(const void *desc, unsigned entries); > unsigned long (*store_tr)(void); > void (*load_tls)(struct thread_struct *t, unsigned int cpu); > void (*write_ldt_entry)(struct desc_struct *ldt, int entrynum, > const void *desc); > void (*write_gdt_entry)(struct desc_struct *, > int entrynum, const void *desc, int size); > void (*write_idt_entry)(gate_desc *, > int entrynum, const gate_desc *gate); > void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t); > > void (*set_iopl_mask)(unsigned mask); > > void (*wbinvd)(void); > void (*io_delay)(void); > > > void (*cpuid)(unsigned int *eax, unsigned int *ebx, > unsigned int *ecx, unsigned int *edx); > > > > u64 (*read_msr)(unsigned int msr, int *err); > int (*write_msr)(unsigned int msr, unsigned low, unsigned high); > > u64 (*read_tsc)(void); > u64 (*read_pmc)(int counter); > unsigned long long (*read_tscp)(unsigned int *aux); > > > void (*irq_enable_syscall_ret)(void); > void (*iret)(void); > > void (*swapgs)(void); > > struct pv_lazy_ops lazy_mode; >}; > >struct pv_irq_ops { > void (*init_IRQ)(void); > > > > > > > > unsigned long (*save_fl)(void); > void (*restore_fl)(unsigned long); > void (*irq_disable)(void); > void (*irq_enable)(void); > void (*safe_halt)(void); > void (*halt)(void); >}; > >struct pv_apic_ops { > > > > > > void (*apic_write)(unsigned long reg, u32 v); > void (*apic_write_atomic)(unsigned long reg, u32 v); > u32 (*apic_read)(unsigned long reg); > void (*setup_boot_clock)(void); > void (*setup_secondary_clock)(void); > > void (*startup_ipi_hook)(int phys_apicid, > unsigned long start_eip, > unsigned long start_esp); > >}; > >struct pv_mmu_ops { > > > > > > > void (*pagetable_setup_start)(pgd_t *pgd_base); > void (*pagetable_setup_done)(pgd_t *pgd_base); > > unsigned long (*read_cr2)(void); > void (*write_cr2)(unsigned long); > > unsigned long (*read_cr3)(void); > void (*write_cr3)(unsigned long); > > > > > > void (*activate_mm)(struct mm_struct *prev, > struct mm_struct *next); > void (*dup_mmap)(struct mm_struct *oldmm, > struct mm_struct *mm); > void (*exit_mmap)(struct mm_struct *mm); > > > > void (*flush_tlb_user)(void); > void (*flush_tlb_kernel)(void); > void (*flush_tlb_single)(unsigned long addr); > void (*flush_tlb_others)(const cpumask_t *cpus, struct mm_struct *mm, > unsigned long va); > > > void (*alloc_pte)(struct mm_struct *mm, u32 pfn); > void (*alloc_pmd)(struct mm_struct *mm, u32 pfn); > void (*alloc_pmd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); > void (*alloc_pud)(struct mm_struct *mm, u32 pfn); > void (*release_pte)(u32 pfn); > void (*release_pmd)(u32 pfn); > void (*release_pud)(u32 pfn); > > > void (*set_pte)(pte_t *ptep, pte_t pteval); > void (*set_pte_at)(struct mm_struct *mm, unsigned long addr, > pte_t *ptep, pte_t pteval); > void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); > void (*pte_update)(struct mm_struct *mm, unsigned long addr, > pte_t *ptep); > void (*pte_update_defer)(struct mm_struct *mm, > unsigned long addr, pte_t *ptep); > > pteval_t (*pte_val)(pte_t); > pte_t (*make_pte)(pteval_t pte); > > pgdval_t (*pgd_val)(pgd_t); > pgd_t (*make_pgd)(pgdval_t pgd); ># 272 "include/asm/paravirt.h" > void *(*kmap_atomic_pte)(struct page *page, enum km_type type); > > > struct pv_lazy_ops lazy_mode; >}; > > > > >struct paravirt_patch_template { > struct pv_init_ops pv_init_ops; > struct pv_time_ops pv_time_ops; > struct pv_cpu_ops pv_cpu_ops; > struct pv_irq_ops pv_irq_ops; > struct pv_apic_ops pv_apic_ops; > struct pv_mmu_ops pv_mmu_ops; >}; > >extern struct pv_info pv_info; >extern struct pv_init_ops pv_init_ops; >extern struct pv_time_ops pv_time_ops; >extern struct pv_cpu_ops pv_cpu_ops; >extern struct pv_irq_ops pv_irq_ops; >extern struct pv_apic_ops pv_apic_ops; >extern struct pv_mmu_ops pv_mmu_ops; ># 330 "include/asm/paravirt.h" >unsigned paravirt_patch_nop(void); >unsigned paravirt_patch_ignore(unsigned len); >unsigned paravirt_patch_call(void *insnbuf, > const void *target, u16 tgt_clobbers, > unsigned long addr, u16 site_clobbers, > unsigned len); >unsigned paravirt_patch_jmp(void *insnbuf, const void *target, > unsigned long addr, unsigned len); >unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf, > unsigned long addr, unsigned len); > >unsigned paravirt_patch_insns(void *insnbuf, unsigned len, > const char *start, const char *end); > >unsigned native_patch(u8 type, u16 clobbers, void *ibuf, > unsigned long addr, unsigned len); > >int paravirt_disable_iospace(void); ># 531 "include/asm/paravirt.h" >static inline __attribute__((always_inline)) int paravirt_enabled(void) >{ > return pv_info.paravirt_enabled; >} > >static inline __attribute__((always_inline)) void load_sp0(struct tss_struct *tss, > struct thread_struct *thread) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_sp0) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.load_sp0), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(tss)), "1" ((unsigned long)(thread)) : "memory", "cc" ); }); >} > > >static inline __attribute__((always_inline)) unsigned long get_wallclock(void) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_time_ops.get_wallclock) / sizeof(void *))), [paravirt_opptr] "m" (pv_time_ops.get_wallclock), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_time_ops.get_wallclock) / sizeof(void *))), [paravirt_opptr] "m" (pv_time_ops.get_wallclock), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) int set_wallclock(unsigned long nowtime) >{ > return ({ int __ret; unsigned long __eax, __edx, __ecx; if (sizeof(int) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_time_ops.set_wallclock) / sizeof(void *))), [paravirt_opptr] "m" (pv_time_ops.set_wallclock), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(nowtime)) : "memory", "cc" ); __ret = (int)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_time_ops.set_wallclock) / sizeof(void *))), [paravirt_opptr] "m" (pv_time_ops.set_wallclock), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(nowtime)) : "memory", "cc" ); __ret = (int)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) void (*choose_time_init(void))(void) >{ > return pv_time_ops.time_init; >} > > >static inline __attribute__((always_inline)) void __cpuid(unsigned int *eax, unsigned int *ebx, > unsigned int *ecx, unsigned int *edx) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("push %[_arg4];" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.cpuid) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.cpuid), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((u32)(eax)), "1" ((u32)(ebx)), "2" ((u32)(ecx)), [_arg4] "mr" ((u32)(edx)) : "memory", "cc" ); }); >} > > > > >static inline __attribute__((always_inline)) unsigned long paravirt_get_debugreg(int reg) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.get_debugreg) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.get_debugreg), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(reg)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.get_debugreg) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.get_debugreg), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(reg)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) void set_debugreg(unsigned long val, int reg) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.set_debugreg) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.set_debugreg), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(reg)), "1" ((unsigned long)(val)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void clts(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.clts) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.clts), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) unsigned long read_cr0(void) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr0) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_cr0), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr0) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_cr0), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) void write_cr0(unsigned long x) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_cr0) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.write_cr0), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(x)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) unsigned long read_cr2(void) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.read_cr2) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.read_cr2), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.read_cr2) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.read_cr2), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) void write_cr2(unsigned long x) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.write_cr2) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.write_cr2), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(x)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) unsigned long read_cr3(void) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.read_cr3) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.read_cr3), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.read_cr3) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.read_cr3), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) void write_cr3(unsigned long x) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.write_cr3) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.write_cr3), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(x)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) unsigned long read_cr4(void) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr4) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_cr4), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr4) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_cr4), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} >static inline __attribute__((always_inline)) unsigned long read_cr4_safe(void) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr4_safe) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_cr4_safe), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr4_safe) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_cr4_safe), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) void write_cr4(unsigned long x) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_cr4) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.write_cr4), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(x)) : "memory", "cc" ); }); >} ># 639 "include/asm/paravirt.h" >static inline __attribute__((always_inline)) void raw_safe_halt(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.safe_halt) / sizeof(void *))), [paravirt_opptr] "m" (pv_irq_ops.safe_halt), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void halt(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.safe_halt) / sizeof(void *))), [paravirt_opptr] "m" (pv_irq_ops.safe_halt), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void wbinvd(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.wbinvd) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.wbinvd), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > > > >static inline __attribute__((always_inline)) u64 paravirt_read_msr(unsigned msr, int *err) >{ > return ({ u64 __ret; unsigned long __eax, __edx, __ecx; if (sizeof(u64) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_msr) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_msr), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(msr)), "1" ((unsigned long)(err)) : "memory", "cc" ); __ret = (u64)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_msr) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_msr), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(msr)), "1" ((unsigned long)(err)) : "memory", "cc" ); __ret = (u64)__eax; } __ret; }); >} >static inline __attribute__((always_inline)) int paravirt_write_msr(unsigned msr, unsigned low, unsigned high) >{ > return ({ int __ret; unsigned long __eax, __edx, __ecx; if (sizeof(int) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_msr) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.write_msr), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(msr)), "1"((unsigned long)(low)), "2"((unsigned long)(high)) : "memory", "cc" ); __ret = (int)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_msr) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.write_msr), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(msr)), "1"((unsigned long)(low)), "2"((unsigned long)(high)) : "memory", "cc" ); __ret = (int)__eax; } __ret; }); >} ># 698 "include/asm/paravirt.h" >static inline __attribute__((always_inline)) int rdmsrl_safe(unsigned msr, unsigned long long *p) >{ > int err; > > *p = paravirt_read_msr(msr, &err); > return err; >} > >static inline __attribute__((always_inline)) u64 paravirt_read_tsc(void) >{ > return ({ u64 __ret; unsigned long __eax, __edx, __ecx; if (sizeof(u64) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_tsc) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_tsc), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (u64)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_tsc) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_tsc), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (u64)__eax; } __ret; }); >} ># 719 "include/asm/paravirt.h" >static inline __attribute__((always_inline)) unsigned long long paravirt_sched_clock(void) >{ > return ({ unsigned long long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_time_ops.sched_clock) / sizeof(void *))), [paravirt_opptr] "m" (pv_time_ops.sched_clock), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_time_ops.sched_clock) / sizeof(void *))), [paravirt_opptr] "m" (pv_time_ops.sched_clock), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long long)__eax; } __ret; }); >} > > >static inline __attribute__((always_inline)) unsigned long long paravirt_read_pmc(int counter) >{ > return ({ u64 __ret; unsigned long __eax, __edx, __ecx; if (sizeof(u64) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_pmc) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_pmc), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(counter)) : "memory", "cc" ); __ret = (u64)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_pmc) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_pmc), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(counter)) : "memory", "cc" ); __ret = (u64)__eax; } __ret; }); >} ># 737 "include/asm/paravirt.h" >static inline __attribute__((always_inline)) unsigned long long paravirt_rdtscp(unsigned int *aux) >{ > return ({ u64 __ret; unsigned long __eax, __edx, __ecx; if (sizeof(u64) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_tscp) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_tscp), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(aux)) : "memory", "cc" ); __ret = (u64)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_tscp) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.read_tscp), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(aux)) : "memory", "cc" ); __ret = (u64)__eax; } __ret; }); >} ># 758 "include/asm/paravirt.h" >static inline __attribute__((always_inline)) void load_TR_desc(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_tr_desc) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.load_tr_desc), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void load_gdt(const struct desc_ptr *dtr) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_gdt) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.load_gdt), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(dtr)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void load_idt(const struct desc_ptr *dtr) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_idt) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.load_idt), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(dtr)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void set_ldt(const void *addr, unsigned entries) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.set_ldt) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.set_ldt), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(addr)), "1" ((unsigned long)(entries)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void store_gdt(struct desc_ptr *dtr) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.store_gdt) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.store_gdt), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(dtr)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void store_idt(struct desc_ptr *dtr) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.store_idt) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.store_idt), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(dtr)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) unsigned long paravirt_store_tr(void) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.store_tr) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.store_tr), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.store_tr) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.store_tr), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) void load_TLS(struct thread_struct *t, unsigned cpu) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_tls) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.load_tls), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(t)), "1" ((unsigned long)(cpu)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void write_ldt_entry(struct desc_struct *dt, int entry, > const void *desc) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_ldt_entry) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.write_ldt_entry), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(dt)), "1"((unsigned long)(entry)), "2"((unsigned long)(desc)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void write_gdt_entry(struct desc_struct *dt, int entry, > void *desc, int type) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("push %[_arg4];" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_gdt_entry) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.write_gdt_entry), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((u32)(dt)), "1" ((u32)(entry)), "2" ((u32)(desc)), [_arg4] "mr" ((u32)(type)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void write_idt_entry(gate_desc *dt, int entry, const gate_desc *g) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_idt_entry) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.write_idt_entry), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(dt)), "1"((unsigned long)(entry)), "2"((unsigned long)(g)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void set_iopl_mask(unsigned mask) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.set_iopl_mask) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.set_iopl_mask), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(mask)) : "memory", "cc" ); }); >} > > >static inline __attribute__((always_inline)) void slow_down_io(void) >{ > pv_cpu_ops.io_delay(); > > > > > >} > > > > > >static inline __attribute__((always_inline)) void apic_write(unsigned long reg, u32 v) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_apic_ops.apic_write) / sizeof(void *))), [paravirt_opptr] "m" (pv_apic_ops.apic_write), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(reg)), "1" ((unsigned long)(v)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void apic_write_atomic(unsigned long reg, u32 v) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_apic_ops.apic_write_atomic) / sizeof(void *))), [paravirt_opptr] "m" (pv_apic_ops.apic_write_atomic), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(reg)), "1" ((unsigned long)(v)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) u32 apic_read(unsigned long reg) >{ > return ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_apic_ops.apic_read) / sizeof(void *))), [paravirt_opptr] "m" (pv_apic_ops.apic_read), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(reg)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_apic_ops.apic_read) / sizeof(void *))), [paravirt_opptr] "m" (pv_apic_ops.apic_read), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(reg)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); >} > >static inline __attribute__((always_inline)) void setup_boot_clock(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_apic_ops.setup_boot_clock) / sizeof(void *))), [paravirt_opptr] "m" (pv_apic_ops.setup_boot_clock), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void setup_secondary_clock(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_apic_ops.setup_secondary_clock) / sizeof(void *))), [paravirt_opptr] "m" (pv_apic_ops.setup_secondary_clock), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > > >static inline __attribute__((always_inline)) void paravirt_post_allocator_init(void) >{ > if (pv_init_ops.post_allocator_init) > (*pv_init_ops.post_allocator_init)(); >} > >static inline __attribute__((always_inline)) void paravirt_pagetable_setup_start(pgd_t *base) >{ > (*pv_mmu_ops.pagetable_setup_start)(base); >} > >static inline __attribute__((always_inline)) void paravirt_pagetable_setup_done(pgd_t *base) >{ > (*pv_mmu_ops.pagetable_setup_done)(base); >} > > >static inline __attribute__((always_inline)) void startup_ipi_hook(int phys_apicid, unsigned long start_eip, > unsigned long start_esp) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_apic_ops.startup_ipi_hook) / sizeof(void *))), [paravirt_opptr] "m" (pv_apic_ops.startup_ipi_hook), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(phys_apicid)), "1"((unsigned long)(start_eip)), "2"((unsigned long)(start_esp)) : "memory", "cc" ); }); > >} > > >static inline __attribute__((always_inline)) void paravirt_activate_mm(struct mm_struct *prev, > struct mm_struct *next) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.activate_mm) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.activate_mm), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(prev)), "1" ((unsigned long)(next)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void arch_dup_mmap(struct mm_struct *oldmm, > struct mm_struct *mm) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.dup_mmap) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.dup_mmap), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(oldmm)), "1" ((unsigned long)(mm)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void arch_exit_mmap(struct mm_struct *mm) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.exit_mmap) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.exit_mmap), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(mm)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void __flush_tlb(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.flush_tlb_user) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.flush_tlb_user), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void __flush_tlb_global(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.flush_tlb_kernel) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.flush_tlb_kernel), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void __flush_tlb_single(unsigned long addr) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.flush_tlb_single) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.flush_tlb_single), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(addr)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, > unsigned long va) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.flush_tlb_others) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.flush_tlb_others), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(&cpumask)), "1"((unsigned long)(mm)), "2"((unsigned long)(va)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void paravirt_alloc_pte(struct mm_struct *mm, unsigned pfn) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.alloc_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.alloc_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(mm)), "1" ((unsigned long)(pfn)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void paravirt_release_pte(unsigned pfn) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.release_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.release_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pfn)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void paravirt_alloc_pmd(struct mm_struct *mm, unsigned pfn) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.alloc_pmd) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.alloc_pmd), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(mm)), "1" ((unsigned long)(pfn)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void paravirt_alloc_pmd_clone(unsigned pfn, unsigned clonepfn, > unsigned start, unsigned count) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("push %[_arg4];" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.alloc_pmd_clone) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.alloc_pmd_clone), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((u32)(pfn)), "1" ((u32)(clonepfn)), "2" ((u32)(start)), [_arg4] "mr" ((u32)(count)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void paravirt_release_pmd(unsigned pfn) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.release_pmd) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.release_pmd), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pfn)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void paravirt_alloc_pud(struct mm_struct *mm, unsigned pfn) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.alloc_pud) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.alloc_pud), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(mm)), "1" ((unsigned long)(pfn)) : "memory", "cc" ); }); >} >static inline __attribute__((always_inline)) void paravirt_release_pud(unsigned pfn) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.release_pud) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.release_pud), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pfn)) : "memory", "cc" ); }); >} > > >static inline __attribute__((always_inline)) void *kmap_atomic_pte(struct page *page, enum km_type type) >{ > unsigned long ret; > ret = ({ unsigned long __ret; unsigned long __eax, __edx, __ecx; if (sizeof(unsigned long) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.kmap_atomic_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.kmap_atomic_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(page)), "1" ((unsigned long)(type)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.kmap_atomic_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.kmap_atomic_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(page)), "1" ((unsigned long)(type)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); > return (void *)ret; >} > > >static inline __attribute__((always_inline)) void pte_update(struct mm_struct *mm, unsigned long addr, > pte_t *ptep) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_update) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pte_update), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(mm)), "1"((unsigned long)(addr)), "2"((unsigned long)(ptep)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void pte_update_defer(struct mm_struct *mm, unsigned long addr, > pte_t *ptep) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_update_defer) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pte_update_defer), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(mm)), "1"((unsigned long)(addr)), "2"((unsigned long)(ptep)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) pte_t __pte(pteval_t val) >{ > pteval_t ret; > > if (sizeof(pteval_t) > sizeof(long)) > ret = ({ pteval_t __ret; unsigned long __eax, __edx, __ecx; if (sizeof(pteval_t) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.make_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(val)), "1" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.make_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(val)), "1" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }); > > > else > ret = ({ pteval_t __ret; unsigned long __eax, __edx, __ecx; if (sizeof(pteval_t) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.make_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.make_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }); > > > > return (pte_t) { .pte = ret }; >} > >static inline __attribute__((always_inline)) pteval_t pte_val(pte_t pte) >{ > pteval_t ret; > > if (sizeof(pteval_t) > sizeof(long)) > ret = ({ pteval_t __ret; unsigned long __eax, __edx, __ecx; if (sizeof(pteval_t) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_val) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pte_val), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pte.pte)), "1" ((unsigned long)((u64)pte.pte >> 32)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_val) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pte_val), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pte.pte)), "1" ((unsigned long)((u64)pte.pte >> 32)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }); > > else > ret = ({ pteval_t __ret; unsigned long __eax, __edx, __ecx; if (sizeof(pteval_t) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_val) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pte_val), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pte.pte)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_val) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pte_val), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pte.pte)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }); > > > return ret; >} > >static inline __attribute__((always_inline)) pgd_t __pgd(pgdval_t val) >{ > pgdval_t ret; > > if (sizeof(pgdval_t) > sizeof(long)) > ret = ({ pgdval_t __ret; unsigned long __eax, __edx, __ecx; if (sizeof(pgdval_t) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pgd) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.make_pgd), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(val)), "1" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pgdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pgd) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.make_pgd), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(val)), "1" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pgdval_t)__eax; } __ret; }); > > else > ret = ({ pgdval_t __ret; unsigned long __eax, __edx, __ecx; if (sizeof(pgdval_t) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pgd) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.make_pgd), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pgdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pgd) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.make_pgd), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pgdval_t)__eax; } __ret; }); > > > return (pgd_t) { ret }; >} > >static inline __attribute__((always_inline)) pgdval_t pgd_val(pgd_t pgd) >{ > pgdval_t ret; > > if (sizeof(pgdval_t) > sizeof(long)) > ret = ({ pgdval_t __ret; unsigned long __eax, __edx, __ecx; if (sizeof(pgdval_t) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_val) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pgd_val), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pgd.pgd)), "1" ((unsigned long)((u64)pgd.pgd >> 32)) : "memory", "cc" ); __ret = (pgdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_val) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pgd_val), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pgd.pgd)), "1" ((unsigned long)((u64)pgd.pgd >> 32)) : "memory", "cc" ); __ret = (pgdval_t)__eax; } __ret; }); > > else > ret = ({ pgdval_t __ret; unsigned long __eax, __edx, __ecx; if (sizeof(pgdval_t) > sizeof(unsigned long)) { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_val) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pgd_val), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pgd.pgd)) : "memory", "cc" ); __ret = (pgdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_val) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.pgd_val), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pgd.pgd)) : "memory", "cc" ); __ret = (pgdval_t)__eax; } __ret; }); > > > return ret; >} > >static inline __attribute__((always_inline)) void set_pte(pte_t *ptep, pte_t pte) >{ > if (sizeof(pteval_t) > sizeof(long)) > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.set_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(ptep)), "1"((unsigned long)(pte.pte)), "2"((unsigned long)((u64)pte.pte >> 32)) : "memory", "cc" ); }); > > else > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pte) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.set_pte), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(ptep)), "1" ((unsigned long)(pte.pte)) : "memory", "cc" ); }); > >} > >static inline __attribute__((always_inline)) void set_pte_at(struct mm_struct *mm, unsigned long addr, > pte_t *ptep, pte_t pte) >{ > if (sizeof(pteval_t) > sizeof(long)) > > pv_mmu_ops.set_pte_at(mm, addr, ptep, pte); > else > ({ unsigned long __eax, __edx, __ecx; asm volatile("push %[_arg4];" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pte_at) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.set_pte_at), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((u32)(mm)), "1" ((u32)(addr)), "2" ((u32)(ptep)), [_arg4] "mr" ((u32)(pte.pte)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void set_pmd(pmd_t *pmdp, pmd_t pmd) >{ > pmdval_t val = native_pmd_val(pmd); > > if (sizeof(pmdval_t) > sizeof(long)) > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pmd) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.set_pmd), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pmdp)), "1"((unsigned long)(val)), "2"((unsigned long)((u64)val >> 32)) : "memory", "cc" ); }); > else > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pmd) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.set_pmd), [paravirt_clobber] "i" (((1 << 3) - 1)), "0" ((unsigned long)(pmdp)), "1" ((unsigned long)(val)) : "memory", "cc" ); }); >} ># 1179 "include/asm/paravirt.h" >static inline __attribute__((always_inline)) void set_pte_atomic(pte_t *ptep, pte_t pte) >{ > set_pte(ptep, pte); >} > >static inline __attribute__((always_inline)) void set_pte_present(struct mm_struct *mm, unsigned long addr, > pte_t *ptep, pte_t pte) >{ > set_pte(ptep, pte); >} > >static inline __attribute__((always_inline)) void pte_clear(struct mm_struct *mm, unsigned long addr, > pte_t *ptep) >{ > set_pte_at(mm, addr, ptep, __pte(0)); >} > >static inline __attribute__((always_inline)) void pmd_clear(pmd_t *pmdp) >{ > set_pmd(pmdp, ((pmd_t) { ((pud_t) { __pgd(0) } ) } )); >} > > > >enum paravirt_lazy_mode { > PARAVIRT_LAZY_NONE, > PARAVIRT_LAZY_MMU, > PARAVIRT_LAZY_CPU, >}; > >enum paravirt_lazy_mode paravirt_get_lazy_mode(void); >void paravirt_enter_lazy_cpu(void); >void paravirt_leave_lazy_cpu(void); >void paravirt_enter_lazy_mmu(void); >void paravirt_leave_lazy_mmu(void); >void paravirt_leave_lazy(enum paravirt_lazy_mode mode); > > >static inline __attribute__((always_inline)) void arch_enter_lazy_cpu_mode(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.lazy_mode.enter) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.lazy_mode.enter), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void arch_leave_lazy_cpu_mode(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.lazy_mode.leave) / sizeof(void *))), [paravirt_opptr] "m" (pv_cpu_ops.lazy_mode.leave), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void arch_flush_lazy_cpu_mode(void) >{ > if (__builtin_expect(!!(paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU), 0)) { > arch_leave_lazy_cpu_mode(); > arch_enter_lazy_cpu_mode(); > } >} > > > >static inline __attribute__((always_inline)) void arch_enter_lazy_mmu_mode(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.lazy_mode.enter) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.lazy_mode.enter), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void arch_leave_lazy_mmu_mode(void) >{ > ({ unsigned long __eax, __edx, __ecx; asm volatile("" "771:\n\t" "call *%[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.lazy_mode.leave) / sizeof(void *))), [paravirt_opptr] "m" (pv_mmu_ops.lazy_mode.leave), [paravirt_clobber] "i" (((1 << 3) - 1)) : "memory", "cc" ); }); >} > >static inline __attribute__((always_inline)) void arch_flush_lazy_mmu_mode(void) >{ > if (__builtin_expect(!!(paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU), 0)) { > arch_leave_lazy_mmu_mode(); > arch_enter_lazy_mmu_mode(); > } >} > >void _paravirt_nop(void); > > > >struct paravirt_patch_site { > u8 *instr; > u8 instrtype; > u8 len; > u16 clobbers; >}; > >extern struct paravirt_patch_site __parainstructions[], > __parainstructions_end[]; ># 1285 "include/asm/paravirt.h" >static inline __attribute__((always_inline)) unsigned long __raw_local_save_flags(void) >{ > unsigned long f; > > asm volatile("771:\n\t" "pushl %%ecx; pushl %%edx;" "call *%[paravirt_opptr];" "popl %%edx; popl %%ecx" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" > > > : "=a"(f) > : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.save_fl) / sizeof(void *))), [paravirt_opptr] "m" (pv_irq_ops.save_fl), > [paravirt_clobber] "i" ((1 << 0)) > : "memory", "cc" ); > return f; >} > >static inline __attribute__((always_inline)) void raw_local_irq_restore(unsigned long f) >{ > asm volatile("771:\n\t" "pushl %%ecx; pushl %%edx;" "call *%[paravirt_opptr];" "popl %%edx; popl %%ecx" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" > > > : "=a"(f) > : "0"(f), > [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.restore_fl) / sizeof(void *))), [paravirt_opptr] "m" (pv_irq_ops.restore_fl), > [paravirt_clobber] "i" ((1 << 0)) > : "memory", "cc" ); >} > >static inline __attribute__((always_inline)) void raw_local_irq_disable(void) >{ > asm volatile("771:\n\t" "pushl %%ecx; pushl %%edx;" "call *%[paravirt_opptr];" "popl %%edx; popl %%ecx" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" > > > : > : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.irq_disable) / sizeof(void *))), [paravirt_opptr] "m" (pv_irq_ops.irq_disable), > [paravirt_clobber] "i" ((1 << 0)) > : "memory", "eax", "cc" ); >} > >static inline __attribute__((always_inline)) void raw_local_irq_enable(void) >{ > asm volatile("771:\n\t" "pushl %%ecx; pushl %%edx;" "call *%[paravirt_opptr];" "popl %%edx; popl %%ecx" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " .balign 4 " "\n" " .long " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" > > > : > : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.irq_enable) / sizeof(void *))), [paravirt_opptr] "m" (pv_irq_ops.irq_enable), > [paravirt_clobber] "i" ((1 << 0)) > : "memory", "eax", "cc" ); >} > >static inline __attribute__((always_inline)) unsigned long __raw_local_irq_save(void) >{ > unsigned long f; > > f = __raw_local_save_flags(); > raw_local_irq_disable(); > return f; >} ># 56 "include/asm/irqflags.h" 2 ># 136 "include/asm/irqflags.h" >static inline __attribute__((always_inline)) int raw_irqs_disabled_flags(unsigned long flags) >{ > return !(flags & 0x00000200); >} > >static inline __attribute__((always_inline)) int raw_irqs_disabled(void) >{ > unsigned long flags = __raw_local_save_flags(); > > return raw_irqs_disabled_flags(flags); >} > > > > > > > >static inline __attribute__((always_inline)) void trace_hardirqs_fixup_flags(unsigned long flags) >{ > if (raw_irqs_disabled_flags(flags)) > trace_hardirqs_off(); > else > trace_hardirqs_on(); >} > >static inline __attribute__((always_inline)) void trace_hardirqs_fixup(void) >{ > unsigned long flags = __raw_local_save_flags(); > > trace_hardirqs_fixup_flags(flags); >} ># 47 "include/linux/irqflags.h" 2 ># 12 "include/asm/system.h" 2 ># 22 "include/asm/system.h" >struct task_struct; >struct task_struct *__switch_to(struct task_struct *prev, > struct task_struct *next); ># 139 "include/asm/system.h" >extern void load_gs_index(unsigned); ># 165 "include/asm/system.h" >static inline __attribute__((always_inline)) unsigned long get_limit(unsigned long segment) >{ > unsigned long __limit; > asm("lsll %1,%0" : "=r" (__limit) : "r" (segment)); > return __limit + 1; >} > >static inline __attribute__((always_inline)) void native_clts(void) >{ > asm volatile("clts"); >} ># 184 "include/asm/system.h" >static unsigned long __force_order; > >static inline __attribute__((always_inline)) unsigned long native_read_cr0(void) >{ > unsigned long val; > asm volatile("mov %%cr0,%0\n\t" : "=r" (val), "=m" (__force_order)); > return val; >} > >static inline __attribute__((always_inline)) void native_write_cr0(unsigned long val) >{ > asm volatile("mov %0,%%cr0": : "r" (val), "m" (__force_order)); >} > >static inline __attribute__((always_inline)) unsigned long native_read_cr2(void) >{ > unsigned long val; > asm volatile("mov %%cr2,%0\n\t" : "=r" (val), "=m" (__force_order)); > return val; >} > >static inline __attribute__((always_inline)) void native_write_cr2(unsigned long val) >{ > asm volatile("mov %0,%%cr2": : "r" (val), "m" (__force_order)); >} > >static inline __attribute__((always_inline)) unsigned long native_read_cr3(void) >{ > unsigned long val; > asm volatile("mov %%cr3,%0\n\t" : "=r" (val), "=m" (__force_order)); > return val; >} > >static inline __attribute__((always_inline)) void native_write_cr3(unsigned long val) >{ > asm volatile("mov %0,%%cr3": : "r" (val), "m" (__force_order)); >} > >static inline __attribute__((always_inline)) unsigned long native_read_cr4(void) >{ > unsigned long val; > asm volatile("mov %%cr4,%0\n\t" : "=r" (val), "=m" (__force_order)); > return val; >} > >static inline __attribute__((always_inline)) unsigned long native_read_cr4_safe(void) >{ > unsigned long val; > > > > asm volatile("1: mov %%cr4, %0\n" > "2:\n" > " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "2b" "\n" " .previous\n" > : "=r" (val), "=m" (__force_order) : "0" (0)); > > > > return val; >} > >static inline __attribute__((always_inline)) void native_write_cr4(unsigned long val) >{ > asm volatile("mov %0,%%cr4": : "r" (val), "m" (__force_order)); >} ># 264 "include/asm/system.h" >static inline __attribute__((always_inline)) void native_wbinvd(void) >{ > asm volatile("wbinvd": : :"memory"); >} ># 296 "include/asm/system.h" >static inline __attribute__((always_inline)) void clflush(volatile void *__p) >{ > asm volatile("clflush %0" : "+m" (*(volatile char *)__p)); >} > > > >void disable_hlt(void); >void enable_hlt(void); > >extern int es7000_plat; >void cpu_idle_wait(void); > >extern unsigned long arch_align_stack(unsigned long sp); >extern void free_init_pages(char *what, unsigned long begin, unsigned long end); > >void default_idle(void); ># 416 "include/asm/system.h" >static inline __attribute__((always_inline)) void rdtsc_barrier(void) >{ > asm volatile ("661:\n\t" ".byte 0x8d,0x76,0x00\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "mfence" "\n664:\n" ".previous" :: "i" ((3*32+17)) : "memory"); > asm volatile ("661:\n\t" ".byte 0x8d,0x76,0x00\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "lfence" "\n664:\n" ".previous" :: "i" ((3*32+18)) : "memory"); >} ># 18 "include/asm/processor.h" 2 > > ># 1 "include/asm/msr.h" 1 > > > ># 1 "include/asm/msr-index.h" 1 ># 5 "include/asm/msr.h" 2 ># 14 "include/asm/msr.h" ># 1 "include/asm/errno.h" 1 ># 1 "include/asm-generic/errno.h" 1 > > > ># 1 "include/asm-generic/errno-base.h" 1 ># 5 "include/asm-generic/errno.h" 2 ># 1 "include/asm/errno.h" 2 ># 15 "include/asm/msr.h" 2 > >static inline __attribute__((always_inline)) unsigned long long native_read_tscp(unsigned int *aux) >{ > unsigned long low, high; > asm volatile(".byte 0x0f,0x01,0xf9" > : "=a" (low), "=d" (high), "=c" (*aux)); > return low | ((u64)high >> 32); >} ># 42 "include/asm/msr.h" >static inline __attribute__((always_inline)) unsigned long long native_read_msr(unsigned int msr) >{ > unsigned long long val; > > asm volatile("rdmsr" : "=A" (val) : "c" (msr)); > return (val); >} > >static inline __attribute__((always_inline)) unsigned long long native_read_msr_safe(unsigned int msr, > int *err) >{ > unsigned long long val; > > asm volatile("2: rdmsr ; xor %0,%0\n" > "1:\n\t" > ".section .fixup,\"ax\"\n\t" > "3: mov %3,%0 ; jmp 1b\n\t" > ".previous\n\t" > " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "2b" "," "3b" "\n" " .previous\n" > : "=r" (*err), "=A" (val) > : "c" (msr), "i" (-14)); > return (val); >} > >static inline __attribute__((always_inline)) void native_write_msr(unsigned int msr, > unsigned low, unsigned high) >{ > asm volatile("wrmsr" : : "c" (msr), "a"(low), "d" (high)); >} > >static inline __attribute__((always_inline)) int native_write_msr_safe(unsigned int msr, > unsigned low, unsigned high) >{ > int err; > asm volatile("2: wrmsr ; xor %0,%0\n" > "1:\n\t" > ".section .fixup,\"ax\"\n\t" > "3: mov %4,%0 ; jmp 1b\n\t" > ".previous\n\t" > " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "2b" "," "3b" "\n" " .previous\n" > : "=a" (err) > : "c" (msr), "0" (low), "d" (high), > "i" (-14)); > return err; >} > >extern unsigned long long native_read_tsc(void); > >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long long __native_read_tsc(void) >{ > unsigned long long val; > > rdtsc_barrier(); > asm volatile("rdtsc" : "=A" (val)); > rdtsc_barrier(); > > return (val); >} > >static inline __attribute__((always_inline)) unsigned long long native_read_pmc(int counter) >{ > unsigned long long val; > > asm volatile("rdpmc" : "=A" (val) : "c" (counter)); > return (val); >} ># 194 "include/asm/msr.h" >void rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); >void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); >int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); > >int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); ># 21 "include/asm/processor.h" 2 > > > ># 1 "include/linux/personality.h" 1 ># 10 "include/linux/personality.h" >struct exec_domain; >struct pt_regs; > >extern int register_exec_domain(struct exec_domain *); >extern int unregister_exec_domain(struct exec_domain *); >extern int __set_personality(unsigned long); ># 24 "include/linux/personality.h" >enum { > ADDR_NO_RANDOMIZE = 0x0040000, > FDPIC_FUNCPTRS = 0x0080000, > > > MMAP_PAGE_ZERO = 0x0100000, > ADDR_COMPAT_LAYOUT = 0x0200000, > READ_IMPLIES_EXEC = 0x0400000, > ADDR_LIMIT_32BIT = 0x0800000, > SHORT_INODE = 0x1000000, > WHOLE_SECONDS = 0x2000000, > STICKY_TIMEOUTS = 0x4000000, > ADDR_LIMIT_3GB = 0x8000000, >}; ># 51 "include/linux/personality.h" >enum { > PER_LINUX = 0x0000, > PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT, > PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS, > PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, > PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE, > PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS | > WHOLE_SECONDS | SHORT_INODE, > PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS, > PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE, > PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS, > PER_BSD = 0x0006, > PER_SUNOS = 0x0006 | STICKY_TIMEOUTS, > PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE, > PER_LINUX32 = 0x0008, > PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB, > PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS, > PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS, > PER_IRIX64 = 0x000b | STICKY_TIMEOUTS, > PER_RISCOS = 0x000c, > PER_SOLARIS = 0x000d | STICKY_TIMEOUTS, > PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, > PER_OSF4 = 0x000f, > PER_HPUX = 0x0010, > PER_MASK = 0x00ff, >}; ># 86 "include/linux/personality.h" >typedef void (*handler_t)(int, struct pt_regs *); > >struct exec_domain { > const char *name; > handler_t handler; > unsigned char pers_low; > unsigned char pers_high; > unsigned long *signal_map; > unsigned long *signal_invmap; > struct map_segment *err_map; > struct map_segment *socktype_map; > struct map_segment *sockopt_map; > struct map_segment *af_map; > struct module *module; > struct exec_domain *next; >}; ># 25 "include/asm/processor.h" 2 > ># 1 "include/linux/cache.h" 1 > > > > ># 1 "include/asm/cache.h" 1 ># 6 "include/linux/cache.h" 2 ># 27 "include/asm/processor.h" 2 > > > > > > > >static inline __attribute__((always_inline)) void *current_text_addr(void) >{ > void *pc; > > asm volatile("mov $1f, %0; 1:":"=r" (pc)); > > return pc; >} ># 57 "include/asm/processor.h" >struct cpuinfo_x86 { > __u8 x86; > __u8 x86_vendor; > __u8 x86_model; > __u8 x86_mask; > > char wp_works_ok; > > > char hlt_works_ok; > char hard_math; > char rfu; > char fdiv_bug; > char f00f_bug; > char coma_bug; > char pad0; ># 84 "include/asm/processor.h" > int cpuid_level; > __u32 x86_capability[8]; > char x86_vendor_id[16]; > char x86_model_id[64]; > > int x86_cache_size; > int x86_cache_alignment; > int x86_power; > unsigned long loops_per_jiffy; > > > cpumask_t llc_shared_map; > > > u16 x86_max_cores; > u16 apicid; > u16 initial_apicid; > u16 x86_clflush_size; > > > u16 booted_cores; > > u16 phys_proc_id; > > u16 cpu_core_id; > > u16 cpu_index; > >} __attribute__((__aligned__((1 << (7))))); ># 128 "include/asm/processor.h" >extern struct cpuinfo_x86 boot_cpu_data; >extern struct cpuinfo_x86 new_cpu_data; > >extern struct tss_struct doublefault_tss; >extern __u32 cleared_cpu_caps[8]; > > >extern __typeof__(struct cpuinfo_x86) per_cpu__cpu_info; > > > > > > > >static inline __attribute__((always_inline)) int hlt_works(int cpu) >{ > > return (*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((&per_cpu__cpu_info))); (typeof((&per_cpu__cpu_info))) (__ptr + (((__per_cpu_offset[cpu])))); })).hlt_works_ok; > > > >} > > > > >extern unsigned long arch_align_stack(unsigned long sp); > >extern void cpu_detect(struct cpuinfo_x86 *c); > >extern void identify_cpu(struct cpuinfo_x86 *); >extern void identify_boot_cpu(void); >extern void identify_secondary_cpu(struct cpuinfo_x86 *); >extern void print_cpu_info(struct cpuinfo_x86 *); >extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); >extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); >extern unsigned short num_cache_leaves; > > >extern void detect_ht(struct cpuinfo_x86 *c); > > > > >static inline __attribute__((always_inline)) void native_cpuid(unsigned int *eax, unsigned int *ebx, > unsigned int *ecx, unsigned int *edx) >{ > > asm("cpuid" > : "=a" (*eax), > "=b" (*ebx), > "=c" (*ecx), > "=d" (*edx) > : "0" (*eax), "2" (*ecx)); >} > >static inline __attribute__((always_inline)) void load_cr3(pgd_t *pgdir) >{ > write_cr3((((unsigned long)(pgdir)) - ((unsigned long)(0xC0000000UL)))); >} > > > >struct x86_hw_tss { > unsigned short back_link, __blh; > unsigned long sp0; > unsigned short ss0, __ss0h; > unsigned long sp1; > > unsigned short ss1, __ss1h; > unsigned long sp2; > unsigned short ss2, __ss2h; > unsigned long __cr3; > unsigned long ip; > unsigned long flags; > unsigned long ax; > unsigned long cx; > unsigned long dx; > unsigned long bx; > unsigned long sp; > unsigned long bp; > unsigned long si; > unsigned long di; > unsigned short es, __esh; > unsigned short cs, __csh; > unsigned short ss, __ssh; > unsigned short ds, __dsh; > unsigned short fs, __fsh; > unsigned short gs, __gsh; > unsigned short ldt, __ldth; > unsigned short trace; > unsigned short io_bitmap_base; > >} __attribute__((packed)); ># 249 "include/asm/processor.h" >struct tss_struct { > > > > struct x86_hw_tss x86_tss; > > > > > > > > unsigned long io_bitmap[((65536/8)/sizeof(long)) + 1]; > > > > unsigned long io_bitmap_max; > struct thread_struct *io_bitmap_owner; > > > > > unsigned long __cacheline_filler[35]; > > > > unsigned long stack[64]; > >} __attribute__((packed)); > >extern __typeof__(struct tss_struct) per_cpu__init_tss; > > > > >struct orig_ist { > unsigned long ist[7]; >}; > > > >struct i387_fsave_struct { > u32 cwd; > u32 swd; > u32 twd; > u32 fip; > u32 fcs; > u32 foo; > u32 fos; > > > u32 st_space[20]; > > > u32 status; >}; > >struct i387_fxsave_struct { > u16 cwd; > u16 swd; > u16 twd; > u16 fop; > union { > struct { > u64 rip; > u64 rdp; > }; > struct { > u32 fip; > u32 fcs; > u32 foo; > u32 fos; > }; > }; > u32 mxcsr; > u32 mxcsr_mask; > > > u32 st_space[32]; > > > u32 xmm_space[64]; > > u32 padding[24]; > >} __attribute__((aligned(16))); > >struct i387_soft_struct { > u32 cwd; > u32 swd; > u32 twd; > u32 fip; > u32 fcs; > u32 foo; > u32 fos; > > u32 st_space[20]; > u8 ftop; > u8 changed; > u8 lookahead; > u8 no_update; > u8 rm; > u8 alimit; > struct info *info; > u32 entry_eip; >}; > >union thread_xstate { > struct i387_fsave_struct fsave; > struct i387_fxsave_struct fxsave; > struct i387_soft_struct soft; >}; > > > > > >extern void print_cpu_info(struct cpuinfo_x86 *); >extern unsigned int xstate_size; >extern void free_thread_xstate(struct task_struct *); >extern struct kmem_cache *task_xstate_cachep; >extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); >extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); >extern unsigned short num_cache_leaves; > >struct thread_struct { > > struct desc_struct tls_array[3]; > unsigned long sp0; > unsigned long sp; > > unsigned long sysenter_cs; > > > > > > > > unsigned long ip; > unsigned long fs; > unsigned long gs; > > unsigned long debugreg0; > unsigned long debugreg1; > unsigned long debugreg2; > unsigned long debugreg3; > unsigned long debugreg6; > unsigned long debugreg7; > > unsigned long cr2; > unsigned long trap_no; > unsigned long error_code; > > union thread_xstate *xstate; > > > struct vm86_struct *vm86_info; > unsigned long screen_bitmap; > unsigned long v86flags; > unsigned long v86mask; > unsigned long saved_sp0; > unsigned int saved_fs; > unsigned int saved_gs; > > > unsigned long *io_bitmap_ptr; > unsigned long iopl; > > unsigned io_bitmap_max; > > unsigned long debugctlmsr; > > > unsigned long ds_area_msr; >}; > >static inline __attribute__((always_inline)) unsigned long native_get_debugreg(int regno) >{ > unsigned long val = 0; > > switch (regno) { > case 0: > asm("mov %%db0, %0" :"=r" (val)); > break; > case 1: > asm("mov %%db1, %0" :"=r" (val)); > break; > case 2: > asm("mov %%db2, %0" :"=r" (val)); > break; > case 3: > asm("mov %%db3, %0" :"=r" (val)); > break; > case 6: > asm("mov %%db6, %0" :"=r" (val)); > break; > case 7: > asm("mov %%db7, %0" :"=r" (val)); > break; > default: > do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/asm/processor.h"), "i" (450), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); > } > return val; >} > >static inline __attribute__((always_inline)) void native_set_debugreg(int regno, unsigned long value) >{ > switch (regno) { > case 0: > asm("mov %0, %%db0" ::"r" (value)); > break; > case 1: > asm("mov %0, %%db1" ::"r" (value)); > break; > case 2: > asm("mov %0, %%db2" ::"r" (value)); > break; > case 3: > asm("mov %0, %%db3" ::"r" (value)); > break; > case 6: > asm("mov %0, %%db6" ::"r" (value)); > break; > case 7: > asm("mov %0, %%db7" ::"r" (value)); > break; > default: > do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/asm/processor.h"), "i" (477), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); > } >} > > > > >static inline __attribute__((always_inline)) void native_set_iopl_mask(unsigned mask) >{ > > unsigned int reg; > > asm volatile ("pushfl;" > "popl %0;" > "andl %1, %0;" > "orl %2, %0;" > "pushl %0;" > "popfl" > : "=&r" (reg) > : "i" (~0x00003000), "r" (mask)); > >} > >static inline __attribute__((always_inline)) void >native_load_sp0(struct tss_struct *tss, struct thread_struct *thread) >{ > tss->x86_tss.sp0 = thread->sp0; > > > if (__builtin_expect(!!(tss->x86_tss.ss1 != thread->sysenter_cs), 0)) { > tss->x86_tss.ss1 = thread->sysenter_cs; > do { paravirt_write_msr(0x00000174, thread->sysenter_cs, 0); } while (0); > } > >} > >static inline __attribute__((always_inline)) void native_swapgs(void) >{ > > > >} ># 550 "include/asm/processor.h" >extern unsigned long mmu_cr4_features; > >static inline __attribute__((always_inline)) void set_in_cr4(unsigned long mask) >{ > unsigned cr4; > > mmu_cr4_features |= mask; > cr4 = read_cr4(); > cr4 |= mask; > write_cr4(cr4); >} > >static inline __attribute__((always_inline)) void clear_in_cr4(unsigned long mask) >{ > unsigned cr4; > > mmu_cr4_features &= ~mask; > cr4 = read_cr4(); > cr4 &= ~mask; > write_cr4(cr4); >} > >struct microcode_header { > unsigned int hdrver; > unsigned int rev; > unsigned int date; > unsigned int sig; > unsigned int cksum; > unsigned int ldrver; > unsigned int pf; > unsigned int datasize; > unsigned int totalsize; > unsigned int reserved[3]; >}; > >struct microcode { > struct microcode_header hdr; > unsigned int bits[0]; >}; > >typedef struct microcode microcode_t; >typedef struct microcode_header microcode_header_t; > > >struct extended_signature { > unsigned int sig; > unsigned int pf; > unsigned int cksum; >}; > >struct extended_sigtable { > unsigned int count; > unsigned int cksum; > unsigned int reserved[3]; > struct extended_signature sigs[0]; >}; > >typedef struct { > unsigned long seg; >} mm_segment_t; > > > > > >extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); > > >extern void release_thread(struct task_struct *); > > >extern void prepare_to_copy(struct task_struct *tsk); > >unsigned long get_wchan(struct task_struct *p); > > > > > > >static inline __attribute__((always_inline)) void cpuid(unsigned int op, > unsigned int *eax, unsigned int *ebx, > unsigned int *ecx, unsigned int *edx) >{ > *eax = op; > *ecx = 0; > __cpuid(eax, ebx, ecx, edx); >} > > >static inline __attribute__((always_inline)) void cpuid_count(unsigned int op, int count, > unsigned int *eax, unsigned int *ebx, > unsigned int *ecx, unsigned int *edx) >{ > *eax = op; > *ecx = count; > __cpuid(eax, ebx, ecx, edx); >} > > > > >static inline __attribute__((always_inline)) unsigned int cpuid_eax(unsigned int op) >{ > unsigned int eax, ebx, ecx, edx; > > cpuid(op, &eax, &ebx, &ecx, &edx); > > return eax; >} > >static inline __attribute__((always_inline)) unsigned int cpuid_ebx(unsigned int op) >{ > unsigned int eax, ebx, ecx, edx; > > cpuid(op, &eax, &ebx, &ecx, &edx); > > return ebx; >} > >static inline __attribute__((always_inline)) unsigned int cpuid_ecx(unsigned int op) >{ > unsigned int eax, ebx, ecx, edx; > > cpuid(op, &eax, &ebx, &ecx, &edx); > > return ecx; >} > >static inline __attribute__((always_inline)) unsigned int cpuid_edx(unsigned int op) >{ > unsigned int eax, ebx, ecx, edx; > > cpuid(op, &eax, &ebx, &ecx, &edx); > > return edx; >} > > >static inline __attribute__((always_inline)) void rep_nop(void) >{ > asm volatile("rep; nop" ::: "memory"); >} > >static inline __attribute__((always_inline)) void cpu_relax(void) >{ > rep_nop(); >} > > >static inline __attribute__((always_inline)) void sync_core(void) >{ > int tmp; > > asm volatile("cpuid" : "=a" (tmp) : "0" (1) > : "ebx", "ecx", "edx", "memory"); >} > >static inline __attribute__((always_inline)) void __monitor(const void *eax, unsigned long ecx, > unsigned long edx) >{ > > asm volatile(".byte 0x0f, 0x01, 0xc8;" > :: "a" (eax), "c" (ecx), "d"(edx)); >} > >static inline __attribute__((always_inline)) void __mwait(unsigned long eax, unsigned long ecx) >{ > > asm volatile(".byte 0x0f, 0x01, 0xc9;" > :: "a" (eax), "c" (ecx)); >} > >static inline __attribute__((always_inline)) void __sti_mwait(unsigned long eax, unsigned long ecx) >{ > trace_hardirqs_on(); > > asm volatile("sti; .byte 0x0f, 0x01, 0xc9;" > :: "a" (eax), "c" (ecx)); >} > >extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); > >extern int force_mwait; > >extern void select_idle_routine(const struct cpuinfo_x86 *c); > >extern unsigned long boot_option_idle_override; > >extern void enable_sep_cpu(void); >extern int sysenter_setup(void); > > >extern struct desc_ptr early_gdt_descr; > >extern void cpu_set_gdt(int); >extern void switch_to_new_gdt(void); >extern void cpu_init(void); >extern void init_gdt(int cpu); > >static inline __attribute__((always_inline)) void update_debugctlmsr(unsigned long debugctlmsr) >{ > > > > > do { paravirt_write_msr(0x000001d9, (u32)((u64)(debugctlmsr)), ((u64)(debugctlmsr))>>32); } while (0); >} > > > > > >extern unsigned int machine_id; >extern unsigned int machine_submodel_id; >extern unsigned int BIOS_revision; > > >extern int bootloader_type; > >extern char ignore_fpu_irq; ># 789 "include/asm/processor.h" >static inline __attribute__((always_inline)) void prefetch(const void *x) >{ > asm volatile ("661:\n\t" ".byte 0x8d,0x74,0x26,0x00\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "prefetchnta (%1)" "\n664:\n" ".previous" :: "i" ((0*32+25)), "r" (x)); > > > >} > > > > > > >static inline __attribute__((always_inline)) void prefetchw(const void *x) >{ > asm volatile ("661:\n\t" ".byte 0x8d,0x74,0x26,0x00\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "prefetchw (%1)" "\n664:\n" ".previous" :: "i" ((1*32+31)), "r" (x)); > > > >} > >static inline __attribute__((always_inline)) void spin_lock_prefetch(const void *x) >{ > prefetchw(x); >} ># 847 "include/asm/processor.h" >extern unsigned long thread_saved_pc(struct task_struct *tsk); ># 913 "include/asm/processor.h" >extern void start_thread(struct pt_regs *regs, unsigned long new_ip, > unsigned long new_sp); ># 928 "include/asm/processor.h" >extern int get_tsc_mode(unsigned long adr); >extern int set_tsc_mode(unsigned int val); ># 15 "include/linux/prefetch.h" 2 ># 53 "include/linux/prefetch.h" >static inline __attribute__((always_inline)) void prefetch_range(void *addr, size_t len) >{ > > char *cp; > char *end = addr + len; > > for (cp = addr; cp < end; cp += (4*(1 << (7)))) > prefetch(cp); > >} ># 7 "include/linux/list.h" 2 ># 19 "include/linux/list.h" >struct list_head { > struct list_head *next, *prev; >}; > > > > > > >static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list) >{ > list->next = list; > list->prev = list; >} ># 51 "include/linux/list.h" >extern void __list_add(struct list_head *new, > struct list_head *prev, > struct list_head *next); ># 70 "include/linux/list.h" >extern void list_add(struct list_head *new, struct list_head *head); ># 82 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head) >{ > __list_add(new, head->prev, head); >} > > > > > > > >static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head * new, > struct list_head * prev, struct list_head * next) >{ > new->next = next; > new->prev = prev; > __asm__ __volatile__("": : :"memory"); > next->prev = new; > prev->next = new; >} ># 119 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head) >{ > __list_add_rcu(new, head, head->next); >} ># 140 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new, > struct list_head *head) >{ > __list_add_rcu(new, head->prev, head); >} ># 153 "include/linux/list.h" >static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next) >{ > next->prev = prev; > prev->next = next; >} ># 173 "include/linux/list.h" >extern void list_del(struct list_head *entry); ># 200 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry) >{ > __list_del(entry->prev, entry->next); > entry->prev = ((void *) 0x00200200); >} ># 213 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_replace(struct list_head *old, > struct list_head *new) >{ > new->next = old->next; > new->next->prev = new; > new->prev = old->prev; > new->prev->next = new; >} > >static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old, > struct list_head *new) >{ > list_replace(old, new); > INIT_LIST_HEAD(old); >} ># 237 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old, > struct list_head *new) >{ > new->next = old->next; > new->prev = old->prev; > __asm__ __volatile__("": : :"memory"); > new->next->prev = new; > new->prev->next = new; > old->prev = ((void *) 0x00200200); >} > > > > > >static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry) >{ > __list_del(entry->prev, entry->next); > INIT_LIST_HEAD(entry); >} > > > > > > >static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head) >{ > __list_del(list->prev, list->next); > list_add(list, head); >} > > > > > > >static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list, > struct list_head *head) >{ > __list_del(list->prev, list->next); > list_add_tail(list, head); >} > > > > > > >static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list, > const struct list_head *head) >{ > return list->next == head; >} > > > > > >static inline __attribute__((always_inline)) int list_empty(const struct list_head *head) >{ > return head->next == head; >} ># 314 "include/linux/list.h" >static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head) >{ > struct list_head *next = head->next; > return (next == head) && (next == head->prev); >} > > > > > >static inline __attribute__((always_inline)) int list_is_singular(const struct list_head *head) >{ > return !list_empty(head) && (head->next == head->prev); >} > >static inline __attribute__((always_inline)) void __list_splice(const struct list_head *list, > struct list_head *head) >{ > struct list_head *first = list->next; > struct list_head *last = list->prev; > struct list_head *at = head->next; > > first->prev = head; > head->next = first; > > last->next = at; > at->prev = last; >} > > > > > > >static inline __attribute__((always_inline)) void list_splice(const struct list_head *list, > struct list_head *head) >{ > if (!list_empty(list)) > __list_splice(list, head); >} ># 362 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list, > struct list_head *head) >{ > if (!list_empty(list)) { > __list_splice(list, head); > INIT_LIST_HEAD(list); > } >} ># 388 "include/linux/list.h" >static inline __attribute__((always_inline)) void list_splice_init_rcu(struct list_head *list, > struct list_head *head, > void (*sync)(void)) >{ > struct list_head *first = list->next; > struct list_head *last = list->prev; > struct list_head *at = head->next; > > if (list_empty(head)) > return; > > > > INIT_LIST_HEAD(list); ># 410 "include/linux/list.h" > sync(); ># 420 "include/linux/list.h" > last->next = at; > __asm__ __volatile__("": : :"memory"); > head->next = first; > first->prev = head; > at->prev = last; >} ># 690 "include/linux/list.h" >struct hlist_head { > struct hlist_node *first; >}; > >struct hlist_node { > struct hlist_node *next, **pprev; >}; > > > > >static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h) >{ > h->next = ((void *)0); > h->pprev = ((void *)0); >} > >static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h) >{ > return !h->pprev; >} > >static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h) >{ > return !h->first; >} > >static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n) >{ > struct hlist_node *next = n->next; > struct hlist_node **pprev = n->pprev; > *pprev = next; > if (next) > next->pprev = pprev; >} > >static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n) >{ > __hlist_del(n); > n->next = ((void *) 0x00100100); > n->pprev = ((void *) 0x00200200); >} ># 752 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n) >{ > __hlist_del(n); > n->pprev = ((void *) 0x00200200); >} > >static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n) >{ > if (!hlist_unhashed(n)) { > __hlist_del(n); > INIT_HLIST_NODE(n); > } >} ># 773 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old, > struct hlist_node *new) >{ > struct hlist_node *next = old->next; > > new->next = next; > new->pprev = old->pprev; > __asm__ __volatile__("": : :"memory"); > if (next) > new->next->pprev = &new->next; > *new->pprev = new; > old->pprev = ((void *) 0x00200200); >} > >static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h) >{ > struct hlist_node *first = h->first; > n->next = first; > if (first) > first->pprev = &n->next; > h->first = n; > n->pprev = &h->first; >} ># 817 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n, > struct hlist_head *h) >{ > struct hlist_node *first = h->first; > n->next = first; > n->pprev = &h->first; > __asm__ __volatile__("": : :"memory"); > if (first) > first->pprev = &n->next; > h->first = n; >} > > >static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n, > struct hlist_node *next) >{ > n->pprev = next->pprev; > n->next = next; > next->pprev = &n->next; > *(n->pprev) = n; >} > >static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n, > struct hlist_node *next) >{ > next->next = n->next; > n->next = next; > next->pprev = &n->next; > > if(next->next) > next->next->pprev = &next->next; >} ># 868 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n, > struct hlist_node *next) >{ > n->pprev = next->pprev; > n->next = next; > __asm__ __volatile__("": : :"memory"); > next->pprev = &n->next; > *(n->pprev) = n; >} ># 896 "include/linux/list.h" >static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev, > struct hlist_node *n) >{ > n->next = prev->next; > n->pprev = &prev->next; > __asm__ __volatile__("": : :"memory"); > prev->next = n; > if (n->next) > n->next->pprev = &n->next; >} ># 23 "include/linux/wait.h" 2 > ># 1 "include/linux/spinlock.h" 1 ># 49 "include/linux/spinlock.h" ># 1 "include/linux/preempt.h" 1 ># 9 "include/linux/preempt.h" ># 1 "include/linux/thread_info.h" 1 ># 12 "include/linux/thread_info.h" >struct timespec; >struct compat_timespec; > > > > >struct restart_block { > long (*fn)(struct restart_block *); > union { > struct { > unsigned long arg0, arg1, arg2, arg3; > }; > > struct { > u32 *uaddr; > u32 val; > u32 flags; > u32 bitset; > u64 time; > } futex; > > struct { > clockid_t index; > struct timespec *rmtp; > > > > u64 expires; > } nanosleep; > }; >}; > >extern long do_no_restart_syscall(struct restart_block *parm); > > ># 1 "include/asm/thread_info.h" 1 > > ># 1 "include/asm/thread_info_32.h" 1 ># 28 "include/asm/thread_info_32.h" >struct thread_info { > struct task_struct *task; > struct exec_domain *exec_domain; > unsigned long flags; > unsigned long status; > __u32 cpu; > int preempt_count; > > mm_segment_t addr_limit; > > > > void *sysenter_return; > struct restart_block restart_block; > unsigned long previous_esp; > > > __u8 supervisor_stack[0]; >}; ># 87 "include/asm/thread_info_32.h" >register unsigned long current_stack_pointer asm("esp") __attribute__((__used__)); > > >static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void) >{ > return (struct thread_info *) > (current_stack_pointer & ~((4096) - 1)); >} ># 195 "include/asm/thread_info_32.h" >static inline __attribute__((always_inline)) void set_restore_sigmask(void) >{ > struct thread_info *ti = current_thread_info(); > ti->status |= 0x0004; > set_bit(1, &ti->flags); >} ># 4 "include/asm/thread_info.h" 2 > > > > > >extern void arch_task_cache_init(void); >extern void free_thread_info(struct thread_info *ti); >extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); ># 48 "include/linux/thread_info.h" 2 ># 56 "include/linux/thread_info.h" >static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag) >{ > set_bit(flag, (unsigned long *)&ti->flags); >} > >static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag) >{ > clear_bit(flag, (unsigned long *)&ti->flags); >} > >static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) >{ > return test_and_set_bit(flag, (unsigned long *)&ti->flags); >} > >static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) >{ > return test_and_clear_bit(flag, (unsigned long *)&ti->flags); >} > >static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag) >{ > return (__builtin_constant_p((flag)) ? constant_test_bit((flag), ((unsigned long *)&ti->flags)) : variable_test_bit((flag), ((unsigned long *)&ti->flags))); >} ># 10 "include/linux/preempt.h" 2 ># 66 "include/linux/preempt.h" >struct preempt_notifier; ># 77 "include/linux/preempt.h" >struct preempt_ops { > void (*sched_in)(struct preempt_notifier *notifier, int cpu); > void (*sched_out)(struct preempt_notifier *notifier, > struct task_struct *next); >}; ># 90 "include/linux/preempt.h" >struct preempt_notifier { > struct hlist_node link; > struct preempt_ops *ops; >}; > >void preempt_notifier_register(struct preempt_notifier *notifier); >void preempt_notifier_unregister(struct preempt_notifier *notifier); > >static inline __attribute__((always_inline)) void preempt_notifier_init(struct preempt_notifier *notifier, > struct preempt_ops *ops) >{ > INIT_HLIST_NODE(¬ifier->link); > notifier->ops = ops; >} ># 50 "include/linux/spinlock.h" 2 > > > > ># 1 "include/linux/stringify.h" 1 ># 55 "include/linux/spinlock.h" 2 ># 1 "include/linux/bottom_half.h" 1 > > > >extern void local_bh_disable(void); >extern void __local_bh_enable(void); >extern void _local_bh_enable(void); >extern void local_bh_enable(void); >extern void local_bh_enable_ip(unsigned long ip); ># 56 "include/linux/spinlock.h" 2 ># 79 "include/linux/spinlock.h" ># 1 "include/linux/spinlock_types.h" 1 ># 13 "include/linux/spinlock_types.h" ># 1 "include/asm/spinlock_types.h" 1 > > > > > > > >typedef struct { > unsigned int slock; >} raw_spinlock_t; > > > >typedef struct { > unsigned int lock; >} raw_rwlock_t; ># 14 "include/linux/spinlock_types.h" 2 > > > > ># 1 "include/linux/lockdep.h" 1 ># 12 "include/linux/lockdep.h" >struct task_struct; >struct lockdep_map; > > > > > ># 1 "include/linux/debug_locks.h" 1 > > > >struct task_struct; > >extern int debug_locks; >extern int debug_locks_silent; > > > > >extern int debug_locks_off(void); ># 46 "include/linux/debug_locks.h" >struct task_struct; > > >extern void debug_show_all_locks(void); >extern void __debug_show_held_locks(struct task_struct *task); >extern void debug_show_held_locks(struct task_struct *task); >extern void debug_check_no_locks_freed(const void *from, unsigned long len); >extern void debug_check_no_locks_held(struct task_struct *task); ># 20 "include/linux/lockdep.h" 2 ># 1 "include/linux/stacktrace.h" 1 > > > > >struct stack_trace { > unsigned int nr_entries, max_entries; > unsigned long *entries; > int skip; >}; > >extern void save_stack_trace(struct stack_trace *trace); >extern void save_stack_trace_tsk(struct task_struct *tsk, > struct stack_trace *trace); > >extern void print_stack_trace(struct stack_trace *trace, int spaces); ># 21 "include/linux/lockdep.h" 2 > > > > >enum lock_usage_bit >{ > LOCK_USED = 0, > LOCK_USED_IN_HARDIRQ, > LOCK_USED_IN_SOFTIRQ, > LOCK_ENABLED_SOFTIRQS, > LOCK_ENABLED_HARDIRQS, > LOCK_USED_IN_HARDIRQ_READ, > LOCK_USED_IN_SOFTIRQ_READ, > LOCK_ENABLED_SOFTIRQS_READ, > LOCK_ENABLED_HARDIRQS_READ, > LOCK_USAGE_STATES >}; ># 68 "include/linux/lockdep.h" >struct lockdep_subclass_key { > char __one_byte; >} __attribute__ ((__packed__)); > >struct lock_class_key { > struct lockdep_subclass_key subkeys[8UL]; >}; > > > > >struct lock_class { > > > > struct list_head hash_entry; > > > > > struct list_head lock_entry; > > struct lockdep_subclass_key *key; > unsigned int subclass; > > > > > unsigned long usage_mask; > struct stack_trace usage_traces[LOCK_USAGE_STATES]; > > > > > > > struct list_head locks_after, locks_before; > > > > > > unsigned int version; > > > > > unsigned long ops; > > const char *name; > int name_version; > > > unsigned long contention_point[4]; > >}; > > >struct lock_time { > s64 min; > s64 max; > s64 total; > unsigned long nr; >}; > >enum bounce_type { > bounce_acquired_write, > bounce_acquired_read, > bounce_contended_write, > bounce_contended_read, > nr_bounce_types, > > bounce_acquired = bounce_acquired_write, > bounce_contended = bounce_contended_write, >}; > >struct lock_class_stats { > unsigned long contention_point[4]; > struct lock_time read_waittime; > struct lock_time write_waittime; > struct lock_time read_holdtime; > struct lock_time write_holdtime; > unsigned long bounces[nr_bounce_types]; >}; > >struct lock_class_stats lock_stats(struct lock_class *class); >void clear_lock_stats(struct lock_class *class); > > > > > > >struct lockdep_map { > struct lock_class_key *key; > struct lock_class *class_cache; > const char *name; > > int cpu; > >}; > > > > > >struct lock_list { > struct list_head entry; > struct lock_class *class; > struct stack_trace trace; > int distance; >}; > > > > >struct lock_chain { > struct list_head entry; > u64 chain_key; >}; > >struct held_lock { ># 204 "include/linux/lockdep.h" > u64 prev_chain_key; > struct lock_class *class; > unsigned long acquire_ip; > struct lockdep_map *instance; > > > u64 waittime_stamp; > u64 holdtime_stamp; ># 226 "include/linux/lockdep.h" > int irq_context; > int trylock; > int read; > int check; > int hardirqs_off; >}; > > > > >extern void lockdep_init(void); >extern void lockdep_info(void); >extern void lockdep_reset(void); >extern void lockdep_reset_lock(struct lockdep_map *lock); >extern void lockdep_free_key_range(void *start, unsigned long size); >extern void lockdep_sys_exit(void); > >extern void lockdep_off(void); >extern void lockdep_on(void); > > > > > > > >extern void lockdep_init_map(struct lockdep_map *lock, const char *name, > struct lock_class_key *key, int subclass); ># 301 "include/linux/lockdep.h" >extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, > int trylock, int read, int check, unsigned long ip); > >extern void lock_release(struct lockdep_map *lock, int nested, > unsigned long ip); ># 348 "include/linux/lockdep.h" >extern void lock_contended(struct lockdep_map *lock, unsigned long ip); >extern void lock_acquired(struct lockdep_map *lock); ># 371 "include/linux/lockdep.h" >extern void early_init_irq_lock_class(void); > > > > > > > >extern void early_boot_irqs_off(void); >extern void early_boot_irqs_on(void); >extern void print_irqtrace_events(struct task_struct *curr); ># 19 "include/linux/spinlock_types.h" 2 > >typedef struct { > raw_spinlock_t raw_lock; > > > > > unsigned int magic, owner_cpu; > void *owner; > > > struct lockdep_map dep_map; > >} spinlock_t; > > > >typedef struct { > raw_rwlock_t raw_lock; > > > > > unsigned int magic, owner_cpu; > void *owner; > > > struct lockdep_map dep_map; > >} rwlock_t; ># 80 "include/linux/spinlock.h" 2 > >extern int __attribute__((section(".spinlock.text"))) generic__raw_read_trylock(raw_rwlock_t *lock); > > > > > ># 1 "include/asm/spinlock.h" 1 > > > ># 1 "include/asm/atomic.h" 1 > ># 1 "include/asm/atomic_32.h" 1 > > > > > ># 1 "include/asm/cmpxchg.h" 1 ># 7 "include/asm/atomic_32.h" 2 ># 18 "include/asm/atomic_32.h" >typedef struct { > int counter; >} atomic_t; ># 48 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) void atomic_add(int i, atomic_t *v) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "addl %1,%0" > : "+m" (v->counter) > : "ir" (i)); >} ># 62 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) void atomic_sub(int i, atomic_t *v) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "subl %1,%0" > : "+m" (v->counter) > : "ir" (i)); >} ># 78 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) int atomic_sub_and_test(int i, atomic_t *v) >{ > unsigned char c; > > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "subl %2,%0; sete %1" > : "+m" (v->counter), "=qm" (c) > : "ir" (i) : "memory"); > return c; >} > > > > > > > >static inline __attribute__((always_inline)) void atomic_inc(atomic_t *v) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "incl %0" > : "+m" (v->counter)); >} > > > > > > > >static inline __attribute__((always_inline)) void atomic_dec(atomic_t *v) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "decl %0" > : "+m" (v->counter)); >} ># 120 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) int atomic_dec_and_test(atomic_t *v) >{ > unsigned char c; > > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "decl %0; sete %1" > : "+m" (v->counter), "=qm" (c) > : : "memory"); > return c != 0; >} ># 138 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) int atomic_inc_and_test(atomic_t *v) >{ > unsigned char c; > > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "incl %0; sete %1" > : "+m" (v->counter), "=qm" (c) > : : "memory"); > return c != 0; >} ># 157 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) int atomic_add_negative(int i, atomic_t *v) >{ > unsigned char c; > > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "addl %2,%0; sets %1" > : "+m" (v->counter), "=qm" (c) > : "ir" (i) : "memory"); > return c; >} ># 174 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) int atomic_add_return(int i, atomic_t *v) >{ > int __i; > > > > > > > __i = i; > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "xaddl %0, %1" > : "+r" (i), "+m" (v->counter) > : : "memory"); > return i + __i; ># 197 "include/asm/atomic_32.h" >} ># 206 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t *v) >{ > return atomic_add_return(-i, v); >} ># 223 "include/asm/atomic_32.h" >static inline __attribute__((always_inline)) int atomic_add_unless(atomic_t *v, int a, int u) >{ > int c, old; > c = ((v)->counter); > for (;;) { > if (__builtin_expect(!!(c == (u)), 0)) > break; > old = (((__typeof__(*(&(((v))->counter))))__cmpxchg((&(((v))->counter)), (unsigned long)((c)), (unsigned long)((c + (a))), sizeof(*(&(((v))->counter)))))); > if (__builtin_expect(!!(old == c), 1)) > break; > c = old; > } > return c != (u); >} ># 258 "include/asm/atomic_32.h" ># 1 "include/asm-generic/atomic.h" 1 ># 141 "include/asm-generic/atomic.h" >typedef atomic_t atomic_long_t; > > >static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return (long)((v)->counter); >} > >static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i) >{ > atomic_t *v = (atomic_t *)l; > > (((v)->counter) = (i)); >} > >static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > atomic_inc(v); >} > >static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > atomic_dec(v); >} > >static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > atomic_add(i, v); >} > >static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > atomic_sub(i, v); >} > >static inline __attribute__((always_inline)) int atomic_long_sub_and_test(long i, atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return atomic_sub_and_test(i, v); >} > >static inline __attribute__((always_inline)) int atomic_long_dec_and_test(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return atomic_dec_and_test(v); >} > >static inline __attribute__((always_inline)) int atomic_long_inc_and_test(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return atomic_inc_and_test(v); >} > >static inline __attribute__((always_inline)) int atomic_long_add_negative(long i, atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return atomic_add_negative(i, v); >} > >static inline __attribute__((always_inline)) long atomic_long_add_return(long i, atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return (long)atomic_add_return(i, v); >} > >static inline __attribute__((always_inline)) long atomic_long_sub_return(long i, atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return (long)atomic_sub_return(i, v); >} > >static inline __attribute__((always_inline)) long atomic_long_inc_return(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return (long)(atomic_add_return(1, v)); >} > >static inline __attribute__((always_inline)) long atomic_long_dec_return(atomic_long_t *l) >{ > atomic_t *v = (atomic_t *)l; > > return (long)(atomic_sub_return(1, v)); >} > >static inline __attribute__((always_inline)) long atomic_long_add_unless(atomic_long_t *l, long a, long u) >{ > atomic_t *v = (atomic_t *)l; > > return (long)atomic_add_unless(v, a, u); >} ># 259 "include/asm/atomic_32.h" 2 ># 3 "include/asm/atomic.h" 2 ># 5 "include/asm/spinlock.h" 2 ># 1 "include/asm/rwlock.h" 1 ># 6 "include/asm/spinlock.h" 2 ># 57 "include/asm/spinlock.h" >static inline __attribute__((always_inline)) int __raw_spin_is_locked(raw_spinlock_t *lock) >{ > int tmp = (*(volatile typeof(lock->slock) *)&(lock->slock)); > > return (((tmp >> 8) & 0xff) != (tmp & 0xff)); >} > >static inline __attribute__((always_inline)) int __raw_spin_is_contended(raw_spinlock_t *lock) >{ > int tmp = (*(volatile typeof(lock->slock) *)&(lock->slock)); > > return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1; >} > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void __raw_spin_lock(raw_spinlock_t *lock) >{ > short inc = 0x0100; > > asm volatile ( > ".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "xaddw %w0, %1\n" > "1:\t" > "cmpb %h0, %b0\n\t" > "je 2f\n\t" > "rep ; nop\n\t" > "movb %1, %b0\n\t" > > "jmp 1b\n" > "2:" > : "+Q" (inc), "+m" (lock->slock) > : > : "memory", "cc"); >} > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) int __raw_spin_trylock(raw_spinlock_t *lock) >{ > int tmp; > short new; > > asm volatile("movw %2,%w0\n\t" > "cmpb %h0,%b0\n\t" > "jne 1f\n\t" > "movw %w0,%w1\n\t" > "incb %h1\n\t" > "lock ; cmpxchgw %w1,%2\n\t" > "1:" > "sete %b1\n\t" > "movzbl %b1,%0\n\t" > : "=&a" (tmp), "=Q" (new), "+m" (lock->slock) > : > : "memory", "cc"); > > return tmp; >} > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void __raw_spin_unlock(raw_spinlock_t *lock) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "incb %0" > : "+m" (lock->slock) > : > : "memory", "cc"); >} ># 189 "include/asm/spinlock.h" >static inline __attribute__((always_inline)) void __raw_spin_unlock_wait(raw_spinlock_t *lock) >{ > while (__raw_spin_is_locked(lock)) > cpu_relax(); >} ># 213 "include/asm/spinlock.h" >static inline __attribute__((always_inline)) int __raw_read_can_lock(raw_rwlock_t *lock) >{ > return (int)(lock)->lock > 0; >} > > > > > >static inline __attribute__((always_inline)) int __raw_write_can_lock(raw_rwlock_t *lock) >{ > return (lock)->lock == 0x01000000; >} > >static inline __attribute__((always_inline)) void __raw_read_lock(raw_rwlock_t *rw) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " " subl $1,(%0)\n\t" > "jns 1f\n" > "call __read_lock_failed\n\t" > "1:\n" > ::"a" (rw) : "memory"); >} > >static inline __attribute__((always_inline)) void __raw_write_lock(raw_rwlock_t *rw) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " " subl %1,(%0)\n\t" > "jz 1f\n" > "call __write_lock_failed\n\t" > "1:\n" > ::"a" (rw), "i" (0x01000000) : "memory"); >} > >static inline __attribute__((always_inline)) int __raw_read_trylock(raw_rwlock_t *lock) >{ > atomic_t *count = (atomic_t *)lock; > > atomic_dec(count); > if (((count)->counter) >= 0) > return 1; > atomic_inc(count); > return 0; >} > >static inline __attribute__((always_inline)) int __raw_write_trylock(raw_rwlock_t *lock) >{ > atomic_t *count = (atomic_t *)lock; > > if (atomic_sub_and_test(0x01000000, count)) > return 1; > atomic_add(0x01000000, count); > return 0; >} > >static inline __attribute__((always_inline)) void __raw_read_unlock(raw_rwlock_t *rw) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "incl %0" :"+m" (rw->lock) : : "memory"); >} > >static inline __attribute__((always_inline)) void __raw_write_unlock(raw_rwlock_t *rw) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "addl %1, %0" > : "+m" (rw->lock) : "i" (0x01000000) : "memory"); >} ># 88 "include/linux/spinlock.h" 2 > > > > > > extern void __spin_lock_init(spinlock_t *lock, const char *name, > struct lock_class_key *key); ># 108 "include/linux/spinlock.h" > extern void __rwlock_init(rwlock_t *lock, const char *name, > struct lock_class_key *key); ># 139 "include/linux/spinlock.h" ># 1 "include/linux/spinlock_api_smp.h" 1 ># 18 "include/linux/spinlock_api_smp.h" >int in_lock_functions(unsigned long addr); > > > >void __attribute__((section(".spinlock.text"))) _spin_lock(spinlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _spin_lock_nested(spinlock_t *lock, int subclass) > ; >void __attribute__((section(".spinlock.text"))) _read_lock(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _write_lock(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _spin_lock_bh(spinlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _read_lock_bh(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _write_lock_bh(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _spin_lock_irq(spinlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _read_lock_irq(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _write_lock_irq(rwlock_t *lock) ; >unsigned long __attribute__((section(".spinlock.text"))) _spin_lock_irqsave(spinlock_t *lock) > ; >unsigned long __attribute__((section(".spinlock.text"))) _spin_lock_irqsave_nested(spinlock_t *lock, int subclass) > ; >unsigned long __attribute__((section(".spinlock.text"))) _read_lock_irqsave(rwlock_t *lock) > ; >unsigned long __attribute__((section(".spinlock.text"))) _write_lock_irqsave(rwlock_t *lock) > ; >int __attribute__((section(".spinlock.text"))) _spin_trylock(spinlock_t *lock); >int __attribute__((section(".spinlock.text"))) _read_trylock(rwlock_t *lock); >int __attribute__((section(".spinlock.text"))) _write_trylock(rwlock_t *lock); >int __attribute__((section(".spinlock.text"))) _spin_trylock_bh(spinlock_t *lock); >void __attribute__((section(".spinlock.text"))) _spin_unlock(spinlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _read_unlock(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _write_unlock(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _spin_unlock_bh(spinlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _read_unlock_bh(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _write_unlock_bh(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _spin_unlock_irq(spinlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _read_unlock_irq(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _write_unlock_irq(rwlock_t *lock) ; >void __attribute__((section(".spinlock.text"))) _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) > ; >void __attribute__((section(".spinlock.text"))) _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) > ; >void __attribute__((section(".spinlock.text"))) _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) > ; ># 140 "include/linux/spinlock.h" 2 > > > > > > extern void _raw_spin_lock(spinlock_t *lock); > > extern int _raw_spin_trylock(spinlock_t *lock); > extern void _raw_spin_unlock(spinlock_t *lock); > extern void _raw_read_lock(rwlock_t *lock); > extern int _raw_read_trylock(rwlock_t *lock); > extern void _raw_read_unlock(rwlock_t *lock); > extern void _raw_write_lock(rwlock_t *lock); > extern int _raw_write_trylock(rwlock_t *lock); > extern void _raw_write_unlock(rwlock_t *lock); ># 302 "include/linux/spinlock.h" ># 1 "include/asm/atomic.h" 1 ># 303 "include/linux/spinlock.h" 2 ># 311 "include/linux/spinlock.h" >extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); ># 25 "include/linux/wait.h" 2 > ># 1 "include/asm/current.h" 1 ># 27 "include/linux/wait.h" 2 > >typedef struct __wait_queue wait_queue_t; >typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key); >int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); > >struct __wait_queue { > unsigned int flags; > > void *private; > wait_queue_func_t func; > struct list_head task_list; >}; > >struct wait_bit_key { > void *flags; > int bit_nr; >}; > >struct wait_bit_queue { > struct wait_bit_key key; > wait_queue_t wait; >}; > >struct __wait_queue_head { > spinlock_t lock; > struct list_head task_list; >}; >typedef struct __wait_queue_head wait_queue_head_t; > >struct task_struct; ># 80 "include/linux/wait.h" >extern void init_waitqueue_head(wait_queue_head_t *q); ># 91 "include/linux/wait.h" >static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) >{ > q->flags = 0; > q->private = p; > q->func = default_wake_function; >} > >static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q, > wait_queue_func_t func) >{ > q->flags = 0; > q->private = ((void *)0); > q->func = func; >} > >static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q) >{ > return !list_empty(&q->task_list); >} ># 120 "include/linux/wait.h" >extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); >extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait); >extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); > >static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) >{ > list_add(&new->task_list, &head->task_list); >} > > > > >static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head, > wait_queue_t *new) >{ > list_add_tail(&new->task_list, &head->task_list); >} > >static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head, > wait_queue_t *old) >{ > list_del(&old->task_list); >} > >void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); >extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); >extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); >void __wake_up_bit(wait_queue_head_t *, void *, int); >int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); >int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); >void wake_up_bit(void *, int); >int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned); >int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned); >wait_queue_head_t *bit_waitqueue(void *, int); ># 409 "include/linux/wait.h" >static inline __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q, > wait_queue_t * wait) >{ > wait->flags |= 0x01; > __add_wait_queue_tail(q, wait); >} > > > > >static inline __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q, > wait_queue_t * wait) >{ > __remove_wait_queue(q, wait); >} > > > > > > >extern void sleep_on(wait_queue_head_t *q); >extern long sleep_on_timeout(wait_queue_head_t *q, > signed long timeout); >extern void interruptible_sleep_on(wait_queue_head_t *q); >extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, > signed long timeout); > > > > >void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); >void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); >void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); >int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); >int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); ># 485 "include/linux/wait.h" >static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit, > int (*action)(void *), unsigned mode) >{ > if (!(__builtin_constant_p((bit)) ? constant_test_bit((bit), (word)) : variable_test_bit((bit), (word)))) > return 0; > return out_of_line_wait_on_bit(word, bit, action, mode); >} ># 509 "include/linux/wait.h" >static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit, > int (*action)(void *), unsigned mode) >{ > if (!test_and_set_bit(bit, word)) > return 0; > return out_of_line_wait_on_bit_lock(word, bit, action, mode); >} ># 276 "include/linux/fs.h" 2 > ># 1 "include/linux/kdev_t.h" 1 ># 21 "include/linux/kdev_t.h" >static inline __attribute__((always_inline)) int old_valid_dev(dev_t dev) >{ > return ((unsigned int) ((dev) >> 20)) < 256 && ((unsigned int) ((dev) & ((1U << 20) - 1))) < 256; >} > >static inline __attribute__((always_inline)) u16 old_encode_dev(dev_t dev) >{ > return (((unsigned int) ((dev) >> 20)) << 8) | ((unsigned int) ((dev) & ((1U << 20) - 1))); >} > >static inline __attribute__((always_inline)) dev_t old_decode_dev(u16 val) >{ > return ((((val >> 8) & 255) << 20) | (val & 255)); >} > >static inline __attribute__((always_inline)) int new_valid_dev(dev_t dev) >{ > return 1; >} > >static inline __attribute__((always_inline)) u32 new_encode_dev(dev_t dev) >{ > unsigned major = ((unsigned int) ((dev) >> 20)); > unsigned minor = ((unsigned int) ((dev) & ((1U << 20) - 1))); > return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12); >} > >static inline __attribute__((always_inline)) dev_t new_decode_dev(u32 dev) >{ > unsigned major = (dev & 0xfff00) >> 8; > unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00); > return (((major) << 20) | (minor)); >} > >static inline __attribute__((always_inline)) int huge_valid_dev(dev_t dev) >{ > return 1; >} > >static inline __attribute__((always_inline)) u64 huge_encode_dev(dev_t dev) >{ > return new_encode_dev(dev); >} > >static inline __attribute__((always_inline)) dev_t huge_decode_dev(u64 dev) >{ > return new_decode_dev(dev); >} > >static inline __attribute__((always_inline)) int sysv_valid_dev(dev_t dev) >{ > return ((unsigned int) ((dev) >> 20)) < (1<<14) && ((unsigned int) ((dev) & ((1U << 20) - 1))) < (1<<18); >} > >static inline __attribute__((always_inline)) u32 sysv_encode_dev(dev_t dev) >{ > return ((unsigned int) ((dev) & ((1U << 20) - 1))) | (((unsigned int) ((dev) >> 20)) << 18); >} > >static inline __attribute__((always_inline)) unsigned sysv_major(u32 dev) >{ > return (dev >> 18) & 0x3fff; >} > >static inline __attribute__((always_inline)) unsigned sysv_minor(u32 dev) >{ > return dev & 0x3ffff; >} ># 278 "include/linux/fs.h" 2 ># 1 "include/linux/dcache.h" 1 > > > ># 1 "include/asm/atomic.h" 1 ># 5 "include/linux/dcache.h" 2 > > > ># 1 "include/linux/rcupdate.h" 1 ># 39 "include/linux/rcupdate.h" ># 1 "include/linux/percpu.h" 1 > > > > ># 1 "include/linux/slab.h" 1 ># 12 "include/linux/slab.h" ># 1 "include/linux/gfp.h" 1 > > > ># 1 "include/linux/mmzone.h" 1 ># 13 "include/linux/mmzone.h" ># 1 "include/linux/numa.h" 1 ># 14 "include/linux/mmzone.h" 2 > ># 1 "include/linux/seqlock.h" 1 ># 32 "include/linux/seqlock.h" >typedef struct { > unsigned sequence; > spinlock_t lock; >} seqlock_t; ># 60 "include/linux/seqlock.h" >static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl) >{ > _spin_lock(&sl->lock); > ++sl->sequence; > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl) >{ > __asm__ __volatile__("": : :"memory"); > sl->sequence++; > _spin_unlock(&sl->lock); >} > >static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl) >{ > int ret = (_spin_trylock(&sl->lock)); > > if (ret) { > ++sl->sequence; > __asm__ __volatile__("": : :"memory"); > } > return ret; >} > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl) >{ > unsigned ret; > >repeat: > ret = sl->sequence; > asm volatile ("661:\n\t" "lock; addl $0,0(%%esp)" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "lfence" "\n664:\n" ".previous" :: "i" ((0*32+26)) : "memory"); > if (__builtin_expect(!!(ret & 1), 0)) { > cpu_relax(); > goto repeat; > } > > return ret; >} > > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned start) >{ > asm volatile ("661:\n\t" "lock; addl $0,0(%%esp)" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "lfence" "\n664:\n" ".previous" :: "i" ((0*32+26)) : "memory"); > > return (sl->sequence != start); >} ># 121 "include/linux/seqlock.h" >typedef struct seqcount { > unsigned sequence; >} seqcount_t; > > > > > >static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s) >{ > unsigned ret; > >repeat: > ret = s->sequence; > asm volatile ("661:\n\t" "lock; addl $0,0(%%esp)" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "lfence" "\n664:\n" ".previous" :: "i" ((0*32+26)) : "memory"); > if (__builtin_expect(!!(ret & 1), 0)) { > cpu_relax(); > goto repeat; > } > return ret; >} > > > > >static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned start) >{ > asm volatile ("661:\n\t" "lock; addl $0,0(%%esp)" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "lfence" "\n664:\n" ".previous" :: "i" ((0*32+26)) : "memory"); > > return s->sequence != start; >} > > > > > > >static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s) >{ > s->sequence++; > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s) >{ > __asm__ __volatile__("": : :"memory"); > s->sequence++; >} ># 16 "include/linux/mmzone.h" 2 ># 1 "include/linux/nodemask.h" 1 ># 92 "include/linux/nodemask.h" >typedef struct { unsigned long bits[((((1 << 0)) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; } nodemask_t; >extern nodemask_t _unused_nodemask_arg_; > > >static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp) >{ > set_bit(node, dstp->bits); >} > > >static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp) >{ > clear_bit(node, dstp->bits); >} > > >static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits) >{ > bitmap_fill(dstp->bits, nbits); >} > > >static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits) >{ > bitmap_zero(dstp->bits, nbits); >} > > > > > > >static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr) >{ > return test_and_set_bit(node, addr->bits); >} > > > >static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp, > const nodemask_t *srcp, int nbits) >{ > bitmap_complement(dstp->bits, srcp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > return bitmap_equal(src1p->bits, src2p->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > return bitmap_intersects(src1p->bits, src2p->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p, > const nodemask_t *src2p, int nbits) >{ > return bitmap_subset(src1p->bits, src2p->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits) >{ > return bitmap_empty(srcp->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits) >{ > return bitmap_full(srcp->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits) >{ > return bitmap_weight(srcp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp, > const nodemask_t *srcp, int n, int nbits) >{ > bitmap_shift_right(dstp->bits, srcp->bits, n, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp, > const nodemask_t *srcp, int n, int nbits) >{ > bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); >} > > > > > >static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp) >{ > return ({ int __min1 = ((1 << 0)); int __min2 = (find_first_bit(srcp->bits, (1 << 0))); __min1 < __min2 ? __min1: __min2; }); >} > > >static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp) >{ > return ({ int __min1 = ((1 << 0)); int __min2 = (find_next_bit(srcp->bits, (1 << 0), n+1)); __min1 < __min2 ? __min1: __min2; }); >} ># 255 "include/linux/nodemask.h" >static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp) >{ > return ({ int __min1 = ((1 << 0)); int __min2 = (find_first_zero_bit(maskp->bits, (1 << 0))); __min1 < __min2 ? __min1: __min2; }); > >} ># 289 "include/linux/nodemask.h" >static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len, > const nodemask_t *srcp, int nbits) >{ > return bitmap_scnprintf(buf, len, srcp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __nodemask_parse_user(const char *buf, int len, > nodemask_t *dstp, int nbits) >{ > return bitmap_parse_user(buf, len, dstp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len, > const nodemask_t *srcp, int nbits) >{ > return bitmap_scnlistprintf(buf, len, srcp->bits, nbits); >} > > >static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits) >{ > return bitmap_parselist(buf, dstp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) int __node_remap(int oldbit, > const nodemask_t *oldp, const nodemask_t *newp, int nbits) >{ > return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp, > const nodemask_t *oldp, const nodemask_t *newp, int nbits) >{ > bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_onto(nodemask_t *dstp, const nodemask_t *origp, > const nodemask_t *relmapp, int nbits) >{ > bitmap_onto(dstp->bits, origp->bits, relmapp->bits, nbits); >} > > > >static inline __attribute__((always_inline)) void __nodes_fold(nodemask_t *dstp, const nodemask_t *origp, > int sz, int nbits) >{ > bitmap_fold(dstp->bits, origp->bits, sz, nbits); >} ># 363 "include/linux/nodemask.h" >enum node_states { > N_POSSIBLE, > N_ONLINE, > N_NORMAL_MEMORY, > > N_HIGH_MEMORY, > > > > N_CPU, > NR_NODE_STATES >}; > > > > > > >extern nodemask_t node_states[NR_NODE_STATES]; ># 413 "include/linux/nodemask.h" >static inline __attribute__((always_inline)) int node_state(int node, enum node_states state) >{ > return node == 0; >} > >static inline __attribute__((always_inline)) void node_set_state(int node, enum node_states state) >{ >} > >static inline __attribute__((always_inline)) void node_clear_state(int node, enum node_states state) >{ >} > >static inline __attribute__((always_inline)) int num_node_state(enum node_states state) >{ > return 1; >} ># 17 "include/linux/mmzone.h" 2 ># 1 "include/linux/pageblock-flags.h" 1 ># 33 "include/linux/pageblock-flags.h" >enum pageblock_bits { > PB_migrate, PB_migrate_end = (PB_migrate + 3) - 1, > NR_PAGEBLOCK_BITS >}; ># 62 "include/linux/pageblock-flags.h" >struct page; > > >unsigned long get_pageblock_flags_group(struct page *page, > int start_bitidx, int end_bitidx); >void set_pageblock_flags_group(struct page *page, unsigned long flags, > int start_bitidx, int end_bitidx); ># 18 "include/linux/mmzone.h" 2 ># 1 "include/linux/bounds.h" 1 ># 19 "include/linux/mmzone.h" 2 ># 1 "include/asm/atomic.h" 1 ># 20 "include/linux/mmzone.h" 2 ># 49 "include/linux/mmzone.h" >extern int page_group_by_mobility_disabled; > >static inline __attribute__((always_inline)) int get_pageblock_migratetype(struct page *page) >{ > if (__builtin_expect(!!(page_group_by_mobility_disabled), 0)) > return 0; > > return get_pageblock_flags_group(page, PB_migrate, PB_migrate_end); >} > >struct free_area { > struct list_head free_list[5]; > unsigned long nr_free; >}; > >struct pglist_data; ># 73 "include/linux/mmzone.h" >struct zone_padding { > char x[0]; >} __attribute__((__aligned__(1 << ((7))))); > > > > > >enum zone_stat_item { > > NR_FREE_PAGES, > NR_INACTIVE, > NR_ACTIVE, > NR_ANON_PAGES, > NR_FILE_MAPPED, > > NR_FILE_PAGES, > NR_FILE_DIRTY, > NR_WRITEBACK, > > NR_SLAB_RECLAIMABLE, > NR_SLAB_UNRECLAIMABLE, > NR_PAGETABLE, > NR_UNSTABLE_NFS, > NR_BOUNCE, > NR_VMSCAN_WRITE, > NR_WRITEBACK_TEMP, ># 108 "include/linux/mmzone.h" > NR_VM_ZONE_STAT_ITEMS }; > >struct per_cpu_pages { > int count; > int high; > int batch; > struct list_head list; >}; > >struct per_cpu_pageset { > struct per_cpu_pages pcp; > > > > > s8 stat_threshold; > s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; > >} __attribute__((__aligned__((1 << (7))))); ># 136 "include/linux/mmzone.h" >enum zone_type { ># 156 "include/linux/mmzone.h" > ZONE_DMA, ># 171 "include/linux/mmzone.h" > ZONE_NORMAL, ># 181 "include/linux/mmzone.h" > ZONE_HIGHMEM, > > ZONE_MOVABLE, > __MAX_NR_ZONES >}; ># 207 "include/linux/mmzone.h" >struct zone { > > unsigned long pages_min, pages_low, pages_high; ># 218 "include/linux/mmzone.h" > unsigned long lowmem_reserve[4]; ># 229 "include/linux/mmzone.h" > struct per_cpu_pageset pageset[32]; > > > > > spinlock_t lock; > > > > > struct free_area free_area[11]; > > > > > > > unsigned long *pageblock_flags; > > > > struct zone_padding _pad1_; > > > spinlock_t lru_lock; > struct list_head active_list; > struct list_head inactive_list; > unsigned long nr_scan_active; > unsigned long nr_scan_inactive; > unsigned long pages_scanned; > unsigned long flags; > > > atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; ># 277 "include/linux/mmzone.h" > int prev_priority; > > > struct zone_padding _pad2_; ># 307 "include/linux/mmzone.h" > wait_queue_head_t * wait_table; > unsigned long wait_table_hash_nr_entries; > unsigned long wait_table_bits; > > > > > struct pglist_data *zone_pgdat; > > unsigned long zone_start_pfn; ># 328 "include/linux/mmzone.h" > unsigned long spanned_pages; > unsigned long present_pages; > > > > > const char *name; >} __attribute__((__aligned__(1 << ((7))))); > >typedef enum { > ZONE_ALL_UNRECLAIMABLE, > ZONE_RECLAIM_LOCKED, > ZONE_OOM_LOCKED, >} zone_flags_t; > >static inline __attribute__((always_inline)) void zone_set_flag(struct zone *zone, zone_flags_t flag) >{ > set_bit(flag, &zone->flags); >} > >static inline __attribute__((always_inline)) int zone_test_and_set_flag(struct zone *zone, zone_flags_t flag) >{ > return test_and_set_bit(flag, &zone->flags); >} > >static inline __attribute__((always_inline)) void zone_clear_flag(struct zone *zone, zone_flags_t flag) >{ > clear_bit(flag, &zone->flags); >} > >static inline __attribute__((always_inline)) int zone_is_all_unreclaimable(const struct zone *zone) >{ > return (__builtin_constant_p((ZONE_ALL_UNRECLAIMABLE)) ? constant_test_bit((ZONE_ALL_UNRECLAIMABLE), (&zone->flags)) : variable_test_bit((ZONE_ALL_UNRECLAIMABLE), (&zone->flags))); >} > >static inline __attribute__((always_inline)) int zone_is_reclaim_locked(const struct zone *zone) >{ > return (__builtin_constant_p((ZONE_RECLAIM_LOCKED)) ? constant_test_bit((ZONE_RECLAIM_LOCKED), (&zone->flags)) : variable_test_bit((ZONE_RECLAIM_LOCKED), (&zone->flags))); >} > >static inline __attribute__((always_inline)) int zone_is_oom_locked(const struct zone *zone) >{ > return (__builtin_constant_p((ZONE_OOM_LOCKED)) ? constant_test_bit((ZONE_OOM_LOCKED), (&zone->flags)) : variable_test_bit((ZONE_OOM_LOCKED), (&zone->flags))); >} ># 461 "include/linux/mmzone.h" >struct zonelist_cache; > > > > > > >struct zoneref { > struct zone *zone; > int zone_idx; >}; ># 490 "include/linux/mmzone.h" >struct zonelist { > struct zonelist_cache *zlcache_ptr; > struct zoneref _zonerefs[((1 << 0) * 4) + 1]; > > > >}; > > >struct node_active_region { > unsigned long start_pfn; > unsigned long end_pfn; > int nid; >}; > > > > >extern struct page *mem_map; ># 522 "include/linux/mmzone.h" >struct bootmem_data; >typedef struct pglist_data { > struct zone node_zones[4]; > struct zonelist node_zonelists[1]; > int nr_zones; > > struct page *node_mem_map; > > struct bootmem_data *bdata; ># 541 "include/linux/mmzone.h" > unsigned long node_start_pfn; > unsigned long node_present_pages; > unsigned long node_spanned_pages; > > int node_id; > wait_queue_head_t kswapd_wait; > struct task_struct *kswapd; > int kswapd_max_order; >} pg_data_t; ># 560 "include/linux/mmzone.h" ># 1 "include/linux/memory_hotplug.h" 1 > > > ># 1 "include/linux/mmzone.h" 1 ># 5 "include/linux/memory_hotplug.h" 2 > ># 1 "include/linux/notifier.h" 1 ># 12 "include/linux/notifier.h" ># 1 "include/linux/errno.h" 1 > > > ># 1 "include/asm/errno.h" 1 ># 5 "include/linux/errno.h" 2 ># 13 "include/linux/notifier.h" 2 ># 1 "include/linux/mutex.h" 1 ># 18 "include/linux/mutex.h" ># 1 "include/asm/atomic.h" 1 ># 19 "include/linux/mutex.h" 2 ># 48 "include/linux/mutex.h" >struct mutex { > > atomic_t count; > spinlock_t wait_lock; > struct list_head wait_list; > > struct thread_info *owner; > const char *name; > void *magic; > > > struct lockdep_map dep_map; > >}; > > > > > >struct mutex_waiter { > struct list_head list; > struct task_struct *task; > > struct mutex *lock; > void *magic; > >}; > > ># 1 "include/linux/mutex-debug.h" 1 ># 21 "include/linux/mutex-debug.h" >extern void mutex_destroy(struct mutex *lock); ># 78 "include/linux/mutex.h" 2 ># 106 "include/linux/mutex.h" >extern void __mutex_init(struct mutex *lock, const char *name, > struct lock_class_key *key); > > > > > > > >static inline __attribute__((always_inline)) int mutex_is_locked(struct mutex *lock) >{ > return ((&lock->count)->counter) != 1; >} > > > > > > >extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); >extern int __attribute__((warn_unused_result)) mutex_lock_interruptible_nested(struct mutex *lock, > unsigned int subclass); >extern int __attribute__((warn_unused_result)) mutex_lock_killable_nested(struct mutex *lock, > unsigned int subclass); ># 148 "include/linux/mutex.h" >extern int mutex_trylock(struct mutex *lock); >extern void mutex_unlock(struct mutex *lock); ># 14 "include/linux/notifier.h" 2 ># 1 "include/linux/rwsem.h" 1 ># 15 "include/linux/rwsem.h" ># 1 "include/asm/atomic.h" 1 ># 16 "include/linux/rwsem.h" 2 > >struct rw_semaphore; > > > > ># 1 "include/asm/rwsem.h" 1 ># 45 "include/asm/rwsem.h" >struct rwsem_waiter; > >extern __attribute__((regparm(3))) struct rw_semaphore * > rwsem_down_read_failed(struct rw_semaphore *sem); >extern __attribute__((regparm(3))) struct rw_semaphore * > rwsem_down_write_failed(struct rw_semaphore *sem); >extern __attribute__((regparm(3))) struct rw_semaphore * > rwsem_wake(struct rw_semaphore *); >extern __attribute__((regparm(3))) struct rw_semaphore * > rwsem_downgrade_wake(struct rw_semaphore *sem); ># 67 "include/asm/rwsem.h" >struct rw_semaphore { > signed long count; > spinlock_t wait_lock; > struct list_head wait_list; > > struct lockdep_map dep_map; > >}; ># 92 "include/asm/rwsem.h" >extern void __init_rwsem(struct rw_semaphore *sem, const char *name, > struct lock_class_key *key); ># 105 "include/asm/rwsem.h" >static inline __attribute__((always_inline)) void __down_read(struct rw_semaphore *sem) >{ > asm volatile("# beginning down_read\n\t" > ".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " " incl (%%eax)\n\t" > > " jns 1f\n" > " call call_rwsem_down_read_failed\n" > "1:\n\t" > "# ending down_read\n\t" > : "+m" (sem->count) > : "a" (sem) > : "memory", "cc"); >} > > > > >static inline __attribute__((always_inline)) int __down_read_trylock(struct rw_semaphore *sem) >{ > __s32 result, tmp; > asm volatile("# beginning __down_read_trylock\n\t" > " movl %0,%1\n\t" > "1:\n\t" > " movl %1,%2\n\t" > " addl %3,%2\n\t" > " jle 2f\n\t" > ".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " " cmpxchgl %2,%0\n\t" > " jnz 1b\n\t" > "2:\n\t" > "# ending __down_read_trylock\n\t" > : "+m" (sem->count), "=&a" (result), "=&r" (tmp) > : "i" (0x00000001) > : "memory", "cc"); > return result >= 0 ? 1 : 0; >} > > > > >static inline __attribute__((always_inline)) void __down_write_nested(struct rw_semaphore *sem, int subclass) >{ > int tmp; > > tmp = ((-0x00010000) + 0x00000001); > asm volatile("# beginning down_write\n\t" > ".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " " xadd %%edx,(%%eax)\n\t" > > " testl %%edx,%%edx\n\t" > > " jz 1f\n" > " call call_rwsem_down_write_failed\n" > "1:\n" > "# ending down_write" > : "+m" (sem->count), "=d" (tmp) > : "a" (sem), "1" (tmp) > : "memory", "cc"); >} > >static inline __attribute__((always_inline)) void __down_write(struct rw_semaphore *sem) >{ > __down_write_nested(sem, 0); >} > > > > >static inline __attribute__((always_inline)) int __down_write_trylock(struct rw_semaphore *sem) >{ > signed long ret = ((__typeof__(*(&sem->count)))__cmpxchg((&sem->count), (unsigned long)(0x00000000), (unsigned long)(((-0x00010000) + 0x00000001)), sizeof(*(&sem->count)))); > > > if (ret == 0x00000000) > return 1; > return 0; >} > > > > >static inline __attribute__((always_inline)) void __up_read(struct rw_semaphore *sem) >{ > __s32 tmp = -0x00000001; > asm volatile("# beginning __up_read\n\t" > ".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " " xadd %%edx,(%%eax)\n\t" > > " jns 1f\n\t" > " call call_rwsem_wake\n" > "1:\n" > "# ending __up_read\n" > : "+m" (sem->count), "=d" (tmp) > : "a" (sem), "1" (tmp) > : "memory", "cc"); >} > > > > >static inline __attribute__((always_inline)) void __up_write(struct rw_semaphore *sem) >{ > asm volatile("# beginning __up_write\n\t" > " movl %2,%%edx\n\t" > ".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " " xaddl %%edx,(%%eax)\n\t" > > > " jz 1f\n" > " call call_rwsem_wake\n" > "1:\n\t" > "# ending __up_write\n" > : "+m" (sem->count) > : "a" (sem), "i" (-((-0x00010000) + 0x00000001)) > : "memory", "cc", "edx"); >} > > > > >static inline __attribute__((always_inline)) void __downgrade_write(struct rw_semaphore *sem) >{ > asm volatile("# beginning __downgrade_write\n\t" > ".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " " addl %2,(%%eax)\n\t" > > " jns 1f\n\t" > " call call_rwsem_downgrade_wake\n" > "1:\n\t" > "# ending __downgrade_write\n" > : "+m" (sem->count) > : "a" (sem), "i" (-(-0x00010000)) > : "memory", "cc"); >} > > > > >static inline __attribute__((always_inline)) void rwsem_atomic_add(int delta, struct rw_semaphore *sem) >{ > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "addl %1,%0" > : "+m" (sem->count) > : "ir" (delta)); >} > > > > >static inline __attribute__((always_inline)) int rwsem_atomic_update(int delta, struct rw_semaphore *sem) >{ > int tmp = delta; > > asm volatile(".section .smp_locks,\"a\"\n" " .balign 4 " "\n" " .long " "661f\n" ".previous\n" "661:\n\tlock; " "xadd %0,%1" > : "+r" (tmp), "+m" (sem->count) > : : "memory"); > > return tmp + delta; >} > >static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem) >{ > return (sem->count != 0); >} ># 23 "include/linux/rwsem.h" 2 > > > > > >extern void down_read(struct rw_semaphore *sem); > > > > >extern int down_read_trylock(struct rw_semaphore *sem); > > > > >extern void down_write(struct rw_semaphore *sem); > > > > >extern int down_write_trylock(struct rw_semaphore *sem); > > > > >extern void up_read(struct rw_semaphore *sem); > > > > >extern void up_write(struct rw_semaphore *sem); > > > > >extern void downgrade_write(struct rw_semaphore *sem); ># 74 "include/linux/rwsem.h" >extern void down_read_nested(struct rw_semaphore *sem, int subclass); >extern void down_write_nested(struct rw_semaphore *sem, int subclass); > > > > > > >extern void down_read_non_owner(struct rw_semaphore *sem); >extern void up_read_non_owner(struct rw_semaphore *sem); ># 15 "include/linux/notifier.h" 2 ># 1 "include/linux/srcu.h" 1 ># 30 "include/linux/srcu.h" >struct srcu_struct_array { > int c[2]; >}; > >struct srcu_struct { > int completed; > struct srcu_struct_array *per_cpu_ref; > struct mutex mutex; >}; > > > > > > > >int init_srcu_struct(struct srcu_struct *sp); >void cleanup_srcu_struct(struct srcu_struct *sp); >int srcu_read_lock(struct srcu_struct *sp) ; >void srcu_read_unlock(struct srcu_struct *sp, int idx) ; >void synchronize_srcu(struct srcu_struct *sp); >long srcu_batches_completed(struct srcu_struct *sp); ># 16 "include/linux/notifier.h" 2 ># 50 "include/linux/notifier.h" >struct notifier_block { > int (*notifier_call)(struct notifier_block *, unsigned long, void *); > struct notifier_block *next; > int priority; >}; > >struct atomic_notifier_head { > spinlock_t lock; > struct notifier_block *head; >}; > >struct blocking_notifier_head { > struct rw_semaphore rwsem; > struct notifier_block *head; >}; > >struct raw_notifier_head { > struct notifier_block *head; >}; > >struct srcu_notifier_head { > struct mutex mutex; > struct srcu_struct srcu; > struct notifier_block *head; >}; ># 89 "include/linux/notifier.h" >extern void srcu_init_notifier_head(struct srcu_notifier_head *nh); ># 115 "include/linux/notifier.h" >extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh, > struct notifier_block *nb); >extern int blocking_notifier_chain_register(struct blocking_notifier_head *nh, > struct notifier_block *nb); >extern int raw_notifier_chain_register(struct raw_notifier_head *nh, > struct notifier_block *nb); >extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh, > struct notifier_block *nb); > >extern int blocking_notifier_chain_cond_register( > struct blocking_notifier_head *nh, > struct notifier_block *nb); > >extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, > struct notifier_block *nb); >extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, > struct notifier_block *nb); >extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh, > struct notifier_block *nb); >extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh, > struct notifier_block *nb); > >extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh, > unsigned long val, void *v); >extern int __atomic_notifier_call_chain(struct atomic_notifier_head *nh, > unsigned long val, void *v, int nr_to_call, int *nr_calls); >extern int blocking_notifier_call_chain(struct blocking_notifier_head *nh, > unsigned long val, void *v); >extern int __blocking_notifier_call_chain(struct blocking_notifier_head *nh, > unsigned long val, void *v, int nr_to_call, int *nr_calls); >extern int raw_notifier_call_chain(struct raw_notifier_head *nh, > unsigned long val, void *v); >extern int __raw_notifier_call_chain(struct raw_notifier_head *nh, > unsigned long val, void *v, int nr_to_call, int *nr_calls); >extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh, > unsigned long val, void *v); >extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh, > unsigned long val, void *v, int nr_to_call, int *nr_calls); ># 165 "include/linux/notifier.h" >static inline __attribute__((always_inline)) int notifier_from_errno(int err) >{ > return 0x8000 | (0x0001 - err); >} > > >static inline __attribute__((always_inline)) int notifier_to_errno(int ret) >{ > ret &= ~0x8000; > return ret > 0x0001 ? 0x0001 - ret : 0; >} ># 247 "include/linux/notifier.h" >extern struct blocking_notifier_head reboot_notifier_list; ># 7 "include/linux/memory_hotplug.h" 2 > >struct page; >struct zone; >struct pglist_data; >struct mem_section; ># 165 "include/linux/memory_hotplug.h" >static inline __attribute__((always_inline)) void pgdat_resize_lock(struct pglist_data *p, unsigned long *f) {} >static inline __attribute__((always_inline)) void pgdat_resize_unlock(struct pglist_data *p, unsigned long *f) {} >static inline __attribute__((always_inline)) void pgdat_resize_init(struct pglist_data *pgdat) {} > >static inline __attribute__((always_inline)) unsigned zone_span_seqbegin(struct zone *zone) >{ > return 0; >} >static inline __attribute__((always_inline)) int zone_span_seqretry(struct zone *zone, unsigned iv) >{ > return 0; >} >static inline __attribute__((always_inline)) void zone_span_writelock(struct zone *zone) {} >static inline __attribute__((always_inline)) void zone_span_writeunlock(struct zone *zone) {} >static inline __attribute__((always_inline)) void zone_seqlock_init(struct zone *zone) {} > >static inline __attribute__((always_inline)) int mhp_notimplemented(const char *func) >{ > printk("<4>" "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func); > dump_stack(); > return -38; >} > >static inline __attribute__((always_inline)) void register_page_bootmem_info_node(struct pglist_data *pgdat) >{ >} > > > > > > > >extern int walk_memory_resource(unsigned long start_pfn, > unsigned long nr_pages, void *arg, > int (*func)(unsigned long, unsigned long, void *)); > >extern int add_memory(int nid, u64 start, u64 size); >extern int arch_add_memory(int nid, u64 start, u64 size); >extern int remove_memory(u64 start, u64 size); >extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, > int nr_pages); >extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); >extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map, > unsigned long pnum); ># 561 "include/linux/mmzone.h" 2 > >void get_zone_counts(unsigned long *active, unsigned long *inactive, > unsigned long *free); >void build_all_zonelists(void); >void wakeup_kswapd(struct zone *zone, int order); >int zone_watermark_ok(struct zone *z, int order, unsigned long mark, > int classzone_idx, int alloc_flags); >enum memmap_context { > MEMMAP_EARLY, > MEMMAP_HOTPLUG, >}; >extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn, > unsigned long size, > enum memmap_context context); > > > > >static inline __attribute__((always_inline)) void memory_present(int nid, unsigned long start, unsigned long end) {} ># 591 "include/linux/mmzone.h" >static inline __attribute__((always_inline)) int populated_zone(struct zone *zone) >{ > return (!!zone->present_pages); >} > >extern int movable_zone; > >static inline __attribute__((always_inline)) int zone_movable_is_highmem(void) >{ > > return movable_zone == ZONE_HIGHMEM; > > > >} > >static inline __attribute__((always_inline)) int is_highmem_idx(enum zone_type idx) >{ > > return (idx == ZONE_HIGHMEM || > (idx == ZONE_MOVABLE && zone_movable_is_highmem())); > > > >} > >static inline __attribute__((always_inline)) int is_normal_idx(enum zone_type idx) >{ > return (idx == ZONE_NORMAL); >} > > > > > > > >static inline __attribute__((always_inline)) int is_highmem(struct zone *zone) >{ > > int zone_off = (char *)zone - (char *)zone->zone_pgdat->node_zones; > return zone_off == ZONE_HIGHMEM * sizeof(*zone) || > (zone_off == ZONE_MOVABLE * sizeof(*zone) && > zone_movable_is_highmem()); > > > >} > >static inline __attribute__((always_inline)) int is_normal(struct zone *zone) >{ > return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL; >} > >static inline __attribute__((always_inline)) int is_dma32(struct zone *zone) >{ > > > > return 0; > >} > >static inline __attribute__((always_inline)) int is_dma(struct zone *zone) >{ > > return zone == zone->zone_pgdat->node_zones + ZONE_DMA; > > > >} > > >struct ctl_table; >struct file; >int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >extern int sysctl_lowmem_reserve_ratio[4 -1]; >int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, > struct file *, void *, size_t *, loff_t *); >int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, > struct file *, void *, size_t *, loff_t *); > >extern int numa_zonelist_order_handler(struct ctl_table *, int, > struct file *, void *, size_t *, loff_t *); >extern char numa_zonelist_order[]; > > ># 1 "include/linux/topology.h" 1 ># 33 "include/linux/topology.h" ># 1 "include/linux/smp.h" 1 ># 11 "include/linux/smp.h" >extern void cpu_idle(void); > > > > > > > ># 1 "include/asm/smp.h" 1 ># 12 "include/asm/smp.h" ># 1 "include/asm/mpspec.h" 1 > > > > > ># 1 "include/asm/mpspec_def.h" 1 ># 26 "include/asm/mpspec_def.h" >struct intel_mp_floating { > char mpf_signature[4]; > unsigned int mpf_physptr; > unsigned char mpf_length; > unsigned char mpf_specification; > unsigned char mpf_checksum; > unsigned char mpf_feature1; > unsigned char mpf_feature2; > unsigned char mpf_feature3; > unsigned char mpf_feature4; > unsigned char mpf_feature5; >}; > > > >struct mp_config_table { > char mpc_signature[4]; > unsigned short mpc_length; > char mpc_spec; > char mpc_checksum; > char mpc_oem[8]; > char mpc_productid[12]; > unsigned int mpc_oemptr; > unsigned short mpc_oemsize; > unsigned short mpc_oemcount; > unsigned int mpc_lapic; > unsigned int reserved; >}; ># 72 "include/asm/mpspec_def.h" >struct mpc_config_processor { > unsigned char mpc_type; > unsigned char mpc_apicid; > unsigned char mpc_apicver; > unsigned char mpc_cpuflag; > unsigned int mpc_cpufeature; > unsigned int mpc_featureflag; > unsigned int mpc_reserved[2]; >}; > >struct mpc_config_bus { > unsigned char mpc_type; > unsigned char mpc_busid; > unsigned char mpc_bustype[6]; >}; ># 110 "include/asm/mpspec_def.h" >struct mpc_config_ioapic { > unsigned char mpc_type; > unsigned char mpc_apicid; > unsigned char mpc_apicver; > unsigned char mpc_flags; > unsigned int mpc_apicaddr; >}; > >struct mpc_config_intsrc { > unsigned char mpc_type; > unsigned char mpc_irqtype; > unsigned short mpc_irqflag; > unsigned char mpc_srcbus; > unsigned char mpc_srcbusirq; > unsigned char mpc_dstapic; > unsigned char mpc_dstirq; >}; > >enum mp_irq_source_types { > mp_INT = 0, > mp_NMI = 1, > mp_SMI = 2, > mp_ExtINT = 3 >}; > > > > > > > >struct mpc_config_lintsrc { > unsigned char mpc_type; > unsigned char mpc_irqtype; > unsigned short mpc_irqflag; > unsigned char mpc_srcbusid; > unsigned char mpc_srcbusirq; > unsigned char mpc_destapic; > unsigned char mpc_destapiclint; >}; > > > >struct mp_config_oemtable { > char oem_signature[4]; > unsigned short oem_length; > char oem_rev; > char oem_checksum; > char mpc_oem[8]; >}; ># 173 "include/asm/mpspec_def.h" >enum mp_bustype { > MP_BUS_ISA = 1, > MP_BUS_EISA, > MP_BUS_PCI, > MP_BUS_MCA, >}; ># 7 "include/asm/mpspec.h" 2 > > ># 1 "include/asm-x86/mach-generic/mach_mpspec.h" 1 ># 10 "include/asm/mpspec.h" 2 > >extern unsigned int def_to_bigsmp; >extern int apic_version[256]; >extern u8 apicid_2_node[]; >extern int pic_mode; ># 33 "include/asm/mpspec.h" >extern unsigned long mp_bus_not_pci[(((260) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; > >extern int mp_bus_id_to_pci_bus[260]; > >extern unsigned int boot_cpu_physical_apicid; >extern int smp_found_config; >extern int mpc_default_type; >extern unsigned long mp_lapic_addr; > >extern void find_smp_config(void); >extern void get_smp_config(void); > >void __attribute__ ((__section__(".cpuinit.text"))) __attribute__((__cold__)) generic_processor_info(int apicid, int version); > >extern void mp_register_ioapic(int id, u32 address, u32 gsi_base); >extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, > u32 gsi); >extern void mp_config_acpi_legacy_irqs(void); >extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low); > > > > >struct physid_mask { > unsigned long mask[(((256) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; >}; > >typedef struct physid_mask physid_mask_t; ># 114 "include/asm/mpspec.h" >extern physid_mask_t phys_cpu_present_map; ># 13 "include/asm/smp.h" 2 ># 1 "include/asm/apic.h" 1 > > > ># 1 "include/linux/pm.h" 1 ># 25 "include/linux/pm.h" ># 1 "include/asm/atomic.h" 1 ># 26 "include/linux/pm.h" 2 ># 1 "include/asm/errno.h" 1 ># 27 "include/linux/pm.h" 2 > > > > > > >typedef int pm_request_t; ># 42 "include/linux/pm.h" >typedef int pm_dev_t; ># 55 "include/linux/pm.h" >enum >{ > PM_SYS_UNKNOWN = 0x00000000, > PM_SYS_KBC = 0x41d00303, > PM_SYS_COM = 0x41d00500, > PM_SYS_IRDA = 0x41d00510, > PM_SYS_FDC = 0x41d00700, > PM_SYS_VGA = 0x41d00900, > PM_SYS_PCMCIA = 0x41d00e00, >}; ># 74 "include/linux/pm.h" >struct pm_dev; > >typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data); > > > > >struct pm_dev >{ > pm_dev_t type; > unsigned long id; > pm_callback callback; > void *data; > > unsigned long flags; > unsigned long state; > unsigned long prev_state; > > struct list_head entry; >}; > > > > > > > >extern void (*pm_idle)(void); >extern void (*pm_power_off)(void); >extern void (*pm_power_off_prepare)(void); > > > > > >struct device; > >typedef struct pm_message { > int event; >} pm_message_t; ># 181 "include/linux/pm.h" >struct dev_pm_info { > pm_message_t power_state; > unsigned can_wakeup:1; > unsigned should_wakeup:1; > bool sleeping:1; > > struct list_head entry; > >}; > >extern int device_power_down(pm_message_t state); >extern void device_power_up(void); >extern void device_resume(void); > > >extern int device_suspend(pm_message_t state); >extern int device_prepare_suspend(pm_message_t state); > >extern void __suspend_report_result(const char *function, void *fn, int ret); ># 221 "include/linux/pm.h" >extern unsigned int pm_flags; ># 5 "include/asm/apic.h" 2 ># 1 "include/linux/delay.h" 1 ># 12 "include/linux/delay.h" >extern unsigned long loops_per_jiffy; > ># 1 "include/asm/delay.h" 1 ># 11 "include/asm/delay.h" >extern void __bad_udelay(void); >extern void __bad_ndelay(void); > >extern void __udelay(unsigned long usecs); >extern void __ndelay(unsigned long nsecs); >extern void __const_udelay(unsigned long xloops); >extern void __delay(unsigned long loops); ># 29 "include/asm/delay.h" >void use_tsc_delay(void); ># 15 "include/linux/delay.h" 2 ># 44 "include/linux/delay.h" >void calibrate_delay(void); >void msleep(unsigned int msecs); >unsigned long msleep_interruptible(unsigned int msecs); > >static inline __attribute__((always_inline)) void ssleep(unsigned int seconds) >{ > msleep(seconds * 1000); >} ># 6 "include/asm/apic.h" 2 ># 1 "include/asm/fixmap.h" 1 > > > > ># 1 "include/asm/fixmap_32.h" 1 ># 22 "include/asm/fixmap_32.h" >extern unsigned long __FIXADDR_TOP; > > > > > ># 1 "include/asm/acpi.h" 1 ># 26 "include/asm/acpi.h" ># 1 "include/acpi/pdc_intel.h" 1 ># 27 "include/asm/acpi.h" 2 > ># 1 "include/asm/numa.h" 1 > ># 1 "include/asm/numa_32.h" 1 > > > >extern int pxm_to_nid(int pxm); > > > > > >static inline __attribute__((always_inline)) void remap_numa_kva(void) >{ >} ># 3 "include/asm/numa.h" 2 ># 29 "include/asm/acpi.h" 2 > ># 1 "include/asm/mmu.h" 1 ># 15 "include/asm/mmu.h" >typedef struct { > void *ldt; > > > > int size; > struct mutex lock; > void *vdso; > > struct desc_struct user_cs; > unsigned long exec_limit; > >} mm_context_t; > > >void leave_mm(int cpu); ># 31 "include/asm/acpi.h" 2 ># 56 "include/asm/acpi.h" >int __acpi_acquire_global_lock(unsigned int *lock); >int __acpi_release_global_lock(unsigned int *lock); ># 82 "include/asm/acpi.h" >extern int acpi_lapic; >extern int acpi_ioapic; >extern int acpi_noirq; >extern int acpi_strict; >extern int acpi_disabled; >extern int acpi_ht; >extern int acpi_pci_disabled; >extern int acpi_skip_timer_override; >extern int acpi_use_timer_override; > >extern u8 acpi_sci_flags; >extern int acpi_sci_override_gsi; >void acpi_pic_sci_set_trigger(unsigned int, u16); > >static inline __attribute__((always_inline)) void disable_acpi(void) >{ > acpi_disabled = 1; > acpi_ht = 0; > acpi_pci_disabled = 1; > acpi_noirq = 1; >} > > > > >extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); > >static inline __attribute__((always_inline)) void acpi_noirq_set(void) { acpi_noirq = 1; } >static inline __attribute__((always_inline)) void acpi_disable_pci(void) >{ > acpi_pci_disabled = 1; > acpi_noirq_set(); >} >extern int acpi_irq_balance_set(char *str); > > >extern int acpi_save_state_mem(void); >extern void acpi_restore_state_mem(void); > >extern unsigned long acpi_wakeup_address; > > >extern void acpi_reserve_bootmem(void); > > > > >static inline __attribute__((always_inline)) unsigned int acpi_processor_cstate_check(unsigned int max_cstate) >{ > > > > > > > if (boot_cpu_data.x86 == 0x0F && > boot_cpu_data.x86_vendor == 2 && > boot_cpu_data.x86_model <= 0x05 && > boot_cpu_data.x86_mask < 0x0A) > return 1; > else > return max_cstate; >} ># 158 "include/asm/acpi.h" >struct bootnode; ># 169 "include/asm/acpi.h" >static inline __attribute__((always_inline)) void acpi_fake_nodes(const struct bootnode *fake_nodes, > int num_nodes) >{ >} ># 29 "include/asm/fixmap_32.h" 2 ># 1 "include/asm/apicdef.h" 1 ># 159 "include/asm/apicdef.h" >struct local_apic { > > struct { unsigned int __reserved[4]; } __reserved_01; > > struct { unsigned int __reserved[4]; } __reserved_02; > > struct { > unsigned int __reserved_1 : 24, > phys_apic_id : 4, > __reserved_2 : 4; > unsigned int __reserved[3]; > } id; > > const > struct { > unsigned int version : 8, > __reserved_1 : 8, > max_lvt : 8, > __reserved_2 : 8; > unsigned int __reserved[3]; > } version; > > struct { unsigned int __reserved[4]; } __reserved_03; > > struct { unsigned int __reserved[4]; } __reserved_04; > > struct { unsigned int __reserved[4]; } __reserved_05; > > struct { unsigned int __reserved[4]; } __reserved_06; > > struct { > unsigned int priority : 8, > __reserved_1 : 24; > unsigned int __reserved_2[3]; > } tpr; > > const > struct { > unsigned int priority : 8, > __reserved_1 : 24; > unsigned int __reserved_2[3]; > } apr; > > const > struct { > unsigned int priority : 8, > __reserved_1 : 24; > unsigned int __reserved_2[3]; > } ppr; > > struct { > unsigned int eoi; > unsigned int __reserved[3]; > } eoi; > > struct { unsigned int __reserved[4]; } __reserved_07; > > struct { > unsigned int __reserved_1 : 24, > logical_dest : 8; > unsigned int __reserved_2[3]; > } ldr; > > struct { > unsigned int __reserved_1 : 28, > model : 4; > unsigned int __reserved_2[3]; > } dfr; > > struct { > unsigned int spurious_vector : 8, > apic_enabled : 1, > focus_cpu : 1, > __reserved_2 : 22; > unsigned int __reserved_3[3]; > } svr; > > struct { > unsigned int bitfield; > unsigned int __reserved[3]; > } isr [8]; > > struct { > unsigned int bitfield; > unsigned int __reserved[3]; > } tmr [8]; > > struct { > unsigned int bitfield; > unsigned int __reserved[3]; > } irr [8]; > > union { > struct { > unsigned int send_cs_error : 1, > receive_cs_error : 1, > send_accept_error : 1, > receive_accept_error : 1, > __reserved_1 : 1, > send_illegal_vector : 1, > receive_illegal_vector : 1, > illegal_register_address : 1, > __reserved_2 : 24; > unsigned int __reserved_3[3]; > } error_bits; > struct { > unsigned int errors; > unsigned int __reserved_3[3]; > } all_errors; > } esr; > > struct { unsigned int __reserved[4]; } __reserved_08; > > struct { unsigned int __reserved[4]; } __reserved_09; > > struct { unsigned int __reserved[4]; } __reserved_10; > > struct { unsigned int __reserved[4]; } __reserved_11; > > struct { unsigned int __reserved[4]; } __reserved_12; > > struct { unsigned int __reserved[4]; } __reserved_13; > > struct { unsigned int __reserved[4]; } __reserved_14; > > struct { > unsigned int vector : 8, > delivery_mode : 3, > destination_mode : 1, > delivery_status : 1, > __reserved_1 : 1, > level : 1, > trigger : 1, > __reserved_2 : 2, > shorthand : 2, > __reserved_3 : 12; > unsigned int __reserved_4[3]; > } icr1; > > struct { > union { > unsigned int __reserved_1 : 24, > phys_dest : 4, > __reserved_2 : 4; > unsigned int __reserved_3 : 24, > logical_dest : 8; > } dest; > unsigned int __reserved_4[3]; > } icr2; > > struct { > unsigned int vector : 8, > __reserved_1 : 4, > delivery_status : 1, > __reserved_2 : 3, > mask : 1, > timer_mode : 1, > __reserved_3 : 14; > unsigned int __reserved_4[3]; > } lvt_timer; > > struct { > unsigned int vector : 8, > delivery_mode : 3, > __reserved_1 : 1, > delivery_status : 1, > __reserved_2 : 3, > mask : 1, > __reserved_3 : 15; > unsigned int __reserved_4[3]; > } lvt_thermal; > > struct { > unsigned int vector : 8, > delivery_mode : 3, > __reserved_1 : 1, > delivery_status : 1, > __reserved_2 : 3, > mask : 1, > __reserved_3 : 15; > unsigned int __reserved_4[3]; > } lvt_pc; > > struct { > unsigned int vector : 8, > delivery_mode : 3, > __reserved_1 : 1, > delivery_status : 1, > polarity : 1, > remote_irr : 1, > trigger : 1, > mask : 1, > __reserved_2 : 15; > unsigned int __reserved_3[3]; > } lvt_lint0; > > struct { > unsigned int vector : 8, > delivery_mode : 3, > __reserved_1 : 1, > delivery_status : 1, > polarity : 1, > remote_irr : 1, > trigger : 1, > mask : 1, > __reserved_2 : 15; > unsigned int __reserved_3[3]; > } lvt_lint1; > > struct { > unsigned int vector : 8, > __reserved_1 : 4, > delivery_status : 1, > __reserved_2 : 3, > mask : 1, > __reserved_3 : 15; > unsigned int __reserved_4[3]; > } lvt_error; > > struct { > unsigned int initial_count; > unsigned int __reserved_2[3]; > } timer_icr; > > const > struct { > unsigned int curr_count; > unsigned int __reserved_2[3]; > } timer_ccr; > > struct { unsigned int __reserved[4]; } __reserved_16; > > struct { unsigned int __reserved[4]; } __reserved_17; > > struct { unsigned int __reserved[4]; } __reserved_18; > > struct { unsigned int __reserved[4]; } __reserved_19; > > struct { > unsigned int divisor : 4, > __reserved_1 : 28; > unsigned int __reserved_2[3]; > } timer_dcr; > > struct { unsigned int __reserved[4]; } __reserved_20; > >} __attribute__ ((packed)); ># 30 "include/asm/fixmap_32.h" 2 ># 54 "include/asm/fixmap_32.h" >enum fixed_addresses { > FIX_HOLE, > FIX_VDSO, > FIX_DBGP_BASE, > FIX_EARLYCON_MEM_BASE, > > FIX_APIC_BASE, > > > FIX_IO_APIC_BASE_0, > FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + 64 -1, ># 76 "include/asm/fixmap_32.h" > FIX_CYCLONE_TIMER, > > > FIX_KMAP_BEGIN, > FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*32)-1, > > > FIX_ACPI_BEGIN, > FIX_ACPI_END = FIX_ACPI_BEGIN + 4 - 1, > > > FIX_PCIE_MCFG, > > > FIX_PARAVIRT_BOOTMAP, > > __end_of_permanent_fixed_addresses, ># 102 "include/asm/fixmap_32.h" > FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 512 - > (__end_of_permanent_fixed_addresses & 511), > FIX_BTMAP_BEGIN = FIX_BTMAP_END + 64*4 - 1, > FIX_WP_TEST, > > > > __end_of_fixed_addresses >}; > >extern void __set_fixmap(enum fixed_addresses idx, > unsigned long phys, pgprot_t flags); >extern void reserve_top_address(unsigned long reserve); ># 134 "include/asm/fixmap_32.h" >extern void __this_fixmap_does_not_exist(void); > > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long fix_to_virt(const unsigned int idx) >{ ># 152 "include/asm/fixmap_32.h" > if (idx >= __end_of_fixed_addresses) > __this_fixmap_does_not_exist(); > > return (((unsigned long)__FIXADDR_TOP) - ((idx) << 12)); >} > >static inline __attribute__((always_inline)) unsigned long virt_to_fix(const unsigned long vaddr) >{ > do { if (__builtin_expect(!!(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/asm/fixmap_32.h"), "i" (160), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > return ((((unsigned long)__FIXADDR_TOP) - ((vaddr)&(~(((1UL) << 12)-1)))) >> 12); >} ># 6 "include/asm/fixmap.h" 2 ># 7 "include/asm/apic.h" 2 ># 34 "include/asm/apic.h" >extern void generic_apic_probe(void); > > > >extern int apic_verbosity; >extern int timer_over_8254; >extern int local_apic_timer_c2_ok; >extern int local_apic_timer_disabled; > >extern int apic_runs_main_timer; >extern int ioapic_force; >extern int disable_apic; >extern int disable_apic_timer; ># 61 "include/asm/apic.h" >extern int is_vsmp_box(void); > >static inline __attribute__((always_inline)) void native_apic_write(unsigned long reg, u32 v) >{ > *((volatile u32 *)((fix_to_virt(FIX_APIC_BASE)) + reg)) = v; >} > >static inline __attribute__((always_inline)) void native_apic_write_atomic(unsigned long reg, u32 v) >{ > (void)((__typeof__(*((u32 *)((fix_to_virt(FIX_APIC_BASE)) + reg))))__xchg((unsigned long)(v), ((u32 *)((fix_to_virt(FIX_APIC_BASE)) + reg)), sizeof(*((u32 *)((fix_to_virt(FIX_APIC_BASE)) + reg))))); >} > >static inline __attribute__((always_inline)) u32 native_apic_read(unsigned long reg) >{ > return *((volatile u32 *)((fix_to_virt(FIX_APIC_BASE)) + reg)); >} > >extern void apic_wait_icr_idle(void); >extern u32 safe_apic_wait_icr_idle(void); >extern int get_physical_broadcast(void); ># 92 "include/asm/apic.h" >static inline __attribute__((always_inline)) void ack_APIC_irq(void) >{ ># 102 "include/asm/apic.h" > apic_write((0xB0), (0)); >} > >extern int lapic_get_maxlvt(void); >extern void clear_local_APIC(void); >extern void connect_bsp_APIC(void); >extern void disconnect_bsp_APIC(int virt_wire_setup); >extern void disable_local_APIC(void); >extern void lapic_shutdown(void); >extern int verify_local_APIC(void); >extern void cache_APIC_registers(void); >extern void sync_Arb_IDs(void); >extern void init_bsp_APIC(void); >extern void setup_local_APIC(void); >extern void end_local_APIC_setup(void); >extern void init_apic_mappings(void); >extern void setup_boot_APIC_clock(void); >extern void setup_secondary_APIC_clock(void); >extern int APIC_init_uniprocessor(void); >extern void enable_NMI_through_LVT0(void); ># 130 "include/asm/apic.h" >extern u8 setup_APIC_eilvt_mce(u8 vector, u8 msg_type, u8 mask); >extern u8 setup_APIC_eilvt_ibs(u8 vector, u8 msg_type, u8 mask); > >extern int apic_is_clustered_box(void); ># 14 "include/asm/smp.h" 2 > ># 1 "include/asm/io_apic.h" 1 ># 17 "include/asm/io_apic.h" >union IO_APIC_reg_00 { > u32 raw; > struct { > u32 __reserved_2 : 14, > LTS : 1, > delivery_type : 1, > __reserved_1 : 8, > ID : 8; > } __attribute__ ((packed)) bits; >}; > >union IO_APIC_reg_01 { > u32 raw; > struct { > u32 version : 8, > __reserved_2 : 7, > PRQ : 1, > entries : 8, > __reserved_1 : 8; > } __attribute__ ((packed)) bits; >}; > >union IO_APIC_reg_02 { > u32 raw; > struct { > u32 __reserved_2 : 24, > arbitration : 4, > __reserved_1 : 4; > } __attribute__ ((packed)) bits; >}; > >union IO_APIC_reg_03 { > u32 raw; > struct { > u32 boot_DT : 1, > __reserved_1 : 31; > } __attribute__ ((packed)) bits; >}; > >enum ioapic_irq_destination_types { > dest_Fixed = 0, > dest_LowestPrio = 1, > dest_SMI = 2, > dest__reserved_1 = 3, > dest_NMI = 4, > dest_INIT = 5, > dest__reserved_2 = 6, > dest_ExtINT = 7 >}; > >struct IO_APIC_route_entry { > __u32 vector : 8, > delivery_mode : 3, > > > > dest_mode : 1, > delivery_status : 1, > polarity : 1, > irr : 1, > trigger : 1, > mask : 1, > __reserved_2 : 15; > > > union { > struct { > __u32 __reserved_1 : 24, > physical_dest : 4, > __reserved_2 : 4; > } physical; > > struct { > __u32 __reserved_1 : 24, > logical_dest : 8; > } logical; > } dest; > > > > > >} __attribute__ ((packed)); > > > > > > >extern int nr_ioapics; >extern int nr_ioapic_registers[64]; > > > > > > > >struct mp_ioapic_routing { > int apic_id; > int gsi_base; > int gsi_end; > unsigned long pin_programmed[(((127 + 1) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; >}; > > >extern struct mpc_config_ioapic mp_ioapics[64]; > > >extern int mp_irq_entries; > > >extern struct mpc_config_intsrc mp_irqs[256]; > > >extern int mpc_default_type; > > >extern int sis_apic_bug; > > >extern int skip_ioapic_setup; > >static inline __attribute__((always_inline)) void disable_ioapic_setup(void) >{ > skip_ioapic_setup = 1; >} ># 153 "include/asm/io_apic.h" >extern int io_apic_get_unique_id(int ioapic, int apic_id); >extern int io_apic_get_version(int ioapic); >extern int io_apic_get_redir_entries(int ioapic); >extern int io_apic_set_pci_routing(int ioapic, int pin, int irq, > int edge_level, int active_high_low); > > >extern int (*ioapic_renumber_irq)(int ioapic, int irq); >extern void ioapic_init_mappings(void); ># 16 "include/asm/smp.h" 2 > > ># 1 "include/asm/pda.h" 1 ># 11 "include/asm/pda.h" >struct x8664_pda { > struct task_struct *pcurrent; > unsigned long data_offset; > > unsigned long kernelstack; > unsigned long oldrsp; > int irqcount; > unsigned int cpunumber; > > > > > > char *irqstackptr; > unsigned int __softirq_pending; > unsigned int __nmi_count; > short mmu_state; > short isidle; > struct mm_struct *active_mm; > unsigned apic_timer_irqs; > unsigned irq0_irqs; > unsigned irq_resched_count; > unsigned irq_call_count; > unsigned irq_tlb_count; > unsigned irq_thermal_count; > unsigned irq_threshold_count; > unsigned irq_spurious_count; >} __attribute__((__aligned__((1 << (7))))); > >extern struct x8664_pda *_cpu_pda[]; >extern struct x8664_pda boot_cpu_pda[]; >extern void pda_init(int); > > > > > > > >extern void __bad_pda_field(void) __attribute__((noreturn)); > > > > > >extern struct x8664_pda _proxy_pda; ># 19 "include/asm/smp.h" 2 ># 1 "include/asm/thread_info.h" 1 ># 9 "include/asm/thread_info.h" >extern void arch_task_cache_init(void); >extern void free_thread_info(struct thread_info *ti); >extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); ># 20 "include/asm/smp.h" 2 > >extern cpumask_t cpu_callout_map; >extern cpumask_t cpu_initialized; >extern cpumask_t cpu_callin_map; > >extern void (*mtrr_hook)(void); >extern void zap_low_mappings(void); > >extern int smp_num_siblings; >extern unsigned int num_processors; >extern cpumask_t cpu_initialized; > > >extern u16 x86_cpu_to_apicid_init[]; >extern u16 x86_bios_cpu_apicid_init[]; >extern void *x86_cpu_to_apicid_early_ptr; >extern void *x86_bios_cpu_apicid_early_ptr; > > > > > >extern __typeof__(cpumask_t) per_cpu__cpu_sibling_map; >extern __typeof__(cpumask_t) per_cpu__cpu_core_map; >extern __typeof__(u16) per_cpu__cpu_llc_id; >extern __typeof__(u16) per_cpu__x86_cpu_to_apicid; >extern __typeof__(u16) per_cpu__x86_bios_cpu_apicid; > > >extern struct { > void *sp; > unsigned short ss; >} stack_start; > >struct smp_ops { > void (*smp_prepare_boot_cpu)(void); > void (*smp_prepare_cpus)(unsigned max_cpus); > int (*cpu_up)(unsigned cpu); > void (*smp_cpus_done)(unsigned max_cpus); > > void (*smp_send_stop)(void); > void (*smp_send_reschedule)(int cpu); > int (*smp_call_function_mask)(cpumask_t mask, > void (*func)(void *info), void *info, > int wait); >}; > > >extern void set_cpu_sibling_map(int cpu); > > > > > >extern struct smp_ops smp_ops; > >static inline __attribute__((always_inline)) void smp_send_stop(void) >{ > smp_ops.smp_send_stop(); >} > >static inline __attribute__((always_inline)) void smp_prepare_boot_cpu(void) >{ > smp_ops.smp_prepare_boot_cpu(); >} > >static inline __attribute__((always_inline)) void smp_prepare_cpus(unsigned int max_cpus) >{ > smp_ops.smp_prepare_cpus(max_cpus); >} > >static inline __attribute__((always_inline)) void smp_cpus_done(unsigned int max_cpus) >{ > smp_ops.smp_cpus_done(max_cpus); >} > >static inline __attribute__((always_inline)) int __cpu_up(unsigned int cpu) >{ > return smp_ops.cpu_up(cpu); >} > >static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) >{ > smp_ops.smp_send_reschedule(cpu); >} > >static inline __attribute__((always_inline)) int smp_call_function_mask(cpumask_t mask, > void (*func) (void *info), void *info, > int wait) >{ > return smp_ops.smp_call_function_mask(mask, func, info, wait); >} > >void native_smp_prepare_boot_cpu(void); >void native_smp_prepare_cpus(unsigned int max_cpus); >void native_smp_cpus_done(unsigned int max_cpus); >int native_cpu_up(unsigned int cpunum); > >extern int __cpu_disable(void); >extern void __cpu_die(unsigned int cpu); > >extern void prefill_possible_map(void); > >void smp_store_cpu_info(int id); > > > >static inline __attribute__((always_inline)) int num_booting_cpus(void) >{ > return __cpus_weight(&(cpu_callout_map), 32); >} > > >extern unsigned disabled_cpus __attribute__ ((__section__(".cpuinit.data"))); > > > > > > > >extern __typeof__(int) per_cpu__cpu_number; > >extern int safe_smp_processor_id(void); ># 164 "include/asm/smp.h" >static inline __attribute__((always_inline)) int logical_smp_processor_id(void) >{ > > return (((*(u32 *)((fix_to_virt(FIX_APIC_BASE)) + 0xD0)) >> 24) & 0xFFu); >} > > >static inline __attribute__((always_inline)) unsigned int read_apic_id(void) >{ > return *(u32 *)((fix_to_virt(FIX_APIC_BASE)) + 0x20); >} ># 183 "include/asm/smp.h" ># 1 "include/asm-x86/mach-generic/mach_apicdef.h" 1 > > > > ># 1 "include/asm/genapic.h" 1 > ># 1 "include/asm/genapic_32.h" 1 ># 17 "include/asm/genapic_32.h" >struct mpc_config_bus; >struct mp_config_table; >struct mpc_config_processor; > >struct genapic { > char *name; > int (*probe)(void); > > int (*apic_id_registered)(void); > cpumask_t (*target_cpus)(void); > int int_delivery_mode; > int int_dest_mode; > int ESR_DISABLE; > int apic_destination_logical; > unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid); > unsigned long (*check_apicid_present)(int apicid); > int no_balance_irq; > int no_ioapic_check; > void (*init_apic_ldr)(void); > physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map); > > void (*setup_apic_routing)(void); > int (*multi_timer_check)(int apic, int irq); > int (*apicid_to_node)(int logical_apicid); > int (*cpu_to_logical_apicid)(int cpu); > int (*cpu_present_to_apicid)(int mps_cpu); > physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); > void (*setup_portio_remap)(void); > int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); > void (*enable_apic_mode)(void); > u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb); > > > > > > int (*mps_oem_check)(struct mp_config_table *mpc, char *oem, > char *productid); > int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); > > unsigned (*get_apic_id)(unsigned long x); > unsigned long apic_id_mask; > unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask); > > > > void (*send_IPI_mask)(cpumask_t mask, int vector); > void (*send_IPI_allbutself)(int vector); > void (*send_IPI_all)(int vector); > >}; ># 115 "include/asm/genapic_32.h" >extern struct genapic *genapic; > >enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC}; ># 3 "include/asm/genapic.h" 2 ># 6 "include/asm-x86/mach-generic/mach_apicdef.h" 2 ># 184 "include/asm/smp.h" 2 >static inline __attribute__((always_inline)) int hard_smp_processor_id(void) >{ > > return (genapic->get_apic_id)(read_apic_id()); >} ># 200 "include/asm/smp.h" >extern void cpu_exit_clear(void); >extern void cpu_uninit(void); > > >extern void smp_alloc_memory(void); >extern void lock_ipi_call_lock(void); >extern void unlock_ipi_call_lock(void); ># 20 "include/linux/smp.h" 2 ># 29 "include/linux/smp.h" >extern void smp_send_stop(void); > > > > >extern void smp_send_reschedule(int cpu); > > > > > >extern void smp_prepare_cpus(unsigned int max_cpus); > > > > >extern int __cpu_up(unsigned int cpunum); > > > > >extern void smp_cpus_done(unsigned int max_cpus); > > > > >int smp_call_function(void(*func)(void *info), void *info, int retry, int wait); > >int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, > int retry, int wait); > > > > >int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait); ># 79 "include/linux/smp.h" >void smp_prepare_boot_cpu(void); > >extern unsigned int setup_max_cpus; ># 144 "include/linux/smp.h" >void smp_setup_processor_id(void); ># 34 "include/linux/topology.h" 2 ># 1 "include/asm/topology.h" 1 ># 187 "include/asm/topology.h" ># 1 "include/asm-generic/topology.h" 1 ># 188 "include/asm/topology.h" 2 > >extern cpumask_t cpu_coregroup_map(int cpu); ># 198 "include/asm/topology.h" >static inline __attribute__((always_inline)) void arch_fix_phys_package_id(int num, u32 slot) >{ >} > >struct pci_bus; >void set_pci_bus_resources_arch_default(struct pci_bus *b); ># 214 "include/asm/topology.h" >static inline __attribute__((always_inline)) int get_mp_bus_to_node(int busnum) >{ > return 0; >} >static inline __attribute__((always_inline)) void set_mp_bus_to_node(int busnum, int node) >{ >} ># 35 "include/linux/topology.h" 2 ># 52 "include/linux/topology.h" >void arch_update_cpu_topology(void); ># 684 "include/linux/mmzone.h" 2 > > > > > > > >extern struct pglist_data contig_page_data; ># 701 "include/linux/mmzone.h" >extern struct pglist_data *first_online_pgdat(void); >extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); >extern struct zone *next_zone(struct zone *zone); ># 725 "include/linux/mmzone.h" >static inline __attribute__((always_inline)) struct zone *zonelist_zone(struct zoneref *zoneref) >{ > return zoneref->zone; >} > >static inline __attribute__((always_inline)) int zonelist_zone_idx(struct zoneref *zoneref) >{ > return zoneref->zone_idx; >} > >static inline __attribute__((always_inline)) int zonelist_node_idx(struct zoneref *zoneref) >{ > > > > > return 0; > >} ># 757 "include/linux/mmzone.h" >struct zoneref *next_zones_zonelist(struct zoneref *z, > enum zone_type highest_zoneidx, > nodemask_t *nodes, > struct zone **zone); ># 775 "include/linux/mmzone.h" >static inline __attribute__((always_inline)) struct zoneref *first_zones_zonelist(struct zonelist *zonelist, > enum zone_type highest_zoneidx, > nodemask_t *nodes, > struct zone **zone) >{ > return next_zones_zonelist(zonelist->_zonerefs, highest_zoneidx, nodes, > zone); >} ># 990 "include/linux/mmzone.h" >void memory_present(int nid, unsigned long start, unsigned long end); >unsigned long __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) node_memmap_size_bytes(int, unsigned long, unsigned long); ># 5 "include/linux/gfp.h" 2 > > > >struct vm_area_struct; ># 108 "include/linux/gfp.h" >static inline __attribute__((always_inline)) int allocflags_to_migratetype(gfp_t gfp_flags) >{ > ({ int __ret_warn_on = !!((gfp_flags & ((( gfp_t)0x80000u)|(( gfp_t)0x100000u))) == ((( gfp_t)0x80000u)|(( gfp_t)0x100000u))); if (__builtin_expect(!!(__ret_warn_on), 0)) warn_on_slowpath("include/linux/gfp.h", 110); __builtin_expect(!!(__ret_warn_on), 0); }); > > if (__builtin_expect(!!(page_group_by_mobility_disabled), 0)) > return 0; > > > return (((gfp_flags & (( gfp_t)0x100000u)) != 0) << 1) | > ((gfp_flags & (( gfp_t)0x80000u)) != 0); >} > >static inline __attribute__((always_inline)) enum zone_type gfp_zone(gfp_t flags) >{ > > if (flags & (( gfp_t)0x01u)) > return ZONE_DMA; > > > > > > if ((flags & ((( gfp_t)0x02u) | (( gfp_t)0x100000u))) == > ((( gfp_t)0x02u) | (( gfp_t)0x100000u))) > return ZONE_MOVABLE; > > if (flags & (( gfp_t)0x02u)) > return ZONE_HIGHMEM; > > return ZONE_NORMAL; >} ># 147 "include/linux/gfp.h" >static inline __attribute__((always_inline)) int gfp_zonelist(gfp_t flags) >{ > if (0 && __builtin_expect(!!(flags & (( gfp_t)0x40000u)), 0)) > return 1; > > return 0; >} ># 164 "include/linux/gfp.h" >static inline __attribute__((always_inline)) struct zonelist *node_zonelist(int nid, gfp_t flags) >{ > return (&contig_page_data)->node_zonelists + gfp_zonelist(flags); >} > > >static inline __attribute__((always_inline)) void arch_free_page(struct page *page, int order) { } > > >static inline __attribute__((always_inline)) void arch_alloc_page(struct page *page, int order) { } > > >extern struct page *__alloc_pages(gfp_t, unsigned int, struct zonelist *); > >extern struct page * >__alloc_pages_nodemask(gfp_t, unsigned int, > struct zonelist *, nodemask_t *nodemask); > >static inline __attribute__((always_inline)) struct page *alloc_pages_node(int nid, gfp_t gfp_mask, > unsigned int order) >{ > if (__builtin_expect(!!(order >= 11), 0)) > return ((void *)0); > > > if (nid < 0) > nid = (((void)((({ typeof(per_cpu__cpu_number) ret__; switch (sizeof(per_cpu__cpu_number)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; default: __bad_percpu_size(); } ret__; }))),0)); > > return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask)); >} ># 215 "include/linux/gfp.h" >extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); >extern unsigned long get_zeroed_page(gfp_t gfp_mask); > > > > > > > >extern void __free_pages(struct page *page, unsigned int order); >extern void free_pages(unsigned long addr, unsigned int order); >extern void free_hot_page(struct page *page); >extern void free_cold_page(struct page *page); > > > > >void page_alloc_init(void); >void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); >void drain_all_pages(void); >void drain_local_pages(void *dummy); ># 13 "include/linux/slab.h" 2 ># 56 "include/linux/slab.h" >void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) kmem_cache_init(void); >int slab_is_available(void); > >struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, > unsigned long, > void (*)(struct kmem_cache *, void *)); >void kmem_cache_destroy(struct kmem_cache *); >int kmem_cache_shrink(struct kmem_cache *); >void kmem_cache_free(struct kmem_cache *, void *); >unsigned int kmem_cache_size(struct kmem_cache *); >const char *kmem_cache_name(struct kmem_cache *); >int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); ># 99 "include/linux/slab.h" >void * __attribute__((warn_unused_result)) krealloc(const void *, size_t, gfp_t); >void kfree(const void *); >size_t ksize(const void *); ># 123 "include/linux/slab.h" ># 1 "include/linux/slub_def.h" 1 ># 11 "include/linux/slub_def.h" ># 1 "include/linux/workqueue.h" 1 > > > > > > > ># 1 "include/linux/timer.h" 1 > > > > ># 1 "include/linux/ktime.h" 1 ># 24 "include/linux/ktime.h" ># 1 "include/linux/time.h" 1 ># 13 "include/linux/time.h" >struct timespec { > time_t tv_sec; > long tv_nsec; >}; > > >struct timeval { > time_t tv_sec; > suseconds_t tv_usec; >}; > >struct timezone { > int tz_minuteswest; > int tz_dsttime; >}; ># 40 "include/linux/time.h" >static inline __attribute__((always_inline)) int timespec_equal(const struct timespec *a, > const struct timespec *b) >{ > return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); >} > > > > > > >static inline __attribute__((always_inline)) int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) >{ > if (lhs->tv_sec < rhs->tv_sec) > return -1; > if (lhs->tv_sec > rhs->tv_sec) > return 1; > return lhs->tv_nsec - rhs->tv_nsec; >} > >static inline __attribute__((always_inline)) int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) >{ > if (lhs->tv_sec < rhs->tv_sec) > return -1; > if (lhs->tv_sec > rhs->tv_sec) > return 1; > return lhs->tv_usec - rhs->tv_usec; >} > >extern unsigned long mktime(const unsigned int year, const unsigned int mon, > const unsigned int day, const unsigned int hour, > const unsigned int min, const unsigned int sec); > >extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); > > > > >static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs, > struct timespec rhs) >{ > struct timespec ts_delta; > set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, > lhs.tv_nsec - rhs.tv_nsec); > return ts_delta; >} > > > > > > > >extern struct timespec xtime; >extern struct timespec wall_to_monotonic; >extern seqlock_t xtime_lock; > >extern unsigned long read_persistent_clock(void); >extern int update_persistent_clock(struct timespec now); >extern int no_sync_cmos_clock __attribute__((__section__(".data.read_mostly"))); >void timekeeping_init(void); > >unsigned long get_seconds(void); >struct timespec current_kernel_time(void); > > > > >extern void do_gettimeofday(struct timeval *tv); >extern int do_settimeofday(struct timespec *tv); >extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); > >extern long do_utimes(int dfd, char *filename, struct timespec *times, int flags); >struct itimerval; >extern int do_setitimer(int which, struct itimerval *value, > struct itimerval *ovalue); >extern unsigned int alarm_setitimer(unsigned int seconds); >extern int do_getitimer(int which, struct itimerval *value); >extern void getnstimeofday(struct timespec *tv); >extern void getboottime(struct timespec *ts); >extern void monotonic_to_bootbased(struct timespec *ts); > >extern struct timespec timespec_trunc(struct timespec t, unsigned gran); >extern int timekeeping_valid_for_hres(void); >extern void update_wall_time(void); >extern void update_xtime_cache(u64 nsec); ># 134 "include/linux/time.h" >static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts) >{ > return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec; >} ># 146 "include/linux/time.h" >static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv) >{ > return ((s64) tv->tv_sec * 1000000000L) + > tv->tv_usec * 1000L; >} > > > > > > > >extern struct timespec ns_to_timespec(const s64 nsec); > > > > > > > >extern struct timeval ns_to_timeval(const s64 nsec); > > > > > > >static inline __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns) >{ > ns += a->tv_nsec; > while(__builtin_expect(!!(ns >= 1000000000L), 0)) { > > > asm("" : "+r"(ns)); > > ns -= 1000000000L; > a->tv_sec++; > } > a->tv_nsec = ns; >} ># 204 "include/linux/time.h" >struct itimerspec { > struct timespec it_interval; > struct timespec it_value; >}; > >struct itimerval { > struct timeval it_interval; > struct timeval it_value; >}; ># 25 "include/linux/ktime.h" 2 ># 1 "include/linux/jiffies.h" 1 > > > ># 1 "include/linux/math64.h" 1 ># 49 "include/linux/math64.h" >extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); > > > >extern u64 div64_u64(u64 dividend, u64 divisor); ># 66 "include/linux/math64.h" >static inline __attribute__((always_inline)) u64 div_u64(u64 dividend, u32 divisor) >{ > u32 remainder; > return div_u64_rem(dividend, divisor, &remainder); >} > > > > > > >static inline __attribute__((always_inline)) s64 div_s64(s64 dividend, s32 divisor) >{ > s32 remainder; > return div_s64_rem(dividend, divisor, &remainder); >} ># 5 "include/linux/jiffies.h" 2 > > > ># 1 "include/linux/timex.h" 1 ># 59 "include/linux/timex.h" ># 1 "include/asm/param.h" 1 ># 60 "include/linux/timex.h" 2 ># 100 "include/linux/timex.h" >struct timex { > unsigned int modes; > long offset; > long freq; > long maxerror; > long esterror; > int status; > long constant; > long precision; > long tolerance; > > > struct timeval time; > long tick; > > long ppsfreq; > long jitter; > int shift; > long stabil; > long jitcnt; > long calcnt; > long errcnt; > long stbcnt; > > int tai; > > int :32; int :32; int :32; int :32; > int :32; int :32; int :32; int :32; > int :32; int :32; int :32; >}; ># 195 "include/linux/timex.h" ># 1 "include/asm/timex.h" 1 > > > > > ># 1 "include/asm/tsc.h" 1 ># 15 "include/asm/tsc.h" >typedef unsigned long long cycles_t; > >extern unsigned int cpu_khz; >extern unsigned int tsc_khz; > >extern void disable_TSC(void); > >static inline __attribute__((always_inline)) cycles_t get_cycles(void) >{ > unsigned long long ret = 0; > > > > > > (ret = paravirt_read_tsc()); > > return ret; >} > >static inline __attribute__((always_inline)) __attribute__((always_inline)) cycles_t vget_cycles(void) >{ ># 45 "include/asm/tsc.h" > return (cycles_t)__native_read_tsc(); >} > >extern void tsc_init(void); >extern void mark_tsc_unstable(char *reason); >extern int unsynchronized_tsc(void); >extern void init_tsc_clocksource(void); >int check_tsc_unstable(void); > > > > > >extern void check_tsc_sync_source(int cpu); >extern void check_tsc_sync_target(void); > >extern void tsc_calibrate(void); >extern int notsc_setup(char *); ># 7 "include/asm/timex.h" 2 ># 196 "include/linux/timex.h" 2 > > > > > > >extern unsigned long tick_usec; >extern unsigned long tick_nsec; >extern int tickadj; > > > > >extern int time_status; >extern long time_maxerror; >extern long time_esterror; > >extern long time_adjust; > >extern void ntp_init(void); >extern void ntp_clear(void); > > > > > >static inline __attribute__((always_inline)) int ntp_synced(void) >{ > return !(time_status & 0x0040); >} ># 244 "include/linux/timex.h" >extern u64 tick_length; > >extern void second_overflow(void); >extern void update_ntp_one_tick(void); >extern int do_adjtimex(struct timex *); > > > > >int read_current_timer(unsigned long *timer_val); ># 9 "include/linux/jiffies.h" 2 ># 81 "include/linux/jiffies.h" >extern u64 __attribute__((section(".data"))) jiffies_64; >extern unsigned long volatile __attribute__((section(".data"))) jiffies; > > >u64 get_jiffies_64(void); ># 173 "include/linux/jiffies.h" >extern unsigned long preset_lpj; ># 286 "include/linux/jiffies.h" >extern unsigned int jiffies_to_msecs(const unsigned long j); >extern unsigned int jiffies_to_usecs(const unsigned long j); >extern unsigned long msecs_to_jiffies(const unsigned int m); >extern unsigned long usecs_to_jiffies(const unsigned int u); >extern unsigned long timespec_to_jiffies(const struct timespec *value); >extern void jiffies_to_timespec(const unsigned long jiffies, > struct timespec *value); >extern unsigned long timeval_to_jiffies(const struct timeval *value); >extern void jiffies_to_timeval(const unsigned long jiffies, > struct timeval *value); >extern clock_t jiffies_to_clock_t(long x); >extern unsigned long clock_t_to_jiffies(unsigned long x); >extern u64 jiffies_64_to_clock_t(u64 x); >extern u64 nsec_to_clock_t(u64 x); ># 26 "include/linux/ktime.h" 2 ># 46 "include/linux/ktime.h" >union ktime { > s64 tv64; ># 57 "include/linux/ktime.h" >}; > >typedef union ktime ktime_t; ># 81 "include/linux/ktime.h" >static inline __attribute__((always_inline)) ktime_t ktime_set(const long secs, const unsigned long nsecs) >{ > > > > > return (ktime_t) { .tv64 = (s64)secs * 1000000000L + (s64)nsecs }; >} ># 113 "include/linux/ktime.h" >static inline __attribute__((always_inline)) ktime_t timespec_to_ktime(struct timespec ts) >{ > return ktime_set(ts.tv_sec, ts.tv_nsec); >} > > >static inline __attribute__((always_inline)) ktime_t timeval_to_ktime(struct timeval tv) >{ > return ktime_set(tv.tv_sec, tv.tv_usec * 1000L); >} ># 287 "include/linux/ktime.h" >static inline __attribute__((always_inline)) int ktime_equal(const ktime_t cmp1, const ktime_t cmp2) >{ > return cmp1.tv64 == cmp2.tv64; >} > >static inline __attribute__((always_inline)) s64 ktime_to_us(const ktime_t kt) >{ > struct timeval tv = ns_to_timeval((kt).tv64); > return (s64) tv.tv_sec * 1000000L + tv.tv_usec; >} > >static inline __attribute__((always_inline)) s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) >{ > return ktime_to_us(({ (ktime_t){ .tv64 = (later).tv64 - (earlier).tv64 }; })); >} > >static inline __attribute__((always_inline)) ktime_t ktime_add_us(const ktime_t kt, const u64 usec) >{ > return ({ (ktime_t){ .tv64 = (kt).tv64 + (usec * 1000) }; }); >} > >static inline __attribute__((always_inline)) ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) >{ > return ({ (ktime_t){ .tv64 = (kt).tv64 - (usec * 1000) }; }); >} > >extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); ># 325 "include/linux/ktime.h" >extern void ktime_get_ts(struct timespec *ts); > > > > >static inline __attribute__((always_inline)) ktime_t ns_to_ktime(u64 ns) >{ > static const ktime_t ktime_zero = { .tv64 = 0 }; > return ({ (ktime_t){ .tv64 = (ktime_zero).tv64 + (ns) }; }); >} ># 6 "include/linux/timer.h" 2 > ># 1 "include/linux/debugobjects.h" 1 > > > > > > >enum debug_obj_state { > ODEBUG_STATE_NONE, > ODEBUG_STATE_INIT, > ODEBUG_STATE_INACTIVE, > ODEBUG_STATE_ACTIVE, > ODEBUG_STATE_DESTROYED, > ODEBUG_STATE_NOTAVAILABLE, > ODEBUG_STATE_MAX, >}; > >struct debug_obj_descr; ># 26 "include/linux/debugobjects.h" >struct debug_obj { > struct hlist_node node; > enum debug_obj_state state; > void *object; > struct debug_obj_descr *descr; >}; ># 45 "include/linux/debugobjects.h" >struct debug_obj_descr { > const char *name; > > int (*fixup_init) (void *addr, enum debug_obj_state state); > int (*fixup_activate) (void *addr, enum debug_obj_state state); > int (*fixup_destroy) (void *addr, enum debug_obj_state state); > int (*fixup_free) (void *addr, enum debug_obj_state state); >}; > > >extern void debug_object_init (void *addr, struct debug_obj_descr *descr); >extern void >debug_object_init_on_stack(void *addr, struct debug_obj_descr *descr); >extern void debug_object_activate (void *addr, struct debug_obj_descr *descr); >extern void debug_object_deactivate(void *addr, struct debug_obj_descr *descr); >extern void debug_object_destroy (void *addr, struct debug_obj_descr *descr); >extern void debug_object_free (void *addr, struct debug_obj_descr *descr); > >extern void debug_objects_early_init(void); >extern void debug_objects_mem_init(void); ># 84 "include/linux/debugobjects.h" >extern void debug_check_no_obj_freed(const void *address, unsigned long size); ># 8 "include/linux/timer.h" 2 > >struct tvec_base; > >struct timer_list { > struct list_head entry; > unsigned long expires; > > void (*function)(unsigned long); > unsigned long data; > > struct tvec_base *base; > > void *start_site; > char start_comm[16]; > int start_pid; > >}; > >extern struct tvec_base boot_tvec_bases; ># 40 "include/linux/timer.h" >void init_timer(struct timer_list *timer); >void init_timer_deferrable(struct timer_list *timer); > > >extern void init_timer_on_stack(struct timer_list *timer); >extern void destroy_timer_on_stack(struct timer_list *timer); ># 54 "include/linux/timer.h" >static inline __attribute__((always_inline)) void setup_timer(struct timer_list * timer, > void (*function)(unsigned long), > unsigned long data) >{ > timer->function = function; > timer->data = data; > init_timer(timer); >} > >static inline __attribute__((always_inline)) void setup_timer_on_stack(struct timer_list *timer, > void (*function)(unsigned long), > unsigned long data) >{ > timer->function = function; > timer->data = data; > init_timer_on_stack(timer); >} ># 82 "include/linux/timer.h" >static inline __attribute__((always_inline)) int timer_pending(const struct timer_list * timer) >{ > return timer->entry.next != ((void *)0); >} > >extern void add_timer_on(struct timer_list *timer, int cpu); >extern int del_timer(struct timer_list * timer); >extern int __mod_timer(struct timer_list *timer, unsigned long expires); >extern int mod_timer(struct timer_list *timer, unsigned long expires); ># 102 "include/linux/timer.h" >extern unsigned long next_timer_interrupt(void); > > > > > >extern unsigned long get_next_timer_interrupt(unsigned long now); ># 117 "include/linux/timer.h" >extern void init_timer_stats(void); > >extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, > void *timerf, char *comm, > unsigned int timer_flag); > >extern void __timer_stats_timer_set_start_info(struct timer_list *timer, > void *addr); > >static inline __attribute__((always_inline)) void timer_stats_timer_set_start_info(struct timer_list *timer) >{ > __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); >} > >static inline __attribute__((always_inline)) void timer_stats_timer_clear_start_info(struct timer_list *timer) >{ > timer->start_site = ((void *)0); >} ># 163 "include/linux/timer.h" >static inline __attribute__((always_inline)) void add_timer(struct timer_list *timer) >{ > do { if (__builtin_expect(!!(timer_pending(timer)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/timer.h"), "i" (165), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > __mod_timer(timer, timer->expires); >} > > > extern int try_to_del_timer_sync(struct timer_list *timer); > extern int del_timer_sync(struct timer_list *timer); > > > > > > > >extern void init_timers(void); >extern void run_local_timers(void); >struct hrtimer; >extern enum hrtimer_restart it_real_fn(struct hrtimer *); > >unsigned long __round_jiffies(unsigned long j, int cpu); >unsigned long __round_jiffies_relative(unsigned long j, int cpu); >unsigned long round_jiffies(unsigned long j); >unsigned long round_jiffies_relative(unsigned long j); ># 9 "include/linux/workqueue.h" 2 > > > ># 1 "include/asm/atomic.h" 1 ># 13 "include/linux/workqueue.h" 2 > >struct workqueue_struct; > >struct work_struct; >typedef void (*work_func_t)(struct work_struct *work); > > > > > > > >struct work_struct { > atomic_long_t data; > > > > struct list_head entry; > work_func_t func; > > struct lockdep_map lockdep_map; > >}; > > > >struct delayed_work { > struct work_struct work; > struct timer_list timer; >}; > >struct execute_work { > struct work_struct work; >}; ># 150 "include/linux/workqueue.h" >extern struct workqueue_struct * >__create_workqueue_key(const char *name, int singlethread, > int freezeable, struct lock_class_key *key, > const char *lock_name); ># 179 "include/linux/workqueue.h" >extern void destroy_workqueue(struct workqueue_struct *wq); > >extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); >extern int queue_delayed_work(struct workqueue_struct *wq, > struct delayed_work *work, unsigned long delay); >extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, > struct delayed_work *work, unsigned long delay); > >extern void flush_workqueue(struct workqueue_struct *wq); >extern void flush_scheduled_work(void); > >extern int schedule_work(struct work_struct *work); >extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay); >extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, > unsigned long delay); >extern int schedule_on_each_cpu(work_func_t func); >extern int current_is_keventd(void); >extern int keventd_up(void); > >extern void init_workqueues(void); >int execute_in_process_context(work_func_t fn, struct execute_work *); > >extern int cancel_work_sync(struct work_struct *work); > > > > > > > >static inline __attribute__((always_inline)) int cancel_delayed_work(struct delayed_work *work) >{ > int ret; > > ret = del_timer_sync(&work->timer); > if (ret) > clear_bit(0, ((unsigned long *)(&(&work->work)->data))); > return ret; >} > >extern int cancel_delayed_work_sync(struct delayed_work *work); > > >static inline __attribute__((always_inline)) >void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, > struct delayed_work *work) >{ > cancel_delayed_work_sync(work); >} > > >static inline __attribute__((always_inline)) >void cancel_rearming_delayed_work(struct delayed_work *work) >{ > cancel_delayed_work_sync(work); >} ># 12 "include/linux/slub_def.h" 2 ># 1 "include/linux/kobject.h" 1 ># 21 "include/linux/kobject.h" ># 1 "include/linux/sysfs.h" 1 ># 18 "include/linux/sysfs.h" ># 1 "include/asm/atomic.h" 1 ># 19 "include/linux/sysfs.h" 2 > >struct kobject; >struct module; > > > > > >struct attribute { > const char *name; > struct module *owner; > mode_t mode; >}; > >struct attribute_group { > const char *name; > mode_t (*is_visible)(struct kobject *, > struct attribute *, int); > struct attribute **attrs; >}; ># 62 "include/linux/sysfs.h" >struct vm_area_struct; > >struct bin_attribute { > struct attribute attr; > size_t size; > void *private; > ssize_t (*read)(struct kobject *, struct bin_attribute *, > char *, loff_t, size_t); > ssize_t (*write)(struct kobject *, struct bin_attribute *, > char *, loff_t, size_t); > int (*mmap)(struct kobject *, struct bin_attribute *attr, > struct vm_area_struct *vma); >}; > >struct sysfs_ops { > ssize_t (*show)(struct kobject *, struct attribute *,char *); > ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); >}; > > > >int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), > void *data, struct module *owner); > >int __attribute__((warn_unused_result)) sysfs_create_dir(struct kobject *kobj); >void sysfs_remove_dir(struct kobject *kobj); >int __attribute__((warn_unused_result)) sysfs_rename_dir(struct kobject *kobj, const char *new_name); >int __attribute__((warn_unused_result)) sysfs_move_dir(struct kobject *kobj, > struct kobject *new_parent_kobj); > >int __attribute__((warn_unused_result)) sysfs_create_file(struct kobject *kobj, > const struct attribute *attr); >int __attribute__((warn_unused_result)) sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, > mode_t mode); >void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); > >int __attribute__((warn_unused_result)) sysfs_create_bin_file(struct kobject *kobj, > struct bin_attribute *attr); >void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); > >int __attribute__((warn_unused_result)) sysfs_create_link(struct kobject *kobj, struct kobject *target, > const char *name); >void sysfs_remove_link(struct kobject *kobj, const char *name); > >int __attribute__((warn_unused_result)) sysfs_create_group(struct kobject *kobj, > const struct attribute_group *grp); >int sysfs_update_group(struct kobject *kobj, > const struct attribute_group *grp); >void sysfs_remove_group(struct kobject *kobj, > const struct attribute_group *grp); >int sysfs_add_file_to_group(struct kobject *kobj, > const struct attribute *attr, const char *group); >void sysfs_remove_file_from_group(struct kobject *kobj, > const struct attribute *attr, const char *group); > >void sysfs_notify(struct kobject *kobj, char *dir, char *attr); > >extern int __attribute__((warn_unused_result)) sysfs_init(void); ># 22 "include/linux/kobject.h" 2 > > ># 1 "include/linux/kref.h" 1 ># 19 "include/linux/kref.h" ># 1 "include/asm/atomic.h" 1 ># 20 "include/linux/kref.h" 2 > >struct kref { > atomic_t refcount; >}; > >void kref_set(struct kref *kref, int num); >void kref_init(struct kref *kref); >void kref_get(struct kref *kref); >int kref_put(struct kref *kref, void (*release) (struct kref *kref)); ># 25 "include/linux/kobject.h" 2 > > ># 1 "include/asm/atomic.h" 1 ># 28 "include/linux/kobject.h" 2 > > > > > > > >extern char uevent_helper[]; > > >extern u64 uevent_seqnum; ># 50 "include/linux/kobject.h" >enum kobject_action { > KOBJ_ADD, > KOBJ_REMOVE, > KOBJ_CHANGE, > KOBJ_MOVE, > KOBJ_ONLINE, > KOBJ_OFFLINE, > KOBJ_MAX >}; > >struct kobject { > const char *name; > struct kref kref; > struct list_head entry; > struct kobject *parent; > struct kset *kset; > struct kobj_type *ktype; > struct sysfs_dirent *sd; > unsigned int state_initialized:1; > unsigned int state_in_sysfs:1; > unsigned int state_add_uevent_sent:1; > unsigned int state_remove_uevent_sent:1; >}; > >extern int kobject_set_name(struct kobject *kobj, const char *name, ...) > __attribute__((format(printf, 2, 3))); > >static inline __attribute__((always_inline)) const char *kobject_name(const struct kobject *kobj) >{ > return kobj->name; >} > >extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); >extern int __attribute__((warn_unused_result)) kobject_add(struct kobject *kobj, > struct kobject *parent, > const char *fmt, ...); >extern int __attribute__((warn_unused_result)) kobject_init_and_add(struct kobject *kobj, > struct kobj_type *ktype, > struct kobject *parent, > const char *fmt, ...); > >extern void kobject_del(struct kobject *kobj); > >extern struct kobject * __attribute__((warn_unused_result)) kobject_create(void); >extern struct kobject * __attribute__((warn_unused_result)) kobject_create_and_add(const char *name, > struct kobject *parent); > >extern int __attribute__((warn_unused_result)) kobject_rename(struct kobject *, const char *new_name); >extern int __attribute__((warn_unused_result)) kobject_move(struct kobject *, struct kobject *); > >extern struct kobject *kobject_get(struct kobject *kobj); >extern void kobject_put(struct kobject *kobj); > >extern char *kobject_get_path(struct kobject *kobj, gfp_t flag); > >struct kobj_type { > void (*release)(struct kobject *kobj); > struct sysfs_ops *sysfs_ops; > struct attribute **default_attrs; >}; > >struct kobj_uevent_env { > char *envp[32]; > int envp_idx; > char buf[2048]; > int buflen; >}; > >struct kset_uevent_ops { > int (*filter)(struct kset *kset, struct kobject *kobj); > const char *(*name)(struct kset *kset, struct kobject *kobj); > int (*uevent)(struct kset *kset, struct kobject *kobj, > struct kobj_uevent_env *env); >}; > >struct kobj_attribute { > struct attribute attr; > ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, > char *buf); > ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, > const char *buf, size_t count); >}; > >extern struct sysfs_ops kobj_sysfs_ops; ># 152 "include/linux/kobject.h" >struct kset { > struct list_head list; > spinlock_t list_lock; > struct kobject kobj; > struct kset_uevent_ops *uevent_ops; >}; > >extern void kset_init(struct kset *kset); >extern int __attribute__((warn_unused_result)) kset_register(struct kset *kset); >extern void kset_unregister(struct kset *kset); >extern struct kset * __attribute__((warn_unused_result)) kset_create_and_add(const char *name, > struct kset_uevent_ops *u, > struct kobject *parent_kobj); > >static inline __attribute__((always_inline)) struct kset *to_kset(struct kobject *kobj) >{ > return kobj ? ({ const typeof( ((struct kset *)0)->kobj ) *__mptr = (kobj); (struct kset *)( (char *)__mptr - __builtin_offsetof(struct kset,kobj) );}) : ((void *)0); >} > >static inline __attribute__((always_inline)) struct kset *kset_get(struct kset *k) >{ > return k ? to_kset(kobject_get(&k->kobj)) : ((void *)0); >} > >static inline __attribute__((always_inline)) void kset_put(struct kset *k) >{ > kobject_put(&k->kobj); >} > >static inline __attribute__((always_inline)) struct kobj_type *get_ktype(struct kobject *kobj) >{ > return kobj->ktype; >} > >extern struct kobject *kset_find_obj(struct kset *, const char *); > > >extern struct kobject *kernel_kobj; > >extern struct kobject *hypervisor_kobj; > >extern struct kobject *power_kobj; > >extern struct kobject *firmware_kobj; > > >int kobject_uevent(struct kobject *kobj, enum kobject_action action); >int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, > char *envp[]); > >int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) > __attribute__((format (printf, 2, 3))); > >int kobject_action_type(const char *buf, size_t count, > enum kobject_action *type); ># 13 "include/linux/slub_def.h" 2 > >enum stat_item { > ALLOC_FASTPATH, > ALLOC_SLOWPATH, > FREE_FASTPATH, > FREE_SLOWPATH, > FREE_FROZEN, > FREE_ADD_PARTIAL, > FREE_REMOVE_PARTIAL, > ALLOC_FROM_PARTIAL, > ALLOC_SLAB, > ALLOC_REFILL, > FREE_SLAB, > CPUSLAB_FLUSH, > DEACTIVATE_FULL, > DEACTIVATE_EMPTY, > DEACTIVATE_TO_HEAD, > DEACTIVATE_TO_TAIL, > DEACTIVATE_REMOTE_FREES, > ORDER_FALLBACK, > NR_SLUB_STAT_ITEMS }; > >struct kmem_cache_cpu { > void **freelist; > struct page *page; > int node; > unsigned int offset; > unsigned int objsize; > > > >}; > >struct kmem_cache_node { > spinlock_t list_lock; > unsigned long nr_partial; > struct list_head partial; > > atomic_long_t nr_slabs; > atomic_long_t total_objects; > struct list_head full; > >}; > > > > > > >struct kmem_cache_order_objects { > unsigned long x; >}; > > > > >struct kmem_cache { > > unsigned long flags; > int size; > int objsize; > int offset; > struct kmem_cache_order_objects oo; > > > > > > struct kmem_cache_node local_node; > > > struct kmem_cache_order_objects max; > struct kmem_cache_order_objects min; > gfp_t allocflags; > int refcount; > void (*ctor)(struct kmem_cache *, void *); > int inuse; > int align; > const char *name; > struct list_head list; > > struct kobject kobj; ># 105 "include/linux/slub_def.h" > struct kmem_cache_cpu *cpu_slab[32]; > > > >}; ># 126 "include/linux/slub_def.h" >extern struct kmem_cache kmalloc_caches[12 + 1]; > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) int kmalloc_index(size_t size) >{ > if (!size) > return 0; > > if (size <= 8) > return ( __builtin_constant_p(8) ? ( (8) < 1 ? ____ilog2_NaN() : (8) & (1ULL << 63) ? 63 : (8) & (1ULL << 62) ? 62 : (8) & (1ULL << 61) ? 61 : (8) & (1ULL << 60) ? 60 : (8) & (1ULL << 59) ? 59 : (8) & (1ULL << 58) ? 58 : (8) & (1ULL << 57) ? 57 : (8) & (1ULL << 56) ? 56 : (8) & (1ULL << 55) ? 55 : (8) & (1ULL << 54) ? 54 : (8) & (1ULL << 53) ? 53 : (8) & (1ULL << 52) ? 52 : (8) & (1ULL << 51) ? 51 : (8) & (1ULL << 50) ? 50 : (8) & (1ULL << 49) ? 49 : (8) & (1ULL << 48) ? 48 : (8) & (1ULL << 47) ? 47 : (8) & (1ULL << 46) ? 46 : (8) & (1ULL << 45) ? 45 : (8) & (1ULL << 44) ? 44 : (8) & (1ULL << 43) ? 43 : (8) & (1ULL << 42) ? 42 : (8) & (1ULL << 41) ? 41 : (8) & (1ULL << 40) ? 40 : (8) & (1ULL << 39) ? 39 : (8) & (1ULL << 38) ? 38 : (8) & (1ULL << 37) ? 37 : (8) & (1ULL << 36) ? 36 : (8) & (1ULL << 35) ? 35 : (8) & (1ULL << 34) ? 34 : (8) & (1ULL << 33) ? 33 : (8) & (1ULL << 32) ? 32 : (8) & (1ULL << 31) ? 31 : (8) & (1ULL << 30) ? 30 : (8) & (1ULL << 29) ? 29 : (8) & (1ULL << 28) ? 28 : (8) & (1ULL << 27) ? 27 : (8) & (1ULL << 26) ? 26 : (8) & (1ULL << 25) ? 25 : (8) & (1ULL << 24) ? 24 : (8) & (1ULL << 23) ? 23 : (8) & (1ULL << 22) ? 22 : (8) & (1ULL << 21) ? 21 : (8) & (1ULL << 20) ? 20 : (8) & (1ULL << 19) ? 19 : (8) & (1ULL << 18) ? 18 : (8) & (1ULL << 17) ? 17 : (8) & (1ULL << 16) ? 16 : (8) & (1ULL << 15) ? 15 : (8) & (1ULL << 14) ? 14 : (8) & (1ULL << 13) ? 13 : (8) & (1ULL << 12) ? 12 : (8) & (1ULL << 11) ? 11 : (8) & (1ULL << 10) ? 10 : (8) & (1ULL << 9) ? 9 : (8) & (1ULL << 8) ? 8 : (8) & (1ULL << 7) ? 7 : (8) & (1ULL << 6) ? 6 : (8) & (1ULL << 5) ? 5 : (8) & (1ULL << 4) ? 4 : (8) & (1ULL << 3) ? 3 : (8) & (1ULL << 2) ? 2 : (8) & (1ULL << 1) ? 1 : (8) & (1ULL << 0) ? 0 : ____ilog2_NaN() ) : (sizeof(8) <= 4) ? __ilog2_u32(8) : __ilog2_u64(8) ); > > if (size > 64 && size <= 96) > return 1; > if (size > 128 && size <= 192) > return 2; > if (size <= 8) return 3; > if (size <= 16) return 4; > if (size <= 32) return 5; > if (size <= 64) return 6; > if (size <= 128) return 7; > if (size <= 256) return 8; > if (size <= 512) return 9; > if (size <= 1024) return 10; > if (size <= 2 * 1024) return 11; > if (size <= 4 * 1024) return 12; > > > > > if (size <= 8 * 1024) return 13; > if (size <= 16 * 1024) return 14; > if (size <= 32 * 1024) return 15; > if (size <= 64 * 1024) return 16; > if (size <= 128 * 1024) return 17; > if (size <= 256 * 1024) return 18; > if (size <= 512 * 1024) return 19; > if (size <= 1024 * 1024) return 20; > if (size <= 2 * 1024 * 1024) return 21; > return -1; ># 176 "include/linux/slub_def.h" >} > > > > > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) struct kmem_cache *kmalloc_slab(size_t size) >{ > int index = kmalloc_index(size); > > if (index == 0) > return ((void *)0); > > return &kmalloc_caches[index]; >} ># 201 "include/linux/slub_def.h" >void *kmem_cache_alloc(struct kmem_cache *, gfp_t); >void *__kmalloc(size_t size, gfp_t flags); > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void *kmalloc_large(size_t size, gfp_t flags) >{ > return (void *)__get_free_pages(flags | (( gfp_t)0x4000u), get_order(size)); >} > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void *kmalloc(size_t size, gfp_t flags) >{ > if (__builtin_constant_p(size)) { > if (size > ((1UL) << 12)) > return kmalloc_large(size, flags); > > if (!(flags & (( gfp_t)0x01u))) { > struct kmem_cache *s = kmalloc_slab(size); > > if (!s) > return ((void *)16); > > return kmem_cache_alloc(s, flags); > } > } > return __kmalloc(size, flags); >} ># 124 "include/linux/slab.h" 2 ># 181 "include/linux/slab.h" >static inline __attribute__((always_inline)) void *kcalloc(size_t n, size_t size, gfp_t flags) >{ > if (n != 0 && size > (~0UL) / n) > return ((void *)0); > return __kmalloc(n * size, flags | (( gfp_t)0x8000u)); >} ># 199 "include/linux/slab.h" >static inline __attribute__((always_inline)) void *kmalloc_node(size_t size, gfp_t flags, int node) >{ > return kmalloc(size, flags); >} > >static inline __attribute__((always_inline)) void *__kmalloc_node(size_t size, gfp_t flags, int node) >{ > return __kmalloc(size, flags); >} > >void *kmem_cache_alloc(struct kmem_cache *, gfp_t); > >static inline __attribute__((always_inline)) void *kmem_cache_alloc_node(struct kmem_cache *cachep, > gfp_t flags, int node) >{ > return kmem_cache_alloc(cachep, flags); >} ># 227 "include/linux/slab.h" >extern void *__kmalloc_track_caller(size_t, gfp_t, void*); ># 264 "include/linux/slab.h" >static inline __attribute__((always_inline)) void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) >{ > return kmem_cache_alloc(k, flags | (( gfp_t)0x8000u)); >} > > > > > > >static inline __attribute__((always_inline)) void *kzalloc(size_t size, gfp_t flags) >{ > return kmalloc(size, flags | (( gfp_t)0x8000u)); >} > > > > > > > >static inline __attribute__((always_inline)) void *kzalloc_node(size_t size, gfp_t flags, int node) >{ > return kmalloc_node(size, flags | (( gfp_t)0x8000u), node); >} > > >extern const struct seq_operations slabinfo_op; >ssize_t slabinfo_write(struct file *, const char *, size_t, loff_t *); ># 6 "include/linux/percpu.h" 2 ># 61 "include/linux/percpu.h" >struct percpu_data { > void *ptrs[1]; >}; ># 77 "include/linux/percpu.h" >extern void *percpu_populate(void *__pdata, size_t size, gfp_t gfp, int cpu); >extern void percpu_depopulate(void *__pdata, int cpu); >extern int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp, > cpumask_t *mask); >extern void __percpu_depopulate_mask(void *__pdata, cpumask_t *mask); >extern void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask); >extern void percpu_free(void *__pdata); ># 40 "include/linux/rcupdate.h" 2 ># 49 "include/linux/rcupdate.h" >struct rcu_head { > struct rcu_head *next; > void (*func)(struct rcu_head *head); >}; > > ># 1 "include/linux/rcuclassic.h" 1 ># 45 "include/linux/rcuclassic.h" >struct rcu_ctrlblk { > long cur; > long completed; > int next_pending; > > int signaled; > > spinlock_t lock __attribute__((__aligned__(1 << ((7))))); > cpumask_t cpumask; > >} __attribute__((__aligned__(1 << ((7))))); > > >static inline __attribute__((always_inline)) int rcu_batch_before(long a, long b) >{ > return (a - b) < 0; >} > > >static inline __attribute__((always_inline)) int rcu_batch_after(long a, long b) >{ > return (a - b) > 0; >} > > > > > > >struct rcu_data { > > long quiescbatch; > int passed_quiesc; > int qs_pending; > > > long batch; > struct rcu_head *nxtlist; > struct rcu_head **nxttail; > long qlen; > struct rcu_head *curlist; > struct rcu_head **curtail; > struct rcu_head *donelist; > struct rcu_head **donetail; > long blimit; > int cpu; > struct rcu_head barrier; >}; > >extern __typeof__(struct rcu_data) per_cpu__rcu_data; >extern __typeof__(struct rcu_data) per_cpu__rcu_bh_data; > > > > > > > >static inline __attribute__((always_inline)) void rcu_qsctr_inc(int cpu) >{ > struct rcu_data *rdp = &(*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((&per_cpu__rcu_data))); (typeof((&per_cpu__rcu_data))) (__ptr + (((__per_cpu_offset[cpu])))); })); > rdp->passed_quiesc = 1; >} >static inline __attribute__((always_inline)) void rcu_bh_qsctr_inc(int cpu) >{ > struct rcu_data *rdp = &(*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((&per_cpu__rcu_bh_data))); (typeof((&per_cpu__rcu_bh_data))) (__ptr + (((__per_cpu_offset[cpu])))); })); > rdp->passed_quiesc = 1; >} > >extern int rcu_pending(int cpu); >extern int rcu_needs_cpu(int cpu); > > >extern struct lockdep_map rcu_lock_map; ># 154 "include/linux/rcuclassic.h" >extern void __rcu_init(void); >extern void rcu_check_callbacks(int cpu, int user); >extern void rcu_restart_cpu(int cpu); > >extern long rcu_batches_completed(void); >extern long rcu_batches_completed_bh(void); ># 56 "include/linux/rcupdate.h" 2 ># 200 "include/linux/rcupdate.h" >extern void call_rcu(struct rcu_head *head, > void (*func)(struct rcu_head *head)); ># 221 "include/linux/rcupdate.h" >extern void call_rcu_bh(struct rcu_head *head, > void (*func)(struct rcu_head *head)); > > >extern void synchronize_rcu(void); >extern void rcu_barrier(void); >extern long rcu_batches_completed(void); >extern long rcu_batches_completed_bh(void); > > >extern void rcu_init(void); >extern int rcu_needs_cpu(int cpu); ># 9 "include/linux/dcache.h" 2 > >struct nameidata; >struct path; >struct vfsmount; ># 32 "include/linux/dcache.h" >struct qstr { > unsigned int hash; > unsigned int len; > const unsigned char *name; >}; > >struct dentry_stat_t { > int nr_dentry; > int nr_unused; > int age_limit; > int want_pages; > int dummy[2]; >}; >extern struct dentry_stat_t dentry_stat; > > > > > > >static inline __attribute__((always_inline)) unsigned long >partial_name_hash(unsigned long c, unsigned long prevhash) >{ > return (prevhash + (c << 4) + (c >> 4)) * 11; >} > > > > > >static inline __attribute__((always_inline)) unsigned long end_name_hash(unsigned long hash) >{ > return (unsigned int) hash; >} > > >static inline __attribute__((always_inline)) unsigned int >full_name_hash(const unsigned char *name, unsigned int len) >{ > unsigned long hash = 0; > while (len--) > hash = partial_name_hash(*name++, hash); > return end_name_hash(hash); >} > >struct dcookie_struct; > > > >struct dentry { > atomic_t d_count; > unsigned int d_flags; > spinlock_t d_lock; > struct inode *d_inode; > > > > > > struct hlist_node d_hash; > struct dentry *d_parent; > struct qstr d_name; > > struct list_head d_lru; > > > > union { > struct list_head d_child; > struct rcu_head d_rcu; > } d_u; > struct list_head d_subdirs; > struct list_head d_alias; > unsigned long d_time; > struct dentry_operations *d_op; > struct super_block *d_sb; > void *d_fsdata; > > struct dcookie_struct *d_cookie; > > int d_mounted; > unsigned char d_iname[36]; >}; > > > > > > > >enum dentry_d_lock_class >{ > DENTRY_D_LOCK_NORMAL, > DENTRY_D_LOCK_NESTED >}; > >struct dentry_operations { > int (*d_revalidate)(struct dentry *, struct nameidata *); > int (*d_hash) (struct dentry *, struct qstr *); > int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); > int (*d_delete)(struct dentry *); > void (*d_release)(struct dentry *); > void (*d_iput)(struct dentry *, struct inode *); > char *(*d_dname)(struct dentry *, char *, int); >}; ># 179 "include/linux/dcache.h" >extern spinlock_t dcache_lock; >extern seqlock_t rename_lock; ># 198 "include/linux/dcache.h" >static inline __attribute__((always_inline)) void __d_drop(struct dentry *dentry) >{ > if (!(dentry->d_flags & 0x0010)) { > dentry->d_flags |= 0x0010; > hlist_del_rcu(&dentry->d_hash); > } >} > >static inline __attribute__((always_inline)) void d_drop(struct dentry *dentry) >{ > _spin_lock(&dcache_lock); > _spin_lock(&dentry->d_lock); > __d_drop(dentry); > _spin_unlock(&dentry->d_lock); > _spin_unlock(&dcache_lock); >} > >static inline __attribute__((always_inline)) int dname_external(struct dentry *dentry) >{ > return dentry->d_name.name != dentry->d_iname; >} > > > > >extern void d_instantiate(struct dentry *, struct inode *); >extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); >extern struct dentry * d_materialise_unique(struct dentry *, struct inode *); >extern void d_delete(struct dentry *); > > >extern struct dentry * d_alloc(struct dentry *, const struct qstr *); >extern struct dentry * d_alloc_anon(struct inode *); >extern struct dentry * d_splice_alias(struct inode *, struct dentry *); >extern void shrink_dcache_sb(struct super_block *); >extern void shrink_dcache_parent(struct dentry *); >extern void shrink_dcache_for_umount(struct super_block *); >extern int d_invalidate(struct dentry *); > > >extern struct dentry * d_alloc_root(struct inode *); > > >extern void d_genocide(struct dentry *); > >extern struct dentry *d_find_alias(struct inode *); >extern void d_prune_aliases(struct inode *); > > >extern int have_submounts(struct dentry *); > > > > >extern void d_rehash(struct dentry *); ># 263 "include/linux/dcache.h" >static inline __attribute__((always_inline)) void d_add(struct dentry *entry, struct inode *inode) >{ > d_instantiate(entry, inode); > d_rehash(entry); >} ># 277 "include/linux/dcache.h" >static inline __attribute__((always_inline)) struct dentry *d_add_unique(struct dentry *entry, struct inode *inode) >{ > struct dentry *res; > > res = d_instantiate_unique(entry, inode); > d_rehash(res != ((void *)0) ? res : entry); > return res; >} > > >extern void d_move(struct dentry *, struct dentry *); > > >extern struct dentry * d_lookup(struct dentry *, struct qstr *); >extern struct dentry * __d_lookup(struct dentry *, struct qstr *); >extern struct dentry * d_hash_and_lookup(struct dentry *, struct qstr *); > > >extern int d_validate(struct dentry *, struct dentry *); > > > > >extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); > >extern char *__d_path(const struct path *path, struct path *root, char *, int); >extern char *d_path(struct path *, char *, int); >extern char *dentry_path(struct dentry *, char *, int); ># 321 "include/linux/dcache.h" >static inline __attribute__((always_inline)) struct dentry *dget(struct dentry *dentry) >{ > if (dentry) { > do { if (__builtin_expect(!!(!((&dentry->d_count)->counter)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/dcache.h"), "i" (324), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > atomic_inc(&dentry->d_count); > } > return dentry; >} > >extern struct dentry * dget_locked(struct dentry *); ># 339 "include/linux/dcache.h" >static inline __attribute__((always_inline)) int d_unhashed(struct dentry *dentry) >{ > return (dentry->d_flags & 0x0010); >} > >static inline __attribute__((always_inline)) struct dentry *dget_parent(struct dentry *dentry) >{ > struct dentry *ret; > > _spin_lock(&dentry->d_lock); > ret = dget(dentry->d_parent); > _spin_unlock(&dentry->d_lock); > return ret; >} > >extern void dput(struct dentry *); > >static inline __attribute__((always_inline)) int d_mountpoint(struct dentry *dentry) >{ > return dentry->d_mounted; >} > >extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *); >extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); > >extern int sysctl_vfs_cache_pressure; ># 279 "include/linux/fs.h" 2 ># 1 "include/linux/namei.h" 1 > > > > > ># 1 "include/linux/path.h" 1 > > > >struct dentry; >struct vfsmount; > >struct path { > struct vfsmount *mnt; > struct dentry *dentry; >}; > >extern void path_get(struct path *); >extern void path_put(struct path *); ># 7 "include/linux/namei.h" 2 > >struct vfsmount; > >struct open_intent { > int flags; > int create_mode; > struct file *file; >}; > >enum { MAX_NESTED_LINKS = 8 }; > >struct nameidata { > struct path path; > struct qstr last; > unsigned int flags; > int last_type; > unsigned depth; > char *saved_names[MAX_NESTED_LINKS + 1]; > > > union { > struct open_intent open; > } intent; >}; > > > > >enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; ># 60 "include/linux/namei.h" >extern int __user_walk(const char *, unsigned, struct nameidata *); >extern int __user_walk_fd(int dfd, const char *, unsigned, struct nameidata *); > > > > >extern int path_lookup(const char *, unsigned, struct nameidata *); >extern int vfs_path_lookup(struct dentry *, struct vfsmount *, > const char *, unsigned int, struct nameidata *); > >extern int __user_path_lookup_open(const char *, unsigned lookup_flags, struct nameidata *nd, int open_flags); >extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); >extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, > int (*open)(struct inode *, struct file *)); >extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); >extern void release_open_intent(struct nameidata *); > >extern struct dentry *lookup_one_len(const char *, struct dentry *, int); >extern struct dentry *lookup_one_noperm(const char *, struct dentry *); > >extern int follow_down(struct vfsmount **, struct dentry **); >extern int follow_up(struct vfsmount **, struct dentry **); > >extern struct dentry *lock_rename(struct dentry *, struct dentry *); >extern void unlock_rename(struct dentry *, struct dentry *); > >static inline __attribute__((always_inline)) void nd_set_link(struct nameidata *nd, char *path) >{ > nd->saved_names[nd->depth] = path; >} > >static inline __attribute__((always_inline)) char *nd_get_link(struct nameidata *nd) >{ > return nd->saved_names[nd->depth]; >} ># 280 "include/linux/fs.h" 2 ># 1 "include/linux/stat.h" 1 > > > > > ># 1 "include/asm/stat.h" 1 > > > > > > >struct stat { > unsigned long st_dev; > unsigned long st_ino; > unsigned short st_mode; > unsigned short st_nlink; > unsigned short st_uid; > unsigned short st_gid; > unsigned long st_rdev; > unsigned long st_size; > unsigned long st_blksize; > unsigned long st_blocks; > unsigned long st_atime; > unsigned long st_atime_nsec; > unsigned long st_mtime; > unsigned long st_mtime_nsec; > unsigned long st_ctime; > unsigned long st_ctime_nsec; > unsigned long __unused4; > unsigned long __unused5; >}; > > > > > > >struct stat64 { > unsigned long long st_dev; > unsigned char __pad0[4]; > > unsigned long __st_ino; > > unsigned int st_mode; > unsigned int st_nlink; > > unsigned long st_uid; > unsigned long st_gid; > > unsigned long long st_rdev; > unsigned char __pad3[4]; > > long long st_size; > unsigned long st_blksize; > > > unsigned long long st_blocks; > > unsigned long st_atime; > unsigned long st_atime_nsec; > > unsigned long st_mtime; > unsigned int st_mtime_nsec; > > unsigned long st_ctime; > unsigned long st_ctime_nsec; > > unsigned long long st_ino; >}; ># 93 "include/asm/stat.h" >struct __old_kernel_stat { > unsigned short st_dev; > unsigned short st_ino; > unsigned short st_mode; > unsigned short st_nlink; > unsigned short st_uid; > unsigned short st_gid; > unsigned short st_rdev; > > unsigned long st_size; > unsigned long st_atime; > unsigned long st_mtime; > unsigned long st_ctime; > > > > > > >}; ># 7 "include/linux/stat.h" 2 ># 62 "include/linux/stat.h" >struct kstat { > u64 ino; > dev_t dev; > umode_t mode; > unsigned int nlink; > uid_t uid; > gid_t gid; > dev_t rdev; > loff_t size; > struct timespec atime; > struct timespec mtime; > struct timespec ctime; > unsigned long blksize; > unsigned long long blocks; >}; ># 281 "include/linux/fs.h" 2 > > > ># 1 "include/linux/radix-tree.h" 1 ># 41 "include/linux/radix-tree.h" >static inline __attribute__((always_inline)) void *radix_tree_ptr_to_indirect(void *ptr) >{ > return (void *)((unsigned long)ptr | 1); >} > >static inline __attribute__((always_inline)) void *radix_tree_indirect_to_ptr(void *ptr) >{ > return (void *)((unsigned long)ptr & ~1); >} > >static inline __attribute__((always_inline)) int radix_tree_is_indirect_ptr(void *ptr) >{ > return (int)((unsigned long)ptr & 1); >} > > > > > > >struct radix_tree_root { > unsigned int height; > gfp_t gfp_mask; > struct radix_tree_node *rnode; >}; ># 134 "include/linux/radix-tree.h" >static inline __attribute__((always_inline)) void *radix_tree_deref_slot(void **pslot) >{ > void *ret = *pslot; > if (__builtin_expect(!!(radix_tree_is_indirect_ptr(ret)), 0)) > ret = ((void *)-1UL); > return ret; >} ># 149 "include/linux/radix-tree.h" >static inline __attribute__((always_inline)) void radix_tree_replace_slot(void **pslot, void *item) >{ > do { if (__builtin_expect(!!(radix_tree_is_indirect_ptr(item)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/radix-tree.h"), "i" (151), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > ({ if (!__builtin_constant_p(item) || ((item) != ((void *)0))) __asm__ __volatile__("": : :"memory"); (*pslot) = (item); }); >} > >int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); >void *radix_tree_lookup(struct radix_tree_root *, unsigned long); >void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long); >void *radix_tree_delete(struct radix_tree_root *, unsigned long); >unsigned int >radix_tree_gang_lookup(struct radix_tree_root *root, void **results, > unsigned long first_index, unsigned int max_items); >unsigned long radix_tree_next_hole(struct radix_tree_root *root, > unsigned long index, unsigned long max_scan); >int radix_tree_preload(gfp_t gfp_mask); >void radix_tree_init(void); >void *radix_tree_tag_set(struct radix_tree_root *root, > unsigned long index, unsigned int tag); >void *radix_tree_tag_clear(struct radix_tree_root *root, > unsigned long index, unsigned int tag); >int radix_tree_tag_get(struct radix_tree_root *root, > unsigned long index, unsigned int tag); >unsigned int >radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results, > unsigned long first_index, unsigned int max_items, > unsigned int tag); >int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag); > >static inline __attribute__((always_inline)) void radix_tree_preload_end(void) >{ > do { } while (0); >} ># 285 "include/linux/fs.h" 2 ># 1 "include/linux/prio_tree.h" 1 ># 14 "include/linux/prio_tree.h" >struct raw_prio_tree_node { > struct prio_tree_node *left; > struct prio_tree_node *right; > struct prio_tree_node *parent; >}; > >struct prio_tree_node { > struct prio_tree_node *left; > struct prio_tree_node *right; > struct prio_tree_node *parent; > unsigned long start; > unsigned long last; >}; > >struct prio_tree_root { > struct prio_tree_node *prio_tree_node; > unsigned short index_bits; > unsigned short raw; > > > > >}; > >struct prio_tree_iter { > struct prio_tree_node *cur; > unsigned long mask; > unsigned long value; > int size_level; > > struct prio_tree_root *root; > unsigned long r_index; > unsigned long h_index; >}; > >static inline __attribute__((always_inline)) void prio_tree_iter_init(struct prio_tree_iter *iter, > struct prio_tree_root *root, unsigned long r_index, unsigned long h_index) >{ > iter->root = root; > iter->r_index = r_index; > iter->h_index = h_index; > iter->cur = ((void *)0); >} ># 84 "include/linux/prio_tree.h" >static inline __attribute__((always_inline)) int prio_tree_empty(const struct prio_tree_root *root) >{ > return root->prio_tree_node == ((void *)0); >} > >static inline __attribute__((always_inline)) int prio_tree_root(const struct prio_tree_node *node) >{ > return node->parent == node; >} > >static inline __attribute__((always_inline)) int prio_tree_left_empty(const struct prio_tree_node *node) >{ > return node->left == node; >} > >static inline __attribute__((always_inline)) int prio_tree_right_empty(const struct prio_tree_node *node) >{ > return node->right == node; >} > > >struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root, > struct prio_tree_node *old, struct prio_tree_node *node); >struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root, > struct prio_tree_node *node); >void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node); >struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter); ># 286 "include/linux/fs.h" 2 > ># 1 "include/linux/pid.h" 1 > > > > > >enum pid_type >{ > PIDTYPE_PID, > PIDTYPE_PGID, > PIDTYPE_SID, > PIDTYPE_MAX >}; ># 50 "include/linux/pid.h" >struct upid { > > int nr; > struct pid_namespace *ns; > struct hlist_node pid_chain; >}; > >struct pid >{ > atomic_t count; > > struct hlist_head tasks[PIDTYPE_MAX]; > struct rcu_head rcu; > unsigned int level; > struct upid numbers[1]; >}; > >extern struct pid init_struct_pid; > >struct pid_link >{ > struct hlist_node node; > struct pid *pid; >}; > >static inline __attribute__((always_inline)) struct pid *get_pid(struct pid *pid) >{ > if (pid) > atomic_inc(&pid->count); > return pid; >} > >extern void put_pid(struct pid *pid); >extern struct task_struct *pid_task(struct pid *pid, enum pid_type); >extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type); > >extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type); > > > > > >extern void attach_pid(struct task_struct *task, enum pid_type type, > struct pid *pid); >extern void detach_pid(struct task_struct *task, enum pid_type); >extern void change_pid(struct task_struct *task, enum pid_type, > struct pid *pid); >extern void transfer_pid(struct task_struct *old, struct task_struct *new, > enum pid_type); > >struct pid_namespace; >extern struct pid_namespace init_pid_ns; ># 113 "include/linux/pid.h" >extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns); >extern struct pid *find_vpid(int nr); >extern struct pid *find_pid(int nr); > > > > >extern struct pid *find_get_pid(int nr); >extern struct pid *find_ge_pid(int nr, struct pid_namespace *); >int next_pidmap(struct pid_namespace *pid_ns, int last); > >extern struct pid *alloc_pid(struct pid_namespace *ns); >extern void free_pid(struct pid *pid); ># 138 "include/linux/pid.h" >static inline __attribute__((always_inline)) pid_t pid_nr(struct pid *pid) >{ > pid_t nr = 0; > if (pid) > nr = pid->numbers[0].nr; > return nr; >} > >pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns); >pid_t pid_vnr(struct pid *pid); ># 288 "include/linux/fs.h" 2 > ># 1 "include/linux/capability.h" 1 ># 18 "include/linux/capability.h" >struct task_struct; ># 40 "include/linux/capability.h" >typedef struct __user_cap_header_struct { > __u32 version; > int pid; >} *cap_user_header_t; > >typedef struct __user_cap_data_struct { > __u32 effective; > __u32 permitted; > __u32 inheritable; >} *cap_user_data_t; ># 72 "include/linux/capability.h" >struct vfs_cap_data { > __le32 magic_etc; > struct { > __le32 permitted; > __le32 inheritable; > } data[2]; >}; ># 95 "include/linux/capability.h" >typedef struct kernel_cap_struct { > __u32 cap[2]; >} kernel_cap_t; ># 416 "include/linux/capability.h" >static inline __attribute__((always_inline)) kernel_cap_t cap_combine(const kernel_cap_t a, > const kernel_cap_t b) >{ > kernel_cap_t dest; > do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] | b.cap[__capi]; } } while (0); > return dest; >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(const kernel_cap_t a, > const kernel_cap_t b) >{ > kernel_cap_t dest; > do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] & b.cap[__capi]; } } while (0); > return dest; >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_drop(const kernel_cap_t a, > const kernel_cap_t drop) >{ > kernel_cap_t dest; > do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] &~ drop.cap[__capi]; } } while (0); > return dest; >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_invert(const kernel_cap_t c) >{ > kernel_cap_t dest; > do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = ~ c.cap[__capi]; } } while (0); > return dest; >} > >static inline __attribute__((always_inline)) int cap_isclear(const kernel_cap_t a) >{ > unsigned __capi; > for (__capi = 0; __capi < 2; ++__capi) { > if (a.cap[__capi] != 0) > return 0; > } > return 1; >} > >static inline __attribute__((always_inline)) int cap_issubset(const kernel_cap_t a, const kernel_cap_t set) >{ > kernel_cap_t dest; > dest = cap_drop(a, set); > return cap_isclear(dest); >} > > > >static inline __attribute__((always_inline)) int cap_is_fs_cap(int cap) >{ > const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))), ((1 << ((32) & 31))) } }); > return !!((1 << ((cap) & 31)) & __cap_fs_set.cap[((cap) >> 5)]); >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_drop_fs_set(const kernel_cap_t a) >{ > const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))), ((1 << ((32) & 31))) } }); > return cap_drop(a, __cap_fs_set); >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_raise_fs_set(const kernel_cap_t a, > const kernel_cap_t permitted) >{ > const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))), ((1 << ((32) & 31))) } }); > return cap_combine(a, > cap_intersect(permitted, __cap_fs_set)); >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_drop_nfsd_set(const kernel_cap_t a) >{ > const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31)))|(1 << ((24) & 31)), ((1 << ((32) & 31))) } }); > return cap_drop(a, __cap_fs_set); >} > >static inline __attribute__((always_inline)) kernel_cap_t cap_raise_nfsd_set(const kernel_cap_t a, > const kernel_cap_t permitted) >{ > const kernel_cap_t __cap_nfsd_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31)))|(1 << ((24) & 31)), ((1 << ((32) & 31))) } }); > return cap_combine(a, > cap_intersect(permitted, __cap_nfsd_set)); >} > >extern const kernel_cap_t __cap_empty_set; >extern const kernel_cap_t __cap_full_set; >extern const kernel_cap_t __cap_init_eff_set; > >int capable(int cap); >int __capable(struct task_struct *t, int cap); ># 290 "include/linux/fs.h" 2 ># 1 "include/linux/semaphore.h" 1 ># 16 "include/linux/semaphore.h" >struct semaphore { > spinlock_t lock; > unsigned int count; > struct list_head wait_list; >}; ># 34 "include/linux/semaphore.h" >static inline __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val) >{ > static struct lock_class_key __key; > *sem = (struct semaphore) { .lock = (spinlock_t) { .raw_lock = { 0 }, .magic = 0xdead4ead, .owner = ((void *)-1L), .owner_cpu = -1, .dep_map = { .name = "(*sem).lock" } }, .count = val, .wait_list = { &((*sem).wait_list), &((*sem).wait_list) }, }; > lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); >} > > > > >extern void down(struct semaphore *sem); >extern int __attribute__((warn_unused_result)) down_interruptible(struct semaphore *sem); >extern int __attribute__((warn_unused_result)) down_killable(struct semaphore *sem); >extern int __attribute__((warn_unused_result)) down_trylock(struct semaphore *sem); >extern int __attribute__((warn_unused_result)) down_timeout(struct semaphore *sem, long jiffies); >extern void up(struct semaphore *sem); ># 291 "include/linux/fs.h" 2 > ># 1 "include/asm/atomic.h" 1 ># 293 "include/linux/fs.h" 2 > > >struct export_operations; >struct hd_geometry; >struct iovec; >struct nameidata; >struct kiocb; >struct pipe_inode_info; >struct poll_table_struct; >struct kstatfs; >struct vm_area_struct; >struct vfsmount; > >extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) inode_init(void); >extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) inode_init_early(void); >extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) files_init(unsigned long); > >struct buffer_head; >typedef int (get_block_t)(struct inode *inode, sector_t iblock, > struct buffer_head *bh_result, int create); >typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, > ssize_t bytes, void *private); ># 346 "include/linux/fs.h" >struct iattr { > unsigned int ia_valid; > umode_t ia_mode; > uid_t ia_uid; > gid_t ia_gid; > loff_t ia_size; > struct timespec ia_atime; > struct timespec ia_mtime; > struct timespec ia_ctime; > > > > > > > struct file *ia_file; >}; > > > > ># 1 "include/linux/quota.h" 1 ># 44 "include/linux/quota.h" >typedef __kernel_uid32_t qid_t; >typedef __u64 qsize_t; ># 103 "include/linux/quota.h" >struct if_dqblk { > __u64 dqb_bhardlimit; > __u64 dqb_bsoftlimit; > __u64 dqb_curspace; > __u64 dqb_ihardlimit; > __u64 dqb_isoftlimit; > __u64 dqb_curinodes; > __u64 dqb_btime; > __u64 dqb_itime; > __u32 dqb_valid; >}; ># 124 "include/linux/quota.h" >struct if_dqinfo { > __u64 dqi_bgrace; > __u64 dqi_igrace; > __u32 dqi_flags; > __u32 dqi_valid; >}; ># 142 "include/linux/quota.h" >enum { > QUOTA_NL_C_UNSPEC, > QUOTA_NL_C_WARNING, > __QUOTA_NL_C_MAX, >}; > > >enum { > QUOTA_NL_A_UNSPEC, > QUOTA_NL_A_QTYPE, > QUOTA_NL_A_EXCESS_ID, > QUOTA_NL_A_WARNING, > QUOTA_NL_A_DEV_MAJOR, > QUOTA_NL_A_DEV_MINOR, > QUOTA_NL_A_CAUSED_ID, > __QUOTA_NL_A_MAX, >}; ># 169 "include/linux/quota.h" ># 1 "include/linux/dqblk_xfs.h" 1 ># 50 "include/linux/dqblk_xfs.h" >typedef struct fs_disk_quota { > __s8 d_version; > __s8 d_flags; > __u16 d_fieldmask; > __u32 d_id; > __u64 d_blk_hardlimit; > __u64 d_blk_softlimit; > __u64 d_ino_hardlimit; > __u64 d_ino_softlimit; > __u64 d_bcount; > __u64 d_icount; > __s32 d_itimer; > > __s32 d_btimer; > __u16 d_iwarns; > __u16 d_bwarns; > __s32 d_padding2; > __u64 d_rtb_hardlimit; > __u64 d_rtb_softlimit; > __u64 d_rtbcount; > __s32 d_rtbtimer; > __u16 d_rtbwarns; > __s16 d_padding3; > char d_padding4[8]; >} fs_disk_quota_t; ># 137 "include/linux/dqblk_xfs.h" >typedef struct fs_qfilestat { > __u64 qfs_ino; > __u64 qfs_nblks; > __u32 qfs_nextents; >} fs_qfilestat_t; > >typedef struct fs_quota_stat { > __s8 qs_version; > __u16 qs_flags; > __s8 qs_pad; > fs_qfilestat_t qs_uquota; > fs_qfilestat_t qs_gquota; > __u32 qs_incoredqs; > __s32 qs_btimelimit; > __s32 qs_itimelimit; > __s32 qs_rtbtimelimit; > __u16 qs_bwarnlimit; > __u16 qs_iwarnlimit; >} fs_quota_stat_t; ># 170 "include/linux/quota.h" 2 ># 1 "include/linux/dqblk_v1.h" 1 ># 21 "include/linux/dqblk_v1.h" >struct v1_mem_dqinfo { >}; ># 171 "include/linux/quota.h" 2 ># 1 "include/linux/dqblk_v2.h" 1 ># 20 "include/linux/dqblk_v2.h" >struct v2_mem_dqinfo { > unsigned int dqi_blocks; > unsigned int dqi_free_blk; > unsigned int dqi_free_entry; >}; ># 172 "include/linux/quota.h" 2 > ># 1 "include/asm/atomic.h" 1 ># 174 "include/linux/quota.h" 2 > >extern spinlock_t dq_data_lock; ># 187 "include/linux/quota.h" >struct mem_dqblk { > __u32 dqb_bhardlimit; > __u32 dqb_bsoftlimit; > qsize_t dqb_curspace; > __u32 dqb_ihardlimit; > __u32 dqb_isoftlimit; > __u32 dqb_curinodes; > time_t dqb_btime; > time_t dqb_itime; >}; > > > > >struct quota_format_type; > >struct mem_dqinfo { > struct quota_format_type *dqi_format; > int dqi_fmt_id; > > struct list_head dqi_dirty_list; > unsigned long dqi_flags; > unsigned int dqi_bgrace; > unsigned int dqi_igrace; > qsize_t dqi_maxblimit; > qsize_t dqi_maxilimit; > union { > struct v1_mem_dqinfo v1_i; > struct v2_mem_dqinfo v2_i; > } u; >}; > >struct super_block; > > > > > >extern void mark_info_dirty(struct super_block *sb, int type); > > > > > > > >struct dqstats { > int lookups; > int drops; > int reads; > int writes; > int cache_hits; > int allocated_dquots; > int free_dquots; > int syncs; >}; > >extern struct dqstats dqstats; ># 253 "include/linux/quota.h" >struct dquot { > struct hlist_node dq_hash; > struct list_head dq_inuse; > struct list_head dq_free; > struct list_head dq_dirty; > struct mutex dq_lock; > atomic_t dq_count; > wait_queue_head_t dq_wait_unused; > struct super_block *dq_sb; > unsigned int dq_id; > loff_t dq_off; > unsigned long dq_flags; > short dq_type; > struct mem_dqblk dq_dqb; >}; > > > > > > > >struct quota_format_ops { > int (*check_quota_file)(struct super_block *sb, int type); > int (*read_file_info)(struct super_block *sb, int type); > int (*write_file_info)(struct super_block *sb, int type); > int (*free_file_info)(struct super_block *sb, int type); > int (*read_dqblk)(struct dquot *dquot); > int (*commit_dqblk)(struct dquot *dquot); > int (*release_dqblk)(struct dquot *dquot); >}; > > >struct dquot_operations { > int (*initialize) (struct inode *, int); > int (*drop) (struct inode *); > int (*alloc_space) (struct inode *, qsize_t, int); > int (*alloc_inode) (const struct inode *, unsigned long); > int (*free_space) (struct inode *, qsize_t); > int (*free_inode) (const struct inode *, unsigned long); > int (*transfer) (struct inode *, struct iattr *); > int (*write_dquot) (struct dquot *); > int (*acquire_dquot) (struct dquot *); > int (*release_dquot) (struct dquot *); > int (*mark_dirty) (struct dquot *); > int (*write_info) (struct super_block *, int); >}; > > >struct quotactl_ops { > int (*quota_on)(struct super_block *, int, int, char *, int); > int (*quota_off)(struct super_block *, int, int); > int (*quota_sync)(struct super_block *, int); > int (*get_info)(struct super_block *, int, struct if_dqinfo *); > int (*set_info)(struct super_block *, int, struct if_dqinfo *); > int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); > int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); > int (*get_xstate)(struct super_block *, struct fs_quota_stat *); > int (*set_xstate)(struct super_block *, unsigned int, int); > int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *); > int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *); >}; > >struct quota_format_type { > int qf_fmt_id; > struct quota_format_ops *qf_ops; > struct module *qf_owner; > struct quota_format_type *qf_next; >}; ># 330 "include/linux/quota.h" >struct quota_info { > unsigned int flags; > struct mutex dqio_mutex; > struct mutex dqonoff_mutex; > struct rw_semaphore dqptr_sem; > struct inode *files[2]; > struct mem_dqinfo info[2]; > struct quota_format_ops *ops[2]; >}; ># 353 "include/linux/quota.h" >int register_quota_format(struct quota_format_type *fmt); >void unregister_quota_format(struct quota_format_type *fmt); > >struct quota_module_name { > int qm_fmt_id; > char *qm_mod_name; >}; ># 368 "include/linux/fs.h" 2 ># 395 "include/linux/fs.h" >enum positive_aop_returns { > AOP_WRITEPAGE_ACTIVATE = 0x80000, > AOP_TRUNCATED_PAGE = 0x80001, >}; > > > > > > > >struct page; >struct address_space; >struct writeback_control; > >struct iov_iter { > const struct iovec *iov; > unsigned long nr_segs; > size_t iov_offset; > size_t count; >}; > >size_t iov_iter_copy_from_user_atomic(struct page *page, > struct iov_iter *i, unsigned long offset, size_t bytes); >size_t iov_iter_copy_from_user(struct page *page, > struct iov_iter *i, unsigned long offset, size_t bytes); >void iov_iter_advance(struct iov_iter *i, size_t bytes); >int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); >size_t iov_iter_single_seg_count(struct iov_iter *i); > >static inline __attribute__((always_inline)) void iov_iter_init(struct iov_iter *i, > const struct iovec *iov, unsigned long nr_segs, > size_t count, size_t written) >{ > i->iov = iov; > i->nr_segs = nr_segs; > i->iov_offset = 0; > i->count = count + written; > > iov_iter_advance(i, written); >} > >static inline __attribute__((always_inline)) size_t iov_iter_count(struct iov_iter *i) >{ > return i->count; >} > > >struct address_space_operations { > int (*writepage)(struct page *page, struct writeback_control *wbc); > int (*readpage)(struct file *, struct page *); > void (*sync_page)(struct page *); > > > int (*writepages)(struct address_space *, struct writeback_control *); > > > int (*set_page_dirty)(struct page *page); > > int (*readpages)(struct file *filp, struct address_space *mapping, > struct list_head *pages, unsigned nr_pages); > > > > > > int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); > int (*commit_write)(struct file *, struct page *, unsigned, unsigned); > > int (*write_begin)(struct file *, struct address_space *mapping, > loff_t pos, unsigned len, unsigned flags, > struct page **pagep, void **fsdata); > int (*write_end)(struct file *, struct address_space *mapping, > loff_t pos, unsigned len, unsigned copied, > struct page *page, void *fsdata); > > > sector_t (*bmap)(struct address_space *, sector_t); > void (*invalidatepage) (struct page *, unsigned long); > int (*releasepage) (struct page *, gfp_t); > ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, > loff_t offset, unsigned long nr_segs); > int (*get_xip_mem)(struct address_space *, unsigned long, int, > void **, unsigned long *); > > int (*migratepage) (struct address_space *, > struct page *, struct page *); > int (*launder_page) (struct page *); >}; > > > > > >int pagecache_write_begin(struct file *, struct address_space *mapping, > loff_t pos, unsigned len, unsigned flags, > struct page **pagep, void **fsdata); > >int pagecache_write_end(struct file *, struct address_space *mapping, > loff_t pos, unsigned len, unsigned copied, > struct page *page, void *fsdata); > >struct backing_dev_info; >struct address_space { > struct inode *host; > struct radix_tree_root page_tree; > rwlock_t tree_lock; > unsigned int i_mmap_writable; > struct prio_tree_root i_mmap; > struct list_head i_mmap_nonlinear; > spinlock_t i_mmap_lock; > unsigned int truncate_count; > unsigned long nrpages; > unsigned long writeback_index; > const struct address_space_operations *a_ops; > unsigned long flags; > struct backing_dev_info *backing_dev_info; > spinlock_t private_lock; > struct list_head private_list; > struct address_space *assoc_mapping; >} __attribute__((aligned(sizeof(long)))); > > > > > > >struct block_device { > dev_t bd_dev; > struct inode * bd_inode; > int bd_openers; > struct mutex bd_mutex; > struct semaphore bd_mount_sem; > struct list_head bd_inodes; > void * bd_holder; > int bd_holders; > > struct list_head bd_holder_list; > > struct block_device * bd_contains; > unsigned bd_block_size; > struct hd_struct * bd_part; > > unsigned bd_part_count; > int bd_invalidated; > struct gendisk * bd_disk; > struct list_head bd_list; > struct backing_dev_info *bd_inode_backing_dev_info; > > > > > > > unsigned long bd_private; >}; ># 559 "include/linux/fs.h" >int mapping_tagged(struct address_space *mapping, int tag); > > > > >static inline __attribute__((always_inline)) int mapping_mapped(struct address_space *mapping) >{ > return !prio_tree_empty(&mapping->i_mmap) || > !list_empty(&mapping->i_mmap_nonlinear); >} > > > > > > > >static inline __attribute__((always_inline)) int mapping_writably_mapped(struct address_space *mapping) >{ > return mapping->i_mmap_writable != 0; >} ># 592 "include/linux/fs.h" >struct inode { > struct hlist_node i_hash; > struct list_head i_list; > struct list_head i_sb_list; > struct list_head i_dentry; > unsigned long i_ino; > atomic_t i_count; > unsigned int i_nlink; > uid_t i_uid; > gid_t i_gid; > dev_t i_rdev; > u64 i_version; > loff_t i_size; > > seqcount_t i_size_seqcount; > > struct timespec i_atime; > struct timespec i_mtime; > struct timespec i_ctime; > unsigned int i_blkbits; > blkcnt_t i_blocks; > unsigned short i_bytes; > umode_t i_mode; > spinlock_t i_lock; > struct mutex i_mutex; > struct rw_semaphore i_alloc_sem; > const struct inode_operations *i_op; > const struct file_operations *i_fop; > struct super_block *i_sb; > struct file_lock *i_flock; > struct address_space *i_mapping; > struct address_space i_data; > > struct dquot *i_dquot[2]; > > struct list_head i_devices; > union { > struct pipe_inode_info *i_pipe; > struct block_device *i_bdev; > struct cdev *i_cdev; > }; > int i_cindex; > > __u32 i_generation; > > > unsigned long i_dnotify_mask; > struct dnotify_struct *i_dnotify; > > > > struct list_head inotify_watches; > struct mutex inotify_mutex; > > > unsigned long i_state; > unsigned long dirtied_when; > > unsigned int i_flags; > > atomic_t i_writecount; > > void *i_security; > > void *i_private; >}; ># 670 "include/linux/fs.h" >enum inode_i_mutex_lock_class >{ > I_MUTEX_NORMAL, > I_MUTEX_PARENT, > I_MUTEX_CHILD, > I_MUTEX_XATTR, > I_MUTEX_QUOTA >}; > >extern void inode_double_lock(struct inode *inode1, struct inode *inode2); >extern void inode_double_unlock(struct inode *inode1, struct inode *inode2); ># 692 "include/linux/fs.h" >static inline __attribute__((always_inline)) loff_t i_size_read(const struct inode *inode) >{ > > loff_t i_size; > unsigned int seq; > > do { > seq = read_seqcount_begin(&inode->i_size_seqcount); > i_size = inode->i_size; > } while (read_seqcount_retry(&inode->i_size_seqcount, seq)); > return i_size; ># 713 "include/linux/fs.h" >} > > > > > > >static inline __attribute__((always_inline)) void i_size_write(struct inode *inode, loff_t i_size) >{ > > write_seqcount_begin(&inode->i_size_seqcount); > inode->i_size = i_size; > write_seqcount_end(&inode->i_size_seqcount); > > > > > > > >} > >static inline __attribute__((always_inline)) unsigned iminor(const struct inode *inode) >{ > return ((unsigned int) ((inode->i_rdev) & ((1U << 20) - 1))); >} > >static inline __attribute__((always_inline)) unsigned imajor(const struct inode *inode) >{ > return ((unsigned int) ((inode->i_rdev) >> 20)); >} > >extern struct block_device *I_BDEV(struct inode *inode); > >struct fown_struct { > rwlock_t lock; > struct pid *pid; > enum pid_type pid_type; > uid_t uid, euid; > int signum; >}; > > > > >struct file_ra_state { > unsigned long start; > unsigned int size; > unsigned int async_size; > > > unsigned int ra_pages; > int mmap_miss; > loff_t prev_pos; >}; > > > > >static inline __attribute__((always_inline)) int ra_has_index(struct file_ra_state *ra, unsigned long index) >{ > return (index >= ra->start && > index < ra->start + ra->size); >} > > > > >struct file { > > > > > union { > struct list_head fu_list; > struct rcu_head fu_rcuhead; > } f_u; > struct path f_path; > > > const struct file_operations *f_op; > atomic_t f_count; > unsigned int f_flags; > mode_t f_mode; > loff_t f_pos; > struct fown_struct f_owner; > unsigned int f_uid, f_gid; > struct file_ra_state f_ra; > > u64 f_version; > > void *f_security; > > > void *private_data; > > > > struct list_head f_ep_links; > spinlock_t f_ep_lock; > > struct address_space *f_mapping; > > unsigned long f_mnt_write_state; > >}; >extern spinlock_t files_lock; > > > > > > > >static inline __attribute__((always_inline)) void file_take_write(struct file *f) >{ > ({ int __ret_warn_on = !!(f->f_mnt_write_state != 0); if (__builtin_expect(!!(__ret_warn_on), 0)) warn_on_slowpath("include/linux/fs.h", 829); __builtin_expect(!!(__ret_warn_on), 0); }); > f->f_mnt_write_state = 1; >} >static inline __attribute__((always_inline)) void file_release_write(struct file *f) >{ > f->f_mnt_write_state |= 2; >} >static inline __attribute__((always_inline)) void file_reset_write(struct file *f) >{ > f->f_mnt_write_state = 0; >} >static inline __attribute__((always_inline)) void file_check_state(struct file *f) >{ > > > > > ({ int __ret_warn_on = !!(f->f_mnt_write_state == 1); if (__builtin_expect(!!(__ret_warn_on), 0)) warn_on_slowpath("include/linux/fs.h", 846); __builtin_expect(!!(__ret_warn_on), 0); }); > ({ int __ret_warn_on = !!(f->f_mnt_write_state == 2); if (__builtin_expect(!!(__ret_warn_on), 0)) warn_on_slowpath("include/linux/fs.h", 847); __builtin_expect(!!(__ret_warn_on), 0); }); >} >static inline __attribute__((always_inline)) int file_check_writeable(struct file *f) >{ > if (f->f_mnt_write_state == 1) > return 0; > printk("<4>" "writeable file with no " > "mnt_want_write()\n"); > ({ int __ret_warn_on = !!(1); if (__builtin_expect(!!(__ret_warn_on), 0)) warn_on_slowpath("include/linux/fs.h", 855); __builtin_expect(!!(__ret_warn_on), 0); }); > return -22; >} ># 894 "include/linux/fs.h" >typedef struct files_struct *fl_owner_t; > >struct file_lock_operations { > void (*fl_insert)(struct file_lock *); > void (*fl_remove)(struct file_lock *); > void (*fl_copy_lock)(struct file_lock *, struct file_lock *); > void (*fl_release_private)(struct file_lock *); >}; > >struct lock_manager_operations { > int (*fl_compare_owner)(struct file_lock *, struct file_lock *); > void (*fl_notify)(struct file_lock *); > int (*fl_grant)(struct file_lock *, struct file_lock *, int); > void (*fl_copy_lock)(struct file_lock *, struct file_lock *); > void (*fl_release_private)(struct file_lock *); > void (*fl_break)(struct file_lock *); > int (*fl_mylease)(struct file_lock *, struct file_lock *); > int (*fl_change)(struct file_lock **, int); >}; > > ># 1 "include/linux/nfs_fs_i.h" 1 > > > > > ># 1 "include/linux/nfs.h" 1 ># 39 "include/linux/nfs.h" > enum nfs_stat { > NFS_OK = 0, > NFSERR_PERM = 1, > NFSERR_NOENT = 2, > NFSERR_IO = 5, > NFSERR_NXIO = 6, > NFSERR_EAGAIN = 11, > NFSERR_ACCES = 13, > NFSERR_EXIST = 17, > NFSERR_XDEV = 18, > NFSERR_NODEV = 19, > NFSERR_NOTDIR = 20, > NFSERR_ISDIR = 21, > NFSERR_INVAL = 22, > NFSERR_FBIG = 27, > NFSERR_NOSPC = 28, > NFSERR_ROFS = 30, > NFSERR_MLINK = 31, > NFSERR_OPNOTSUPP = 45, > NFSERR_NAMETOOLONG = 63, > NFSERR_NOTEMPTY = 66, > NFSERR_DQUOT = 69, > NFSERR_STALE = 70, > NFSERR_REMOTE = 71, > NFSERR_WFLUSH = 99, > NFSERR_BADHANDLE = 10001, > NFSERR_NOT_SYNC = 10002, > NFSERR_BAD_COOKIE = 10003, > NFSERR_NOTSUPP = 10004, > NFSERR_TOOSMALL = 10005, > NFSERR_SERVERFAULT = 10006, > NFSERR_BADTYPE = 10007, > NFSERR_JUKEBOX = 10008, > NFSERR_SAME = 10009, > NFSERR_DENIED = 10010, > NFSERR_EXPIRED = 10011, > NFSERR_LOCKED = 10012, > NFSERR_GRACE = 10013, > NFSERR_FHEXPIRED = 10014, > NFSERR_SHARE_DENIED = 10015, > NFSERR_WRONGSEC = 10016, > NFSERR_CLID_INUSE = 10017, > NFSERR_RESOURCE = 10018, > NFSERR_MOVED = 10019, > NFSERR_NOFILEHANDLE = 10020, > NFSERR_MINOR_VERS_MISMATCH = 10021, > NFSERR_STALE_CLIENTID = 10022, > NFSERR_STALE_STATEID = 10023, > NFSERR_OLD_STATEID = 10024, > NFSERR_BAD_STATEID = 10025, > NFSERR_BAD_SEQID = 10026, > NFSERR_NOT_SAME = 10027, > NFSERR_LOCK_RANGE = 10028, > NFSERR_SYMLINK = 10029, > NFSERR_RESTOREFH = 10030, > NFSERR_LEASE_MOVED = 10031, > NFSERR_ATTRNOTSUPP = 10032, > NFSERR_NO_GRACE = 10033, > NFSERR_RECLAIM_BAD = 10034, > NFSERR_RECLAIM_CONFLICT = 10035, > NFSERR_BAD_XDR = 10036, > NFSERR_LOCKS_HELD = 10037, > NFSERR_OPENMODE = 10038, > NFSERR_BADOWNER = 10039, > NFSERR_BADCHAR = 10040, > NFSERR_BADNAME = 10041, > NFSERR_BAD_RANGE = 10042, > NFSERR_LOCK_NOTSUPP = 10043, > NFSERR_OP_ILLEGAL = 10044, > NFSERR_DEADLOCK = 10045, > NFSERR_FILE_OPEN = 10046, > NFSERR_ADMIN_REVOKED = 10047, > NFSERR_CB_PATH_DOWN = 10048, > NFSERR_REPLAY_ME = 10049 >}; > > > >enum nfs_ftype { > NFNON = 0, > NFREG = 1, > NFDIR = 2, > NFBLK = 3, > NFCHR = 4, > NFLNK = 5, > NFSOCK = 6, > NFBAD = 7, > NFFIFO = 8 >}; > > ># 1 "include/linux/sunrpc/msg_prot.h" 1 ># 18 "include/linux/sunrpc/msg_prot.h" >typedef u32 rpc_authflavor_t; > >enum rpc_auth_flavors { > RPC_AUTH_NULL = 0, > RPC_AUTH_UNIX = 1, > RPC_AUTH_SHORT = 2, > RPC_AUTH_DES = 3, > RPC_AUTH_KRB = 4, > RPC_AUTH_GSS = 6, > RPC_AUTH_MAXFLAVOR = 8, > > RPC_AUTH_GSS_KRB5 = 390003, > RPC_AUTH_GSS_KRB5I = 390004, > RPC_AUTH_GSS_KRB5P = 390005, > RPC_AUTH_GSS_LKEY = 390006, > RPC_AUTH_GSS_LKEYI = 390007, > RPC_AUTH_GSS_LKEYP = 390008, > RPC_AUTH_GSS_SPKM = 390009, > RPC_AUTH_GSS_SPKMI = 390010, > RPC_AUTH_GSS_SPKMP = 390011, >}; > > > > >enum rpc_msg_type { > RPC_CALL = 0, > RPC_REPLY = 1 >}; > >enum rpc_reply_stat { > RPC_MSG_ACCEPTED = 0, > RPC_MSG_DENIED = 1 >}; > >enum rpc_accept_stat { > RPC_SUCCESS = 0, > RPC_PROG_UNAVAIL = 1, > RPC_PROG_MISMATCH = 2, > RPC_PROC_UNAVAIL = 3, > RPC_GARBAGE_ARGS = 4, > RPC_SYSTEM_ERR = 5, > > RPC_DROP_REPLY = 60000, >}; > >enum rpc_reject_stat { > RPC_MISMATCH = 0, > RPC_AUTH_ERROR = 1 >}; > >enum rpc_auth_stat { > RPC_AUTH_OK = 0, > RPC_AUTH_BADCRED = 1, > RPC_AUTH_REJECTEDCRED = 2, > RPC_AUTH_BADVERF = 3, > RPC_AUTH_REJECTEDVERF = 4, > RPC_AUTH_TOOWEAK = 5, > > RPCSEC_GSS_CREDPROBLEM = 13, > RPCSEC_GSS_CTXPROBLEM = 14 >}; ># 102 "include/linux/sunrpc/msg_prot.h" >typedef __be32 rpc_fraghdr; ># 131 "include/linux/nfs.h" 2 > > > > > > >struct nfs_fh { > unsigned short size; > unsigned char data[128]; >}; > > > > > >static inline __attribute__((always_inline)) int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b) >{ > return a->size != b->size || __builtin_memcmp(a->data, b->data, a->size) != 0; >} > >static inline __attribute__((always_inline)) void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source) >{ > target->size = source->size; > (__builtin_constant_p(source->size) ? __constant_memcpy((target->data),(source->data),(source->size)) : __memcpy((target->data),(source->data),(source->size))); >} ># 165 "include/linux/nfs.h" >enum nfs3_stable_how { > NFS_UNSTABLE = 0, > NFS_DATA_SYNC = 1, > NFS_FILE_SYNC = 2 >}; ># 7 "include/linux/nfs_fs_i.h" 2 > >struct nlm_lockowner; > > > > >struct nfs_lock_info { > u32 state; > struct nlm_lockowner *owner; > struct list_head list; >}; > >struct nfs4_lock_state; >struct nfs4_lock_info { > struct nfs4_lock_state *owner; >}; ># 916 "include/linux/fs.h" 2 > >struct file_lock { > struct file_lock *fl_next; > struct list_head fl_link; > struct list_head fl_block; > fl_owner_t fl_owner; > unsigned int fl_pid; > struct pid *fl_nspid; > wait_queue_head_t fl_wait; > struct file *fl_file; > unsigned char fl_flags; > unsigned char fl_type; > loff_t fl_start; > loff_t fl_end; > > struct fasync_struct * fl_fasync; > unsigned long fl_break_time; > > struct file_lock_operations *fl_ops; > struct lock_manager_operations *fl_lmops; > union { > struct nfs_lock_info nfs_fl; > struct nfs4_lock_info nfs4_fl; > struct { > struct list_head link; > int state; > } afs; > } fl_u; >}; ># 953 "include/linux/fs.h" ># 1 "include/linux/fcntl.h" 1 > > > ># 1 "include/asm/fcntl.h" 1 ># 1 "include/asm-generic/fcntl.h" 1 ># 117 "include/asm-generic/fcntl.h" >struct flock { > short l_type; > short l_whence; > off_t l_start; > off_t l_len; > pid_t l_pid; > >}; ># 140 "include/asm-generic/fcntl.h" >struct flock64 { > short l_type; > short l_whence; > loff_t l_start; > loff_t l_len; > pid_t l_pid; > >}; ># 1 "include/asm/fcntl.h" 2 ># 5 "include/linux/fcntl.h" 2 ># 954 "include/linux/fs.h" 2 > >extern int fcntl_getlk(struct file *, struct flock *); >extern int fcntl_setlk(unsigned int, struct file *, unsigned int, > struct flock *); > > >extern int fcntl_getlk64(struct file *, struct flock64 *); >extern int fcntl_setlk64(unsigned int, struct file *, unsigned int, > struct flock64 *); > > >extern void send_sigio(struct fown_struct *fown, int fd, int band); >extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); >extern int fcntl_getlease(struct file *filp); > > >extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset, > loff_t endbyte, unsigned int flags); > > >extern void locks_init_lock(struct file_lock *); >extern void locks_copy_lock(struct file_lock *, struct file_lock *); >extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); >extern void locks_remove_posix(struct file *, fl_owner_t); >extern void locks_remove_flock(struct file *); >extern void posix_test_lock(struct file *, struct file_lock *); >extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); >extern int posix_lock_file_wait(struct file *, struct file_lock *); >extern int posix_unblock_lock(struct file *, struct file_lock *); >extern int vfs_test_lock(struct file *, struct file_lock *); >extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *); >extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); >extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); >extern int __break_lease(struct inode *inode, unsigned int flags); >extern void lease_get_mtime(struct inode *, struct timespec *time); >extern int generic_setlease(struct file *, long, struct file_lock **); >extern int vfs_setlease(struct file *, long, struct file_lock **); >extern int lease_modify(struct file_lock **, int); >extern int lock_may_read(struct inode *, loff_t start, unsigned long count); >extern int lock_may_write(struct inode *, loff_t start, unsigned long count); >extern struct seq_operations locks_seq_operations; > >struct fasync_struct { > int magic; > int fa_fd; > struct fasync_struct *fa_next; > struct file *fa_file; >}; > > > > >extern int fasync_helper(int, struct file *, int, struct fasync_struct **); > >extern void kill_fasync(struct fasync_struct **, int, int); > >extern void __kill_fasync(struct fasync_struct *, int, int); > >extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); >extern int f_setown(struct file *filp, unsigned long arg, int force); >extern void f_delown(struct file *filp); >extern pid_t f_getown(struct file *filp); >extern int send_sigurg(struct fown_struct *fown); ># 1026 "include/linux/fs.h" >extern struct list_head super_blocks; >extern spinlock_t sb_lock; > > >struct super_block { > struct list_head s_list; > dev_t s_dev; > unsigned long s_blocksize; > unsigned char s_blocksize_bits; > unsigned char s_dirt; > unsigned long long s_maxbytes; > struct file_system_type *s_type; > const struct super_operations *s_op; > struct dquot_operations *dq_op; > struct quotactl_ops *s_qcop; > const struct export_operations *s_export_op; > unsigned long s_flags; > unsigned long s_magic; > struct dentry *s_root; > struct rw_semaphore s_umount; > struct mutex s_lock; > int s_count; > int s_syncing; > int s_need_sync_fs; > atomic_t s_active; > > void *s_security; > > struct xattr_handler **s_xattr; > > struct list_head s_inodes; > struct list_head s_dirty; > struct list_head s_io; > struct list_head s_more_io; > struct hlist_head s_anon; > struct list_head s_files; > > struct block_device *s_bdev; > struct mtd_info *s_mtd; > struct list_head s_instances; > struct quota_info s_dquot; > > int s_frozen; > wait_queue_head_t s_wait_unfrozen; > > char s_id[32]; > > void *s_fs_info; > > > > > > struct mutex s_vfs_rename_mutex; > > > > u32 s_time_gran; > > > > > > char *s_subtype; > > > > > > char *s_options; >}; > >extern struct timespec current_fs_time(struct super_block *sb); > > > > >enum { > SB_UNFROZEN = 0, > SB_FREEZE_WRITE = 1, > SB_FREEZE_TRANS = 2, >}; ># 1120 "include/linux/fs.h" >extern void lock_super(struct super_block *); >extern void unlock_super(struct super_block *); > > > > >extern int vfs_permission(struct nameidata *, int); >extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); >extern int vfs_mkdir(struct inode *, struct dentry *, int); >extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); >extern int vfs_symlink(struct inode *, struct dentry *, const char *, int); >extern int vfs_link(struct dentry *, struct inode *, struct dentry *); >extern int vfs_rmdir(struct inode *, struct dentry *); >extern int vfs_unlink(struct inode *, struct dentry *); >extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); > > > > >extern void dentry_unhash(struct dentry *dentry); > > > > >extern int file_permission(struct file *, int); ># 1165 "include/linux/fs.h" >int generic_osync_inode(struct inode *, struct address_space *, int); > > > > > > > >typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); > >struct block_device_operations { > int (*open) (struct inode *, struct file *); > int (*release) (struct inode *, struct file *); > int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); > long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); > long (*compat_ioctl) (struct file *, unsigned, unsigned long); > int (*direct_access) (struct block_device *, sector_t, > void **, unsigned long *); > int (*media_changed) (struct gendisk *); > int (*revalidate_disk) (struct gendisk *); > int (*getgeo)(struct block_device *, struct hd_geometry *); > struct module *owner; >}; ># 1198 "include/linux/fs.h" >typedef struct { > size_t written; > size_t count; > union { > char * buf; > void *data; > } arg; > int error; >} read_descriptor_t; > >typedef int (*read_actor_t)(read_descriptor_t *, struct page *, unsigned long, unsigned long); ># 1221 "include/linux/fs.h" >struct file_operations { > struct module *owner; > loff_t (*llseek) (struct file *, loff_t, int); > ssize_t (*read) (struct file *, char *, size_t, loff_t *); > ssize_t (*write) (struct file *, const char *, size_t, loff_t *); > ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); > ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); > int (*readdir) (struct file *, void *, filldir_t); > unsigned int (*poll) (struct file *, struct poll_table_struct *); > int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); > long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); > long (*compat_ioctl) (struct file *, unsigned int, unsigned long); > int (*mmap) (struct file *, struct vm_area_struct *); > int (*open) (struct inode *, struct file *); > int (*flush) (struct file *, fl_owner_t id); > int (*release) (struct inode *, struct file *); > int (*fsync) (struct file *, struct dentry *, int datasync); > int (*aio_fsync) (struct kiocb *, int datasync); > int (*fasync) (int, struct file *, int); > int (*lock) (struct file *, int, struct file_lock *); > ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); > unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); > int (*check_flags)(int); > int (*dir_notify)(struct file *filp, unsigned long arg); > int (*flock) (struct file *, int, struct file_lock *); > ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); > ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); > int (*setlease)(struct file *, long, struct file_lock **); >}; > >struct inode_operations { > int (*create) (struct inode *,struct dentry *,int, struct nameidata *); > struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); > int (*link) (struct dentry *,struct inode *,struct dentry *); > int (*unlink) (struct inode *,struct dentry *); > int (*symlink) (struct inode *,struct dentry *,const char *); > int (*mkdir) (struct inode *,struct dentry *,int); > int (*rmdir) (struct inode *,struct dentry *); > int (*mknod) (struct inode *,struct dentry *,int,dev_t); > int (*rename) (struct inode *, struct dentry *, > struct inode *, struct dentry *); > int (*readlink) (struct dentry *, char *,int); > void * (*follow_link) (struct dentry *, struct nameidata *); > void (*put_link) (struct dentry *, struct nameidata *, void *); > void (*truncate) (struct inode *); > int (*permission) (struct inode *, int, struct nameidata *); > int (*setattr) (struct dentry *, struct iattr *); > int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); > int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); > ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); > ssize_t (*listxattr) (struct dentry *, char *, size_t); > int (*removexattr) (struct dentry *, const char *); > void (*truncate_range)(struct inode *, loff_t, loff_t); > long (*fallocate)(struct inode *inode, int mode, loff_t offset, > loff_t len); >}; > >struct seq_file; > >ssize_t rw_copy_check_uvector(int type, const struct iovec * uvector, > unsigned long nr_segs, unsigned long fast_segs, > struct iovec *fast_pointer, > struct iovec **ret_pointer); > >extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *); >extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *); >extern ssize_t vfs_readv(struct file *, const struct iovec *, > unsigned long, loff_t *); >extern ssize_t vfs_writev(struct file *, const struct iovec *, > unsigned long, loff_t *); > >struct super_operations { > struct inode *(*alloc_inode)(struct super_block *sb); > void (*destroy_inode)(struct inode *); > > void (*dirty_inode) (struct inode *); > int (*write_inode) (struct inode *, int); > void (*drop_inode) (struct inode *); > void (*delete_inode) (struct inode *); > void (*put_super) (struct super_block *); > void (*write_super) (struct super_block *); > int (*sync_fs)(struct super_block *sb, int wait); > void (*write_super_lockfs) (struct super_block *); > void (*unlockfs) (struct super_block *); > int (*statfs) (struct dentry *, struct kstatfs *); > int (*remount_fs) (struct super_block *, int *, char *); > void (*clear_inode) (struct inode *); > void (*umount_begin) (struct super_block *); > > int (*show_options)(struct seq_file *, struct vfsmount *); > int (*show_stats)(struct seq_file *, struct vfsmount *); > > ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); > ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); > >}; ># 1385 "include/linux/fs.h" >extern void __mark_inode_dirty(struct inode *, int); >static inline __attribute__((always_inline)) void mark_inode_dirty(struct inode *inode) >{ > __mark_inode_dirty(inode, (1 | 2 | 4)); >} > >static inline __attribute__((always_inline)) void mark_inode_dirty_sync(struct inode *inode) >{ > __mark_inode_dirty(inode, 1); >} ># 1404 "include/linux/fs.h" >static inline __attribute__((always_inline)) void inc_nlink(struct inode *inode) >{ > inode->i_nlink++; >} > >static inline __attribute__((always_inline)) void inode_inc_link_count(struct inode *inode) >{ > inc_nlink(inode); > mark_inode_dirty(inode); >} ># 1426 "include/linux/fs.h" >static inline __attribute__((always_inline)) void drop_nlink(struct inode *inode) >{ > inode->i_nlink--; >} ># 1439 "include/linux/fs.h" >static inline __attribute__((always_inline)) void clear_nlink(struct inode *inode) >{ > inode->i_nlink = 0; >} > >static inline __attribute__((always_inline)) void inode_dec_link_count(struct inode *inode) >{ > drop_nlink(inode); > mark_inode_dirty(inode); >} ># 1458 "include/linux/fs.h" >static inline __attribute__((always_inline)) void inode_inc_iversion(struct inode *inode) >{ > _spin_lock(&inode->i_lock); > inode->i_version++; > _spin_unlock(&inode->i_lock); >} > >extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); >static inline __attribute__((always_inline)) void file_accessed(struct file *file) >{ > if (!(file->f_flags & 01000000)) > touch_atime(file->f_path.mnt, file->f_path.dentry); >} > >int sync_inode(struct inode *inode, struct writeback_control *wbc); > >struct file_system_type { > const char *name; > int fs_flags; > int (*get_sb) (struct file_system_type *, int, > const char *, void *, struct vfsmount *); > void (*kill_sb) (struct super_block *); > struct module *owner; > struct file_system_type * next; > struct list_head fs_supers; > > struct lock_class_key s_lock_key; > struct lock_class_key s_umount_key; > > struct lock_class_key i_lock_key; > struct lock_class_key i_mutex_key; > struct lock_class_key i_mutex_dir_key; > struct lock_class_key i_alloc_sem_key; >}; > >extern int get_sb_bdev(struct file_system_type *fs_type, > int flags, const char *dev_name, void *data, > int (*fill_super)(struct super_block *, void *, int), > struct vfsmount *mnt); >extern int get_sb_single(struct file_system_type *fs_type, > int flags, void *data, > int (*fill_super)(struct super_block *, void *, int), > struct vfsmount *mnt); >extern int get_sb_nodev(struct file_system_type *fs_type, > int flags, void *data, > int (*fill_super)(struct super_block *, void *, int), > struct vfsmount *mnt); >void generic_shutdown_super(struct super_block *sb); >void kill_block_super(struct super_block *sb); >void kill_anon_super(struct super_block *sb); >void kill_litter_super(struct super_block *sb); >void deactivate_super(struct super_block *sb); >int set_anon_super(struct super_block *s, void *data); >struct super_block *sget(struct file_system_type *type, > int (*test)(struct super_block *,void *), > int (*set)(struct super_block *,void *), > void *data); >extern int get_sb_pseudo(struct file_system_type *, char *, > const struct super_operations *ops, unsigned long, > struct vfsmount *mnt); >extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); >int __put_super_and_need_restart(struct super_block *sb); >void unnamed_dev_init(void); > > > > > > > >extern int register_filesystem(struct file_system_type *); >extern int unregister_filesystem(struct file_system_type *); >extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data); > >extern int may_umount_tree(struct vfsmount *); >extern int may_umount(struct vfsmount *); >extern long do_mount(char *, char *, char *, unsigned long, void *); >extern struct vfsmount *collect_mounts(struct vfsmount *, struct dentry *); >extern void drop_collected_mounts(struct vfsmount *); > >extern int vfs_statfs(struct dentry *, struct kstatfs *); > > >extern struct kobject *fs_kobj; > > > > >extern int locks_mandatory_locked(struct inode *); >extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); > > > > > > >static inline __attribute__((always_inline)) int __mandatory_lock(struct inode *ino) >{ > return (ino->i_mode & (0002000 | 00010)) == 0002000; >} > > > > > > >static inline __attribute__((always_inline)) int mandatory_lock(struct inode *ino) >{ > return ((ino)->i_sb->s_flags & (64)) && __mandatory_lock(ino); >} > >static inline __attribute__((always_inline)) int locks_verify_locked(struct inode *inode) >{ > if (mandatory_lock(inode)) > return locks_mandatory_locked(inode); > return 0; >} > >extern int rw_verify_area(int, struct file *, loff_t *, size_t); > >static inline __attribute__((always_inline)) int locks_verify_truncate(struct inode *inode, > struct file *filp, > loff_t size) >{ > if (inode->i_flock && mandatory_lock(inode)) > return locks_mandatory_area( > 2, inode, filp, > size < inode->i_size ? size : inode->i_size, > (size < inode->i_size ? inode->i_size - size > : size - inode->i_size) > ); > return 0; >} > >static inline __attribute__((always_inline)) int break_lease(struct inode *inode, unsigned int mode) >{ > if (inode->i_flock) > return __break_lease(inode, mode); > return 0; >} > > > >extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, > struct file *filp); >extern long do_sys_open(int dfd, const char *filename, int flags, > int mode); >extern struct file *filp_open(const char *, int, int); >extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); >extern int filp_close(struct file *, fl_owner_t id); >extern char * getname(const char *); > > >extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) vfs_caches_init_early(void); >extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) vfs_caches_init(unsigned long); > >extern struct kmem_cache *names_cachep; > > > > > > >extern void putname(const char *name); > > > >extern int register_blkdev(unsigned int, const char *); >extern void unregister_blkdev(unsigned int, const char *); >extern struct block_device *bdget(dev_t); >extern void bd_set_size(struct block_device *, loff_t size); >extern void bd_forget(struct inode *inode); >extern void bdput(struct block_device *); >extern struct block_device *open_by_devnum(dev_t, unsigned); > > > >extern const struct file_operations def_blk_fops; >extern const struct file_operations def_chr_fops; >extern const struct file_operations bad_sock_fops; >extern const struct file_operations def_fifo_fops; > >extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); >extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); >extern int blkdev_driver_ioctl(struct inode *inode, struct file *file, > struct gendisk *disk, unsigned cmd, > unsigned long arg); >extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); >extern int blkdev_get(struct block_device *, mode_t, unsigned); >extern int blkdev_put(struct block_device *); >extern int bd_claim(struct block_device *, void *); >extern void bd_release(struct block_device *); > >extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *); >extern void bd_release_from_disk(struct block_device *, struct gendisk *); ># 1661 "include/linux/fs.h" >extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); >extern int register_chrdev_region(dev_t, unsigned, const char *); >extern int register_chrdev(unsigned int, const char *, > const struct file_operations *); >extern void unregister_chrdev(unsigned int, const char *); >extern void unregister_chrdev_region(dev_t, unsigned); >extern void chrdev_show(struct seq_file *,off_t); > > > > > > >extern const char *__bdevname(dev_t, char *buffer); >extern const char *bdevname(struct block_device *bdev, char *buffer); >extern struct block_device *lookup_bdev(const char *); >extern struct block_device *open_bdev_excl(const char *, int, void *); >extern void close_bdev_excl(struct block_device *); >extern void blkdev_show(struct seq_file *,off_t); > > > > >extern void init_special_inode(struct inode *, umode_t, dev_t); > > >extern void make_bad_inode(struct inode *); >extern int is_bad_inode(struct inode *); > >extern const struct file_operations read_fifo_fops; >extern const struct file_operations write_fifo_fops; >extern const struct file_operations rdwr_fifo_fops; > >extern int fs_may_remount_ro(struct super_block *); ># 1707 "include/linux/fs.h" >extern int check_disk_change(struct block_device *); >extern int __invalidate_device(struct block_device *); >extern int invalidate_partition(struct gendisk *, int); > >extern int invalidate_inodes(struct super_block *); >unsigned long __invalidate_mapping_pages(struct address_space *mapping, > unsigned long start, unsigned long end, > bool be_atomic); >unsigned long invalidate_mapping_pages(struct address_space *mapping, > unsigned long start, unsigned long end); > >static inline __attribute__((always_inline)) unsigned long >invalidate_inode_pages(struct address_space *mapping) >{ > return invalidate_mapping_pages(mapping, 0, ~0UL); >} > >static inline __attribute__((always_inline)) void invalidate_remote_inode(struct inode *inode) >{ > if ((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) || > (((inode->i_mode) & 00170000) == 0120000)) > invalidate_mapping_pages(inode->i_mapping, 0, -1); >} >extern int invalidate_inode_pages2(struct address_space *mapping); >extern int invalidate_inode_pages2_range(struct address_space *mapping, > unsigned long start, unsigned long end); >extern int write_inode_now(struct inode *, int); >extern int filemap_fdatawrite(struct address_space *); >extern int filemap_flush(struct address_space *); >extern int filemap_fdatawait(struct address_space *); >extern int filemap_write_and_wait(struct address_space *mapping); >extern int filemap_write_and_wait_range(struct address_space *mapping, > loff_t lstart, loff_t lend); >extern int wait_on_page_writeback_range(struct address_space *mapping, > unsigned long start, unsigned long end); >extern int __filemap_fdatawrite_range(struct address_space *mapping, > loff_t start, loff_t end, int sync_mode); > >extern long do_fsync(struct file *file, int datasync); >extern void sync_supers(void); >extern void sync_filesystems(int wait); >extern void __fsync_super(struct super_block *sb); >extern void emergency_sync(void); >extern void emergency_remount(void); >extern int do_remount_sb(struct super_block *sb, int flags, > void *data, int force); > >extern sector_t bmap(struct inode *, sector_t); > >extern int notify_change(struct dentry *, struct iattr *); >extern int permission(struct inode *, int, struct nameidata *); >extern int generic_permission(struct inode *, int, > int (*check_acl)(struct inode *, int)); > >extern int get_write_access(struct inode *); >extern int deny_write_access(struct file *); >static inline __attribute__((always_inline)) void put_write_access(struct inode * inode) >{ > atomic_dec(&inode->i_writecount); >} >static inline __attribute__((always_inline)) void allow_write_access(struct file *file) >{ > if (file) > atomic_inc(&file->f_path.dentry->d_inode->i_writecount); >} >extern int do_pipe(int *); >extern struct file *create_read_pipe(struct file *f); >extern struct file *create_write_pipe(void); >extern void free_write_pipe(struct file *); > >extern struct file *do_filp_open(int dfd, const char *pathname, > int open_flag, int mode); >extern int may_open(struct nameidata *, int, int); > >extern int kernel_read(struct file *, unsigned long, char *, unsigned long); >extern struct file * open_exec(const char *); > > >extern int is_subdir(struct dentry *, struct dentry *); >extern ino_t find_inode_number(struct dentry *, struct qstr *); > ># 1 "include/linux/err.h" 1 > > > > > ># 1 "include/asm/errno.h" 1 ># 7 "include/linux/err.h" 2 ># 22 "include/linux/err.h" >static inline __attribute__((always_inline)) void *ERR_PTR(long error) >{ > return (void *) error; >} > >static inline __attribute__((always_inline)) long PTR_ERR(const void *ptr) >{ > return (long) ptr; >} > >static inline __attribute__((always_inline)) long IS_ERR(const void *ptr) >{ > return __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0); >} ># 44 "include/linux/err.h" >static inline __attribute__((always_inline)) void *ERR_CAST(const void *ptr) >{ > > return (void *) ptr; >} ># 1789 "include/linux/fs.h" 2 > > >extern loff_t default_llseek(struct file *file, loff_t offset, int origin); > >extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); > >extern void inode_init_once(struct inode *); >extern void iput(struct inode *); >extern struct inode * igrab(struct inode *); >extern ino_t iunique(struct super_block *, ino_t); >extern int inode_needs_sync(struct inode *inode); >extern void generic_delete_inode(struct inode *inode); >extern void generic_drop_inode(struct inode *inode); > >extern struct inode *ilookup5_nowait(struct super_block *sb, > unsigned long hashval, int (*test)(struct inode *, void *), > void *data); >extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, > int (*test)(struct inode *, void *), void *data); >extern struct inode *ilookup(struct super_block *sb, unsigned long ino); > >extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); >extern struct inode * iget_locked(struct super_block *, unsigned long); >extern void unlock_new_inode(struct inode *); > >extern void __iget(struct inode * inode); >extern void iget_failed(struct inode *); >extern void clear_inode(struct inode *); >extern void destroy_inode(struct inode *); >extern struct inode *new_inode(struct super_block *); >extern int should_remove_suid(struct dentry *); >extern int remove_suid(struct dentry *); > >extern void __insert_inode_hash(struct inode *, unsigned long hashval); >extern void remove_inode_hash(struct inode *); >static inline __attribute__((always_inline)) void insert_inode_hash(struct inode *inode) { > __insert_inode_hash(inode, inode->i_ino); >} > >extern struct file * get_empty_filp(void); >extern void file_move(struct file *f, struct list_head *list); >extern void file_kill(struct file *f); > >struct bio; >extern void submit_bio(int, struct bio *); >extern int bdev_read_only(struct block_device *); > >extern int set_blocksize(struct block_device *, int); >extern int sb_set_blocksize(struct super_block *, int); >extern int sb_min_blocksize(struct super_block *, int); >extern int sb_has_dirty_inodes(struct super_block *); > >extern int generic_file_mmap(struct file *, struct vm_area_struct *); >extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); >extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); >int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); >extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); >extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); >extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, > unsigned long, loff_t); >extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, > unsigned long *, loff_t, loff_t *, size_t, size_t); >extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, > unsigned long, loff_t, loff_t *, size_t, ssize_t); >extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos); >extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos); >extern int generic_segment_checks(const struct iovec *iov, > unsigned long *nr_segs, size_t *count, int access_flags); > > >extern ssize_t generic_file_splice_read(struct file *, loff_t *, > struct pipe_inode_info *, size_t, unsigned int); >extern ssize_t generic_file_splice_write(struct pipe_inode_info *, > struct file *, loff_t *, size_t, unsigned int); >extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *, > struct file *, loff_t *, size_t, unsigned int); >extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, > struct file *out, loff_t *, size_t len, unsigned int flags); >extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, > size_t len, unsigned int flags); > >extern void >file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); >extern loff_t no_llseek(struct file *file, loff_t offset, int origin); >extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); >extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); >extern int generic_file_open(struct inode * inode, struct file * filp); >extern int nonseekable_open(struct inode * inode, struct file * filp); > > >extern ssize_t xip_file_read(struct file *filp, char *buf, size_t len, > loff_t *ppos); >extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); >extern ssize_t xip_file_write(struct file *filp, const char *buf, > size_t len, loff_t *ppos); >extern int xip_truncate_page(struct address_space *mapping, loff_t from); ># 1893 "include/linux/fs.h" >ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, > struct block_device *bdev, const struct iovec *iov, loff_t offset, > unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, > int lock_type); > >enum { > DIO_LOCKING = 1, > DIO_NO_LOCKING, > DIO_OWN_LOCKING, >}; > >static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, > struct inode *inode, struct block_device *bdev, const struct iovec *iov, > loff_t offset, unsigned long nr_segs, get_block_t get_block, > dio_iodone_t end_io) >{ > return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, > nr_segs, get_block, end_io, DIO_LOCKING); >} > >static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, > struct inode *inode, struct block_device *bdev, const struct iovec *iov, > loff_t offset, unsigned long nr_segs, get_block_t get_block, > dio_iodone_t end_io) >{ > return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, > nr_segs, get_block, end_io, DIO_NO_LOCKING); >} > >static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, > struct inode *inode, struct block_device *bdev, const struct iovec *iov, > loff_t offset, unsigned long nr_segs, get_block_t get_block, > dio_iodone_t end_io) >{ > return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, > nr_segs, get_block, end_io, DIO_OWN_LOCKING); >} > > >extern const struct file_operations generic_ro_fops; > > > >extern int vfs_readlink(struct dentry *, char *, int, const char *); >extern int vfs_follow_link(struct nameidata *, const char *); >extern int page_readlink(struct dentry *, char *, int); >extern void *page_follow_link_light(struct dentry *, struct nameidata *); >extern void page_put_link(struct dentry *, struct nameidata *, void *); >extern int __page_symlink(struct inode *inode, const char *symname, int len, > gfp_t gfp_mask); >extern int page_symlink(struct inode *inode, const char *symname, int len); >extern const struct inode_operations page_symlink_inode_operations; >extern int generic_readlink(struct dentry *, char *, int); >extern void generic_fillattr(struct inode *, struct kstat *); >extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); >void inode_add_bytes(struct inode *inode, loff_t bytes); >void inode_sub_bytes(struct inode *inode, loff_t bytes); >loff_t inode_get_bytes(struct inode *inode); >void inode_set_bytes(struct inode *inode, loff_t bytes); > >extern int vfs_readdir(struct file *, filldir_t, void *); > >extern int vfs_stat(char *, struct kstat *); >extern int vfs_lstat(char *, struct kstat *); >extern int vfs_stat_fd(int dfd, char *, struct kstat *); >extern int vfs_lstat_fd(int dfd, char *, struct kstat *); >extern int vfs_fstat(unsigned int, struct kstat *); > >extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, > unsigned long arg); > >extern void get_filesystem(struct file_system_type *fs); >extern void put_filesystem(struct file_system_type *fs); >extern struct file_system_type *get_fs_type(const char *name); >extern struct super_block *get_super(struct block_device *); >extern struct super_block *user_get_super(dev_t); >extern void drop_super(struct super_block *sb); > >extern int dcache_dir_open(struct inode *, struct file *); >extern int dcache_dir_close(struct inode *, struct file *); >extern loff_t dcache_dir_lseek(struct file *, loff_t, int); >extern int dcache_readdir(struct file *, void *, filldir_t); >extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); >extern int simple_statfs(struct dentry *, struct kstatfs *); >extern int simple_link(struct dentry *, struct inode *, struct dentry *); >extern int simple_unlink(struct inode *, struct dentry *); >extern int simple_rmdir(struct inode *, struct dentry *); >extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); >extern int simple_sync_file(struct file *, struct dentry *, int); >extern int simple_empty(struct dentry *); >extern int simple_readpage(struct file *file, struct page *page); >extern int simple_prepare_write(struct file *file, struct page *page, > unsigned offset, unsigned to); >extern int simple_write_begin(struct file *file, struct address_space *mapping, > loff_t pos, unsigned len, unsigned flags, > struct page **pagep, void **fsdata); >extern int simple_write_end(struct file *file, struct address_space *mapping, > loff_t pos, unsigned len, unsigned copied, > struct page *page, void *fsdata); > >extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); >extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *); >extern const struct file_operations simple_dir_operations; >extern const struct inode_operations simple_dir_inode_operations; >struct tree_descr { char *name; const struct file_operations *ops; int mode; }; >struct dentry *d_alloc_name(struct dentry *, const char *); >extern int simple_fill_super(struct super_block *, int, struct tree_descr *); >extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); >extern void simple_release_fs(struct vfsmount **mount, int *count); > >extern ssize_t simple_read_from_buffer(void *to, size_t count, > loff_t *ppos, const void *from, size_t available); >extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, > const void *from, size_t available); ># 2015 "include/linux/fs.h" >extern int inode_change_ok(struct inode *, struct iattr *); >extern int __attribute__((warn_unused_result)) inode_setattr(struct inode *, struct iattr *); > >extern void file_update_time(struct file *file); > >extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt); >extern void save_mount_options(struct super_block *sb, char *options); > >static inline __attribute__((always_inline)) ino_t parent_ino(struct dentry *dentry) >{ > ino_t res; > > _spin_lock(&dentry->d_lock); > res = dentry->d_parent->d_inode->i_ino; > _spin_unlock(&dentry->d_lock); > return res; >} > > > > > > > >struct simple_transaction_argresp { > ssize_t size; > char data[0]; >}; > > > >char *simple_transaction_get(struct file *file, const char *buf, > size_t size); >ssize_t simple_transaction_read(struct file *file, char *buf, > size_t size, loff_t *pos); >int simple_transaction_release(struct inode *inode, struct file *file); > >static inline __attribute__((always_inline)) void simple_transaction_set(struct file *file, size_t n) >{ > struct simple_transaction_argresp *ar = file->private_data; > > do { if (__builtin_expect(!!(n > (((1UL) << 12) - sizeof(struct simple_transaction_argresp))), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/fs.h"), "i" (2056), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > > > > > > asm volatile ("661:\n\t" "lock; addl $0,0(%%esp)" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "mfence" "\n664:\n" ".previous" :: "i" ((0*32+26)) : "memory"); > ar->size = n; >} ># 2096 "include/linux/fs.h" >static inline __attribute__((always_inline)) void __attribute__((format(printf, 1, 2))) >__simple_attr_check_format(const char *fmt, ...) >{ > >} > >int simple_attr_open(struct inode *inode, struct file *file, > int (*get)(void *, u64 *), int (*set)(void *, u64), > const char *fmt); >int simple_attr_release(struct inode *inode, struct file *file); >ssize_t simple_attr_read(struct file *file, char *buf, > size_t len, loff_t *ppos); >ssize_t simple_attr_write(struct file *file, const char *buf, > size_t len, loff_t *ppos); > > > >static inline __attribute__((always_inline)) char *alloc_secdata(void) >{ > return (char *)get_zeroed_page(((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u))); >} > >static inline __attribute__((always_inline)) void free_secdata(void *secdata) >{ > free_pages(((unsigned long)secdata),0); >} ># 2132 "include/linux/fs.h" >struct ctl_table; >int proc_nr_files(struct ctl_table *table, int write, struct file *filp, > void *buffer, size_t *lenp, loff_t *ppos); > >int get_filesystem_list(char * buf); ># 28 "/root/ext3/namei.c" 2 ># 1 "include/linux/pagemap.h" 1 > > > > > > ># 1 "include/linux/mm.h" 1 ># 11 "include/linux/mm.h" ># 1 "include/linux/rbtree.h" 1 ># 100 "include/linux/rbtree.h" >struct rb_node >{ > unsigned long rb_parent_color; > > > struct rb_node *rb_right; > struct rb_node *rb_left; >} __attribute__((aligned(sizeof(long)))); > > >struct rb_root >{ > struct rb_node *rb_node; >}; ># 123 "include/linux/rbtree.h" >static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p) >{ > rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p; >} >static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color) >{ > rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; >} ># 139 "include/linux/rbtree.h" >extern void rb_insert_color(struct rb_node *, struct rb_root *); >extern void rb_erase(struct rb_node *, struct rb_root *); > > >extern struct rb_node *rb_next(struct rb_node *); >extern struct rb_node *rb_prev(struct rb_node *); >extern struct rb_node *rb_first(struct rb_root *); >extern struct rb_node *rb_last(struct rb_root *); > > >extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, > struct rb_root *root); > >static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent, > struct rb_node ** rb_link) >{ > node->rb_parent_color = (unsigned long )parent; > node->rb_left = node->rb_right = ((void *)0); > > *rb_link = node; >} ># 12 "include/linux/mm.h" 2 > > ># 1 "include/linux/mm_types.h" 1 > > > ># 1 "include/linux/auxvec.h" 1 > > > ># 1 "include/asm/auxvec.h" 1 ># 5 "include/linux/auxvec.h" 2 ># 5 "include/linux/mm_types.h" 2 > > > > > > > ># 1 "include/linux/completion.h" 1 ># 13 "include/linux/completion.h" >struct completion { > unsigned int done; > wait_queue_head_t wait; >}; ># 39 "include/linux/completion.h" >static inline __attribute__((always_inline)) void init_completion(struct completion *x) >{ > x->done = 0; > init_waitqueue_head(&x->wait); >} > >extern void wait_for_completion(struct completion *); >extern int wait_for_completion_interruptible(struct completion *x); >extern int wait_for_completion_killable(struct completion *x); >extern unsigned long wait_for_completion_timeout(struct completion *x, > unsigned long timeout); >extern unsigned long wait_for_completion_interruptible_timeout( > struct completion *x, unsigned long timeout); > >extern void complete(struct completion *); >extern void complete_all(struct completion *); ># 13 "include/linux/mm_types.h" 2 ># 21 "include/linux/mm_types.h" >struct address_space; > > >typedef atomic_long_t mm_counter_t; ># 36 "include/linux/mm_types.h" >struct page { > unsigned long flags; > > atomic_t _count; > union { > atomic_t _mapcount; > > > > struct { > u16 inuse; > u16 objects; > }; > }; > union { > struct { > unsigned long private; > > > > > > > struct address_space *mapping; > > > > > > > }; > > spinlock_t ptl; > > struct kmem_cache *slab; > struct page *first_page; > }; > union { > unsigned long index; > void *freelist; > }; > struct list_head lru; ># 97 "include/linux/mm_types.h" >}; > > > > > > > >struct vm_area_struct { > struct mm_struct * vm_mm; > unsigned long vm_start; > unsigned long vm_end; > > > > struct vm_area_struct *vm_next; > > pgprot_t vm_page_prot; > unsigned long vm_flags; > > struct rb_node vm_rb; > > > > > > > > union { > struct { > struct list_head list; > void *parent; > struct vm_area_struct *head; > } vm_set; > > struct raw_prio_tree_node prio_tree_node; > } shared; > > > > > > > > struct list_head anon_vma_node; > struct anon_vma *anon_vma; > > > struct vm_operations_struct * vm_ops; > > > unsigned long vm_pgoff; > > struct file * vm_file; > void * vm_private_data; > unsigned long vm_truncate_count; > > > > > > > >}; > >struct mm_struct { > struct vm_area_struct * mmap; > struct rb_root mm_rb; > struct vm_area_struct * mmap_cache; > unsigned long (*get_unmapped_area) (struct file *filp, > unsigned long addr, unsigned long len, > unsigned long pgoff, unsigned long flags); > unsigned long (*get_unmapped_exec_area) (struct file *filp, > unsigned long addr, unsigned long len, > unsigned long pgoff, unsigned long flags); > void (*unmap_area) (struct mm_struct *mm, unsigned long addr); > unsigned long mmap_base; > unsigned long task_size; > unsigned long cached_hole_size; > unsigned long free_area_cache; > pgd_t * pgd; > atomic_t mm_users; > atomic_t mm_count; > int map_count; > int core_waiters; > struct rw_semaphore mmap_sem; > spinlock_t page_table_lock; > > struct list_head mmlist; > > > > > > > > mm_counter_t _file_rss; > mm_counter_t _anon_rss; > > unsigned long hiwater_rss; > unsigned long hiwater_vm; > > unsigned long total_vm, locked_vm, shared_vm, exec_vm; > unsigned long stack_vm, reserved_vm, def_flags, nr_ptes; > unsigned long start_code, end_code, start_data, end_data; > unsigned long start_brk, brk, start_stack; > unsigned long arg_start, arg_end, env_start, env_end; > > unsigned long saved_auxv[(2*(1 + (14 + 2) + 1))]; > > cpumask_t cpu_vm_mask; > > > mm_context_t context; ># 219 "include/linux/mm_types.h" > unsigned int faultstamp; > unsigned int token_priority; > unsigned int last_interval; > > unsigned long flags; > > > struct completion *core_startup_done, core_done; > > > rwlock_t ioctx_list_lock; > struct kioctx *ioctx_list; ># 247 "include/linux/mm_types.h" > struct file *exe_file; > unsigned long num_exe_file_vmas; > >}; ># 15 "include/linux/mm.h" 2 > >struct mempolicy; >struct anon_vma; >struct file_ra_state; >struct user_struct; >struct writeback_control; > > >extern unsigned long max_mapnr; > > >extern unsigned long num_physpages; >extern void * high_memory; >extern int page_cluster; > > >extern int sysctl_legacy_va_layout; > > > > >extern unsigned long mmap_min_addr; > > ># 1 "include/asm/pgtable.h" 1 ># 92 "include/asm/pgtable.h" >extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC; ># 155 "include/asm/pgtable.h" >extern unsigned long empty_zero_page[((1UL) << 12) / sizeof(unsigned long)]; > > >extern spinlock_t pgd_lock; >extern struct list_head pgd_list; > > > > > >static inline __attribute__((always_inline)) int pte_dirty(pte_t pte) >{ > return pte_val(pte) & ((1L)<<6); >} > >static inline __attribute__((always_inline)) int pte_young(pte_t pte) >{ > return pte_val(pte) & ((1L)<<5); >} > >static inline __attribute__((always_inline)) int pte_write(pte_t pte) >{ > return pte_val(pte) & ((1L)<<1); >} > >static inline __attribute__((always_inline)) int pte_file(pte_t pte) >{ > return pte_val(pte) & ((1L)<<6); >} > >static inline __attribute__((always_inline)) int pte_huge(pte_t pte) >{ > return pte_val(pte) & ((1L)<<7); >} > >static inline __attribute__((always_inline)) int pte_global(pte_t pte) >{ > return pte_val(pte) & ((1L)<<8); >} > >static inline __attribute__((always_inline)) int pte_exec(pte_t pte) >{ > return !(pte_val(pte) & 0); >} > >static inline __attribute__((always_inline)) int pte_special(pte_t pte) >{ > return 0; >} > >static inline __attribute__((always_inline)) int pmd_large(pmd_t pte) >{ > return (((pgd_val(((pte).pud).pgd))) & (((1L)<<7) | ((1L)<<0))) == > (((1L)<<7) | ((1L)<<0)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkclean(pte_t pte) >{ > return __pte(pte_val(pte) & ~(pteval_t)((1L)<<6)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkold(pte_t pte) >{ > return __pte(pte_val(pte) & ~(pteval_t)((1L)<<5)); >} > >static inline __attribute__((always_inline)) pte_t pte_wrprotect(pte_t pte) >{ > return __pte(pte_val(pte) & ~(pteval_t)((1L)<<1)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkexec(pte_t pte) >{ > return __pte(pte_val(pte) & ~(pteval_t)0); >} > >static inline __attribute__((always_inline)) pte_t pte_mkdirty(pte_t pte) >{ > return __pte(pte_val(pte) | ((1L)<<6)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkyoung(pte_t pte) >{ > return __pte(pte_val(pte) | ((1L)<<5)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkwrite(pte_t pte) >{ > return __pte(pte_val(pte) | ((1L)<<1)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkhuge(pte_t pte) >{ > return __pte(pte_val(pte) | ((1L)<<7)); >} > >static inline __attribute__((always_inline)) pte_t pte_clrhuge(pte_t pte) >{ > return __pte(pte_val(pte) & ~(pteval_t)((1L)<<7)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkglobal(pte_t pte) >{ > return __pte(pte_val(pte) | ((1L)<<8)); >} > >static inline __attribute__((always_inline)) pte_t pte_clrglobal(pte_t pte) >{ > return __pte(pte_val(pte) & ~(pteval_t)((1L)<<8)); >} > >static inline __attribute__((always_inline)) pte_t pte_mkspecial(pte_t pte) >{ > return pte; >} > >extern pteval_t __supported_pte_mask; > >static inline __attribute__((always_inline)) pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) >{ > return __pte((((phys_addr_t)page_nr << 12) | > ((pgprot).pgprot)) & __supported_pte_mask); >} > >static inline __attribute__((always_inline)) pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot) >{ > return ((pmd_t) { ((pud_t) { __pgd((((phys_addr_t)page_nr << 12) | ((pgprot).pgprot)) & __supported_pte_mask) } ) } ); > >} > >static inline __attribute__((always_inline)) pte_t pte_modify(pte_t pte, pgprot_t newprot) >{ > pteval_t val = pte_val(pte); > > > > > > val &= (((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)(1ULL << 32) - 1))) | ((1L)<<4) | ((1L)<<3) | ((1L)<<5) | ((1L)<<6)); > val |= ((newprot).pgprot) & (~(((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)(1ULL << 32) - 1))) | ((1L)<<4) | ((1L)<<3) | ((1L)<<5) | ((1L)<<6))) & __supported_pte_mask; > > return __pte(val); >} > > > >static inline __attribute__((always_inline)) pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) >{ > pgprotval_t preservebits = ((oldprot).pgprot) & (((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)(1ULL << 32) - 1))) | ((1L)<<4) | ((1L)<<3) | ((1L)<<5) | ((1L)<<6)); > pgprotval_t addbits = ((newprot).pgprot); > return ((pgprot_t) { (preservebits | addbits) } ); >} > > > > > > > >struct file; >pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, > unsigned long size, pgprot_t vma_prot); >int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, > unsigned long size, pgprot_t *vma_prot); ># 357 "include/asm/pgtable.h" ># 1 "include/asm/pgtable_32.h" 1 ># 25 "include/asm/pgtable_32.h" >struct mm_struct; >struct vm_area_struct; > >extern pgd_t swapper_pg_dir[1024]; > >static inline __attribute__((always_inline)) void pgtable_cache_init(void) { } >static inline __attribute__((always_inline)) void check_pgt_cache(void) { } >void paging_init(void); ># 45 "include/asm/pgtable_32.h" ># 1 "include/asm/pgtable-2level-defs.h" 1 ># 46 "include/asm/pgtable_32.h" 2 ># 84 "include/asm/pgtable_32.h" >extern unsigned long pg0[]; ># 98 "include/asm/pgtable_32.h" ># 1 "include/asm/pgtable-2level.h" 1 ># 14 "include/asm/pgtable-2level.h" >static inline __attribute__((always_inline)) void native_set_pte(pte_t *ptep , pte_t pte) >{ > *ptep = pte; >} > >static inline __attribute__((always_inline)) void native_set_pmd(pmd_t *pmdp, pmd_t pmd) >{ > *pmdp = pmd; >} > >static inline __attribute__((always_inline)) void native_set_pte_atomic(pte_t *ptep, pte_t pte) >{ > native_set_pte(ptep, pte); >} > >static inline __attribute__((always_inline)) void native_set_pte_present(struct mm_struct *mm, > unsigned long addr, > pte_t *ptep, pte_t pte) >{ > native_set_pte(ptep, pte); >} > >static inline __attribute__((always_inline)) void native_pmd_clear(pmd_t *pmdp) >{ > native_set_pmd(pmdp, ((pmd_t) { ((pud_t) { __pgd(0) } ) } )); >} > >static inline __attribute__((always_inline)) void native_pte_clear(struct mm_struct *mm, > unsigned long addr, pte_t *xp) >{ > *xp = native_make_pte(0); >} > > >static inline __attribute__((always_inline)) pte_t native_ptep_get_and_clear(pte_t *xp) >{ > return __pte(((__typeof__(*(&xp->pte_low)))__xchg((unsigned long)(0), (&xp->pte_low), sizeof(*(&xp->pte_low))))); >} ># 99 "include/asm/pgtable_32.h" 2 ># 137 "include/asm/pgtable_32.h" >static inline __attribute__((always_inline)) int pud_large(pud_t pud) { return 0; } ># 194 "include/asm/pgtable_32.h" >extern void native_pagetable_setup_start(pgd_t *base); >extern void native_pagetable_setup_done(pgd_t *base); ># 358 "include/asm/pgtable.h" 2 ># 367 "include/asm/pgtable.h" >enum { > PG_LEVEL_NONE, > PG_LEVEL_4K, > PG_LEVEL_2M, > PG_LEVEL_1G, >}; > > > > > > > >extern pte_t *lookup_address(unsigned long address, unsigned int *level); > > >static inline __attribute__((always_inline)) pte_t native_local_ptep_get_and_clear(pte_t *ptep) >{ > pte_t res = *ptep; > > > native_pte_clear(((void *)0), 0, ptep); > return res; >} > >static inline __attribute__((always_inline)) void native_set_pte_at(struct mm_struct *mm, unsigned long addr, > pte_t *ptep , pte_t pte) >{ > native_set_pte(ptep, pte); >} ># 424 "include/asm/pgtable.h" >extern int ptep_set_access_flags(struct vm_area_struct *vma, > unsigned long address, pte_t *ptep, > pte_t entry, int dirty); > > >extern int ptep_test_and_clear_young(struct vm_area_struct *vma, > unsigned long addr, pte_t *ptep); > > >extern int ptep_clear_flush_young(struct vm_area_struct *vma, > unsigned long address, pte_t *ptep); > > >static inline __attribute__((always_inline)) pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, > pte_t *ptep) >{ > pte_t pte = native_ptep_get_and_clear(ptep); > pte_update(mm, addr, ptep); > return pte; >} > > >static inline __attribute__((always_inline)) pte_t ptep_get_and_clear_full(struct mm_struct *mm, > unsigned long addr, pte_t *ptep, > int full) >{ > pte_t pte; > if (full) { > > > > > pte = native_local_ptep_get_and_clear(ptep); > } else { > pte = ptep_get_and_clear(mm, addr, ptep); > } > return pte; >} > > >static inline __attribute__((always_inline)) void ptep_set_wrprotect(struct mm_struct *mm, > unsigned long addr, pte_t *ptep) >{ > clear_bit(1, (unsigned long *)&ptep->pte); > pte_update(mm, addr, ptep); >} ># 481 "include/asm/pgtable.h" >static inline __attribute__((always_inline)) void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) >{ > (__builtin_constant_p(count * sizeof(pgd_t)) ? __constant_memcpy((dst),(src),(count * sizeof(pgd_t))) : __memcpy((dst),(src),(count * sizeof(pgd_t)))); >} > > ># 1 "include/asm-generic/pgtable.h" 1 ># 162 "include/asm-generic/pgtable.h" >void pgd_clear_bad(pgd_t *); >void pud_clear_bad(pud_t *); >void pmd_clear_bad(pmd_t *); > >static inline __attribute__((always_inline)) int pgd_none_or_clear_bad(pgd_t *pgd) >{ > if (pgd_none(*pgd)) > return 1; > if (__builtin_expect(!!(pgd_bad(*pgd)), 0)) { > pgd_clear_bad(pgd); > return 1; > } > return 0; >} > >static inline __attribute__((always_inline)) int pud_none_or_clear_bad(pud_t *pud) >{ > if (pud_none(*pud)) > return 1; > if (__builtin_expect(!!(pud_bad(*pud)), 0)) { > pud_clear_bad(pud); > return 1; > } > return 0; >} > >static inline __attribute__((always_inline)) int pmd_none_or_clear_bad(pmd_t *pmd) >{ > if ((!(unsigned long)((pgd_val((((*pmd)).pud).pgd))))) > return 1; > if (__builtin_expect(!!(((((pgd_val(((*pmd).pud).pgd))) & (~((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)(1ULL << 32) - 1))) & ~((1L)<<2))) != (((1L)<<0) | ((1L)<<1) | ((1L)<<5) | ((1L)<<6)))), 0)) { > pmd_clear_bad(pmd); > return 1; > } > return 0; >} ># 488 "include/asm/pgtable.h" 2 ># 40 "include/linux/mm.h" 2 ># 53 "include/linux/mm.h" >extern struct kmem_cache *vm_area_cachep; > > > > > > >struct vm_list_struct { > struct vm_list_struct *next; > struct vm_area_struct *vma; >}; ># 132 "include/linux/mm.h" >extern pgprot_t protection_map[16]; ># 147 "include/linux/mm.h" >struct vm_fault { > unsigned int flags; > unsigned long pgoff; > void *virtual_address; > > struct page *page; > > > > >}; > > > > > > >struct vm_operations_struct { > void (*open)(struct vm_area_struct * area); > void (*close)(struct vm_area_struct * area); > int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); > unsigned long (*nopfn)(struct vm_area_struct *area, > unsigned long address); > > > > int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); ># 199 "include/linux/mm.h" >}; > >struct mmu_gather; >struct inode; ># 211 "include/linux/mm.h" ># 1 "include/linux/page-flags.h" 1 ># 72 "include/linux/page-flags.h" >enum pageflags { > PG_locked, > PG_error, > PG_referenced, > PG_uptodate, > PG_dirty, > PG_lru, > PG_active, > PG_slab, > PG_owner_priv_1, > PG_arch_1, > PG_reserved, > PG_private, > PG_writeback, > > PG_head, > PG_tail, > > > > PG_swapcache, > PG_mappedtodisk, > PG_reclaim, > PG_buddy, > > > > __NR_PAGEFLAGS >}; ># 149 "include/linux/page-flags.h" >struct page; > >static inline __attribute__((always_inline)) int PageLocked(struct page *page) { return (__builtin_constant_p((PG_locked)) ? constant_test_bit((PG_locked), (&page->flags)) : variable_test_bit((PG_locked), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageLocked(struct page *page) { set_bit(PG_locked, &page->flags); } static inline __attribute__((always_inline)) void ClearPageLocked(struct page *page) { clear_bit(PG_locked, &page->flags); } static inline __attribute__((always_inline)) int TestSetPageLocked(struct page *page) { return test_and_set_bit(PG_locked, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageLocked(struct page *page) { return test_and_clear_bit(PG_locked, &page->flags); } >static inline __attribute__((always_inline)) int PageError(struct page *page) { return (__builtin_constant_p((PG_error)) ? constant_test_bit((PG_error), (&page->flags)) : variable_test_bit((PG_error), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageError(struct page *page) { set_bit(PG_error, &page->flags); } static inline __attribute__((always_inline)) void ClearPageError(struct page *page) { clear_bit(PG_error, &page->flags); } >static inline __attribute__((always_inline)) int PageReferenced(struct page *page) { return (__builtin_constant_p((PG_referenced)) ? constant_test_bit((PG_referenced), (&page->flags)) : variable_test_bit((PG_referenced), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageReferenced(struct page *page) { set_bit(PG_referenced, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReferenced(struct page *page) { clear_bit(PG_referenced, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageReferenced(struct page *page) { return test_and_clear_bit(PG_referenced, &page->flags); } >static inline __attribute__((always_inline)) int PageDirty(struct page *page) { return (__builtin_constant_p((PG_dirty)) ? constant_test_bit((PG_dirty), (&page->flags)) : variable_test_bit((PG_dirty), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageDirty(struct page *page) { set_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) void ClearPageDirty(struct page *page) { clear_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) int TestSetPageDirty(struct page *page) { return test_and_set_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageDirty(struct page *page) { return test_and_clear_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageDirty(struct page *page) { __clear_bit(PG_dirty, &page->flags); } >static inline __attribute__((always_inline)) int PageLRU(struct page *page) { return (__builtin_constant_p((PG_lru)) ? constant_test_bit((PG_lru), (&page->flags)) : variable_test_bit((PG_lru), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageLRU(struct page *page) { set_bit(PG_lru, &page->flags); } static inline __attribute__((always_inline)) void ClearPageLRU(struct page *page) { clear_bit(PG_lru, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageLRU(struct page *page) { __clear_bit(PG_lru, &page->flags); } >static inline __attribute__((always_inline)) int PageActive(struct page *page) { return (__builtin_constant_p((PG_active)) ? constant_test_bit((PG_active), (&page->flags)) : variable_test_bit((PG_active), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageActive(struct page *page) { set_bit(PG_active, &page->flags); } static inline __attribute__((always_inline)) void ClearPageActive(struct page *page) { clear_bit(PG_active, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageActive(struct page *page) { __clear_bit(PG_active, &page->flags); } >static inline __attribute__((always_inline)) int PageSlab(struct page *page) { return (__builtin_constant_p((PG_slab)) ? constant_test_bit((PG_slab), (&page->flags)) : variable_test_bit((PG_slab), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageSlab(struct page *page) { __set_bit(PG_slab, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSlab(struct page *page) { __clear_bit(PG_slab, &page->flags); } >static inline __attribute__((always_inline)) int PageChecked(struct page *page) { return (__builtin_constant_p((PG_owner_priv_1)) ? constant_test_bit((PG_owner_priv_1), (&page->flags)) : variable_test_bit((PG_owner_priv_1), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageChecked(struct page *page) { set_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) void ClearPageChecked(struct page *page) { clear_bit(PG_owner_priv_1, &page->flags); } >static inline __attribute__((always_inline)) int PagePinned(struct page *page) { return (__builtin_constant_p((PG_owner_priv_1)) ? constant_test_bit((PG_owner_priv_1), (&page->flags)) : variable_test_bit((PG_owner_priv_1), (&page->flags))); } static inline __attribute__((always_inline)) void SetPagePinned(struct page *page) { set_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) void ClearPagePinned(struct page *page) { clear_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) int TestSetPagePinned(struct page *page) { return test_and_set_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) int TestClearPagePinned(struct page *page) { return test_and_clear_bit(PG_owner_priv_1, &page->flags); } >static inline __attribute__((always_inline)) int PageReserved(struct page *page) { return (__builtin_constant_p((PG_reserved)) ? constant_test_bit((PG_reserved), (&page->flags)) : variable_test_bit((PG_reserved), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageReserved(struct page *page) { set_bit(PG_reserved, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReserved(struct page *page) { clear_bit(PG_reserved, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageReserved(struct page *page) { __clear_bit(PG_reserved, &page->flags); } >static inline __attribute__((always_inline)) int PagePrivate(struct page *page) { return (__builtin_constant_p((PG_private)) ? constant_test_bit((PG_private), (&page->flags)) : variable_test_bit((PG_private), (&page->flags))); } static inline __attribute__((always_inline)) void SetPagePrivate(struct page *page) { set_bit(PG_private, &page->flags); } static inline __attribute__((always_inline)) void ClearPagePrivate(struct page *page) { clear_bit(PG_private, &page->flags); } static inline __attribute__((always_inline)) void __ClearPagePrivate(struct page *page) { __clear_bit(PG_private, &page->flags); } > static inline __attribute__((always_inline)) void __SetPagePrivate(struct page *page) { __set_bit(PG_private, &page->flags); } > > > > > >static inline __attribute__((always_inline)) int PageWriteback(struct page *page) { return (__builtin_constant_p((PG_writeback)) ? constant_test_bit((PG_writeback), (&page->flags)) : variable_test_bit((PG_writeback), (&page->flags))); } static inline __attribute__((always_inline)) int TestSetPageWriteback(struct page *page) { return test_and_set_bit(PG_writeback, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageWriteback(struct page *page) { return test_and_clear_bit(PG_writeback, &page->flags); } >static inline __attribute__((always_inline)) int PageBuddy(struct page *page) { return (__builtin_constant_p((PG_buddy)) ? constant_test_bit((PG_buddy), (&page->flags)) : variable_test_bit((PG_buddy), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageBuddy(struct page *page) { __set_bit(PG_buddy, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageBuddy(struct page *page) { __clear_bit(PG_buddy, &page->flags); } >static inline __attribute__((always_inline)) int PageMappedToDisk(struct page *page) { return (__builtin_constant_p((PG_mappedtodisk)) ? constant_test_bit((PG_mappedtodisk), (&page->flags)) : variable_test_bit((PG_mappedtodisk), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageMappedToDisk(struct page *page) { set_bit(PG_mappedtodisk, &page->flags); } static inline __attribute__((always_inline)) void ClearPageMappedToDisk(struct page *page) { clear_bit(PG_mappedtodisk, &page->flags); } > > >static inline __attribute__((always_inline)) int PageReclaim(struct page *page) { return (__builtin_constant_p((PG_reclaim)) ? constant_test_bit((PG_reclaim), (&page->flags)) : variable_test_bit((PG_reclaim), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageReclaim(struct page *page) { set_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReclaim(struct page *page) { clear_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageReclaim(struct page *page) { return test_and_clear_bit(PG_reclaim, &page->flags); } >static inline __attribute__((always_inline)) int PageReadahead(struct page *page) { return (__builtin_constant_p((PG_reclaim)) ? constant_test_bit((PG_reclaim), (&page->flags)) : variable_test_bit((PG_reclaim), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageReadahead(struct page *page) { set_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReadahead(struct page *page) { clear_bit(PG_reclaim, &page->flags); } ># 187 "include/linux/page-flags.h" >static inline __attribute__((always_inline)) int PageSwapCache(struct page *page) { return (__builtin_constant_p((PG_swapcache)) ? constant_test_bit((PG_swapcache), (&page->flags)) : variable_test_bit((PG_swapcache), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageSwapCache(struct page *page) { set_bit(PG_swapcache, &page->flags); } static inline __attribute__((always_inline)) void ClearPageSwapCache(struct page *page) { clear_bit(PG_swapcache, &page->flags); } > > > > > > > >static inline __attribute__((always_inline)) int PageUncached(struct page *page) { return 0; } > > >static inline __attribute__((always_inline)) int PageUptodate(struct page *page) >{ > int ret = (__builtin_constant_p((PG_uptodate)) ? constant_test_bit((PG_uptodate), (&(page)->flags)) : variable_test_bit((PG_uptodate), (&(page)->flags))); ># 210 "include/linux/page-flags.h" > if (ret) > asm volatile ("661:\n\t" "lock; addl $0,0(%%esp)" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "lfence" "\n664:\n" ".previous" :: "i" ((0*32+26)) : "memory"); > > return ret; >} > >static inline __attribute__((always_inline)) void __SetPageUptodate(struct page *page) >{ > __asm__ __volatile__("": : :"memory"); > __set_bit(PG_uptodate, &(page)->flags); > > > >} > >static inline __attribute__((always_inline)) void SetPageUptodate(struct page *page) >{ ># 239 "include/linux/page-flags.h" > __asm__ __volatile__("": : :"memory"); > set_bit(PG_uptodate, &(page)->flags); > >} > >static inline __attribute__((always_inline)) void ClearPageUptodate(struct page *page) { clear_bit(PG_uptodate, &page->flags); } > >extern void cancel_dirty_page(struct page *page, unsigned int account_size); > >int test_clear_page_writeback(struct page *page); >int test_set_page_writeback(struct page *page); > >static inline __attribute__((always_inline)) void set_page_writeback(struct page *page) >{ > test_set_page_writeback(page); >} ># 263 "include/linux/page-flags.h" >static inline __attribute__((always_inline)) int PageHead(struct page *page) { return (__builtin_constant_p((PG_head)) ? constant_test_bit((PG_head), (&page->flags)) : variable_test_bit((PG_head), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageHead(struct page *page) { __set_bit(PG_head, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageHead(struct page *page) { __clear_bit(PG_head, &page->flags); } >static inline __attribute__((always_inline)) int PageTail(struct page *page) { return (__builtin_constant_p((PG_tail)) ? constant_test_bit((PG_tail), (&page->flags)) : variable_test_bit((PG_tail), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageTail(struct page *page) { __set_bit(PG_tail, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageTail(struct page *page) { __clear_bit(PG_tail, &page->flags); } > >static inline __attribute__((always_inline)) int PageCompound(struct page *page) >{ > return page->flags & ((1L << PG_head) | (1L << PG_tail)); > >} ># 212 "include/linux/mm.h" 2 ># 235 "include/linux/mm.h" >static inline __attribute__((always_inline)) int put_page_testzero(struct page *page) >{ > do { if (__builtin_expect(!!(((&page->_count)->counter) == 0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/mm.h"), "i" (237), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > return atomic_dec_and_test(&page->_count); >} > > > > > >static inline __attribute__((always_inline)) int get_page_unless_zero(struct page *page) >{ > do { if (__builtin_expect(!!(PageTail(page)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/mm.h"), "i" (247), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > return atomic_add_unless((&page->_count), 1, 0); >} > > >struct page *vmalloc_to_page(const void *addr); >unsigned long vmalloc_to_pfn(const void *addr); > > > > > > > >static inline __attribute__((always_inline)) int is_vmalloc_addr(const void *x) >{ > > unsigned long addr = (unsigned long)x; > > return addr >= (((unsigned long)high_memory + 2 * (8 * 1024 * 1024) - 1) & ~((8 * 1024 * 1024) - 1)) && addr < ((((((unsigned long)__FIXADDR_TOP) - (__end_of_fixed_addresses << 12)) - ((1UL) << 12) * (1024 + 1)) & (~((1UL << 22)-1))) - 2 * ((1UL) << 12)); > > > >} > >static inline __attribute__((always_inline)) struct page *compound_head(struct page *page) >{ > if (__builtin_expect(!!(PageTail(page)), 0)) > return page->first_page; > return page; >} > >static inline __attribute__((always_inline)) int page_count(struct page *page) >{ > return ((&compound_head(page)->_count)->counter); >} > >static inline __attribute__((always_inline)) void get_page(struct page *page) >{ > page = compound_head(page); > do { if (__builtin_expect(!!(((&page->_count)->counter) == 0), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/mm.h"), "i" (287), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > atomic_inc(&page->_count); >} > >static inline __attribute__((always_inline)) struct page *virt_to_head_page(const void *x) >{ > struct page *page = (mem_map + (((((unsigned long)(x)) - ((unsigned long)(0xC0000000UL))) >> 12) - (0UL))); > return compound_head(page); >} > > > > > >static inline __attribute__((always_inline)) void init_page_count(struct page *page) >{ > (((&page->_count)->counter) = (1)); >} > >void put_page(struct page *page); >void put_pages_list(struct list_head *pages); > >void split_page(struct page *page, unsigned int order); > > > > > > >typedef void compound_page_dtor(struct page *); > >static inline __attribute__((always_inline)) void set_compound_page_dtor(struct page *page, > compound_page_dtor *dtor) >{ > page[1].lru.next = (void *)dtor; >} > >static inline __attribute__((always_inline)) compound_page_dtor *get_compound_page_dtor(struct page *page) >{ > return (compound_page_dtor *)page[1].lru.next; >} > >static inline __attribute__((always_inline)) int compound_order(struct page *page) >{ > if (!PageHead(page)) > return 0; > return (unsigned long)page[1].lru.prev; >} > >static inline __attribute__((always_inline)) void set_compound_order(struct page *page, unsigned long order) >{ > page[1].lru.prev = (void *)order; >} ># 486 "include/linux/mm.h" >static inline __attribute__((always_inline)) enum zone_type page_zonenum(struct page *page) >{ > return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0))) & ((1UL << 2) - 1); >} ># 499 "include/linux/mm.h" >static inline __attribute__((always_inline)) int page_zone_id(struct page *page) >{ > return (page->flags >> ((((((sizeof(unsigned long)*8) - 0) - 0) < ((((sizeof(unsigned long)*8) - 0) - 0) - 2))? (((sizeof(unsigned long)*8) - 0) - 0) : ((((sizeof(unsigned long)*8) - 0) - 0) - 2)) * ((0 + 2) != 0))) & ((1UL << (0 + 2)) - 1); >} > >static inline __attribute__((always_inline)) int zone_to_nid(struct zone *zone) >{ > > > > return 0; > >} > > > > >static inline __attribute__((always_inline)) int page_to_nid(struct page *page) >{ > return (page->flags >> ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))) & ((1UL << 0) - 1); >} > > >static inline __attribute__((always_inline)) struct zone *page_zone(struct page *page) >{ > return &(&contig_page_data)->node_zones[page_zonenum(page)]; >} ># 534 "include/linux/mm.h" >static inline __attribute__((always_inline)) void set_page_zone(struct page *page, enum zone_type zone) >{ > page->flags &= ~(((1UL << 2) - 1) << (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0))); > page->flags |= (zone & ((1UL << 2) - 1)) << (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0)); >} > >static inline __attribute__((always_inline)) void set_page_node(struct page *page, unsigned long node) >{ > page->flags &= ~(((1UL << 0) - 1) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))); > page->flags |= (node & ((1UL << 0) - 1)) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0)); >} > >static inline __attribute__((always_inline)) void set_page_section(struct page *page, unsigned long section) >{ > page->flags &= ~(((1UL << 0) - 1) << (((sizeof(unsigned long)*8) - 0) * (0 != 0))); > page->flags |= (section & ((1UL << 0) - 1)) << (((sizeof(unsigned long)*8) - 0) * (0 != 0)); >} > >static inline __attribute__((always_inline)) void set_page_links(struct page *page, enum zone_type zone, > unsigned long node, unsigned long pfn) >{ > set_page_zone(page, zone); > set_page_node(page, node); > set_page_section(page, ((pfn) >> 0)); >} > > > > > >static inline __attribute__((always_inline)) unsigned long round_hint_to_min(unsigned long hint) >{ > > hint &= (~(((1UL) << 12)-1)); > if (((void *)hint != ((void *)0)) && > (hint < mmap_min_addr)) > return (((mmap_min_addr)+((1UL) << 12)-1)&(~(((1UL) << 12)-1))); > > return hint; >} > > > > ># 1 "include/linux/vmstat.h" 1 > > > > > ># 1 "include/linux/mm.h" 1 ># 7 "include/linux/vmstat.h" 2 > ># 1 "include/asm/atomic.h" 1 ># 9 "include/linux/vmstat.h" 2 ># 31 "include/linux/vmstat.h" >enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, > PGALLOC_DMA, PGALLOC_NORMAL , PGALLOC_HIGH , PGALLOC_MOVABLE, > PGFREE, PGACTIVATE, PGDEACTIVATE, > PGFAULT, PGMAJFAULT, > PGREFILL_DMA, PGREFILL_NORMAL , PGREFILL_HIGH , PGREFILL_MOVABLE, > PGSTEAL_DMA, PGSTEAL_NORMAL , PGSTEAL_HIGH , PGSTEAL_MOVABLE, > PGSCAN_KSWAPD_DMA, PGSCAN_KSWAPD_NORMAL , PGSCAN_KSWAPD_HIGH , PGSCAN_KSWAPD_MOVABLE, > PGSCAN_DIRECT_DMA, PGSCAN_DIRECT_NORMAL , PGSCAN_DIRECT_HIGH , PGSCAN_DIRECT_MOVABLE, > PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, > PAGEOUTRUN, ALLOCSTALL, PGROTATED, > > HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, > > NR_VM_EVENT_ITEMS >}; ># 58 "include/linux/vmstat.h" >struct vm_event_state { > unsigned long event[NR_VM_EVENT_ITEMS]; >}; > >extern __typeof__(struct vm_event_state) per_cpu__vm_event_states; > >static inline __attribute__((always_inline)) void __count_vm_event(enum vm_event_item item) >{ > (*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((&per_cpu__vm_event_states))); (typeof((&per_cpu__vm_event_states))) (__ptr + ((({ typeof(per_cpu__this_cpu_off) ret__; switch (sizeof(per_cpu__this_cpu_off)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; default: __bad_percpu_size(); } ret__; })))); })).event[item]++; >} > >static inline __attribute__((always_inline)) void count_vm_event(enum vm_event_item item) >{ > (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &(*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((&per_cpu__vm_event_states))); (typeof((&per_cpu__vm_event_states))) (__ptr + ((({ typeof(per_cpu__this_cpu_off) ret__; switch (sizeof(per_cpu__this_cpu_off)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; default: __bad_percpu_size(); } ret__; })))); })); })).event[item]++; > do { } while (0); >} > >static inline __attribute__((always_inline)) void __count_vm_events(enum vm_event_item item, long delta) >{ > (*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((&per_cpu__vm_event_states))); (typeof((&per_cpu__vm_event_states))) (__ptr + ((({ typeof(per_cpu__this_cpu_off) ret__; switch (sizeof(per_cpu__this_cpu_off)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; default: __bad_percpu_size(); } ret__; })))); })).event[item] += delta; >} > >static inline __attribute__((always_inline)) void count_vm_events(enum vm_event_item item, long delta) >{ > (*({ extern int simple_identifier_vm_event_states(void); do { } while (0); &(*({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((&per_cpu__vm_event_states))); (typeof((&per_cpu__vm_event_states))) (__ptr + ((({ typeof(per_cpu__this_cpu_off) ret__; switch (sizeof(per_cpu__this_cpu_off)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__this_cpu_off)); break; default: __bad_percpu_size(); } ret__; })))); })); })).event[item] += delta; > do { } while (0); >} > >extern void all_vm_events(unsigned long *); > >extern void vm_events_fold_cpu(int cpu); ># 126 "include/linux/vmstat.h" >extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; > >static inline __attribute__((always_inline)) void zone_page_state_add(long x, struct zone *zone, > enum zone_stat_item item) >{ > atomic_long_add(x, &zone->vm_stat[item]); > atomic_long_add(x, &vm_stat[item]); >} > >static inline __attribute__((always_inline)) unsigned long global_page_state(enum zone_stat_item item) >{ > long x = atomic_long_read(&vm_stat[item]); > > if (x < 0) > x = 0; > > return x; >} > >static inline __attribute__((always_inline)) unsigned long zone_page_state(struct zone *zone, > enum zone_stat_item item) >{ > long x = atomic_long_read(&zone->vm_stat[item]); > > if (x < 0) > x = 0; > > return x; >} ># 198 "include/linux/vmstat.h" >static inline __attribute__((always_inline)) void zap_zone_vm_stats(struct zone *zone) >{ > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(zone->vm_stat))) ? __constant_c_and_count_memset(((zone->vm_stat)),((0x01010101UL*(unsigned char)(0))),((sizeof(zone->vm_stat)))) : __constant_c_memset(((zone->vm_stat)),((0x01010101UL*(unsigned char)(0))),((sizeof(zone->vm_stat))))) : (__builtin_constant_p((sizeof(zone->vm_stat))) ? __memset_generic((((zone->vm_stat))),(((0))),(((sizeof(zone->vm_stat))))) : __memset_generic(((zone->vm_stat)),((0)),((sizeof(zone->vm_stat)))))); >} > >extern void inc_zone_state(struct zone *, enum zone_stat_item); > > >void __mod_zone_page_state(struct zone *, enum zone_stat_item item, int); >void __inc_zone_page_state(struct page *, enum zone_stat_item); >void __dec_zone_page_state(struct page *, enum zone_stat_item); > >void mod_zone_page_state(struct zone *, enum zone_stat_item, int); >void inc_zone_page_state(struct page *, enum zone_stat_item); >void dec_zone_page_state(struct page *, enum zone_stat_item); > >extern void inc_zone_state(struct zone *, enum zone_stat_item); >extern void __inc_zone_state(struct zone *, enum zone_stat_item); >extern void dec_zone_state(struct zone *, enum zone_stat_item); >extern void __dec_zone_state(struct zone *, enum zone_stat_item); > >void refresh_cpu_vm_stats(int); ># 579 "include/linux/mm.h" 2 > >static inline __attribute__((always_inline)) __attribute__((always_inline)) void *lowmem_page_address(struct page *page) >{ > return ((void *)((unsigned long)(((unsigned long)((page) - mem_map) + (0UL)) << 12)+((unsigned long)(0xC0000000UL)))); >} ># 599 "include/linux/mm.h" >void *page_address(struct page *page); >void set_page_address(struct page *page, void *virtual); >void page_address_init(void); ># 621 "include/linux/mm.h" >extern struct address_space swapper_space; >static inline __attribute__((always_inline)) struct address_space *page_mapping(struct page *page) >{ > struct address_space *mapping = page->mapping; > > do { if (__builtin_expect(!!(PageSlab(page)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/mm.h"), "i" (626), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > > if (__builtin_expect(!!(PageSwapCache(page)), 0)) > mapping = &swapper_space; > else > > if (__builtin_expect(!!((unsigned long)mapping & 1), 0)) > mapping = ((void *)0); > return mapping; >} > >static inline __attribute__((always_inline)) int PageAnon(struct page *page) >{ > return ((unsigned long)page->mapping & 1) != 0; >} > > > > > >static inline __attribute__((always_inline)) unsigned long page_index(struct page *page) >{ > if (__builtin_expect(!!(PageSwapCache(page)), 0)) > return ((page)->private); > return page->index; >} > > > > > > >static inline __attribute__((always_inline)) void reset_page_mapcount(struct page *page) >{ > (((&(page)->_mapcount)->counter) = (-1)); >} > >static inline __attribute__((always_inline)) int page_mapcount(struct page *page) >{ > return ((&(page)->_mapcount)->counter) + 1; >} > > > > >static inline __attribute__((always_inline)) int page_mapped(struct page *page) >{ > return ((&(page)->_mapcount)->counter) >= 0; >} ># 703 "include/linux/mm.h" >extern void show_free_areas(void); > > >int shmem_lock(struct file *file, int lock, struct user_struct *user); > > > > > > > >struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); > >int shmem_zero_setup(struct vm_area_struct *); ># 726 "include/linux/mm.h" >extern int can_do_mlock(void); >extern int user_shm_lock(size_t, struct user_struct *); >extern void user_shm_unlock(size_t, struct user_struct *); > > > > >struct zap_details { > struct vm_area_struct *nonlinear_vma; > struct address_space *check_mapping; > unsigned long first_index; > unsigned long last_index; > spinlock_t *i_mmap_lock; > unsigned long truncate_count; >}; > >struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, > pte_t pte); > >unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, > unsigned long size, struct zap_details *); >unsigned long unmap_vmas(struct mmu_gather **tlb, > struct vm_area_struct *start_vma, unsigned long start_addr, > unsigned long end_addr, unsigned long *nr_accounted, > struct zap_details *); ># 762 "include/linux/mm.h" >struct mm_walk { > int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *); > int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *); > int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *); > int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *); > int (*pte_hole)(unsigned long, unsigned long, void *); >}; > >int walk_page_range(const struct mm_struct *, unsigned long addr, > unsigned long end, const struct mm_walk *walk, > void *private); >void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, > unsigned long end, unsigned long floor, unsigned long ceiling); >void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, > unsigned long floor, unsigned long ceiling); >int copy_page_range(struct mm_struct *dst, struct mm_struct *src, > struct vm_area_struct *vma); >void unmap_mapping_range(struct address_space *mapping, > loff_t const holebegin, loff_t const holelen, int even_cows); > >static inline __attribute__((always_inline)) void unmap_shared_mapping_range(struct address_space *mapping, > loff_t const holebegin, loff_t const holelen) >{ > unmap_mapping_range(mapping, holebegin, holelen, 0); >} > >extern int vmtruncate(struct inode * inode, loff_t offset); >extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); > > >extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, > unsigned long address, int write_access); ># 805 "include/linux/mm.h" >extern int make_pages_present(unsigned long addr, unsigned long end); >extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); > >int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, > int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); >void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long); > >extern int try_to_release_page(struct page * page, gfp_t gfp_mask); >extern void do_invalidatepage(struct page *page, unsigned long offset); > >int __set_page_dirty_nobuffers(struct page *page); >int __set_page_dirty_no_writeback(struct page *page); >int redirty_page_for_writepage(struct writeback_control *wbc, > struct page *page); >int set_page_dirty(struct page *page); >int set_page_dirty_lock(struct page *page); >int clear_page_dirty_for_io(struct page *page); > >extern unsigned long move_page_tables(struct vm_area_struct *vma, > unsigned long old_addr, struct vm_area_struct *new_vma, > unsigned long new_addr, unsigned long len); >extern unsigned long do_mremap(unsigned long addr, > unsigned long old_len, unsigned long new_len, > unsigned long flags, unsigned long new_addr); >extern int mprotect_fixup(struct vm_area_struct *vma, > struct vm_area_struct **pprev, unsigned long start, > unsigned long end, unsigned long newflags); ># 848 "include/linux/mm.h" >struct shrinker { > int (*shrink)(int nr_to_scan, gfp_t gfp_mask); > int seeks; > > > struct list_head list; > long nr; >}; > >extern void register_shrinker(struct shrinker *); >extern void unregister_shrinker(struct shrinker *); > >int vma_wants_writenotify(struct vm_area_struct *vma); > >extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl); > > >static inline __attribute__((always_inline)) int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, > unsigned long address) >{ > return 0; >} > > > > > >static inline __attribute__((always_inline)) int __pmd_alloc(struct mm_struct *mm, pud_t *pud, > unsigned long address) >{ > return 0; >} > > > > >int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address); >int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); > > > > > > >static inline __attribute__((always_inline)) pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) >{ > return (__builtin_expect(!!(pgd_none(*pgd)), 0) && __pud_alloc(mm, pgd, address))? > ((void *)0): pud_offset(pgd, address); >} > >static inline __attribute__((always_inline)) pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) >{ > return (__builtin_expect(!!(pud_none(*pud)), 0) && __pmd_alloc(mm, pud, address))? > ((void *)0): pmd_offset(pud, address); >} ># 927 "include/linux/mm.h" >static inline __attribute__((always_inline)) void pgtable_page_ctor(struct page *page) >{ > do { do { static struct lock_class_key __key; __spin_lock_init((&((page)->ptl)), "__pte_lockptr(page)", &__key); } while (0); } while (0); > inc_zone_page_state(page, NR_PAGETABLE); >} > >static inline __attribute__((always_inline)) void pgtable_page_dtor(struct page *page) >{ > ((page)->mapping = ((void *)0)); > dec_zone_page_state(page, NR_PAGETABLE); >} ># 965 "include/linux/mm.h" >extern void free_area_init(unsigned long * zones_size); >extern void free_area_init_node(int nid, pg_data_t *pgdat, > unsigned long * zones_size, unsigned long zone_start_pfn, > unsigned long *zholes_size); ># 997 "include/linux/mm.h" >extern void free_area_init_nodes(unsigned long *max_zone_pfn); >extern void add_active_range(unsigned int nid, unsigned long start_pfn, > unsigned long end_pfn); >extern void shrink_active_range(unsigned int nid, unsigned long old_end_pfn, > unsigned long new_end_pfn); >extern void push_node_boundaries(unsigned int nid, unsigned long start_pfn, > unsigned long end_pfn); >extern void remove_all_active_ranges(void); >extern unsigned long absent_pages_in_range(unsigned long start_pfn, > unsigned long end_pfn); >extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); >extern unsigned long find_min_pfn_with_active_regions(void); >extern unsigned long find_max_pfn_with_active_regions(void); >extern void free_bootmem_with_active_regions(int nid, > unsigned long max_low_pfn); >extern void sparse_memory_present_with_active_regions(int nid); > >extern int early_pfn_to_nid(unsigned long pfn); > > >extern void set_dma_reserve(unsigned long new_dma_reserve); >extern void memmap_init_zone(unsigned long, int, unsigned long, > unsigned long, enum memmap_context); >extern void setup_per_zone_pages_min(void); >extern void mem_init(void); >extern void show_mem(void); >extern void si_meminfo(struct sysinfo * val); >extern void si_meminfo_node(struct sysinfo *val, int nid); > > > > >static inline __attribute__((always_inline)) void setup_per_cpu_pageset(void) {} > > > >void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); >void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *); >void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *); >struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma, > struct prio_tree_iter *iter); > > > > > >static inline __attribute__((always_inline)) void vma_nonlinear_insert(struct vm_area_struct *vma, > struct list_head *list) >{ > vma->shared.vm_set.parent = ((void *)0); > list_add_tail(&vma->shared.vm_set.list, list); >} > > >extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin); >extern void vma_adjust(struct vm_area_struct *vma, unsigned long start, > unsigned long end, unsigned long pgoff, struct vm_area_struct *insert); >extern struct vm_area_struct *vma_merge(struct mm_struct *, > struct vm_area_struct *prev, unsigned long addr, unsigned long end, > unsigned long vm_flags, struct anon_vma *, struct file *, unsigned long, > struct mempolicy *); >extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *); >extern int split_vma(struct mm_struct *, > struct vm_area_struct *, unsigned long addr, int new_below); >extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *); >extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *, > struct rb_node **, struct rb_node *); >extern void unlink_file_vma(struct vm_area_struct *); >extern struct vm_area_struct *copy_vma(struct vm_area_struct **, > unsigned long addr, unsigned long len, unsigned long pgoff); >extern void exit_mmap(struct mm_struct *); > > > >extern void added_exe_file_vma(struct mm_struct *mm); >extern void removed_exe_file_vma(struct mm_struct *mm); ># 1082 "include/linux/mm.h" >extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); >extern int install_special_mapping(struct mm_struct *mm, > unsigned long addr, unsigned long len, > unsigned long flags, struct page **pages); > >extern unsigned long get_unmapped_area_prot(struct file *, unsigned long, unsigned long, unsigned long, unsigned long, int); > >static inline __attribute__((always_inline)) unsigned long get_unmapped_area(struct file *file, unsigned long addr, > unsigned long len, unsigned long pgoff, unsigned long flags) >{ > return get_unmapped_area_prot(file, addr, len, pgoff, flags, 0); >} > >extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, > unsigned long len, unsigned long prot, > unsigned long flag, unsigned long pgoff); >extern unsigned long mmap_region(struct file *file, unsigned long addr, > unsigned long len, unsigned long flags, > unsigned int vm_flags, unsigned long pgoff, > int accountable); > >static inline __attribute__((always_inline)) unsigned long do_mmap(struct file *file, unsigned long addr, > unsigned long len, unsigned long prot, > unsigned long flag, unsigned long offset) >{ > unsigned long ret = -22; > if ((offset + (((len)+((1UL) << 12)-1)&(~(((1UL) << 12)-1)))) < offset) > goto out; > if (!(offset & ~(~(((1UL) << 12)-1)))) > ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> 12); >out: > return ret; >} > >extern int do_munmap(struct mm_struct *, unsigned long, size_t); > >extern unsigned long do_brk(unsigned long, unsigned long); > > >extern unsigned long page_unuse(struct page *); >extern void truncate_inode_pages(struct address_space *, loff_t); >extern void truncate_inode_pages_range(struct address_space *, > loff_t lstart, loff_t lend); > > >extern int filemap_fault(struct vm_area_struct *, struct vm_fault *); > > >int write_one_page(struct page *page, int wait); > > > > > >int do_page_cache_readahead(struct address_space *mapping, struct file *filp, > unsigned long offset, unsigned long nr_to_read); >int force_page_cache_readahead(struct address_space *mapping, struct file *filp, > unsigned long offset, unsigned long nr_to_read); > >void page_cache_sync_readahead(struct address_space *mapping, > struct file_ra_state *ra, > struct file *filp, > unsigned long offset, > unsigned long size); > >void page_cache_async_readahead(struct address_space *mapping, > struct file_ra_state *ra, > struct file *filp, > struct page *pg, > unsigned long offset, > unsigned long size); > >unsigned long max_sane_readahead(unsigned long nr); > > >extern int expand_stack(struct vm_area_struct *vma, unsigned long address); > > > >extern int expand_stack_downwards(struct vm_area_struct *vma, > unsigned long address); > > >extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr); >extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr, > struct vm_area_struct **pprev); > > > >static inline __attribute__((always_inline)) struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr) >{ > struct vm_area_struct * vma = find_vma(mm,start_addr); > > if (vma && end_addr <= vma->vm_start) > vma = ((void *)0); > return vma; >} > >static inline __attribute__((always_inline)) unsigned long vma_pages(struct vm_area_struct *vma) >{ > return (vma->vm_end - vma->vm_start) >> 12; >} > >pgprot_t vm_get_page_prot(unsigned long vm_flags); >struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); >int remap_pfn_range(struct vm_area_struct *, unsigned long addr, > unsigned long pfn, unsigned long size, pgprot_t); >int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); >int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, > unsigned long pfn); >int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, > unsigned long pfn); > >struct page *follow_page(struct vm_area_struct *, unsigned long address, > unsigned int foll_flags); > > > > > >typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, > void *data); >extern int apply_to_page_range(struct mm_struct *mm, unsigned long address, > unsigned long size, pte_fn_t fn, void *data); > > >void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); ># 1217 "include/linux/mm.h" >extern int debug_pagealloc_enabled; > >extern void kernel_map_pages(struct page *page, int numpages, int enable); > >static inline __attribute__((always_inline)) void enable_debug_pagealloc(void) >{ > debug_pagealloc_enabled = 1; >} > >extern bool kernel_page_present(struct page *page); ># 1239 "include/linux/mm.h" >extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); > >int in_gate_area_no_task(unsigned long addr); >int in_gate_area(struct task_struct *task, unsigned long addr); > > > > > >int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, > void *, size_t *, loff_t *); >unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, > unsigned long lru_pages); > > > > >extern int randomize_va_space; > > >const char * arch_vma_name(struct vm_area_struct *vma); >void print_vma_addr(char *prefix, unsigned long rip); > >struct page *sparse_mem_map_populate(unsigned long pnum, int nid); >pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); >pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node); >pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node); >pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); >void *vmemmap_alloc_block(unsigned long size, int node); >void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); >int vmemmap_populate_basepages(struct page *start_page, > unsigned long pages, int node); >int vmemmap_populate(struct page *start_page, unsigned long pages, int node); >void vmemmap_populate_print_last(void); ># 8 "include/linux/pagemap.h" 2 > > ># 1 "include/linux/highmem.h" 1 > > > > > ># 1 "include/linux/uaccess.h" 1 > > > > ># 1 "include/asm/uaccess.h" 1 > ># 1 "include/asm/uaccess_32.h" 1 ># 41 "include/asm/uaccess_32.h" >extern struct movsl_mask { > int mask; >} __attribute__((__aligned__((1 << (7))))) movsl_mask; ># 104 "include/asm/uaccess_32.h" >struct exception_table_entry { > unsigned long insn, fixup; >}; > >extern int fixup_exception(struct pt_regs *regs); ># 125 "include/asm/uaccess_32.h" >extern void __get_user_1(void); >extern void __get_user_2(void); >extern void __get_user_4(void); ># 178 "include/asm/uaccess_32.h" >extern void __put_user_bad(void); > > > > > >extern void __put_user_1(void); >extern void __put_user_2(void); >extern void __put_user_4(void); >extern void __put_user_8(void); ># 371 "include/asm/uaccess_32.h" >struct __large_struct { unsigned long buf[100]; }; ># 400 "include/asm/uaccess_32.h" >extern long __get_user_bad(void); ># 434 "include/asm/uaccess_32.h" >unsigned long __attribute__((warn_unused_result)) __copy_to_user_ll > (void *to, const void *from, unsigned long n); >unsigned long __attribute__((warn_unused_result)) __copy_from_user_ll > (void *to, const void *from, unsigned long n); >unsigned long __attribute__((warn_unused_result)) __copy_from_user_ll_nozero > (void *to, const void *from, unsigned long n); >unsigned long __attribute__((warn_unused_result)) __copy_from_user_ll_nocache > (void *to, const void *from, unsigned long n); >unsigned long __attribute__((warn_unused_result)) __copy_from_user_ll_nocache_nozero > (void *to, const void *from, unsigned long n); ># 464 "include/asm/uaccess_32.h" >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result)) >__copy_to_user_inatomic(void *to, const void *from, unsigned long n) >{ > if (__builtin_constant_p(n)) { > unsigned long ret; > > switch (n) { > case 1: > do { ret = 0; (void)0; switch (1) { case 1: asm volatile("1: mov""b"" %""b""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "iq" (*(u8 *)from), "m" ((*(struct __large_struct *)((u8 *)to))), "i" (1), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %""w""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir" (*(u8 *)from), "m" ((*(struct __large_struct *)((u8 *)to))), "i" (1), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %""""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir" (*(u8 *)from), "m" ((*(struct __large_struct *)((u8 *)to))), "i" (1), "0" (ret)); break; case 8: asm volatile("1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "4b" "\n" " .previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "2b" "," "4b" "\n" " .previous\n" : "=r" (ret) : "A" ((__typeof__(*(u8 *)to))(*(u8 *)from)), "r" ((u8 *)to), "i" (-14), "0" (ret)); break; default: __put_user_bad(); } } while (0); > > return ret; > case 2: > do { ret = 0; (void)0; switch (2) { case 1: asm volatile("1: mov""b"" %""b""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "iq" (*(u16 *)from), "m" ((*(struct __large_struct *)((u16 *)to))), "i" (2), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %""w""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir" (*(u16 *)from), "m" ((*(struct __large_struct *)((u16 *)to))), "i" (2), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %""""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir" (*(u16 *)from), "m" ((*(struct __large_struct *)((u16 *)to))), "i" (2), "0" (ret)); break; case 8: asm volatile("1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "4b" "\n" " .previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "2b" "," "4b" "\n" " .previous\n" : "=r" (ret) : "A" ((__typeof__(*(u16 *)to))(*(u16 *)from)), "r" ((u16 *)to), "i" (-14), "0" (ret)); break; default: __put_user_bad(); } } while (0); > > return ret; > case 4: > do { ret = 0; (void)0; switch (4) { case 1: asm volatile("1: mov""b"" %""b""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "iq" (*(u32 *)from), "m" ((*(struct __large_struct *)((u32 *)to))), "i" (4), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %""w""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir" (*(u32 *)from), "m" ((*(struct __large_struct *)((u32 *)to))), "i" (4), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %""""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir" (*(u32 *)from), "m" ((*(struct __large_struct *)((u32 *)to))), "i" (4), "0" (ret)); break; case 8: asm volatile("1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "4b" "\n" " .previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "2b" "," "4b" "\n" " .previous\n" : "=r" (ret) : "A" ((__typeof__(*(u32 *)to))(*(u32 *)from)), "r" ((u32 *)to), "i" (-14), "0" (ret)); break; default: __put_user_bad(); } } while (0); > > return ret; > } > } > return __copy_to_user_ll(to, from, n); >} ># 502 "include/asm/uaccess_32.h" >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result)) >__copy_to_user(void *to, const void *from, unsigned long n) >{ > do { __might_sleep("include/asm/uaccess_32.h", 505); _cond_resched(); } while (0); > return __copy_to_user_inatomic(to, from, n); >} > >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long >__copy_from_user_inatomic(void *to, const void *from, unsigned long n) >{ > > > > > > if (__builtin_constant_p(n)) { > unsigned long ret; > > switch (n) { > case 1: > do { ret = 0; (void)0; switch (1) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; default: (*(u8 *)to) = __get_user_bad(); } } while (0); > return ret; > case 2: > do { ret = 0; (void)0; switch (2) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; default: (*(u16 *)to) = __get_user_bad(); } } while (0); > return ret; > case 4: > do { ret = 0; (void)0; switch (4) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; default: (*(u32 *)to) = __get_user_bad(); } } while (0); > return ret; > } > } > return __copy_from_user_ll_nozero(to, from, n); >} ># 557 "include/asm/uaccess_32.h" >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long >__copy_from_user(void *to, const void *from, unsigned long n) >{ > do { __might_sleep("include/asm/uaccess_32.h", 560); _cond_resched(); } while (0); > if (__builtin_constant_p(n)) { > unsigned long ret; > > switch (n) { > case 1: > do { ret = 0; (void)0; switch (1) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; default: (*(u8 *)to) = __get_user_bad(); } } while (0); > return ret; > case 2: > do { ret = 0; (void)0; switch (2) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; default: (*(u16 *)to) = __get_user_bad(); } } while (0); > return ret; > case 4: > do { ret = 0; (void)0; switch (4) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; default: (*(u32 *)to) = __get_user_bad(); } } while (0); > return ret; > } > } > return __copy_from_user_ll(to, from, n); >} > > > >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __copy_from_user_nocache(void *to, > const void *from, unsigned long n) >{ > do { __might_sleep("include/asm/uaccess_32.h", 584); _cond_resched(); } while (0); > if (__builtin_constant_p(n)) { > unsigned long ret; > > switch (n) { > case 1: > do { ret = 0; (void)0; switch (1) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; default: (*(u8 *)to) = __get_user_bad(); } } while (0); > return ret; > case 2: > do { ret = 0; (void)0; switch (2) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; default: (*(u16 *)to) = __get_user_bad(); } } while (0); > return ret; > case 4: > do { ret = 0; (void)0; switch (4) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r" (*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; default: (*(u32 *)to) = __get_user_bad(); } } while (0); > return ret; > } > } > return __copy_from_user_ll_nocache(to, from, n); >} > >static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long >__copy_from_user_inatomic_nocache(void *to, const void *from, > unsigned long n) >{ > return __copy_from_user_ll_nocache_nozero(to, from, n); >} > >unsigned long __attribute__((warn_unused_result)) copy_to_user(void *to, > const void *from, unsigned long n); >unsigned long __attribute__((warn_unused_result)) copy_from_user(void *to, > const void *from, > unsigned long n); >long __attribute__((warn_unused_result)) strncpy_from_user(char *dst, const char *src, > long count); >long __attribute__((warn_unused_result)) __strncpy_from_user(char *dst, > const char *src, long count); ># 636 "include/asm/uaccess_32.h" >long strnlen_user(const char *str, long n); >unsigned long __attribute__((warn_unused_result)) clear_user(void *mem, unsigned long len); >unsigned long __attribute__((warn_unused_result)) __clear_user(void *mem, unsigned long len); ># 3 "include/asm/uaccess.h" 2 ># 6 "include/linux/uaccess.h" 2 ># 16 "include/linux/uaccess.h" >static inline __attribute__((always_inline)) void pagefault_disable(void) >{ > do { (current_thread_info()->preempt_count) += (1); } while (0); > > > > > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void pagefault_enable(void) >{ > > > > > __asm__ __volatile__("": : :"memory"); > do { (current_thread_info()->preempt_count) -= (1); } while (0); > > > > __asm__ __volatile__("": : :"memory"); > do { } while (0); >} ># 96 "include/linux/uaccess.h" >extern long probe_kernel_read(void *dst, void *src, size_t size); ># 107 "include/linux/uaccess.h" >extern long probe_kernel_write(void *dst, void *src, size_t size); ># 7 "include/linux/highmem.h" 2 > ># 1 "include/asm/cacheflush.h" 1 ># 56 "include/asm/cacheflush.h" >int _set_memory_uc(unsigned long addr, int numpages); >int _set_memory_wc(unsigned long addr, int numpages); >int _set_memory_wb(unsigned long addr, int numpages); >int set_memory_uc(unsigned long addr, int numpages); >int set_memory_wc(unsigned long addr, int numpages); >int set_memory_wb(unsigned long addr, int numpages); >int set_memory_x(unsigned long addr, int numpages); >int set_memory_nx(unsigned long addr, int numpages); >int set_memory_ro(unsigned long addr, int numpages); >int set_memory_rw(unsigned long addr, int numpages); >int set_memory_np(unsigned long addr, int numpages); >int set_memory_4k(unsigned long addr, int numpages); ># 89 "include/asm/cacheflush.h" >int set_pages_uc(struct page *page, int numpages); >int set_pages_wb(struct page *page, int numpages); >int set_pages_x(struct page *page, int numpages); >int set_pages_nx(struct page *page, int numpages); >int set_pages_ro(struct page *page, int numpages); >int set_pages_rw(struct page *page, int numpages); > > >void clflush_cache_range(void *addr, unsigned int size); > >void cpa_init(void); > > >void mark_rodata_ro(void); >extern const int rodata_test_data; > > > > > >static inline __attribute__((always_inline)) int rodata_test(void) >{ > return 0; >} ># 9 "include/linux/highmem.h" 2 > > >static inline __attribute__((always_inline)) void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) >{ >} > > > >static inline __attribute__((always_inline)) void flush_kernel_dcache_page(struct page *page) >{ >} > > > > ># 1 "include/asm/highmem.h" 1 ># 23 "include/asm/highmem.h" ># 1 "include/linux/interrupt.h" 1 ># 10 "include/linux/interrupt.h" ># 1 "include/linux/irqreturn.h" 1 ># 19 "include/linux/irqreturn.h" >typedef int irqreturn_t; ># 11 "include/linux/interrupt.h" 2 ># 1 "include/linux/hardirq.h" 1 > > > > ># 1 "include/linux/smp_lock.h" 1 > > > > ># 1 "include/linux/sched.h" 1 ># 44 "include/linux/sched.h" >struct sched_param { > int sched_priority; >}; ># 66 "include/linux/sched.h" ># 1 "include/asm/cputime.h" 1 ># 1 "include/asm-generic/cputime.h" 1 > > > > > > >typedef unsigned long cputime_t; ># 24 "include/asm-generic/cputime.h" >typedef u64 cputime64_t; ># 1 "include/asm/cputime.h" 2 ># 67 "include/linux/sched.h" 2 > > ># 1 "include/linux/sem.h" 1 > > > ># 1 "include/linux/ipc.h" 1 ># 9 "include/linux/ipc.h" >struct ipc_perm >{ > __kernel_key_t key; > __kernel_uid_t uid; > __kernel_gid_t gid; > __kernel_uid_t cuid; > __kernel_gid_t cgid; > __kernel_mode_t mode; > unsigned short seq; >}; > > ># 1 "include/asm/ipcbuf.h" 1 ># 14 "include/asm/ipcbuf.h" >struct ipc64_perm { > __kernel_key_t key; > __kernel_uid32_t uid; > __kernel_gid32_t gid; > __kernel_uid32_t cuid; > __kernel_gid32_t cgid; > __kernel_mode_t mode; > unsigned short __pad1; > unsigned short seq; > unsigned short __pad2; > unsigned long __unused1; > unsigned long __unused2; >}; ># 22 "include/linux/ipc.h" 2 ># 57 "include/linux/ipc.h" >struct ipc_kludge { > struct msgbuf *msgp; > long msgtyp; >}; ># 88 "include/linux/ipc.h" >struct kern_ipc_perm >{ > spinlock_t lock; > int deleted; > int id; > key_t key; > uid_t uid; > gid_t gid; > uid_t cuid; > gid_t cgid; > mode_t mode; > unsigned long seq; > void *security; >}; ># 5 "include/linux/sem.h" 2 ># 23 "include/linux/sem.h" >struct semid_ds { > struct ipc_perm sem_perm; > __kernel_time_t sem_otime; > __kernel_time_t sem_ctime; > struct sem *sem_base; > struct sem_queue *sem_pending; > struct sem_queue **sem_pending_last; > struct sem_undo *undo; > unsigned short sem_nsems; >}; > > ># 1 "include/asm/sembuf.h" 1 ># 13 "include/asm/sembuf.h" >struct semid64_ds { > struct ipc64_perm sem_perm; > __kernel_time_t sem_otime; > unsigned long __unused1; > __kernel_time_t sem_ctime; > unsigned long __unused2; > unsigned long sem_nsems; > unsigned long __unused3; > unsigned long __unused4; >}; ># 36 "include/linux/sem.h" 2 > > >struct sembuf { > unsigned short sem_num; > short sem_op; > short sem_flg; >}; > > >union semun { > int val; > struct semid_ds *buf; > unsigned short *array; > struct seminfo *__buf; > void *__pad; >}; > >struct seminfo { > int semmap; > int semmni; > int semmns; > int semmnu; > int semmsl; > int semopm; > int semume; > int semusz; > int semvmx; > int semaem; >}; ># 80 "include/linux/sem.h" ># 1 "include/asm/atomic.h" 1 ># 81 "include/linux/sem.h" 2 > >struct task_struct; > > >struct sem { > int semval; > int sempid; >}; > > >struct sem_array { > struct kern_ipc_perm sem_perm; > time_t sem_otime; > time_t sem_ctime; > struct sem *sem_base; > struct sem_queue *sem_pending; > struct sem_queue **sem_pending_last; > struct sem_undo *undo; > unsigned long sem_nsems; >}; > > >struct sem_queue { > struct sem_queue * next; > struct sem_queue ** prev; > struct task_struct* sleeper; > struct sem_undo * undo; > int pid; > int status; > struct sem_array * sma; > int id; > struct sembuf * sops; > int nsops; > int alter; >}; > > > > >struct sem_undo { > struct sem_undo * proc_next; > struct sem_undo * id_next; > int semid; > short * semadj; >}; > > > > >struct sem_undo_list { > atomic_t refcnt; > spinlock_t lock; > struct sem_undo *proc_list; >}; > >struct sysv_sem { > struct sem_undo_list *undo_list; >}; > > > >extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); >extern void exit_sem(struct task_struct *tsk); ># 70 "include/linux/sched.h" 2 ># 1 "include/linux/signal.h" 1 > > > ># 1 "include/asm/signal.h" 1 ># 10 "include/asm/signal.h" >struct siginfo; ># 28 "include/asm/signal.h" >typedef unsigned long old_sigset_t; > >typedef struct { > unsigned long sig[(64 / 32)]; >} sigset_t; ># 120 "include/asm/signal.h" ># 1 "include/asm-generic/signal.h" 1 ># 17 "include/asm-generic/signal.h" >typedef void __signalfn_t(int); >typedef __signalfn_t *__sighandler_t; > >typedef void __restorefn_t(void); >typedef __restorefn_t *__sigrestore_t; ># 121 "include/asm/signal.h" 2 > > > > > >struct old_sigaction { > __sighandler_t sa_handler; > old_sigset_t sa_mask; > unsigned long sa_flags; > __sigrestore_t sa_restorer; >}; > >struct sigaction { > __sighandler_t sa_handler; > unsigned long sa_flags; > __sigrestore_t sa_restorer; > sigset_t sa_mask; >}; > >struct k_sigaction { > struct sigaction sa; >}; ># 175 "include/asm/signal.h" >typedef struct sigaltstack { > void *ss_sp; > int ss_flags; > size_t ss_size; >} stack_t; ># 5 "include/linux/signal.h" 2 ># 1 "include/asm/siginfo.h" 1 > > > > > > > ># 1 "include/asm-generic/siginfo.h" 1 > > > > > > >typedef union sigval { > int sival_int; > void *sival_ptr; >} sigval_t; ># 40 "include/asm-generic/siginfo.h" >typedef struct siginfo { > int si_signo; > int si_errno; > int si_code; > > union { > int _pad[((128 - (3 * sizeof(int))) / sizeof(int))]; > > > struct { > pid_t _pid; > uid_t _uid; > } _kill; > > > struct { > timer_t _tid; > int _overrun; > char _pad[sizeof( uid_t) - sizeof(int)]; > sigval_t _sigval; > int _sys_private; > } _timer; > > > struct { > pid_t _pid; > uid_t _uid; > sigval_t _sigval; > } _rt; > > > struct { > pid_t _pid; > uid_t _uid; > int _status; > clock_t _utime; > clock_t _stime; > } _sigchld; > > > struct { > void *_addr; > > > > } _sigfault; > > > struct { > long _band; > int _fd; > } _sigpoll; > } _sifields; >} siginfo_t; ># 251 "include/asm-generic/siginfo.h" >typedef struct sigevent { > sigval_t sigev_value; > int sigev_signo; > int sigev_notify; > union { > int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))]; > int _tid; > > struct { > void (*_function)(sigval_t); > void *_attribute; > } _sigev_thread; > } _sigev_un; >} sigevent_t; > > > > > > > >struct siginfo; >void do_schedule_next_timer(struct siginfo *info); > > > > > >static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from) >{ > if (from->si_code < 0) > (__builtin_constant_p(sizeof(*to)) ? __constant_memcpy((to),(from),(sizeof(*to))) : __memcpy((to),(from),(sizeof(*to)))); > else > > (__builtin_constant_p((3 * sizeof(int)) + sizeof(from->_sifields._sigchld)) ? __constant_memcpy((to),(from),((3 * sizeof(int)) + sizeof(from->_sifields._sigchld))) : __memcpy((to),(from),((3 * sizeof(int)) + sizeof(from->_sifields._sigchld)))); >} > > > >extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from); ># 9 "include/asm/siginfo.h" 2 ># 6 "include/linux/signal.h" 2 ># 14 "include/linux/signal.h" >struct sigqueue { > struct list_head list; > int flags; > siginfo_t info; > struct user_struct *user; >}; > > > > >struct sigpending { > struct list_head list; > sigset_t signal; >}; ># 38 "include/linux/signal.h" >static inline __attribute__((always_inline)) void sigaddset(sigset_t *set, int _sig) >{ > unsigned long sig = _sig - 1; > if ((64 / 32) == 1) > set->sig[0] |= 1UL << sig; > else > set->sig[sig / 32] |= 1UL << (sig % 32); >} > >static inline __attribute__((always_inline)) void sigdelset(sigset_t *set, int _sig) >{ > unsigned long sig = _sig - 1; > if ((64 / 32) == 1) > set->sig[0] &= ~(1UL << sig); > else > set->sig[sig / 32] &= ~(1UL << (sig % 32)); >} > >static inline __attribute__((always_inline)) int sigismember(sigset_t *set, int _sig) >{ > unsigned long sig = _sig - 1; > if ((64 / 32) == 1) > return 1 & (set->sig[0] >> sig); > else > return 1 & (set->sig[sig / 32] >> (sig % 32)); >} > >static inline __attribute__((always_inline)) int sigfindinword(unsigned long word) >{ > return ffz(~word); >} > > > >static inline __attribute__((always_inline)) int sigisemptyset(sigset_t *set) >{ > extern void _NSIG_WORDS_is_unsupported_size(void); > switch ((64 / 32)) { > case 4: > return (set->sig[3] | set->sig[2] | > set->sig[1] | set->sig[0]) == 0; > case 2: > return (set->sig[1] | set->sig[0]) == 0; > case 1: > return set->sig[0] == 0; > default: > _NSIG_WORDS_is_unsupported_size(); > return 0; > } >} ># 119 "include/linux/signal.h" >static inline __attribute__((always_inline)) void sigorsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) | (b3)); r->sig[2] = ((a2) | (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) | (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) | (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } > > >static inline __attribute__((always_inline)) void sigandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & (b3)); r->sig[2] = ((a2) & (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } > > >static inline __attribute__((always_inline)) void signandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & ~(b3)); r->sig[2] = ((a2) & ~(b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & ~(b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & ~(b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } ># 149 "include/linux/signal.h" >static inline __attribute__((always_inline)) void signotset(sigset_t *set) { extern void _NSIG_WORDS_is_unsupported_size(void); switch ((64 / 32)) { case 4: set->sig[3] = (~(set->sig[3])); set->sig[2] = (~(set->sig[2])); case 2: set->sig[1] = (~(set->sig[1])); case 1: set->sig[0] = (~(set->sig[0])); break; default: _NSIG_WORDS_is_unsupported_size(); } } > > > > >static inline __attribute__((always_inline)) void sigemptyset(sigset_t *set) >{ > switch ((64 / 32)) { > default: > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(sigset_t))) ? __constant_c_and_count_memset(((set)),((0x01010101UL*(unsigned char)(0))),((sizeof(sigset_t)))) : __constant_c_memset(((set)),((0x01010101UL*(unsigned char)(0))),((sizeof(sigset_t))))) : (__builtin_constant_p((sizeof(sigset_t))) ? __memset_generic((((set))),(((0))),(((sizeof(sigset_t))))) : __memset_generic(((set)),((0)),((sizeof(sigset_t)))))); > break; > case 2: set->sig[1] = 0; > case 1: set->sig[0] = 0; > break; > } >} > >static inline __attribute__((always_inline)) void sigfillset(sigset_t *set) >{ > switch ((64 / 32)) { > default: > (__builtin_constant_p(-1) ? (__builtin_constant_p((sizeof(sigset_t))) ? __constant_c_and_count_memset(((set)),((0x01010101UL*(unsigned char)(-1))),((sizeof(sigset_t)))) : __constant_c_memset(((set)),((0x01010101UL*(unsigned char)(-1))),((sizeof(sigset_t))))) : (__builtin_constant_p((sizeof(sigset_t))) ? __memset_generic((((set))),(((-1))),(((sizeof(sigset_t))))) : __memset_generic(((set)),((-1)),((sizeof(sigset_t)))))); > break; > case 2: set->sig[1] = -1; > case 1: set->sig[0] = -1; > break; > } >} > > > >static inline __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask) >{ > set->sig[0] |= mask; >} > >static inline __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask) >{ > set->sig[0] &= ~mask; >} > >static inline __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask) >{ > return (set->sig[0] & mask) != 0; >} > >static inline __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask) >{ > set->sig[0] = mask; > switch ((64 / 32)) { > default: > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(long)*((64 / 32)-1))) ? __constant_c_and_count_memset(((&set->sig[1])),((0x01010101UL*(unsigned char)(0))),((sizeof(long)*((64 / 32)-1)))) : __constant_c_memset(((&set->sig[1])),((0x01010101UL*(unsigned char)(0))),((sizeof(long)*((64 / 32)-1))))) : (__builtin_constant_p((sizeof(long)*((64 / 32)-1))) ? __memset_generic((((&set->sig[1]))),(((0))),(((sizeof(long)*((64 / 32)-1))))) : __memset_generic(((&set->sig[1])),((0)),((sizeof(long)*((64 / 32)-1)))))); > break; > case 2: set->sig[1] = 0; > case 1: ; > } >} > >static inline __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask) >{ > set->sig[0] = ~mask; > switch ((64 / 32)) { > default: > (__builtin_constant_p(-1) ? (__builtin_constant_p((sizeof(long)*((64 / 32)-1))) ? __constant_c_and_count_memset(((&set->sig[1])),((0x01010101UL*(unsigned char)(-1))),((sizeof(long)*((64 / 32)-1)))) : __constant_c_memset(((&set->sig[1])),((0x01010101UL*(unsigned char)(-1))),((sizeof(long)*((64 / 32)-1))))) : (__builtin_constant_p((sizeof(long)*((64 / 32)-1))) ? __memset_generic((((&set->sig[1]))),(((-1))),(((sizeof(long)*((64 / 32)-1))))) : __memset_generic(((&set->sig[1])),((-1)),((sizeof(long)*((64 / 32)-1)))))); > break; > case 2: set->sig[1] = -1; > case 1: ; > } >} > > > >static inline __attribute__((always_inline)) void init_sigpending(struct sigpending *sig) >{ > sigemptyset(&sig->signal); > INIT_LIST_HEAD(&sig->list); >} > >extern void flush_sigqueue(struct sigpending *queue); > > >static inline __attribute__((always_inline)) int valid_signal(unsigned long sig) >{ > return sig <= 64 ? 1 : 0; >} > >extern int next_signal(struct sigpending *pending, sigset_t *mask); >extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); >extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); >extern long do_sigpending(void *, unsigned long); >extern int sigprocmask(int, sigset_t *, sigset_t *); >extern int show_unhandled_signals; > >struct pt_regs; >extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); >extern void exit_signals(struct task_struct *tsk); > >extern struct kmem_cache *sighand_cachep; > >int unhandled_signal(struct task_struct *tsk, int sig); ># 373 "include/linux/signal.h" >void signals_init(void); ># 71 "include/linux/sched.h" 2 ># 1 "include/linux/fs_struct.h" 1 > > > > > >struct fs_struct { > atomic_t count; > rwlock_t lock; > int umask; > struct path root, pwd, altroot; >}; > > > > > > > >extern struct kmem_cache *fs_cachep; > >extern void exit_fs(struct task_struct *); >extern void set_fs_altroot(void); >extern void set_fs_root(struct fs_struct *, struct path *); >extern void set_fs_pwd(struct fs_struct *, struct path *); >extern struct fs_struct *copy_fs_struct(struct fs_struct *); >extern void put_fs_struct(struct fs_struct *); ># 72 "include/linux/sched.h" 2 > > > > > ># 1 "include/linux/proportions.h" 1 ># 12 "include/linux/proportions.h" ># 1 "include/linux/percpu_counter.h" 1 ># 18 "include/linux/percpu_counter.h" >struct percpu_counter { > spinlock_t lock; > s64 count; > > struct list_head list; > > s32 *counters; >}; > > > > > > > >int percpu_counter_init(struct percpu_counter *fbc, s64 amount); >int percpu_counter_init_irq(struct percpu_counter *fbc, s64 amount); >void percpu_counter_destroy(struct percpu_counter *fbc); >void percpu_counter_set(struct percpu_counter *fbc, s64 amount); >void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch); >s64 __percpu_counter_sum(struct percpu_counter *fbc); > >static inline __attribute__((always_inline)) void percpu_counter_add(struct percpu_counter *fbc, s64 amount) >{ > __percpu_counter_add(fbc, amount, (32*2)); >} > >static inline __attribute__((always_inline)) s64 percpu_counter_sum_positive(struct percpu_counter *fbc) >{ > s64 ret = __percpu_counter_sum(fbc); > return ret < 0 ? 0 : ret; >} > >static inline __attribute__((always_inline)) s64 percpu_counter_sum(struct percpu_counter *fbc) >{ > return __percpu_counter_sum(fbc); >} > >static inline __attribute__((always_inline)) s64 percpu_counter_read(struct percpu_counter *fbc) >{ > return fbc->count; >} > > > > > > >static inline __attribute__((always_inline)) s64 percpu_counter_read_positive(struct percpu_counter *fbc) >{ > s64 ret = fbc->count; > > __asm__ __volatile__("": : :"memory"); > if (ret >= 0) > return ret; > return 1; >} ># 132 "include/linux/percpu_counter.h" >static inline __attribute__((always_inline)) void percpu_counter_inc(struct percpu_counter *fbc) >{ > percpu_counter_add(fbc, 1); >} > >static inline __attribute__((always_inline)) void percpu_counter_dec(struct percpu_counter *fbc) >{ > percpu_counter_add(fbc, -1); >} > >static inline __attribute__((always_inline)) void percpu_counter_sub(struct percpu_counter *fbc, s64 amount) >{ > percpu_counter_add(fbc, -amount); >} ># 13 "include/linux/proportions.h" 2 > > > >struct prop_global { > > > > > > int shift; > > > > > > > struct percpu_counter events; >}; > > > > > > >struct prop_descriptor { > int index; > struct prop_global pg[2]; > struct mutex mutex; >}; > >int prop_descriptor_init(struct prop_descriptor *pd, int shift); >void prop_change_shift(struct prop_descriptor *pd, int new_shift); > > > > > >struct prop_local_percpu { > > > > struct percpu_counter events; > > > > > int shift; > unsigned long period; > spinlock_t lock; >}; > >int prop_local_init_percpu(struct prop_local_percpu *pl); >void prop_local_destroy_percpu(struct prop_local_percpu *pl); >void __prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl); >void prop_fraction_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl, > long *numerator, long *denominator); > >static inline __attribute__((always_inline)) >void prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl) >{ > unsigned long flags; > > do { do { (flags) = __raw_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); > __prop_inc_percpu(pd, pl); > do { if (raw_irqs_disabled_flags(flags)) { raw_local_irq_restore(flags); trace_hardirqs_off(); } else { trace_hardirqs_on(); raw_local_irq_restore(flags); } } while (0); >} ># 89 "include/linux/proportions.h" >void __prop_inc_percpu_max(struct prop_descriptor *pd, > struct prop_local_percpu *pl, long frac); > > > > > > >struct prop_local_single { > > > > unsigned long events; > > > > > > int shift; > unsigned long period; > spinlock_t lock; >}; > > > > > >int prop_local_init_single(struct prop_local_single *pl); >void prop_local_destroy_single(struct prop_local_single *pl); >void __prop_inc_single(struct prop_descriptor *pd, struct prop_local_single *pl); >void prop_fraction_single(struct prop_descriptor *pd, struct prop_local_single *pl, > long *numerator, long *denominator); > >static inline __attribute__((always_inline)) >void prop_inc_single(struct prop_descriptor *pd, struct prop_local_single *pl) >{ > unsigned long flags; > > do { do { (flags) = __raw_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); > __prop_inc_single(pd, pl); > do { if (raw_irqs_disabled_flags(flags)) { raw_local_irq_restore(flags); trace_hardirqs_off(); } else { trace_hardirqs_on(); raw_local_irq_restore(flags); } } while (0); >} ># 78 "include/linux/sched.h" 2 ># 1 "include/linux/seccomp.h" 1 > > > > > > > ># 1 "include/asm/seccomp.h" 1 > ># 1 "include/asm/seccomp_32.h" 1 ># 9 "include/asm/seccomp_32.h" ># 1 "include/linux/unistd.h" 1 > > > > > > ># 1 "include/asm/unistd.h" 1 > > ># 1 "include/asm/unistd_32.h" 1 ># 4 "include/asm/unistd.h" 2 ># 8 "include/linux/unistd.h" 2 ># 10 "include/asm/seccomp_32.h" 2 ># 3 "include/asm/seccomp.h" 2 ># 9 "include/linux/seccomp.h" 2 > >typedef struct { int mode; } seccomp_t; > >extern void __secure_computing(int); >static inline __attribute__((always_inline)) void secure_computing(int this_syscall) >{ > if (__builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 7)), 0)) > __secure_computing(this_syscall); >} > >extern long prctl_get_seccomp(void); >extern long prctl_set_seccomp(unsigned long); ># 79 "include/linux/sched.h" 2 > ># 1 "include/linux/rtmutex.h" 1 ># 16 "include/linux/rtmutex.h" ># 1 "include/linux/plist.h" 1 ># 80 "include/linux/plist.h" >struct plist_head { > struct list_head prio_list; > struct list_head node_list; > > spinlock_t *lock; > >}; > >struct plist_node { > int prio; > struct plist_head plist; >}; ># 127 "include/linux/plist.h" >static inline __attribute__((always_inline)) void >plist_head_init(struct plist_head *head, spinlock_t *lock) >{ > INIT_LIST_HEAD(&head->prio_list); > INIT_LIST_HEAD(&head->node_list); > > head->lock = lock; > >} > > > > > > >static inline __attribute__((always_inline)) void plist_node_init(struct plist_node *node, int prio) >{ > node->prio = prio; > plist_head_init(&node->plist, ((void *)0)); >} > >extern void plist_add(struct plist_node *node, struct plist_head *head); >extern void plist_del(struct plist_node *node, struct plist_head *head); ># 195 "include/linux/plist.h" >static inline __attribute__((always_inline)) int plist_head_empty(const struct plist_head *head) >{ > return list_empty(&head->node_list); >} > > > > > >static inline __attribute__((always_inline)) int plist_node_empty(const struct plist_node *node) >{ > return plist_head_empty(&node->plist); >} ># 234 "include/linux/plist.h" >static inline __attribute__((always_inline)) struct plist_node* plist_first(const struct plist_head *head) >{ > return ({ const typeof( ((struct plist_node *)0)->plist.node_list ) *__mptr = (head->node_list.next); (struct plist_node *)( (char *)__mptr - __builtin_offsetof(struct plist_node,plist.node_list) );}); > >} ># 17 "include/linux/rtmutex.h" 2 ># 26 "include/linux/rtmutex.h" >struct rt_mutex { > spinlock_t wait_lock; > struct plist_head wait_list; > struct task_struct *owner; > > int save_state; > const char *name, *file; > int line; > void *magic; > >}; > >struct rt_mutex_waiter; >struct hrtimer_sleeper; > > > extern int rt_mutex_debug_check_no_locks_freed(const void *from, > unsigned long len); > extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task); ># 58 "include/linux/rtmutex.h" > extern void rt_mutex_debug_task_free(struct task_struct *tsk); ># 80 "include/linux/rtmutex.h" >static inline __attribute__((always_inline)) int rt_mutex_is_locked(struct rt_mutex *lock) >{ > return lock->owner != ((void *)0); >} > >extern void __rt_mutex_init(struct rt_mutex *lock, const char *name); >extern void rt_mutex_destroy(struct rt_mutex *lock); > >extern void rt_mutex_lock(struct rt_mutex *lock); >extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, > int detect_deadlock); >extern int rt_mutex_timed_lock(struct rt_mutex *lock, > struct hrtimer_sleeper *timeout, > int detect_deadlock); > >extern int rt_mutex_trylock(struct rt_mutex *lock); > >extern void rt_mutex_unlock(struct rt_mutex *lock); ># 81 "include/linux/sched.h" 2 > > ># 1 "include/linux/param.h" 1 ># 84 "include/linux/sched.h" 2 ># 1 "include/linux/resource.h" 1 > > > > > >struct task_struct; ># 24 "include/linux/resource.h" >struct rusage { > struct timeval ru_utime; > struct timeval ru_stime; > long ru_maxrss; > long ru_ixrss; > long ru_idrss; > long ru_isrss; > long ru_minflt; > long ru_majflt; > long ru_nswap; > long ru_inblock; > long ru_oublock; > long ru_msgsnd; > long ru_msgrcv; > long ru_nsignals; > long ru_nvcsw; > long ru_nivcsw; >}; > >struct rlimit { > unsigned long rlim_cur; > unsigned long rlim_max; >}; ># 74 "include/linux/resource.h" ># 1 "include/asm/resource.h" 1 ># 1 "include/asm-generic/resource.h" 1 ># 1 "include/asm/resource.h" 2 ># 75 "include/linux/resource.h" 2 > >int getrusage(struct task_struct *p, int who, struct rusage *ru); ># 85 "include/linux/sched.h" 2 > ># 1 "include/linux/hrtimer.h" 1 ># 24 "include/linux/hrtimer.h" >struct hrtimer_clock_base; >struct hrtimer_cpu_base; > > > > >enum hrtimer_mode { > HRTIMER_MODE_ABS, > HRTIMER_MODE_REL, >}; > > > > >enum hrtimer_restart { > HRTIMER_NORESTART, > HRTIMER_RESTART, >}; ># 53 "include/linux/hrtimer.h" >enum hrtimer_cb_mode { > HRTIMER_CB_SOFTIRQ, > HRTIMER_CB_IRQSAFE, > HRTIMER_CB_IRQSAFE_NO_RESTART, > HRTIMER_CB_IRQSAFE_NO_SOFTIRQ, >}; ># 112 "include/linux/hrtimer.h" >struct hrtimer { > struct rb_node node; > ktime_t expires; > enum hrtimer_restart (*function)(struct hrtimer *); > struct hrtimer_clock_base *base; > unsigned long state; > enum hrtimer_cb_mode cb_mode; > struct list_head cb_entry; > > void *start_site; > char start_comm[16]; > int start_pid; > >}; ># 134 "include/linux/hrtimer.h" >struct hrtimer_sleeper { > struct hrtimer timer; > struct task_struct *task; >}; ># 153 "include/linux/hrtimer.h" >struct hrtimer_clock_base { > struct hrtimer_cpu_base *cpu_base; > clockid_t index; > struct rb_root active; > struct rb_node *first; > ktime_t resolution; > ktime_t (*get_time)(void); > ktime_t (*get_softirq_time)(void); > ktime_t softirq_time; > > ktime_t offset; > int (*reprogram)(struct hrtimer *t, > struct hrtimer_clock_base *b, > ktime_t n); > >}; ># 189 "include/linux/hrtimer.h" >struct hrtimer_cpu_base { > spinlock_t lock; > struct hrtimer_clock_base clock_base[2]; > struct list_head cb_pending; > > ktime_t expires_next; > int hres_active; > unsigned long nr_events; > >}; > > >struct clock_event_device; > >extern void clock_was_set(void); >extern void hres_timers_resume(void); >extern void hrtimer_interrupt(struct clock_event_device *dev); > > > > >static inline __attribute__((always_inline)) ktime_t hrtimer_cb_get_time(struct hrtimer *timer) >{ > return timer->base->get_time(); >} > >static inline __attribute__((always_inline)) int hrtimer_is_hres_active(struct hrtimer *timer) >{ > return timer->base->cpu_base->hres_active; >} ># 260 "include/linux/hrtimer.h" >extern ktime_t ktime_get(void); >extern ktime_t ktime_get_real(void); > > > > >extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock, > enum hrtimer_mode mode); > > >extern void hrtimer_init_on_stack(struct hrtimer *timer, clockid_t which_clock, > enum hrtimer_mode mode); > >extern void destroy_hrtimer_on_stack(struct hrtimer *timer); ># 285 "include/linux/hrtimer.h" >extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, > const enum hrtimer_mode mode); >extern int hrtimer_cancel(struct hrtimer *timer); >extern int hrtimer_try_to_cancel(struct hrtimer *timer); > >static inline __attribute__((always_inline)) int hrtimer_restart(struct hrtimer *timer) >{ > return hrtimer_start(timer, timer->expires, HRTIMER_MODE_ABS); >} > > >extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); >extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); > >extern ktime_t hrtimer_get_next_event(void); > > > > > >static inline __attribute__((always_inline)) int hrtimer_active(const struct hrtimer *timer) >{ > return timer->state != 0x00; >} > > > > >static inline __attribute__((always_inline)) int hrtimer_is_queued(struct hrtimer *timer) >{ > return timer->state & > (0x01 | 0x04); >} > > > > > >static inline __attribute__((always_inline)) int hrtimer_callback_running(struct hrtimer *timer) >{ > return timer->state & 0x02; >} > > >extern u64 >hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); > > >static inline __attribute__((always_inline)) u64 hrtimer_forward_now(struct hrtimer *timer, > ktime_t interval) >{ > return hrtimer_forward(timer, timer->base->get_time(), interval); >} > > >extern long hrtimer_nanosleep(struct timespec *rqtp, > struct timespec *rmtp, > const enum hrtimer_mode mode, > const clockid_t clockid); >extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); > >extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, > struct task_struct *tsk); > > >extern void hrtimer_run_queues(void); >extern void hrtimer_run_pending(void); > > >extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) hrtimers_init(void); > > >extern u64 ktime_divns(const ktime_t kt, s64 div); > > > > > >extern void sysrq_timer_list_show(void); > > > > > > >extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, > void *timerf, char *comm, > unsigned int timer_flag); > >static inline __attribute__((always_inline)) void timer_stats_account_hrtimer(struct hrtimer *timer) >{ > timer_stats_update_stats(timer, timer->start_pid, timer->start_site, > timer->function, timer->start_comm, 0); >} > >extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, > void *addr); > >static inline __attribute__((always_inline)) void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) >{ > __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); >} > >static inline __attribute__((always_inline)) void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) >{ > timer->start_site = ((void *)0); >} ># 87 "include/linux/sched.h" 2 ># 1 "include/linux/task_io_accounting.h" 1 ># 12 "include/linux/task_io_accounting.h" >struct task_io_accounting { > > > > > u64 read_bytes; > > > > > > u64 write_bytes; ># 32 "include/linux/task_io_accounting.h" > u64 cancelled_write_bytes; >}; ># 88 "include/linux/sched.h" 2 > ># 1 "include/linux/latencytop.h" 1 ># 17 "include/linux/latencytop.h" >struct latency_record { > unsigned long backtrace[12]; > unsigned int count; > unsigned long time; > unsigned long max; >}; > > >struct task_struct; > >void account_scheduler_latency(struct task_struct *task, int usecs, int inter); > >void clear_all_latency_tracing(struct task_struct *p); ># 90 "include/linux/sched.h" 2 > > > >struct mem_cgroup; >struct exec_domain; >struct futex_pi_state; >struct robust_list_head; >struct bio; > >extern int exec_shield; >extern int print_fatal_signals; ># 118 "include/linux/sched.h" >extern unsigned long avenrun[]; ># 132 "include/linux/sched.h" >extern unsigned long total_forks; >extern int nr_threads; >extern __typeof__(unsigned long) per_cpu__process_counts; >extern int nr_processes(void); >extern unsigned long nr_running(void); >extern unsigned long nr_uninterruptible(void); >extern unsigned long nr_active(void); >extern unsigned long nr_iowait(void); >extern unsigned long weighted_cpuload(const int cpu); > >struct seq_file; >struct cfs_rq; >struct task_group; > >extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); >extern void proc_sched_set_task(struct task_struct *p); >extern void >print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq); ># 164 "include/linux/sched.h" >extern unsigned long long time_sync_thresh; ># 241 "include/linux/sched.h" >extern rwlock_t tasklist_lock; >extern spinlock_t mmlist_lock; > >struct task_struct; > >extern void sched_init(void); >extern void sched_init_smp(void); >extern __attribute__((regparm(0))) void schedule_tail(struct task_struct *prev); >extern void init_idle(struct task_struct *idle, int cpu); >extern void init_idle_bootup_task(struct task_struct *idle); > >extern cpumask_t nohz_cpu_mask; > >extern int select_nohz_load_balancer(int cpu); > > > > > > > >extern unsigned long rt_needs_cpu(int cpu); > > > > >extern void show_state_filter(unsigned long state_filter); > >static inline __attribute__((always_inline)) void show_state(void) >{ > show_state_filter(0); >} > >extern void show_regs(struct pt_regs *); > > > > > > >extern void show_stack(struct task_struct *task, unsigned long *sp); > >void io_schedule(void); >long io_schedule_timeout(long timeout); > >extern void cpu_init (void); >extern void trap_init(void); >extern void account_process_tick(struct task_struct *task, int user); >extern void update_process_times(int user); >extern void scheduler_tick(void); >extern void hrtick_resched(void); > >extern void sched_show_task(struct task_struct *p); > > >extern void softlockup_tick(void); >extern void spawn_softlockup_task(void); >extern void touch_softlockup_watchdog(void); >extern void touch_all_softlockup_watchdogs(void); >extern unsigned long softlockup_thresh; >extern unsigned long sysctl_hung_task_check_count; >extern unsigned long sysctl_hung_task_timeout_secs; >extern unsigned long sysctl_hung_task_warnings; ># 324 "include/linux/sched.h" >extern char __sched_text_start[], __sched_text_end[]; > > >extern int in_sched_functions(unsigned long addr); > > >extern signed long schedule_timeout(signed long timeout); >extern signed long schedule_timeout_interruptible(signed long timeout); >extern signed long schedule_timeout_killable(signed long timeout); >extern signed long schedule_timeout_uninterruptible(signed long timeout); > __attribute__((regparm(0))) void schedule(void); > >struct nsproxy; >struct user_namespace; > > > > >extern int sysctl_max_map_count; > ># 1 "include/linux/aio.h" 1 > > > > > ># 1 "include/linux/aio_abi.h" 1 ># 32 "include/linux/aio_abi.h" >typedef unsigned long aio_context_t; > >enum { > IOCB_CMD_PREAD = 0, > IOCB_CMD_PWRITE = 1, > IOCB_CMD_FSYNC = 2, > IOCB_CMD_FDSYNC = 3, > > > > > IOCB_CMD_NOOP = 6, > IOCB_CMD_PREADV = 7, > IOCB_CMD_PWRITEV = 8, >}; ># 57 "include/linux/aio_abi.h" >struct io_event { > __u64 data; > __u64 obj; > __s64 res; > __s64 res2; >}; ># 78 "include/linux/aio_abi.h" >struct iocb { > > __u64 aio_data; > __u32 aio_key, aio_reserved1; > > > > __u16 aio_lio_opcode; > __s16 aio_reqprio; > __u32 aio_fildes; > > __u64 aio_buf; > __u64 aio_nbytes; > __s64 aio_offset; > > > __u64 aio_reserved2; > > > __u32 aio_flags; > > > > > > __u32 aio_resfd; >}; ># 7 "include/linux/aio.h" 2 ># 1 "include/linux/uio.h" 1 ># 16 "include/linux/uio.h" >struct iovec >{ > void *iov_base; > __kernel_size_t iov_len; >}; > > > >struct kvec { > void *iov_base; > size_t iov_len; >}; ># 45 "include/linux/uio.h" >static inline __attribute__((always_inline)) size_t iov_length(const struct iovec *iov, unsigned long nr_segs) >{ > unsigned long seg; > size_t ret = 0; > > for (seg = 0; seg < nr_segs; seg++) > ret += iov[seg].iov_len; > return ret; >} > >unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); ># 8 "include/linux/aio.h" 2 > ># 1 "include/asm/atomic.h" 1 ># 10 "include/linux/aio.h" 2 > > > > > >struct kioctx; ># 87 "include/linux/aio.h" >struct kiocb { > struct list_head ki_run_list; > unsigned long ki_flags; > int ki_users; > unsigned ki_key; > > struct file *ki_filp; > struct kioctx *ki_ctx; > int (*ki_cancel)(struct kiocb *, struct io_event *); > ssize_t (*ki_retry)(struct kiocb *); > void (*ki_dtor)(struct kiocb *); > > union { > void *user; > struct task_struct *tsk; > } ki_obj; > > __u64 ki_user_data; > wait_queue_t ki_wait; > loff_t ki_pos; > > void *private; > > unsigned short ki_opcode; > size_t ki_nbytes; > char *ki_buf; > size_t ki_left; > struct iovec ki_inline_vec; > struct iovec *ki_iovec; > unsigned long ki_nr_segs; > unsigned long ki_cur_seg; > > struct list_head ki_list; > > > > > > > struct file *ki_eventfd; >}; ># 149 "include/linux/aio.h" >struct aio_ring { > unsigned id; > unsigned nr; > unsigned head; > unsigned tail; > > unsigned magic; > unsigned compat_features; > unsigned incompat_features; > unsigned header_length; > > > struct io_event io_events[0]; >}; > > > > >struct aio_ring_info { > unsigned long mmap_base; > unsigned long mmap_size; > > struct page **ring_pages; > spinlock_t ring_lock; > long nr_pages; > > unsigned nr, tail; > > struct page *internal_pages[8]; >}; > >struct kioctx { > atomic_t users; > int dead; > struct mm_struct *mm; > > > unsigned long user_id; > struct kioctx *next; > > wait_queue_head_t wait; > > spinlock_t ctx_lock; > > int reqs_active; > struct list_head active_reqs; > struct list_head run_list; > > > unsigned max_reqs; > > struct aio_ring_info ring_info; > > struct delayed_work wq; >}; > > >extern unsigned aio_max_size; > >extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); >extern int aio_put_req(struct kiocb *iocb); >extern void kick_iocb(struct kiocb *iocb); >extern int aio_complete(struct kiocb *iocb, long res, long res2); >struct mm_struct; >extern void exit_aio(struct mm_struct *mm); > > > > > >static inline __attribute__((always_inline)) struct kiocb *list_kiocb(struct list_head *h) >{ > return ({ const typeof( ((struct kiocb *)0)->ki_list ) *__mptr = (h); (struct kiocb *)( (char *)__mptr - __builtin_offsetof(struct kiocb,ki_list) );}); >} > > >extern unsigned long aio_nr; >extern unsigned long aio_max_nr; ># 345 "include/linux/sched.h" 2 > >extern unsigned long >arch_get_unmapped_area(struct file *, unsigned long, unsigned long, > unsigned long, unsigned long); > >extern unsigned long >arch_get_unmapped_exec_area(struct file *, unsigned long, unsigned long, > unsigned long, unsigned long); >extern unsigned long >arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, > unsigned long len, unsigned long pgoff, > unsigned long flags); >extern void arch_unmap_area(struct mm_struct *, unsigned long); >extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); ># 396 "include/linux/sched.h" >extern void set_dumpable(struct mm_struct *mm, int value); >extern int get_dumpable(struct mm_struct *mm); ># 419 "include/linux/sched.h" >struct sighand_struct { > atomic_t count; > struct k_sigaction action[64]; > spinlock_t siglock; > wait_queue_head_t signalfd_wqh; >}; > >struct pacct_struct { > int ac_flag; > long ac_exitcode; > unsigned long ac_mem; > cputime_t ac_utime, ac_stime; > unsigned long ac_minflt, ac_majflt; >}; ># 441 "include/linux/sched.h" >struct signal_struct { > atomic_t count; > atomic_t live; > > wait_queue_head_t wait_chldexit; > > > struct task_struct *curr_target; > > > struct sigpending shared_pending; > > > int group_exit_code; > > > > > > struct task_struct *group_exit_task; > int notify_count; > > > int group_stop_count; > unsigned int flags; > > > struct list_head posix_timers; > > > struct hrtimer real_timer; > struct pid *leader_pid; > ktime_t it_real_incr; > > > cputime_t it_prof_expires, it_virt_expires; > cputime_t it_prof_incr, it_virt_incr; ># 486 "include/linux/sched.h" > union { > pid_t pgrp ; > pid_t __pgrp; > }; > > struct pid *tty_old_pgrp; > > union { > pid_t session ; > pid_t __session; > }; > > > int leader; > > struct tty_struct *tty; > > > > > > > > cputime_t utime, stime, cutime, cstime; > cputime_t gtime; > cputime_t cgtime; > unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; > unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; > unsigned long inblock, oublock, cinblock, coublock; > > > > > > > > unsigned long long sum_sched_runtime; ># 533 "include/linux/sched.h" > struct rlimit rlim[16]; > > struct list_head cpu_timers[3]; > > > > > struct key *session_keyring; > struct key *process_keyring; > > > struct pacct_struct pacct; > > > struct taskstats *stats; > > > unsigned audit_tty; > struct tty_audit_buf *tty_audit_buf; > >}; ># 577 "include/linux/sched.h" >static inline __attribute__((always_inline)) int signal_group_exit(const struct signal_struct *sig) >{ > return (sig->flags & 0x00000008) || > (sig->group_exit_task != ((void *)0)); >} > > > > >struct user_struct { > atomic_t __count; > atomic_t processes; > atomic_t files; > atomic_t sigpending; > > atomic_t inotify_watches; > atomic_t inotify_devs; > > > > unsigned long mq_bytes; > > unsigned long locked_shm; > > > struct key *uid_keyring; > struct key *session_keyring; > > > > struct hlist_node uidhash_node; > uid_t uid; ># 617 "include/linux/sched.h" >}; > >extern int uids_sysfs_init(void); > >extern struct user_struct *find_user(uid_t); > >extern struct user_struct root_user; > > >struct backing_dev_info; >struct reclaim_state; > > >struct sched_info { > > unsigned long pcount; > unsigned long long cpu_time, > run_delay; > > > unsigned long long last_arrival, > last_queued; > > > unsigned int bkl_count; > >}; > > > >extern const struct file_operations proc_schedstat_operations; > > > >struct task_delay_info { > spinlock_t lock; > unsigned int flags; ># 670 "include/linux/sched.h" > struct timespec blkio_start, blkio_end; > u64 blkio_delay; > u64 swapin_delay; > u32 blkio_count; > > u32 swapin_count; > >}; > > >static inline __attribute__((always_inline)) int sched_info_on(void) >{ > > return 1; > > > > > > >} > >enum cpu_idle_type { > CPU_IDLE, > CPU_NOT_IDLE, > CPU_NEWLY_IDLE, > CPU_MAX_IDLE_TYPES >}; ># 736 "include/linux/sched.h" >struct sched_group { > struct sched_group *next; > cpumask_t cpumask; > > > > > > > unsigned int __cpu_power; > > > > > u32 reciprocal_cpu_power; >}; > >enum sched_domain_level { > SD_LV_NONE = 0, > SD_LV_SIBLING, > SD_LV_MC, > SD_LV_CPU, > SD_LV_NODE, > SD_LV_ALLNODES, > SD_LV_MAX >}; > >struct sched_domain_attr { > int relax_domain_level; >}; > > > > > >struct sched_domain { > > struct sched_domain *parent; > struct sched_domain *child; > struct sched_group *groups; > cpumask_t span; > unsigned long min_interval; > unsigned long max_interval; > unsigned int busy_factor; > unsigned int imbalance_pct; > unsigned int cache_nice_tries; > unsigned int busy_idx; > unsigned int idle_idx; > unsigned int newidle_idx; > unsigned int wake_idx; > unsigned int forkexec_idx; > int flags; > enum sched_domain_level level; > > > unsigned long last_balance; > unsigned int balance_interval; > unsigned int nr_balance_failed; > > > > unsigned int lb_count[CPU_MAX_IDLE_TYPES]; > unsigned int lb_failed[CPU_MAX_IDLE_TYPES]; > unsigned int lb_balanced[CPU_MAX_IDLE_TYPES]; > unsigned int lb_imbalance[CPU_MAX_IDLE_TYPES]; > unsigned int lb_gained[CPU_MAX_IDLE_TYPES]; > unsigned int lb_hot_gained[CPU_MAX_IDLE_TYPES]; > unsigned int lb_nobusyg[CPU_MAX_IDLE_TYPES]; > unsigned int lb_nobusyq[CPU_MAX_IDLE_TYPES]; > > > unsigned int alb_count; > unsigned int alb_failed; > unsigned int alb_pushed; > > > unsigned int sbe_count; > unsigned int sbe_balanced; > unsigned int sbe_pushed; > > > unsigned int sbf_count; > unsigned int sbf_balanced; > unsigned int sbf_pushed; > > > unsigned int ttwu_wake_remote; > unsigned int ttwu_move_affine; > unsigned int ttwu_move_balance; > >}; > >extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new, > struct sched_domain_attr *dattr_new); >extern int arch_reinit_sched_domains(void); ># 840 "include/linux/sched.h" >static inline __attribute__((always_inline)) int above_background_load(void) >{ > unsigned long cpu; > > for (((cpu)) = __first_cpu(&(cpu_online_map)); ((cpu)) < 32; ((cpu)) = __next_cpu((((cpu))), &((cpu_online_map)))) { > if (weighted_cpuload(cpu) >= (1L << 10)) > return 1; > } > return 0; >} > >struct io_context; > > >struct group_info { > int ngroups; > atomic_t usage; > gid_t small_block[32]; > int nblocks; > gid_t *blocks[0]; >}; ># 877 "include/linux/sched.h" >extern struct group_info *groups_alloc(int gidsetsize); >extern void groups_free(struct group_info *group_info); >extern int set_current_groups(struct group_info *group_info); >extern int groups_search(struct group_info *group_info, gid_t grp); > > > > > > > >static inline __attribute__((always_inline)) void prefetch_stack(struct task_struct *t) { } > > >struct audit_context; >struct mempolicy; >struct pipe_inode_info; >struct uts_namespace; > >struct rq; >struct sched_domain; > >struct sched_class { > const struct sched_class *next; > > void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup); > void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); > void (*yield_task) (struct rq *rq); > int (*select_task_rq)(struct task_struct *p, int sync); > > void (*check_preempt_curr) (struct rq *rq, struct task_struct *p); > > struct task_struct * (*pick_next_task) (struct rq *rq); > void (*put_prev_task) (struct rq *rq, struct task_struct *p); > > > unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, > struct rq *busiest, unsigned long max_load_move, > struct sched_domain *sd, enum cpu_idle_type idle, > int *all_pinned, int *this_best_prio); > > int (*move_one_task) (struct rq *this_rq, int this_cpu, > struct rq *busiest, struct sched_domain *sd, > enum cpu_idle_type idle); > void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); > void (*post_schedule) (struct rq *this_rq); > void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); > > > void (*set_curr_task) (struct rq *rq); > void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); > void (*task_new) (struct rq *rq, struct task_struct *p); > void (*set_cpus_allowed)(struct task_struct *p, > const cpumask_t *newmask); > > void (*join_domain)(struct rq *rq); > void (*leave_domain)(struct rq *rq); > > void (*switched_from) (struct rq *this_rq, struct task_struct *task, > int running); > void (*switched_to) (struct rq *this_rq, struct task_struct *task, > int running); > void (*prio_changed) (struct rq *this_rq, struct task_struct *task, > int oldprio, int running); > > > void (*moved_group) (struct task_struct *p); > >}; > >struct load_weight { > unsigned long weight, inv_weight; >}; ># 961 "include/linux/sched.h" >struct sched_entity { > struct load_weight load; > struct rb_node run_node; > struct list_head group_node; > unsigned int on_rq; > > u64 exec_start; > u64 sum_exec_runtime; > u64 vruntime; > u64 prev_sum_exec_runtime; > > u64 last_wakeup; > u64 avg_overlap; > > > u64 wait_start; > u64 wait_max; > u64 wait_count; > u64 wait_sum; > > u64 sleep_start; > u64 sleep_max; > s64 sum_sleep_runtime; > > u64 block_start; > u64 block_max; > u64 exec_max; > u64 slice_max; > > u64 nr_migrations; > u64 nr_migrations_cold; > u64 nr_failed_migrations_affine; > u64 nr_failed_migrations_running; > u64 nr_failed_migrations_hot; > u64 nr_forced_migrations; > u64 nr_forced2_migrations; > > u64 nr_wakeups; > u64 nr_wakeups_sync; > u64 nr_wakeups_migrate; > u64 nr_wakeups_local; > u64 nr_wakeups_remote; > u64 nr_wakeups_affine; > u64 nr_wakeups_affine_attempts; > u64 nr_wakeups_passive; > u64 nr_wakeups_idle; > > > > struct sched_entity *parent; > > struct cfs_rq *cfs_rq; > > struct cfs_rq *my_q; > >}; > >struct sched_rt_entity { > struct list_head run_list; > unsigned int time_slice; > unsigned long timeout; > int nr_cpus_allowed; > > struct sched_rt_entity *back; > > struct sched_rt_entity *parent; > > struct rt_rq *rt_rq; > > struct rt_rq *my_q; > >}; > >struct task_struct { > volatile long state; > void *stack; > atomic_t usage; > unsigned int flags; > unsigned int ptrace; > > int lock_depth; > > > > > > > > int prio, static_prio, normal_prio; > const struct sched_class *sched_class; > struct sched_entity se; > struct sched_rt_entity rt; > > > > struct hlist_head preempt_notifiers; ># 1067 "include/linux/sched.h" > unsigned char fpu_counter; > s8 oomkilladj; > > unsigned int btrace_seq; > > > unsigned int policy; > cpumask_t cpus_allowed; > > > > > > > > struct sched_info sched_info; > > > struct list_head tasks; > > > > > struct list_head ptrace_children; > struct list_head ptrace_list; > > struct mm_struct *mm, *active_mm; > > > struct linux_binfmt *binfmt; > int exit_state; > int exit_code, exit_signal; > int pdeath_signal; > > unsigned int personality; > unsigned did_exec:1; > pid_t pid; > pid_t tgid; ># 1115 "include/linux/sched.h" > struct task_struct *real_parent; > struct task_struct *parent; > > > > > struct list_head children; > struct list_head sibling; > struct task_struct *group_leader; > > > struct pid_link pids[PIDTYPE_MAX]; > struct list_head thread_group; > > struct completion *vfork_done; > int *set_child_tid; > int *clear_child_tid; > > unsigned int rt_priority; > cputime_t utime, stime, utimescaled, stimescaled; > cputime_t gtime; > cputime_t prev_utime, prev_stime; > unsigned long nvcsw, nivcsw; > struct timespec start_time; > struct timespec real_start_time; > > unsigned long min_flt, maj_flt; > > cputime_t it_prof_expires, it_virt_expires; > unsigned long long it_sched_expires; > struct list_head cpu_timers[3]; > > > uid_t uid,euid,suid,fsuid; > gid_t gid,egid,sgid,fsgid; > struct group_info *group_info; > kernel_cap_t cap_effective, cap_inheritable, cap_permitted, cap_bset; > unsigned securebits; > struct user_struct *user; > > struct key *request_key_auth; > struct key *thread_keyring; > unsigned char jit_keyring; > > char comm[16]; > > > > > int link_count, total_link_count; > > > struct sysv_sem sysvsem; > > > > unsigned long last_switch_timestamp; > unsigned long last_switch_count; > > > struct thread_struct thread; > > struct fs_struct *fs; > > struct files_struct *files; > > struct nsproxy *nsproxy; > > struct signal_struct *signal; > struct sighand_struct *sighand; > > sigset_t blocked, real_blocked; > sigset_t saved_sigmask; > struct sigpending pending; > > unsigned long sas_ss_sp; > size_t sas_ss_size; > int (*notifier)(void *priv); > void *notifier_data; > sigset_t *notifier_mask; > > void *security; > > struct audit_context *audit_context; > > uid_t loginuid; > unsigned int sessionid; > > seccomp_t seccomp; > > > u32 parent_exec_id; > u32 self_exec_id; > > spinlock_t alloc_lock; > > > spinlock_t pi_lock; > > > > struct plist_head pi_waiters; > > struct rt_mutex_waiter *pi_blocked_on; > > > > > struct mutex_waiter *blocked_on; > > > unsigned int irq_events; > int hardirqs_enabled; > unsigned long hardirq_enable_ip; > unsigned int hardirq_enable_event; > unsigned long hardirq_disable_ip; > unsigned int hardirq_disable_event; > int softirqs_enabled; > unsigned long softirq_disable_ip; > unsigned int softirq_disable_event; > unsigned long softirq_enable_ip; > unsigned int softirq_enable_event; > int hardirq_context; > int softirq_context; > > > > u64 curr_chain_key; > int lockdep_depth; > struct held_lock held_locks[48UL]; > unsigned int lockdep_recursion; > > > > void *journal_info; > > > struct bio *bio_list, **bio_tail; > > > struct reclaim_state *reclaim_state; > > struct backing_dev_info *backing_dev_info; > > struct io_context *io_context; > > unsigned long ptrace_message; > siginfo_t *last_siginfo; > > > u64 rchar, wchar, syscr, syscw; > > struct task_io_accounting ioac; > > u64 acct_rss_mem1; > u64 acct_vm_mem1; > cputime_t acct_stimexpd; > > > > > > > nodemask_t mems_allowed; > int cpuset_mems_generation; > int cpuset_mem_spread_rotor; > > > > struct css_set *cgroups; > > struct list_head cg_list; > > > struct robust_list_head *robust_list; > > > > struct list_head pi_state_list; > struct futex_pi_state *pi_state_cache; > > atomic_t fs_excl; > struct rcu_head rcu; > > > > > struct pipe_inode_info *splice_pipe; > > struct task_delay_info *delays; > > > int make_it_fail; > > struct prop_local_single dirties; > > int latency_record_count; > struct latency_record latency_record[32]; > >}; ># 1335 "include/linux/sched.h" >static inline __attribute__((always_inline)) int rt_prio(int prio) >{ > if (__builtin_expect(!!(prio < 100), 0)) > return 1; > return 0; >} > >static inline __attribute__((always_inline)) int rt_task(struct task_struct *p) >{ > return rt_prio(p->prio); >} > >static inline __attribute__((always_inline)) void set_task_session(struct task_struct *tsk, pid_t session) >{ > tsk->signal->__session = session; >} > >static inline __attribute__((always_inline)) void set_task_pgrp(struct task_struct *tsk, pid_t pgrp) >{ > tsk->signal->__pgrp = pgrp; >} > >static inline __attribute__((always_inline)) struct pid *task_pid(struct task_struct *task) >{ > return task->pids[PIDTYPE_PID].pid; >} > >static inline __attribute__((always_inline)) struct pid *task_tgid(struct task_struct *task) >{ > return task->group_leader->pids[PIDTYPE_PID].pid; >} > >static inline __attribute__((always_inline)) struct pid *task_pgrp(struct task_struct *task) >{ > return task->group_leader->pids[PIDTYPE_PGID].pid; >} > >static inline __attribute__((always_inline)) struct pid *task_session(struct task_struct *task) >{ > return task->group_leader->pids[PIDTYPE_SID].pid; >} > >struct pid_namespace; ># 1393 "include/linux/sched.h" >static inline __attribute__((always_inline)) pid_t task_pid_nr(struct task_struct *tsk) >{ > return tsk->pid; >} > >pid_t task_pid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); > >static inline __attribute__((always_inline)) pid_t task_pid_vnr(struct task_struct *tsk) >{ > return pid_vnr(task_pid(tsk)); >} > > >static inline __attribute__((always_inline)) pid_t task_tgid_nr(struct task_struct *tsk) >{ > return tsk->tgid; >} > >pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); > >static inline __attribute__((always_inline)) pid_t task_tgid_vnr(struct task_struct *tsk) >{ > return pid_vnr(task_tgid(tsk)); >} > > >static inline __attribute__((always_inline)) pid_t task_pgrp_nr(struct task_struct *tsk) >{ > return tsk->signal->__pgrp; >} > >pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); > >static inline __attribute__((always_inline)) pid_t task_pgrp_vnr(struct task_struct *tsk) >{ > return pid_vnr(task_pgrp(tsk)); >} > > >static inline __attribute__((always_inline)) pid_t task_session_nr(struct task_struct *tsk) >{ > return tsk->signal->__session; >} > >pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); > >static inline __attribute__((always_inline)) pid_t task_session_vnr(struct task_struct *tsk) >{ > return pid_vnr(task_session(tsk)); >} ># 1453 "include/linux/sched.h" >static inline __attribute__((always_inline)) int pid_alive(struct task_struct *p) >{ > return p->pids[PIDTYPE_PID].pid != ((void *)0); >} > > > > > > > >static inline __attribute__((always_inline)) int is_global_init(struct task_struct *tsk) >{ > return tsk->pid == 1; >} > > > > > >extern int is_container_init(struct task_struct *tsk); > >extern struct pid *cad_pid; > >extern void free_task(struct task_struct *tsk); > > >extern void __put_task_struct(struct task_struct *t); > >static inline __attribute__((always_inline)) void put_task_struct(struct task_struct *t) >{ > if (atomic_dec_and_test(&t->usage)) > __put_task_struct(t); >} ># 1545 "include/linux/sched.h" >extern int set_cpus_allowed_ptr(struct task_struct *p, > const cpumask_t *new_mask); ># 1556 "include/linux/sched.h" >static inline __attribute__((always_inline)) int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) >{ > return set_cpus_allowed_ptr(p, &new_mask); >} > >extern unsigned long long sched_clock(void); ># 1585 "include/linux/sched.h" >extern void sched_clock_init(void); >extern u64 sched_clock_cpu(int cpu); >extern void sched_clock_tick(void); >extern void sched_clock_idle_sleep_event(void); >extern void sched_clock_idle_wakeup_event(u64 delta_ns); > > > > > > >extern unsigned long long cpu_clock(int cpu); > >extern unsigned long long >task_sched_runtime(struct task_struct *task); > > > >extern void sched_exec(void); > > > > >extern void sched_clock_idle_sleep_event(void); >extern void sched_clock_idle_wakeup_event(u64 delta_ns); > > >extern void idle_task_exit(void); > > > > >extern void sched_idle_next(void); > > >extern void wake_up_idle_cpu(int cpu); > > > > > >extern unsigned int sysctl_sched_latency; >extern unsigned int sysctl_sched_min_granularity; >extern unsigned int sysctl_sched_wakeup_granularity; >extern unsigned int sysctl_sched_child_runs_first; >extern unsigned int sysctl_sched_features; >extern unsigned int sysctl_sched_migration_cost; >extern unsigned int sysctl_sched_nr_migrate; > >int sched_nr_latency_handler(struct ctl_table *table, int write, > struct file *file, void *buffer, size_t *length, > loff_t *ppos); > >extern unsigned int sysctl_sched_rt_period; >extern int sysctl_sched_rt_runtime; > >int sched_rt_handler(struct ctl_table *table, int write, > struct file *filp, void *buffer, size_t *lenp, > loff_t *ppos); > >extern unsigned int sysctl_sched_compat_yield; > > >extern int rt_mutex_getprio(struct task_struct *p); >extern void rt_mutex_setprio(struct task_struct *p, int prio); >extern void rt_mutex_adjust_pi(struct task_struct *p); ># 1659 "include/linux/sched.h" >extern void set_user_nice(struct task_struct *p, long nice); >extern int task_prio(const struct task_struct *p); >extern int task_nice(const struct task_struct *p); >extern int can_nice(const struct task_struct *p, const int nice); >extern int task_curr(const struct task_struct *p); >extern int idle_cpu(int cpu); >extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); >extern struct task_struct *idle_task(int cpu); >extern struct task_struct *curr_task(int cpu); >extern void set_curr_task(int cpu, struct task_struct *p); > >void yield(void); > > > > >extern struct exec_domain default_exec_domain; > >union thread_union { > struct thread_info thread_info; > unsigned long stack[(4096)/sizeof(long)]; >}; > > >static inline __attribute__((always_inline)) int kstack_end(void *addr) >{ > > > > return !(((unsigned long)addr+sizeof(void*)-1) & ((4096)-sizeof(void*))); >} > > >extern union thread_union init_thread_union; >extern struct task_struct init_task; > >extern struct mm_struct init_mm; > >extern struct pid_namespace init_pid_ns; ># 1715 "include/linux/sched.h" >extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, > struct pid_namespace *ns); > >static inline __attribute__((always_inline)) struct task_struct * find_task_by_pid(pid_t nr) >{ > return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns); >} >extern struct task_struct *find_task_by_vpid(pid_t nr); >extern struct task_struct *find_task_by_pid_ns(pid_t nr, > struct pid_namespace *ns); > >extern void __set_special_pids(struct pid *pid); > > >extern struct user_struct * alloc_uid(struct user_namespace *, uid_t); >static inline __attribute__((always_inline)) struct user_struct *get_uid(struct user_struct *u) >{ > atomic_inc(&u->__count); > return u; >} >extern void free_uid(struct user_struct *); >extern void switch_uid(struct user_struct *); >extern void release_uids(struct user_namespace *ns); > ># 1 "include/asm/current.h" 1 ># 1740 "include/linux/sched.h" 2 > >extern void do_timer(unsigned long ticks); > >extern int wake_up_state(struct task_struct *tsk, unsigned int state); >extern int wake_up_process(struct task_struct *tsk); >extern void wake_up_new_task(struct task_struct *tsk, > unsigned long clone_flags); > > extern void kick_process(struct task_struct *tsk); > > > >extern void sched_fork(struct task_struct *p, int clone_flags); >extern void sched_dead(struct task_struct *p); > >extern int in_group_p(gid_t); >extern int in_egroup_p(gid_t); > >extern void proc_caches_init(void); >extern void flush_signals(struct task_struct *); >extern void ignore_signals(struct task_struct *); >extern void flush_signal_handlers(struct task_struct *, int force_default); >extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); > >static inline __attribute__((always_inline)) int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) >{ > unsigned long flags; > int ret; > > flags = _spin_lock_irqsave(&tsk->sighand->siglock); > ret = dequeue_signal(tsk, mask, info); > _spin_unlock_irqrestore(&tsk->sighand->siglock, flags); > > return ret; >} > >extern void block_all_signals(int (*notifier)(void *priv), void *priv, > sigset_t *mask); >extern void unblock_all_signals(void); >extern void release_task(struct task_struct * p); >extern int send_sig_info(int, struct siginfo *, struct task_struct *); >extern int force_sigsegv(int, struct task_struct *); >extern int force_sig_info(int, struct siginfo *, struct task_struct *); >extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); >extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); >extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); >extern int kill_pgrp(struct pid *pid, int sig, int priv); >extern int kill_pid(struct pid *pid, int sig, int priv); >extern int kill_proc_info(int, struct siginfo *, pid_t); >extern void do_notify_parent(struct task_struct *, int); >extern void force_sig(int, struct task_struct *); >extern void force_sig_specific(int, struct task_struct *); >extern int send_sig(int, struct task_struct *, int); >extern void zap_other_threads(struct task_struct *p); >extern int kill_proc(pid_t, int, int); >extern struct sigqueue *sigqueue_alloc(void); >extern void sigqueue_free(struct sigqueue *); >extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); >extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); >extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long); > >static inline __attribute__((always_inline)) int kill_cad_pid(int sig, int priv) >{ > return kill_pid(cad_pid, sig, priv); >} > > > > > > >static inline __attribute__((always_inline)) int is_si_special(const struct siginfo *info) >{ > return info <= ((struct siginfo *) 2); >} > > > >static inline __attribute__((always_inline)) int on_sig_stack(unsigned long sp) >{ > return (sp - get_current()->sas_ss_sp < get_current()->sas_ss_size); >} > >static inline __attribute__((always_inline)) int sas_ss_flags(unsigned long sp) >{ > return (get_current()->sas_ss_size == 0 ? 2 > : on_sig_stack(sp) ? 1 : 0); >} > > > > >extern struct mm_struct * mm_alloc(void); > > >extern void __mmdrop(struct mm_struct *); >static inline __attribute__((always_inline)) void mmdrop(struct mm_struct * mm) >{ > if (__builtin_expect(!!(atomic_dec_and_test(&mm->mm_count)), 0)) > __mmdrop(mm); >} > > >extern void mmput(struct mm_struct *); > >extern struct mm_struct *get_task_mm(struct task_struct *task); > >extern void mm_release(struct task_struct *, struct mm_struct *); > >extern struct mm_struct *dup_mm(struct task_struct *tsk); > >extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *); >extern void flush_thread(void); >extern void exit_thread(void); > >extern void exit_files(struct task_struct *); >extern void __cleanup_signal(struct signal_struct *); >extern void __cleanup_sighand(struct sighand_struct *); > >extern void exit_itimers(struct signal_struct *); >extern void flush_itimer_signals(void); > >extern void do_group_exit(int); > >extern void daemonize(const char *, ...); >extern int allow_signal(int); >extern int disallow_signal(int); > >extern int do_execve(char *, char * *, char * *, struct pt_regs *); >extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *); >struct task_struct *fork_idle(int); > >extern void set_task_comm(struct task_struct *tsk, char *from); >extern char *get_task_comm(char *to, struct task_struct *tsk); > > >extern void wait_task_inactive(struct task_struct * p); ># 1908 "include/linux/sched.h" >static inline __attribute__((always_inline)) int has_group_leader_pid(struct task_struct *p) >{ > return p->pid == p->tgid; >} > >static inline __attribute__((always_inline)) >int same_thread_group(struct task_struct *p1, struct task_struct *p2) >{ > return p1->tgid == p2->tgid; >} > >static inline __attribute__((always_inline)) struct task_struct *next_thread(const struct task_struct *p) >{ > return ({ const typeof( ((struct task_struct *)0)->thread_group ) *__mptr = (({ typeof(p->thread_group.next) _________p1 = (*(volatile typeof(p->thread_group.next) *)&(p->thread_group.next)); do { } while (0); (_________p1); })); (struct task_struct *)( (char *)__mptr - __builtin_offsetof(struct task_struct,thread_group) );}); > >} > >static inline __attribute__((always_inline)) int thread_group_empty(struct task_struct *p) >{ > return list_empty(&p->thread_group); >} ># 1943 "include/linux/sched.h" >static inline __attribute__((always_inline)) void task_lock(struct task_struct *p) >{ > _spin_lock(&p->alloc_lock); >} > >static inline __attribute__((always_inline)) void task_unlock(struct task_struct *p) >{ > _spin_unlock(&p->alloc_lock); >} > >extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk, > unsigned long *flags); > >static inline __attribute__((always_inline)) void unlock_task_sighand(struct task_struct *tsk, > unsigned long *flags) >{ > _spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); >} > > > > > > >static inline __attribute__((always_inline)) void setup_thread_stack(struct task_struct *p, struct task_struct *org) >{ > *((struct thread_info *)(p)->stack) = *((struct thread_info *)(org)->stack); > ((struct thread_info *)(p)->stack)->task = p; >} > >static inline __attribute__((always_inline)) unsigned long *end_of_stack(struct task_struct *p) >{ > return (unsigned long *)(((struct thread_info *)(p)->stack) + 1); >} > > > >extern void thread_info_cache_init(void); > > > > >static inline __attribute__((always_inline)) void set_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > set_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); >} > >static inline __attribute__((always_inline)) void clear_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > clear_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); >} > >static inline __attribute__((always_inline)) int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > return test_and_set_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); >} > >static inline __attribute__((always_inline)) int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > return test_and_clear_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); >} > >static inline __attribute__((always_inline)) int test_tsk_thread_flag(struct task_struct *tsk, int flag) >{ > return test_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); >} > >static inline __attribute__((always_inline)) void set_tsk_need_resched(struct task_struct *tsk) >{ > set_tsk_thread_flag(tsk,2); >} > >static inline __attribute__((always_inline)) void clear_tsk_need_resched(struct task_struct *tsk) >{ > clear_tsk_thread_flag(tsk,2); >} > >static inline __attribute__((always_inline)) int test_tsk_need_resched(struct task_struct *tsk) >{ > return __builtin_expect(!!(test_tsk_thread_flag(tsk,2)), 0); >} > >static inline __attribute__((always_inline)) int signal_pending(struct task_struct *p) >{ > return __builtin_expect(!!(test_tsk_thread_flag(p,1)), 0); >} > >extern int __fatal_signal_pending(struct task_struct *p); > >static inline __attribute__((always_inline)) int fatal_signal_pending(struct task_struct *p) >{ > return signal_pending(p) && __fatal_signal_pending(p); >} > >static inline __attribute__((always_inline)) int need_resched(void) >{ > return __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 2)), 0); >} ># 2049 "include/linux/sched.h" >extern int _cond_resched(void); > > > > > > >static inline __attribute__((always_inline)) int cond_resched(void) >{ > return _cond_resched(); >} > >extern int cond_resched_lock(spinlock_t * lock); >extern int cond_resched_softirq(void); >static inline __attribute__((always_inline)) int cond_resched_bkl(void) >{ > return _cond_resched(); >} > > > > > > >static inline __attribute__((always_inline)) int spin_needbreak(spinlock_t *lock) >{ > > > > return 0; > >} > > > > > > > >extern void recalc_sigpending_and_wake(struct task_struct *t); >extern void recalc_sigpending(void); > >extern void signal_wake_up(struct task_struct *t, int resume_stopped); > > > > > > >static inline __attribute__((always_inline)) unsigned int task_cpu(const struct task_struct *p) >{ > return ((struct thread_info *)(p)->stack)->cpu; >} > >extern void set_task_cpu(struct task_struct *p, unsigned int cpu); ># 2119 "include/linux/sched.h" >extern void arch_pick_mmap_layout(struct mm_struct *mm); ># 2129 "include/linux/sched.h" >extern long sched_setaffinity(pid_t pid, const cpumask_t *new_mask); >extern long sched_getaffinity(pid_t pid, cpumask_t *mask); > >extern int sched_mc_power_savings, sched_smt_power_savings; > >extern void normalize_rt_tasks(void); > > > >extern struct task_group init_task_group; > > > > >extern struct task_group *sched_create_group(struct task_group *parent); >extern void sched_destroy_group(struct task_group *tg); >extern void sched_move_task(struct task_struct *tsk); > >extern int sched_group_set_shares(struct task_group *tg, unsigned long shares); >extern unsigned long sched_group_shares(struct task_group *tg); > > >extern int sched_group_set_rt_runtime(struct task_group *tg, > long rt_runtime_us); >extern long sched_group_rt_runtime(struct task_group *tg); >extern int sched_group_set_rt_period(struct task_group *tg, > long rt_period_us); >extern long sched_group_rt_period(struct task_group *tg); > > > > >static inline __attribute__((always_inline)) void add_rchar(struct task_struct *tsk, ssize_t amt) >{ > tsk->rchar += amt; >} > >static inline __attribute__((always_inline)) void add_wchar(struct task_struct *tsk, ssize_t amt) >{ > tsk->wchar += amt; >} > >static inline __attribute__((always_inline)) void inc_syscr(struct task_struct *tsk) >{ > tsk->syscr++; >} > >static inline __attribute__((always_inline)) void inc_syscw(struct task_struct *tsk) >{ > tsk->syscw++; >} ># 2199 "include/linux/sched.h" >void migration_init(void); ># 2214 "include/linux/sched.h" >static inline __attribute__((always_inline)) void mm_update_next_owner(struct mm_struct *mm) >{ >} > >static inline __attribute__((always_inline)) void mm_init_owner(struct mm_struct *mm, struct task_struct *p) >{ >} ># 6 "include/linux/smp_lock.h" 2 > > > >extern int __attribute__((section(".spinlock.text"))) __reacquire_kernel_lock(void); >extern void __attribute__((section(".spinlock.text"))) __release_kernel_lock(void); ># 20 "include/linux/smp_lock.h" >static inline __attribute__((always_inline)) int reacquire_kernel_lock(struct task_struct *task) >{ > if (__builtin_expect(!!(task->lock_depth >= 0), 0)) > return __reacquire_kernel_lock(); > return 0; >} > >extern void __attribute__((section(".spinlock.text"))) lock_kernel(void) ; >extern void __attribute__((section(".spinlock.text"))) unlock_kernel(void) ; ># 6 "include/linux/hardirq.h" 2 > ># 1 "include/asm/hardirq.h" 1 > ># 1 "include/asm/hardirq_32.h" 1 > > > > ># 1 "include/linux/irq.h" 1 ># 23 "include/linux/irq.h" ># 1 "include/asm/irq.h" 1 > ># 1 "include/asm/irq_32.h" 1 ># 15 "include/asm/irq_32.h" ># 1 "include/asm-x86/mach-default/irq_vectors.h" 1 ># 87 "include/asm-x86/mach-default/irq_vectors.h" ># 1 "include/asm-x86/mach-default/irq_vectors_limits.h" 1 ># 88 "include/asm-x86/mach-default/irq_vectors.h" 2 ># 16 "include/asm/irq_32.h" 2 ># 1 "include/asm/thread_info.h" 1 ># 9 "include/asm/thread_info.h" >extern void arch_task_cache_init(void); >extern void free_thread_info(struct thread_info *ti); >extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); ># 17 "include/asm/irq_32.h" 2 > >static inline __attribute__((always_inline)) int irq_canonicalize(int irq) >{ > return ((irq == 2) ? 9 : irq); >} > > > > > > > extern void irq_ctx_init(int cpu); > extern void irq_ctx_exit(int cpu); ># 41 "include/asm/irq_32.h" >extern void fixup_irqs(cpumask_t map); > > >unsigned int do_IRQ(struct pt_regs *regs); >void init_IRQ(void); >void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) native_init_IRQ(void); > > >extern unsigned long used_vectors[(((256) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; ># 3 "include/asm/irq.h" 2 ># 24 "include/linux/irq.h" 2 > ># 1 "include/asm/irq_regs.h" 1 > ># 1 "include/asm/irq_regs_32.h" 1 ># 12 "include/asm/irq_regs_32.h" >extern __typeof__(struct pt_regs *) per_cpu__irq_regs; > >static inline __attribute__((always_inline)) struct pt_regs *get_irq_regs(void) >{ > return ({ typeof(per_cpu__irq_regs) ret__; switch (sizeof(per_cpu__irq_regs)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__irq_regs)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__irq_regs)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__irq_regs)); break; default: __bad_percpu_size(); } ret__; }); >} > >static inline __attribute__((always_inline)) struct pt_regs *set_irq_regs(struct pt_regs *new_regs) >{ > struct pt_regs *old_regs; > > old_regs = get_irq_regs(); > do { typedef typeof(per_cpu__irq_regs) T__; if (0) { T__ tmp__; tmp__ = (new_regs); } switch (sizeof(per_cpu__irq_regs)) { case 1: asm("mov" "b %1,""%%fs:""%0" : "+m" (per_cpu__irq_regs) : "ri" ((T__)new_regs)); break; case 2: asm("mov" "w %1,""%%fs:""%0" : "+m" (per_cpu__irq_regs) : "ri" ((T__)new_regs)); break; case 4: asm("mov" "l %1,""%%fs:""%0" : "+m" (per_cpu__irq_regs) : "ri" ((T__)new_regs)); break; default: __bad_percpu_size(); } } while (0); > > return old_regs; >} ># 3 "include/asm/irq_regs.h" 2 ># 26 "include/linux/irq.h" 2 > >struct irq_desc; >typedef void (*irq_flow_handler_t)(unsigned int irq, > struct irq_desc *desc); ># 74 "include/linux/irq.h" >struct proc_dir_entry; >struct msi_desc; ># 99 "include/linux/irq.h" >struct irq_chip { > const char *name; > unsigned int (*startup)(unsigned int irq); > void (*shutdown)(unsigned int irq); > void (*enable)(unsigned int irq); > void (*disable)(unsigned int irq); > > void (*ack)(unsigned int irq); > void (*mask)(unsigned int irq); > void (*mask_ack)(unsigned int irq); > void (*unmask)(unsigned int irq); > void (*eoi)(unsigned int irq); > > void (*end)(unsigned int irq); > void (*set_affinity)(unsigned int irq, cpumask_t dest); > int (*retrigger)(unsigned int irq); > int (*set_type)(unsigned int irq, unsigned int flow_type); > int (*set_wake)(unsigned int irq, unsigned int on); ># 126 "include/linux/irq.h" > const char *typename; >}; ># 153 "include/linux/irq.h" >struct irq_desc { > irq_flow_handler_t handle_irq; > struct irq_chip *chip; > struct msi_desc *msi_desc; > void *handler_data; > void *chip_data; > struct irqaction *action; > unsigned int status; > > unsigned int depth; > unsigned int wake_depth; > unsigned int irq_count; > unsigned int irqs_unhandled; > unsigned long last_unhandled; > spinlock_t lock; > > cpumask_t affinity; > unsigned int cpu; > > > cpumask_t pending_mask; > > > struct proc_dir_entry *dir; > > const char *name; >} __attribute__((__aligned__(1 << ((7))))); > >extern struct irq_desc irq_desc[224]; > > > > > >typedef struct irq_chip hw_irq_controller; > >typedef struct irq_desc irq_desc_t; > > > > ># 1 "include/asm/hw_irq.h" 1 > ># 1 "include/asm/hw_irq_32.h" 1 ># 15 "include/asm/hw_irq_32.h" ># 1 "include/linux/profile.h" 1 ># 9 "include/linux/profile.h" ># 1 "include/asm/errno.h" 1 ># 10 "include/linux/profile.h" 2 > >extern int prof_on __attribute__((__section__(".data.read_mostly"))); > > > > > > >struct proc_dir_entry; >struct pt_regs; >struct notifier_block; > > >void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) profile_init(void); >void profile_tick(int); > > > > >void profile_hits(int, void *ip, unsigned int nr_hits); > > > > >static inline __attribute__((always_inline)) void profile_hit(int type, void *ip) >{ > > > > if (__builtin_expect(!!(prof_on == type), 0)) > profile_hits(type, ip, 1); >} > > >void create_prof_cpu_mask(struct proc_dir_entry *); > > > > >enum profile_type { > PROFILE_TASK_EXIT, > PROFILE_MUNMAP >}; > > > >struct task_struct; >struct mm_struct; > > >void profile_task_exit(struct task_struct * task); > > > > >int profile_handoff_task(struct task_struct * task); > > >void profile_munmap(unsigned long addr); > >int task_handoff_register(struct notifier_block * n); >int task_handoff_unregister(struct notifier_block * n); > >int profile_event_register(enum profile_type, struct notifier_block * n); >int profile_event_unregister(enum profile_type, struct notifier_block * n); > >int register_timer_hook(int (*hook)(struct pt_regs *)); >void unregister_timer_hook(int (*hook)(struct pt_regs *)); > >struct pt_regs; ># 16 "include/asm/hw_irq_32.h" 2 ># 1 "include/asm/atomic.h" 1 ># 17 "include/asm/hw_irq_32.h" 2 ># 1 "include/asm/irq.h" 1 ># 18 "include/asm/hw_irq_32.h" 2 ># 1 "include/asm/sections.h" 1 ># 1 "include/asm-generic/sections.h" 1 > > > > > >extern char _text[], _stext[], _etext[]; >extern char _data[], _sdata[], _edata[]; >extern char __bss_start[], __bss_stop[]; >extern char __init_begin[], __init_end[]; >extern char _sinittext[], _einittext[]; >extern char _end[]; >extern char __per_cpu_start[], __per_cpu_end[]; >extern char __kprobes_text_start[], __kprobes_text_end[]; >extern char __initdata_begin[], __initdata_end[]; >extern char __start_rodata[], __end_rodata[]; ># 1 "include/asm/sections.h" 2 ># 19 "include/asm/hw_irq_32.h" 2 ># 29 "include/asm/hw_irq_32.h" >extern void (*const interrupt[224])(void); > > >void reschedule_interrupt(void); >void invalidate_interrupt(void); >void call_function_interrupt(void); > > > >void apic_timer_interrupt(void); >void error_interrupt(void); >void spurious_interrupt(void); >void thermal_interrupt(void); > > > >void disable_8259A_irq(unsigned int irq); >void enable_8259A_irq(unsigned int irq); >int i8259A_irq_pending(unsigned int irq); >void make_8259A_irq(unsigned int irq); >void init_8259A(int aeoi); >void send_IPI_self(int vector); >void init_VISWS_APIC_irqs(void); >void setup_IO_APIC(void); >void disable_IO_APIC(void); >void print_IO_APIC(void); >int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); >void send_IPI(int dest, int vector); >void setup_ioapic_dest(void); > >extern unsigned long io_apic_irqs; > >extern atomic_t irq_err_count; >extern atomic_t irq_mis_count; ># 3 "include/asm/hw_irq.h" 2 ># 195 "include/linux/irq.h" 2 > >extern int setup_irq(unsigned int irq, struct irqaction *new); ># 208 "include/linux/irq.h" >void set_pending_irq(unsigned int irq, cpumask_t mask); >void move_native_irq(int irq); >void move_masked_irq(int irq); ># 242 "include/linux/irq.h" >static inline __attribute__((always_inline)) void set_balance_irq_affinity(unsigned int irq, cpumask_t mask) >{ >} > > > > > >static inline __attribute__((always_inline)) int select_smp_affinity(unsigned int irq) >{ > return 1; >} > > >extern int no_irq_affinity; > >static inline __attribute__((always_inline)) int irq_balancing_disabled(unsigned int irq) >{ > return irq_desc[irq].status & 0x00400000; >} > > >extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); > > > > > >extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); >extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); >extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); >extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); >extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); >extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); > > > > > >extern unsigned int __do_IRQ(unsigned int irq); ># 290 "include/linux/irq.h" >static inline __attribute__((always_inline)) void generic_handle_irq(unsigned int irq) >{ > struct irq_desc *desc = irq_desc + irq; > > > > > if (__builtin_expect(!!(desc->handle_irq), 1)) > desc->handle_irq(irq, desc); > else > __do_IRQ(irq); > >} > > >extern void note_interrupt(unsigned int irq, struct irq_desc *desc, > int action_ret); > > >void check_irq_resend(struct irq_desc *desc, unsigned int irq); > > >extern int noirqdebug_setup(char *str); > > >extern int can_request_irq(unsigned int irq, unsigned long irqflags); > > >extern struct irq_chip no_irq_chip; >extern struct irq_chip dummy_irq_chip; > >extern void >set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, > irq_flow_handler_t handle); >extern void >set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, > irq_flow_handler_t handle, const char *name); > >extern void >__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, > const char *name); > > >static inline __attribute__((always_inline)) void __set_irq_handler_unlocked(int irq, > irq_flow_handler_t handler) >{ > irq_desc[irq].handle_irq = handler; >} > > > > >static inline __attribute__((always_inline)) void >set_irq_handler(unsigned int irq, irq_flow_handler_t handle) >{ > __set_irq_handler(irq, handle, 0, ((void *)0)); >} > > > > > > >static inline __attribute__((always_inline)) void >set_irq_chained_handler(unsigned int irq, > irq_flow_handler_t handle) >{ > __set_irq_handler(irq, handle, 1, ((void *)0)); >} > >extern void set_irq_noprobe(unsigned int irq); >extern void set_irq_probe(unsigned int irq); > > >extern int create_irq(void); >extern void destroy_irq(unsigned int irq); > > >static inline __attribute__((always_inline)) int irq_has_action(unsigned int irq) >{ > struct irq_desc *desc = irq_desc + irq; > return desc->action != ((void *)0); >} > > >extern void dynamic_irq_init(unsigned int irq); >extern void dynamic_irq_cleanup(unsigned int irq); > > >extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); >extern int set_irq_data(unsigned int irq, void *data); >extern int set_irq_chip_data(unsigned int irq, void *data); >extern int set_irq_type(unsigned int irq, unsigned int type); >extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); ># 6 "include/asm/hardirq_32.h" 2 > >typedef struct { > unsigned int __softirq_pending; > unsigned long idle_timestamp; > unsigned int __nmi_count; > unsigned int apic_timer_irqs; > unsigned int irq0_irqs; > unsigned int irq_resched_count; > unsigned int irq_call_count; > unsigned int irq_tlb_count; > unsigned int irq_thermal_count; > unsigned int irq_spurious_count; >} __attribute__((__aligned__((1 << (7))))) irq_cpustat_t; > >extern __typeof__(irq_cpustat_t) per_cpu__irq_stat; > > > > >void ack_bad_irq(unsigned int irq); ># 1 "include/linux/irq_cpustat.h" 1 ># 27 "include/asm/hardirq_32.h" 2 ># 3 "include/asm/hardirq.h" 2 ># 8 "include/linux/hardirq.h" 2 ># 108 "include/linux/hardirq.h" >extern void synchronize_irq(unsigned int irq); > > > > >struct task_struct; > > >static inline __attribute__((always_inline)) void account_system_vtime(struct task_struct *tsk) >{ >} ># 146 "include/linux/hardirq.h" >extern void irq_enter(void); ># 162 "include/linux/hardirq.h" >extern void irq_exit(void); ># 12 "include/linux/interrupt.h" 2 > > ># 1 "include/asm/atomic.h" 1 ># 15 "include/linux/interrupt.h" 2 ># 58 "include/linux/interrupt.h" >typedef irqreturn_t (*irq_handler_t)(int, void *); > >struct irqaction { > irq_handler_t handler; > unsigned long flags; > cpumask_t mask; > const char *name; > void *dev_id; > struct irqaction *next; > int irq; > struct proc_dir_entry *dir; >}; > >extern irqreturn_t no_action(int cpl, void *dev_id); >extern int __attribute__((warn_unused_result)) request_irq(unsigned int, irq_handler_t handler, > unsigned long, const char *, void *); >extern void free_irq(unsigned int, void *); > >struct device; > >extern int __attribute__((warn_unused_result)) devm_request_irq(struct device *dev, unsigned int irq, > irq_handler_t handler, unsigned long irqflags, > const char *devname, void *dev_id); >extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); ># 101 "include/linux/interrupt.h" >extern void disable_irq_nosync(unsigned int irq); >extern void disable_irq(unsigned int irq); >extern void enable_irq(unsigned int irq); > > > >extern int irq_set_affinity(unsigned int irq, cpumask_t cpumask); >extern int irq_can_set_affinity(unsigned int irq); ># 136 "include/linux/interrupt.h" >static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep(unsigned int irq) >{ > disable_irq_nosync(irq); > > do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0); > >} > >static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags) >{ > disable_irq_nosync(irq); > > do { do { (*flags) = __raw_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); > >} > >static inline __attribute__((always_inline)) void disable_irq_lockdep(unsigned int irq) >{ > disable_irq(irq); > > do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0); > >} > >static inline __attribute__((always_inline)) void enable_irq_lockdep(unsigned int irq) >{ > > do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0); > > enable_irq(irq); >} > >static inline __attribute__((always_inline)) void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags) >{ > > do { if (raw_irqs_disabled_flags(*flags)) { raw_local_irq_restore(*flags); trace_hardirqs_off(); } else { trace_hardirqs_on(); raw_local_irq_restore(*flags); } } while (0); > > enable_irq(irq); >} > > >extern int set_irq_wake(unsigned int irq, unsigned int on); > >static inline __attribute__((always_inline)) int enable_irq_wake(unsigned int irq) >{ > return set_irq_wake(irq, 1); >} > >static inline __attribute__((always_inline)) int disable_irq_wake(unsigned int irq) >{ > return set_irq_wake(irq, 0); >} ># 266 "include/linux/interrupt.h" >enum >{ > HI_SOFTIRQ=0, > TIMER_SOFTIRQ, > NET_TX_SOFTIRQ, > NET_RX_SOFTIRQ, > BLOCK_SOFTIRQ, > TASKLET_SOFTIRQ, > SCHED_SOFTIRQ, > > HRTIMER_SOFTIRQ, > > RCU_SOFTIRQ, >}; > > > > > >struct softirq_action >{ > void (*action)(struct softirq_action *); > void *data; >}; > > __attribute__((regparm(0))) void do_softirq(void); > __attribute__((regparm(0))) void __do_softirq(void); >extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); >extern void softirq_init(void); > >extern void raise_softirq_irqoff(unsigned int nr); >extern void raise_softirq(unsigned int nr); ># 320 "include/linux/interrupt.h" >struct tasklet_struct >{ > struct tasklet_struct *next; > unsigned long state; > atomic_t count; > void (*func)(unsigned long); > unsigned long data; >}; ># 336 "include/linux/interrupt.h" >enum >{ > TASKLET_STATE_SCHED, > TASKLET_STATE_RUN >}; > > >static inline __attribute__((always_inline)) int tasklet_trylock(struct tasklet_struct *t) >{ > return !test_and_set_bit(TASKLET_STATE_RUN, &(t)->state); >} > >static inline __attribute__((always_inline)) void tasklet_unlock(struct tasklet_struct *t) >{ > __asm__ __volatile__("": : :"memory"); > clear_bit(TASKLET_STATE_RUN, &(t)->state); >} > >static inline __attribute__((always_inline)) void tasklet_unlock_wait(struct tasklet_struct *t) >{ > while ((__builtin_constant_p((TASKLET_STATE_RUN)) ? constant_test_bit((TASKLET_STATE_RUN), (&(t)->state)) : variable_test_bit((TASKLET_STATE_RUN), (&(t)->state)))) { __asm__ __volatile__("": : :"memory"); } >} > > > > > > >extern void __tasklet_schedule(struct tasklet_struct *t); > >static inline __attribute__((always_inline)) void tasklet_schedule(struct tasklet_struct *t) >{ > if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) > __tasklet_schedule(t); >} > >extern void __tasklet_hi_schedule(struct tasklet_struct *t); > >static inline __attribute__((always_inline)) void tasklet_hi_schedule(struct tasklet_struct *t) >{ > if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) > __tasklet_hi_schedule(t); >} > > >static inline __attribute__((always_inline)) void tasklet_disable_nosync(struct tasklet_struct *t) >{ > atomic_inc(&t->count); > __asm__ __volatile__("": : :"memory"); >} > >static inline __attribute__((always_inline)) void tasklet_disable(struct tasklet_struct *t) >{ > tasklet_disable_nosync(t); > tasklet_unlock_wait(t); > asm volatile ("661:\n\t" "lock; addl $0,0(%%esp)" "\n662:\n" ".section .altinstructions,\"a\"\n" " .balign 4 " "\n" " .long " "661b\n" " .long " "663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" "mfence" "\n664:\n" ".previous" :: "i" ((0*32+26)) : "memory"); >} > >static inline __attribute__((always_inline)) void tasklet_enable(struct tasklet_struct *t) >{ > __asm__ __volatile__("": : :"memory"); > atomic_dec(&t->count); >} > >static inline __attribute__((always_inline)) void tasklet_hi_enable(struct tasklet_struct *t) >{ > __asm__ __volatile__("": : :"memory"); > atomic_dec(&t->count); >} > >extern void tasklet_kill(struct tasklet_struct *t); >extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); >extern void tasklet_init(struct tasklet_struct *t, > void (*func)(unsigned long), unsigned long data); ># 453 "include/linux/interrupt.h" >extern unsigned long probe_irq_on(void); >extern int probe_irq_off(unsigned long); >extern unsigned int probe_irq_mask(unsigned long); > > > > >extern void init_irq_proc(void); > > > > > > >int show_interrupts(struct seq_file *p, void *v); ># 24 "include/asm/highmem.h" 2 > > ># 1 "include/asm/tlbflush.h" 1 ># 18 "include/asm/tlbflush.h" >static inline __attribute__((always_inline)) void __native_flush_tlb(void) >{ > write_cr3(read_cr3()); >} > >static inline __attribute__((always_inline)) void __native_flush_tlb_global(void) >{ > unsigned long flags; > unsigned long cr4; > > > > > > > do { (flags) = __raw_local_irq_save(); } while (0); > > cr4 = read_cr4(); > > write_cr4(cr4 & ~0x00000080); > > write_cr4(cr4); > > raw_local_irq_restore(flags); >} > >static inline __attribute__((always_inline)) void __native_flush_tlb_single(unsigned long addr) >{ > asm volatile("invlpg (%0)" ::"r" (addr) : "memory"); >} > >static inline __attribute__((always_inline)) void __flush_tlb_all(void) >{ > if ((__builtin_constant_p((0*32+13)) && ( ((((0*32+13))>>5)==0 && (1UL<<(((0*32+13))&31) & ((1<<((0*32+ 0) & 31))|0|0|0| 0|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+13))>>5)==1 && (1UL<<(((0*32+13))&31) & (0|0))) || ((((0*32+13))>>5)==2 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==3 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==4 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==5 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==6 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==7 && (1UL<<(((0*32+13))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+13))) ? constant_test_bit(((0*32+13)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+13)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))) > __flush_tlb_global(); > else > __flush_tlb(); >} > >static inline __attribute__((always_inline)) void __flush_tlb_one(unsigned long addr) >{ > if (1) > __flush_tlb_single(addr); > else > __flush_tlb(); >} ># 128 "include/asm/tlbflush.h" >extern void flush_tlb_all(void); >extern void flush_tlb_current_task(void); >extern void flush_tlb_mm(struct mm_struct *); >extern void flush_tlb_page(struct vm_area_struct *, unsigned long); > > > >static inline __attribute__((always_inline)) void flush_tlb_range(struct vm_area_struct *vma, > unsigned long start, unsigned long end) >{ > flush_tlb_mm(vma->vm_mm); >} > >void native_flush_tlb_others(const cpumask_t *cpumask, struct mm_struct *mm, > unsigned long va); > > > > > >struct tlb_state { > struct mm_struct *active_mm; > int state; > char __cacheline_padding[(1 << (7))-8]; >}; >extern __typeof__(struct tlb_state) per_cpu__cpu_tlbstate; ># 162 "include/asm/tlbflush.h" >static inline __attribute__((always_inline)) void flush_tlb_kernel_range(unsigned long start, > unsigned long end) >{ > flush_tlb_all(); >} ># 27 "include/asm/highmem.h" 2 > > > >extern unsigned long highstart_pfn, highend_pfn; > >extern pte_t *kmap_pte; >extern pgprot_t kmap_prot; >extern pte_t *pkmap_page_table; ># 60 "include/asm/highmem.h" >extern void *kmap_high(struct page *page); >extern void kunmap_high(struct page *page); > >void *kmap(struct page *page); >void kunmap(struct page *page); >void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot); >void *kmap_atomic(struct page *page, enum km_type type); >void kunmap_atomic(void *kvaddr, enum km_type type); >void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); >struct page *kmap_atomic_to_page(void *ptr); ># 25 "include/linux/highmem.h" 2 > > >unsigned int nr_free_highpages(void); >extern unsigned long totalhigh_pages; > >void kmap_flush_unused(void); ># 66 "include/linux/highmem.h" >static inline __attribute__((always_inline)) void clear_user_highpage(struct page *page, unsigned long vaddr) >{ > void *addr = kmap_atomic(page, KM_USER0); > clear_user_page(addr, vaddr, page); > kunmap_atomic(addr, KM_USER0); >} ># 111 "include/linux/highmem.h" >static inline __attribute__((always_inline)) struct page * >alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma, > unsigned long vaddr) >{ > return alloc_pages_node((((void)((({ typeof(per_cpu__cpu_number) ret__; switch (sizeof(per_cpu__cpu_number)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; default: __bad_percpu_size(); } ret__; }))),0)), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u) | (( gfp_t)0x02u)) | (( gfp_t)0x8000u) | (( gfp_t)0x100000u), 0); >} > >static inline __attribute__((always_inline)) void clear_highpage(struct page *page) >{ > void *kaddr = kmap_atomic(page, KM_USER0); > clear_page(kaddr); > kunmap_atomic(kaddr, KM_USER0); >} > >static inline __attribute__((always_inline)) void zero_user_segments(struct page *page, > unsigned start1, unsigned end1, > unsigned start2, unsigned end2) >{ > void *kaddr = kmap_atomic(page, KM_USER0); > > do { if (__builtin_expect(!!(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/highmem.h"), "i" (131), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > > if (end1 > start1) > (__builtin_constant_p(0) ? (__builtin_constant_p((end1 - start1)) ? __constant_c_and_count_memset(((kaddr + start1)),((0x01010101UL*(unsigned char)(0))),((end1 - start1))) : __constant_c_memset(((kaddr + start1)),((0x01010101UL*(unsigned char)(0))),((end1 - start1)))) : (__builtin_constant_p((end1 - start1)) ? __memset_generic((((kaddr + start1))),(((0))),(((end1 - start1)))) : __memset_generic(((kaddr + start1)),((0)),((end1 - start1))))); > > if (end2 > start2) > (__builtin_constant_p(0) ? (__builtin_constant_p((end2 - start2)) ? __constant_c_and_count_memset(((kaddr + start2)),((0x01010101UL*(unsigned char)(0))),((end2 - start2))) : __constant_c_memset(((kaddr + start2)),((0x01010101UL*(unsigned char)(0))),((end2 - start2)))) : (__builtin_constant_p((end2 - start2)) ? __memset_generic((((kaddr + start2))),(((0))),(((end2 - start2)))) : __memset_generic(((kaddr + start2)),((0)),((end2 - start2))))); > > kunmap_atomic(kaddr, KM_USER0); > do { } while (0); >} > >static inline __attribute__((always_inline)) void zero_user_segment(struct page *page, > unsigned start, unsigned end) >{ > zero_user_segments(page, start, end, 0, 0); >} > >static inline __attribute__((always_inline)) void zero_user(struct page *page, > unsigned start, unsigned size) >{ > zero_user_segments(page, start, start + size, 0, 0); >} > >static inline __attribute__((always_inline)) void memclear_highpage_flush(struct page *page, > unsigned int offset, unsigned int size) >{ > zero_user(page, offset, size); >} > > > >static inline __attribute__((always_inline)) void copy_user_highpage(struct page *to, struct page *from, > unsigned long vaddr, struct vm_area_struct *vma) >{ > char *vfrom, *vto; > > vfrom = kmap_atomic(from, KM_USER0); > vto = kmap_atomic(to, KM_USER1); > copy_user_page(vto, vfrom, vaddr, to); > kunmap_atomic(vfrom, KM_USER0); > kunmap_atomic(vto, KM_USER1); >} > > > >static inline __attribute__((always_inline)) void copy_highpage(struct page *to, struct page *from) >{ > char *vfrom, *vto; > > vfrom = kmap_atomic(from, KM_USER0); > vto = kmap_atomic(to, KM_USER1); > copy_page(vto, vfrom); > kunmap_atomic(vfrom, KM_USER0); > kunmap_atomic(vto, KM_USER1); >} ># 11 "include/linux/pagemap.h" 2 > ># 1 "include/asm/uaccess.h" 1 ># 13 "include/linux/pagemap.h" 2 ># 23 "include/linux/pagemap.h" >static inline __attribute__((always_inline)) void mapping_set_error(struct address_space *mapping, int error) >{ > if (error) { > if (error == -28) > set_bit((21 + 1), &mapping->flags); > else > set_bit((21 + 0), &mapping->flags); > } >} > >static inline __attribute__((always_inline)) gfp_t mapping_gfp_mask(struct address_space * mapping) >{ > return ( gfp_t)mapping->flags & (( gfp_t)((1 << 21) - 1)); >} > > > > > >static inline __attribute__((always_inline)) void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) >{ > m->flags = (m->flags & ~( unsigned long)(( gfp_t)((1 << 21) - 1))) | > ( unsigned long)mask; >} ># 63 "include/linux/pagemap.h" >void release_pages(struct page **pages, int nr, int cold); > > > > >static inline __attribute__((always_inline)) struct page *__page_cache_alloc(gfp_t gfp) >{ > return alloc_pages_node((((void)((({ typeof(per_cpu__cpu_number) ret__; switch (sizeof(per_cpu__cpu_number)) { case 1: asm("mov" "b ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; case 2: asm("mov" "w ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; case 4: asm("mov" "l ""%%fs:""%1,%0" : "=r" (ret__) : "m" (per_cpu__cpu_number)); break; default: __bad_percpu_size(); } ret__; }))),0)), gfp, 0); >} > > >static inline __attribute__((always_inline)) struct page *page_cache_alloc(struct address_space *x) >{ > return __page_cache_alloc(mapping_gfp_mask(x)); >} > >static inline __attribute__((always_inline)) struct page *page_cache_alloc_cold(struct address_space *x) >{ > return __page_cache_alloc(mapping_gfp_mask(x)|(( gfp_t)0x100u)); >} > >typedef int filler_t(void *, struct page *); > >extern struct page * find_get_page(struct address_space *mapping, > unsigned long index); >extern struct page * find_lock_page(struct address_space *mapping, > unsigned long index); >extern struct page * find_or_create_page(struct address_space *mapping, > unsigned long index, gfp_t gfp_mask); >unsigned find_get_pages(struct address_space *mapping, unsigned long start, > unsigned int nr_pages, struct page **pages); >unsigned find_get_pages_contig(struct address_space *mapping, unsigned long start, > unsigned int nr_pages, struct page **pages); >unsigned find_get_pages_tag(struct address_space *mapping, unsigned long *index, > int tag, unsigned int nr_pages, struct page **pages); > >struct page *__grab_cache_page(struct address_space *mapping, unsigned long index); > > > > >static inline __attribute__((always_inline)) struct page *grab_cache_page(struct address_space *mapping, > unsigned long index) >{ > return find_or_create_page(mapping, index, mapping_gfp_mask(mapping)); >} > >extern struct page * grab_cache_page_nowait(struct address_space *mapping, > unsigned long index); >extern struct page * read_cache_page_async(struct address_space *mapping, > unsigned long index, filler_t *filler, > void *data); >extern struct page * read_cache_page(struct address_space *mapping, > unsigned long index, filler_t *filler, > void *data); >extern int read_cache_pages(struct address_space *mapping, > struct list_head *pages, filler_t *filler, void *data); > >static inline __attribute__((always_inline)) struct page *read_mapping_page_async( > struct address_space *mapping, > unsigned long index, void *data) >{ > filler_t *filler = (filler_t *)mapping->a_ops->readpage; > return read_cache_page_async(mapping, index, filler, data); >} > >static inline __attribute__((always_inline)) struct page *read_mapping_page(struct address_space *mapping, > unsigned long index, void *data) >{ > filler_t *filler = (filler_t *)mapping->a_ops->readpage; > return read_cache_page(mapping, index, filler, data); >} > >int add_to_page_cache(struct page *page, struct address_space *mapping, > unsigned long index, gfp_t gfp_mask); >int add_to_page_cache_lru(struct page *page, struct address_space *mapping, > unsigned long index, gfp_t gfp_mask); >extern void remove_from_page_cache(struct page *page); >extern void __remove_from_page_cache(struct page *page); > > > > >static inline __attribute__((always_inline)) loff_t page_offset(struct page *page) >{ > return ((loff_t)page->index) << 12; >} > >static inline __attribute__((always_inline)) unsigned long linear_page_index(struct vm_area_struct *vma, > unsigned long address) >{ > unsigned long pgoff = (address - vma->vm_start) >> 12; > pgoff += vma->vm_pgoff; > return pgoff >> (12 - 12); >} > >extern void __lock_page(struct page *page); >extern int __lock_page_killable(struct page *page); >extern void __lock_page_nosync(struct page *page); >extern void unlock_page(struct page *page); > > > > >static inline __attribute__((always_inline)) void lock_page(struct page *page) >{ > do { __might_sleep("include/linux/pagemap.h", 169); _cond_resched(); } while (0); > if (TestSetPageLocked(page)) > __lock_page(page); >} > > > > > > >static inline __attribute__((always_inline)) int lock_page_killable(struct page *page) >{ > do { __might_sleep("include/linux/pagemap.h", 181); _cond_resched(); } while (0); > if (TestSetPageLocked(page)) > return __lock_page_killable(page); > return 0; >} > > > > > >static inline __attribute__((always_inline)) void lock_page_nosync(struct page *page) >{ > do { __might_sleep("include/linux/pagemap.h", 193); _cond_resched(); } while (0); > if (TestSetPageLocked(page)) > __lock_page_nosync(page); >} > > > > > >extern void wait_on_page_bit(struct page *page, int bit_nr); ># 211 "include/linux/pagemap.h" >static inline __attribute__((always_inline)) void wait_on_page_locked(struct page *page) >{ > if (PageLocked(page)) > wait_on_page_bit(page, PG_locked); >} > > > > >static inline __attribute__((always_inline)) void wait_on_page_writeback(struct page *page) >{ > if (PageWriteback(page)) > wait_on_page_bit(page, PG_writeback); >} > >extern void end_page_writeback(struct page *page); > > > > > > > >static inline __attribute__((always_inline)) int fault_in_pages_writeable(char *uaddr, int size) >{ > int ret; > > if (__builtin_expect(!!(size == 0), 0)) > return 0; > > > > > > ret = ({ long __pu_err; do { __pu_err = 0; (void)0; switch ((sizeof(*(uaddr)))) { case 1: asm volatile("1: mov""b"" %""b""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(__pu_err) : "iq" (((__typeof__(*(uaddr)))(0))), "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14), "0" (__pu_err)); break; case 2: asm volatile("1: mov""w"" %""w""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(__pu_err) : "ir" (((__typeof__(*(uaddr)))(0))), "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14), "0" (__pu_err)); break; case 4: asm volatile("1: mov""l"" %""""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(__pu_err) : "ir" (((__typeof__(*(uaddr)))(0))), "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14), "0" (__pu_err)); break; case 8: asm volatile("1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "4b" "\n" " .previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "2b" "," "4b" "\n" " .previous\n" : "=r" (__pu_err) : "A" ((__typeof__(*((uaddr))))(((__typeof__(*(uaddr)))(0)))), "r" (((uaddr))), "i" (-14), "0" (__pu_err)); break; default: __put_user_bad(); } } while (0); __pu_err; }); > if (ret == 0) { > char *end = uaddr + size - 1; > > > > > > if (((unsigned long)uaddr & (~(((1UL) << 12)-1))) != > ((unsigned long)end & (~(((1UL) << 12)-1)))) > ret = ({ long __pu_err; do { __pu_err = 0; (void)0; switch ((sizeof(*(end)))) { case 1: asm volatile("1: mov""b"" %""b""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(__pu_err) : "iq" (((__typeof__(*(end)))(0))), "m" ((*(struct __large_struct *)(((end))))), "i" (-14), "0" (__pu_err)); break; case 2: asm volatile("1: mov""w"" %""w""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(__pu_err) : "ir" (((__typeof__(*(end)))(0))), "m" ((*(struct __large_struct *)(((end))))), "i" (-14), "0" (__pu_err)); break; case 4: asm volatile("1: mov""l"" %""""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r"(__pu_err) : "ir" (((__typeof__(*(end)))(0))), "m" ((*(struct __large_struct *)(((end))))), "i" (-14), "0" (__pu_err)); break; case 8: asm volatile("1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "4b" "\n" " .previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "2b" "," "4b" "\n" " .previous\n" : "=r" (__pu_err) : "A" ((__typeof__(*((end))))(((__typeof__(*(end)))(0)))), "r" (((end))), "i" (-14), "0" (__pu_err)); break; default: __put_user_bad(); } } while (0); __pu_err; }); > } > return ret; >} > >static inline __attribute__((always_inline)) int fault_in_pages_readable(const char *uaddr, int size) >{ > volatile char c; > int ret; > > if (__builtin_expect(!!(size == 0), 0)) > return 0; > > ret = ({ long __gu_err; unsigned long __gu_val; do { __gu_err = 0; (void)0; switch ((sizeof(*(uaddr)))) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (__gu_err), "=q" (__gu_val) : "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14), "0" (__gu_err)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (__gu_err), "=r" (__gu_val) : "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14), "0" (__gu_err)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (__gu_err), "=r" (__gu_val) : "m" ((*(struct __large_struct *)(((uaddr))))), "i" (-14), "0" (__gu_err)); break; default: (__gu_val) = __get_user_bad(); } } while (0); ((c)) = (__typeof__(*((uaddr))))__gu_val; __gu_err; }); > if (ret == 0) { > const char *end = uaddr + size - 1; > > if (((unsigned long)uaddr & (~(((1UL) << 12)-1))) != > ((unsigned long)end & (~(((1UL) << 12)-1)))) > ret = ({ long __gu_err; unsigned long __gu_val; do { __gu_err = 0; (void)0; switch ((sizeof(*(end)))) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (__gu_err), "=q" (__gu_val) : "m" ((*(struct __large_struct *)(((end))))), "i" (-14), "0" (__gu_err)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (__gu_err), "=r" (__gu_val) : "m" ((*(struct __large_struct *)(((end))))), "i" (-14), "0" (__gu_err)); break; case 4: asm volatile("1: mov""l"" %2,%""""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor""l"" %""""1,%""""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " .balign 4 " "\n" " .long " "1b" "," "3b" "\n" " .previous\n" : "=r" (__gu_err), "=r" (__gu_val) : "m" ((*(struct __large_struct *)(((end))))), "i" (-14), "0" (__gu_err)); break; default: (__gu_val) = __get_user_bad(); } } while (0); ((c)) = (__typeof__(*((end))))__gu_val; __gu_err; }); > } > return ret; >} ># 29 "/root/ext3/namei.c" 2 ># 1 "include/linux/jbd.h" 1 ># 27 "include/linux/jbd.h" ># 1 "include/linux/buffer_head.h" 1 ># 15 "include/linux/buffer_head.h" ># 1 "include/asm/atomic.h" 1 ># 16 "include/linux/buffer_head.h" 2 > > > >enum bh_state_bits { > BH_Uptodate, > BH_Dirty, > BH_Lock, > BH_Req, > BH_Uptodate_Lock, > > > > BH_Mapped, > BH_New, > BH_Async_Read, > BH_Async_Write, > BH_Delay, > BH_Boundary, > BH_Write_EIO, > BH_Ordered, > BH_Eopnotsupp, > BH_Unwritten, > > BH_PrivateStart, > > >}; > > > >struct page; >struct buffer_head; >struct address_space; >typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate); ># 60 "include/linux/buffer_head.h" >struct buffer_head { > unsigned long b_state; > struct buffer_head *b_this_page; > struct page *b_page; > > sector_t b_blocknr; > size_t b_size; > char *b_data; > > struct block_device *b_bdev; > bh_end_io_t *b_end_io; > void *b_private; > struct list_head b_assoc_buffers; > struct address_space *b_assoc_map; > > atomic_t b_count; >}; ># 114 "include/linux/buffer_head.h" >static inline __attribute__((always_inline)) void set_buffer_uptodate(struct buffer_head *bh) { set_bit(BH_Uptodate, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_uptodate(struct buffer_head *bh) { clear_bit(BH_Uptodate, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_uptodate(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Uptodate)) ? constant_test_bit((BH_Uptodate), (&(bh)->b_state)) : variable_test_bit((BH_Uptodate), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_dirty(struct buffer_head *bh) { set_bit(BH_Dirty, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_dirty(struct buffer_head *bh) { clear_bit(BH_Dirty, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_dirty(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Dirty)) ? constant_test_bit((BH_Dirty), (&(bh)->b_state)) : variable_test_bit((BH_Dirty), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) int test_set_buffer_dirty(struct buffer_head *bh) { return test_and_set_bit(BH_Dirty, &(bh)->b_state); } static inline __attribute__((always_inline)) int test_clear_buffer_dirty(struct buffer_head *bh) { return test_and_clear_bit(BH_Dirty, &(bh)->b_state); } >static inline __attribute__((always_inline)) void set_buffer_locked(struct buffer_head *bh) { set_bit(BH_Lock, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_locked(struct buffer_head *bh) { clear_bit(BH_Lock, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_locked(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Lock)) ? constant_test_bit((BH_Lock), (&(bh)->b_state)) : variable_test_bit((BH_Lock), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) int test_set_buffer_locked(struct buffer_head *bh) { return test_and_set_bit(BH_Lock, &(bh)->b_state); } static inline __attribute__((always_inline)) int test_clear_buffer_locked(struct buffer_head *bh) { return test_and_clear_bit(BH_Lock, &(bh)->b_state); } >static inline __attribute__((always_inline)) void set_buffer_req(struct buffer_head *bh) { set_bit(BH_Req, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_req(struct buffer_head *bh) { clear_bit(BH_Req, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_req(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Req)) ? constant_test_bit((BH_Req), (&(bh)->b_state)) : variable_test_bit((BH_Req), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) int test_set_buffer_req(struct buffer_head *bh) { return test_and_set_bit(BH_Req, &(bh)->b_state); } static inline __attribute__((always_inline)) int test_clear_buffer_req(struct buffer_head *bh) { return test_and_clear_bit(BH_Req, &(bh)->b_state); } >static inline __attribute__((always_inline)) void set_buffer_mapped(struct buffer_head *bh) { set_bit(BH_Mapped, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_mapped(struct buffer_head *bh) { clear_bit(BH_Mapped, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_mapped(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Mapped)) ? constant_test_bit((BH_Mapped), (&(bh)->b_state)) : variable_test_bit((BH_Mapped), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_new(struct buffer_head *bh) { set_bit(BH_New, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_new(struct buffer_head *bh) { clear_bit(BH_New, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_new(const struct buffer_head *bh) { return (__builtin_constant_p((BH_New)) ? constant_test_bit((BH_New), (&(bh)->b_state)) : variable_test_bit((BH_New), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_async_read(struct buffer_head *bh) { set_bit(BH_Async_Read, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_async_read(struct buffer_head *bh) { clear_bit(BH_Async_Read, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_async_read(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Async_Read)) ? constant_test_bit((BH_Async_Read), (&(bh)->b_state)) : variable_test_bit((BH_Async_Read), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_async_write(struct buffer_head *bh) { set_bit(BH_Async_Write, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_async_write(struct buffer_head *bh) { clear_bit(BH_Async_Write, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_async_write(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Async_Write)) ? constant_test_bit((BH_Async_Write), (&(bh)->b_state)) : variable_test_bit((BH_Async_Write), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_delay(struct buffer_head *bh) { set_bit(BH_Delay, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_delay(struct buffer_head *bh) { clear_bit(BH_Delay, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_delay(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Delay)) ? constant_test_bit((BH_Delay), (&(bh)->b_state)) : variable_test_bit((BH_Delay), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_boundary(struct buffer_head *bh) { set_bit(BH_Boundary, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_boundary(struct buffer_head *bh) { clear_bit(BH_Boundary, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_boundary(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Boundary)) ? constant_test_bit((BH_Boundary), (&(bh)->b_state)) : variable_test_bit((BH_Boundary), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_write_io_error(struct buffer_head *bh) { set_bit(BH_Write_EIO, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_write_io_error(struct buffer_head *bh) { clear_bit(BH_Write_EIO, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_write_io_error(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Write_EIO)) ? constant_test_bit((BH_Write_EIO), (&(bh)->b_state)) : variable_test_bit((BH_Write_EIO), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_ordered(struct buffer_head *bh) { set_bit(BH_Ordered, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_ordered(struct buffer_head *bh) { clear_bit(BH_Ordered, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_ordered(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Ordered)) ? constant_test_bit((BH_Ordered), (&(bh)->b_state)) : variable_test_bit((BH_Ordered), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_eopnotsupp(struct buffer_head *bh) { set_bit(BH_Eopnotsupp, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_eopnotsupp(struct buffer_head *bh) { clear_bit(BH_Eopnotsupp, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_eopnotsupp(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Eopnotsupp)) ? constant_test_bit((BH_Eopnotsupp), (&(bh)->b_state)) : variable_test_bit((BH_Eopnotsupp), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_unwritten(struct buffer_head *bh) { set_bit(BH_Unwritten, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_unwritten(struct buffer_head *bh) { clear_bit(BH_Unwritten, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_unwritten(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Unwritten)) ? constant_test_bit((BH_Unwritten), (&(bh)->b_state)) : variable_test_bit((BH_Unwritten), (&(bh)->b_state))); } ># 147 "include/linux/buffer_head.h" >void mark_buffer_dirty(struct buffer_head *bh); >void init_buffer(struct buffer_head *, bh_end_io_t *, void *); >void set_bh_page(struct buffer_head *bh, > struct page *page, unsigned long offset); >int try_to_free_buffers(struct page *); >struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size, > int retry); >void create_empty_buffers(struct page *, unsigned long, > unsigned long b_state); >void end_buffer_read_sync(struct buffer_head *bh, int uptodate); >void end_buffer_write_sync(struct buffer_head *bh, int uptodate); > > >void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); >int inode_has_buffers(struct inode *); >void invalidate_inode_buffers(struct inode *); >int remove_inode_buffers(struct inode *inode); >int sync_mapping_buffers(struct address_space *mapping); >void unmap_underlying_metadata(struct block_device *bdev, sector_t block); > >void mark_buffer_async_write(struct buffer_head *bh); >void invalidate_bdev(struct block_device *); >int sync_blockdev(struct block_device *bdev); >void __wait_on_buffer(struct buffer_head *); >wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); >int fsync_bdev(struct block_device *); >struct super_block *freeze_bdev(struct block_device *); >void thaw_bdev(struct block_device *, struct super_block *); >int fsync_super(struct super_block *); >int fsync_no_super(struct block_device *); >struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, > unsigned size); >struct buffer_head *__getblk(struct block_device *bdev, sector_t block, > unsigned size); >void __brelse(struct buffer_head *); >void __bforget(struct buffer_head *); >void __breadahead(struct block_device *, sector_t block, unsigned int size); >struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size); >void invalidate_bh_lrus(void); >struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); >void free_buffer_head(struct buffer_head * bh); >void unlock_buffer(struct buffer_head *bh); >void __lock_buffer(struct buffer_head *bh); >void ll_rw_block(int, int, struct buffer_head * bh[]); >int sync_dirty_buffer(struct buffer_head *bh); >int submit_bh(int, struct buffer_head *); >void write_boundary_block(struct block_device *bdev, > sector_t bblock, unsigned blocksize); >int bh_uptodate_or_lock(struct buffer_head *bh); >int bh_submit_read(struct buffer_head *bh); > >extern int buffer_heads_over_limit; > > > > > >void block_invalidatepage(struct page *page, unsigned long offset); >int block_write_full_page(struct page *page, get_block_t *get_block, > struct writeback_control *wbc); >int block_read_full_page(struct page*, get_block_t*); >int block_write_begin(struct file *, struct address_space *, > loff_t, unsigned, unsigned, > struct page **, void **, get_block_t*); >int block_write_end(struct file *, struct address_space *, > loff_t, unsigned, unsigned, > struct page *, void *); >int generic_write_end(struct file *, struct address_space *, > loff_t, unsigned, unsigned, > struct page *, void *); >void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); >int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); >int cont_write_begin(struct file *, struct address_space *, loff_t, > unsigned, unsigned, struct page **, void **, > get_block_t *, loff_t *); >int generic_cont_expand_simple(struct inode *inode, loff_t size); >int block_commit_write(struct page *page, unsigned from, unsigned to); >int block_page_mkwrite(struct vm_area_struct *vma, struct page *page, > get_block_t get_block); >void block_sync_page(struct page *); >sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); >int block_truncate_page(struct address_space *, loff_t, get_block_t *); >int file_fsync(struct file *, struct dentry *, int); >int nobh_write_begin(struct file *, struct address_space *, > loff_t, unsigned, unsigned, > struct page **, void **, get_block_t*); >int nobh_write_end(struct file *, struct address_space *, > loff_t, unsigned, unsigned, > struct page *, void *); >int nobh_truncate_page(struct address_space *, loff_t, get_block_t *); >int nobh_writepage(struct page *page, get_block_t *get_block, > struct writeback_control *wbc); > >void buffer_init(void); > > > > > >static inline __attribute__((always_inline)) void attach_page_buffers(struct page *page, > struct buffer_head *head) >{ > get_page(page); > SetPagePrivate(page); > ((page)->private = ((unsigned long)head)); >} > >static inline __attribute__((always_inline)) void get_bh(struct buffer_head *bh) >{ > atomic_inc(&bh->b_count); >} > >static inline __attribute__((always_inline)) void put_bh(struct buffer_head *bh) >{ > __asm__ __volatile__("": : :"memory"); > atomic_dec(&bh->b_count); >} > >static inline __attribute__((always_inline)) void brelse(struct buffer_head *bh) >{ > if (bh) > __brelse(bh); >} > >static inline __attribute__((always_inline)) void bforget(struct buffer_head *bh) >{ > if (bh) > __bforget(bh); >} > >static inline __attribute__((always_inline)) struct buffer_head * >sb_bread(struct super_block *sb, sector_t block) >{ > return __bread(sb->s_bdev, block, sb->s_blocksize); >} > >static inline __attribute__((always_inline)) void >sb_breadahead(struct super_block *sb, sector_t block) >{ > __breadahead(sb->s_bdev, block, sb->s_blocksize); >} > >static inline __attribute__((always_inline)) struct buffer_head * >sb_getblk(struct super_block *sb, sector_t block) >{ > return __getblk(sb->s_bdev, block, sb->s_blocksize); >} > >static inline __attribute__((always_inline)) struct buffer_head * >sb_find_get_block(struct super_block *sb, sector_t block) >{ > return __find_get_block(sb->s_bdev, block, sb->s_blocksize); >} > >static inline __attribute__((always_inline)) void >map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block) >{ > set_buffer_mapped(bh); > bh->b_bdev = sb->s_bdev; > bh->b_blocknr = block; > bh->b_size = sb->s_blocksize; >} > > > > > > >static inline __attribute__((always_inline)) void wait_on_buffer(struct buffer_head *bh) >{ > do { __might_sleep("include/linux/buffer_head.h", 317); _cond_resched(); } while (0); > if (buffer_locked(bh) || ((&bh->b_count)->counter) == 0) > __wait_on_buffer(bh); >} > >static inline __attribute__((always_inline)) void lock_buffer(struct buffer_head *bh) >{ > do { __might_sleep("include/linux/buffer_head.h", 324); _cond_resched(); } while (0); > if (test_set_buffer_locked(bh)) > __lock_buffer(bh); >} > >extern int __set_page_dirty_buffers(struct page *page); ># 28 "include/linux/jbd.h" 2 ># 1 "include/linux/journal-head.h" 1 ># 13 "include/linux/journal-head.h" >typedef unsigned int tid_t; >typedef struct transaction_s transaction_t; >struct buffer_head; > >struct journal_head { > > > > struct buffer_head *b_bh; > > > > > > int b_jcount; > > > > > unsigned b_jlist; > > > > > > > unsigned b_modified; > > > > > > char *b_frozen_data; > > > > > > > char *b_committed_data; ># 61 "include/linux/journal-head.h" > transaction_t *b_transaction; > > > > > > > > transaction_t *b_next_transaction; > > > > > > struct journal_head *b_tnext, *b_tprev; > > > > > > > transaction_t *b_cp_transaction; > > > > > > > struct journal_head *b_cpnext, *b_cpprev; >}; ># 29 "include/linux/jbd.h" 2 > ># 1 "include/linux/bit_spinlock.h" 1 ># 10 "include/linux/bit_spinlock.h" >static inline __attribute__((always_inline)) void bit_spin_lock(int bitnum, unsigned long *addr) >{ > > > > > > > > do { } while (0); > > while (__builtin_expect(!!(test_and_set_bit_lock(bitnum, addr)), 0)) { > while ((__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) { > do { } while (0); > cpu_relax(); > do { } while (0); > } > } > > (void)0; >} > > > > >static inline __attribute__((always_inline)) int bit_spin_trylock(int bitnum, unsigned long *addr) >{ > do { } while (0); > > if (__builtin_expect(!!(test_and_set_bit_lock(bitnum, addr)), 0)) { > do { } while (0); > return 0; > } > > (void)0; > return 1; >} > > > > >static inline __attribute__((always_inline)) void bit_spin_unlock(int bitnum, unsigned long *addr) >{ > > do { if (__builtin_expect(!!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/bit_spinlock.h"), "i" (54), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > > > clear_bit_unlock(bitnum, addr); > > do { } while (0); > (void)0; >} > > > > > > >static inline __attribute__((always_inline)) void __bit_spin_unlock(int bitnum, unsigned long *addr) >{ > > do { if (__builtin_expect(!!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/bit_spinlock.h"), "i" (71), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > > > __clear_bit_unlock(bitnum, addr); > > do { } while (0); > (void)0; >} > > > > >static inline __attribute__((always_inline)) int bit_spin_is_locked(int bitnum, unsigned long *addr) >{ > > return (__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr))); > > > > > >} ># 31 "include/linux/jbd.h" 2 ># 72 "include/linux/jbd.h" >static inline __attribute__((always_inline)) void *jbd_alloc(size_t size, gfp_t flags) >{ > return (void *)__get_free_pages(flags, get_order(size)); >} > >static inline __attribute__((always_inline)) void jbd_free(void *ptr, size_t size) >{ > free_pages((unsigned long)ptr, get_order(size)); >}; ># 102 "include/linux/jbd.h" >typedef struct handle_s handle_t; ># 116 "include/linux/jbd.h" >typedef struct journal_s journal_t; ># 142 "include/linux/jbd.h" >typedef struct journal_header_s >{ > __be32 h_magic; > __be32 h_blocktype; > __be32 h_sequence; >} journal_header_t; > > > > > >typedef struct journal_block_tag_s >{ > __be32 t_blocknr; > __be32 t_flags; >} journal_block_tag_t; > > > > > >typedef struct journal_revoke_header_s >{ > journal_header_t r_header; > __be32 r_count; >} journal_revoke_header_t; ># 180 "include/linux/jbd.h" >typedef struct journal_superblock_s >{ > > journal_header_t s_header; > > > > __be32 s_blocksize; > __be32 s_maxlen; > __be32 s_first; > > > > __be32 s_sequence; > __be32 s_start; > > > > __be32 s_errno; > > > > __be32 s_feature_compat; > __be32 s_feature_incompat; > __be32 s_feature_ro_compat; > > __u8 s_uuid[16]; > > > __be32 s_nr_users; > > __be32 s_dynsuper; > > > __be32 s_max_transaction; > __be32 s_max_trans_data; > > > __u32 s_padding[44]; > > > __u8 s_users[16*48]; > >} journal_superblock_t; ># 283 "include/linux/jbd.h" >enum jbd_state_bits { > BH_JBD > = BH_PrivateStart, > BH_JWrite, > BH_Freed, > BH_Revoked, > BH_RevokeValid, > BH_JBDDirty, > BH_State, > BH_JournalHead, > BH_Unshadow, >}; > >static inline __attribute__((always_inline)) void set_buffer_jbd(struct buffer_head *bh) { set_bit(BH_JBD, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_jbd(struct buffer_head *bh) { clear_bit(BH_JBD, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_jbd(const struct buffer_head *bh) { return (__builtin_constant_p((BH_JBD)) ? constant_test_bit((BH_JBD), (&(bh)->b_state)) : variable_test_bit((BH_JBD), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_jwrite(struct buffer_head *bh) { set_bit(BH_JWrite, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_jwrite(struct buffer_head *bh) { clear_bit(BH_JWrite, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_jwrite(const struct buffer_head *bh) { return (__builtin_constant_p((BH_JWrite)) ? constant_test_bit((BH_JWrite), (&(bh)->b_state)) : variable_test_bit((BH_JWrite), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) void set_buffer_jbddirty(struct buffer_head *bh) { set_bit(BH_JBDDirty, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_jbddirty(struct buffer_head *bh) { clear_bit(BH_JBDDirty, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_jbddirty(const struct buffer_head *bh) { return (__builtin_constant_p((BH_JBDDirty)) ? constant_test_bit((BH_JBDDirty), (&(bh)->b_state)) : variable_test_bit((BH_JBDDirty), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) int test_set_buffer_jbddirty(struct buffer_head *bh) { return test_and_set_bit(BH_JBDDirty, &(bh)->b_state); } static inline __attribute__((always_inline)) int test_clear_buffer_jbddirty(struct buffer_head *bh) { return test_and_clear_bit(BH_JBDDirty, &(bh)->b_state); } >static inline __attribute__((always_inline)) void set_buffer_revoked(struct buffer_head *bh) { set_bit(BH_Revoked, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_revoked(struct buffer_head *bh) { clear_bit(BH_Revoked, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_revoked(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Revoked)) ? constant_test_bit((BH_Revoked), (&(bh)->b_state)) : variable_test_bit((BH_Revoked), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) int test_set_buffer_revoked(struct buffer_head *bh) { return test_and_set_bit(BH_Revoked, &(bh)->b_state); } static inline __attribute__((always_inline)) int test_clear_buffer_revoked(struct buffer_head *bh) { return test_and_clear_bit(BH_Revoked, &(bh)->b_state); } >static inline __attribute__((always_inline)) void set_buffer_revokevalid(struct buffer_head *bh) { set_bit(BH_RevokeValid, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_revokevalid(struct buffer_head *bh) { clear_bit(BH_RevokeValid, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_revokevalid(const struct buffer_head *bh) { return (__builtin_constant_p((BH_RevokeValid)) ? constant_test_bit((BH_RevokeValid), (&(bh)->b_state)) : variable_test_bit((BH_RevokeValid), (&(bh)->b_state))); } >static inline __attribute__((always_inline)) int test_set_buffer_revokevalid(struct buffer_head *bh) { return test_and_set_bit(BH_RevokeValid, &(bh)->b_state); } static inline __attribute__((always_inline)) int test_clear_buffer_revokevalid(struct buffer_head *bh) { return test_and_clear_bit(BH_RevokeValid, &(bh)->b_state); } >static inline __attribute__((always_inline)) void set_buffer_freed(struct buffer_head *bh) { set_bit(BH_Freed, &(bh)->b_state); } static inline __attribute__((always_inline)) void clear_buffer_freed(struct buffer_head *bh) { clear_bit(BH_Freed, &(bh)->b_state); } static inline __attribute__((always_inline)) int buffer_freed(const struct buffer_head *bh) { return (__builtin_constant_p((BH_Freed)) ? constant_test_bit((BH_Freed), (&(bh)->b_state)) : variable_test_bit((BH_Freed), (&(bh)->b_state))); } > >static inline __attribute__((always_inline)) struct buffer_head *jh2bh(struct journal_head *jh) >{ > return jh->b_bh; >} > >static inline __attribute__((always_inline)) struct journal_head *bh2jh(struct buffer_head *bh) >{ > return bh->b_private; >} > >static inline __attribute__((always_inline)) void jbd_lock_bh_state(struct buffer_head *bh) >{ > bit_spin_lock(BH_State, &bh->b_state); >} > >static inline __attribute__((always_inline)) int jbd_trylock_bh_state(struct buffer_head *bh) >{ > return bit_spin_trylock(BH_State, &bh->b_state); >} > >static inline __attribute__((always_inline)) int jbd_is_locked_bh_state(struct buffer_head *bh) >{ > return bit_spin_is_locked(BH_State, &bh->b_state); >} > >static inline __attribute__((always_inline)) void jbd_unlock_bh_state(struct buffer_head *bh) >{ > bit_spin_unlock(BH_State, &bh->b_state); >} > >static inline __attribute__((always_inline)) void jbd_lock_bh_journal_head(struct buffer_head *bh) >{ > bit_spin_lock(BH_JournalHead, &bh->b_state); >} > >static inline __attribute__((always_inline)) void jbd_unlock_bh_journal_head(struct buffer_head *bh) >{ > bit_spin_unlock(BH_JournalHead, &bh->b_state); >} > >struct jbd_revoke_table_s; ># 359 "include/linux/jbd.h" >struct handle_s >{ > > transaction_t *h_transaction; > > > int h_buffer_credits; > > > int h_ref; > > > > int h_err; > > > unsigned int h_sync: 1; > unsigned int h_jdata: 1; > unsigned int h_aborted: 1; > > > struct lockdep_map h_lockdep_map; > >}; ># 421 "include/linux/jbd.h" >struct transaction_s >{ > > journal_t *t_journal; > > > tid_t t_tid; ># 437 "include/linux/jbd.h" > enum { > T_RUNNING, > T_LOCKED, > T_RUNDOWN, > T_FLUSH, > T_COMMIT, > T_FINISHED > } t_state; > > > > > unsigned long t_log_start; > > > int t_nr_buffers; > > > > > > struct journal_head *t_reserved_list; > > > > > > struct journal_head *t_locked_list; > > > > > > struct journal_head *t_buffers; > > > > > > struct journal_head *t_sync_datalist; > > > > > > > struct journal_head *t_forget; > > > > > > struct journal_head *t_checkpoint_list; > > > > > > struct journal_head *t_checkpoint_io_list; > > > > > > struct journal_head *t_iobuf_list; > > > > > > > struct journal_head *t_shadow_list; > > > > > > struct journal_head *t_log_list; > > > > > spinlock_t t_handle_lock; > > > > > > int t_updates; > > > > > > int t_outstanding_credits; > > > > > > transaction_t *t_cpnext, *t_cpprev; > > > > > > unsigned long t_expires; > > > > > int t_handle_count; > >}; ># 615 "include/linux/jbd.h" >struct journal_s >{ > > unsigned long j_flags; > > > > > > int j_errno; > > > struct buffer_head *j_sb_buffer; > journal_superblock_t *j_superblock; > > > int j_format_version; > > > > > spinlock_t j_state_lock; > > > > > int j_barrier_count; > > > struct mutex j_barrier; > > > > > > transaction_t *j_running_transaction; > > > > > > transaction_t *j_committing_transaction; > > > > > > transaction_t *j_checkpoint_transactions; > > > > > > wait_queue_head_t j_wait_transaction_locked; > > > wait_queue_head_t j_wait_logspace; > > > wait_queue_head_t j_wait_done_commit; > > > wait_queue_head_t j_wait_checkpoint; > > > wait_queue_head_t j_wait_commit; > > > wait_queue_head_t j_wait_updates; > > > struct mutex j_checkpoint_mutex; > > > > > > unsigned long j_head; > > > > > > unsigned long j_tail; > > > > > > unsigned long j_free; > > > > > > unsigned long j_first; > unsigned long j_last; > > > > > > struct block_device *j_dev; > int j_blocksize; > unsigned long j_blk_offset; > > > > > > struct block_device *j_fs_dev; > > > unsigned int j_maxlen; > > > > > spinlock_t j_list_lock; > > > > > struct inode *j_inode; > > > > > tid_t j_tail_sequence; > > > > > tid_t j_transaction_sequence; > > > > > > tid_t j_commit_sequence; > > > > > > tid_t j_commit_request; > > > > > > > > __u8 j_uuid[16]; > > > struct task_struct *j_task; > > > > > > int j_max_transaction_buffers; > > > > > unsigned long j_commit_interval; > > > struct timer_list j_commit_timer; > > > > > > spinlock_t j_revoke_lock; > struct jbd_revoke_table_s *j_revoke; > struct jbd_revoke_table_s *j_revoke_table[2]; > > > > > struct buffer_head **j_wbuf; > int j_wbufsize; > > pid_t j_last_sync_writer; > > > > > > void *j_private; >}; ># 826 "include/linux/jbd.h" >extern void journal_unfile_buffer(journal_t *, struct journal_head *); >extern void __journal_unfile_buffer(struct journal_head *); >extern void __journal_refile_buffer(struct journal_head *); >extern void journal_refile_buffer(journal_t *, struct journal_head *); >extern void __journal_file_buffer(struct journal_head *, transaction_t *, int); >extern void __journal_free_buffer(struct journal_head *bh); >extern void journal_file_buffer(struct journal_head *, transaction_t *, int); >extern void __journal_clean_data_list(transaction_t *transaction); > > >extern struct journal_head * journal_get_descriptor_buffer(journal_t *); >int journal_next_log_block(journal_t *, unsigned long *); > > >extern void journal_commit_transaction(journal_t *); > > >int __journal_clean_checkpoint_list(journal_t *journal); >int __journal_remove_checkpoint(struct journal_head *); >void __journal_insert_checkpoint(struct journal_head *, transaction_t *); > > >extern int >journal_write_metadata_buffer(transaction_t *transaction, > struct journal_head *jh_in, > struct journal_head **jh_out, > unsigned long blocknr); > > >extern void __wait_on_journal (journal_t *); ># 868 "include/linux/jbd.h" >static inline __attribute__((always_inline)) handle_t *journal_current_handle(void) >{ > return get_current()->journal_info; >} > > > > > > > >extern handle_t *journal_start(journal_t *, int nblocks); >extern int journal_restart (handle_t *, int nblocks); >extern int journal_extend (handle_t *, int nblocks); >extern int journal_get_write_access(handle_t *, struct buffer_head *); >extern int journal_get_create_access (handle_t *, struct buffer_head *); >extern int journal_get_undo_access(handle_t *, struct buffer_head *); >extern int journal_dirty_data (handle_t *, struct buffer_head *); >extern int journal_dirty_metadata (handle_t *, struct buffer_head *); >extern void journal_release_buffer (handle_t *, struct buffer_head *); >extern int journal_forget (handle_t *, struct buffer_head *); >extern void journal_sync_buffer (struct buffer_head *); >extern void journal_invalidatepage(journal_t *, > struct page *, unsigned long); >extern int journal_try_to_free_buffers(journal_t *, struct page *, gfp_t); >extern int journal_stop(handle_t *); >extern int journal_flush (journal_t *); >extern void journal_lock_updates (journal_t *); >extern void journal_unlock_updates (journal_t *); > >extern journal_t * journal_init_dev(struct block_device *bdev, > struct block_device *fs_dev, > int start, int len, int bsize); >extern journal_t * journal_init_inode (struct inode *); >extern int journal_update_format (journal_t *); >extern int journal_check_used_features > (journal_t *, unsigned long, unsigned long, unsigned long); >extern int journal_check_available_features > (journal_t *, unsigned long, unsigned long, unsigned long); >extern int journal_set_features > (journal_t *, unsigned long, unsigned long, unsigned long); >extern int journal_create (journal_t *); >extern int journal_load (journal_t *journal); >extern void journal_destroy (journal_t *); >extern int journal_recover (journal_t *journal); >extern int journal_wipe (journal_t *, int); >extern int journal_skip_recovery (journal_t *); >extern void journal_update_superblock (journal_t *, int); >extern void journal_abort (journal_t *, int); >extern int journal_errno (journal_t *); >extern void journal_ack_err (journal_t *); >extern int journal_clear_err (journal_t *); >extern int journal_bmap(journal_t *, unsigned long, unsigned long *); >extern int journal_force_commit(journal_t *); > > > > >struct journal_head *journal_add_journal_head(struct buffer_head *bh); >struct journal_head *journal_grab_journal_head(struct buffer_head *bh); >void journal_remove_journal_head(struct buffer_head *bh); >void journal_put_journal_head(struct journal_head *jh); > > > > >extern struct kmem_cache *jbd_handle_cache; > >static inline __attribute__((always_inline)) handle_t *jbd_alloc_handle(gfp_t gfp_flags) >{ > return kmem_cache_alloc(jbd_handle_cache, gfp_flags); >} > >static inline __attribute__((always_inline)) void jbd_free_handle(handle_t *handle) >{ > kmem_cache_free(jbd_handle_cache, handle); >} > > > >extern int journal_init_revoke(journal_t *, int); >extern void journal_destroy_revoke_caches(void); >extern int journal_init_revoke_caches(void); > >extern void journal_destroy_revoke(journal_t *); >extern int journal_revoke (handle_t *, > unsigned long, struct buffer_head *); >extern int journal_cancel_revoke(handle_t *, struct journal_head *); >extern void journal_write_revoke_records(journal_t *, transaction_t *); > > >extern int journal_set_revoke(journal_t *, unsigned long, tid_t); >extern int journal_test_revoke(journal_t *, unsigned long, tid_t); >extern void journal_clear_revoke(journal_t *); >extern void journal_switch_revoke_table(journal_t *journal); ># 971 "include/linux/jbd.h" >int __log_space_left(journal_t *); >int log_start_commit(journal_t *journal, tid_t tid); >int __log_start_commit(journal_t *journal, tid_t tid); >int journal_start_commit(journal_t *journal, tid_t *tid); >int journal_force_commit_nested(journal_t *journal); >int log_wait_commit(journal_t *journal, tid_t tid); >int log_do_checkpoint(journal_t *journal); > >void __log_wait_for_space(journal_t *journal); >extern void __journal_drop_transaction(journal_t *, transaction_t *); >extern int cleanup_journal_tail(journal_t *); ># 1002 "include/linux/jbd.h" >static inline __attribute__((always_inline)) int is_journal_aborted(journal_t *journal) >{ > return journal->j_flags & 0x002; >} > >static inline __attribute__((always_inline)) int is_handle_aborted(handle_t *handle) >{ > if (handle->h_aborted) > return 1; > return is_journal_aborted(handle->h_transaction->t_journal); >} > >static inline __attribute__((always_inline)) void journal_abort_handle(handle_t *handle) >{ > handle->h_aborted = 1; >} > > > > > > >static inline __attribute__((always_inline)) int tid_gt(tid_t x, tid_t y) >{ > int difference = (x - y); > return (difference > 0); >} > >static inline __attribute__((always_inline)) int tid_geq(tid_t x, tid_t y) >{ > int difference = (x - y); > return (difference >= 0); >} > >extern int journal_blocks_per_page(struct inode *inode); > > > > > >static inline __attribute__((always_inline)) int jbd_space_needed(journal_t *journal) >{ > int nblocks = journal->j_max_transaction_buffers; > if (journal->j_committing_transaction) > nblocks += journal->j_committing_transaction-> > t_outstanding_credits; > return nblocks; >} ># 1067 "include/linux/jbd.h" >extern int jbd_blocks_per_page(struct inode *inode); ># 30 "/root/ext3/namei.c" 2 > ># 1 "include/linux/ext3_fs.h" 1 ># 20 "include/linux/ext3_fs.h" ># 1 "include/linux/magic.h" 1 ># 21 "include/linux/ext3_fs.h" 2 ># 118 "include/linux/ext3_fs.h" >struct ext3_group_desc >{ > __le32 bg_block_bitmap; > __le32 bg_inode_bitmap; > __le32 bg_inode_table; > __le16 bg_free_blocks_count; > __le16 bg_free_inodes_count; > __le16 bg_used_dirs_count; > __u16 bg_pad; > __le32 bg_reserved[3]; >}; ># 189 "include/linux/ext3_fs.h" >struct ext3_new_group_input { > __u32 group; > __u32 block_bitmap; > __u32 inode_bitmap; > __u32 inode_table; > __u32 blocks_count; > __u16 reserved_blocks; > __u16 unused; >}; > > >struct ext3_new_group_data { > __u32 group; > __u32 block_bitmap; > __u32 inode_bitmap; > __u32 inode_table; > __u32 blocks_count; > __u16 reserved_blocks; > __u16 unused; > __u32 free_blocks_count; >}; ># 249 "include/linux/ext3_fs.h" >struct ext3_mount_options { > unsigned long s_mount_opt; > uid_t s_resuid; > gid_t s_resgid; > unsigned long s_commit_interval; > > int s_jquota_fmt; > char *s_qf_names[2]; > >}; > > > > >struct ext3_inode { > __le16 i_mode; > __le16 i_uid; > __le32 i_size; > __le32 i_atime; > __le32 i_ctime; > __le32 i_mtime; > __le32 i_dtime; > __le16 i_gid; > __le16 i_links_count; > __le32 i_blocks; > __le32 i_flags; > union { > struct { > __u32 l_i_reserved1; > } linux1; > struct { > __u32 h_i_translator; > } hurd1; > struct { > __u32 m_i_reserved1; > } masix1; > } osd1; > __le32 i_block[(((12 + 1) + 1) + 1)]; > __le32 i_generation; > __le32 i_file_acl; > __le32 i_dir_acl; > __le32 i_faddr; > union { > struct { > __u8 l_i_frag; > __u8 l_i_fsize; > __u16 i_pad1; > __le16 l_i_uid_high; > __le16 l_i_gid_high; > __u32 l_i_reserved2; > } linux2; > struct { > __u8 h_i_frag; > __u8 h_i_fsize; > __u16 h_i_mode_high; > __u16 h_i_uid_high; > __u16 h_i_gid_high; > __u32 h_i_author; > } hurd2; > struct { > __u8 m_i_frag; > __u8 m_i_fsize; > __u16 m_pad1; > __u32 m_i_reserved2[2]; > } masix2; > } osd2; > __le16 i_extra_isize; > __le16 i_pad1; >}; ># 421 "include/linux/ext3_fs.h" >struct ext3_super_block { > __le32 s_inodes_count; > __le32 s_blocks_count; > __le32 s_r_blocks_count; > __le32 s_free_blocks_count; > __le32 s_free_inodes_count; > __le32 s_first_data_block; > __le32 s_log_block_size; > __le32 s_log_frag_size; > __le32 s_blocks_per_group; > __le32 s_frags_per_group; > __le32 s_inodes_per_group; > __le32 s_mtime; > __le32 s_wtime; > __le16 s_mnt_count; > __le16 s_max_mnt_count; > __le16 s_magic; > __le16 s_state; > __le16 s_errors; > __le16 s_minor_rev_level; > __le32 s_lastcheck; > __le32 s_checkinterval; > __le32 s_creator_os; > __le32 s_rev_level; > __le16 s_def_resuid; > __le16 s_def_resgid; ># 460 "include/linux/ext3_fs.h" > __le32 s_first_ino; > __le16 s_inode_size; > __le16 s_block_group_nr; > __le32 s_feature_compat; > __le32 s_feature_incompat; > __le32 s_feature_ro_compat; > __u8 s_uuid[16]; > char s_volume_name[16]; > char s_last_mounted[64]; > __le32 s_algorithm_usage_bitmap; > > > > > __u8 s_prealloc_blocks; > __u8 s_prealloc_dir_blocks; > __le16 s_reserved_gdt_blocks; > > > > __u8 s_journal_uuid[16]; > __le32 s_journal_inum; > __le32 s_journal_dev; > __le32 s_last_orphan; > __le32 s_hash_seed[4]; > __u8 s_def_hash_version; > __u8 s_reserved_char_pad; > __u16 s_reserved_word_pad; > __le32 s_default_mount_opts; > __le32 s_first_meta_bg; > __u32 s_reserved[190]; >}; > > ># 1 "include/linux/ext3_fs_i.h" 1 ># 25 "include/linux/ext3_fs_i.h" >typedef int ext3_grpblk_t; > > >typedef unsigned long ext3_fsblk_t; > > > >struct ext3_reserve_window { > ext3_fsblk_t _rsv_start; > ext3_fsblk_t _rsv_end; >}; > >struct ext3_reserve_window_node { > struct rb_node rsv_node; > __u32 rsv_goal_size; > __u32 rsv_alloc_hit; > struct ext3_reserve_window rsv_window; >}; > >struct ext3_block_alloc_info { > > struct ext3_reserve_window_node rsv_window_node; > > > > > > > __u32 last_alloc_logical_block; > > > > > > > > ext3_fsblk_t last_alloc_physical_block; >}; > > > > > > > >struct ext3_inode_info { > __le32 i_data[15]; > __u32 i_flags; > > > > > > ext3_fsblk_t i_file_acl; > __u32 i_dir_acl; > __u32 i_dtime; ># 89 "include/linux/ext3_fs_i.h" > __u32 i_block_group; > __u32 i_state; > > > struct ext3_block_alloc_info *i_block_alloc_info; > > __u32 i_dir_start_lookup; ># 104 "include/linux/ext3_fs_i.h" > struct rw_semaphore xattr_sem; > > > struct posix_acl *i_acl; > struct posix_acl *i_default_acl; > > > struct list_head i_orphan; ># 128 "include/linux/ext3_fs_i.h" > loff_t i_disksize; > > > __u16 i_extra_isize; ># 143 "include/linux/ext3_fs_i.h" > struct mutex truncate_mutex; > struct inode vfs_inode; >}; ># 495 "include/linux/ext3_fs.h" 2 ># 1 "include/linux/ext3_fs_sb.h" 1 ># 22 "include/linux/ext3_fs_sb.h" ># 1 "include/linux/blockgroup_lock.h" 1 ># 36 "include/linux/blockgroup_lock.h" >struct bgl_lock { > spinlock_t lock; >} __attribute__((__aligned__((1 << (7))))); > >struct blockgroup_lock { > struct bgl_lock locks[128]; >}; > >static inline __attribute__((always_inline)) void bgl_lock_init(struct blockgroup_lock *bgl) >{ > int i; > > for (i = 0; i < 128; i++) > do { static struct lock_class_key __key; __spin_lock_init((&bgl->locks[i].lock), "&bgl->locks[i].lock", &__key); } while (0); >} ># 23 "include/linux/ext3_fs_sb.h" 2 > > > > > > > >struct ext3_sb_info { > unsigned long s_frag_size; > unsigned long s_frags_per_block; > unsigned long s_inodes_per_block; > unsigned long s_frags_per_group; > unsigned long s_blocks_per_group; > unsigned long s_inodes_per_group; > unsigned long s_itb_per_group; > unsigned long s_gdb_count; > unsigned long s_desc_per_block; > unsigned long s_groups_count; > unsigned long s_overhead_last; > unsigned long s_blocks_last; > struct buffer_head * s_sbh; > struct ext3_super_block * s_es; > struct buffer_head ** s_group_desc; > unsigned long s_mount_opt; > ext3_fsblk_t s_sb_block; > uid_t s_resuid; > gid_t s_resgid; > unsigned short s_mount_state; > unsigned short s_pad; > int s_addr_per_block_bits; > int s_desc_per_block_bits; > int s_inode_size; > int s_first_ino; > spinlock_t s_next_gen_lock; > u32 s_next_generation; > u32 s_hash_seed[4]; > int s_def_hash_version; > struct percpu_counter s_freeblocks_counter; > struct percpu_counter s_freeinodes_counter; > struct percpu_counter s_dirs_counter; > struct blockgroup_lock s_blockgroup_lock; > > > spinlock_t s_rsv_window_lock; > struct rb_root s_rsv_window_root; > struct ext3_reserve_window_node s_rsv_window_head; > > > struct inode * s_journal_inode; > struct journal_s * s_journal; > struct list_head s_orphan; > unsigned long s_commit_interval; > struct block_device *journal_bdev; > > > > > > char *s_qf_names[2]; > int s_jquota_fmt; > >}; ># 496 "include/linux/ext3_fs.h" 2 >static inline __attribute__((always_inline)) struct ext3_sb_info * EXT3_SB(struct super_block *sb) >{ > return sb->s_fs_info; >} >static inline __attribute__((always_inline)) struct ext3_inode_info *EXT3_I(struct inode *inode) >{ > return ({ const typeof( ((struct ext3_inode_info *)0)->vfs_inode ) *__mptr = (inode); (struct ext3_inode_info *)( (char *)__mptr - __builtin_offsetof(struct ext3_inode_info,vfs_inode) );}); >} > >static inline __attribute__((always_inline)) int ext3_valid_inum(struct super_block *sb, unsigned long ino) >{ > return ino == 2 || > ino == 8 || > ino == 7 || > (ino >= (EXT3_SB(sb)->s_first_ino) && > ino <= (( __u32)(__le32)(EXT3_SB(sb)->s_es->s_inodes_count))); >} ># 614 "include/linux/ext3_fs.h" >struct ext3_dir_entry { > __le32 inode; > __le16 rec_len; > __le16 name_len; > char name[255]; >}; > > > > > > > >struct ext3_dir_entry_2 { > __le32 inode; > __le16 rec_len; > __u8 name_len; > __u8 file_type; > char name[255]; >}; ># 661 "include/linux/ext3_fs.h" >static inline __attribute__((always_inline)) unsigned ext3_rec_len_from_disk(__le16 dlen) >{ > unsigned len = (( __u16)(__le16)(dlen)); > > if (len == ((1<<16)-1)) > return 1 << 16; > return len; >} > >static inline __attribute__((always_inline)) __le16 ext3_rec_len_to_disk(unsigned len) >{ > if (len == (1 << 16)) > return (( __le16)(__u16)(((1<<16)-1))); > else if (len > (1 << 16)) > do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/ext3_fs.h"), "i" (675), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); > return (( __le16)(__u16)(len)); >} ># 699 "include/linux/ext3_fs.h" >struct dx_hash_info >{ > u32 hash; > u32 minor_hash; > int hash_version; > u32 *seed; >}; ># 718 "include/linux/ext3_fs.h" >struct ext3_iloc >{ > struct buffer_head *bh; > unsigned long offset; > unsigned long block_group; >}; > >static inline __attribute__((always_inline)) struct ext3_inode *ext3_raw_inode(struct ext3_iloc *iloc) >{ > return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset); >} > > > > > > >struct dir_private_info { > struct rb_root root; > struct rb_node *curr_node; > struct fname *extra_fname; > loff_t last_pos; > __u32 curr_hash; > __u32 curr_minor_hash; > __u32 next_hash; >}; > > >static inline __attribute__((always_inline)) ext3_fsblk_t >ext3_group_first_block_no(struct super_block *sb, unsigned long group_no) >{ > return group_no * (ext3_fsblk_t)(EXT3_SB(sb)->s_blocks_per_group) + > (( __u32)(__le32)(EXT3_SB(sb)->s_es->s_first_data_block)); >} ># 771 "include/linux/ext3_fs.h" >extern int ext3_bg_has_super(struct super_block *sb, int group); >extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group); >extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode, > ext3_fsblk_t goal, int *errp); >extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode, > ext3_fsblk_t goal, unsigned long *count, int *errp); >extern void ext3_free_blocks (handle_t *handle, struct inode *inode, > ext3_fsblk_t block, unsigned long count); >extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb, > ext3_fsblk_t block, unsigned long count, > unsigned long *pdquot_freed_blocks); >extern ext3_fsblk_t ext3_count_free_blocks (struct super_block *); >extern void ext3_check_blocks_bitmap (struct super_block *); >extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb, > unsigned int block_group, > struct buffer_head ** bh); >extern int ext3_should_retry_alloc(struct super_block *sb, int *retries); >extern void ext3_init_block_alloc_info(struct inode *); >extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv); > > >extern int ext3_check_dir_entry(const char *, struct inode *, > struct ext3_dir_entry_2 *, > struct buffer_head *, unsigned long); >extern int ext3_htree_store_dirent(struct file *dir_file, __u32 hash, > __u32 minor_hash, > struct ext3_dir_entry_2 *dirent); >extern void ext3_htree_free_dir_info(struct dir_private_info *p); > > >extern int ext3_sync_file (struct file *, struct dentry *, int); > > >extern int ext3fs_dirhash(const char *name, int len, struct > dx_hash_info *hinfo); > > >extern struct inode * ext3_new_inode (handle_t *, struct inode *, int); >extern void ext3_free_inode (handle_t *, struct inode *); >extern struct inode * ext3_orphan_get (struct super_block *, unsigned long); >extern unsigned long ext3_count_free_inodes (struct super_block *); >extern unsigned long ext3_count_dirs (struct super_block *); >extern void ext3_check_inodes_bitmap (struct super_block *); >extern unsigned long ext3_count_free (struct buffer_head *, unsigned); > > > >int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, > struct buffer_head *bh, ext3_fsblk_t blocknr); >struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); >struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); >int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, > sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result, > int create, int extend_disksize); > >extern struct inode *ext3_iget(struct super_block *, unsigned long); >extern int ext3_write_inode (struct inode *, int); >extern int ext3_setattr (struct dentry *, struct iattr *); >extern void ext3_delete_inode (struct inode *); >extern int ext3_sync_inode (handle_t *, struct inode *); >extern void ext3_discard_reservation (struct inode *); >extern void ext3_dirty_inode(struct inode *); >extern int ext3_change_inode_journal_flag(struct inode *, int); >extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); >extern void ext3_truncate (struct inode *); >extern void ext3_set_inode_flags(struct inode *); >extern void ext3_get_inode_flags(struct ext3_inode_info *); >extern void ext3_set_aops(struct inode *inode); > > >extern int ext3_ioctl (struct inode *, struct file *, unsigned int, > unsigned long); >extern long ext3_compat_ioctl (struct file *, unsigned int, unsigned long); > > >extern int ext3_orphan_add(handle_t *, struct inode *); >extern int ext3_orphan_del(handle_t *, struct inode *); >extern int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash, > __u32 start_minor_hash, __u32 *next_hash); > > >extern int ext3_group_add(struct super_block *sb, > struct ext3_new_group_data *input); >extern int ext3_group_extend(struct super_block *sb, > struct ext3_super_block *es, > ext3_fsblk_t n_blocks_count); > > >extern void ext3_error (struct super_block *, const char *, const char *, ...) > __attribute__ ((format (printf, 3, 4))); >extern void __ext3_std_error (struct super_block *, const char *, int); >extern void ext3_abort (struct super_block *, const char *, const char *, ...) > __attribute__ ((format (printf, 3, 4))); >extern void ext3_warning (struct super_block *, const char *, const char *, ...) > __attribute__ ((format (printf, 3, 4))); >extern void ext3_update_dynamic_rev (struct super_block *sb); ># 879 "include/linux/ext3_fs.h" >extern const struct file_operations ext3_dir_operations; > > >extern const struct inode_operations ext3_file_inode_operations; >extern const struct file_operations ext3_file_operations; > > >extern const struct inode_operations ext3_dir_inode_operations; >extern const struct inode_operations ext3_special_inode_operations; > > >extern const struct inode_operations ext3_symlink_inode_operations; >extern const struct inode_operations ext3_fast_symlink_inode_operations; ># 32 "/root/ext3/namei.c" 2 ># 1 "include/linux/ext3_jbd.h" 1 ># 90 "include/linux/ext3_jbd.h" >int >ext3_mark_iloc_dirty(handle_t *handle, > struct inode *inode, > struct ext3_iloc *iloc); > > > > > > >int ext3_reserve_inode_write(handle_t *handle, struct inode *inode, > struct ext3_iloc *iloc); > >int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode); ># 112 "include/linux/ext3_jbd.h" >static inline __attribute__((always_inline)) void ext3_journal_release_buffer(handle_t *handle, > struct buffer_head *bh) >{ > journal_release_buffer(handle, bh); >} > >void ext3_journal_abort_handle(const char *caller, const char *err_fn, > struct buffer_head *bh, handle_t *handle, int err); > >int __ext3_journal_get_undo_access(const char *where, handle_t *handle, > struct buffer_head *bh); > >int __ext3_journal_get_write_access(const char *where, handle_t *handle, > struct buffer_head *bh); > >int __ext3_journal_forget(const char *where, handle_t *handle, > struct buffer_head *bh); > >int __ext3_journal_revoke(const char *where, handle_t *handle, > unsigned long blocknr, struct buffer_head *bh); > >int __ext3_journal_get_create_access(const char *where, > handle_t *handle, struct buffer_head *bh); > >int __ext3_journal_dirty_metadata(const char *where, > handle_t *handle, struct buffer_head *bh); ># 152 "include/linux/ext3_jbd.h" >int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh); > >handle_t *ext3_journal_start_sb(struct super_block *sb, int nblocks); >int __ext3_journal_stop(const char *where, handle_t *handle); > >static inline __attribute__((always_inline)) handle_t *ext3_journal_start(struct inode *inode, int nblocks) >{ > return ext3_journal_start_sb(inode->i_sb, nblocks); >} > > > > >static inline __attribute__((always_inline)) handle_t *ext3_journal_current_handle(void) >{ > return journal_current_handle(); >} > >static inline __attribute__((always_inline)) int ext3_journal_extend(handle_t *handle, int nblocks) >{ > return journal_extend(handle, nblocks); >} > >static inline __attribute__((always_inline)) int ext3_journal_restart(handle_t *handle, int nblocks) >{ > return journal_restart(handle, nblocks); >} > >static inline __attribute__((always_inline)) int ext3_journal_blocks_per_page(struct inode *inode) >{ > return journal_blocks_per_page(inode); >} > >static inline __attribute__((always_inline)) int ext3_journal_force_commit(journal_t *journal) >{ > return journal_force_commit(journal); >} > > >int ext3_force_commit(struct super_block *sb); > >static inline __attribute__((always_inline)) int ext3_should_journal_data(struct inode *inode) >{ > if (!(((inode->i_mode) & 00170000) == 0100000)) > return 1; > if ((EXT3_SB(inode->i_sb)->s_mount_opt & 0x00C00) == 0x00400) > return 1; > if (EXT3_I(inode)->i_flags & 0x00004000) > return 1; > return 0; >} > >static inline __attribute__((always_inline)) int ext3_should_order_data(struct inode *inode) >{ > if (!(((inode->i_mode) & 00170000) == 0100000)) > return 0; > if (EXT3_I(inode)->i_flags & 0x00004000) > return 0; > if ((EXT3_SB(inode->i_sb)->s_mount_opt & 0x00C00) == 0x00800) > return 1; > return 0; >} > >static inline __attribute__((always_inline)) int ext3_should_writeback_data(struct inode *inode) >{ > if (!(((inode->i_mode) & 00170000) == 0100000)) > return 0; > if (EXT3_I(inode)->i_flags & 0x00004000) > return 0; > if ((EXT3_SB(inode->i_sb)->s_mount_opt & 0x00C00) == 0x00C00) > return 1; > return 0; >} ># 33 "/root/ext3/namei.c" 2 > > > ># 1 "include/linux/quotaops.h" 1 ># 22 "include/linux/quotaops.h" >extern void sync_dquots(struct super_block *sb, int type); > >extern int dquot_initialize(struct inode *inode, int type); >extern int dquot_drop(struct inode *inode); > >extern int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); >extern int dquot_alloc_inode(const struct inode *inode, unsigned long number); > >extern int dquot_free_space(struct inode *inode, qsize_t number); >extern int dquot_free_inode(const struct inode *inode, unsigned long number); > >extern int dquot_transfer(struct inode *inode, struct iattr *iattr); >extern int dquot_commit(struct dquot *dquot); >extern int dquot_acquire(struct dquot *dquot); >extern int dquot_release(struct dquot *dquot); >extern int dquot_commit_info(struct super_block *sb, int type); >extern int dquot_mark_dquot_dirty(struct dquot *dquot); > >extern int vfs_quota_on(struct super_block *sb, int type, int format_id, > char *path, int remount); >extern int vfs_quota_on_mount(struct super_block *sb, char *qf_name, > int format_id, int type); >extern int vfs_quota_off(struct super_block *sb, int type, int remount); >extern int vfs_quota_sync(struct super_block *sb, int type); >extern int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); >extern int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); >extern int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); >extern int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); > > > > >extern struct dquot_operations dquot_operations; >extern struct quotactl_ops vfs_quotactl_ops; > > > > > > >static inline __attribute__((always_inline)) void DQUOT_INIT(struct inode *inode) >{ > do { if (__builtin_expect(!!(!inode->i_sb), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/quotaops.h"), "i" (64), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > if ((((0)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)) | ((1)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02))) && !((inode)->i_flags & 32)) > inode->i_sb->dq_op->initialize(inode, -1); >} > > >static inline __attribute__((always_inline)) void DQUOT_DROP(struct inode *inode) >{ > > > > if (!((inode)->i_flags & 32) && inode->i_sb && inode->i_sb->dq_op > && inode->i_sb->dq_op->drop) { > int cnt; > > > > > > for (cnt = 0; cnt < 2; cnt++) > if (inode->i_dquot[cnt] != (struct dquot *)((void *)0)) > break; > if (cnt < 2) > inode->i_sb->dq_op->drop(inode); > } >} > > > >static inline __attribute__((always_inline)) int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr) >{ > if ((((0)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)) | ((1)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)))) { > > if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == 1) > return 1; > } > else > inode_add_bytes(inode, nr); > return 0; >} > >static inline __attribute__((always_inline)) int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr) >{ > int ret; > if (!(ret = DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr))) > mark_inode_dirty(inode); > return ret; >} > >static inline __attribute__((always_inline)) int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr) >{ > if ((((0)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)) | ((1)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)))) { > > if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == 1) > return 1; > } > else > inode_add_bytes(inode, nr); > return 0; >} > >static inline __attribute__((always_inline)) int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr) >{ > int ret; > if (!(ret = DQUOT_ALLOC_SPACE_NODIRTY(inode, nr))) > mark_inode_dirty(inode); > return ret; >} > >static inline __attribute__((always_inline)) int DQUOT_ALLOC_INODE(struct inode *inode) >{ > if ((((0)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)) | ((1)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)))) { > DQUOT_INIT(inode); > if (inode->i_sb->dq_op->alloc_inode(inode, 1) == 1) > return 1; > } > return 0; >} > >static inline __attribute__((always_inline)) void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr) >{ > if ((((0)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)) | ((1)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)))) > inode->i_sb->dq_op->free_space(inode, nr); > else > inode_sub_bytes(inode, nr); >} > >static inline __attribute__((always_inline)) void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr) >{ > DQUOT_FREE_SPACE_NODIRTY(inode, nr); > mark_inode_dirty(inode); >} > >static inline __attribute__((always_inline)) void DQUOT_FREE_INODE(struct inode *inode) >{ > if ((((0)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)) | ((1)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)))) > inode->i_sb->dq_op->free_inode(inode, 1); >} > >static inline __attribute__((always_inline)) int DQUOT_TRANSFER(struct inode *inode, struct iattr *iattr) >{ > if ((((0)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02)) | ((1)==0 ? ((&(inode->i_sb)->s_dquot)->flags & 0x01) : ((&(inode->i_sb)->s_dquot)->flags & 0x02))) && !((inode)->i_flags & 32)) { > DQUOT_INIT(inode); > if (inode->i_sb->dq_op->transfer(inode, iattr) == 1) > return 1; > } > return 0; >} > > >static inline __attribute__((always_inline)) void DQUOT_SYNC(struct super_block *sb) >{ > sync_dquots(sb, -1); >} > >static inline __attribute__((always_inline)) int DQUOT_OFF(struct super_block *sb, int remount) >{ > int ret = -38; > > if (sb->s_qcop && sb->s_qcop->quota_off) > ret = sb->s_qcop->quota_off(sb, -1, remount); > return ret; >} > >static inline __attribute__((always_inline)) int DQUOT_ON_REMOUNT(struct super_block *sb) >{ > int cnt; > int ret = 0, err; > > if (!sb->s_qcop || !sb->s_qcop->quota_on) > return -38; > for (cnt = 0; cnt < 2; cnt++) { > err = sb->s_qcop->quota_on(sb, cnt, 0, ((void *)0), 1); > if (err < 0 && !ret) > ret = err; > } > return ret; >} ># 286 "include/linux/quotaops.h" >static inline __attribute__((always_inline)) int DQUOT_PREALLOC_BLOCK_NODIRTY(struct inode *inode, qsize_t nr) >{ > return DQUOT_PREALLOC_SPACE_NODIRTY(inode, > nr << inode->i_sb->s_blocksize_bits); >} > >static inline __attribute__((always_inline)) int DQUOT_PREALLOC_BLOCK(struct inode *inode, qsize_t nr) >{ > return DQUOT_PREALLOC_SPACE(inode, > nr << inode->i_sb->s_blocksize_bits); >} > >static inline __attribute__((always_inline)) int DQUOT_ALLOC_BLOCK_NODIRTY(struct inode *inode, qsize_t nr) >{ > return DQUOT_ALLOC_SPACE_NODIRTY(inode, > nr << inode->i_sb->s_blocksize_bits); >} > >static inline __attribute__((always_inline)) int DQUOT_ALLOC_BLOCK(struct inode *inode, qsize_t nr) >{ > return DQUOT_ALLOC_SPACE(inode, > nr << inode->i_sb->s_blocksize_bits); >} > >static inline __attribute__((always_inline)) void DQUOT_FREE_BLOCK_NODIRTY(struct inode *inode, qsize_t nr) >{ > DQUOT_FREE_SPACE_NODIRTY(inode, nr << inode->i_sb->s_blocksize_bits); >} > >static inline __attribute__((always_inline)) void DQUOT_FREE_BLOCK(struct inode *inode, qsize_t nr) >{ > DQUOT_FREE_SPACE(inode, nr << inode->i_sb->s_blocksize_bits); >} ># 37 "/root/ext3/namei.c" 2 > ># 1 "include/linux/bio.h" 1 ># 24 "include/linux/bio.h" ># 1 "include/linux/mempool.h" 1 ># 9 "include/linux/mempool.h" >struct kmem_cache; > >typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data); >typedef void (mempool_free_t)(void *element, void *pool_data); > >typedef struct mempool_s { > spinlock_t lock; > int min_nr; > int curr_nr; > void **elements; > > void *pool_data; > mempool_alloc_t *alloc; > mempool_free_t *free; > wait_queue_head_t wait; >} mempool_t; > >extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, > mempool_free_t *free_fn, void *pool_data); >extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, > mempool_free_t *free_fn, void *pool_data, int nid); > >extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask); >extern void mempool_destroy(mempool_t *pool); >extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask); >extern void mempool_free(void *element, mempool_t *pool); > > > > > >void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data); >void mempool_free_slab(void *element, void *pool_data); >static inline __attribute__((always_inline)) mempool_t * >mempool_create_slab_pool(int min_nr, struct kmem_cache *kc) >{ > return mempool_create(min_nr, mempool_alloc_slab, mempool_free_slab, > (void *) kc); >} > > > > > >void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data); >void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data); >void mempool_kfree(void *element, void *pool_data); >static inline __attribute__((always_inline)) mempool_t *mempool_create_kmalloc_pool(int min_nr, size_t size) >{ > return mempool_create(min_nr, mempool_kmalloc, mempool_kfree, > (void *) size); >} >static inline __attribute__((always_inline)) mempool_t *mempool_create_kzalloc_pool(int min_nr, size_t size) >{ > return mempool_create(min_nr, mempool_kzalloc, mempool_kfree, > (void *) size); >} > > > > > >void *mempool_alloc_pages(gfp_t gfp_mask, void *pool_data); >void mempool_free_pages(void *element, void *pool_data); >static inline __attribute__((always_inline)) mempool_t *mempool_create_page_pool(int min_nr, int order) >{ > return mempool_create(min_nr, mempool_alloc_pages, mempool_free_pages, > (void *)(long)order); >} ># 25 "include/linux/bio.h" 2 ># 1 "include/linux/ioprio.h" 1 > > > > ># 1 "include/linux/iocontext.h" 1 ># 10 "include/linux/iocontext.h" >struct as_io_context { > spinlock_t lock; > > void (*dtor)(struct as_io_context *aic); > void (*exit)(struct as_io_context *aic); > > unsigned long state; > atomic_t nr_queued; > atomic_t nr_dispatched; > > > > unsigned long last_end_request; > unsigned long ttime_total; > unsigned long ttime_samples; > unsigned long ttime_mean; > > unsigned int seek_samples; > sector_t last_request_pos; > u64 seek_total; > sector_t seek_mean; >}; > >struct cfq_queue; >struct cfq_io_context { > void *key; > unsigned long dead_key; > > struct cfq_queue *cfqq[2]; > > struct io_context *ioc; > > unsigned long last_end_request; > sector_t last_request_pos; > > unsigned long ttime_total; > unsigned long ttime_samples; > unsigned long ttime_mean; > > unsigned int seek_samples; > u64 seek_total; > sector_t seek_mean; > > struct list_head queue_list; > struct hlist_node cic_list; > > void (*dtor)(struct io_context *); > void (*exit)(struct io_context *); > > struct rcu_head rcu_head; >}; > > > > > >struct io_context { > atomic_t refcount; > atomic_t nr_tasks; > > > spinlock_t lock; > > unsigned short ioprio; > unsigned short ioprio_changed; > > > > > unsigned long last_waited; > int nr_batch_requests; > > struct as_io_context *aic; > struct radix_tree_root radix_root; > struct hlist_head cic_list; > void *ioc_data; >}; > >static inline __attribute__((always_inline)) struct io_context *ioc_task_link(struct io_context *ioc) >{ > > > > > if (ioc && atomic_add_unless((&ioc->refcount), 1, 0)) { > atomic_inc(&ioc->nr_tasks); > return ioc; > } > > return ((void *)0); >} ># 6 "include/linux/ioprio.h" 2 ># 26 "include/linux/ioprio.h" >enum { > IOPRIO_CLASS_NONE, > IOPRIO_CLASS_RT, > IOPRIO_CLASS_BE, > IOPRIO_CLASS_IDLE, >}; > > > > > > >enum { > IOPRIO_WHO_PROCESS = 1, > IOPRIO_WHO_PGRP, > IOPRIO_WHO_USER, >}; > > > > > > >static inline __attribute__((always_inline)) int task_ioprio(struct io_context *ioc) >{ > if (((((ioc->ioprio)) >> (13)) != IOPRIO_CLASS_NONE)) > return ((ioc->ioprio) & ((1UL << (13)) - 1)); > > return (4); >} > >static inline __attribute__((always_inline)) int task_ioprio_class(struct io_context *ioc) >{ > if (((((ioc->ioprio)) >> (13)) != IOPRIO_CLASS_NONE)) > return ((ioc->ioprio) >> (13)); > > return IOPRIO_CLASS_BE; >} > >static inline __attribute__((always_inline)) int task_nice_ioprio(struct task_struct *task) >{ > return (task_nice(task) + 20) / 5; >} > > > > > >static inline __attribute__((always_inline)) int task_nice_ioclass(struct task_struct *task) >{ > if (task->policy == 5) > return IOPRIO_CLASS_IDLE; > else if (task->policy == 1 || task->policy == 2) > return IOPRIO_CLASS_RT; > else > return IOPRIO_CLASS_BE; >} > > > > >extern int ioprio_best(unsigned short aprio, unsigned short bprio); ># 26 "include/linux/bio.h" 2 > > > > ># 1 "include/asm/io.h" 1 > > > > > > ># 1 "include/asm/io_32.h" 1 ># 47 "include/asm/io_32.h" ># 1 "include/asm-generic/iomap.h" 1 ># 28 "include/asm-generic/iomap.h" >extern unsigned int ioread8(void *); >extern unsigned int ioread16(void *); >extern unsigned int ioread16be(void *); >extern unsigned int ioread32(void *); >extern unsigned int ioread32be(void *); > >extern void iowrite8(u8, void *); >extern void iowrite16(u16, void *); >extern void iowrite16be(u16, void *); >extern void iowrite32(u32, void *); >extern void iowrite32be(u32, void *); ># 51 "include/asm-generic/iomap.h" >extern void ioread8_rep(void *port, void *buf, unsigned long count); >extern void ioread16_rep(void *port, void *buf, unsigned long count); >extern void ioread32_rep(void *port, void *buf, unsigned long count); > >extern void iowrite8_rep(void *port, const void *buf, unsigned long count); >extern void iowrite16_rep(void *port, const void *buf, unsigned long count); >extern void iowrite32_rep(void *port, const void *buf, unsigned long count); > > >extern void *ioport_map(unsigned long port, unsigned int nr); >extern void ioport_unmap(void *); > > > > > > >struct pci_dev; >extern void *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); >extern void pci_iounmap(struct pci_dev *dev, void *); ># 48 "include/asm/io_32.h" 2 > ># 1 "include/linux/vmalloc.h" 1 > > > > > > >struct vm_area_struct; ># 25 "include/linux/vmalloc.h" >struct vm_struct { > > struct vm_struct *next; > void *addr; > unsigned long size; > unsigned long flags; > struct page **pages; > unsigned int nr_pages; > unsigned long phys_addr; > void *caller; >}; > > > > >extern void *vmalloc(unsigned long size); >extern void *vmalloc_user(unsigned long size); >extern void *vmalloc_node(unsigned long size, int node); >extern void *vmalloc_exec(unsigned long size); >extern void *vmalloc_32(unsigned long size); >extern void *vmalloc_32_user(unsigned long size); >extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); >extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, > pgprot_t prot); >extern void vfree(const void *addr); > >extern void *vmap(struct page **pages, unsigned int count, > unsigned long flags, pgprot_t prot); >extern void vunmap(const void *addr); > >extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, > unsigned long pgoff); >void vmalloc_sync_all(void); > > > > > >static inline __attribute__((always_inline)) size_t get_vm_area_size(const struct vm_struct *area) >{ > > return area->size - ((1UL) << 12); >} > >extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); >extern struct vm_struct *get_vm_area_caller(unsigned long size, > unsigned long flags, void *caller); >extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, > unsigned long start, unsigned long end); >extern struct vm_struct *get_vm_area_node(unsigned long size, > unsigned long flags, int node, > gfp_t gfp_mask); >extern struct vm_struct *remove_vm_area(const void *addr); > >extern int map_vm_area(struct vm_struct *area, pgprot_t prot, > struct page ***pages); >extern void unmap_kernel_range(unsigned long addr, unsigned long size); > > >extern struct vm_struct *alloc_vm_area(size_t size); >extern void free_vm_area(struct vm_struct *area); > > > > >extern rwlock_t vmlist_lock; >extern struct vm_struct *vmlist; > >extern const struct seq_operations vmalloc_op; ># 50 "include/asm/io_32.h" 2 ># 69 "include/asm/io_32.h" >static inline __attribute__((always_inline)) unsigned long virt_to_phys(volatile void *address) >{ > return (((unsigned long)(address)) - ((unsigned long)(0xC0000000UL))); >} ># 87 "include/asm/io_32.h" >static inline __attribute__((always_inline)) void *phys_to_virt(unsigned long address) >{ > return ((void *)((unsigned long)(address)+((unsigned long)(0xC0000000UL)))); >} ># 111 "include/asm/io_32.h" >extern void *ioremap_nocache(resource_size_t offset, unsigned long size); >extern void *ioremap_cache(resource_size_t offset, unsigned long size); > > > > >static inline __attribute__((always_inline)) void *ioremap(resource_size_t offset, unsigned long size) >{ > return ioremap_nocache(offset, size); >} > >extern void iounmap(volatile void *addr); > > > > > > >extern void early_ioremap_init(void); >extern void early_ioremap_clear(void); >extern void early_ioremap_reset(void); >extern void *early_ioremap(unsigned long offset, unsigned long size); >extern void early_iounmap(void *addr, unsigned long size); >extern void *fix_ioremap(unsigned idx, unsigned long phys); ># 159 "include/asm/io_32.h" >static inline __attribute__((always_inline)) unsigned char readb(const volatile void *addr) >{ > return *(volatile unsigned char *)addr; >} > >static inline __attribute__((always_inline)) unsigned short readw(const volatile void *addr) >{ > return *(volatile unsigned short *)addr; >} > >static inline __attribute__((always_inline)) unsigned int readl(const volatile void *addr) >{ > return *(volatile unsigned int *) addr; >} ># 181 "include/asm/io_32.h" >static inline __attribute__((always_inline)) void writeb(unsigned char b, volatile void *addr) >{ > *(volatile unsigned char *)addr = b; >} > >static inline __attribute__((always_inline)) void writew(unsigned short b, volatile void *addr) >{ > *(volatile unsigned short *)addr = b; >} > >static inline __attribute__((always_inline)) void writel(unsigned int b, volatile void *addr) >{ > *(volatile unsigned int *)addr = b; >} > > > > > > >static inline __attribute__((always_inline)) void >memset_io(volatile void *addr, unsigned char val, int count) >{ > (__builtin_constant_p(val) ? (__builtin_constant_p((count)) ? __constant_c_and_count_memset((((void *)addr)),((0x01010101UL*(unsigned char)(val))),((count))) : __constant_c_memset((((void *)addr)),((0x01010101UL*(unsigned char)(val))),((count)))) : (__builtin_constant_p((count)) ? __memset_generic(((((void *)addr))),(((val))),(((count)))) : __memset_generic((((void *)addr)),((val)),((count))))); >} > >static inline __attribute__((always_inline)) void >memcpy_fromio(void *dst, const volatile void *src, int count) >{ > __memcpy(dst, (const void *)src, count); >} > >static inline __attribute__((always_inline)) void >memcpy_toio(volatile void *dst, const void *src, int count) >{ > __memcpy((void *)dst, src, count); >} ># 239 "include/asm/io_32.h" >static inline __attribute__((always_inline)) void flush_write_buffers(void) >{ > asm volatile("lock; addl $0,0(%%esp)": : :"memory"); >} ># 252 "include/asm/io_32.h" >extern void native_io_delay(void); > >extern int io_delay_type; >extern void io_delay_init(void); ># 339 "include/asm/io_32.h" >static inline __attribute__((always_inline)) void outb_local(unsigned char value, int port) { asm volatile("out" "b" " %" "b" "0, %w1" : : "a"(value), "Nd"(port)); } static inline __attribute__((always_inline)) unsigned char inb_local(int port) { unsigned char value; asm volatile("in" "b" " %w1, %" "b" "0" : "=a"(value) : "Nd"(port)); return value; } static inline __attribute__((always_inline)) void outb_local_p(unsigned char value, int port) { outb_local(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned char inb_local_p(int port) { unsigned char value = inb_local(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outb(unsigned char value, int port) { outb_local(value, port); } static inline __attribute__((always_inline)) unsigned char inb(int port) { return inb_local(port); } static inline __attribute__((always_inline)) void outb_p(unsigned char value, int port) { outb(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned char inb_p(int port) { unsigned char value = inb(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outsb(int port, const void *addr, unsigned long count) { asm volatile("rep; outs" "b" : "+S"(addr), "+c"(count) : "d"(port)); } static inline __attribute__((always_inline)) void insb(int port, void *addr, unsigned long count) { asm volatile("rep; ins" "b" : "+D"(addr), "+c"(count) : "d"(port)); } >static inline __attribute__((always_inline)) void outw_local(unsigned short value, int port) { asm volatile("out" "w" " %" "w" "0, %w1" : : "a"(value), "Nd"(port)); } static inline __attribute__((always_inline)) unsigned short inw_local(int port) { unsigned short value; asm volatile("in" "w" " %w1, %" "w" "0" : "=a"(value) : "Nd"(port)); return value; } static inline __attribute__((always_inline)) void outw_local_p(unsigned short value, int port) { outw_local(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned short inw_local_p(int port) { unsigned short value = inw_local(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outw(unsigned short value, int port) { outw_local(value, port); } static inline __attribute__((always_inline)) unsigned short inw(int port) { return inw_local(port); } static inline __attribute__((always_inline)) void outw_p(unsigned short value, int port) { outw(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned short inw_p(int port) { unsigned short value = inw(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outsw(int port, const void *addr, unsigned long count) { asm volatile("rep; outs" "w" : "+S"(addr), "+c"(count) : "d"(port)); } static inline __attribute__((always_inline)) void insw(int port, void *addr, unsigned long count) { asm volatile("rep; ins" "w" : "+D"(addr), "+c"(count) : "d"(port)); } >static inline __attribute__((always_inline)) void outl_local(unsigned int value, int port) { asm volatile("out" "l" " %" "" "0, %w1" : : "a"(value), "Nd"(port)); } static inline __attribute__((always_inline)) unsigned int inl_local(int port) { unsigned int value; asm volatile("in" "l" " %w1, %" "" "0" : "=a"(value) : "Nd"(port)); return value; } static inline __attribute__((always_inline)) void outl_local_p(unsigned int value, int port) { outl_local(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned int inl_local_p(int port) { unsigned int value = inl_local(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outl(unsigned int value, int port) { outl_local(value, port); } static inline __attribute__((always_inline)) unsigned int inl(int port) { return inl_local(port); } static inline __attribute__((always_inline)) void outl_p(unsigned int value, int port) { outl(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned int inl_p(int port) { unsigned int value = inl(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outsl(int port, const void *addr, unsigned long count) { asm volatile("rep; outs" "l" : "+S"(addr), "+c"(count) : "d"(port)); } static inline __attribute__((always_inline)) void insl(int port, void *addr, unsigned long count) { asm volatile("rep; ins" "l" : "+D"(addr), "+c"(count) : "d"(port)); } ># 8 "include/asm/io.h" 2 > > > > >extern void *xlate_dev_mem_ptr(unsigned long phys); >extern void unxlate_dev_mem_ptr(unsigned long phys, void *addr); > >extern int ioremap_change_attr(unsigned long vaddr, unsigned long size, > unsigned long prot_val); >extern void *ioremap_wc(unsigned long offset, unsigned long size); ># 31 "include/linux/bio.h" 2 ># 59 "include/linux/bio.h" >struct bio_vec { > struct page *bv_page; > unsigned int bv_len; > unsigned int bv_offset; >}; > >struct bio_set; >struct bio; >typedef void (bio_end_io_t) (struct bio *, int); >typedef void (bio_destructor_t) (struct bio *); > > > > > >struct bio { > sector_t bi_sector; > > struct bio *bi_next; > struct block_device *bi_bdev; > unsigned long bi_flags; > unsigned long bi_rw; > > > > unsigned short bi_vcnt; > unsigned short bi_idx; > > > > > unsigned short bi_phys_segments; > > > > > unsigned short bi_hw_segments; > > unsigned int bi_size; > > > > > > > unsigned int bi_hw_front_size; > unsigned int bi_hw_back_size; > > unsigned int bi_max_vecs; > > struct bio_vec *bi_io_vec; > > bio_end_io_t *bi_end_io; > atomic_t bi_cnt; > > void *bi_private; > > bio_destructor_t *bi_destructor; >}; ># 186 "include/linux/bio.h" >static inline __attribute__((always_inline)) unsigned int bio_cur_sectors(struct bio *bio) >{ > if (bio->bi_vcnt) > return (&(((bio))->bi_io_vec[((bio)->bi_idx)]))->bv_len >> 9; > > return 0; >} > >static inline __attribute__((always_inline)) void *bio_data(struct bio *bio) >{ > if (bio->bi_vcnt) > return page_address((&((((bio)))->bi_io_vec[(((bio))->bi_idx)]))->bv_page) + (&((((bio)))->bi_io_vec[(((bio))->bi_idx)]))->bv_offset; > > return ((void *)0); >} ># 285 "include/linux/bio.h" >struct bio_pair { > struct bio bio1, bio2; > struct bio_vec bv1, bv2; > atomic_t cnt; > int error; >}; >extern struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, > int first_sectors); >extern mempool_t *bio_split_pool; >extern void bio_pair_release(struct bio_pair *dbio); > >extern struct bio_set *bioset_create(int, int); >extern void bioset_free(struct bio_set *); > >extern struct bio *bio_alloc(gfp_t, int); >extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *); >extern void bio_put(struct bio *); >extern void bio_free(struct bio *, struct bio_set *); > >extern void bio_endio(struct bio *, int); >struct request_queue; >extern int bio_phys_segments(struct request_queue *, struct bio *); >extern int bio_hw_segments(struct request_queue *, struct bio *); > >extern void __bio_clone(struct bio *, struct bio *); >extern struct bio *bio_clone(struct bio *, gfp_t); > >extern void bio_init(struct bio *); > >extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int); >extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, > unsigned int, unsigned int); >extern int bio_get_nr_vecs(struct block_device *); >extern struct bio *bio_map_user(struct request_queue *, struct block_device *, > unsigned long, unsigned int, int); >struct sg_iovec; >extern struct bio *bio_map_user_iov(struct request_queue *, > struct block_device *, > struct sg_iovec *, int, int); >extern void bio_unmap_user(struct bio *); >extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, > gfp_t); >extern struct bio *bio_copy_kern(struct request_queue *, void *, unsigned int, > gfp_t, int); >extern void bio_set_pages_dirty(struct bio *bio); >extern void bio_check_pages_dirty(struct bio *bio); >extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); >extern struct bio *bio_copy_user_iov(struct request_queue *, struct sg_iovec *, > int, int); >extern int bio_uncopy_user(struct bio *); >void zero_fill_bio(struct bio *bio); ># 344 "include/linux/bio.h" >static inline __attribute__((always_inline)) char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) >{ > unsigned long addr; > > > > > > do { do { (*flags) = __raw_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); > addr = (unsigned long) kmap_atomic(bvec->bv_page, KM_BIO_SRC_IRQ); > > do { if (__builtin_expect(!!(addr & ~(~(((1UL) << 12)-1))), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/bio.h"), "i" (355), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > > return (char *) addr + bvec->bv_offset; >} > >static inline __attribute__((always_inline)) void bvec_kunmap_irq(char *buffer, unsigned long *flags) >{ > unsigned long ptr = (unsigned long) buffer & (~(((1UL) << 12)-1)); > > kunmap_atomic((void *) ptr, KM_BIO_SRC_IRQ); > do { if (raw_irqs_disabled_flags(*flags)) { raw_local_irq_restore(*flags); trace_hardirqs_off(); } else { trace_hardirqs_on(); raw_local_irq_restore(*flags); } } while (0); >} > > > > > > >static inline __attribute__((always_inline)) char *__bio_kmap_irq(struct bio *bio, unsigned short idx, > unsigned long *flags) >{ > return bvec_kmap_irq((&((bio)->bi_io_vec[(idx)])), flags); >} ># 39 "/root/ext3/namei.c" 2 > ># 1 "/root/ext3/namei.h" 1 > > > > > > > >extern struct dentry *ext3_get_parent(struct dentry *child); ># 41 "/root/ext3/namei.c" 2 ># 1 "/root/ext3/xattr.h" 1 ># 9 "/root/ext3/xattr.h" ># 1 "include/linux/xattr.h" 1 ># 36 "include/linux/xattr.h" >struct inode; >struct dentry; > >struct xattr_handler { > char *prefix; > size_t (*list)(struct inode *inode, char *list, size_t list_size, > const char *name, size_t name_len); > int (*get)(struct inode *inode, const char *name, void *buffer, > size_t size); > int (*set)(struct inode *inode, const char *name, const void *buffer, > size_t size, int flags); >}; > >ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t); >ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t); >ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size); >int vfs_setxattr(struct dentry *, const char *, const void *, size_t, int); >int vfs_removexattr(struct dentry *, const char *); > >ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size); >ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size); >int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); >int generic_removexattr(struct dentry *dentry, const char *name); ># 10 "/root/ext3/xattr.h" 2 ># 25 "/root/ext3/xattr.h" >struct ext3_xattr_header { > __le32 h_magic; > __le32 h_refcount; > __le32 h_blocks; > __le32 h_hash; > __u32 h_reserved[4]; >}; > >struct ext3_xattr_ibody_header { > __le32 h_magic; >}; > >struct ext3_xattr_entry { > __u8 e_name_len; > __u8 e_name_index; > __le16 e_value_offs; > __le32 e_value_block; > __le32 e_value_size; > __le32 e_hash; > char e_name[0]; >}; ># 61 "/root/ext3/xattr.h" >extern struct xattr_handler ext3_xattr_user_handler; >extern struct xattr_handler ext3_xattr_trusted_handler; >extern struct xattr_handler ext3_xattr_acl_access_handler; >extern struct xattr_handler ext3_xattr_acl_default_handler; >extern struct xattr_handler ext3_xattr_security_handler; > >extern ssize_t ext3_listxattr(struct dentry *, char *, size_t); > >extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t); >extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int); >extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int); > >extern void ext3_xattr_delete_inode(handle_t *, struct inode *); >extern void ext3_xattr_put_super(struct super_block *); > >extern int init_ext3_xattr(void); >extern void exit_ext3_xattr(void); > >extern struct xattr_handler *ext3_xattr_handlers[]; ># 130 "/root/ext3/xattr.h" >extern int ext3_init_security(handle_t *handle, struct inode *inode, > struct inode *dir); ># 42 "/root/ext3/namei.c" 2 ># 1 "/root/ext3/acl.h" 1 > > > > > > ># 1 "include/linux/posix_acl_xattr.h" 1 ># 12 "include/linux/posix_acl_xattr.h" ># 1 "include/linux/posix_acl.h" 1 ># 34 "include/linux/posix_acl.h" >struct posix_acl_entry { > short e_tag; > unsigned short e_perm; > unsigned int e_id; >}; > >struct posix_acl { > atomic_t a_refcount; > unsigned int a_count; > struct posix_acl_entry a_entries[0]; >}; ># 53 "include/linux/posix_acl.h" >static inline __attribute__((always_inline)) struct posix_acl * >posix_acl_dup(struct posix_acl *acl) >{ > if (acl) > atomic_inc(&acl->a_refcount); > return acl; >} > > > > >static inline __attribute__((always_inline)) void >posix_acl_release(struct posix_acl *acl) >{ > if (acl && atomic_dec_and_test(&acl->a_refcount)) > kfree(acl); >} > > > > >extern struct posix_acl *posix_acl_alloc(int, gfp_t); >extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t); >extern int posix_acl_valid(const struct posix_acl *); >extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); >extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t); >extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *); >extern int posix_acl_create_masq(struct posix_acl *, mode_t *); >extern int posix_acl_chmod_masq(struct posix_acl *, mode_t); > >extern struct posix_acl *get_posix_acl(struct inode *, int); >extern int set_posix_acl(struct inode *, int, struct posix_acl *); ># 13 "include/linux/posix_acl_xattr.h" 2 ># 25 "include/linux/posix_acl_xattr.h" >typedef struct { > __le16 e_tag; > __le16 e_perm; > __le32 e_id; >} posix_acl_xattr_entry; > >typedef struct { > __le32 a_version; > posix_acl_xattr_entry a_entries[0]; >} posix_acl_xattr_header; > > >static inline __attribute__((always_inline)) size_t >posix_acl_xattr_size(int count) >{ > return (sizeof(posix_acl_xattr_header) + > (count * sizeof(posix_acl_xattr_entry))); >} > >static inline __attribute__((always_inline)) int >posix_acl_xattr_count(size_t size) >{ > if (size < sizeof(posix_acl_xattr_header)) > return -1; > size -= sizeof(posix_acl_xattr_header); > if (size % sizeof(posix_acl_xattr_entry)) > return -1; > return size / sizeof(posix_acl_xattr_entry); >} > >struct posix_acl *posix_acl_from_xattr(const void *value, size_t size); >int posix_acl_to_xattr(const struct posix_acl *acl, void *buffer, size_t size); ># 8 "/root/ext3/acl.h" 2 > > > >typedef struct { > __le16 e_tag; > __le16 e_perm; > __le32 e_id; >} ext3_acl_entry; > >typedef struct { > __le16 e_tag; > __le16 e_perm; >} ext3_acl_entry_short; > >typedef struct { > __le32 a_version; >} ext3_acl_header; > >static inline __attribute__((always_inline)) size_t ext3_acl_size(int count) >{ > if (count <= 4) { > return sizeof(ext3_acl_header) + > count * sizeof(ext3_acl_entry_short); > } else { > return sizeof(ext3_acl_header) + > 4 * sizeof(ext3_acl_entry_short) + > (count - 4) * sizeof(ext3_acl_entry); > } >} > >static inline __attribute__((always_inline)) int ext3_acl_count(size_t size) >{ > ssize_t s; > size -= sizeof(ext3_acl_header); > s = size - 4 * sizeof(ext3_acl_entry_short); > if (s < 0) { > if (size % sizeof(ext3_acl_entry_short)) > return -1; > return size / sizeof(ext3_acl_entry_short); > } else { > if (s % sizeof(ext3_acl_entry)) > return -1; > return s / sizeof(ext3_acl_entry) + 4; > } >} ># 61 "/root/ext3/acl.h" >extern int ext3_permission (struct inode *, int, struct nameidata *); >extern int ext3_acl_chmod (struct inode *); >extern int ext3_init_acl (handle_t *, struct inode *, struct inode *); ># 43 "/root/ext3/namei.c" 2 ># 52 "/root/ext3/namei.c" >static struct buffer_head *ext3_append(handle_t *handle, > struct inode *inode, > u32 *block, int *err) >{ > struct buffer_head *bh; > > *block = inode->i_size >> inode->i_sb->s_blocksize_bits; > > bh = ext3_bread(handle, inode, *block, 1, err); > if (bh) { > inode->i_size += inode->i_sb->s_blocksize; > EXT3_I(inode)->i_disksize = inode->i_size; > *err = __ext3_journal_get_write_access((__func__), (handle), (bh)); > if (*err) { > brelse(bh); > bh = ((void *)0); > } > } > return bh; >} ># 87 "/root/ext3/namei.c" >struct fake_dirent >{ > __le32 inode; > __le16 rec_len; > u8 name_len; > u8 file_type; >}; > >struct dx_countlimit >{ > __le16 limit; > __le16 count; >}; > >struct dx_entry >{ > __le32 hash; > __le32 block; >}; > > > > > > > >struct dx_root >{ > struct fake_dirent dot; > char dot_name[4]; > struct fake_dirent dotdot; > char dotdot_name[4]; > struct dx_root_info > { > __le32 reserved_zero; > u8 hash_version; > u8 info_length; > u8 indirect_levels; > u8 unused_flags; > } > info; > struct dx_entry entries[0]; >}; > >struct dx_node >{ > struct fake_dirent fake; > struct dx_entry entries[0]; >}; > > >struct dx_frame >{ > struct buffer_head *bh; > struct dx_entry *entries; > struct dx_entry *at; >}; > >struct dx_map_entry >{ > u32 hash; > u16 offs; > u16 size; >}; > >static inline __attribute__((always_inline)) unsigned dx_get_block (struct dx_entry *entry); >static void dx_set_block (struct dx_entry *entry, unsigned value); >static inline __attribute__((always_inline)) unsigned dx_get_hash (struct dx_entry *entry); >static void dx_set_hash (struct dx_entry *entry, unsigned value); >static unsigned dx_get_count (struct dx_entry *entries); >static unsigned dx_get_limit (struct dx_entry *entries); >static void dx_set_count (struct dx_entry *entries, unsigned value); >static void dx_set_limit (struct dx_entry *entries, unsigned value); >static unsigned dx_root_limit (struct inode *dir, unsigned infosize); >static unsigned dx_node_limit (struct inode *dir); >static struct dx_frame *dx_probe(struct dentry *dentry, > struct inode *dir, > struct dx_hash_info *hinfo, > struct dx_frame *frame, > int *err); >static void dx_release (struct dx_frame *frames); >static int dx_make_map (struct ext3_dir_entry_2 *de, int size, > struct dx_hash_info *hinfo, struct dx_map_entry map[]); >static void dx_sort_map(struct dx_map_entry *map, unsigned count); >static struct ext3_dir_entry_2 *dx_move_dirents (char *from, char *to, > struct dx_map_entry *offsets, int count); >static struct ext3_dir_entry_2* dx_pack_dirents (char *base, int size); >static void dx_insert_block (struct dx_frame *frame, u32 hash, u32 block); >static int ext3_htree_next_block(struct inode *dir, __u32 hash, > struct dx_frame *frame, > struct dx_frame *frames, > __u32 *start_hash); >static struct buffer_head * ext3_dx_find_entry(struct dentry *dentry, > struct ext3_dir_entry_2 **res_dir, int *err); >static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry, > struct inode *inode); > > > > >static inline __attribute__((always_inline)) struct ext3_dir_entry_2 * >ext3_next_entry(struct ext3_dir_entry_2 *p) >{ > return (struct ext3_dir_entry_2 *)((char *)p + > ext3_rec_len_from_disk(p->rec_len)); >} > > > > > > >static inline __attribute__((always_inline)) unsigned dx_get_block (struct dx_entry *entry) >{ > return (( __u32)(__le32)(entry->block)) & 0x00ffffff; >} > >static inline __attribute__((always_inline)) void dx_set_block (struct dx_entry *entry, unsigned value) >{ > entry->block = (( __le32)(__u32)(value)); >} > >static inline __attribute__((always_inline)) unsigned dx_get_hash (struct dx_entry *entry) >{ > return (( __u32)(__le32)(entry->hash)); >} > >static inline __attribute__((always_inline)) void dx_set_hash (struct dx_entry *entry, unsigned value) >{ > entry->hash = (( __le32)(__u32)(value)); >} > >static inline __attribute__((always_inline)) unsigned dx_get_count (struct dx_entry *entries) >{ > return (( __u16)(__le16)(((struct dx_countlimit *) entries)->count)); >} > >static inline __attribute__((always_inline)) unsigned dx_get_limit (struct dx_entry *entries) >{ > return (( __u16)(__le16)(((struct dx_countlimit *) entries)->limit)); >} > >static inline __attribute__((always_inline)) void dx_set_count (struct dx_entry *entries, unsigned value) >{ > ((struct dx_countlimit *) entries)->count = (( __le16)(__u16)(value)); >} > >static inline __attribute__((always_inline)) void dx_set_limit (struct dx_entry *entries, unsigned value) >{ > ((struct dx_countlimit *) entries)->limit = (( __le16)(__u16)(value)); >} > >static inline __attribute__((always_inline)) unsigned dx_root_limit (struct inode *dir, unsigned infosize) >{ > unsigned entry_space = dir->i_sb->s_blocksize - (((1) + 8 + (4 - 1)) & ~(4 - 1)) - > (((2) + 8 + (4 - 1)) & ~(4 - 1)) - infosize; > return 0? 20: entry_space / sizeof(struct dx_entry); >} > >static inline __attribute__((always_inline)) unsigned dx_node_limit (struct inode *dir) >{ > unsigned entry_space = dir->i_sb->s_blocksize - (((0) + 8 + (4 - 1)) & ~(4 - 1)); > return 0? 22: entry_space / sizeof(struct dx_entry); >} ># 344 "/root/ext3/namei.c" >static struct dx_frame * >dx_probe(struct dentry *dentry, struct inode *dir, > struct dx_hash_info *hinfo, struct dx_frame *frame_in, int *err) >{ > unsigned count, indirect; > struct dx_entry *at, *entries, *p, *q, *m; > struct dx_root *root; > struct buffer_head *bh; > struct dx_frame *frame = frame_in; > u32 hash; > > frame->bh = ((void *)0); > if (dentry) > dir = dentry->d_parent->d_inode; > if (!(bh = ext3_bread (((void *)0),dir, 0, 0, err))) > goto fail; > root = (struct dx_root *) bh->b_data; > if (root->info.hash_version != 2 && > root->info.hash_version != 1 && > root->info.hash_version != 0) { > ext3_warning(dir->i_sb, __func__, > "Unrecognised inode hash code %d", > root->info.hash_version); > brelse(bh); > *err = -75000; > goto fail; > } > hinfo->hash_version = root->info.hash_version; > hinfo->seed = EXT3_SB(dir->i_sb)->s_hash_seed; > if (dentry) > ext3fs_dirhash(dentry->d_name.name, dentry->d_name.len, hinfo); > hash = hinfo->hash; > > if (root->info.unused_flags & 1) { > ext3_warning(dir->i_sb, __func__, > "Unimplemented inode hash flags: %#06x", > root->info.unused_flags); > brelse(bh); > *err = -75000; > goto fail; > } > > if ((indirect = root->info.indirect_levels) > 1) { > ext3_warning(dir->i_sb, __func__, > "Unimplemented inode hash depth: %#06x", > root->info.indirect_levels); > brelse(bh); > *err = -75000; > goto fail; > } > > entries = (struct dx_entry *) (((char *)&root->info) + > root->info.info_length); > > if (dx_get_limit(entries) != dx_root_limit(dir, > root->info.info_length)) { > ext3_warning(dir->i_sb, __func__, > "dx entry: limit != root limit"); > brelse(bh); > *err = -75000; > goto fail; > } > > ; > while (1) > { > count = dx_get_count(entries); > if (!count || count > dx_get_limit(entries)) { > ext3_warning(dir->i_sb, __func__, > "dx entry: no count or count > limit"); > brelse(bh); > *err = -75000; > goto fail2; > } > > p = entries + 1; > q = entries + count - 1; > while (p <= q) > { > m = p + (q - p)/2; > ; > if (dx_get_hash(m) > hash) > q = m - 1; > else > p = m + 1; > } > > if (0) > { > unsigned n = count - 1; > at = entries; > while (n--) > { > ; > if (dx_get_hash(++at) > hash) > { > at--; > break; > } > } > do { if (__builtin_expect(!!(!(at == p - 1)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/root/ext3/namei.c"), "i" (444), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > } > > at = p - 1; > ; > frame->bh = bh; > frame->entries = entries; > frame->at = at; > if (!indirect--) return frame; > if (!(bh = ext3_bread (((void *)0),dir, dx_get_block(at), 0, err))) > goto fail2; > at = entries = ((struct dx_node *) bh->b_data)->entries; > if (dx_get_limit(entries) != dx_node_limit (dir)) { > ext3_warning(dir->i_sb, __func__, > "dx entry: limit != node limit"); > brelse(bh); > *err = -75000; > goto fail2; > } > frame++; > frame->bh = ((void *)0); > } >fail2: > while (frame >= frame_in) { > brelse(frame->bh); > frame--; > } >fail: > if (*err == -75000) > ext3_warning(dir->i_sb, __func__, > "Corrupt dir inode %ld, running e2fsck is " > "recommended.", dir->i_ino); > return ((void *)0); >} > >static void dx_release (struct dx_frame *frames) >{ > if (frames[0].bh == ((void *)0)) > return; > > if (((struct dx_root *) frames[0].bh->b_data)->info.indirect_levels) > brelse(frames[1].bh); > brelse(frames[0].bh); >} ># 506 "/root/ext3/namei.c" >static int ext3_htree_next_block(struct inode *dir, __u32 hash, > struct dx_frame *frame, > struct dx_frame *frames, > __u32 *start_hash) >{ > struct dx_frame *p; > struct buffer_head *bh; > int err, num_frames = 0; > __u32 bhash; > > p = frame; > > > > > > > > while (1) { > if (++(p->at) < p->entries + dx_get_count(p->entries)) > break; > if (p == frames) > return 0; > num_frames++; > p--; > } ># 540 "/root/ext3/namei.c" > bhash = dx_get_hash(p->at); > if (start_hash) > *start_hash = bhash; > if ((hash & 1) == 0) { > if ((bhash & ~1) != hash) > return 0; > } > > > > > while (num_frames--) { > if (!(bh = ext3_bread(((void *)0), dir, dx_get_block(p->at), > 0, &err))) > return err; > p++; > brelse (p->bh); > p->bh = bh; > p->at = p->entries = ((struct dx_node *) bh->b_data)->entries; > } > return 1; >} > > > > > > > >static int htree_dirblock_to_tree(struct file *dir_file, > struct inode *dir, int block, > struct dx_hash_info *hinfo, > __u32 start_hash, __u32 start_minor_hash) >{ > struct buffer_head *bh; > struct ext3_dir_entry_2 *de, *top; > int err, count = 0; > > ; > if (!(bh = ext3_bread (((void *)0), dir, block, 0, &err))) > return err; > > de = (struct ext3_dir_entry_2 *) bh->b_data; > top = (struct ext3_dir_entry_2 *) ((char *) de + > dir->i_sb->s_blocksize - > (((0) + 8 + (4 - 1)) & ~(4 - 1))); > for (; de < top; de = ext3_next_entry(de)) { > if (!ext3_check_dir_entry("htree_dirblock_to_tree", dir, de, bh, > (block<<((dir->i_sb)->s_blocksize_bits)) > +((char *)de - bh->b_data))) { > > dir_file->f_pos = (dir_file->f_pos | > (dir->i_sb->s_blocksize - 1)) + 1; > brelse (bh); > return count; > } > ext3fs_dirhash(de->name, de->name_len, hinfo); > if ((hinfo->hash < start_hash) || > ((hinfo->hash == start_hash) && > (hinfo->minor_hash < start_minor_hash))) > continue; > if (de->inode == 0) > continue; > if ((err = ext3_htree_store_dirent(dir_file, > hinfo->hash, hinfo->minor_hash, de)) != 0) { > brelse(bh); > return err; > } > count++; > } > brelse(bh); > return count; >} ># 623 "/root/ext3/namei.c" >int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash, > __u32 start_minor_hash, __u32 *next_hash) >{ > struct dx_hash_info hinfo; > struct ext3_dir_entry_2 *de; > struct dx_frame frames[2], *frame; > struct inode *dir; > int block, err; > int count = 0; > int ret; > __u32 hashval; > > ; > > dir = dir_file->f_path.dentry->d_inode; > if (!(EXT3_I(dir)->i_flags & 0x00001000)) { > hinfo.hash_version = EXT3_SB(dir->i_sb)->s_def_hash_version; > hinfo.seed = EXT3_SB(dir->i_sb)->s_hash_seed; > count = htree_dirblock_to_tree(dir_file, dir, 0, &hinfo, > start_hash, start_minor_hash); > *next_hash = ~0; > return count; > } > hinfo.hash = start_hash; > hinfo.minor_hash = 0; > frame = dx_probe(((void *)0), dir_file->f_path.dentry->d_inode, &hinfo, frames, &err); > if (!frame) > return err; > > > if (!start_hash && !start_minor_hash) { > de = (struct ext3_dir_entry_2 *) frames[0].bh->b_data; > if ((err = ext3_htree_store_dirent(dir_file, 0, 0, de)) != 0) > goto errout; > count++; > } > if (start_hash < 2 || (start_hash ==2 && start_minor_hash==0)) { > de = (struct ext3_dir_entry_2 *) frames[0].bh->b_data; > de = ext3_next_entry(de); > if ((err = ext3_htree_store_dirent(dir_file, 2, 0, de)) != 0) > goto errout; > count++; > } > > while (1) { > block = dx_get_block(frame->at); > ret = htree_dirblock_to_tree(dir_file, dir, block, &hinfo, > start_hash, start_minor_hash); > if (ret < 0) { > err = ret; > goto errout; > } > count += ret; > hashval = ~0; > ret = ext3_htree_next_block(dir, 1, > frame, frames, &hashval); > *next_hash = hashval; > if (ret < 0) { > err = ret; > goto errout; > } > > > > > > if ((ret == 0) || > (count && ((hashval & 1) == 0))) > break; > } > dx_release(frames); > ; > > return count; >errout: > dx_release(frames); > return (err); >} ># 711 "/root/ext3/namei.c" >static int dx_make_map (struct ext3_dir_entry_2 *de, int size, > struct dx_hash_info *hinfo, struct dx_map_entry *map_tail) >{ > int count = 0; > char *base = (char *) de; > struct dx_hash_info h = *hinfo; > > while ((char *) de < base + size) > { > if (de->name_len && de->inode) { > ext3fs_dirhash(de->name, de->name_len, &h); > map_tail--; > map_tail->hash = h.hash; > map_tail->offs = (u16) ((char *) de - base); > map_tail->size = (( __u16)(__le16)(de->rec_len)); > count++; > cond_resched(); > } > > de = ext3_next_entry(de); > } > return count; >} > > >static void dx_sort_map (struct dx_map_entry *map, unsigned count) >{ > struct dx_map_entry *p, *q, *top = map + count - 1; > int more; > > while (count > 2) > { > count = count*10/13; > if (count - 9 < 2) > count = 11; > for (p = top, q = p - count; q >= map; p--, q--) > if (p->hash < q->hash) > do { typeof(*p) z = *p; *p = *q; *q = z; } while (0); > } > > do { > more = 0; > q = top; > while (q-- > map) > { > if (q[1].hash >= q[0].hash) > continue; > do { typeof(*(q+1)) z = *(q+1); *(q+1) = *q; *q = z; } while (0); > more = 1; > } > } while(more); >} > >static void dx_insert_block(struct dx_frame *frame, u32 hash, u32 block) >{ > struct dx_entry *entries = frame->entries; > struct dx_entry *old = frame->at, *new = old + 1; > int count = dx_get_count(entries); > > do { if (__builtin_expect(!!(!(count < dx_get_limit(entries))), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/root/ext3/namei.c"), "i" (770), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > do { if (__builtin_expect(!!(!(old < entries + count)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/root/ext3/namei.c"), "i" (771), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > memmove(new + 1, new, (char *)(entries + count) - (char *)(new)); > dx_set_hash(new, hash); > dx_set_block(new, block); > dx_set_count(entries, count + 1); >} > >static void ext3_update_dx_flag(struct inode *inode) >{ > if (!( EXT3_SB(inode->i_sb)->s_es->s_feature_compat & (( __le32)(__u32)(0x0020)) )) > > EXT3_I(inode)->i_flags &= ~0x00001000; >} > > > > > > > >static inline __attribute__((always_inline)) int ext3_match (int len, const char * const name, > struct ext3_dir_entry_2 * de) >{ > if (len != de->name_len) > return 0; > if (!de->inode) > return 0; > return !__builtin_memcmp(name, de->name, len); >} > > > > >static inline __attribute__((always_inline)) int search_dirblock(struct buffer_head * bh, > struct inode *dir, > struct dentry *dentry, > unsigned long offset, > struct ext3_dir_entry_2 ** res_dir) >{ > struct ext3_dir_entry_2 * de; > char * dlimit; > int de_len; > const char *name = dentry->d_name.name; > int namelen = dentry->d_name.len; > > de = (struct ext3_dir_entry_2 *) bh->b_data; > dlimit = bh->b_data + dir->i_sb->s_blocksize; > while ((char *) de < dlimit) { > > > > if ((char *) de + namelen <= dlimit && > ext3_match (namelen, name, de)) { > > if (!ext3_check_dir_entry("ext3_find_entry", > dir, de, bh, offset)) > return -1; > *res_dir = de; > return 1; > } > > de_len = ext3_rec_len_from_disk(de->rec_len); > if (de_len <= 0) > return -1; > offset += de_len; > de = (struct ext3_dir_entry_2 *) ((char *) de + de_len); > } > return 0; >} ># 853 "/root/ext3/namei.c" >static struct buffer_head * ext3_find_entry (struct dentry *dentry, > struct ext3_dir_entry_2 ** res_dir) >{ > struct super_block * sb; > struct buffer_head * bh_use[(2 * 4)]; > struct buffer_head * bh, *ret = ((void *)0); > unsigned long start, block, b; > int ra_max = 0; > > int ra_ptr = 0; > > int num = 0; > int nblocks, i, err; > struct inode *dir = dentry->d_parent->d_inode; > int namelen; > > *res_dir = ((void *)0); > sb = dir->i_sb; > namelen = dentry->d_name.len; > if (namelen > 255) > return ((void *)0); > if ((( EXT3_SB(dir->i_sb)->s_es->s_feature_compat & (( __le32)(__u32)(0x0020)) ) && (EXT3_I(dir)->i_flags & 0x00001000))) { > bh = ext3_dx_find_entry(dentry, res_dir, &err); > > > > > > if (bh || (err != -75000)) > return bh; > ; > } > nblocks = dir->i_size >> ((sb)->s_blocksize_bits); > start = EXT3_I(dir)->i_dir_start_lookup; > if (start >= nblocks) > start = 0; > block = start; >restart: > do { > > > > if (ra_ptr >= ra_max) { > > ra_ptr = 0; > b = block; > for (ra_max = 0; ra_max < (2 * 4); ra_max++) { > > > > > > if (b >= nblocks || (num && block == start)) { > bh_use[ra_max] = ((void *)0); > break; > } > num++; > bh = ext3_getblk(((void *)0), dir, b++, 0, &err); > bh_use[ra_max] = bh; > if (bh) > ll_rw_block((0 | (1 << 5)), 1, &bh); > } > } > if ((bh = bh_use[ra_ptr++]) == ((void *)0)) > goto next; > wait_on_buffer(bh); > if (!buffer_uptodate(bh)) { > > ext3_error(sb, __func__, "reading directory #%lu " > "offset %lu", dir->i_ino, block); > brelse(bh); > goto next; > } > i = search_dirblock(bh, dir, dentry, > block << ((sb)->s_blocksize_bits), res_dir); > if (i == 1) { > EXT3_I(dir)->i_dir_start_lookup = block; > ret = bh; > goto cleanup_and_exit; > } else { > brelse(bh); > if (i < 0) > goto cleanup_and_exit; > } > next: > if (++block >= nblocks) > block = 0; > } while (block != start); > > > > > > block = nblocks; > nblocks = dir->i_size >> ((sb)->s_blocksize_bits); > if (block < nblocks) { > start = 0; > goto restart; > } > >cleanup_and_exit: > > for (; ra_ptr < ra_max; ra_ptr++) > brelse (bh_use[ra_ptr]); > return ret; >} > >static struct buffer_head * ext3_dx_find_entry(struct dentry *dentry, > struct ext3_dir_entry_2 **res_dir, int *err) >{ > struct super_block * sb; > struct dx_hash_info hinfo; > u32 hash; > struct dx_frame frames[2], *frame; > struct ext3_dir_entry_2 *de, *top; > struct buffer_head *bh; > unsigned long block; > int retval; > int namelen = dentry->d_name.len; > const u8 *name = dentry->d_name.name; > struct inode *dir = dentry->d_parent->d_inode; > > sb = dir->i_sb; > > if (namelen > 2 || name[0] != '.'||(name[1] != '.' && name[1] != '\0')){ > if (!(frame = dx_probe(dentry, ((void *)0), &hinfo, frames, err))) > return ((void *)0); > } else { > frame = frames; > frame->bh = ((void *)0); > frame->at = (struct dx_entry *)frames; > dx_set_block(frame->at, 0); > } > hash = hinfo.hash; > do { > block = dx_get_block(frame->at); > if (!(bh = ext3_bread (((void *)0),dir, block, 0, err))) > goto errout; > de = (struct ext3_dir_entry_2 *) bh->b_data; > top = (struct ext3_dir_entry_2 *) ((char *) de + sb->s_blocksize - > (((0) + 8 + (4 - 1)) & ~(4 - 1))); > for (; de < top; de = ext3_next_entry(de)) > if (ext3_match (namelen, name, de)) { > if (!ext3_check_dir_entry("ext3_find_entry", > dir, de, bh, > (block<<((sb)->s_blocksize_bits)) > +((char *)de - bh->b_data))) { > brelse (bh); > *err = -75000; > goto errout; > } > *res_dir = de; > dx_release (frames); > return bh; > } > brelse (bh); > > retval = ext3_htree_next_block(dir, hash, frame, > frames, ((void *)0)); > if (retval < 0) { > ext3_warning(sb, __func__, > "error reading index page in directory #%lu", > dir->i_ino); > *err = retval; > goto errout; > } > } while (retval == 1); > > *err = -2; >errout: > ; > dx_release (frames); > return ((void *)0); >} > >static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) >{ > struct inode * inode; > struct ext3_dir_entry_2 * de; > struct buffer_head * bh; > > if (dentry->d_name.len > 255) > return ERR_PTR(-36); > > bh = ext3_find_entry(dentry, &de); > inode = ((void *)0); > if (bh) { > unsigned long ino = (( __u32)(__le32)(de->inode)); > brelse (bh); > if (!ext3_valid_inum(dir->i_sb, ino)) { > ext3_error(dir->i_sb, "ext3_lookup", > "bad inode number: %lu", ino); > return ERR_PTR(-5); > } > inode = ext3_iget(dir->i_sb, ino); > if (IS_ERR(inode)) > return ERR_CAST(inode); > } > return d_splice_alias(inode, dentry); >} > > >struct dentry *ext3_get_parent(struct dentry *child) >{ > unsigned long ino; > struct dentry *parent; > struct inode *inode; > struct dentry dotdot; > struct ext3_dir_entry_2 * de; > struct buffer_head *bh; > > dotdot.d_name.name = ".."; > dotdot.d_name.len = 2; > dotdot.d_parent = child; > > bh = ext3_find_entry(&dotdot, &de); > inode = ((void *)0); > if (!bh) > return ERR_PTR(-2); > ino = (( __u32)(__le32)(de->inode)); > brelse(bh); > > if (!ext3_valid_inum(child->d_inode->i_sb, ino)) { > ext3_error(child->d_inode->i_sb, "ext3_get_parent", > "bad inode number: %lu", ino); > return ERR_PTR(-5); > } > > inode = ext3_iget(child->d_inode->i_sb, ino); > if (IS_ERR(inode)) > return ERR_CAST(inode); > > parent = d_alloc_anon(inode); > if (!parent) { > iput(inode); > parent = ERR_PTR(-12); > } > return parent; >} > > >static unsigned char ext3_type_by_mode[00170000 >> 12] = { > [0100000 >> 12] = 1, > [0040000 >> 12] = 2, > [0020000 >> 12] = 3, > [0060000 >> 12] = 4, > [0010000 >> 12] = 5, > [0140000 >> 12] = 6, > [0120000 >> 12] = 7, >}; > >static inline __attribute__((always_inline)) void ext3_set_de_type(struct super_block *sb, > struct ext3_dir_entry_2 *de, > umode_t mode) { > if (( EXT3_SB(sb)->s_es->s_feature_incompat & (( __le32)(__u32)(0x0002)) )) > de->file_type = ext3_type_by_mode[(mode & 00170000)>>12]; >} > > > > > >static struct ext3_dir_entry_2 * >dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count) >{ > unsigned rec_len = 0; > > while (count--) { > struct ext3_dir_entry_2 *de = (struct ext3_dir_entry_2 *) (from + map->offs); > rec_len = (((de->name_len) + 8 + (4 - 1)) & ~(4 - 1)); > (__builtin_constant_p(rec_len) ? __constant_memcpy((to),(de),(rec_len)) : __memcpy((to),(de),(rec_len))); > ((struct ext3_dir_entry_2 *) to)->rec_len = > ext3_rec_len_to_disk(rec_len); > de->inode = 0; > map++; > to += rec_len; > } > return (struct ext3_dir_entry_2 *) (to - rec_len); >} > > > > > >static struct ext3_dir_entry_2* dx_pack_dirents(char *base, int size) >{ > struct ext3_dir_entry_2 *next, *to, *prev, *de = (struct ext3_dir_entry_2 *) base; > unsigned rec_len = 0; > > prev = to = de; > while ((char*)de < base + size) { > next = ext3_next_entry(de); > if (de->inode && de->name_len) { > rec_len = (((de->name_len) + 8 + (4 - 1)) & ~(4 - 1)); > if (de > to) > memmove(to, de, rec_len); > to->rec_len = ext3_rec_len_to_disk(rec_len); > prev = to; > to = (struct ext3_dir_entry_2 *) (((char *) to) + rec_len); > } > de = next; > } > return prev; >} > > > > > > >static struct ext3_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, > struct buffer_head **bh,struct dx_frame *frame, > struct dx_hash_info *hinfo, int *error) >{ > unsigned blocksize = dir->i_sb->s_blocksize; > unsigned count, continued; > struct buffer_head *bh2; > u32 newblock; > u32 hash2; > struct dx_map_entry *map; > char *data1 = (*bh)->b_data, *data2; > unsigned split, move, size, i; > struct ext3_dir_entry_2 *de = ((void *)0), *de2; > int err = 0; > > bh2 = ext3_append (handle, dir, &newblock, &err); > if (!(bh2)) { > brelse(*bh); > *bh = ((void *)0); > goto errout; > } > > do {} while (0); > err = __ext3_journal_get_write_access((__func__), (handle), (*bh)); > if (err) > goto journal_error; > > do {} while (0); > err = __ext3_journal_get_write_access((__func__), (handle), (frame->bh)); > if (err) > goto journal_error; > > data2 = bh2->b_data; > > > map = (struct dx_map_entry *) (data2 + blocksize); > > count = dx_make_map ((struct ext3_dir_entry_2 *) data1, > blocksize, hinfo, map); > map -= count; > > dx_sort_map (map, count); > > size = 0; > move = 0; > for (i = count-1; i >= 0; i--) { > > > > if (size + (u16)(map[i].size/2) > blocksize/2) > break; > size += map[i].size; > move++; > > > > > > > } > > split = count - move; > hash2 = map[split].hash; > continued = hash2 == map[split - 1].hash; > ; > > > > de2 = dx_move_dirents(data1, data2, map + split, count - split); > de = dx_pack_dirents(data1,blocksize); > de->rec_len = ext3_rec_len_to_disk(data1 + blocksize - (char *) de); > de2->rec_len = ext3_rec_len_to_disk(data2 + blocksize - (char *) de2); > ; > ; > > > if (hinfo->hash >= hash2) > { > do { typeof(*bh) z = *bh; *bh = bh2; bh2 = z; } while (0); > de = de2; > } > dx_insert_block (frame, hash2 + continued, newblock); > err = __ext3_journal_dirty_metadata((__func__), (handle), (bh2)); > if (err) > goto journal_error; > err = __ext3_journal_dirty_metadata((__func__), (handle), (frame->bh)); > if (err) > goto journal_error; > brelse (bh2); > ; > return de; > >journal_error: > brelse(*bh); > brelse(bh2); > *bh = ((void *)0); > do { if ((err)) __ext3_std_error((dir->i_sb), (__func__), (err)); } while (0); >errout: > *error = err; > return ((void *)0); >} ># 1277 "/root/ext3/namei.c" >static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry, > struct inode *inode, struct ext3_dir_entry_2 *de, > struct buffer_head * bh) >{ > struct inode *dir = dentry->d_parent->d_inode; > const char *name = dentry->d_name.name; > int namelen = dentry->d_name.len; > unsigned long offset = 0; > unsigned short reclen; > int nlen, rlen, err; > char *top; > > reclen = (((namelen) + 8 + (4 - 1)) & ~(4 - 1)); > if (!de) { > de = (struct ext3_dir_entry_2 *)bh->b_data; > top = bh->b_data + dir->i_sb->s_blocksize - reclen; > while ((char *) de <= top) { > if (!ext3_check_dir_entry("ext3_add_entry", dir, de, > bh, offset)) { > brelse (bh); > return -5; > } > if (ext3_match (namelen, name, de)) { > brelse (bh); > return -17; > } > nlen = (((de->name_len) + 8 + (4 - 1)) & ~(4 - 1)); > rlen = ext3_rec_len_from_disk(de->rec_len); > if ((de->inode? rlen - nlen: rlen) >= reclen) > break; > de = (struct ext3_dir_entry_2 *)((char *)de + rlen); > offset += rlen; > } > if ((char *) de > top) > return -28; > } > do {} while (0); > err = __ext3_journal_get_write_access((__func__), (handle), (bh)); > if (err) { > do { if ((err)) __ext3_std_error((dir->i_sb), (__func__), (err)); } while (0); > brelse(bh); > return err; > } > > > nlen = (((de->name_len) + 8 + (4 - 1)) & ~(4 - 1)); > rlen = ext3_rec_len_from_disk(de->rec_len); > if (de->inode) { > struct ext3_dir_entry_2 *de1 = (struct ext3_dir_entry_2 *)((char *)de + nlen); > de1->rec_len = ext3_rec_len_to_disk(rlen - nlen); > de->rec_len = ext3_rec_len_to_disk(nlen); > de = de1; > } > de->file_type = 0; > if (inode) { > de->inode = (( __le32)(__u32)(inode->i_ino)); > ext3_set_de_type(dir->i_sb, de, inode->i_mode); > } else > de->inode = 0; > de->name_len = namelen; > (__builtin_constant_p(namelen) ? __constant_memcpy((de->name),(name),(namelen)) : __memcpy((de->name),(name),(namelen))); ># 1349 "/root/ext3/namei.c" > dir->i_mtime = dir->i_ctime = ((struct timespec) { get_seconds(), 0 }); > ext3_update_dx_flag(dir); > dir->i_version++; > ext3_mark_inode_dirty(handle, dir); > do {} while (0); > err = __ext3_journal_dirty_metadata((__func__), (handle), (bh)); > if (err) > do { if ((err)) __ext3_std_error((dir->i_sb), (__func__), (err)); } while (0); > brelse(bh); > return 0; >} > > > > > >static int make_indexed_dir(handle_t *handle, struct dentry *dentry, > struct inode *inode, struct buffer_head *bh) >{ > struct inode *dir = dentry->d_parent->d_inode; > const char *name = dentry->d_name.name; > int namelen = dentry->d_name.len; > struct buffer_head *bh2; > struct dx_root *root; > struct dx_frame frames[2], *frame; > struct dx_entry *entries; > struct ext3_dir_entry_2 *de, *de2; > char *data1, *top; > unsigned len; > int retval; > unsigned blocksize; > struct dx_hash_info hinfo; > u32 block; > struct fake_dirent *fde; > > blocksize = dir->i_sb->s_blocksize; > ; > retval = __ext3_journal_get_write_access((__func__), (handle), (bh)); > if (retval) { > do { if ((retval)) __ext3_std_error((dir->i_sb), (__func__), (retval)); } while (0); > brelse(bh); > return retval; > } > root = (struct dx_root *) bh->b_data; > > bh2 = ext3_append (handle, dir, &block, &retval); > if (!(bh2)) { > brelse(bh); > return retval; > } > EXT3_I(dir)->i_flags |= 0x00001000; > data1 = bh2->b_data; > > > fde = &root->dotdot; > de = (struct ext3_dir_entry_2 *)((char *)fde + > ext3_rec_len_from_disk(fde->rec_len)); > len = ((char *) root) + blocksize - (char *) de; > (__builtin_constant_p(len) ? __constant_memcpy((data1),(de),(len)) : __memcpy((data1),(de),(len))); > de = (struct ext3_dir_entry_2 *) data1; > top = data1 + len; > while ((char *)(de2 = ext3_next_entry(de)) < top) > de = de2; > de->rec_len = ext3_rec_len_to_disk(data1 + blocksize - (char *) de); > > de = (struct ext3_dir_entry_2 *) (&root->dotdot); > de->rec_len = ext3_rec_len_to_disk(blocksize - (((2) + 8 + (4 - 1)) & ~(4 - 1))); > (__builtin_constant_p(0) ? (__builtin_constant_p((sizeof(root->info))) ? __constant_c_and_count_memset(((&root->info)),((0x01010101UL*(unsigned char)(0))),((sizeof(root->info)))) : __constant_c_memset(((&root->info)),((0x01010101UL*(unsigned char)(0))),((sizeof(root->info))))) : (__builtin_constant_p((sizeof(root->info))) ? __memset_generic((((&root->info))),(((0))),(((sizeof(root->info))))) : __memset_generic(((&root->info)),((0)),((sizeof(root->info)))))); > root->info.info_length = sizeof(root->info); > root->info.hash_version = EXT3_SB(dir->i_sb)->s_def_hash_version; > entries = root->entries; > dx_set_block (entries, 1); > dx_set_count (entries, 1); > dx_set_limit (entries, dx_root_limit(dir, sizeof(root->info))); > > > hinfo.hash_version = root->info.hash_version; > hinfo.seed = EXT3_SB(dir->i_sb)->s_hash_seed; > ext3fs_dirhash(name, namelen, &hinfo); > frame = frames; > frame->entries = entries; > frame->at = entries; > frame->bh = bh; > bh = bh2; > de = do_split(handle,dir, &bh, frame, &hinfo, &retval); > dx_release (frames); > if (!(de)) > return retval; > > return add_dirent_to_buf(handle, dentry, inode, de, bh); >} ># 1451 "/root/ext3/namei.c" >static int ext3_add_entry (handle_t *handle, struct dentry *dentry, > struct inode *inode) >{ > struct inode *dir = dentry->d_parent->d_inode; > unsigned long offset; > struct buffer_head * bh; > struct ext3_dir_entry_2 *de; > struct super_block * sb; > int retval; > int dx_fallback=0; > unsigned blocksize; > u32 block, blocks; > > sb = dir->i_sb; > blocksize = sb->s_blocksize; > if (!dentry->d_name.len) > return -22; > if ((( EXT3_SB(dir->i_sb)->s_es->s_feature_compat & (( __le32)(__u32)(0x0020)) ) && (EXT3_I(dir)->i_flags & 0x00001000))) { > retval = ext3_dx_add_entry(handle, dentry, inode); > if (!retval || (retval != -75000)) > return retval; > EXT3_I(dir)->i_flags &= ~0x00001000; > dx_fallback++; > ext3_mark_inode_dirty(handle, dir); > } > blocks = dir->i_size >> sb->s_blocksize_bits; > for (block = 0, offset = 0; block < blocks; block++) { > bh = ext3_bread(handle, dir, block, 0, &retval); > if(!bh) > return retval; > retval = add_dirent_to_buf(handle, dentry, inode, ((void *)0), bh); > if (retval != -28) > return retval; > > if (blocks == 1 && !dx_fallback && > ( EXT3_SB(sb)->s_es->s_feature_compat & (( __le32)(__u32)(0x0020)) )) > return make_indexed_dir(handle, dentry, inode, bh); > brelse(bh); > } > bh = ext3_append(handle, dir, &block, &retval); > if (!bh) > return retval; > de = (struct ext3_dir_entry_2 *) bh->b_data; > de->inode = 0; > de->rec_len = ext3_rec_len_to_disk(blocksize); > return add_dirent_to_buf(handle, dentry, inode, de, bh); >} > > > > >static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry, > struct inode *inode) >{ > struct dx_frame frames[2], *frame; > struct dx_entry *entries, *at; > struct dx_hash_info hinfo; > struct buffer_head * bh; > struct inode *dir = dentry->d_parent->d_inode; > struct super_block * sb = dir->i_sb; > struct ext3_dir_entry_2 *de; > int err; > > frame = dx_probe(dentry, ((void *)0), &hinfo, frames, &err); > if (!frame) > return err; > entries = frame->entries; > at = frame->at; > > if (!(bh = ext3_bread(handle,dir, dx_get_block(frame->at), 0, &err))) > goto cleanup; > > do {} while (0); > err = __ext3_journal_get_write_access((__func__), (handle), (bh)); > if (err) > goto journal_error; > > err = add_dirent_to_buf(handle, dentry, inode, ((void *)0), bh); > if (err != -28) { > bh = ((void *)0); > goto cleanup; > } > > > ; > > > if (dx_get_count(entries) == dx_get_limit(entries)) { > u32 newblock; > unsigned icount = dx_get_count(entries); > int levels = frame - frames; > struct dx_entry *entries2; > struct dx_node *node2; > struct buffer_head *bh2; > > if (levels && (dx_get_count(frames->entries) == > dx_get_limit(frames->entries))) { > ext3_warning(sb, __func__, > "Directory index full!"); > err = -28; > goto cleanup; > } > bh2 = ext3_append (handle, dir, &newblock, &err); > if (!(bh2)) > goto cleanup; > node2 = (struct dx_node *)(bh2->b_data); > entries2 = node2->entries; > node2->fake.rec_len = ext3_rec_len_to_disk(sb->s_blocksize); > node2->fake.inode = 0; > do {} while (0); > err = __ext3_journal_get_write_access((__func__), (handle), (frame->bh)); > if (err) > goto journal_error; > if (levels) { > unsigned icount1 = icount/2, icount2 = icount - icount1; > unsigned hash2 = dx_get_hash(entries + icount1); > ; > > do {} while (0); > err = __ext3_journal_get_write_access((__func__), (handle), (frames[0].bh)); > > if (err) > goto journal_error; > > (__builtin_constant_p(icount2 * sizeof(struct dx_entry)) ? __constant_memcpy(((char *) entries2),((char *) (entries + icount1)),(icount2 * sizeof(struct dx_entry))) : __memcpy(((char *) entries2),((char *) (entries + icount1)),(icount2 * sizeof(struct dx_entry)))); > > dx_set_count (entries, icount1); > dx_set_count (entries2, icount2); > dx_set_limit (entries2, dx_node_limit(dir)); > > > if (at - entries >= icount1) { > frame->at = at = at - entries - icount1 + entries2; > frame->entries = entries = entries2; > do { typeof(frame->bh) z = frame->bh; frame->bh = bh2; bh2 = z; } while (0); > } > dx_insert_block (frames + 0, hash2, newblock); > ; > ; > > err = __ext3_journal_dirty_metadata((__func__), (handle), (bh2)); > if (err) > goto journal_error; > brelse (bh2); > } else { > ; > (__builtin_constant_p(icount * sizeof(struct dx_entry)) ? __constant_memcpy(((char *) entries2),((char *) entries),(icount * sizeof(struct dx_entry))) : __memcpy(((char *) entries2),((char *) entries),(icount * sizeof(struct dx_entry)))); > > dx_set_limit(entries2, dx_node_limit(dir)); > > > dx_set_count(entries, 1); > dx_set_block(entries + 0, newblock); > ((struct dx_root *) frames[0].bh->b_data)->info.indirect_levels = 1; > > > frame = frames + 1; > frame->at = at = at - entries + entries2; > frame->entries = entries = entries2; > frame->bh = bh2; > err = __ext3_journal_get_write_access((__func__), (handle), (frame->bh)); > > if (err) > goto journal_error; > } > __ext3_journal_dirty_metadata((__func__), (handle), (frames[0].bh)); > } > de = do_split(handle, dir, &bh, frame, &hinfo, &err); > if (!de) > goto cleanup; > err = add_dirent_to_buf(handle, dentry, inode, de, bh); > bh = ((void *)0); > goto cleanup; > >journal_error: > do { if ((err)) __ext3_std_error((dir->i_sb), (__func__), (err)); } while (0); >cleanup: > if (bh) > brelse(bh); > dx_release(frames); > return err; >} > > > > > >static int ext3_delete_entry (handle_t *handle, > struct inode * dir, > struct ext3_dir_entry_2 * de_del, > struct buffer_head * bh) >{ > struct ext3_dir_entry_2 * de, * pde; > int i; > > i = 0; > pde = ((void *)0); > de = (struct ext3_dir_entry_2 *) bh->b_data; > while (i < bh->b_size) { > if (!ext3_check_dir_entry("ext3_delete_entry", dir, de, bh, i)) > return -5; > if (de == de_del) { > do {} while (0); > __ext3_journal_get_write_access((__func__), (handle), (bh)); > if (pde) > pde->rec_len = ext3_rec_len_to_disk( > ext3_rec_len_from_disk(pde->rec_len) + > ext3_rec_len_from_disk(de->rec_len)); > else > de->inode = 0; > dir->i_version++; > do {} while (0); > __ext3_journal_dirty_metadata((__func__), (handle), (bh)); > return 0; > } > i += ext3_rec_len_from_disk(de->rec_len); > pde = de; > de = ext3_next_entry(de); > } > return -2; >} > >static int ext3_add_nondir(handle_t *handle, > struct dentry *dentry, struct inode *inode) >{ > int err = ext3_add_entry(handle, dentry, inode); > if (!err) { > ext3_mark_inode_dirty(handle, inode); > d_instantiate(dentry, inode); > return 0; > } > drop_nlink(inode); > iput(inode); > return err; >} ># 1695 "/root/ext3/namei.c" >static int ext3_create (struct inode * dir, struct dentry * dentry, int mode, > struct nameidata *nd) >{ > handle_t *handle; > struct inode * inode; > int err, retries = 0; > >retry: > handle = ext3_journal_start(dir, (8U + 6U - 2 + 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? 2 : 0)) + > 8 + 3 + > 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? (({ typeof(1) _max1 = (1); typeof(4) _max2 = (4); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; })* (8U -3)+3+({ typeof(1) _max1 = (1); typeof(2) _max2 = (2); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; })) : 0)); > if (IS_ERR(handle)) > return PTR_ERR(handle); > > if ((((dir)->i_sb->s_flags & (16|128)) || ((dir)->i_flags & (1|64)))) > handle->h_sync = 1; > > inode = ext3_new_inode (handle, dir, mode); > err = PTR_ERR(inode); > if (!IS_ERR(inode)) { > inode->i_op = &ext3_file_inode_operations; > inode->i_fop = &ext3_file_operations; > ext3_set_aops(inode); > err = ext3_add_nondir(handle, dentry, inode); > } > __ext3_journal_stop((__func__), (handle)); > if (err == -28 && ext3_should_retry_alloc(dir->i_sb, &retries)) > goto retry; > return err; >} > >static int ext3_mknod (struct inode * dir, struct dentry *dentry, > int mode, dev_t rdev) >{ > handle_t *handle; > struct inode *inode; > int err, retries = 0; > > if (!new_valid_dev(rdev)) > return -22; > >retry: > handle = ext3_journal_start(dir, (8U + 6U - 2 + 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? 2 : 0)) + > 8 + 3 + > 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? (({ typeof(1) _max1 = (1); typeof(4) _max2 = (4); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; })* (8U -3)+3+({ typeof(1) _max1 = (1); typeof(2) _max2 = (2); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; })) : 0)); > if (IS_ERR(handle)) > return PTR_ERR(handle); > > if ((((dir)->i_sb->s_flags & (16|128)) || ((dir)->i_flags & (1|64)))) > handle->h_sync = 1; > > inode = ext3_new_inode (handle, dir, mode); > err = PTR_ERR(inode); > if (!IS_ERR(inode)) { > init_special_inode(inode, inode->i_mode, rdev); > > inode->i_op = &ext3_special_inode_operations; > > err = ext3_add_nondir(handle, dentry, inode); > } > __ext3_journal_stop((__func__), (handle)); > if (err == -28 && ext3_should_retry_alloc(dir->i_sb, &retries)) > goto retry; > return err; >} > >static int ext3_mkdir(struct inode * dir, struct dentry * dentry, int mode) >{ > handle_t *handle; > struct inode * inode; > struct buffer_head * dir_block; > struct ext3_dir_entry_2 * de; > int err, retries = 0; > > if (dir->i_nlink >= 32000) > return -31; > >retry: > handle = ext3_journal_start(dir, (8U + 6U - 2 + 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? 2 : 0)) + > 8 + 3 + > 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? (({ typeof(1) _max1 = (1); typeof(4) _max2 = (4); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; })* (8U -3)+3+({ typeof(1) _max1 = (1); typeof(2) _max2 = (2); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; })) : 0)); > if (IS_ERR(handle)) > return PTR_ERR(handle); > > if ((((dir)->i_sb->s_flags & (16|128)) || ((dir)->i_flags & (1|64)))) > handle->h_sync = 1; > > inode = ext3_new_inode (handle, dir, 0040000 | mode); > err = PTR_ERR(inode); > if (IS_ERR(inode)) > goto out_stop; > > inode->i_op = &ext3_dir_inode_operations; > inode->i_fop = &ext3_dir_operations; > inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; > dir_block = ext3_bread (handle, inode, 0, 1, &err); > if (!dir_block) { > drop_nlink(inode); > ext3_mark_inode_dirty(handle, inode); > iput (inode); > goto out_stop; > } > do {} while (0); > __ext3_journal_get_write_access((__func__), (handle), (dir_block)); > de = (struct ext3_dir_entry_2 *) dir_block->b_data; > de->inode = (( __le32)(__u32)(inode->i_ino)); > de->name_len = 1; > de->rec_len = ext3_rec_len_to_disk((((de->name_len) + 8 + (4 - 1)) & ~(4 - 1))); > strcpy (de->name, "."); > ext3_set_de_type(dir->i_sb, de, 0040000); > de = ext3_next_entry(de); > de->inode = (( __le32)(__u32)(dir->i_ino)); > de->rec_len = ext3_rec_len_to_disk(inode->i_sb->s_blocksize - > (((1) + 8 + (4 - 1)) & ~(4 - 1))); > de->name_len = 2; > strcpy (de->name, ".."); > ext3_set_de_type(dir->i_sb, de, 0040000); > inode->i_nlink = 2; > do {} while (0); > __ext3_journal_dirty_metadata((__func__), (handle), (dir_block)); > brelse (dir_block); > ext3_mark_inode_dirty(handle, inode); > err = ext3_add_entry (handle, dentry, inode); > if (err) { > inode->i_nlink = 0; > ext3_mark_inode_dirty(handle, inode); > iput (inode); > goto out_stop; > } > inc_nlink(dir); > ext3_update_dx_flag(dir); > ext3_mark_inode_dirty(handle, dir); > d_instantiate(dentry, inode); >out_stop: > __ext3_journal_stop((__func__), (handle)); > if (err == -28 && ext3_should_retry_alloc(dir->i_sb, &retries)) > goto retry; > return err; >} > > > > >static int empty_dir (struct inode * inode) >{ > unsigned long offset; > struct buffer_head * bh; > struct ext3_dir_entry_2 * de, * de1; > struct super_block * sb; > int err = 0; > > sb = inode->i_sb; > if (inode->i_size < (((1) + 8 + (4 - 1)) & ~(4 - 1)) + (((2) + 8 + (4 - 1)) & ~(4 - 1)) || > !(bh = ext3_bread (((void *)0), inode, 0, 0, &err))) { > if (err) > ext3_error(inode->i_sb, __func__, > "error %d reading directory #%lu offset 0", > err, inode->i_ino); > else > ext3_warning(inode->i_sb, __func__, > "bad directory (dir #%lu) - no data block", > inode->i_ino); > return 1; > } > de = (struct ext3_dir_entry_2 *) bh->b_data; > de1 = ext3_next_entry(de); > if ((( __u32)(__le32)(de->inode)) != inode->i_ino || > !(( __u32)(__le32)(de1->inode)) || > strcmp (".", de->name) || > strcmp ("..", de1->name)) { > ext3_warning (inode->i_sb, "empty_dir", > "bad directory (dir #%lu) - no `.' or `..'", > inode->i_ino); > brelse (bh); > return 1; > } > offset = ext3_rec_len_from_disk(de->rec_len) + > ext3_rec_len_from_disk(de1->rec_len); > de = ext3_next_entry(de1); > while (offset < inode->i_size ) { > if (!bh || > (void *) de >= (void *) (bh->b_data+sb->s_blocksize)) { > err = 0; > brelse (bh); > bh = ext3_bread (((void *)0), inode, > offset >> ((sb)->s_blocksize_bits), 0, &err); > if (!bh) { > if (err) > ext3_error(sb, __func__, > "error %d reading directory" > " #%lu offset %lu", > err, inode->i_ino, offset); > offset += sb->s_blocksize; > continue; > } > de = (struct ext3_dir_entry_2 *) bh->b_data; > } > if (!ext3_check_dir_entry("empty_dir", inode, de, bh, offset)) { > de = (struct ext3_dir_entry_2 *)(bh->b_data + > sb->s_blocksize); > offset = (offset | (sb->s_blocksize - 1)) + 1; > continue; > } > if ((( __u32)(__le32)(de->inode))) { > brelse (bh); > return 0; > } > offset += ext3_rec_len_from_disk(de->rec_len); > de = ext3_next_entry(de); > } > brelse (bh); > return 1; >} ># 1917 "/root/ext3/namei.c" >int ext3_orphan_add(handle_t *handle, struct inode *inode) >{ > struct super_block *sb = inode->i_sb; > struct ext3_iloc iloc; > int err = 0, rc; > > lock_super(sb); > if (!list_empty(&EXT3_I(inode)->i_orphan)) > goto out_unlock; ># 1936 "/root/ext3/namei.c" > do { if (__builtin_expect(!!(!(((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) || (((inode->i_mode) & 00170000) == 0120000)) || inode->i_nlink == 0)), 0)) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/root/ext3/namei.c"), "i" (1937), "i" (sizeof(struct bug_entry))); for (;;) ; } while (0); } while(0); > > > do {} while (0); > err = __ext3_journal_get_write_access((__func__), (handle), (EXT3_SB(sb)->s_sbh)); > if (err) > goto out_unlock; > > err = ext3_reserve_inode_write(handle, inode, &iloc); > if (err) > goto out_unlock; > > > EXT3_I(inode)->i_dtime = (( __u32)(__le32)(EXT3_SB(sb)->s_es->s_last_orphan)); > EXT3_SB(sb)->s_es->s_last_orphan = (( __le32)(__u32)(inode->i_ino)); > err = __ext3_journal_dirty_metadata((__func__), (handle), (EXT3_SB(sb)->s_sbh)); > rc = ext3_mark_iloc_dirty(handle, inode, &iloc); > if (!err) > err = rc; ># 1964 "/root/ext3/namei.c" > if (!err) > list_add(&EXT3_I(inode)->i_orphan, &EXT3_SB(sb)->s_orphan); > > ; > ; > >out_unlock: > unlock_super(sb); > do { if ((err)) __ext3_std_error((inode->i_sb), (__func__), (err)); } while (0); > return err; >} > > > > > >int ext3_orphan_del(handle_t *handle, struct inode *inode) >{ > struct list_head *prev; > struct ext3_inode_info *ei = EXT3_I(inode); > struct ext3_sb_info *sbi; > unsigned long ino_next; > struct ext3_iloc iloc; > int err = 0; > > lock_super(inode->i_sb); > if (list_empty(&ei->i_orphan)) { > unlock_super(inode->i_sb); > return 0; > } > > ino_next = EXT3_I(inode)->i_dtime; > prev = ei->i_orphan.prev; > sbi = EXT3_SB(inode->i_sb); > > ; > > list_del_init(&ei->i_orphan); > > > > > > if (!handle) > goto out; > > err = ext3_reserve_inode_write(handle, inode, &iloc); > if (err) > goto out_err; > > if (prev == &sbi->s_orphan) { > ; > do {} while (0); > err = __ext3_journal_get_write_access((__func__), (handle), (sbi->s_sbh)); > if (err) > goto out_brelse; > sbi->s_es->s_last_orphan = (( __le32)(__u32)(ino_next)); > err = __ext3_journal_dirty_metadata((__func__), (handle), (sbi->s_sbh)); > } else { > struct ext3_iloc iloc2; > struct inode *i_prev = > &({ const typeof( ((struct ext3_inode_info *)0)->i_orphan ) *__mptr = (prev); (struct ext3_inode_info *)( (char *)__mptr - __builtin_offsetof(struct ext3_inode_info,i_orphan) );})->vfs_inode; > > ; > > err = ext3_reserve_inode_write(handle, i_prev, &iloc2); > if (err) > goto out_brelse; > EXT3_I(i_prev)->i_dtime = ino_next; > err = ext3_mark_iloc_dirty(handle, i_prev, &iloc2); > } > if (err) > goto out_brelse; > EXT3_I(inode)->i_dtime = 0; > err = ext3_mark_iloc_dirty(handle, inode, &iloc); > >out_err: > do { if ((err)) __ext3_std_error((inode->i_sb), (__func__), (err)); } while (0); >out: > unlock_super(inode->i_sb); > return err; > >out_brelse: > brelse(iloc.bh); > goto out_err; >} > >static int ext3_rmdir (struct inode * dir, struct dentry *dentry) >{ > int retval; > struct inode * inode; > struct buffer_head * bh; > struct ext3_dir_entry_2 * de; > handle_t *handle; > > > > DQUOT_INIT(dentry->d_inode); > handle = ext3_journal_start(dir, (2 * (8U + 6U - 2 + 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? 2 : 0)) + 64)); > if (IS_ERR(handle)) > return PTR_ERR(handle); > > retval = -2; > bh = ext3_find_entry (dentry, &de); > if (!bh) > goto end_rmdir; > > if ((((dir)->i_sb->s_flags & (16|128)) || ((dir)->i_flags & (1|64)))) > handle->h_sync = 1; > > inode = dentry->d_inode; > > retval = -5; > if ((( __u32)(__le32)(de->inode)) != inode->i_ino) > goto end_rmdir; > > retval = -39; > if (!empty_dir (inode)) > goto end_rmdir; > > retval = ext3_delete_entry(handle, dir, de, bh); > if (retval) > goto end_rmdir; > if (inode->i_nlink != 2) > ext3_warning (inode->i_sb, "ext3_rmdir", > "empty directory has nlink!=2 (%d)", > inode->i_nlink); > inode->i_version++; > clear_nlink(inode); > > > > inode->i_size = 0; > ext3_orphan_add(handle, inode); > inode->i_ctime = dir->i_ctime = dir->i_mtime = ((struct timespec) { get_seconds(), 0 }); > ext3_mark_inode_dirty(handle, inode); > drop_nlink(dir); > ext3_update_dx_flag(dir); > ext3_mark_inode_dirty(handle, dir); > >end_rmdir: > __ext3_journal_stop((__func__), (handle)); > brelse (bh); > return retval; >} > >static int ext3_unlink(struct inode * dir, struct dentry *dentry) >{ > int retval; > struct inode * inode; > struct buffer_head * bh; > struct ext3_dir_entry_2 * de; > handle_t *handle; > > > > DQUOT_INIT(dentry->d_inode); > handle = ext3_journal_start(dir, (2 * (8U + 6U - 2 + 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? 2 : 0)) + 64)); > if (IS_ERR(handle)) > return PTR_ERR(handle); > > if ((((dir)->i_sb->s_flags & (16|128)) || ((dir)->i_flags & (1|64)))) > handle->h_sync = 1; > > retval = -2; > bh = ext3_find_entry (dentry, &de); > if (!bh) > goto end_unlink; > > inode = dentry->d_inode; > > retval = -5; > if ((( __u32)(__le32)(de->inode)) != inode->i_ino) > goto end_unlink; > > if (!inode->i_nlink) { > ext3_warning (inode->i_sb, "ext3_unlink", > "Deleting nonexistent file (%lu), %d", > inode->i_ino, inode->i_nlink); > inode->i_nlink = 1; > } > retval = ext3_delete_entry(handle, dir, de, bh); > if (retval) > goto end_unlink; > dir->i_ctime = dir->i_mtime = ((struct timespec) { get_seconds(), 0 }); > ext3_update_dx_flag(dir); > ext3_mark_inode_dirty(handle, dir); > drop_nlink(inode); > if (!inode->i_nlink) > ext3_orphan_add(handle, inode); > inode->i_ctime = dir->i_ctime; > ext3_mark_inode_dirty(handle, inode); > retval = 0; > >end_unlink: > __ext3_journal_stop((__func__), (handle)); > brelse (bh); > return retval; >} > >static int ext3_symlink (struct inode * dir, > struct dentry *dentry, const char * symname) >{ > handle_t *handle; > struct inode * inode; > int l, err, retries = 0; > > l = strlen(symname)+1; > if (l > dir->i_sb->s_blocksize) > return -36; > >retry: > handle = ext3_journal_start(dir, (8U + 6U - 2 + 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? 2 : 0)) + > 8 + 5 + > 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? (({ typeof(1) _max1 = (1); typeof(4) _max2 = (4); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; })* (8U -3)+3+({ typeof(1) _max1 = (1); typeof(2) _max2 = (2); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; })) : 0)); > if (IS_ERR(handle)) > return PTR_ERR(handle); > > if ((((dir)->i_sb->s_flags & (16|128)) || ((dir)->i_flags & (1|64)))) > handle->h_sync = 1; > > inode = ext3_new_inode (handle, dir, 0120000|(00700|00070|00007)); > err = PTR_ERR(inode); > if (IS_ERR(inode)) > goto out_stop; > > if (l > sizeof (EXT3_I(inode)->i_data)) { > inode->i_op = &ext3_symlink_inode_operations; > ext3_set_aops(inode); > > > > > > err = __page_symlink(inode, symname, l, > mapping_gfp_mask(inode->i_mapping) & ~(( gfp_t)0x80u)); > if (err) { > drop_nlink(inode); > ext3_mark_inode_dirty(handle, inode); > iput (inode); > goto out_stop; > } > } else { > inode->i_op = &ext3_fast_symlink_inode_operations; > (__builtin_constant_p(l) ? __constant_memcpy(((char*)&EXT3_I(inode)->i_data),(symname),(l)) : __memcpy(((char*)&EXT3_I(inode)->i_data),(symname),(l))); > inode->i_size = l-1; > } > EXT3_I(inode)->i_disksize = inode->i_size; > err = ext3_add_nondir(handle, dentry, inode); >out_stop: > __ext3_journal_stop((__func__), (handle)); > if (err == -28 && ext3_should_retry_alloc(dir->i_sb, &retries)) > goto retry; > return err; >} > >static int ext3_link (struct dentry * old_dentry, > struct inode * dir, struct dentry *dentry) >{ > handle_t *handle; > struct inode *inode = old_dentry->d_inode; > int err, retries = 0; > > if (inode->i_nlink >= 32000) > return -31; > > > > > if (inode->i_nlink == 0) > return -2; > >retry: > handle = ext3_journal_start(dir, (8U + 6U - 2 + 2*((EXT3_SB(dir->i_sb)->s_mount_opt & 0x80000) ? 2 : 0)) + > 8); > if (IS_ERR(handle)) > return PTR_ERR(handle); > > if ((((dir)->i_sb->s_flags & (16|128)) || ((dir)->i_flags & (1|64)))) > handle->h_sync = 1; > > inode->i_ctime = ((struct timespec) { get_seconds(), 0 }); > inc_nlink(inode); > atomic_inc(&inode->i_count); > > err = ext3_add_nondir(handle, dentry, inode); > __ext3_journal_stop((__func__), (handle)); > if (err == -28 && ext3_should_retry_alloc(dir->i_sb, &retries)) > goto retry; > return err; >} ># 2263 "/root/ext3/namei.c" >static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, > struct inode * new_dir,struct dentry *new_dentry) >{ > handle_t *handle; > struct inode * old_inode, * new_inode; > struct buffer_head * old_bh, * new_bh, * dir_bh; > struct ext3_dir_entry_2 * old_de, * new_de; > int retval; > > old_bh = new_bh = dir_bh = ((void *)0); > > > > if (new_dentry->d_inode) > DQUOT_INIT(new_dentry->d_inode); > handle = ext3_journal_start(old_dir, 2 * > (8U + 6U - 2 + 2*((EXT3_SB(old_dir->i_sb)->s_mount_opt & 0x80000) ? 2 : 0)) + > 8 + 2); > if (IS_ERR(handle)) > return PTR_ERR(handle); > > if ((((old_dir)->i_sb->s_flags & (16|128)) || ((old_dir)->i_flags & (1|64))) || (((new_dir)->i_sb->s_flags & (16|128)) || ((new_dir)->i_flags & (1|64)))) > handle->h_sync = 1; > > old_bh = ext3_find_entry (old_dentry, &old_de); > > > > > > > old_inode = old_dentry->d_inode; > retval = -2; > if (!old_bh || (( __u32)(__le32)(old_de->inode)) != old_inode->i_ino) > goto end_rename; > > new_inode = new_dentry->d_inode; > new_bh = ext3_find_entry (new_dentry, &new_de); > if (new_bh) { > if (!new_inode) { > brelse (new_bh); > new_bh = ((void *)0); > } > } > if ((((old_inode->i_mode) & 00170000) == 0040000)) { > if (new_inode) { > retval = -39; > if (!empty_dir (new_inode)) > goto end_rename; > } > retval = -5; > dir_bh = ext3_bread (handle, old_inode, 0, 0, &retval); > if (!dir_bh) > goto end_rename; > if ((( __u32)(__le32)((ext3_next_entry((struct ext3_dir_entry_2 *)(dir_bh->b_data))->inode))) != old_dir->i_ino) > goto end_rename; > retval = -31; > if (!new_inode && new_dir!=old_dir && > new_dir->i_nlink >= 32000) > goto end_rename; > } > if (!new_bh) { > retval = ext3_add_entry (handle, new_dentry, old_inode); > if (retval) > goto end_rename; > } else { > do {} while (0); > __ext3_journal_get_write_access((__func__), (handle), (new_bh)); > new_de->inode = (( __le32)(__u32)(old_inode->i_ino)); > if (( EXT3_SB(new_dir->i_sb)->s_es->s_feature_incompat & (( __le32)(__u32)(0x0002)) )) > > new_de->file_type = old_de->file_type; > new_dir->i_version++; > new_dir->i_ctime = new_dir->i_mtime = ((struct timespec) { get_seconds(), 0 }); > ext3_mark_inode_dirty(handle, new_dir); > do {} while (0); > __ext3_journal_dirty_metadata((__func__), (handle), (new_bh)); > brelse(new_bh); > new_bh = ((void *)0); > } > > > > > > old_inode->i_ctime = ((struct timespec) { get_seconds(), 0 }); > ext3_mark_inode_dirty(handle, old_inode); > > > > > if ((( __u32)(__le32)(old_de->inode)) != old_inode->i_ino || > old_de->name_len != old_dentry->d_name.len || > strncmp(old_de->name, old_dentry->d_name.name, old_de->name_len) || > (retval = ext3_delete_entry(handle, old_dir, > old_de, old_bh)) == -2) { > > > > > struct buffer_head *old_bh2; > struct ext3_dir_entry_2 *old_de2; > > old_bh2 = ext3_find_entry(old_dentry, &old_de2); > if (old_bh2) { > retval = ext3_delete_entry(handle, old_dir, > old_de2, old_bh2); > brelse(old_bh2); > } > } > if (retval) { > ext3_warning(old_dir->i_sb, "ext3_rename", > "Deleting old file (%lu), %d, error=%d", > old_dir->i_ino, old_dir->i_nlink, retval); > } > > if (new_inode) { > drop_nlink(new_inode); > new_inode->i_ctime = ((struct timespec) { get_seconds(), 0 }); > } > old_dir->i_ctime = old_dir->i_mtime = ((struct timespec) { get_seconds(), 0 }); > ext3_update_dx_flag(old_dir); > if (dir_bh) { > do {} while (0); > __ext3_journal_get_write_access((__func__), (handle), (dir_bh)); > (ext3_next_entry((struct ext3_dir_entry_2 *)(dir_bh->b_data))->inode) = (( __le32)(__u32)(new_dir->i_ino)); > do {} while (0); > __ext3_journal_dirty_metadata((__func__), (handle), (dir_bh)); > drop_nlink(old_dir); > if (new_inode) { > drop_nlink(new_inode); > } else { > inc_nlink(new_dir); > ext3_update_dx_flag(new_dir); > ext3_mark_inode_dirty(handle, new_dir); > } > } > ext3_mark_inode_dirty(handle, old_dir); > if (new_inode) { > ext3_mark_inode_dirty(handle, new_inode); > if (!new_inode->i_nlink) > ext3_orphan_add(handle, new_inode); > } > retval = 0; > >end_rename: > brelse (dir_bh); > brelse (old_bh); > brelse (new_bh); > __ext3_journal_stop((__func__), (handle)); > return retval; >} > > > > >const struct inode_operations ext3_dir_inode_operations = { > .create = ext3_create, > .lookup = ext3_lookup, > .link = ext3_link, > .unlink = ext3_unlink, > .symlink = ext3_symlink, > .mkdir = ext3_mkdir, > .rmdir = ext3_rmdir, > .mknod = ext3_mknod, > .rename = ext3_rename, > .setattr = ext3_setattr, > > .setxattr = generic_setxattr, > .getxattr = generic_getxattr, > .listxattr = ext3_listxattr, > .removexattr = generic_removexattr, > > .permission = ext3_permission, >}; > >const struct inode_operations ext3_special_inode_operations = { > .setattr = ext3_setattr, > > .setxattr = generic_setxattr, > .getxattr = generic_getxattr, > .listxattr = ext3_listxattr, > .removexattr = generic_removexattr, > > .permission = ext3_permission, >};
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 451068
:
309103
|
309105
|
309106
| 309166 |
309167
|
309168