diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-26 11:48:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-26 11:48:49 -0400 |
commit | c3cc99ff5d24e2eeaf7ec2032e720681916990e3 (patch) | |
tree | c3e74171bbbd2adde9d60b9db1c440415c8d2831 /include/linux | |
parent | 38ffbe66d59051fd9cfcfc8545f164700e2fa3bc (diff) | |
parent | 024e8ac04453b3525448c31ef39848cf675ba6db (diff) |
Merge branch 'linus' into x86/xen
Diffstat (limited to 'include/linux')
117 files changed, 1448 insertions, 824 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 71d70d1fbce2..4c4142c5aa6e 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -189,7 +189,6 @@ unifdef-y += connector.h | |||
189 | unifdef-y += cuda.h | 189 | unifdef-y += cuda.h |
190 | unifdef-y += cyclades.h | 190 | unifdef-y += cyclades.h |
191 | unifdef-y += dccp.h | 191 | unifdef-y += dccp.h |
192 | unifdef-y += dirent.h | ||
193 | unifdef-y += dlm.h | 192 | unifdef-y += dlm.h |
194 | unifdef-y += dlm_plock.h | 193 | unifdef-y += dlm_plock.h |
195 | unifdef-y += edd.h | 194 | unifdef-y += edd.h |
@@ -256,7 +255,9 @@ unifdef-y += kd.h | |||
256 | unifdef-y += kernelcapi.h | 255 | unifdef-y += kernelcapi.h |
257 | unifdef-y += kernel.h | 256 | unifdef-y += kernel.h |
258 | unifdef-y += keyboard.h | 257 | unifdef-y += keyboard.h |
258 | ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/kvm.h),) | ||
259 | unifdef-y += kvm.h | 259 | unifdef-y += kvm.h |
260 | endif | ||
260 | unifdef-y += llc.h | 261 | unifdef-y += llc.h |
261 | unifdef-y += loop.h | 262 | unifdef-y += loop.h |
262 | unifdef-y += lp.h | 263 | unifdef-y += lp.h |
diff --git a/include/linux/acct.h b/include/linux/acct.h index e8cae54e8d88..882dc7248766 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -120,17 +120,20 @@ struct acct_v3 | |||
120 | struct vfsmount; | 120 | struct vfsmount; |
121 | struct super_block; | 121 | struct super_block; |
122 | struct pacct_struct; | 122 | struct pacct_struct; |
123 | struct pid_namespace; | ||
123 | extern void acct_auto_close_mnt(struct vfsmount *m); | 124 | extern void acct_auto_close_mnt(struct vfsmount *m); |
124 | extern void acct_auto_close(struct super_block *sb); | 125 | extern void acct_auto_close(struct super_block *sb); |
125 | extern void acct_init_pacct(struct pacct_struct *pacct); | 126 | extern void acct_init_pacct(struct pacct_struct *pacct); |
126 | extern void acct_collect(long exitcode, int group_dead); | 127 | extern void acct_collect(long exitcode, int group_dead); |
127 | extern void acct_process(void); | 128 | extern void acct_process(void); |
129 | extern void acct_exit_ns(struct pid_namespace *); | ||
128 | #else | 130 | #else |
129 | #define acct_auto_close_mnt(x) do { } while (0) | 131 | #define acct_auto_close_mnt(x) do { } while (0) |
130 | #define acct_auto_close(x) do { } while (0) | 132 | #define acct_auto_close(x) do { } while (0) |
131 | #define acct_init_pacct(x) do { } while (0) | 133 | #define acct_init_pacct(x) do { } while (0) |
132 | #define acct_collect(x,y) do { } while (0) | 134 | #define acct_collect(x,y) do { } while (0) |
133 | #define acct_process() do { } while (0) | 135 | #define acct_process() do { } while (0) |
136 | #define acct_exit_ns(ns) do { } while (0) | ||
134 | #endif | 137 | #endif |
135 | 138 | ||
136 | /* | 139 | /* |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index a17177639376..702f79dad16a 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -236,6 +236,7 @@ int acpi_check_mem_region(resource_size_t start, resource_size_t n, | |||
236 | const char *name); | 236 | const char *name); |
237 | 237 | ||
238 | #ifdef CONFIG_PM_SLEEP | 238 | #ifdef CONFIG_PM_SLEEP |
239 | void __init acpi_no_s4_hw_signature(void); | ||
239 | void __init acpi_old_suspend_ordering(void); | 240 | void __init acpi_old_suspend_ordering(void); |
240 | #endif /* CONFIG_PM_SLEEP */ | 241 | #endif /* CONFIG_PM_SLEEP */ |
241 | #else /* CONFIG_ACPI */ | 242 | #else /* CONFIG_ACPI */ |
diff --git a/include/linux/anon_inodes.h b/include/linux/anon_inodes.h index 6129e58ca7c9..e0a0cdc2da43 100644 --- a/include/linux/anon_inodes.h +++ b/include/linux/anon_inodes.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define _LINUX_ANON_INODES_H | 9 | #define _LINUX_ANON_INODES_H |
10 | 10 | ||
11 | int anon_inode_getfd(const char *name, const struct file_operations *fops, | 11 | int anon_inode_getfd(const char *name, const struct file_operations *fops, |
12 | void *priv); | 12 | void *priv, int flags); |
13 | 13 | ||
14 | #endif /* _LINUX_ANON_INODES_H */ | 14 | #endif /* _LINUX_ANON_INODES_H */ |
15 | 15 | ||
diff --git a/include/linux/atmel-pwm-bl.h b/include/linux/atmel-pwm-bl.h new file mode 100644 index 000000000000..0153a47806c2 --- /dev/null +++ b/include/linux/atmel-pwm-bl.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Atmel Corporation | ||
3 | * | ||
4 | * Driver for the AT32AP700X PS/2 controller (PSIF). | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __INCLUDE_ATMEL_PWM_BL_H | ||
12 | #define __INCLUDE_ATMEL_PWM_BL_H | ||
13 | |||
14 | /** | ||
15 | * struct atmel_pwm_bl_platform_data | ||
16 | * @pwm_channel: which PWM channel in the PWM module to use. | ||
17 | * @pwm_frequency: PWM frequency to generate, the driver will try to be as | ||
18 | * close as the prescaler allows. | ||
19 | * @pwm_compare_max: value to use in the PWM channel compare register. | ||
20 | * @pwm_duty_max: maximum duty cycle value, must be less than or equal to | ||
21 | * pwm_compare_max. | ||
22 | * @pwm_duty_min: minimum duty cycle value, must be less than pwm_duty_max. | ||
23 | * @pwm_active_low: set to one if the low part of the PWM signal increases the | ||
24 | * brightness of the backlight. | ||
25 | * @gpio_on: GPIO line to control the backlight on/off, set to -1 if not used. | ||
26 | * @on_active_low: set to one if the on/off signal is on when GPIO is low. | ||
27 | * | ||
28 | * This struct must be added to the platform device in the board code. It is | ||
29 | * used by the atmel-pwm-bl driver to setup the GPIO to control on/off and the | ||
30 | * PWM device. | ||
31 | */ | ||
32 | struct atmel_pwm_bl_platform_data { | ||
33 | unsigned int pwm_channel; | ||
34 | unsigned int pwm_frequency; | ||
35 | unsigned int pwm_compare_max; | ||
36 | unsigned int pwm_duty_max; | ||
37 | unsigned int pwm_duty_min; | ||
38 | unsigned int pwm_active_low; | ||
39 | int gpio_on; | ||
40 | unsigned int on_active_low; | ||
41 | }; | ||
42 | |||
43 | #endif /* __INCLUDE_ATMEL_PWM_BL_H */ | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 8b82974bdc12..6272a395d43c 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -286,7 +286,6 @@ | |||
286 | #define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 286 | #define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
287 | #define AUDIT_ARCH_SPARC (EM_SPARC) | 287 | #define AUDIT_ARCH_SPARC (EM_SPARC) |
288 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT) | 288 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT) |
289 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) | ||
290 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 289 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
291 | 290 | ||
292 | #define AUDIT_PERM_EXEC 1 | 291 | #define AUDIT_PERM_EXEC 1 |
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index 31a29541b504..b785c6f8644d 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
@@ -98,8 +98,6 @@ union autofs_v5_packet_union { | |||
98 | #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI | 98 | #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI |
99 | #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI | 99 | #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI |
100 | #define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int) | 100 | #define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int) |
101 | #define AUTOFS_IOC_ASKREGHOST _IOR(0x93,0x68,int) | ||
102 | #define AUTOFS_IOC_TOGGLEREGHOST _IOR(0x93,0x69,int) | ||
103 | #define AUTOFS_IOC_ASKUMOUNT _IOR(0x93,0x70,int) | 101 | #define AUTOFS_IOC_ASKUMOUNT _IOR(0x93,0x70,int) |
104 | 102 | ||
105 | 103 | ||
diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h index 0da17d14fd13..d7afa9dd6635 100644 --- a/include/linux/auxvec.h +++ b/include/linux/auxvec.h | |||
@@ -26,9 +26,13 @@ | |||
26 | 26 | ||
27 | #define AT_SECURE 23 /* secure mode boolean */ | 27 | #define AT_SECURE 23 /* secure mode boolean */ |
28 | 28 | ||
29 | #define AT_BASE_PLATFORM 24 /* string identifying real platform, may | ||
30 | * differ from AT_PLATFORM. */ | ||
31 | |||
29 | #define AT_EXECFN 31 /* filename of program */ | 32 | #define AT_EXECFN 31 /* filename of program */ |
33 | |||
30 | #ifdef __KERNEL__ | 34 | #ifdef __KERNEL__ |
31 | #define AT_VECTOR_SIZE_BASE 17 /* NEW_AUX_ENT entries in auxiliary table */ | 35 | #define AT_VECTOR_SIZE_BASE 18 /* NEW_AUX_ENT entries in auxiliary table */ |
32 | /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */ | 36 | /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */ |
33 | #endif | 37 | #endif |
34 | 38 | ||
diff --git a/include/linux/bcd.h b/include/linux/bcd.h index c545308125b0..7ac518e3c152 100644 --- a/include/linux/bcd.h +++ b/include/linux/bcd.h | |||
@@ -10,8 +10,13 @@ | |||
10 | #ifndef _BCD_H | 10 | #ifndef _BCD_H |
11 | #define _BCD_H | 11 | #define _BCD_H |
12 | 12 | ||
13 | #define BCD2BIN(val) (((val) & 0x0f) + ((val)>>4)*10) | 13 | #include <linux/compiler.h> |
14 | #define BIN2BCD(val) ((((val)/10)<<4) + (val)%10) | 14 | |
15 | unsigned bcd2bin(unsigned char val) __attribute_const__; | ||
16 | unsigned char bin2bcd(unsigned val) __attribute_const__; | ||
17 | |||
18 | #define BCD2BIN(val) bcd2bin(val) | ||
19 | #define BIN2BCD(val) bin2bcd(val) | ||
15 | 20 | ||
16 | /* backwards compat */ | 21 | /* backwards compat */ |
17 | #define BCD_TO_BIN(val) ((val)=BCD2BIN(val)) | 22 | #define BCD_TO_BIN(val) ((val)=BCD2BIN(val)) |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index ee0ed48e8348..826f62350805 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -38,7 +38,7 @@ struct linux_binprm{ | |||
38 | misc_bang:1; | 38 | misc_bang:1; |
39 | struct file * file; | 39 | struct file * file; |
40 | int e_uid, e_gid; | 40 | int e_uid, e_gid; |
41 | kernel_cap_t cap_inheritable, cap_permitted; | 41 | kernel_cap_t cap_post_exec_permitted; |
42 | bool cap_effective; | 42 | bool cap_effective; |
43 | void *security; | 43 | void *security; |
44 | int argc, envc; | 44 | int argc, envc; |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index a1d9b79078ea..652470b687c9 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -28,52 +28,73 @@ extern unsigned long saved_max_pfn; | |||
28 | * memory pages (including holes) on the node. | 28 | * memory pages (including holes) on the node. |
29 | */ | 29 | */ |
30 | typedef struct bootmem_data { | 30 | typedef struct bootmem_data { |
31 | unsigned long node_boot_start; | 31 | unsigned long node_min_pfn; |
32 | unsigned long node_low_pfn; | 32 | unsigned long node_low_pfn; |
33 | void *node_bootmem_map; | 33 | void *node_bootmem_map; |
34 | unsigned long last_offset; | 34 | unsigned long last_end_off; |
35 | unsigned long last_pos; | 35 | unsigned long hint_idx; |
36 | unsigned long last_success; /* Previous allocation point. To speed | ||
37 | * up searching */ | ||
38 | struct list_head list; | 36 | struct list_head list; |
39 | } bootmem_data_t; | 37 | } bootmem_data_t; |
40 | 38 | ||
39 | extern bootmem_data_t bootmem_node_data[]; | ||
40 | |||
41 | extern unsigned long bootmem_bootmap_pages(unsigned long); | 41 | extern unsigned long bootmem_bootmap_pages(unsigned long); |
42 | |||
43 | extern unsigned long init_bootmem_node(pg_data_t *pgdat, | ||
44 | unsigned long freepfn, | ||
45 | unsigned long startpfn, | ||
46 | unsigned long endpfn); | ||
42 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); | 47 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); |
48 | |||
49 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); | ||
50 | extern unsigned long free_all_bootmem(void); | ||
51 | |||
52 | extern void free_bootmem_node(pg_data_t *pgdat, | ||
53 | unsigned long addr, | ||
54 | unsigned long size); | ||
43 | extern void free_bootmem(unsigned long addr, unsigned long size); | 55 | extern void free_bootmem(unsigned long addr, unsigned long size); |
44 | extern void *__alloc_bootmem(unsigned long size, | 56 | |
57 | /* | ||
58 | * Flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE, | ||
59 | * the architecture-specific code should honor this). | ||
60 | * | ||
61 | * If flags is 0, then the return value is always 0 (success). If | ||
62 | * flags contains BOOTMEM_EXCLUSIVE, then -EBUSY is returned if the | ||
63 | * memory already was reserved. | ||
64 | */ | ||
65 | #define BOOTMEM_DEFAULT 0 | ||
66 | #define BOOTMEM_EXCLUSIVE (1<<0) | ||
67 | |||
68 | extern int reserve_bootmem_node(pg_data_t *pgdat, | ||
69 | unsigned long physaddr, | ||
70 | unsigned long size, | ||
71 | int flags); | ||
72 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | ||
73 | extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags); | ||
74 | #endif | ||
75 | |||
76 | extern void *__alloc_bootmem_nopanic(unsigned long size, | ||
45 | unsigned long align, | 77 | unsigned long align, |
46 | unsigned long goal); | 78 | unsigned long goal); |
47 | extern void *__alloc_bootmem_nopanic(unsigned long size, | 79 | extern void *__alloc_bootmem(unsigned long size, |
48 | unsigned long align, | 80 | unsigned long align, |
49 | unsigned long goal); | 81 | unsigned long goal); |
50 | extern void *__alloc_bootmem_low(unsigned long size, | 82 | extern void *__alloc_bootmem_low(unsigned long size, |
51 | unsigned long align, | 83 | unsigned long align, |
52 | unsigned long goal); | 84 | unsigned long goal); |
85 | extern void *__alloc_bootmem_node(pg_data_t *pgdat, | ||
86 | unsigned long size, | ||
87 | unsigned long align, | ||
88 | unsigned long goal); | ||
89 | extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat, | ||
90 | unsigned long size, | ||
91 | unsigned long align, | ||
92 | unsigned long goal); | ||
53 | extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | 93 | extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, |
54 | unsigned long size, | 94 | unsigned long size, |
55 | unsigned long align, | 95 | unsigned long align, |
56 | unsigned long goal); | 96 | unsigned long goal); |
57 | extern void *__alloc_bootmem_core(struct bootmem_data *bdata, | ||
58 | unsigned long size, | ||
59 | unsigned long align, | ||
60 | unsigned long goal, | ||
61 | unsigned long limit); | ||
62 | |||
63 | /* | ||
64 | * flags for reserve_bootmem (also if CONFIG_HAVE_ARCH_BOOTMEM_NODE, | ||
65 | * the architecture-specific code should honor this) | ||
66 | */ | ||
67 | #define BOOTMEM_DEFAULT 0 | ||
68 | #define BOOTMEM_EXCLUSIVE (1<<0) | ||
69 | |||
70 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 97 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE |
71 | /* | ||
72 | * If flags is 0, then the return value is always 0 (success). If | ||
73 | * flags contains BOOTMEM_EXCLUSIVE, then -EBUSY is returned if the | ||
74 | * memory already was reserved. | ||
75 | */ | ||
76 | extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags); | ||
77 | #define alloc_bootmem(x) \ | 98 | #define alloc_bootmem(x) \ |
78 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 99 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
79 | #define alloc_bootmem_low(x) \ | 100 | #define alloc_bootmem_low(x) \ |
@@ -82,31 +103,6 @@ extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags); | |||
82 | __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 103 | __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
83 | #define alloc_bootmem_low_pages(x) \ | 104 | #define alloc_bootmem_low_pages(x) \ |
84 | __alloc_bootmem_low(x, PAGE_SIZE, 0) | 105 | __alloc_bootmem_low(x, PAGE_SIZE, 0) |
85 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | ||
86 | |||
87 | extern int reserve_bootmem_generic(unsigned long addr, unsigned long size, | ||
88 | int flags); | ||
89 | extern unsigned long free_all_bootmem(void); | ||
90 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); | ||
91 | extern void *__alloc_bootmem_node(pg_data_t *pgdat, | ||
92 | unsigned long size, | ||
93 | unsigned long align, | ||
94 | unsigned long goal); | ||
95 | extern unsigned long init_bootmem_node(pg_data_t *pgdat, | ||
96 | unsigned long freepfn, | ||
97 | unsigned long startpfn, | ||
98 | unsigned long endpfn); | ||
99 | extern int reserve_bootmem_node(pg_data_t *pgdat, | ||
100 | unsigned long physaddr, | ||
101 | unsigned long size, | ||
102 | int flags); | ||
103 | extern void free_bootmem_node(pg_data_t *pgdat, | ||
104 | unsigned long addr, | ||
105 | unsigned long size); | ||
106 | extern void *alloc_bootmem_section(unsigned long size, | ||
107 | unsigned long section_nr); | ||
108 | |||
109 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | ||
110 | #define alloc_bootmem_node(pgdat, x) \ | 106 | #define alloc_bootmem_node(pgdat, x) \ |
111 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 107 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
112 | #define alloc_bootmem_pages_node(pgdat, x) \ | 108 | #define alloc_bootmem_pages_node(pgdat, x) \ |
@@ -115,6 +111,12 @@ extern void *alloc_bootmem_section(unsigned long size, | |||
115 | __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) | 111 | __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) |
116 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | 112 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ |
117 | 113 | ||
114 | extern int reserve_bootmem_generic(unsigned long addr, unsigned long size, | ||
115 | int flags); | ||
116 | |||
117 | extern void *alloc_bootmem_section(unsigned long size, | ||
118 | unsigned long section_nr); | ||
119 | |||
118 | #ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP | 120 | #ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP |
119 | extern void *alloc_remap(int nid, unsigned long size); | 121 | extern void *alloc_remap(int nid, unsigned long size); |
120 | #else | 122 | #else |
diff --git a/include/linux/byteorder/big_endian.h b/include/linux/byteorder/big_endian.h index 961ed4b48d8e..44f95b92393b 100644 --- a/include/linux/byteorder/big_endian.h +++ b/include/linux/byteorder/big_endian.h | |||
@@ -94,12 +94,12 @@ static inline __u16 __be16_to_cpup(const __be16 *p) | |||
94 | #define __le32_to_cpus(x) __swab32s((x)) | 94 | #define __le32_to_cpus(x) __swab32s((x)) |
95 | #define __cpu_to_le16s(x) __swab16s((x)) | 95 | #define __cpu_to_le16s(x) __swab16s((x)) |
96 | #define __le16_to_cpus(x) __swab16s((x)) | 96 | #define __le16_to_cpus(x) __swab16s((x)) |
97 | #define __cpu_to_be64s(x) do {} while (0) | 97 | #define __cpu_to_be64s(x) do { (void)(x); } while (0) |
98 | #define __be64_to_cpus(x) do {} while (0) | 98 | #define __be64_to_cpus(x) do { (void)(x); } while (0) |
99 | #define __cpu_to_be32s(x) do {} while (0) | 99 | #define __cpu_to_be32s(x) do { (void)(x); } while (0) |
100 | #define __be32_to_cpus(x) do {} while (0) | 100 | #define __be32_to_cpus(x) do { (void)(x); } while (0) |
101 | #define __cpu_to_be16s(x) do {} while (0) | 101 | #define __cpu_to_be16s(x) do { (void)(x); } while (0) |
102 | #define __be16_to_cpus(x) do {} while (0) | 102 | #define __be16_to_cpus(x) do { (void)(x); } while (0) |
103 | 103 | ||
104 | #ifdef __KERNEL__ | 104 | #ifdef __KERNEL__ |
105 | #include <linux/byteorder/generic.h> | 105 | #include <linux/byteorder/generic.h> |
diff --git a/include/linux/byteorder/little_endian.h b/include/linux/byteorder/little_endian.h index 05dc7c35b3b2..4cc170a31762 100644 --- a/include/linux/byteorder/little_endian.h +++ b/include/linux/byteorder/little_endian.h | |||
@@ -88,12 +88,12 @@ static inline __u16 __be16_to_cpup(const __be16 *p) | |||
88 | { | 88 | { |
89 | return __swab16p((__u16 *)p); | 89 | return __swab16p((__u16 *)p); |
90 | } | 90 | } |
91 | #define __cpu_to_le64s(x) do {} while (0) | 91 | #define __cpu_to_le64s(x) do { (void)(x); } while (0) |
92 | #define __le64_to_cpus(x) do {} while (0) | 92 | #define __le64_to_cpus(x) do { (void)(x); } while (0) |
93 | #define __cpu_to_le32s(x) do {} while (0) | 93 | #define __cpu_to_le32s(x) do { (void)(x); } while (0) |
94 | #define __le32_to_cpus(x) do {} while (0) | 94 | #define __le32_to_cpus(x) do { (void)(x); } while (0) |
95 | #define __cpu_to_le16s(x) do {} while (0) | 95 | #define __cpu_to_le16s(x) do { (void)(x); } while (0) |
96 | #define __le16_to_cpus(x) do {} while (0) | 96 | #define __le16_to_cpus(x) do { (void)(x); } while (0) |
97 | #define __cpu_to_be64s(x) __swab64s((x)) | 97 | #define __cpu_to_be64s(x) __swab64s((x)) |
98 | #define __be64_to_cpus(x) __swab64s((x)) | 98 | #define __be64_to_cpus(x) __swab64s((x)) |
99 | #define __cpu_to_be32s(x) __swab32s((x)) | 99 | #define __cpu_to_be32s(x) __swab32s((x)) |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e155aa78d859..c98dd7cb7076 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -21,11 +21,13 @@ | |||
21 | struct cgroupfs_root; | 21 | struct cgroupfs_root; |
22 | struct cgroup_subsys; | 22 | struct cgroup_subsys; |
23 | struct inode; | 23 | struct inode; |
24 | struct cgroup; | ||
24 | 25 | ||
25 | extern int cgroup_init_early(void); | 26 | extern int cgroup_init_early(void); |
26 | extern int cgroup_init(void); | 27 | extern int cgroup_init(void); |
27 | extern void cgroup_init_smp(void); | 28 | extern void cgroup_init_smp(void); |
28 | extern void cgroup_lock(void); | 29 | extern void cgroup_lock(void); |
30 | extern bool cgroup_lock_live_group(struct cgroup *cgrp); | ||
29 | extern void cgroup_unlock(void); | 31 | extern void cgroup_unlock(void); |
30 | extern void cgroup_fork(struct task_struct *p); | 32 | extern void cgroup_fork(struct task_struct *p); |
31 | extern void cgroup_fork_callbacks(struct task_struct *p); | 33 | extern void cgroup_fork_callbacks(struct task_struct *p); |
@@ -205,50 +207,64 @@ struct cftype { | |||
205 | * subsystem, followed by a period */ | 207 | * subsystem, followed by a period */ |
206 | char name[MAX_CFTYPE_NAME]; | 208 | char name[MAX_CFTYPE_NAME]; |
207 | int private; | 209 | int private; |
208 | int (*open) (struct inode *inode, struct file *file); | 210 | |
209 | ssize_t (*read) (struct cgroup *cgrp, struct cftype *cft, | 211 | /* |
210 | struct file *file, | 212 | * If non-zero, defines the maximum length of string that can |
211 | char __user *buf, size_t nbytes, loff_t *ppos); | 213 | * be passed to write_string; defaults to 64 |
214 | */ | ||
215 | size_t max_write_len; | ||
216 | |||
217 | int (*open)(struct inode *inode, struct file *file); | ||
218 | ssize_t (*read)(struct cgroup *cgrp, struct cftype *cft, | ||
219 | struct file *file, | ||
220 | char __user *buf, size_t nbytes, loff_t *ppos); | ||
212 | /* | 221 | /* |
213 | * read_u64() is a shortcut for the common case of returning a | 222 | * read_u64() is a shortcut for the common case of returning a |
214 | * single integer. Use it in place of read() | 223 | * single integer. Use it in place of read() |
215 | */ | 224 | */ |
216 | u64 (*read_u64) (struct cgroup *cgrp, struct cftype *cft); | 225 | u64 (*read_u64)(struct cgroup *cgrp, struct cftype *cft); |
217 | /* | 226 | /* |
218 | * read_s64() is a signed version of read_u64() | 227 | * read_s64() is a signed version of read_u64() |
219 | */ | 228 | */ |
220 | s64 (*read_s64) (struct cgroup *cgrp, struct cftype *cft); | 229 | s64 (*read_s64)(struct cgroup *cgrp, struct cftype *cft); |
221 | /* | 230 | /* |
222 | * read_map() is used for defining a map of key/value | 231 | * read_map() is used for defining a map of key/value |
223 | * pairs. It should call cb->fill(cb, key, value) for each | 232 | * pairs. It should call cb->fill(cb, key, value) for each |
224 | * entry. The key/value pairs (and their ordering) should not | 233 | * entry. The key/value pairs (and their ordering) should not |
225 | * change between reboots. | 234 | * change between reboots. |
226 | */ | 235 | */ |
227 | int (*read_map) (struct cgroup *cont, struct cftype *cft, | 236 | int (*read_map)(struct cgroup *cont, struct cftype *cft, |
228 | struct cgroup_map_cb *cb); | 237 | struct cgroup_map_cb *cb); |
229 | /* | 238 | /* |
230 | * read_seq_string() is used for outputting a simple sequence | 239 | * read_seq_string() is used for outputting a simple sequence |
231 | * using seqfile. | 240 | * using seqfile. |
232 | */ | 241 | */ |
233 | int (*read_seq_string) (struct cgroup *cont, struct cftype *cft, | 242 | int (*read_seq_string)(struct cgroup *cont, struct cftype *cft, |
234 | struct seq_file *m); | 243 | struct seq_file *m); |
235 | 244 | ||
236 | ssize_t (*write) (struct cgroup *cgrp, struct cftype *cft, | 245 | ssize_t (*write)(struct cgroup *cgrp, struct cftype *cft, |
237 | struct file *file, | 246 | struct file *file, |
238 | const char __user *buf, size_t nbytes, loff_t *ppos); | 247 | const char __user *buf, size_t nbytes, loff_t *ppos); |
239 | 248 | ||
240 | /* | 249 | /* |
241 | * write_u64() is a shortcut for the common case of accepting | 250 | * write_u64() is a shortcut for the common case of accepting |
242 | * a single integer (as parsed by simple_strtoull) from | 251 | * a single integer (as parsed by simple_strtoull) from |
243 | * userspace. Use in place of write(); return 0 or error. | 252 | * userspace. Use in place of write(); return 0 or error. |
244 | */ | 253 | */ |
245 | int (*write_u64) (struct cgroup *cgrp, struct cftype *cft, u64 val); | 254 | int (*write_u64)(struct cgroup *cgrp, struct cftype *cft, u64 val); |
246 | /* | 255 | /* |
247 | * write_s64() is a signed version of write_u64() | 256 | * write_s64() is a signed version of write_u64() |
248 | */ | 257 | */ |
249 | int (*write_s64) (struct cgroup *cgrp, struct cftype *cft, s64 val); | 258 | int (*write_s64)(struct cgroup *cgrp, struct cftype *cft, s64 val); |
250 | 259 | ||
251 | /* | 260 | /* |
261 | * write_string() is passed a nul-terminated kernelspace | ||
262 | * buffer of maximum length determined by max_write_len. | ||
263 | * Returns 0 or -ve error code. | ||
264 | */ | ||
265 | int (*write_string)(struct cgroup *cgrp, struct cftype *cft, | ||
266 | const char *buffer); | ||
267 | /* | ||
252 | * trigger() callback can be used to get some kick from the | 268 | * trigger() callback can be used to get some kick from the |
253 | * userspace, when the actual string written is not important | 269 | * userspace, when the actual string written is not important |
254 | * at all. The private field can be used to determine the | 270 | * at all. The private field can be used to determine the |
@@ -256,7 +272,7 @@ struct cftype { | |||
256 | */ | 272 | */ |
257 | int (*trigger)(struct cgroup *cgrp, unsigned int event); | 273 | int (*trigger)(struct cgroup *cgrp, unsigned int event); |
258 | 274 | ||
259 | int (*release) (struct inode *inode, struct file *file); | 275 | int (*release)(struct inode *inode, struct file *file); |
260 | }; | 276 | }; |
261 | 277 | ||
262 | struct cgroup_scanner { | 278 | struct cgroup_scanner { |
@@ -348,7 +364,8 @@ static inline struct cgroup* task_cgroup(struct task_struct *task, | |||
348 | return task_subsys_state(task, subsys_id)->cgroup; | 364 | return task_subsys_state(task, subsys_id)->cgroup; |
349 | } | 365 | } |
350 | 366 | ||
351 | int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss); | 367 | int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *ss, |
368 | char *nodename); | ||
352 | 369 | ||
353 | /* A cgroup_iter should be treated as an opaque object */ | 370 | /* A cgroup_iter should be treated as an opaque object */ |
354 | struct cgroup_iter { | 371 | struct cgroup_iter { |
diff --git a/include/linux/coda.h b/include/linux/coda.h index b5cf0780c51a..96c87693800b 100644 --- a/include/linux/coda.h +++ b/include/linux/coda.h | |||
@@ -199,28 +199,6 @@ typedef u_int32_t vuid_t; | |||
199 | typedef u_int32_t vgid_t; | 199 | typedef u_int32_t vgid_t; |
200 | #endif /*_VUID_T_ */ | 200 | #endif /*_VUID_T_ */ |
201 | 201 | ||
202 | #ifdef CONFIG_CODA_FS_OLD_API | ||
203 | struct CodaFid { | ||
204 | u_int32_t opaque[3]; | ||
205 | }; | ||
206 | |||
207 | static __inline__ ino_t coda_f2i(struct CodaFid *fid) | ||
208 | { | ||
209 | if ( ! fid ) | ||
210 | return 0; | ||
211 | if (fid->opaque[1] == 0xfffffffe || fid->opaque[1] == 0xffffffff) | ||
212 | return ((fid->opaque[0] << 20) | (fid->opaque[2] & 0xfffff)); | ||
213 | else | ||
214 | return (fid->opaque[2] + (fid->opaque[1]<<10) + (fid->opaque[0]<<20)); | ||
215 | } | ||
216 | |||
217 | struct coda_cred { | ||
218 | vuid_t cr_uid, cr_euid, cr_suid, cr_fsuid; /* Real, efftve, set, fs uid*/ | ||
219 | vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */ | ||
220 | }; | ||
221 | |||
222 | #else /* not defined(CONFIG_CODA_FS_OLD_API) */ | ||
223 | |||
224 | struct CodaFid { | 202 | struct CodaFid { |
225 | u_int32_t opaque[4]; | 203 | u_int32_t opaque[4]; |
226 | }; | 204 | }; |
@@ -228,8 +206,6 @@ struct CodaFid { | |||
228 | #define coda_f2i(fid)\ | 206 | #define coda_f2i(fid)\ |
229 | (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0) | 207 | (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0) |
230 | 208 | ||
231 | #endif | ||
232 | |||
233 | #ifndef _VENUS_VATTR_T_ | 209 | #ifndef _VENUS_VATTR_T_ |
234 | #define _VENUS_VATTR_T_ | 210 | #define _VENUS_VATTR_T_ |
235 | /* | 211 | /* |
@@ -313,15 +289,7 @@ struct coda_statfs { | |||
313 | 289 | ||
314 | #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t) | 290 | #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t) |
315 | 291 | ||
316 | #if 0 | ||
317 | #define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */ | ||
318 | #define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */ | ||
319 | #endif | ||
320 | #ifdef CONFIG_CODA_FS_OLD_API | ||
321 | #define CODA_KERNEL_VERSION 2 /* venus_lookup got an extra parameter */ | ||
322 | #else | ||
323 | #define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ | 292 | #define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ |
324 | #endif | ||
325 | 293 | ||
326 | /* | 294 | /* |
327 | * Venus <-> Coda RPC arguments | 295 | * Venus <-> Coda RPC arguments |
@@ -329,16 +297,9 @@ struct coda_statfs { | |||
329 | struct coda_in_hdr { | 297 | struct coda_in_hdr { |
330 | u_int32_t opcode; | 298 | u_int32_t opcode; |
331 | u_int32_t unique; /* Keep multiple outstanding msgs distinct */ | 299 | u_int32_t unique; /* Keep multiple outstanding msgs distinct */ |
332 | #ifdef CONFIG_CODA_FS_OLD_API | ||
333 | u_int16_t pid; /* Common to all */ | ||
334 | u_int16_t pgid; /* Common to all */ | ||
335 | u_int16_t sid; /* Common to all */ | ||
336 | struct coda_cred cred; /* Common to all */ | ||
337 | #else | ||
338 | pid_t pid; | 300 | pid_t pid; |
339 | pid_t pgid; | 301 | pid_t pgid; |
340 | vuid_t uid; | 302 | vuid_t uid; |
341 | #endif | ||
342 | }; | 303 | }; |
343 | 304 | ||
344 | /* Really important that opcode and unique are 1st two fields! */ | 305 | /* Really important that opcode and unique are 1st two fields! */ |
@@ -613,11 +574,7 @@ struct coda_vget_out { | |||
613 | /* CODA_PURGEUSER is a venus->kernel call */ | 574 | /* CODA_PURGEUSER is a venus->kernel call */ |
614 | struct coda_purgeuser_out { | 575 | struct coda_purgeuser_out { |
615 | struct coda_out_hdr oh; | 576 | struct coda_out_hdr oh; |
616 | #ifdef CONFIG_CODA_FS_OLD_API | ||
617 | struct coda_cred cred; | ||
618 | #else | ||
619 | vuid_t uid; | 577 | vuid_t uid; |
620 | #endif | ||
621 | }; | 578 | }; |
622 | 579 | ||
623 | /* coda_zapfile: */ | 580 | /* coda_zapfile: */ |
diff --git a/include/linux/consolemap.h b/include/linux/consolemap.h index e2bf7e5db39a..c4811da1338b 100644 --- a/include/linux/consolemap.h +++ b/include/linux/consolemap.h | |||
@@ -3,6 +3,9 @@ | |||
3 | * | 3 | * |
4 | * Interface between console.c, selection.c and consolemap.c | 4 | * Interface between console.c, selection.c and consolemap.c |
5 | */ | 5 | */ |
6 | #ifndef __LINUX_CONSOLEMAP_H__ | ||
7 | #define __LINUX_CONSOLEMAP_H__ | ||
8 | |||
6 | #define LAT1_MAP 0 | 9 | #define LAT1_MAP 0 |
7 | #define GRAF_MAP 1 | 10 | #define GRAF_MAP 1 |
8 | #define IBMPC_MAP 2 | 11 | #define IBMPC_MAP 2 |
@@ -10,6 +13,7 @@ | |||
10 | 13 | ||
11 | #include <linux/types.h> | 14 | #include <linux/types.h> |
12 | 15 | ||
16 | #ifdef CONFIG_CONSOLE_TRANSLATIONS | ||
13 | struct vc_data; | 17 | struct vc_data; |
14 | 18 | ||
15 | extern u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode); | 19 | extern u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode); |
@@ -18,3 +22,13 @@ extern int conv_uni_to_pc(struct vc_data *conp, long ucs); | |||
18 | extern u32 conv_8bit_to_uni(unsigned char c); | 22 | extern u32 conv_8bit_to_uni(unsigned char c); |
19 | extern int conv_uni_to_8bit(u32 uni); | 23 | extern int conv_uni_to_8bit(u32 uni); |
20 | void console_map_init(void); | 24 | void console_map_init(void); |
25 | #else | ||
26 | #define inverse_translate(conp, glyph, uni) ((uint16_t)glyph) | ||
27 | #define set_translate(m, vc) ((unsigned short *)NULL) | ||
28 | #define conv_uni_to_pc(conp, ucs) ((int) (ucs > 0xff ? -1: ucs)) | ||
29 | #define conv_8bit_to_uni(c) ((uint32_t)(c)) | ||
30 | #define conv_uni_to_8bit(c) ((int) ((c) & 0xff)) | ||
31 | #define console_map_init(c) do { ; } while (0) | ||
32 | #endif /* CONFIG_CONSOLE_TRANSLATIONS */ | ||
33 | |||
34 | #endif /* __LINUX_CONSOLEMAP_H__ */ | ||
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 7464ba3b4333..d7faf8808497 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -69,10 +69,11 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) | |||
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | int cpu_up(unsigned int cpu); | 71 | int cpu_up(unsigned int cpu); |
72 | |||
73 | extern void cpu_hotplug_init(void); | 72 | extern void cpu_hotplug_init(void); |
73 | extern void cpu_maps_update_begin(void); | ||
74 | extern void cpu_maps_update_done(void); | ||
74 | 75 | ||
75 | #else | 76 | #else /* CONFIG_SMP */ |
76 | 77 | ||
77 | static inline int register_cpu_notifier(struct notifier_block *nb) | 78 | static inline int register_cpu_notifier(struct notifier_block *nb) |
78 | { | 79 | { |
@@ -87,10 +88,16 @@ static inline void cpu_hotplug_init(void) | |||
87 | { | 88 | { |
88 | } | 89 | } |
89 | 90 | ||
91 | static inline void cpu_maps_update_begin(void) | ||
92 | { | ||
93 | } | ||
94 | |||
95 | static inline void cpu_maps_update_done(void) | ||
96 | { | ||
97 | } | ||
98 | |||
90 | #endif /* CONFIG_SMP */ | 99 | #endif /* CONFIG_SMP */ |
91 | extern struct sysdev_class cpu_sysdev_class; | 100 | extern struct sysdev_class cpu_sysdev_class; |
92 | extern void cpu_maps_update_begin(void); | ||
93 | extern void cpu_maps_update_done(void); | ||
94 | 101 | ||
95 | #ifdef CONFIG_HOTPLUG_CPU | 102 | #ifdef CONFIG_HOTPLUG_CPU |
96 | /* Stop CPUs going up and down. */ | 103 | /* Stop CPUs going up and down. */ |
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 22c7ac5cd80c..6cd39a927e1f 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
@@ -22,5 +22,13 @@ extern struct proc_dir_entry *proc_vmcore; | |||
22 | 22 | ||
23 | #define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) | 23 | #define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) |
24 | 24 | ||
25 | static inline int is_kdump_kernel(void) | ||
26 | { | ||
27 | return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0; | ||
28 | } | ||
29 | #else /* !CONFIG_CRASH_DUMP */ | ||
30 | static inline int is_kdump_kernel(void) { return 0; } | ||
25 | #endif /* CONFIG_CRASH_DUMP */ | 31 | #endif /* CONFIG_CRASH_DUMP */ |
32 | |||
33 | extern unsigned long saved_max_pfn; | ||
26 | #endif /* LINUX_CRASHDUMP_H */ | 34 | #endif /* LINUX_CRASHDUMP_H */ |
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index ab94bc083558..f352f06fa063 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
@@ -39,6 +39,8 @@ extern void __delayacct_blkio_start(void); | |||
39 | extern void __delayacct_blkio_end(void); | 39 | extern void __delayacct_blkio_end(void); |
40 | extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); | 40 | extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); |
41 | extern __u64 __delayacct_blkio_ticks(struct task_struct *); | 41 | extern __u64 __delayacct_blkio_ticks(struct task_struct *); |
42 | extern void __delayacct_freepages_start(void); | ||
43 | extern void __delayacct_freepages_end(void); | ||
42 | 44 | ||
43 | static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) | 45 | static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) |
44 | { | 46 | { |
@@ -107,6 +109,18 @@ static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk) | |||
107 | return 0; | 109 | return 0; |
108 | } | 110 | } |
109 | 111 | ||
112 | static inline void delayacct_freepages_start(void) | ||
113 | { | ||
114 | if (current->delays) | ||
115 | __delayacct_freepages_start(); | ||
116 | } | ||
117 | |||
118 | static inline void delayacct_freepages_end(void) | ||
119 | { | ||
120 | if (current->delays) | ||
121 | __delayacct_freepages_end(); | ||
122 | } | ||
123 | |||
110 | #else | 124 | #else |
111 | static inline void delayacct_set_flag(int flag) | 125 | static inline void delayacct_set_flag(int flag) |
112 | {} | 126 | {} |
@@ -129,6 +143,11 @@ static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk) | |||
129 | { return 0; } | 143 | { return 0; } |
130 | static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) | 144 | static inline int delayacct_is_task_waiting_on_io(struct task_struct *p) |
131 | { return 0; } | 145 | { return 0; } |
146 | static inline void delayacct_freepages_start(void) | ||
147 | {} | ||
148 | static inline void delayacct_freepages_end(void) | ||
149 | {} | ||
150 | |||
132 | #endif /* CONFIG_TASK_DELAY_ACCT */ | 151 | #endif /* CONFIG_TASK_DELAY_ACCT */ |
133 | 152 | ||
134 | #endif | 153 | #endif |
diff --git a/include/linux/dirent.h b/include/linux/dirent.h index 5d6023b87800..f072fb8d10a3 100644 --- a/include/linux/dirent.h +++ b/include/linux/dirent.h | |||
@@ -1,23 +1,6 @@ | |||
1 | #ifndef _LINUX_DIRENT_H | 1 | #ifndef _LINUX_DIRENT_H |
2 | #define _LINUX_DIRENT_H | 2 | #define _LINUX_DIRENT_H |
3 | 3 | ||
4 | struct dirent { | ||
5 | long d_ino; | ||
6 | __kernel_off_t d_off; | ||
7 | unsigned short d_reclen; | ||
8 | char d_name[256]; /* We must not include limits.h! */ | ||
9 | }; | ||
10 | |||
11 | struct dirent64 { | ||
12 | __u64 d_ino; | ||
13 | __s64 d_off; | ||
14 | unsigned short d_reclen; | ||
15 | unsigned char d_type; | ||
16 | char d_name[256]; | ||
17 | }; | ||
18 | |||
19 | #ifdef __KERNEL__ | ||
20 | |||
21 | struct linux_dirent64 { | 4 | struct linux_dirent64 { |
22 | u64 d_ino; | 5 | u64 d_ino; |
23 | s64 d_off; | 6 | s64 d_off; |
@@ -26,7 +9,4 @@ struct linux_dirent64 { | |||
26 | char d_name[0]; | 9 | char d_name[0]; |
27 | }; | 10 | }; |
28 | 11 | ||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | |||
32 | #endif | 12 | #endif |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index a701399b7fed..a667637b54e3 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -10,6 +10,13 @@ | |||
10 | 10 | ||
11 | #ifdef CONFIG_EVENTFD | 11 | #ifdef CONFIG_EVENTFD |
12 | 12 | ||
13 | /* For O_CLOEXEC and O_NONBLOCK */ | ||
14 | #include <linux/fcntl.h> | ||
15 | |||
16 | /* Flags for eventfd2. */ | ||
17 | #define EFD_CLOEXEC O_CLOEXEC | ||
18 | #define EFD_NONBLOCK O_NONBLOCK | ||
19 | |||
13 | struct file *eventfd_fget(int fd); | 20 | struct file *eventfd_fget(int fd); |
14 | int eventfd_signal(struct file *file, int n); | 21 | int eventfd_signal(struct file *file, int n); |
15 | 22 | ||
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index cf79853967ff..f1e1d3c47125 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
@@ -14,8 +14,12 @@ | |||
14 | #ifndef _LINUX_EVENTPOLL_H | 14 | #ifndef _LINUX_EVENTPOLL_H |
15 | #define _LINUX_EVENTPOLL_H | 15 | #define _LINUX_EVENTPOLL_H |
16 | 16 | ||
17 | /* For O_CLOEXEC */ | ||
18 | #include <linux/fcntl.h> | ||
17 | #include <linux/types.h> | 19 | #include <linux/types.h> |
18 | 20 | ||
21 | /* Flags for epoll_create1. */ | ||
22 | #define EPOLL_CLOEXEC O_CLOEXEC | ||
19 | 23 | ||
20 | /* Valid opcodes to issue to sys_epoll_ctl() */ | 24 | /* Valid opcodes to issue to sys_epoll_ctl() */ |
21 | #define EPOLL_CTL_ADD 1 | 25 | #define EPOLL_CTL_ADD 1 |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 84cec2aa9f1e..2efe7b863cff 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -284,8 +284,8 @@ struct ext2_inode { | |||
284 | 284 | ||
285 | #ifdef __hurd__ | 285 | #ifdef __hurd__ |
286 | #define i_translator osd1.hurd1.h_i_translator | 286 | #define i_translator osd1.hurd1.h_i_translator |
287 | #define i_frag osd2.hurd2.h_i_frag; | 287 | #define i_frag osd2.hurd2.h_i_frag |
288 | #define i_fsize osd2.hurd2.h_i_fsize; | 288 | #define i_fsize osd2.hurd2.h_i_fsize |
289 | #define i_uid_high osd2.hurd2.h_i_uid_high | 289 | #define i_uid_high osd2.hurd2.h_i_uid_high |
290 | #define i_gid_high osd2.hurd2.h_i_gid_high | 290 | #define i_gid_high osd2.hurd2.h_i_gid_high |
291 | #define i_author osd2.hurd2.h_i_author | 291 | #define i_author osd2.hurd2.h_i_author |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 36c540396377..80171ee89a22 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -832,6 +832,7 @@ extern void ext3_discard_reservation (struct inode *); | |||
832 | extern void ext3_dirty_inode(struct inode *); | 832 | extern void ext3_dirty_inode(struct inode *); |
833 | extern int ext3_change_inode_journal_flag(struct inode *, int); | 833 | extern int ext3_change_inode_journal_flag(struct inode *, int); |
834 | extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); | 834 | extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); |
835 | extern int ext3_can_truncate(struct inode *inode); | ||
835 | extern void ext3_truncate (struct inode *); | 836 | extern void ext3_truncate (struct inode *); |
836 | extern void ext3_set_inode_flags(struct inode *); | 837 | extern void ext3_set_inode_flags(struct inode *); |
837 | extern void ext3_get_inode_flags(struct ext3_inode_info *); | 838 | extern void ext3_get_inode_flags(struct ext3_inode_info *); |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 72295b099228..3b8870e32afd 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -8,7 +8,6 @@ struct dentry; | |||
8 | 8 | ||
9 | /* Definitions of frame buffers */ | 9 | /* Definitions of frame buffers */ |
10 | 10 | ||
11 | #define FB_MAJOR 29 | ||
12 | #define FB_MAX 32 /* sufficient for now */ | 11 | #define FB_MAX 32 /* sufficient for now */ |
13 | 12 | ||
14 | /* ioctls | 13 | /* ioctls |
@@ -120,6 +119,10 @@ struct dentry; | |||
120 | #define FB_ACCEL_XGI_VOLARI_V 47 /* XGI Volari V3XT, V5, V8 */ | 119 | #define FB_ACCEL_XGI_VOLARI_V 47 /* XGI Volari V3XT, V5, V8 */ |
121 | #define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */ | 120 | #define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */ |
122 | #define FB_ACCEL_OMAP1610 49 /* TI OMAP16xx */ | 121 | #define FB_ACCEL_OMAP1610 49 /* TI OMAP16xx */ |
122 | #define FB_ACCEL_TRIDENT_TGUI 50 /* Trident TGUI */ | ||
123 | #define FB_ACCEL_TRIDENT_3DIMAGE 51 /* Trident 3DImage */ | ||
124 | #define FB_ACCEL_TRIDENT_BLADE3D 52 /* Trident Blade3D */ | ||
125 | #define FB_ACCEL_TRIDENT_BLADEXP 53 /* Trident BladeXP */ | ||
123 | #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ | 126 | #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ |
124 | #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ | 127 | #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ |
125 | #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ | 128 | #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ |
diff --git a/include/linux/fd1772.h b/include/linux/fd1772.h deleted file mode 100644 index 871d6e4c677e..000000000000 --- a/include/linux/fd1772.h +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | #ifndef _LINUX_FD1772REG_H | ||
2 | #define _LINUX_FD1772REG_H | ||
3 | |||
4 | /* | ||
5 | ** WD1772 stuff - originally from the M68K Linux | ||
6 | * Modified for Archimedes by Dave Gilbert (gilbertd@cs.man.ac.uk) | ||
7 | */ | ||
8 | |||
9 | /* register codes */ | ||
10 | |||
11 | #define FDC1772SELREG_STP (0x80) /* command/status register */ | ||
12 | #define FDC1772SELREG_TRA (0x82) /* track register */ | ||
13 | #define FDC1772SELREG_SEC (0x84) /* sector register */ | ||
14 | #define FDC1772SELREG_DTA (0x86) /* data register */ | ||
15 | |||
16 | /* register names for FDC1772_READ/WRITE macros */ | ||
17 | |||
18 | #define FDC1772REG_CMD 0 | ||
19 | #define FDC1772REG_STATUS 0 | ||
20 | #define FDC1772REG_TRACK 2 | ||
21 | #define FDC1772REG_SECTOR 4 | ||
22 | #define FDC1772REG_DATA 6 | ||
23 | |||
24 | /* command opcodes */ | ||
25 | |||
26 | #define FDC1772CMD_RESTORE (0x00) /* - */ | ||
27 | #define FDC1772CMD_SEEK (0x10) /* | */ | ||
28 | #define FDC1772CMD_STEP (0x20) /* | TYP 1 Commands */ | ||
29 | #define FDC1772CMD_STIN (0x40) /* | */ | ||
30 | #define FDC1772CMD_STOT (0x60) /* - */ | ||
31 | #define FDC1772CMD_RDSEC (0x80) /* - TYP 2 Commands */ | ||
32 | #define FDC1772CMD_WRSEC (0xa0) /* - " */ | ||
33 | #define FDC1772CMD_RDADR (0xc0) /* - */ | ||
34 | #define FDC1772CMD_RDTRA (0xe0) /* | TYP 3 Commands */ | ||
35 | #define FDC1772CMD_WRTRA (0xf0) /* - */ | ||
36 | #define FDC1772CMD_FORCI (0xd0) /* - TYP 4 Command */ | ||
37 | |||
38 | /* command modifier bits */ | ||
39 | |||
40 | #define FDC1772CMDADD_SR6 (0x00) /* step rate settings */ | ||
41 | #define FDC1772CMDADD_SR12 (0x01) | ||
42 | #define FDC1772CMDADD_SR2 (0x02) | ||
43 | #define FDC1772CMDADD_SR3 (0x03) | ||
44 | #define FDC1772CMDADD_V (0x04) /* verify */ | ||
45 | #define FDC1772CMDADD_H (0x08) /* wait for spin-up */ | ||
46 | #define FDC1772CMDADD_U (0x10) /* update track register */ | ||
47 | #define FDC1772CMDADD_M (0x10) /* multiple sector access */ | ||
48 | #define FDC1772CMDADD_E (0x04) /* head settling flag */ | ||
49 | #define FDC1772CMDADD_P (0x02) /* precompensation */ | ||
50 | #define FDC1772CMDADD_A0 (0x01) /* DAM flag */ | ||
51 | |||
52 | /* status register bits */ | ||
53 | |||
54 | #define FDC1772STAT_MOTORON (0x80) /* motor on */ | ||
55 | #define FDC1772STAT_WPROT (0x40) /* write protected (FDC1772CMD_WR*) */ | ||
56 | #define FDC1772STAT_SPINUP (0x20) /* motor speed stable (Type I) */ | ||
57 | #define FDC1772STAT_DELDAM (0x20) /* sector has deleted DAM (Type II+III) */ | ||
58 | #define FDC1772STAT_RECNF (0x10) /* record not found */ | ||
59 | #define FDC1772STAT_CRC (0x08) /* CRC error */ | ||
60 | #define FDC1772STAT_TR00 (0x04) /* Track 00 flag (Type I) */ | ||
61 | #define FDC1772STAT_LOST (0x04) /* Lost Data (Type II+III) */ | ||
62 | #define FDC1772STAT_IDX (0x02) /* Index status (Type I) */ | ||
63 | #define FDC1772STAT_DRQ (0x02) /* DRQ status (Type II+III) */ | ||
64 | #define FDC1772STAT_BUSY (0x01) /* FDC1772 is busy */ | ||
65 | |||
66 | |||
67 | /* PSG Port A Bit Nr 0 .. Side Sel .. 0 -> Side 1 1 -> Side 2 */ | ||
68 | #define DSKSIDE (0x01) | ||
69 | |||
70 | #define DSKDRVNONE (0x06) | ||
71 | #define DSKDRV0 (0x02) | ||
72 | #define DSKDRV1 (0x04) | ||
73 | |||
74 | /* step rates */ | ||
75 | #define FDC1772STEP_6 0x00 | ||
76 | #define FDC1772STEP_12 0x01 | ||
77 | #define FDC1772STEP_2 0x02 | ||
78 | #define FDC1772STEP_3 0x03 | ||
79 | |||
80 | #endif | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9c2ac5c0ef5c..49d8eb7a71be 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -886,6 +886,12 @@ static inline int file_check_writeable(struct file *filp) | |||
886 | #define FL_SLEEP 128 /* A blocking lock */ | 886 | #define FL_SLEEP 128 /* A blocking lock */ |
887 | 887 | ||
888 | /* | 888 | /* |
889 | * Special return value from posix_lock_file() and vfs_lock_file() for | ||
890 | * asynchronous locking. | ||
891 | */ | ||
892 | #define FILE_LOCK_DEFERRED 1 | ||
893 | |||
894 | /* | ||
889 | * The POSIX file lock owner is determined by | 895 | * The POSIX file lock owner is determined by |
890 | * the "struct files_struct" in the thread group | 896 | * the "struct files_struct" in the thread group |
891 | * (or NULL for no owner - BSD locks). | 897 | * (or NULL for no owner - BSD locks). |
@@ -1025,6 +1031,7 @@ extern int send_sigurg(struct fown_struct *fown); | |||
1025 | extern struct list_head super_blocks; | 1031 | extern struct list_head super_blocks; |
1026 | extern spinlock_t sb_lock; | 1032 | extern spinlock_t sb_lock; |
1027 | 1033 | ||
1034 | #define sb_entry(list) list_entry((list), struct super_block, s_list) | ||
1028 | #define S_BIAS (1<<30) | 1035 | #define S_BIAS (1<<30) |
1029 | struct super_block { | 1036 | struct super_block { |
1030 | struct list_head s_list; /* Keep this first */ | 1037 | struct list_head s_list; /* Keep this first */ |
@@ -1058,6 +1065,9 @@ struct super_block { | |||
1058 | struct list_head s_more_io; /* parked for more writeback */ | 1065 | struct list_head s_more_io; /* parked for more writeback */ |
1059 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ | 1066 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ |
1060 | struct list_head s_files; | 1067 | struct list_head s_files; |
1068 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ | ||
1069 | struct list_head s_dentry_lru; /* unused dentry lru */ | ||
1070 | int s_nr_dentry_unused; /* # of dentry on lru */ | ||
1061 | 1071 | ||
1062 | struct block_device *s_bdev; | 1072 | struct block_device *s_bdev; |
1063 | struct mtd_info *s_mtd; | 1073 | struct mtd_info *s_mtd; |
@@ -1773,8 +1783,9 @@ static inline void allow_write_access(struct file *file) | |||
1773 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); | 1783 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); |
1774 | } | 1784 | } |
1775 | extern int do_pipe(int *); | 1785 | extern int do_pipe(int *); |
1776 | extern struct file *create_read_pipe(struct file *f); | 1786 | extern int do_pipe_flags(int *, int); |
1777 | extern struct file *create_write_pipe(void); | 1787 | extern struct file *create_read_pipe(struct file *f, int flags); |
1788 | extern struct file *create_write_pipe(int flags); | ||
1778 | extern void free_write_pipe(struct file *); | 1789 | extern void free_write_pipe(struct file *); |
1779 | 1790 | ||
1780 | extern struct file *do_filp_open(int dfd, const char *pathname, | 1791 | extern struct file *do_filp_open(int dfd, const char *pathname, |
@@ -2006,8 +2017,6 @@ extern void simple_release_fs(struct vfsmount **mount, int *count); | |||
2006 | 2017 | ||
2007 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, | 2018 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, |
2008 | loff_t *ppos, const void *from, size_t available); | 2019 | loff_t *ppos, const void *from, size_t available); |
2009 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | ||
2010 | const void *from, size_t available); | ||
2011 | 2020 | ||
2012 | #ifdef CONFIG_MIGRATION | 2021 | #ifdef CONFIG_MIGRATION |
2013 | extern int buffer_migrate_page(struct address_space *, | 2022 | extern int buffer_migrate_page(struct address_space *, |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index d48282197696..265635dc9908 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -104,11 +104,14 @@ struct fuse_file_lock { | |||
104 | 104 | ||
105 | /** | 105 | /** |
106 | * INIT request/reply flags | 106 | * INIT request/reply flags |
107 | * | ||
108 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." | ||
107 | */ | 109 | */ |
108 | #define FUSE_ASYNC_READ (1 << 0) | 110 | #define FUSE_ASYNC_READ (1 << 0) |
109 | #define FUSE_POSIX_LOCKS (1 << 1) | 111 | #define FUSE_POSIX_LOCKS (1 << 1) |
110 | #define FUSE_FILE_OPS (1 << 2) | 112 | #define FUSE_FILE_OPS (1 << 2) |
111 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) | 113 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) |
114 | #define FUSE_EXPORT_SUPPORT (1 << 4) | ||
112 | #define FUSE_BIG_WRITES (1 << 5) | 115 | #define FUSE_BIG_WRITES (1 << 5) |
113 | 116 | ||
114 | /** | 117 | /** |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index e8787417f65a..118216f1bd3c 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -541,7 +541,7 @@ extern dev_t blk_lookup_devt(const char *name, int part); | |||
541 | extern char *disk_name (struct gendisk *hd, int part, char *buf); | 541 | extern char *disk_name (struct gendisk *hd, int part, char *buf); |
542 | 542 | ||
543 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 543 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
544 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); | 544 | extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int); |
545 | extern void delete_partition(struct gendisk *, int); | 545 | extern void delete_partition(struct gendisk *, int); |
546 | extern void printk_all_partitions(void); | 546 | extern void printk_all_partitions(void); |
547 | 547 | ||
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index b414be387180..e8003afeffba 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -173,11 +173,24 @@ static inline void arch_free_page(struct page *page, int order) { } | |||
173 | static inline void arch_alloc_page(struct page *page, int order) { } | 173 | static inline void arch_alloc_page(struct page *page, int order) { } |
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | extern struct page *__alloc_pages(gfp_t, unsigned int, struct zonelist *); | 176 | struct page * |
177 | __alloc_pages_internal(gfp_t gfp_mask, unsigned int order, | ||
178 | struct zonelist *zonelist, nodemask_t *nodemask); | ||
179 | |||
180 | static inline struct page * | ||
181 | __alloc_pages(gfp_t gfp_mask, unsigned int order, | ||
182 | struct zonelist *zonelist) | ||
183 | { | ||
184 | return __alloc_pages_internal(gfp_mask, order, zonelist, NULL); | ||
185 | } | ||
186 | |||
187 | static inline struct page * | ||
188 | __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, | ||
189 | struct zonelist *zonelist, nodemask_t *nodemask) | ||
190 | { | ||
191 | return __alloc_pages_internal(gfp_mask, order, zonelist, nodemask); | ||
192 | } | ||
177 | 193 | ||
178 | extern struct page * | ||
179 | __alloc_pages_nodemask(gfp_t, unsigned int, | ||
180 | struct zonelist *, nodemask_t *nodemask); | ||
181 | 194 | ||
182 | static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, | 195 | static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, |
183 | unsigned int order) | 196 | unsigned int order) |
@@ -215,6 +228,9 @@ extern struct page *alloc_page_vma(gfp_t gfp_mask, | |||
215 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); | 228 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); |
216 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); | 229 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); |
217 | 230 | ||
231 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); | ||
232 | void free_pages_exact(void *virt, size_t size); | ||
233 | |||
218 | #define __get_free_page(gfp_mask) \ | 234 | #define __get_free_page(gfp_mask) \ |
219 | __get_free_pages((gfp_mask),0) | 235 | __get_free_pages((gfp_mask),0) |
220 | 236 | ||
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 98be6c5762b9..730a20b83576 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
@@ -79,6 +79,19 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value) | |||
79 | WARN_ON(1); | 79 | WARN_ON(1); |
80 | } | 80 | } |
81 | 81 | ||
82 | static inline int gpio_export(unsigned gpio, bool direction_may_change) | ||
83 | { | ||
84 | /* GPIO can never have been requested or set as {in,out}put */ | ||
85 | WARN_ON(1); | ||
86 | return -EINVAL; | ||
87 | } | ||
88 | |||
89 | static inline void gpio_unexport(unsigned gpio) | ||
90 | { | ||
91 | /* GPIO can never have been exported */ | ||
92 | WARN_ON(1); | ||
93 | } | ||
94 | |||
82 | static inline int gpio_to_irq(unsigned gpio) | 95 | static inline int gpio_to_irq(unsigned gpio) |
83 | { | 96 | { |
84 | /* GPIO can never have been requested or set as input */ | 97 | /* GPIO can never have been requested or set as input */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index a79e80b689d8..9a71d4cc88c8 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/mempolicy.h> | 8 | #include <linux/mempolicy.h> |
9 | #include <linux/shm.h> | 9 | #include <linux/shm.h> |
10 | #include <asm/tlbflush.h> | 10 | #include <asm/tlbflush.h> |
11 | #include <asm/hugetlb.h> | ||
12 | 11 | ||
13 | struct ctl_table; | 12 | struct ctl_table; |
14 | 13 | ||
@@ -17,38 +16,45 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | |||
17 | return vma->vm_flags & VM_HUGETLB; | 16 | return vma->vm_flags & VM_HUGETLB; |
18 | } | 17 | } |
19 | 18 | ||
19 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); | ||
20 | int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 20 | int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); |
21 | int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 21 | int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); |
22 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 22 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); |
23 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); | 23 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); |
24 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int, int); | 24 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int, int); |
25 | void unmap_hugepage_range(struct vm_area_struct *, unsigned long, unsigned long); | 25 | void unmap_hugepage_range(struct vm_area_struct *, |
26 | void __unmap_hugepage_range(struct vm_area_struct *, unsigned long, unsigned long); | 26 | unsigned long, unsigned long, struct page *); |
27 | void __unmap_hugepage_range(struct vm_area_struct *, | ||
28 | unsigned long, unsigned long, struct page *); | ||
27 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); | 29 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); |
28 | int hugetlb_report_meminfo(char *); | 30 | int hugetlb_report_meminfo(char *); |
29 | int hugetlb_report_node_meminfo(int, char *); | 31 | int hugetlb_report_node_meminfo(int, char *); |
30 | unsigned long hugetlb_total_pages(void); | 32 | unsigned long hugetlb_total_pages(void); |
31 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 33 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
32 | unsigned long address, int write_access); | 34 | unsigned long address, int write_access); |
33 | int hugetlb_reserve_pages(struct inode *inode, long from, long to); | 35 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
36 | struct vm_area_struct *vma); | ||
34 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 37 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
35 | 38 | ||
36 | extern unsigned long max_huge_pages; | ||
37 | extern unsigned long sysctl_overcommit_huge_pages; | ||
38 | extern unsigned long hugepages_treat_as_movable; | 39 | extern unsigned long hugepages_treat_as_movable; |
39 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 40 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
40 | extern int sysctl_hugetlb_shm_group; | 41 | extern int sysctl_hugetlb_shm_group; |
42 | extern struct list_head huge_boot_pages; | ||
41 | 43 | ||
42 | /* arch callbacks */ | 44 | /* arch callbacks */ |
43 | 45 | ||
44 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr); | 46 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
47 | unsigned long addr, unsigned long sz); | ||
45 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr); | 48 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr); |
46 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep); | 49 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep); |
47 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, | 50 | struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, |
48 | int write); | 51 | int write); |
49 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 52 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
50 | pmd_t *pmd, int write); | 53 | pmd_t *pmd, int write); |
54 | struct page *follow_huge_pud(struct mm_struct *mm, unsigned long address, | ||
55 | pud_t *pud, int write); | ||
51 | int pmd_huge(pmd_t pmd); | 56 | int pmd_huge(pmd_t pmd); |
57 | int pud_huge(pud_t pmd); | ||
52 | void hugetlb_change_protection(struct vm_area_struct *vma, | 58 | void hugetlb_change_protection(struct vm_area_struct *vma, |
53 | unsigned long address, unsigned long end, pgprot_t newprot); | 59 | unsigned long address, unsigned long end, pgprot_t newprot); |
54 | 60 | ||
@@ -58,6 +64,11 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | |||
58 | { | 64 | { |
59 | return 0; | 65 | return 0; |
60 | } | 66 | } |
67 | |||
68 | static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma) | ||
69 | { | ||
70 | } | ||
71 | |||
61 | static inline unsigned long hugetlb_total_pages(void) | 72 | static inline unsigned long hugetlb_total_pages(void) |
62 | { | 73 | { |
63 | return 0; | 74 | return 0; |
@@ -67,12 +78,14 @@ static inline unsigned long hugetlb_total_pages(void) | |||
67 | #define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL) | 78 | #define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL) |
68 | #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) | 79 | #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) |
69 | #define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) | 80 | #define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) |
70 | #define unmap_hugepage_range(vma, start, end) BUG() | 81 | #define unmap_hugepage_range(vma, start, end, page) BUG() |
71 | #define hugetlb_report_meminfo(buf) 0 | 82 | #define hugetlb_report_meminfo(buf) 0 |
72 | #define hugetlb_report_node_meminfo(n, buf) 0 | 83 | #define hugetlb_report_node_meminfo(n, buf) 0 |
73 | #define follow_huge_pmd(mm, addr, pmd, write) NULL | 84 | #define follow_huge_pmd(mm, addr, pmd, write) NULL |
74 | #define prepare_hugepage_range(addr,len) (-EINVAL) | 85 | #define follow_huge_pud(mm, addr, pud, write) NULL |
86 | #define prepare_hugepage_range(file, addr, len) (-EINVAL) | ||
75 | #define pmd_huge(x) 0 | 87 | #define pmd_huge(x) 0 |
88 | #define pud_huge(x) 0 | ||
76 | #define is_hugepage_only_range(mm, addr, len) 0 | 89 | #define is_hugepage_only_range(mm, addr, len) 0 |
77 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 90 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
78 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) | 91 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) |
@@ -93,6 +106,7 @@ struct hugetlbfs_config { | |||
93 | umode_t mode; | 106 | umode_t mode; |
94 | long nr_blocks; | 107 | long nr_blocks; |
95 | long nr_inodes; | 108 | long nr_inodes; |
109 | struct hstate *hstate; | ||
96 | }; | 110 | }; |
97 | 111 | ||
98 | struct hugetlbfs_sb_info { | 112 | struct hugetlbfs_sb_info { |
@@ -101,6 +115,7 @@ struct hugetlbfs_sb_info { | |||
101 | long max_inodes; /* inodes allowed */ | 115 | long max_inodes; /* inodes allowed */ |
102 | long free_inodes; /* inodes free */ | 116 | long free_inodes; /* inodes free */ |
103 | spinlock_t stat_lock; | 117 | spinlock_t stat_lock; |
118 | struct hstate *hstate; | ||
104 | }; | 119 | }; |
105 | 120 | ||
106 | 121 | ||
@@ -125,8 +140,6 @@ struct file *hugetlb_file_setup(const char *name, size_t); | |||
125 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 140 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
126 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 141 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
127 | 142 | ||
128 | #define BLOCKS_PER_HUGEPAGE (HPAGE_SIZE / 512) | ||
129 | |||
130 | static inline int is_file_hugepages(struct file *file) | 143 | static inline int is_file_hugepages(struct file *file) |
131 | { | 144 | { |
132 | if (file->f_op == &hugetlbfs_file_operations) | 145 | if (file->f_op == &hugetlbfs_file_operations) |
@@ -155,4 +168,112 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
155 | unsigned long flags); | 168 | unsigned long flags); |
156 | #endif /* HAVE_ARCH_HUGETLB_UNMAPPED_AREA */ | 169 | #endif /* HAVE_ARCH_HUGETLB_UNMAPPED_AREA */ |
157 | 170 | ||
171 | #ifdef CONFIG_HUGETLB_PAGE | ||
172 | |||
173 | #define HSTATE_NAME_LEN 32 | ||
174 | /* Defines one hugetlb page size */ | ||
175 | struct hstate { | ||
176 | int hugetlb_next_nid; | ||
177 | unsigned int order; | ||
178 | unsigned long mask; | ||
179 | unsigned long max_huge_pages; | ||
180 | unsigned long nr_huge_pages; | ||
181 | unsigned long free_huge_pages; | ||
182 | unsigned long resv_huge_pages; | ||
183 | unsigned long surplus_huge_pages; | ||
184 | unsigned long nr_overcommit_huge_pages; | ||
185 | struct list_head hugepage_freelists[MAX_NUMNODES]; | ||
186 | unsigned int nr_huge_pages_node[MAX_NUMNODES]; | ||
187 | unsigned int free_huge_pages_node[MAX_NUMNODES]; | ||
188 | unsigned int surplus_huge_pages_node[MAX_NUMNODES]; | ||
189 | char name[HSTATE_NAME_LEN]; | ||
190 | }; | ||
191 | |||
192 | struct huge_bootmem_page { | ||
193 | struct list_head list; | ||
194 | struct hstate *hstate; | ||
195 | }; | ||
196 | |||
197 | /* arch callback */ | ||
198 | int __init alloc_bootmem_huge_page(struct hstate *h); | ||
199 | |||
200 | void __init hugetlb_add_hstate(unsigned order); | ||
201 | struct hstate *size_to_hstate(unsigned long size); | ||
202 | |||
203 | #ifndef HUGE_MAX_HSTATE | ||
204 | #define HUGE_MAX_HSTATE 1 | ||
205 | #endif | ||
206 | |||
207 | extern struct hstate hstates[HUGE_MAX_HSTATE]; | ||
208 | extern unsigned int default_hstate_idx; | ||
209 | |||
210 | #define default_hstate (hstates[default_hstate_idx]) | ||
211 | |||
212 | static inline struct hstate *hstate_inode(struct inode *i) | ||
213 | { | ||
214 | struct hugetlbfs_sb_info *hsb; | ||
215 | hsb = HUGETLBFS_SB(i->i_sb); | ||
216 | return hsb->hstate; | ||
217 | } | ||
218 | |||
219 | static inline struct hstate *hstate_file(struct file *f) | ||
220 | { | ||
221 | return hstate_inode(f->f_dentry->d_inode); | ||
222 | } | ||
223 | |||
224 | static inline struct hstate *hstate_vma(struct vm_area_struct *vma) | ||
225 | { | ||
226 | return hstate_file(vma->vm_file); | ||
227 | } | ||
228 | |||
229 | static inline unsigned long huge_page_size(struct hstate *h) | ||
230 | { | ||
231 | return (unsigned long)PAGE_SIZE << h->order; | ||
232 | } | ||
233 | |||
234 | static inline unsigned long huge_page_mask(struct hstate *h) | ||
235 | { | ||
236 | return h->mask; | ||
237 | } | ||
238 | |||
239 | static inline unsigned int huge_page_order(struct hstate *h) | ||
240 | { | ||
241 | return h->order; | ||
242 | } | ||
243 | |||
244 | static inline unsigned huge_page_shift(struct hstate *h) | ||
245 | { | ||
246 | return h->order + PAGE_SHIFT; | ||
247 | } | ||
248 | |||
249 | static inline unsigned int pages_per_huge_page(struct hstate *h) | ||
250 | { | ||
251 | return 1 << h->order; | ||
252 | } | ||
253 | |||
254 | static inline unsigned int blocks_per_huge_page(struct hstate *h) | ||
255 | { | ||
256 | return huge_page_size(h) / 512; | ||
257 | } | ||
258 | |||
259 | #include <asm/hugetlb.h> | ||
260 | |||
261 | static inline struct hstate *page_hstate(struct page *page) | ||
262 | { | ||
263 | return size_to_hstate(PAGE_SIZE << compound_order(page)); | ||
264 | } | ||
265 | |||
266 | #else | ||
267 | struct hstate {}; | ||
268 | #define alloc_bootmem_huge_page(h) NULL | ||
269 | #define hstate_file(f) NULL | ||
270 | #define hstate_vma(v) NULL | ||
271 | #define hstate_inode(i) NULL | ||
272 | #define huge_page_size(h) PAGE_SIZE | ||
273 | #define huge_page_mask(h) PAGE_MASK | ||
274 | #define huge_page_order(h) 0 | ||
275 | #define huge_page_shift(h) PAGE_SHIFT | ||
276 | #define pages_per_huge_page(h) 1 | ||
277 | #endif | ||
278 | |||
158 | #endif /* _LINUX_HUGETLB_H */ | 279 | #endif /* _LINUX_HUGETLB_H */ |
diff --git a/include/linux/i2c/max732x.h b/include/linux/i2c/max732x.h new file mode 100644 index 000000000000..e10336631c62 --- /dev/null +++ b/include/linux/i2c/max732x.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef __LINUX_I2C_MAX732X_H | ||
2 | #define __LINUX_I2C_MAX732X_H | ||
3 | |||
4 | /* platform data for the MAX732x 8/16-bit I/O expander driver */ | ||
5 | |||
6 | struct max732x_platform_data { | ||
7 | /* number of the first GPIO */ | ||
8 | unsigned gpio_base; | ||
9 | |||
10 | void *context; /* param to setup/teardown */ | ||
11 | |||
12 | int (*setup)(struct i2c_client *client, | ||
13 | unsigned gpio, unsigned ngpio, | ||
14 | void *context); | ||
15 | int (*teardown)(struct i2c_client *client, | ||
16 | unsigned gpio, unsigned ngpio, | ||
17 | void *context); | ||
18 | }; | ||
19 | #endif /* __LINUX_I2C_MAX732X_H */ | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index d67ccca2b964..b846bc44a27e 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -211,7 +211,21 @@ static inline int __ide_default_irq(unsigned long base) | |||
211 | return 0; | 211 | return 0; |
212 | } | 212 | } |
213 | 213 | ||
214 | #if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \ | ||
215 | defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \ | ||
216 | || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) | ||
214 | #include <asm/ide.h> | 217 | #include <asm/ide.h> |
218 | #else | ||
219 | #include <asm-generic/ide_iops.h> | ||
220 | #endif | ||
221 | |||
222 | #ifndef MAX_HWIFS | ||
223 | #if defined(CONFIG_BLACKFIN) || defined(CONFIG_H8300) || defined(CONFIG_XTENSA) | ||
224 | # define MAX_HWIFS 1 | ||
225 | #else | ||
226 | # define MAX_HWIFS 10 | ||
227 | #endif | ||
228 | #endif | ||
215 | 229 | ||
216 | #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) | 230 | #if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED) |
217 | #undef MAX_HWIFS | 231 | #undef MAX_HWIFS |
@@ -532,12 +546,16 @@ struct ide_dma_ops { | |||
532 | void (*dma_timeout)(struct ide_drive_s *); | 546 | void (*dma_timeout)(struct ide_drive_s *); |
533 | }; | 547 | }; |
534 | 548 | ||
549 | struct ide_host; | ||
550 | |||
535 | typedef struct hwif_s { | 551 | typedef struct hwif_s { |
536 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 552 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
537 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 553 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
538 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ | 554 | struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ |
539 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ | 555 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ |
540 | 556 | ||
557 | struct ide_host *host; | ||
558 | |||
541 | char name[6]; /* name of interface, eg. "ide0" */ | 559 | char name[6]; /* name of interface, eg. "ide0" */ |
542 | 560 | ||
543 | struct ide_io_ports io_ports; | 561 | struct ide_io_ports io_ports; |
@@ -626,6 +644,9 @@ typedef struct hwif_s { | |||
626 | struct ide_host { | 644 | struct ide_host { |
627 | ide_hwif_t *ports[MAX_HWIFS]; | 645 | ide_hwif_t *ports[MAX_HWIFS]; |
628 | unsigned int n_ports; | 646 | unsigned int n_ports; |
647 | struct device *dev[2]; | ||
648 | unsigned long host_flags; | ||
649 | void *host_priv; | ||
629 | }; | 650 | }; |
630 | 651 | ||
631 | /* | 652 | /* |
@@ -874,6 +895,9 @@ struct ide_driver_s { | |||
874 | 895 | ||
875 | #define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) | 896 | #define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) |
876 | 897 | ||
898 | int ide_device_get(ide_drive_t *); | ||
899 | void ide_device_put(ide_drive_t *); | ||
900 | |||
877 | int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); | 901 | int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); |
878 | 902 | ||
879 | extern int ide_vlb_clk; | 903 | extern int ide_vlb_clk; |
@@ -1182,7 +1206,7 @@ enum { | |||
1182 | 1206 | ||
1183 | struct ide_port_info { | 1207 | struct ide_port_info { |
1184 | char *name; | 1208 | char *name; |
1185 | unsigned int (*init_chipset)(struct pci_dev *, const char *); | 1209 | unsigned int (*init_chipset)(struct pci_dev *); |
1186 | void (*init_iops)(ide_hwif_t *); | 1210 | void (*init_iops)(ide_hwif_t *); |
1187 | void (*init_hwif)(ide_hwif_t *); | 1211 | void (*init_hwif)(ide_hwif_t *); |
1188 | int (*init_dma)(ide_hwif_t *, | 1212 | int (*init_dma)(ide_hwif_t *, |
@@ -1201,8 +1225,10 @@ struct ide_port_info { | |||
1201 | u8 udma_mask; | 1225 | u8 udma_mask; |
1202 | }; | 1226 | }; |
1203 | 1227 | ||
1204 | int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *); | 1228 | int ide_pci_init_one(struct pci_dev *, const struct ide_port_info *, void *); |
1205 | int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *); | 1229 | int ide_pci_init_two(struct pci_dev *, struct pci_dev *, |
1230 | const struct ide_port_info *, void *); | ||
1231 | void ide_pci_remove(struct pci_dev *); | ||
1206 | 1232 | ||
1207 | void ide_map_sg(ide_drive_t *, struct request *); | 1233 | void ide_map_sg(ide_drive_t *, struct request *); |
1208 | void ide_init_sg_cmd(ide_drive_t *, struct request *); | 1234 | void ide_init_sg_cmd(ide_drive_t *, struct request *); |
diff --git a/include/linux/idr.h b/include/linux/idr.h index 9a2d762124de..fa035f96f2a3 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/rcupdate.h> | ||
18 | 19 | ||
19 | #if BITS_PER_LONG == 32 | 20 | #if BITS_PER_LONG == 32 |
20 | # define IDR_BITS 5 | 21 | # define IDR_BITS 5 |
@@ -51,6 +52,7 @@ struct idr_layer { | |||
51 | unsigned long bitmap; /* A zero bit means "space here" */ | 52 | unsigned long bitmap; /* A zero bit means "space here" */ |
52 | struct idr_layer *ary[1<<IDR_BITS]; | 53 | struct idr_layer *ary[1<<IDR_BITS]; |
53 | int count; /* When zero, we can release it */ | 54 | int count; /* When zero, we can release it */ |
55 | struct rcu_head rcu_head; | ||
54 | }; | 56 | }; |
55 | 57 | ||
56 | struct idr { | 58 | struct idr { |
@@ -71,6 +73,28 @@ struct idr { | |||
71 | } | 73 | } |
72 | #define DEFINE_IDR(name) struct idr name = IDR_INIT(name) | 74 | #define DEFINE_IDR(name) struct idr name = IDR_INIT(name) |
73 | 75 | ||
76 | /* Actions to be taken after a call to _idr_sub_alloc */ | ||
77 | #define IDR_NEED_TO_GROW -2 | ||
78 | #define IDR_NOMORE_SPACE -3 | ||
79 | |||
80 | #define _idr_rc_to_errno(rc) ((rc) == -1 ? -EAGAIN : -ENOSPC) | ||
81 | |||
82 | /** | ||
83 | * idr synchronization (stolen from radix-tree.h) | ||
84 | * | ||
85 | * idr_find() is able to be called locklessly, using RCU. The caller must | ||
86 | * ensure calls to this function are made within rcu_read_lock() regions. | ||
87 | * Other readers (lock-free or otherwise) and modifications may be running | ||
88 | * concurrently. | ||
89 | * | ||
90 | * It is still required that the caller manage the synchronization and | ||
91 | * lifetimes of the items. So if RCU lock-free lookups are used, typically | ||
92 | * this would mean that the items have their own locks, or are amenable to | ||
93 | * lock-free access; and that the items are freed by RCU (or only freed after | ||
94 | * having been deleted from the idr tree *and* a synchronize_rcu() grace | ||
95 | * period). | ||
96 | */ | ||
97 | |||
74 | /* | 98 | /* |
75 | * This is what we export. | 99 | * This is what we export. |
76 | */ | 100 | */ |
diff --git a/include/linux/init.h b/include/linux/init.h index 21d658cdfa27..42ae95411a93 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -275,13 +275,7 @@ void __init parse_early_param(void); | |||
275 | 275 | ||
276 | #define security_initcall(fn) module_init(fn) | 276 | #define security_initcall(fn) module_init(fn) |
277 | 277 | ||
278 | /* These macros create a dummy inline: gcc 2.9x does not count alias | 278 | /* Each module must use one module_init(). */ |
279 | as usage, hence the `unused function' warning when __init functions | ||
280 | are declared static. We use the dummy __*_module_inline functions | ||
281 | both to kill the warning and check the type of the init/cleanup | ||
282 | function. */ | ||
283 | |||
284 | /* Each module must use one module_init(), or one no_module_init */ | ||
285 | #define module_init(initfn) \ | 279 | #define module_init(initfn) \ |
286 | static inline initcall_t __inittest(void) \ | 280 | static inline initcall_t __inittest(void) \ |
287 | { return initfn; } \ | 281 | { return initfn; } \ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 93c45acf249a..021d8e720c79 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -122,7 +122,7 @@ extern struct group_info init_groups; | |||
122 | .state = 0, \ | 122 | .state = 0, \ |
123 | .stack = &init_thread_info, \ | 123 | .stack = &init_thread_info, \ |
124 | .usage = ATOMIC_INIT(2), \ | 124 | .usage = ATOMIC_INIT(2), \ |
125 | .flags = 0, \ | 125 | .flags = PF_KTHREAD, \ |
126 | .lock_depth = -1, \ | 126 | .lock_depth = -1, \ |
127 | .prio = MAX_PRIO-20, \ | 127 | .prio = MAX_PRIO-20, \ |
128 | .static_prio = MAX_PRIO-20, \ | 128 | .static_prio = MAX_PRIO-20, \ |
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index 742b917e7d1b..bd578578a8b9 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #ifndef _LINUX_INOTIFY_H | 7 | #ifndef _LINUX_INOTIFY_H |
8 | #define _LINUX_INOTIFY_H | 8 | #define _LINUX_INOTIFY_H |
9 | 9 | ||
10 | /* For O_CLOEXEC and O_NONBLOCK */ | ||
11 | #include <linux/fcntl.h> | ||
10 | #include <linux/types.h> | 12 | #include <linux/types.h> |
11 | 13 | ||
12 | /* | 14 | /* |
@@ -63,6 +65,10 @@ struct inotify_event { | |||
63 | IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \ | 65 | IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \ |
64 | IN_MOVE_SELF) | 66 | IN_MOVE_SELF) |
65 | 67 | ||
68 | /* Flags for sys_inotify_init1. */ | ||
69 | #define IN_CLOEXEC O_CLOEXEC | ||
70 | #define IN_NONBLOCK O_NONBLOCK | ||
71 | |||
66 | #ifdef __KERNEL__ | 72 | #ifdef __KERNEL__ |
67 | 73 | ||
68 | #include <linux/dcache.h> | 74 | #include <linux/dcache.h> |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index ea6c18a8b0d4..ea330f9e7100 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -36,6 +36,7 @@ struct ipc_namespace { | |||
36 | int msg_ctlmni; | 36 | int msg_ctlmni; |
37 | atomic_t msg_bytes; | 37 | atomic_t msg_bytes; |
38 | atomic_t msg_hdrs; | 38 | atomic_t msg_hdrs; |
39 | int auto_msgmni; | ||
39 | 40 | ||
40 | size_t shm_ctlmax; | 41 | size_t shm_ctlmax; |
41 | size_t shm_ctlall; | 42 | size_t shm_ctlall; |
@@ -53,7 +54,7 @@ extern atomic_t nr_ipc_ns; | |||
53 | 54 | ||
54 | extern int register_ipcns_notifier(struct ipc_namespace *); | 55 | extern int register_ipcns_notifier(struct ipc_namespace *); |
55 | extern int cond_register_ipcns_notifier(struct ipc_namespace *); | 56 | extern int cond_register_ipcns_notifier(struct ipc_namespace *); |
56 | extern int unregister_ipcns_notifier(struct ipc_namespace *); | 57 | extern void unregister_ipcns_notifier(struct ipc_namespace *); |
57 | extern int ipcns_notify(unsigned long); | 58 | extern int ipcns_notify(unsigned long); |
58 | 59 | ||
59 | #else /* CONFIG_SYSVIPC */ | 60 | #else /* CONFIG_SYSVIPC */ |
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h index 2b1c2e58566e..74bde13224c9 100644 --- a/include/linux/irqflags.h +++ b/include/linux/irqflags.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef _LINUX_TRACE_IRQFLAGS_H | 11 | #ifndef _LINUX_TRACE_IRQFLAGS_H |
12 | #define _LINUX_TRACE_IRQFLAGS_H | 12 | #define _LINUX_TRACE_IRQFLAGS_H |
13 | 13 | ||
14 | #include <linux/typecheck.h> | ||
15 | |||
14 | #ifdef CONFIG_TRACE_IRQFLAGS | 16 | #ifdef CONFIG_TRACE_IRQFLAGS |
15 | extern void trace_softirqs_on(unsigned long ip); | 17 | extern void trace_softirqs_on(unsigned long ip); |
16 | extern void trace_softirqs_off(unsigned long ip); | 18 | extern void trace_softirqs_off(unsigned long ip); |
@@ -58,18 +60,24 @@ | |||
58 | do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0) | 60 | do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0) |
59 | #define local_irq_disable() \ | 61 | #define local_irq_disable() \ |
60 | do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0) | 62 | do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0) |
61 | #define local_irq_save(flags) \ | 63 | #define local_irq_save(flags) \ |
62 | do { raw_local_irq_save(flags); trace_hardirqs_off(); } while (0) | 64 | do { \ |
65 | typecheck(unsigned long, flags); \ | ||
66 | raw_local_irq_save(flags); \ | ||
67 | trace_hardirqs_off(); \ | ||
68 | } while (0) | ||
63 | 69 | ||
64 | #define local_irq_restore(flags) \ | 70 | |
65 | do { \ | 71 | #define local_irq_restore(flags) \ |
66 | if (raw_irqs_disabled_flags(flags)) { \ | 72 | do { \ |
67 | raw_local_irq_restore(flags); \ | 73 | typecheck(unsigned long, flags); \ |
68 | trace_hardirqs_off(); \ | 74 | if (raw_irqs_disabled_flags(flags)) { \ |
69 | } else { \ | 75 | raw_local_irq_restore(flags); \ |
70 | trace_hardirqs_on(); \ | 76 | trace_hardirqs_off(); \ |
71 | raw_local_irq_restore(flags); \ | 77 | } else { \ |
72 | } \ | 78 | trace_hardirqs_on(); \ |
79 | raw_local_irq_restore(flags); \ | ||
80 | } \ | ||
73 | } while (0) | 81 | } while (0) |
74 | #else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */ | 82 | #else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */ |
75 | /* | 83 | /* |
@@ -78,8 +86,16 @@ | |||
78 | */ | 86 | */ |
79 | # define raw_local_irq_disable() local_irq_disable() | 87 | # define raw_local_irq_disable() local_irq_disable() |
80 | # define raw_local_irq_enable() local_irq_enable() | 88 | # define raw_local_irq_enable() local_irq_enable() |
81 | # define raw_local_irq_save(flags) local_irq_save(flags) | 89 | # define raw_local_irq_save(flags) \ |
82 | # define raw_local_irq_restore(flags) local_irq_restore(flags) | 90 | do { \ |
91 | typecheck(unsigned long, flags); \ | ||
92 | local_irq_save(flags); \ | ||
93 | } while (0) | ||
94 | # define raw_local_irq_restore(flags) \ | ||
95 | do { \ | ||
96 | typecheck(unsigned long, flags); \ | ||
97 | local_irq_restore(flags); \ | ||
98 | } while (0) | ||
83 | #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ | 99 | #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ |
84 | 100 | ||
85 | #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT | 101 | #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT |
@@ -89,7 +105,11 @@ | |||
89 | raw_safe_halt(); \ | 105 | raw_safe_halt(); \ |
90 | } while (0) | 106 | } while (0) |
91 | 107 | ||
92 | #define local_save_flags(flags) raw_local_save_flags(flags) | 108 | #define local_save_flags(flags) \ |
109 | do { \ | ||
110 | typecheck(unsigned long, flags); \ | ||
111 | raw_local_save_flags(flags); \ | ||
112 | } while (0) | ||
93 | 113 | ||
94 | #define irqs_disabled() \ | 114 | #define irqs_disabled() \ |
95 | ({ \ | 115 | ({ \ |
@@ -99,7 +119,11 @@ | |||
99 | raw_irqs_disabled_flags(_flags); \ | 119 | raw_irqs_disabled_flags(_flags); \ |
100 | }) | 120 | }) |
101 | 121 | ||
102 | #define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags) | 122 | #define irqs_disabled_flags(flags) \ |
123 | ({ \ | ||
124 | typecheck(unsigned long, flags); \ | ||
125 | raw_irqs_disabled_flags(flags); \ | ||
126 | }) | ||
103 | #endif /* CONFIG_X86 */ | 127 | #endif /* CONFIG_X86 */ |
104 | 128 | ||
105 | #endif | 129 | #endif |
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 00c1801099fa..57aefa160a92 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #define _LINUX_KALLSYMS_H | 6 | #define _LINUX_KALLSYMS_H |
7 | 7 | ||
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/kernel.h> | ||
9 | #include <linux/stddef.h> | 10 | #include <linux/stddef.h> |
10 | 11 | ||
11 | #define KSYM_NAME_LEN 128 | 12 | #define KSYM_NAME_LEN 128 |
@@ -105,18 +106,10 @@ static inline void print_fn_descriptor_symbol(const char *fmt, void *addr) | |||
105 | print_symbol(fmt, (unsigned long)addr); | 106 | print_symbol(fmt, (unsigned long)addr); |
106 | } | 107 | } |
107 | 108 | ||
108 | #ifndef CONFIG_64BIT | 109 | static inline void print_ip_sym(unsigned long ip) |
109 | #define print_ip_sym(ip) \ | 110 | { |
110 | do { \ | 111 | printk("[<%p>]", (void *) ip); |
111 | printk("[<%08lx>]", ip); \ | 112 | print_symbol(" %s\n", ip); |
112 | print_symbol(" %s\n", ip); \ | 113 | } |
113 | } while(0) | ||
114 | #else | ||
115 | #define print_ip_sym(ip) \ | ||
116 | do { \ | ||
117 | printk("[<%016lx>]", ip); \ | ||
118 | print_symbol(" %s\n", ip); \ | ||
119 | } while(0) | ||
120 | #endif | ||
121 | 114 | ||
122 | #endif /*_LINUX_KALLSYMS_H*/ | 115 | #endif /*_LINUX_KALLSYMS_H*/ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f9cd7a513f9c..fdbbf72ca2eb 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/compiler.h> | 14 | #include <linux/compiler.h> |
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <linux/log2.h> | 16 | #include <linux/log2.h> |
17 | #include <linux/typecheck.h> | ||
18 | #include <linux/ratelimit.h> | ||
17 | #include <asm/byteorder.h> | 19 | #include <asm/byteorder.h> |
18 | #include <asm/bug.h> | 20 | #include <asm/bug.h> |
19 | 21 | ||
@@ -188,11 +190,8 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
188 | asmlinkage int printk(const char * fmt, ...) | 190 | asmlinkage int printk(const char * fmt, ...) |
189 | __attribute__ ((format (printf, 1, 2))) __cold; | 191 | __attribute__ ((format (printf, 1, 2))) __cold; |
190 | 192 | ||
191 | extern int printk_ratelimit_jiffies; | 193 | extern struct ratelimit_state printk_ratelimit_state; |
192 | extern int printk_ratelimit_burst; | ||
193 | extern int printk_ratelimit(void); | 194 | extern int printk_ratelimit(void); |
194 | extern int __ratelimit(int ratelimit_jiffies, int ratelimit_burst); | ||
195 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); | ||
196 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 195 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
197 | unsigned int interval_msec); | 196 | unsigned int interval_msec); |
198 | #else | 197 | #else |
@@ -203,8 +202,6 @@ static inline int printk(const char *s, ...) | |||
203 | __attribute__ ((format (printf, 1, 2))); | 202 | __attribute__ ((format (printf, 1, 2))); |
204 | static inline int __cold printk(const char *s, ...) { return 0; } | 203 | static inline int __cold printk(const char *s, ...) { return 0; } |
205 | static inline int printk_ratelimit(void) { return 0; } | 204 | static inline int printk_ratelimit(void) { return 0; } |
206 | static inline int __printk_ratelimit(int ratelimit_jiffies, \ | ||
207 | int ratelimit_burst) { return 0; } | ||
208 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | 205 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ |
209 | unsigned int interval_msec) \ | 206 | unsigned int interval_msec) \ |
210 | { return false; } | 207 | { return false; } |
@@ -441,26 +438,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
441 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ | 438 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ |
442 | (type *)( (char *)__mptr - offsetof(type,member) );}) | 439 | (type *)( (char *)__mptr - offsetof(type,member) );}) |
443 | 440 | ||
444 | /* | ||
445 | * Check at compile time that something is of a particular type. | ||
446 | * Always evaluates to 1 so you may use it easily in comparisons. | ||
447 | */ | ||
448 | #define typecheck(type,x) \ | ||
449 | ({ type __dummy; \ | ||
450 | typeof(x) __dummy2; \ | ||
451 | (void)(&__dummy == &__dummy2); \ | ||
452 | 1; \ | ||
453 | }) | ||
454 | |||
455 | /* | ||
456 | * Check at compile time that 'function' is a certain type, or is a pointer | ||
457 | * to that type (needs to use typedef for the function type.) | ||
458 | */ | ||
459 | #define typecheck_fn(type,function) \ | ||
460 | ({ typeof(type) __tmp = function; \ | ||
461 | (void)__tmp; \ | ||
462 | }) | ||
463 | |||
464 | struct sysinfo; | 441 | struct sysinfo; |
465 | extern int do_sysinfo(struct sysinfo *info); | 442 | extern int do_sysinfo(struct sysinfo *info); |
466 | 443 | ||
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 0509c4ce4857..a1a91577813c 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -19,6 +19,7 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/gfp.h> | ||
22 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
23 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
24 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
@@ -41,8 +42,8 @@ struct file; | |||
41 | struct subprocess_info; | 42 | struct subprocess_info; |
42 | 43 | ||
43 | /* Allocate a subprocess_info structure */ | 44 | /* Allocate a subprocess_info structure */ |
44 | struct subprocess_info *call_usermodehelper_setup(char *path, | 45 | struct subprocess_info *call_usermodehelper_setup(char *path, char **argv, |
45 | char **argv, char **envp); | 46 | char **envp, gfp_t gfp_mask); |
46 | 47 | ||
47 | /* Set various pieces of state into the subprocess_info structure */ | 48 | /* Set various pieces of state into the subprocess_info structure */ |
48 | void call_usermodehelper_setkeys(struct subprocess_info *info, | 49 | void call_usermodehelper_setkeys(struct subprocess_info *info, |
@@ -69,8 +70,9 @@ static inline int | |||
69 | call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait) | 70 | call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait) |
70 | { | 71 | { |
71 | struct subprocess_info *info; | 72 | struct subprocess_info *info; |
73 | gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL; | ||
72 | 74 | ||
73 | info = call_usermodehelper_setup(path, argv, envp); | 75 | info = call_usermodehelper_setup(path, argv, envp, gfp_mask); |
74 | if (info == NULL) | 76 | if (info == NULL) |
75 | return -ENOMEM; | 77 | return -ENOMEM; |
76 | return call_usermodehelper_exec(info, wait); | 78 | return call_usermodehelper_exec(info, wait); |
@@ -81,8 +83,9 @@ call_usermodehelper_keys(char *path, char **argv, char **envp, | |||
81 | struct key *session_keyring, enum umh_wait wait) | 83 | struct key *session_keyring, enum umh_wait wait) |
82 | { | 84 | { |
83 | struct subprocess_info *info; | 85 | struct subprocess_info *info; |
86 | gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL; | ||
84 | 87 | ||
85 | info = call_usermodehelper_setup(path, argv, envp); | 88 | info = call_usermodehelper_setup(path, argv, envp, gfp_mask); |
86 | if (info == NULL) | 89 | if (info == NULL) |
87 | return -ENOMEM; | 90 | return -ENOMEM; |
88 | 91 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 60f0d418ae32..5437ac0276e2 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -186,6 +186,8 @@ extern struct kobject *kset_find_obj(struct kset *, const char *); | |||
186 | 186 | ||
187 | /* The global /sys/kernel/ kobject for people to chain off of */ | 187 | /* The global /sys/kernel/ kobject for people to chain off of */ |
188 | extern struct kobject *kernel_kobj; | 188 | extern struct kobject *kernel_kobj; |
189 | /* The global /sys/kernel/mm/ kobject for people to chain off of */ | ||
190 | extern struct kobject *mm_kobj; | ||
189 | /* The global /sys/hypervisor/ kobject for people to chain off of */ | 191 | /* The global /sys/hypervisor/ kobject for people to chain off of */ |
190 | extern struct kobject *hypervisor_kobj; | 192 | extern struct kobject *hypervisor_kobj; |
191 | /* The global /sys/power/ kobject for people to chain off of */ | 193 | /* The global /sys/power/ kobject for people to chain off of */ |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 04a3556bdea6..0be7795655fa 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -157,11 +157,10 @@ struct kretprobe { | |||
157 | int nmissed; | 157 | int nmissed; |
158 | size_t data_size; | 158 | size_t data_size; |
159 | struct hlist_head free_instances; | 159 | struct hlist_head free_instances; |
160 | struct hlist_head used_instances; | 160 | spinlock_t lock; |
161 | }; | 161 | }; |
162 | 162 | ||
163 | struct kretprobe_instance { | 163 | struct kretprobe_instance { |
164 | struct hlist_node uflist; /* either on free list or used list */ | ||
165 | struct hlist_node hlist; | 164 | struct hlist_node hlist; |
166 | struct kretprobe *rp; | 165 | struct kretprobe *rp; |
167 | kprobe_opcode_t *ret_addr; | 166 | kprobe_opcode_t *ret_addr; |
@@ -201,7 +200,6 @@ static inline int init_test_probes(void) | |||
201 | } | 200 | } |
202 | #endif /* CONFIG_KPROBES_SANITY_TEST */ | 201 | #endif /* CONFIG_KPROBES_SANITY_TEST */ |
203 | 202 | ||
204 | extern spinlock_t kretprobe_lock; | ||
205 | extern struct mutex kprobe_mutex; | 203 | extern struct mutex kprobe_mutex; |
206 | extern int arch_prepare_kprobe(struct kprobe *p); | 204 | extern int arch_prepare_kprobe(struct kprobe *p); |
207 | extern void arch_arm_kprobe(struct kprobe *p); | 205 | extern void arch_arm_kprobe(struct kprobe *p); |
@@ -214,6 +212,9 @@ extern void kprobes_inc_nmissed_count(struct kprobe *p); | |||
214 | 212 | ||
215 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ | 213 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ |
216 | struct kprobe *get_kprobe(void *addr); | 214 | struct kprobe *get_kprobe(void *addr); |
215 | void kretprobe_hash_lock(struct task_struct *tsk, | ||
216 | struct hlist_head **head, unsigned long *flags); | ||
217 | void kretprobe_hash_unlock(struct task_struct *tsk, unsigned long *flags); | ||
217 | struct hlist_head * kretprobe_inst_table_head(struct task_struct *tsk); | 218 | struct hlist_head * kretprobe_inst_table_head(struct task_struct *tsk); |
218 | 219 | ||
219 | /* kprobe_running() will just return the current_kprobe on this CPU */ | 220 | /* kprobe_running() will just return the current_kprobe on this CPU */ |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 00dd957e245b..aabc8a13ba71 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
@@ -6,7 +6,8 @@ | |||
6 | 6 | ||
7 | struct task_struct *kthread_create(int (*threadfn)(void *data), | 7 | struct task_struct *kthread_create(int (*threadfn)(void *data), |
8 | void *data, | 8 | void *data, |
9 | const char namefmt[], ...); | 9 | const char namefmt[], ...) |
10 | __attribute__((format(printf, 3, 4))); | ||
10 | 11 | ||
11 | /** | 12 | /** |
12 | * kthread_run - create and wake a thread. | 13 | * kthread_run - create and wake a thread. |
diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 1d379787f2e7..173febac6656 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h | |||
@@ -47,7 +47,7 @@ struct lcd_ops { | |||
47 | int (*set_contrast)(struct lcd_device *, int contrast); | 47 | int (*set_contrast)(struct lcd_device *, int contrast); |
48 | /* Check if given framebuffer device is the one LCD is bound to; | 48 | /* Check if given framebuffer device is the one LCD is bound to; |
49 | return 0 if not, !=0 if it is. If NULL, lcd always matches the fb. */ | 49 | return 0 if not, !=0 if it is. If NULL, lcd always matches the fb. */ |
50 | int (*check_fb)(struct fb_info *); | 50 | int (*check_fb)(struct lcd_device *, struct fb_info *); |
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct lcd_device { | 53 | struct lcd_device { |
diff --git a/include/linux/leds-pca9532.h b/include/linux/leds-pca9532.h new file mode 100644 index 000000000000..81b4207deb95 --- /dev/null +++ b/include/linux/leds-pca9532.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * pca9532.h - platform data structure for pca9532 led controller | ||
3 | * | ||
4 | * Copyright (C) 2008 Riku Voipio <riku.voipio@movial.fi> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * Datasheet: http://www.nxp.com/acrobat/datasheets/PCA9532_3.pdf | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __LINUX_PCA9532_H | ||
15 | #define __LINUX_PCA9532_H | ||
16 | |||
17 | #include <linux/leds.h> | ||
18 | |||
19 | enum pca9532_state { | ||
20 | PCA9532_OFF = 0x0, | ||
21 | PCA9532_ON = 0x1, | ||
22 | PCA9532_PWM0 = 0x2, | ||
23 | PCA9532_PWM1 = 0x3 | ||
24 | }; | ||
25 | |||
26 | enum pca9532_type { PCA9532_TYPE_NONE, PCA9532_TYPE_LED, | ||
27 | PCA9532_TYPE_N2100_BEEP }; | ||
28 | |||
29 | struct pca9532_led { | ||
30 | u8 id; | ||
31 | struct i2c_client *client; | ||
32 | char *name; | ||
33 | struct led_classdev ldev; | ||
34 | enum pca9532_type type; | ||
35 | enum pca9532_state state; | ||
36 | }; | ||
37 | |||
38 | struct pca9532_platform_data { | ||
39 | struct pca9532_led leds[16]; | ||
40 | u8 pwm[2]; | ||
41 | u8 psc[2]; | ||
42 | }; | ||
43 | |||
44 | #endif /* __LINUX_PCA9532_H */ | ||
45 | |||
diff --git a/include/linux/leds.h b/include/linux/leds.h index 519df72e939d..d41ccb56146a 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -48,7 +48,7 @@ struct led_classdev { | |||
48 | 48 | ||
49 | struct device *dev; | 49 | struct device *dev; |
50 | struct list_head node; /* LED Device list */ | 50 | struct list_head node; /* LED Device list */ |
51 | char *default_trigger; /* Trigger to use */ | 51 | const char *default_trigger; /* Trigger to use */ |
52 | 52 | ||
53 | #ifdef CONFIG_LEDS_TRIGGERS | 53 | #ifdef CONFIG_LEDS_TRIGGERS |
54 | /* Protects the trigger data below */ | 54 | /* Protects the trigger data below */ |
@@ -118,6 +118,20 @@ extern void ledtrig_ide_activity(void); | |||
118 | #define ledtrig_ide_activity() do {} while(0) | 118 | #define ledtrig_ide_activity() do {} while(0) |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | /* | ||
122 | * Generic LED platform data for describing LED names and default triggers. | ||
123 | */ | ||
124 | struct led_info { | ||
125 | const char *name; | ||
126 | char *default_trigger; | ||
127 | int flags; | ||
128 | }; | ||
129 | |||
130 | struct led_platform_data { | ||
131 | int num_leds; | ||
132 | struct led_info *leds; | ||
133 | }; | ||
134 | |||
121 | /* For the leds-gpio driver */ | 135 | /* For the leds-gpio driver */ |
122 | struct gpio_led { | 136 | struct gpio_led { |
123 | const char *name; | 137 | const char *name; |
diff --git a/include/linux/list.h b/include/linux/list.h index 139ec41d9c2e..453916bc0412 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -61,14 +61,10 @@ extern void __list_add(struct list_head *new, | |||
61 | * Insert a new entry after the specified head. | 61 | * Insert a new entry after the specified head. |
62 | * This is good for implementing stacks. | 62 | * This is good for implementing stacks. |
63 | */ | 63 | */ |
64 | #ifndef CONFIG_DEBUG_LIST | ||
65 | static inline void list_add(struct list_head *new, struct list_head *head) | 64 | static inline void list_add(struct list_head *new, struct list_head *head) |
66 | { | 65 | { |
67 | __list_add(new, head, head->next); | 66 | __list_add(new, head, head->next); |
68 | } | 67 | } |
69 | #else | ||
70 | extern void list_add(struct list_head *new, struct list_head *head); | ||
71 | #endif | ||
72 | 68 | ||
73 | 69 | ||
74 | /** | 70 | /** |
diff --git a/include/linux/major.h b/include/linux/major.h index 0cb98053537a..53d5fafd85c3 100644 --- a/include/linux/major.h +++ b/include/linux/major.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define STL_SIOMEMMAJOR 28 | 53 | #define STL_SIOMEMMAJOR 28 |
54 | #define ACSI_MAJOR 28 | 54 | #define ACSI_MAJOR 28 |
55 | #define AZTECH_CDROM_MAJOR 29 | 55 | #define AZTECH_CDROM_MAJOR 29 |
56 | #define GRAPHDEV_MAJOR 29 /* SparcLinux & Linux/68k /dev/fb */ | 56 | #define FB_MAJOR 29 /* /dev/fb* framebuffers */ |
57 | #define CM206_CDROM_MAJOR 32 | 57 | #define CM206_CDROM_MAJOR 32 |
58 | #define IDE2_MAJOR 33 | 58 | #define IDE2_MAJOR 33 |
59 | #define IDE3_MAJOR 34 | 59 | #define IDE3_MAJOR 34 |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index e6608776bc96..fdf3967e1397 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -35,7 +35,10 @@ extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm, | |||
35 | extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | 35 | extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, |
36 | gfp_t gfp_mask); | 36 | gfp_t gfp_mask); |
37 | extern void mem_cgroup_uncharge_page(struct page *page); | 37 | extern void mem_cgroup_uncharge_page(struct page *page); |
38 | extern void mem_cgroup_uncharge_cache_page(struct page *page); | ||
38 | extern void mem_cgroup_move_lists(struct page *page, bool active); | 39 | extern void mem_cgroup_move_lists(struct page *page, bool active); |
40 | extern int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask); | ||
41 | |||
39 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | 42 | extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, |
40 | struct list_head *dst, | 43 | struct list_head *dst, |
41 | unsigned long *scanned, int order, | 44 | unsigned long *scanned, int order, |
@@ -50,9 +53,9 @@ extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); | |||
50 | #define mm_match_cgroup(mm, cgroup) \ | 53 | #define mm_match_cgroup(mm, cgroup) \ |
51 | ((cgroup) == mem_cgroup_from_task((mm)->owner)) | 54 | ((cgroup) == mem_cgroup_from_task((mm)->owner)) |
52 | 55 | ||
53 | extern int mem_cgroup_prepare_migration(struct page *page); | 56 | extern int |
57 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage); | ||
54 | extern void mem_cgroup_end_migration(struct page *page); | 58 | extern void mem_cgroup_end_migration(struct page *page); |
55 | extern void mem_cgroup_page_migration(struct page *page, struct page *newpage); | ||
56 | 59 | ||
57 | /* | 60 | /* |
58 | * For memory reclaim. | 61 | * For memory reclaim. |
@@ -97,6 +100,15 @@ static inline void mem_cgroup_uncharge_page(struct page *page) | |||
97 | { | 100 | { |
98 | } | 101 | } |
99 | 102 | ||
103 | static inline void mem_cgroup_uncharge_cache_page(struct page *page) | ||
104 | { | ||
105 | } | ||
106 | |||
107 | static inline int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask) | ||
108 | { | ||
109 | return 0; | ||
110 | } | ||
111 | |||
100 | static inline void mem_cgroup_move_lists(struct page *page, bool active) | 112 | static inline void mem_cgroup_move_lists(struct page *page, bool active) |
101 | { | 113 | { |
102 | } | 114 | } |
@@ -112,7 +124,8 @@ static inline int task_in_mem_cgroup(struct task_struct *task, | |||
112 | return 1; | 124 | return 1; |
113 | } | 125 | } |
114 | 126 | ||
115 | static inline int mem_cgroup_prepare_migration(struct page *page) | 127 | static inline int |
128 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage) | ||
116 | { | 129 | { |
117 | return 0; | 130 | return 0; |
118 | } | 131 | } |
@@ -121,11 +134,6 @@ static inline void mem_cgroup_end_migration(struct page *page) | |||
121 | { | 134 | { |
122 | } | 135 | } |
123 | 136 | ||
124 | static inline void | ||
125 | mem_cgroup_page_migration(struct page *page, struct page *newpage) | ||
126 | { | ||
127 | } | ||
128 | |||
129 | static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) | 137 | static inline int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) |
130 | { | 138 | { |
131 | return 0; | 139 | return 0; |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index ea9f5ad9ec8e..763ba81fc0f0 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -13,12 +13,12 @@ struct mem_section; | |||
13 | #ifdef CONFIG_MEMORY_HOTPLUG | 13 | #ifdef CONFIG_MEMORY_HOTPLUG |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Magic number for free bootmem. | 16 | * Types for free bootmem. |
17 | * The normal smallest mapcount is -1. Here is smaller value than it. | 17 | * The normal smallest mapcount is -1. Here is smaller value than it. |
18 | */ | 18 | */ |
19 | #define SECTION_INFO 0xfffffffe | 19 | #define SECTION_INFO (-1 - 1) |
20 | #define MIX_INFO 0xfffffffd | 20 | #define MIX_SECTION_INFO (-1 - 2) |
21 | #define NODE_INFO 0xfffffffc | 21 | #define NODE_INFO (-1 - 3) |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * pgdat resizing functions | 24 | * pgdat resizing functions |
@@ -199,6 +199,18 @@ extern int walk_memory_resource(unsigned long start_pfn, | |||
199 | unsigned long nr_pages, void *arg, | 199 | unsigned long nr_pages, void *arg, |
200 | int (*func)(unsigned long, unsigned long, void *)); | 200 | int (*func)(unsigned long, unsigned long, void *)); |
201 | 201 | ||
202 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
203 | |||
204 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); | ||
205 | |||
206 | #else | ||
207 | static inline int is_mem_section_removable(unsigned long pfn, | ||
208 | unsigned long nr_pages) | ||
209 | { | ||
210 | return 0; | ||
211 | } | ||
212 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | ||
213 | |||
202 | extern int add_memory(int nid, u64 start, u64 size); | 214 | extern int add_memory(int nid, u64 start, u64 size); |
203 | extern int arch_add_memory(int nid, u64 start, u64 size); | 215 | extern int arch_add_memory(int nid, u64 start, u64 size); |
204 | extern int remove_memory(u64 start, u64 size); | 216 | extern int remove_memory(u64 start, u64 size); |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 3a39570b81b8..085c903fe0f1 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -59,6 +59,7 @@ enum { | |||
59 | #include <linux/rbtree.h> | 59 | #include <linux/rbtree.h> |
60 | #include <linux/spinlock.h> | 60 | #include <linux/spinlock.h> |
61 | #include <linux/nodemask.h> | 61 | #include <linux/nodemask.h> |
62 | #include <linux/pagemap.h> | ||
62 | 63 | ||
63 | struct mm_struct; | 64 | struct mm_struct; |
64 | 65 | ||
@@ -220,6 +221,24 @@ extern int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context); | |||
220 | extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, | 221 | extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, |
221 | int no_context); | 222 | int no_context); |
222 | #endif | 223 | #endif |
224 | |||
225 | /* Check if a vma is migratable */ | ||
226 | static inline int vma_migratable(struct vm_area_struct *vma) | ||
227 | { | ||
228 | if (vma->vm_flags & (VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED)) | ||
229 | return 0; | ||
230 | /* | ||
231 | * Migration allocates pages in the highest zone. If we cannot | ||
232 | * do so then migration (at least from node to node) is not | ||
233 | * possible. | ||
234 | */ | ||
235 | if (vma->vm_file && | ||
236 | gfp_zone(mapping_gfp_mask(vma->vm_file->f_mapping)) | ||
237 | < policy_zone) | ||
238 | return 0; | ||
239 | return 1; | ||
240 | } | ||
241 | |||
223 | #else | 242 | #else |
224 | 243 | ||
225 | struct mempolicy {}; | 244 | struct mempolicy {}; |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index e10a90a93b5d..03aea612d284 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -3,28 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/mempolicy.h> | 5 | #include <linux/mempolicy.h> |
6 | #include <linux/pagemap.h> | ||
7 | 6 | ||
8 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); | 7 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); |
9 | 8 | ||
10 | #ifdef CONFIG_MIGRATION | 9 | #ifdef CONFIG_MIGRATION |
11 | /* Check if a vma is migratable */ | ||
12 | static inline int vma_migratable(struct vm_area_struct *vma) | ||
13 | { | ||
14 | if (vma->vm_flags & (VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED)) | ||
15 | return 0; | ||
16 | /* | ||
17 | * Migration allocates pages in the highest zone. If we cannot | ||
18 | * do so then migration (at least from node to node) is not | ||
19 | * possible. | ||
20 | */ | ||
21 | if (vma->vm_file && | ||
22 | gfp_zone(mapping_gfp_mask(vma->vm_file->f_mapping)) | ||
23 | < policy_zone) | ||
24 | return 0; | ||
25 | return 1; | ||
26 | } | ||
27 | |||
28 | extern int isolate_lru_page(struct page *p, struct list_head *pagelist); | 10 | extern int isolate_lru_page(struct page *p, struct list_head *pagelist); |
29 | extern int putback_lru_pages(struct list_head *l); | 11 | extern int putback_lru_pages(struct list_head *l); |
30 | extern int migrate_page(struct address_space *, | 12 | extern int migrate_page(struct address_space *, |
@@ -39,9 +21,6 @@ extern int migrate_vmas(struct mm_struct *mm, | |||
39 | const nodemask_t *from, const nodemask_t *to, | 21 | const nodemask_t *from, const nodemask_t *to, |
40 | unsigned long flags); | 22 | unsigned long flags); |
41 | #else | 23 | #else |
42 | static inline int vma_migratable(struct vm_area_struct *vma) | ||
43 | { return 0; } | ||
44 | |||
45 | static inline int isolate_lru_page(struct page *p, struct list_head *list) | 24 | static inline int isolate_lru_page(struct page *p, struct list_head *list) |
46 | { return -ENOSYS; } | 25 | { return -ENOSYS; } |
47 | static inline int putback_lru_pages(struct list_head *l) { return 0; } | 26 | static inline int putback_lru_pages(struct list_head *l) { return 0; } |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 81b3dd5206e0..655ea0d1ee14 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -68,6 +68,14 @@ enum { | |||
68 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21 | 68 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21 |
69 | }; | 69 | }; |
70 | 70 | ||
71 | enum { | ||
72 | MLX4_BMME_FLAG_LOCAL_INV = 1 << 6, | ||
73 | MLX4_BMME_FLAG_REMOTE_INV = 1 << 7, | ||
74 | MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, | ||
75 | MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, | ||
76 | MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, | ||
77 | }; | ||
78 | |||
71 | enum mlx4_event { | 79 | enum mlx4_event { |
72 | MLX4_EVENT_TYPE_COMP = 0x00, | 80 | MLX4_EVENT_TYPE_COMP = 0x00, |
73 | MLX4_EVENT_TYPE_PATH_MIG = 0x01, | 81 | MLX4_EVENT_TYPE_PATH_MIG = 0x01, |
@@ -184,6 +192,8 @@ struct mlx4_caps { | |||
184 | u32 max_msg_sz; | 192 | u32 max_msg_sz; |
185 | u32 page_size_cap; | 193 | u32 page_size_cap; |
186 | u32 flags; | 194 | u32 flags; |
195 | u32 bmme_flags; | ||
196 | u32 reserved_lkey; | ||
187 | u16 stat_rate_support; | 197 | u16 stat_rate_support; |
188 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; | 198 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; |
189 | int max_gso_sz; | 199 | int max_gso_sz; |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 7f128b266faa..e27082cd650e 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -219,7 +219,7 @@ struct mlx4_wqe_datagram_seg { | |||
219 | __be32 reservd[2]; | 219 | __be32 reservd[2]; |
220 | }; | 220 | }; |
221 | 221 | ||
222 | struct mlx4_lso_seg { | 222 | struct mlx4_wqe_lso_seg { |
223 | __be32 mss_hdr_size; | 223 | __be32 mss_hdr_size; |
224 | __be32 header[0]; | 224 | __be32 header[0]; |
225 | }; | 225 | }; |
@@ -233,6 +233,14 @@ struct mlx4_wqe_bind_seg { | |||
233 | __be64 length; | 233 | __be64 length; |
234 | }; | 234 | }; |
235 | 235 | ||
236 | enum { | ||
237 | MLX4_WQE_FMR_PERM_LOCAL_READ = 1 << 27, | ||
238 | MLX4_WQE_FMR_PERM_LOCAL_WRITE = 1 << 28, | ||
239 | MLX4_WQE_FMR_PERM_REMOTE_READ = 1 << 29, | ||
240 | MLX4_WQE_FMR_PERM_REMOTE_WRITE = 1 << 30, | ||
241 | MLX4_WQE_FMR_PERM_ATOMIC = 1 << 31 | ||
242 | }; | ||
243 | |||
236 | struct mlx4_wqe_fmr_seg { | 244 | struct mlx4_wqe_fmr_seg { |
237 | __be32 flags; | 245 | __be32 flags; |
238 | __be32 mem_key; | 246 | __be32 mem_key; |
@@ -255,11 +263,11 @@ struct mlx4_wqe_fmr_ext_seg { | |||
255 | }; | 263 | }; |
256 | 264 | ||
257 | struct mlx4_wqe_local_inval_seg { | 265 | struct mlx4_wqe_local_inval_seg { |
258 | u8 flags; | 266 | __be32 flags; |
259 | u8 reserved1[3]; | 267 | u32 reserved1; |
260 | __be32 mem_key; | 268 | __be32 mem_key; |
261 | u8 reserved2[3]; | 269 | u32 reserved2[2]; |
262 | u8 guest_id; | 270 | __be32 guest_id; |
263 | __be64 pa; | 271 | __be64 pa; |
264 | }; | 272 | }; |
265 | 273 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 2128ef7780c6..d87a5a5fe87d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -41,6 +41,9 @@ extern unsigned long mmap_min_addr; | |||
41 | 41 | ||
42 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) | 42 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) |
43 | 43 | ||
44 | /* to align the pointer to the (next) page boundary */ | ||
45 | #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) | ||
46 | |||
44 | /* | 47 | /* |
45 | * Linux kernel virtual memory manager primitives. | 48 | * Linux kernel virtual memory manager primitives. |
46 | * The idea being to have a "virtual" mm in the same way | 49 | * The idea being to have a "virtual" mm in the same way |
@@ -100,6 +103,7 @@ extern unsigned int kobjsize(const void *objp); | |||
100 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ | 103 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ |
101 | #define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */ | 104 | #define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */ |
102 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ | 105 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ |
106 | #define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */ | ||
103 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ | 107 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ |
104 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ | 108 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
105 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ | 109 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ |
@@ -166,12 +170,16 @@ struct vm_operations_struct { | |||
166 | void (*open)(struct vm_area_struct * area); | 170 | void (*open)(struct vm_area_struct * area); |
167 | void (*close)(struct vm_area_struct * area); | 171 | void (*close)(struct vm_area_struct * area); |
168 | int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); | 172 | int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); |
169 | unsigned long (*nopfn)(struct vm_area_struct *area, | ||
170 | unsigned long address); | ||
171 | 173 | ||
172 | /* notification that a previously read-only page is about to become | 174 | /* notification that a previously read-only page is about to become |
173 | * writable, if an error is returned it will cause a SIGBUS */ | 175 | * writable, if an error is returned it will cause a SIGBUS */ |
174 | int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); | 176 | int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); |
177 | |||
178 | /* called by access_process_vm when get_user_pages() fails, typically | ||
179 | * for use by special VMAs that can switch between memory and hardware | ||
180 | */ | ||
181 | int (*access)(struct vm_area_struct *vma, unsigned long addr, | ||
182 | void *buf, int len, int write); | ||
175 | #ifdef CONFIG_NUMA | 183 | #ifdef CONFIG_NUMA |
176 | /* | 184 | /* |
177 | * set_policy() op must add a reference to any non-NULL @new mempolicy | 185 | * set_policy() op must add a reference to any non-NULL @new mempolicy |
@@ -675,13 +683,6 @@ static inline int page_mapped(struct page *page) | |||
675 | } | 683 | } |
676 | 684 | ||
677 | /* | 685 | /* |
678 | * Error return values for the *_nopfn functions | ||
679 | */ | ||
680 | #define NOPFN_SIGBUS ((unsigned long) -1) | ||
681 | #define NOPFN_OOM ((unsigned long) -2) | ||
682 | #define NOPFN_REFAULT ((unsigned long) -3) | ||
683 | |||
684 | /* | ||
685 | * Different kinds of faults, as returned by handle_mm_fault(). | 686 | * Different kinds of faults, as returned by handle_mm_fault(). |
686 | * Used to decide whether a process gets delivered SIGBUS or | 687 | * Used to decide whether a process gets delivered SIGBUS or |
687 | * just gets major/minor fault counters bumped up. | 688 | * just gets major/minor fault counters bumped up. |
@@ -772,14 +773,14 @@ struct mm_walk { | |||
772 | 773 | ||
773 | int walk_page_range(unsigned long addr, unsigned long end, | 774 | int walk_page_range(unsigned long addr, unsigned long end, |
774 | struct mm_walk *walk); | 775 | struct mm_walk *walk); |
775 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 776 | void free_pgd_range(struct mmu_gather *tlb, unsigned long addr, |
776 | unsigned long end, unsigned long floor, unsigned long ceiling); | 777 | unsigned long end, unsigned long floor, unsigned long ceiling); |
777 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, | ||
778 | unsigned long floor, unsigned long ceiling); | ||
779 | int copy_page_range(struct mm_struct *dst, struct mm_struct *src, | 778 | int copy_page_range(struct mm_struct *dst, struct mm_struct *src, |
780 | struct vm_area_struct *vma); | 779 | struct vm_area_struct *vma); |
781 | void unmap_mapping_range(struct address_space *mapping, | 780 | void unmap_mapping_range(struct address_space *mapping, |
782 | loff_t const holebegin, loff_t const holelen, int even_cows); | 781 | loff_t const holebegin, loff_t const holelen, int even_cows); |
782 | int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, | ||
783 | void *buf, int len, int write); | ||
783 | 784 | ||
784 | static inline void unmap_shared_mapping_range(struct address_space *mapping, | 785 | static inline void unmap_shared_mapping_range(struct address_space *mapping, |
785 | loff_t const holebegin, loff_t const holelen) | 786 | loff_t const holebegin, loff_t const holelen) |
@@ -965,9 +966,8 @@ static inline void pgtable_page_dtor(struct page *page) | |||
965 | NULL: pte_offset_kernel(pmd, address)) | 966 | NULL: pte_offset_kernel(pmd, address)) |
966 | 967 | ||
967 | extern void free_area_init(unsigned long * zones_size); | 968 | extern void free_area_init(unsigned long * zones_size); |
968 | extern void free_area_init_node(int nid, pg_data_t *pgdat, | 969 | extern void free_area_init_node(int nid, unsigned long * zones_size, |
969 | unsigned long * zones_size, unsigned long zone_start_pfn, | 970 | unsigned long zone_start_pfn, unsigned long *zholes_size); |
970 | unsigned long *zholes_size); | ||
971 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP | 971 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP |
972 | /* | 972 | /* |
973 | * With CONFIG_ARCH_POPULATES_NODE_MAP set, an architecture may initialise its | 973 | * With CONFIG_ARCH_POPULATES_NODE_MAP set, an architecture may initialise its |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 02a27ae78539..746f975b58ef 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -159,6 +159,17 @@ struct vm_area_struct { | |||
159 | #endif | 159 | #endif |
160 | }; | 160 | }; |
161 | 161 | ||
162 | struct core_thread { | ||
163 | struct task_struct *task; | ||
164 | struct core_thread *next; | ||
165 | }; | ||
166 | |||
167 | struct core_state { | ||
168 | atomic_t nr_threads; | ||
169 | struct core_thread dumper; | ||
170 | struct completion startup; | ||
171 | }; | ||
172 | |||
162 | struct mm_struct { | 173 | struct mm_struct { |
163 | struct vm_area_struct * mmap; /* list of VMAs */ | 174 | struct vm_area_struct * mmap; /* list of VMAs */ |
164 | struct rb_root mm_rb; | 175 | struct rb_root mm_rb; |
@@ -175,7 +186,6 @@ struct mm_struct { | |||
175 | atomic_t mm_users; /* How many users with user space? */ | 186 | atomic_t mm_users; /* How many users with user space? */ |
176 | atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ | 187 | atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ |
177 | int map_count; /* number of VMAs */ | 188 | int map_count; /* number of VMAs */ |
178 | int core_waiters; | ||
179 | struct rw_semaphore mmap_sem; | 189 | struct rw_semaphore mmap_sem; |
180 | spinlock_t page_table_lock; /* Protects page tables and some counters */ | 190 | spinlock_t page_table_lock; /* Protects page tables and some counters */ |
181 | 191 | ||
@@ -219,8 +229,7 @@ struct mm_struct { | |||
219 | 229 | ||
220 | unsigned long flags; /* Must use atomic bitops to access the bits */ | 230 | unsigned long flags; /* Must use atomic bitops to access the bits */ |
221 | 231 | ||
222 | /* coredumping support */ | 232 | struct core_state *core_state; /* coredumping support */ |
223 | struct completion *core_startup_done, core_done; | ||
224 | 233 | ||
225 | /* aio bits */ | 234 | /* aio bits */ |
226 | rwlock_t ioctx_list_lock; /* aio lock */ | 235 | rwlock_t ioctx_list_lock; /* aio lock */ |
diff --git a/include/linux/module.h b/include/linux/module.h index fce15ebd0e1c..68e09557c951 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -23,7 +23,7 @@ | |||
23 | /* Not Yet Implemented */ | 23 | /* Not Yet Implemented */ |
24 | #define MODULE_SUPPORTED_DEVICE(name) | 24 | #define MODULE_SUPPORTED_DEVICE(name) |
25 | 25 | ||
26 | /* v850 toolchain uses a `_' prefix for all user symbols */ | 26 | /* some toolchains uses a `_' prefix for all user symbols */ |
27 | #ifndef MODULE_SYMBOL_PREFIX | 27 | #ifndef MODULE_SYMBOL_PREFIX |
28 | #define MODULE_SYMBOL_PREFIX "" | 28 | #define MODULE_SYMBOL_PREFIX "" |
29 | #endif | 29 | #endif |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 81cd36b735b0..ba63858056c7 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -2,11 +2,11 @@ | |||
2 | #define _LINUX_MSDOS_FS_H | 2 | #define _LINUX_MSDOS_FS_H |
3 | 3 | ||
4 | #include <linux/magic.h> | 4 | #include <linux/magic.h> |
5 | #include <asm/byteorder.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * The MS-DOS filesystem constants/structures | 8 | * The MS-DOS filesystem constants/structures |
8 | */ | 9 | */ |
9 | #include <asm/byteorder.h> | ||
10 | 10 | ||
11 | #define SECTOR_SIZE 512 /* sector size (bytes) */ | 11 | #define SECTOR_SIZE 512 /* sector size (bytes) */ |
12 | #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ | 12 | #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ |
@@ -89,24 +89,22 @@ | |||
89 | #define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \ | 89 | #define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \ |
90 | && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) | 90 | && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) |
91 | 91 | ||
92 | struct __fat_dirent { | ||
93 | long d_ino; | ||
94 | __kernel_off_t d_off; | ||
95 | unsigned short d_reclen; | ||
96 | char d_name[256]; /* We must not include limits.h! */ | ||
97 | }; | ||
98 | |||
92 | /* | 99 | /* |
93 | * ioctl commands | 100 | * ioctl commands |
94 | */ | 101 | */ |
95 | #define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2]) | 102 | #define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct __fat_dirent[2]) |
96 | #define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct dirent [2]) | 103 | #define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct __fat_dirent[2]) |
97 | /* <linux/videotext.h> has used 0x72 ('r') in collision, so skip a few */ | 104 | /* <linux/videotext.h> has used 0x72 ('r') in collision, so skip a few */ |
98 | #define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) | 105 | #define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) |
99 | #define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32) | 106 | #define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32) |
100 | 107 | ||
101 | /* | ||
102 | * vfat shortname flags | ||
103 | */ | ||
104 | #define VFAT_SFN_DISPLAY_LOWER 0x0001 /* convert to lowercase for display */ | ||
105 | #define VFAT_SFN_DISPLAY_WIN95 0x0002 /* emulate win95 rule for display */ | ||
106 | #define VFAT_SFN_DISPLAY_WINNT 0x0004 /* emulate winnt rule for display */ | ||
107 | #define VFAT_SFN_CREATE_WIN95 0x0100 /* emulate win95 rule for create */ | ||
108 | #define VFAT_SFN_CREATE_WINNT 0x0200 /* emulate winnt rule for create */ | ||
109 | |||
110 | struct fat_boot_sector { | 108 | struct fat_boot_sector { |
111 | __u8 ignored[3]; /* Boot strap short or near jump */ | 109 | __u8 ignored[3]; /* Boot strap short or near jump */ |
112 | __u8 system_id[8]; /* Name - can be used to special case | 110 | __u8 system_id[8]; /* Name - can be used to special case |
@@ -168,14 +166,6 @@ struct msdos_dir_slot { | |||
168 | __u8 name11_12[4]; /* last 2 characters in name */ | 166 | __u8 name11_12[4]; /* last 2 characters in name */ |
169 | }; | 167 | }; |
170 | 168 | ||
171 | struct fat_slot_info { | ||
172 | loff_t i_pos; /* on-disk position of directory entry */ | ||
173 | loff_t slot_off; /* offset for slot or de start */ | ||
174 | int nr_slots; /* number of slots + 1(de) in filename */ | ||
175 | struct msdos_dir_entry *de; | ||
176 | struct buffer_head *bh; | ||
177 | }; | ||
178 | |||
179 | #ifdef __KERNEL__ | 169 | #ifdef __KERNEL__ |
180 | 170 | ||
181 | #include <linux/buffer_head.h> | 171 | #include <linux/buffer_head.h> |
@@ -184,6 +174,15 @@ struct fat_slot_info { | |||
184 | #include <linux/fs.h> | 174 | #include <linux/fs.h> |
185 | #include <linux/mutex.h> | 175 | #include <linux/mutex.h> |
186 | 176 | ||
177 | /* | ||
178 | * vfat shortname flags | ||
179 | */ | ||
180 | #define VFAT_SFN_DISPLAY_LOWER 0x0001 /* convert to lowercase for display */ | ||
181 | #define VFAT_SFN_DISPLAY_WIN95 0x0002 /* emulate win95 rule for display */ | ||
182 | #define VFAT_SFN_DISPLAY_WINNT 0x0004 /* emulate winnt rule for display */ | ||
183 | #define VFAT_SFN_CREATE_WIN95 0x0100 /* emulate win95 rule for create */ | ||
184 | #define VFAT_SFN_CREATE_WINNT 0x0200 /* emulate winnt rule for create */ | ||
185 | |||
187 | struct fat_mount_options { | 186 | struct fat_mount_options { |
188 | uid_t fs_uid; | 187 | uid_t fs_uid; |
189 | gid_t fs_gid; | 188 | gid_t fs_gid; |
@@ -202,10 +201,10 @@ struct fat_mount_options { | |||
202 | utf8:1, /* Use of UTF-8 character set (Default) */ | 201 | utf8:1, /* Use of UTF-8 character set (Default) */ |
203 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ | 202 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ |
204 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ | 203 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ |
205 | atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */ | ||
206 | flush:1, /* write things quickly */ | 204 | flush:1, /* write things quickly */ |
207 | nocase:1, /* Does this need case conversion? 0=need case conversion*/ | 205 | nocase:1, /* Does this need case conversion? 0=need case conversion*/ |
208 | usefree:1; /* Use free_clusters for FAT32 */ | 206 | usefree:1, /* Use free_clusters for FAT32 */ |
207 | tz_utc:1; /* Filesystem timestamps are in UTC */ | ||
209 | }; | 208 | }; |
210 | 209 | ||
211 | #define FAT_HASH_BITS 8 | 210 | #define FAT_HASH_BITS 8 |
@@ -267,6 +266,14 @@ struct msdos_inode_info { | |||
267 | struct inode vfs_inode; | 266 | struct inode vfs_inode; |
268 | }; | 267 | }; |
269 | 268 | ||
269 | struct fat_slot_info { | ||
270 | loff_t i_pos; /* on-disk position of directory entry */ | ||
271 | loff_t slot_off; /* offset for slot or de start */ | ||
272 | int nr_slots; /* number of slots + 1(de) in filename */ | ||
273 | struct msdos_dir_entry *de; | ||
274 | struct buffer_head *bh; | ||
275 | }; | ||
276 | |||
270 | static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb) | 277 | static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb) |
271 | { | 278 | { |
272 | return sb->s_fs_info; | 279 | return sb->s_fs_info; |
@@ -428,8 +435,9 @@ extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | |||
428 | extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); | 435 | extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); |
429 | extern void fat_clusters_flush(struct super_block *sb); | 436 | extern void fat_clusters_flush(struct super_block *sb); |
430 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); | 437 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); |
431 | extern int date_dos2unix(unsigned short time, unsigned short date); | 438 | extern int date_dos2unix(unsigned short time, unsigned short date, int tz_utc); |
432 | extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date); | 439 | extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date, |
440 | int tz_utc); | ||
433 | extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); | 441 | extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); |
434 | 442 | ||
435 | int fat_cache_init(void); | 443 | int fat_cache_init(void); |
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h index f71201d0f3e7..6316fafe5c2a 100644 --- a/include/linux/mtd/ubi.h +++ b/include/linux/mtd/ubi.h | |||
@@ -45,13 +45,13 @@ enum { | |||
45 | * @size: how many physical eraseblocks are reserved for this volume | 45 | * @size: how many physical eraseblocks are reserved for this volume |
46 | * @used_bytes: how many bytes of data this volume contains | 46 | * @used_bytes: how many bytes of data this volume contains |
47 | * @used_ebs: how many physical eraseblocks of this volume actually contain any | 47 | * @used_ebs: how many physical eraseblocks of this volume actually contain any |
48 | * data | 48 | * data |
49 | * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) | 49 | * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) |
50 | * @corrupted: non-zero if the volume is corrupted (static volumes only) | 50 | * @corrupted: non-zero if the volume is corrupted (static volumes only) |
51 | * @upd_marker: non-zero if the volume has update marker set | 51 | * @upd_marker: non-zero if the volume has update marker set |
52 | * @alignment: volume alignment | 52 | * @alignment: volume alignment |
53 | * @usable_leb_size: how many bytes are available in logical eraseblocks of | 53 | * @usable_leb_size: how many bytes are available in logical eraseblocks of |
54 | * this volume | 54 | * this volume |
55 | * @name_len: volume name length | 55 | * @name_len: volume name length |
56 | * @name: volume name | 56 | * @name: volume name |
57 | * @cdev: UBI volume character device major and minor numbers | 57 | * @cdev: UBI volume character device major and minor numbers |
@@ -152,6 +152,7 @@ int ubi_leb_erase(struct ubi_volume_desc *desc, int lnum); | |||
152 | int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum); | 152 | int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum); |
153 | int ubi_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype); | 153 | int ubi_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype); |
154 | int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum); | 154 | int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum); |
155 | int ubi_sync(int ubi_num); | ||
155 | 156 | ||
156 | /* | 157 | /* |
157 | * This function is the same as the 'ubi_leb_read()' function, but it does not | 158 | * This function is the same as the 'ubi_leb_read()' function, but it does not |
diff --git a/include/linux/net.h b/include/linux/net.h index 150a48c68d52..4a9a30f2d68f 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
22 | #include <linux/socket.h> | 22 | #include <linux/socket.h> |
23 | #include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */ | ||
23 | #include <asm/socket.h> | 24 | #include <asm/socket.h> |
24 | 25 | ||
25 | struct poll_table_struct; | 26 | struct poll_table_struct; |
@@ -46,6 +47,7 @@ struct net; | |||
46 | #define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ | 47 | #define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ |
47 | #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ | 48 | #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ |
48 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ | 49 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ |
50 | #define SYS_PACCEPT 18 /* sys_paccept(2) */ | ||
49 | 51 | ||
50 | typedef enum { | 52 | typedef enum { |
51 | SS_FREE = 0, /* not allocated */ | 53 | SS_FREE = 0, /* not allocated */ |
@@ -94,6 +96,15 @@ enum sock_type { | |||
94 | }; | 96 | }; |
95 | 97 | ||
96 | #define SOCK_MAX (SOCK_PACKET + 1) | 98 | #define SOCK_MAX (SOCK_PACKET + 1) |
99 | /* Mask which covers at least up to SOCK_MASK-1. The | ||
100 | * remaining bits are used as flags. */ | ||
101 | #define SOCK_TYPE_MASK 0xf | ||
102 | |||
103 | /* Flags for socket, socketpair, paccept */ | ||
104 | #define SOCK_CLOEXEC O_CLOEXEC | ||
105 | #ifndef SOCK_NONBLOCK | ||
106 | #define SOCK_NONBLOCK O_NONBLOCK | ||
107 | #endif | ||
97 | 108 | ||
98 | #endif /* ARCH_HAS_SOCKET_TYPES */ | 109 | #endif /* ARCH_HAS_SOCKET_TYPES */ |
99 | 110 | ||
@@ -208,10 +219,12 @@ extern int sock_sendmsg(struct socket *sock, struct msghdr *msg, | |||
208 | size_t len); | 219 | size_t len); |
209 | extern int sock_recvmsg(struct socket *sock, struct msghdr *msg, | 220 | extern int sock_recvmsg(struct socket *sock, struct msghdr *msg, |
210 | size_t size, int flags); | 221 | size_t size, int flags); |
211 | extern int sock_map_fd(struct socket *sock); | 222 | extern int sock_map_fd(struct socket *sock, int flags); |
212 | extern struct socket *sockfd_lookup(int fd, int *err); | 223 | extern struct socket *sockfd_lookup(int fd, int *err); |
213 | #define sockfd_put(sock) fput(sock->file) | 224 | #define sockfd_put(sock) fput(sock->file) |
214 | extern int net_ratelimit(void); | 225 | extern int net_ratelimit(void); |
226 | extern long do_accept(int fd, struct sockaddr __user *upeer_sockaddr, | ||
227 | int __user *upeer_addrlen, int flags); | ||
215 | 228 | ||
216 | #define net_random() random32() | 229 | #define net_random() random32() |
217 | #define net_srandom(seed) srandom32((__force u32)seed) | 230 | #define net_srandom(seed) srandom32((__force u32)seed) |
@@ -338,8 +351,7 @@ static const struct proto_ops name##_ops = { \ | |||
338 | 351 | ||
339 | #ifdef CONFIG_SYSCTL | 352 | #ifdef CONFIG_SYSCTL |
340 | #include <linux/sysctl.h> | 353 | #include <linux/sysctl.h> |
341 | extern int net_msg_cost; | 354 | extern struct ratelimit_state net_ratelimit_state; |
342 | extern int net_msg_burst; | ||
343 | #endif | 355 | #endif |
344 | 356 | ||
345 | #endif /* __KERNEL__ */ | 357 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index a2861d95ecc3..108f47e5fd95 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/unistd.h> | 14 | #include <linux/unistd.h> |
15 | #include <linux/dirent.h> | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/posix_acl.h> | 16 | #include <linux/posix_acl.h> |
18 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index bd3d72ddf333..da2698b0fdd1 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -214,6 +214,8 @@ static inline int notifier_to_errno(int ret) | |||
214 | #define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */ | 214 | #define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */ |
215 | #define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task, | 215 | #define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task, |
216 | * not handling interrupts, soon dead */ | 216 | * not handling interrupts, soon dead */ |
217 | #define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug | ||
218 | * lock is dropped */ | ||
217 | 219 | ||
218 | /* Used for CPU hotplug events occuring while tasks are frozen due to a suspend | 220 | /* Used for CPU hotplug events occuring while tasks are frozen due to a suspend |
219 | * operation in progress | 221 | * operation in progress |
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 0e66b57631fc..c8a768e59640 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h | |||
@@ -82,9 +82,12 @@ static inline void get_nsproxy(struct nsproxy *ns) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | #ifdef CONFIG_CGROUP_NS | 84 | #ifdef CONFIG_CGROUP_NS |
85 | int ns_cgroup_clone(struct task_struct *tsk); | 85 | int ns_cgroup_clone(struct task_struct *tsk, struct pid *pid); |
86 | #else | 86 | #else |
87 | static inline int ns_cgroup_clone(struct task_struct *tsk) { return 0; } | 87 | static inline int ns_cgroup_clone(struct task_struct *tsk, struct pid *pid) |
88 | { | ||
89 | return 0; | ||
90 | } | ||
88 | #endif | 91 | #endif |
89 | 92 | ||
90 | #endif | 93 | #endif |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 0d2a4e7012aa..54590a9a103e 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -96,7 +96,22 @@ enum pageflags { | |||
96 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR | 96 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR |
97 | PG_uncached, /* Page has been mapped as uncached */ | 97 | PG_uncached, /* Page has been mapped as uncached */ |
98 | #endif | 98 | #endif |
99 | __NR_PAGEFLAGS | 99 | __NR_PAGEFLAGS, |
100 | |||
101 | /* Filesystems */ | ||
102 | PG_checked = PG_owner_priv_1, | ||
103 | |||
104 | /* XEN */ | ||
105 | PG_pinned = PG_owner_priv_1, | ||
106 | PG_savepinned = PG_dirty, | ||
107 | |||
108 | /* SLOB */ | ||
109 | PG_slob_page = PG_active, | ||
110 | PG_slob_free = PG_private, | ||
111 | |||
112 | /* SLUB */ | ||
113 | PG_slub_frozen = PG_active, | ||
114 | PG_slub_debug = PG_error, | ||
100 | }; | 115 | }; |
101 | 116 | ||
102 | #ifndef __GENERATING_BOUNDS_H | 117 | #ifndef __GENERATING_BOUNDS_H |
@@ -155,13 +170,19 @@ PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty) | |||
155 | PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru) | 170 | PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru) |
156 | PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active) | 171 | PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active) |
157 | __PAGEFLAG(Slab, slab) | 172 | __PAGEFLAG(Slab, slab) |
158 | PAGEFLAG(Checked, owner_priv_1) /* Used by some filesystems */ | 173 | PAGEFLAG(Checked, checked) /* Used by some filesystems */ |
159 | PAGEFLAG(Pinned, owner_priv_1) TESTSCFLAG(Pinned, owner_priv_1) /* Xen */ | 174 | PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen */ |
160 | PAGEFLAG(SavePinned, dirty); /* Xen */ | 175 | PAGEFLAG(SavePinned, savepinned); /* Xen */ |
161 | PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved) | 176 | PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved) |
162 | PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private) | 177 | PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private) |
163 | __SETPAGEFLAG(Private, private) | 178 | __SETPAGEFLAG(Private, private) |
164 | 179 | ||
180 | __PAGEFLAG(SlobPage, slob_page) | ||
181 | __PAGEFLAG(SlobFree, slob_free) | ||
182 | |||
183 | __PAGEFLAG(SlubFrozen, slub_frozen) | ||
184 | __PAGEFLAG(SlubDebug, slub_debug) | ||
185 | |||
165 | /* | 186 | /* |
166 | * Only test-and-set exist for PG_writeback. The unconditional operators are | 187 | * Only test-and-set exist for PG_writeback. The unconditional operators are |
167 | * risky: they bypass page accounting. | 188 | * risky: they bypass page accounting. |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index d2fca802f809..ee1ec2c7723c 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | static inline void mapping_set_error(struct address_space *mapping, int error) | 23 | static inline void mapping_set_error(struct address_space *mapping, int error) |
24 | { | 24 | { |
25 | if (error) { | 25 | if (unlikely(error)) { |
26 | if (error == -ENOSPC) | 26 | if (error == -ENOSPC) |
27 | set_bit(AS_ENOSPC, &mapping->flags); | 27 | set_bit(AS_ENOSPC, &mapping->flags); |
28 | else | 28 | else |
diff --git a/include/linux/parser.h b/include/linux/parser.h index 7dcd05075756..cc554ca8bc78 100644 --- a/include/linux/parser.h +++ b/include/linux/parser.h | |||
@@ -14,7 +14,7 @@ struct match_token { | |||
14 | const char *pattern; | 14 | const char *pattern; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | typedef struct match_token match_table_t[]; | 17 | typedef const struct match_token match_table_t[]; |
18 | 18 | ||
19 | /* Maximum number of arguments that match_token will find in a pattern */ | 19 | /* Maximum number of arguments that match_token will find in a pattern */ |
20 | enum {MAX_OPT_ARGS = 3}; | 20 | enum {MAX_OPT_ARGS = 3}; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index a6a088e1a804..1d296d31abe0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -638,7 +638,9 @@ int pci_save_state(struct pci_dev *dev); | |||
638 | int pci_restore_state(struct pci_dev *dev); | 638 | int pci_restore_state(struct pci_dev *dev); |
639 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | 639 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); |
640 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 640 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
641 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | ||
641 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 642 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); |
643 | pci_power_t pci_target_state(struct pci_dev *dev); | ||
642 | int pci_prepare_to_sleep(struct pci_dev *dev); | 644 | int pci_prepare_to_sleep(struct pci_dev *dev); |
643 | int pci_back_from_sleep(struct pci_dev *dev); | 645 | int pci_back_from_sleep(struct pci_dev *dev); |
644 | 646 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 119ae7b8f028..c3b1761aba26 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2400,6 +2400,9 @@ | |||
2400 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 | 2400 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 |
2401 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 | 2401 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 |
2402 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f | 2402 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f |
2403 | #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 | ||
2404 | #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 | ||
2405 | #define PCI_DEVICE_ID_INTEL_5100_22 0x65f6 | ||
2403 | #define PCI_DEVICE_ID_INTEL_5400_ERR 0x4030 | 2406 | #define PCI_DEVICE_ID_INTEL_5400_ERR 0x4030 |
2404 | #define PCI_DEVICE_ID_INTEL_5400_FBD0 0x4035 | 2407 | #define PCI_DEVICE_ID_INTEL_5400_FBD0 0x4035 |
2405 | #define PCI_DEVICE_ID_INTEL_5400_FBD1 0x4036 | 2408 | #define PCI_DEVICE_ID_INTEL_5400_FBD1 0x4036 |
diff --git a/include/linux/pid.h b/include/linux/pid.h index c21c7e8124a7..22921ac4cfd9 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -48,7 +48,7 @@ enum pid_type | |||
48 | */ | 48 | */ |
49 | 49 | ||
50 | struct upid { | 50 | struct upid { |
51 | /* Try to keep pid_chain in the same cacheline as nr for find_pid */ | 51 | /* Try to keep pid_chain in the same cacheline as nr for find_vpid */ |
52 | int nr; | 52 | int nr; |
53 | struct pid_namespace *ns; | 53 | struct pid_namespace *ns; |
54 | struct hlist_node pid_chain; | 54 | struct hlist_node pid_chain; |
@@ -57,10 +57,10 @@ struct upid { | |||
57 | struct pid | 57 | struct pid |
58 | { | 58 | { |
59 | atomic_t count; | 59 | atomic_t count; |
60 | unsigned int level; | ||
60 | /* lists of tasks that use this pid */ | 61 | /* lists of tasks that use this pid */ |
61 | struct hlist_head tasks[PIDTYPE_MAX]; | 62 | struct hlist_head tasks[PIDTYPE_MAX]; |
62 | struct rcu_head rcu; | 63 | struct rcu_head rcu; |
63 | unsigned int level; | ||
64 | struct upid numbers[1]; | 64 | struct upid numbers[1]; |
65 | }; | 65 | }; |
66 | 66 | ||
@@ -105,14 +105,12 @@ extern struct pid_namespace init_pid_ns; | |||
105 | * or rcu_read_lock() held. | 105 | * or rcu_read_lock() held. |
106 | * | 106 | * |
107 | * find_pid_ns() finds the pid in the namespace specified | 107 | * find_pid_ns() finds the pid in the namespace specified |
108 | * find_pid() find the pid by its global id, i.e. in the init namespace | ||
109 | * find_vpid() finr the pid by its virtual id, i.e. in the current namespace | 108 | * find_vpid() finr the pid by its virtual id, i.e. in the current namespace |
110 | * | 109 | * |
111 | * see also find_task_by_pid() set in include/linux/sched.h | 110 | * see also find_task_by_vpid() set in include/linux/sched.h |
112 | */ | 111 | */ |
113 | extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns); | 112 | extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns); |
114 | extern struct pid *find_vpid(int nr); | 113 | extern struct pid *find_vpid(int nr); |
115 | extern struct pid *find_pid(int nr); | ||
116 | 114 | ||
117 | /* | 115 | /* |
118 | * Lookup a PID in the hash table, and return with it's count elevated. | 116 | * Lookup a PID in the hash table, and return with it's count elevated. |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index caff5283d15c..1af82c4e17d4 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -14,6 +14,8 @@ struct pidmap { | |||
14 | 14 | ||
15 | #define PIDMAP_ENTRIES ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8) | 15 | #define PIDMAP_ENTRIES ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8) |
16 | 16 | ||
17 | struct bsd_acct_struct; | ||
18 | |||
17 | struct pid_namespace { | 19 | struct pid_namespace { |
18 | struct kref kref; | 20 | struct kref kref; |
19 | struct pidmap pidmap[PIDMAP_ENTRIES]; | 21 | struct pidmap pidmap[PIDMAP_ENTRIES]; |
@@ -25,6 +27,9 @@ struct pid_namespace { | |||
25 | #ifdef CONFIG_PROC_FS | 27 | #ifdef CONFIG_PROC_FS |
26 | struct vfsmount *proc_mnt; | 28 | struct vfsmount *proc_mnt; |
27 | #endif | 29 | #endif |
30 | #ifdef CONFIG_BSD_PROCESS_ACCT | ||
31 | struct bsd_acct_struct *bacct; | ||
32 | #endif | ||
28 | }; | 33 | }; |
29 | 34 | ||
30 | extern struct pid_namespace init_pid_ns; | 35 | extern struct pid_namespace init_pid_ns; |
@@ -85,4 +90,7 @@ static inline struct task_struct *task_child_reaper(struct task_struct *tsk) | |||
85 | return tsk->nsproxy->pid_ns->child_reaper; | 90 | return tsk->nsproxy->pid_ns->child_reaper; |
86 | } | 91 | } |
87 | 92 | ||
93 | void pidhash_init(void); | ||
94 | void pidmap_init(void); | ||
95 | |||
88 | #endif /* _LINUX_PID_NS_H */ | 96 | #endif /* _LINUX_PID_NS_H */ |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 4ad9de94449a..4dcce54b6d76 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -22,78 +22,6 @@ | |||
22 | #define _LINUX_PM_H | 22 | #define _LINUX_PM_H |
23 | 23 | ||
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <asm/atomic.h> | ||
26 | #include <asm/errno.h> | ||
27 | |||
28 | /* | ||
29 | * Power management requests... these are passed to pm_send_all() and friends. | ||
30 | * | ||
31 | * these functions are old and deprecated, see below. | ||
32 | */ | ||
33 | typedef int __bitwise pm_request_t; | ||
34 | |||
35 | #define PM_SUSPEND ((__force pm_request_t) 1) /* enter D1-D3 */ | ||
36 | #define PM_RESUME ((__force pm_request_t) 2) /* enter D0 */ | ||
37 | |||
38 | |||
39 | /* | ||
40 | * Device types... these are passed to pm_register | ||
41 | */ | ||
42 | typedef int __bitwise pm_dev_t; | ||
43 | |||
44 | #define PM_UNKNOWN_DEV ((__force pm_dev_t) 0) /* generic */ | ||
45 | #define PM_SYS_DEV ((__force pm_dev_t) 1) /* system device (fan, KB controller, ...) */ | ||
46 | #define PM_PCI_DEV ((__force pm_dev_t) 2) /* PCI device */ | ||
47 | #define PM_USB_DEV ((__force pm_dev_t) 3) /* USB device */ | ||
48 | #define PM_SCSI_DEV ((__force pm_dev_t) 4) /* SCSI device */ | ||
49 | #define PM_ISA_DEV ((__force pm_dev_t) 5) /* ISA device */ | ||
50 | #define PM_MTD_DEV ((__force pm_dev_t) 6) /* Memory Technology Device */ | ||
51 | |||
52 | /* | ||
53 | * System device hardware ID (PnP) values | ||
54 | */ | ||
55 | enum | ||
56 | { | ||
57 | PM_SYS_UNKNOWN = 0x00000000, /* generic */ | ||
58 | PM_SYS_KBC = 0x41d00303, /* keyboard controller */ | ||
59 | PM_SYS_COM = 0x41d00500, /* serial port */ | ||
60 | PM_SYS_IRDA = 0x41d00510, /* IRDA controller */ | ||
61 | PM_SYS_FDC = 0x41d00700, /* floppy controller */ | ||
62 | PM_SYS_VGA = 0x41d00900, /* VGA controller */ | ||
63 | PM_SYS_PCMCIA = 0x41d00e00, /* PCMCIA controller */ | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * Device identifier | ||
68 | */ | ||
69 | #define PM_PCI_ID(dev) ((dev)->bus->number << 16 | (dev)->devfn) | ||
70 | |||
71 | /* | ||
72 | * Request handler callback | ||
73 | */ | ||
74 | struct pm_dev; | ||
75 | |||
76 | typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data); | ||
77 | |||
78 | /* | ||
79 | * Dynamic device information | ||
80 | */ | ||
81 | struct pm_dev | ||
82 | { | ||
83 | pm_dev_t type; | ||
84 | unsigned long id; | ||
85 | pm_callback callback; | ||
86 | void *data; | ||
87 | |||
88 | unsigned long flags; | ||
89 | unsigned long state; | ||
90 | unsigned long prev_state; | ||
91 | |||
92 | struct list_head entry; | ||
93 | }; | ||
94 | |||
95 | /* Functions above this comment are list-based old-style power | ||
96 | * management. Please avoid using them. */ | ||
97 | 25 | ||
98 | /* | 26 | /* |
99 | * Callbacks for platform drivers to implement. | 27 | * Callbacks for platform drivers to implement. |
@@ -317,6 +245,21 @@ struct pm_ext_ops { | |||
317 | * RECOVER Creation of a hibernation image or restoration of the main | 245 | * RECOVER Creation of a hibernation image or restoration of the main |
318 | * memory contents from a hibernation image has failed, call | 246 | * memory contents from a hibernation image has failed, call |
319 | * ->thaw() and ->complete() for all devices. | 247 | * ->thaw() and ->complete() for all devices. |
248 | * | ||
249 | * The following PM_EVENT_ messages are defined for internal use by | ||
250 | * kernel subsystems. They are never issued by the PM core. | ||
251 | * | ||
252 | * USER_SUSPEND Manual selective suspend was issued by userspace. | ||
253 | * | ||
254 | * USER_RESUME Manual selective resume was issued by userspace. | ||
255 | * | ||
256 | * REMOTE_WAKEUP Remote-wakeup request was received from the device. | ||
257 | * | ||
258 | * AUTO_SUSPEND Automatic (device idle) runtime suspend was | ||
259 | * initiated by the subsystem. | ||
260 | * | ||
261 | * AUTO_RESUME Automatic (device needed) runtime resume was | ||
262 | * requested by a driver. | ||
320 | */ | 263 | */ |
321 | 264 | ||
322 | #define PM_EVENT_ON 0x0000 | 265 | #define PM_EVENT_ON 0x0000 |
@@ -328,9 +271,18 @@ struct pm_ext_ops { | |||
328 | #define PM_EVENT_THAW 0x0020 | 271 | #define PM_EVENT_THAW 0x0020 |
329 | #define PM_EVENT_RESTORE 0x0040 | 272 | #define PM_EVENT_RESTORE 0x0040 |
330 | #define PM_EVENT_RECOVER 0x0080 | 273 | #define PM_EVENT_RECOVER 0x0080 |
274 | #define PM_EVENT_USER 0x0100 | ||
275 | #define PM_EVENT_REMOTE 0x0200 | ||
276 | #define PM_EVENT_AUTO 0x0400 | ||
331 | 277 | ||
332 | #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE) | 278 | #define PM_EVENT_SLEEP (PM_EVENT_SUSPEND | PM_EVENT_HIBERNATE) |
279 | #define PM_EVENT_USER_SUSPEND (PM_EVENT_USER | PM_EVENT_SUSPEND) | ||
280 | #define PM_EVENT_USER_RESUME (PM_EVENT_USER | PM_EVENT_RESUME) | ||
281 | #define PM_EVENT_REMOTE_WAKEUP (PM_EVENT_REMOTE | PM_EVENT_RESUME) | ||
282 | #define PM_EVENT_AUTO_SUSPEND (PM_EVENT_AUTO | PM_EVENT_SUSPEND) | ||
283 | #define PM_EVENT_AUTO_RESUME (PM_EVENT_AUTO | PM_EVENT_RESUME) | ||
333 | 284 | ||
285 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | ||
334 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) | 286 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) |
335 | #define PMSG_QUIESCE ((struct pm_message){ .event = PM_EVENT_QUIESCE, }) | 287 | #define PMSG_QUIESCE ((struct pm_message){ .event = PM_EVENT_QUIESCE, }) |
336 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) | 288 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) |
@@ -339,7 +291,16 @@ struct pm_ext_ops { | |||
339 | #define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, }) | 291 | #define PMSG_THAW ((struct pm_message){ .event = PM_EVENT_THAW, }) |
340 | #define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, }) | 292 | #define PMSG_RESTORE ((struct pm_message){ .event = PM_EVENT_RESTORE, }) |
341 | #define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, }) | 293 | #define PMSG_RECOVER ((struct pm_message){ .event = PM_EVENT_RECOVER, }) |
342 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | 294 | #define PMSG_USER_SUSPEND ((struct pm_messge) \ |
295 | { .event = PM_EVENT_USER_SUSPEND, }) | ||
296 | #define PMSG_USER_RESUME ((struct pm_messge) \ | ||
297 | { .event = PM_EVENT_USER_RESUME, }) | ||
298 | #define PMSG_REMOTE_RESUME ((struct pm_messge) \ | ||
299 | { .event = PM_EVENT_REMOTE_RESUME, }) | ||
300 | #define PMSG_AUTO_SUSPEND ((struct pm_messge) \ | ||
301 | { .event = PM_EVENT_AUTO_SUSPEND, }) | ||
302 | #define PMSG_AUTO_RESUME ((struct pm_messge) \ | ||
303 | { .event = PM_EVENT_AUTO_RESUME, }) | ||
343 | 304 | ||
344 | /** | 305 | /** |
345 | * Device power management states | 306 | * Device power management states |
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h deleted file mode 100644 index 446f4f42b952..000000000000 --- a/include/linux/pm_legacy.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | #ifndef __LINUX_PM_LEGACY_H__ | ||
2 | #define __LINUX_PM_LEGACY_H__ | ||
3 | |||
4 | |||
5 | #ifdef CONFIG_PM_LEGACY | ||
6 | |||
7 | /* | ||
8 | * Register a device with power management | ||
9 | */ | ||
10 | struct pm_dev __deprecated * | ||
11 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | ||
12 | |||
13 | /* | ||
14 | * Send a request to all devices | ||
15 | */ | ||
16 | int __deprecated pm_send_all(pm_request_t rqst, void *data); | ||
17 | |||
18 | #else /* CONFIG_PM_LEGACY */ | ||
19 | |||
20 | static inline struct pm_dev *pm_register(pm_dev_t type, | ||
21 | unsigned long id, | ||
22 | pm_callback callback) | ||
23 | { | ||
24 | return NULL; | ||
25 | } | ||
26 | |||
27 | static inline int pm_send_all(pm_request_t rqst, void *data) | ||
28 | { | ||
29 | return 0; | ||
30 | } | ||
31 | |||
32 | #endif /* CONFIG_PM_LEGACY */ | ||
33 | |||
34 | #endif /* __LINUX_PM_LEGACY_H__ */ | ||
35 | |||
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 15a9eaf4a802..f560d1705afe 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -79,6 +79,7 @@ struct proc_dir_entry { | |||
79 | int pde_users; /* number of callers into module in progress */ | 79 | int pde_users; /* number of callers into module in progress */ |
80 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ | 80 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ |
81 | struct completion *pde_unload_completion; | 81 | struct completion *pde_unload_completion; |
82 | struct list_head pde_openers; /* who did ->open, but not ->release */ | ||
82 | }; | 83 | }; |
83 | 84 | ||
84 | struct kcore_list { | 85 | struct kcore_list { |
@@ -138,7 +139,6 @@ extern int proc_readdir(struct file *, void *, filldir_t); | |||
138 | extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); | 139 | extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); |
139 | 140 | ||
140 | extern const struct file_operations proc_kcore_operations; | 141 | extern const struct file_operations proc_kcore_operations; |
141 | extern const struct file_operations proc_kmsg_operations; | ||
142 | extern const struct file_operations ppc_htab_operations; | 142 | extern const struct file_operations ppc_htab_operations; |
143 | 143 | ||
144 | extern int pid_ns_prepare_proc(struct pid_namespace *ns); | 144 | extern int pid_ns_prepare_proc(struct pid_namespace *ns); |
diff --git a/include/linux/profile.h b/include/linux/profile.h index 05c1cc736937..7e7087239af5 100644 --- a/include/linux/profile.h +++ b/include/linux/profile.h | |||
@@ -8,8 +8,6 @@ | |||
8 | 8 | ||
9 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
10 | 10 | ||
11 | extern int prof_on __read_mostly; | ||
12 | |||
13 | #define CPU_PROFILING 1 | 11 | #define CPU_PROFILING 1 |
14 | #define SCHED_PROFILING 2 | 12 | #define SCHED_PROFILING 2 |
15 | #define SLEEP_PROFILING 3 | 13 | #define SLEEP_PROFILING 3 |
@@ -19,14 +17,31 @@ struct proc_dir_entry; | |||
19 | struct pt_regs; | 17 | struct pt_regs; |
20 | struct notifier_block; | 18 | struct notifier_block; |
21 | 19 | ||
20 | #if defined(CONFIG_PROFILING) && defined(CONFIG_PROC_FS) | ||
21 | void create_prof_cpu_mask(struct proc_dir_entry *de); | ||
22 | #else | ||
23 | static inline void create_prof_cpu_mask(struct proc_dir_entry *de) | ||
24 | { | ||
25 | } | ||
26 | #endif | ||
27 | |||
28 | enum profile_type { | ||
29 | PROFILE_TASK_EXIT, | ||
30 | PROFILE_MUNMAP | ||
31 | }; | ||
32 | |||
33 | #ifdef CONFIG_PROFILING | ||
34 | |||
35 | extern int prof_on __read_mostly; | ||
36 | |||
22 | /* init basic kernel profiler */ | 37 | /* init basic kernel profiler */ |
23 | void __init profile_init(void); | 38 | void __init profile_init(void); |
24 | void profile_tick(int); | 39 | void profile_tick(int type); |
25 | 40 | ||
26 | /* | 41 | /* |
27 | * Add multiple profiler hits to a given address: | 42 | * Add multiple profiler hits to a given address: |
28 | */ | 43 | */ |
29 | void profile_hits(int, void *ip, unsigned int nr_hits); | 44 | void profile_hits(int type, void *ip, unsigned int nr_hits); |
30 | 45 | ||
31 | /* | 46 | /* |
32 | * Single profiler hit: | 47 | * Single profiler hit: |
@@ -40,19 +55,6 @@ static inline void profile_hit(int type, void *ip) | |||
40 | profile_hits(type, ip, 1); | 55 | profile_hits(type, ip, 1); |
41 | } | 56 | } |
42 | 57 | ||
43 | #ifdef CONFIG_PROC_FS | ||
44 | void create_prof_cpu_mask(struct proc_dir_entry *); | ||
45 | #else | ||
46 | #define create_prof_cpu_mask(x) do { (void)(x); } while (0) | ||
47 | #endif | ||
48 | |||
49 | enum profile_type { | ||
50 | PROFILE_TASK_EXIT, | ||
51 | PROFILE_MUNMAP | ||
52 | }; | ||
53 | |||
54 | #ifdef CONFIG_PROFILING | ||
55 | |||
56 | struct task_struct; | 58 | struct task_struct; |
57 | struct mm_struct; | 59 | struct mm_struct; |
58 | 60 | ||
@@ -80,6 +82,28 @@ struct pt_regs; | |||
80 | 82 | ||
81 | #else | 83 | #else |
82 | 84 | ||
85 | #define prof_on 0 | ||
86 | |||
87 | static inline void profile_init(void) | ||
88 | { | ||
89 | return; | ||
90 | } | ||
91 | |||
92 | static inline void profile_tick(int type) | ||
93 | { | ||
94 | return; | ||
95 | } | ||
96 | |||
97 | static inline void profile_hits(int type, void *ip, unsigned int nr_hits) | ||
98 | { | ||
99 | return; | ||
100 | } | ||
101 | |||
102 | static inline void profile_hit(int type, void *ip) | ||
103 | { | ||
104 | return; | ||
105 | } | ||
106 | |||
83 | static inline int task_handoff_register(struct notifier_block * n) | 107 | static inline int task_handoff_register(struct notifier_block * n) |
84 | { | 108 | { |
85 | return -ENOSYS; | 109 | return -ENOSYS; |
diff --git a/include/linux/quota.h b/include/linux/quota.h index dcddfb200947..376a05048bc5 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -41,9 +41,6 @@ | |||
41 | #define __DQUOT_VERSION__ "dquot_6.5.1" | 41 | #define __DQUOT_VERSION__ "dquot_6.5.1" |
42 | #define __DQUOT_NUM_VERSION__ 6*10000+5*100+1 | 42 | #define __DQUOT_NUM_VERSION__ 6*10000+5*100+1 |
43 | 43 | ||
44 | typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ | ||
45 | typedef __u64 qsize_t; /* Type in which we store sizes */ | ||
46 | |||
47 | /* Size of blocks in which are counted size limits */ | 44 | /* Size of blocks in which are counted size limits */ |
48 | #define QUOTABLOCK_BITS 10 | 45 | #define QUOTABLOCK_BITS 10 |
49 | #define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS) | 46 | #define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS) |
@@ -138,6 +135,10 @@ struct if_dqinfo { | |||
138 | #define QUOTA_NL_BHARDWARN 4 /* Block hardlimit reached */ | 135 | #define QUOTA_NL_BHARDWARN 4 /* Block hardlimit reached */ |
139 | #define QUOTA_NL_BSOFTLONGWARN 5 /* Block grace time expired */ | 136 | #define QUOTA_NL_BSOFTLONGWARN 5 /* Block grace time expired */ |
140 | #define QUOTA_NL_BSOFTWARN 6 /* Block softlimit reached */ | 137 | #define QUOTA_NL_BSOFTWARN 6 /* Block softlimit reached */ |
138 | #define QUOTA_NL_IHARDBELOW 7 /* Usage got below inode hardlimit */ | ||
139 | #define QUOTA_NL_ISOFTBELOW 8 /* Usage got below inode softlimit */ | ||
140 | #define QUOTA_NL_BHARDBELOW 9 /* Usage got below block hardlimit */ | ||
141 | #define QUOTA_NL_BSOFTBELOW 10 /* Usage got below block softlimit */ | ||
141 | 142 | ||
142 | enum { | 143 | enum { |
143 | QUOTA_NL_C_UNSPEC, | 144 | QUOTA_NL_C_UNSPEC, |
@@ -172,6 +173,9 @@ enum { | |||
172 | 173 | ||
173 | #include <asm/atomic.h> | 174 | #include <asm/atomic.h> |
174 | 175 | ||
176 | typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ | ||
177 | typedef __u64 qsize_t; /* Type in which we store sizes */ | ||
178 | |||
175 | extern spinlock_t dq_data_lock; | 179 | extern spinlock_t dq_data_lock; |
176 | 180 | ||
177 | /* Maximal numbers of writes for quota operation (insert/delete/update) | 181 | /* Maximal numbers of writes for quota operation (insert/delete/update) |
@@ -223,12 +227,10 @@ struct super_block; | |||
223 | #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ | 227 | #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ |
224 | 228 | ||
225 | extern void mark_info_dirty(struct super_block *sb, int type); | 229 | extern void mark_info_dirty(struct super_block *sb, int type); |
226 | #define info_dirty(info) test_bit(DQF_INFO_DIRTY_B, &(info)->dqi_flags) | 230 | static inline int info_dirty(struct mem_dqinfo *info) |
227 | #define info_any_dquot_dirty(info) (!list_empty(&(info)->dqi_dirty_list)) | 231 | { |
228 | #define info_any_dirty(info) (info_dirty(info) || info_any_dquot_dirty(info)) | 232 | return test_bit(DQF_INFO_DIRTY_B, &info->dqi_flags); |
229 | 233 | } | |
230 | #define sb_dqopt(sb) (&(sb)->s_dquot) | ||
231 | #define sb_dqinfo(sb, type) (sb_dqopt(sb)->info+(type)) | ||
232 | 234 | ||
233 | struct dqstats { | 235 | struct dqstats { |
234 | int lookups; | 236 | int lookups; |
@@ -337,19 +339,6 @@ struct quota_info { | |||
337 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ | 339 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ |
338 | }; | 340 | }; |
339 | 341 | ||
340 | #define sb_has_quota_enabled(sb, type) ((type)==USRQUOTA ? \ | ||
341 | (sb_dqopt(sb)->flags & DQUOT_USR_ENABLED) : (sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED)) | ||
342 | |||
343 | #define sb_any_quota_enabled(sb) (sb_has_quota_enabled(sb, USRQUOTA) | \ | ||
344 | sb_has_quota_enabled(sb, GRPQUOTA)) | ||
345 | |||
346 | #define sb_has_quota_suspended(sb, type) \ | ||
347 | ((type) == USRQUOTA ? (sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED) : \ | ||
348 | (sb_dqopt(sb)->flags & DQUOT_GRP_SUSPENDED)) | ||
349 | |||
350 | #define sb_any_quota_suspended(sb) (sb_has_quota_suspended(sb, USRQUOTA) | \ | ||
351 | sb_has_quota_suspended(sb, GRPQUOTA)) | ||
352 | |||
353 | int register_quota_format(struct quota_format_type *fmt); | 342 | int register_quota_format(struct quota_format_type *fmt); |
354 | void unregister_quota_format(struct quota_format_type *fmt); | 343 | void unregister_quota_format(struct quota_format_type *fmt); |
355 | 344 | ||
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index f86702053853..742187f7a05c 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -11,42 +11,85 @@ | |||
11 | #define _LINUX_QUOTAOPS_ | 11 | #define _LINUX_QUOTAOPS_ |
12 | 12 | ||
13 | #include <linux/smp_lock.h> | 13 | #include <linux/smp_lock.h> |
14 | |||
15 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
16 | 15 | ||
16 | static inline struct quota_info *sb_dqopt(struct super_block *sb) | ||
17 | { | ||
18 | return &sb->s_dquot; | ||
19 | } | ||
20 | |||
17 | #if defined(CONFIG_QUOTA) | 21 | #if defined(CONFIG_QUOTA) |
18 | 22 | ||
19 | /* | 23 | /* |
20 | * declaration of quota_function calls in kernel. | 24 | * declaration of quota_function calls in kernel. |
21 | */ | 25 | */ |
22 | extern void sync_dquots(struct super_block *sb, int type); | 26 | void sync_dquots(struct super_block *sb, int type); |
23 | 27 | ||
24 | extern int dquot_initialize(struct inode *inode, int type); | 28 | int dquot_initialize(struct inode *inode, int type); |
25 | extern int dquot_drop(struct inode *inode); | 29 | int dquot_drop(struct inode *inode); |
26 | 30 | ||
27 | extern int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); | 31 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); |
28 | extern int dquot_alloc_inode(const struct inode *inode, unsigned long number); | 32 | int dquot_alloc_inode(const struct inode *inode, unsigned long number); |
29 | 33 | ||
30 | extern int dquot_free_space(struct inode *inode, qsize_t number); | 34 | int dquot_free_space(struct inode *inode, qsize_t number); |
31 | extern int dquot_free_inode(const struct inode *inode, unsigned long number); | 35 | int dquot_free_inode(const struct inode *inode, unsigned long number); |
32 | 36 | ||
33 | extern int dquot_transfer(struct inode *inode, struct iattr *iattr); | 37 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
34 | extern int dquot_commit(struct dquot *dquot); | 38 | int dquot_commit(struct dquot *dquot); |
35 | extern int dquot_acquire(struct dquot *dquot); | 39 | int dquot_acquire(struct dquot *dquot); |
36 | extern int dquot_release(struct dquot *dquot); | 40 | int dquot_release(struct dquot *dquot); |
37 | extern int dquot_commit_info(struct super_block *sb, int type); | 41 | int dquot_commit_info(struct super_block *sb, int type); |
38 | extern int dquot_mark_dquot_dirty(struct dquot *dquot); | 42 | int dquot_mark_dquot_dirty(struct dquot *dquot); |
39 | 43 | ||
40 | extern int vfs_quota_on(struct super_block *sb, int type, int format_id, | 44 | int vfs_quota_on(struct super_block *sb, int type, int format_id, |
41 | char *path, int remount); | 45 | char *path, int remount); |
42 | extern int vfs_quota_on_mount(struct super_block *sb, char *qf_name, | 46 | int vfs_quota_on_mount(struct super_block *sb, char *qf_name, |
43 | int format_id, int type); | 47 | int format_id, int type); |
44 | extern int vfs_quota_off(struct super_block *sb, int type, int remount); | 48 | int vfs_quota_off(struct super_block *sb, int type, int remount); |
45 | extern int vfs_quota_sync(struct super_block *sb, int type); | 49 | int vfs_quota_sync(struct super_block *sb, int type); |
46 | extern int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 50 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
47 | extern int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 51 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
48 | extern int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); | 52 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); |
49 | extern int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); | 53 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); |
54 | |||
55 | void vfs_dq_drop(struct inode *inode); | ||
56 | int vfs_dq_transfer(struct inode *inode, struct iattr *iattr); | ||
57 | int vfs_dq_quota_on_remount(struct super_block *sb); | ||
58 | |||
59 | static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) | ||
60 | { | ||
61 | return sb_dqopt(sb)->info + type; | ||
62 | } | ||
63 | |||
64 | /* | ||
65 | * Functions for checking status of quota | ||
66 | */ | ||
67 | |||
68 | static inline int sb_has_quota_enabled(struct super_block *sb, int type) | ||
69 | { | ||
70 | if (type == USRQUOTA) | ||
71 | return sb_dqopt(sb)->flags & DQUOT_USR_ENABLED; | ||
72 | return sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED; | ||
73 | } | ||
74 | |||
75 | static inline int sb_any_quota_enabled(struct super_block *sb) | ||
76 | { | ||
77 | return sb_has_quota_enabled(sb, USRQUOTA) || | ||
78 | sb_has_quota_enabled(sb, GRPQUOTA); | ||
79 | } | ||
80 | |||
81 | static inline int sb_has_quota_suspended(struct super_block *sb, int type) | ||
82 | { | ||
83 | if (type == USRQUOTA) | ||
84 | return sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED; | ||
85 | return sb_dqopt(sb)->flags & DQUOT_GRP_SUSPENDED; | ||
86 | } | ||
87 | |||
88 | static inline int sb_any_quota_suspended(struct super_block *sb) | ||
89 | { | ||
90 | return sb_has_quota_suspended(sb, USRQUOTA) || | ||
91 | sb_has_quota_suspended(sb, GRPQUOTA); | ||
92 | } | ||
50 | 93 | ||
51 | /* | 94 | /* |
52 | * Operations supported for diskquotas. | 95 | * Operations supported for diskquotas. |
@@ -59,38 +102,16 @@ extern struct quotactl_ops vfs_quotactl_ops; | |||
59 | 102 | ||
60 | /* It is better to call this function outside of any transaction as it might | 103 | /* It is better to call this function outside of any transaction as it might |
61 | * need a lot of space in journal for dquot structure allocation. */ | 104 | * need a lot of space in journal for dquot structure allocation. */ |
62 | static inline void DQUOT_INIT(struct inode *inode) | 105 | static inline void vfs_dq_init(struct inode *inode) |
63 | { | 106 | { |
64 | BUG_ON(!inode->i_sb); | 107 | BUG_ON(!inode->i_sb); |
65 | if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode)) | 108 | if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode)) |
66 | inode->i_sb->dq_op->initialize(inode, -1); | 109 | inode->i_sb->dq_op->initialize(inode, -1); |
67 | } | 110 | } |
68 | 111 | ||
69 | /* The same as with DQUOT_INIT */ | ||
70 | static inline void DQUOT_DROP(struct inode *inode) | ||
71 | { | ||
72 | /* Here we can get arbitrary inode from clear_inode() so we have | ||
73 | * to be careful. OTOH we don't need locking as quota operations | ||
74 | * are allowed to change only at mount time */ | ||
75 | if (!IS_NOQUOTA(inode) && inode->i_sb && inode->i_sb->dq_op | ||
76 | && inode->i_sb->dq_op->drop) { | ||
77 | int cnt; | ||
78 | /* Test before calling to rule out calls from proc and such | ||
79 | * where we are not allowed to block. Note that this is | ||
80 | * actually reliable test even without the lock - the caller | ||
81 | * must assure that nobody can come after the DQUOT_DROP and | ||
82 | * add quota pointers back anyway */ | ||
83 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) | ||
84 | if (inode->i_dquot[cnt] != NODQUOT) | ||
85 | break; | ||
86 | if (cnt < MAXQUOTAS) | ||
87 | inode->i_sb->dq_op->drop(inode); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | /* The following allocation/freeing/transfer functions *must* be called inside | 112 | /* The following allocation/freeing/transfer functions *must* be called inside |
92 | * a transaction (deadlocks possible otherwise) */ | 113 | * a transaction (deadlocks possible otherwise) */ |
93 | static inline int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | 114 | static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) |
94 | { | 115 | { |
95 | if (sb_any_quota_enabled(inode->i_sb)) { | 116 | if (sb_any_quota_enabled(inode->i_sb)) { |
96 | /* Used space is updated in alloc_space() */ | 117 | /* Used space is updated in alloc_space() */ |
@@ -102,15 +123,15 @@ static inline int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | |||
102 | return 0; | 123 | return 0; |
103 | } | 124 | } |
104 | 125 | ||
105 | static inline int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr) | 126 | static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr) |
106 | { | 127 | { |
107 | int ret; | 128 | int ret; |
108 | if (!(ret = DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr))) | 129 | if (!(ret = vfs_dq_prealloc_space_nodirty(inode, nr))) |
109 | mark_inode_dirty(inode); | 130 | mark_inode_dirty(inode); |
110 | return ret; | 131 | return ret; |
111 | } | 132 | } |
112 | 133 | ||
113 | static inline int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | 134 | static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) |
114 | { | 135 | { |
115 | if (sb_any_quota_enabled(inode->i_sb)) { | 136 | if (sb_any_quota_enabled(inode->i_sb)) { |
116 | /* Used space is updated in alloc_space() */ | 137 | /* Used space is updated in alloc_space() */ |
@@ -122,25 +143,25 @@ static inline int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | |||
122 | return 0; | 143 | return 0; |
123 | } | 144 | } |
124 | 145 | ||
125 | static inline int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr) | 146 | static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) |
126 | { | 147 | { |
127 | int ret; | 148 | int ret; |
128 | if (!(ret = DQUOT_ALLOC_SPACE_NODIRTY(inode, nr))) | 149 | if (!(ret = vfs_dq_alloc_space_nodirty(inode, nr))) |
129 | mark_inode_dirty(inode); | 150 | mark_inode_dirty(inode); |
130 | return ret; | 151 | return ret; |
131 | } | 152 | } |
132 | 153 | ||
133 | static inline int DQUOT_ALLOC_INODE(struct inode *inode) | 154 | static inline int vfs_dq_alloc_inode(struct inode *inode) |
134 | { | 155 | { |
135 | if (sb_any_quota_enabled(inode->i_sb)) { | 156 | if (sb_any_quota_enabled(inode->i_sb)) { |
136 | DQUOT_INIT(inode); | 157 | vfs_dq_init(inode); |
137 | if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA) | 158 | if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA) |
138 | return 1; | 159 | return 1; |
139 | } | 160 | } |
140 | return 0; | 161 | return 0; |
141 | } | 162 | } |
142 | 163 | ||
143 | static inline void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | 164 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
144 | { | 165 | { |
145 | if (sb_any_quota_enabled(inode->i_sb)) | 166 | if (sb_any_quota_enabled(inode->i_sb)) |
146 | inode->i_sb->dq_op->free_space(inode, nr); | 167 | inode->i_sb->dq_op->free_space(inode, nr); |
@@ -148,35 +169,25 @@ static inline void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | |||
148 | inode_sub_bytes(inode, nr); | 169 | inode_sub_bytes(inode, nr); |
149 | } | 170 | } |
150 | 171 | ||
151 | static inline void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr) | 172 | static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) |
152 | { | 173 | { |
153 | DQUOT_FREE_SPACE_NODIRTY(inode, nr); | 174 | vfs_dq_free_space_nodirty(inode, nr); |
154 | mark_inode_dirty(inode); | 175 | mark_inode_dirty(inode); |
155 | } | 176 | } |
156 | 177 | ||
157 | static inline void DQUOT_FREE_INODE(struct inode *inode) | 178 | static inline void vfs_dq_free_inode(struct inode *inode) |
158 | { | 179 | { |
159 | if (sb_any_quota_enabled(inode->i_sb)) | 180 | if (sb_any_quota_enabled(inode->i_sb)) |
160 | inode->i_sb->dq_op->free_inode(inode, 1); | 181 | inode->i_sb->dq_op->free_inode(inode, 1); |
161 | } | 182 | } |
162 | 183 | ||
163 | static inline int DQUOT_TRANSFER(struct inode *inode, struct iattr *iattr) | ||
164 | { | ||
165 | if (sb_any_quota_enabled(inode->i_sb) && !IS_NOQUOTA(inode)) { | ||
166 | DQUOT_INIT(inode); | ||
167 | if (inode->i_sb->dq_op->transfer(inode, iattr) == NO_QUOTA) | ||
168 | return 1; | ||
169 | } | ||
170 | return 0; | ||
171 | } | ||
172 | |||
173 | /* The following two functions cannot be called inside a transaction */ | 184 | /* The following two functions cannot be called inside a transaction */ |
174 | static inline void DQUOT_SYNC(struct super_block *sb) | 185 | static inline void vfs_dq_sync(struct super_block *sb) |
175 | { | 186 | { |
176 | sync_dquots(sb, -1); | 187 | sync_dquots(sb, -1); |
177 | } | 188 | } |
178 | 189 | ||
179 | static inline int DQUOT_OFF(struct super_block *sb, int remount) | 190 | static inline int vfs_dq_off(struct super_block *sb, int remount) |
180 | { | 191 | { |
181 | int ret = -ENOSYS; | 192 | int ret = -ENOSYS; |
182 | 193 | ||
@@ -185,22 +196,27 @@ static inline int DQUOT_OFF(struct super_block *sb, int remount) | |||
185 | return ret; | 196 | return ret; |
186 | } | 197 | } |
187 | 198 | ||
188 | static inline int DQUOT_ON_REMOUNT(struct super_block *sb) | 199 | #else |
200 | |||
201 | static inline int sb_has_quota_enabled(struct super_block *sb, int type) | ||
189 | { | 202 | { |
190 | int cnt; | 203 | return 0; |
191 | int ret = 0, err; | 204 | } |
192 | 205 | ||
193 | if (!sb->s_qcop || !sb->s_qcop->quota_on) | 206 | static inline int sb_any_quota_enabled(struct super_block *sb) |
194 | return -ENOSYS; | 207 | { |
195 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { | 208 | return 0; |
196 | err = sb->s_qcop->quota_on(sb, cnt, 0, NULL, 1); | ||
197 | if (err < 0 && !ret) | ||
198 | ret = err; | ||
199 | } | ||
200 | return ret; | ||
201 | } | 209 | } |
202 | 210 | ||
203 | #else | 211 | static inline int sb_has_quota_suspended(struct super_block *sb, int type) |
212 | { | ||
213 | return 0; | ||
214 | } | ||
215 | |||
216 | static inline int sb_any_quota_suspended(struct super_block *sb) | ||
217 | { | ||
218 | return 0; | ||
219 | } | ||
204 | 220 | ||
205 | /* | 221 | /* |
206 | * NO-OP when quota not configured. | 222 | * NO-OP when quota not configured. |
@@ -208,113 +224,144 @@ static inline int DQUOT_ON_REMOUNT(struct super_block *sb) | |||
208 | #define sb_dquot_ops (NULL) | 224 | #define sb_dquot_ops (NULL) |
209 | #define sb_quotactl_ops (NULL) | 225 | #define sb_quotactl_ops (NULL) |
210 | 226 | ||
211 | static inline void DQUOT_INIT(struct inode *inode) | 227 | static inline void vfs_dq_init(struct inode *inode) |
212 | { | 228 | { |
213 | } | 229 | } |
214 | 230 | ||
215 | static inline void DQUOT_DROP(struct inode *inode) | 231 | static inline void vfs_dq_drop(struct inode *inode) |
216 | { | 232 | { |
217 | } | 233 | } |
218 | 234 | ||
219 | static inline int DQUOT_ALLOC_INODE(struct inode *inode) | 235 | static inline int vfs_dq_alloc_inode(struct inode *inode) |
220 | { | 236 | { |
221 | return 0; | 237 | return 0; |
222 | } | 238 | } |
223 | 239 | ||
224 | static inline void DQUOT_FREE_INODE(struct inode *inode) | 240 | static inline void vfs_dq_free_inode(struct inode *inode) |
225 | { | 241 | { |
226 | } | 242 | } |
227 | 243 | ||
228 | static inline void DQUOT_SYNC(struct super_block *sb) | 244 | static inline void vfs_dq_sync(struct super_block *sb) |
229 | { | 245 | { |
230 | } | 246 | } |
231 | 247 | ||
232 | static inline int DQUOT_OFF(struct super_block *sb, int remount) | 248 | static inline int vfs_dq_off(struct super_block *sb, int remount) |
233 | { | 249 | { |
234 | return 0; | 250 | return 0; |
235 | } | 251 | } |
236 | 252 | ||
237 | static inline int DQUOT_ON_REMOUNT(struct super_block *sb) | 253 | static inline int vfs_dq_quota_on_remount(struct super_block *sb) |
238 | { | 254 | { |
239 | return 0; | 255 | return 0; |
240 | } | 256 | } |
241 | 257 | ||
242 | static inline int DQUOT_TRANSFER(struct inode *inode, struct iattr *iattr) | 258 | static inline int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) |
243 | { | 259 | { |
244 | return 0; | 260 | return 0; |
245 | } | 261 | } |
246 | 262 | ||
247 | static inline int DQUOT_PREALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | 263 | static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) |
248 | { | 264 | { |
249 | inode_add_bytes(inode, nr); | 265 | inode_add_bytes(inode, nr); |
250 | return 0; | 266 | return 0; |
251 | } | 267 | } |
252 | 268 | ||
253 | static inline int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr) | 269 | static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr) |
254 | { | 270 | { |
255 | DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr); | 271 | vfs_dq_prealloc_space_nodirty(inode, nr); |
256 | mark_inode_dirty(inode); | 272 | mark_inode_dirty(inode); |
257 | return 0; | 273 | return 0; |
258 | } | 274 | } |
259 | 275 | ||
260 | static inline int DQUOT_ALLOC_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | 276 | static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) |
261 | { | 277 | { |
262 | inode_add_bytes(inode, nr); | 278 | inode_add_bytes(inode, nr); |
263 | return 0; | 279 | return 0; |
264 | } | 280 | } |
265 | 281 | ||
266 | static inline int DQUOT_ALLOC_SPACE(struct inode *inode, qsize_t nr) | 282 | static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) |
267 | { | 283 | { |
268 | DQUOT_ALLOC_SPACE_NODIRTY(inode, nr); | 284 | vfs_dq_alloc_space_nodirty(inode, nr); |
269 | mark_inode_dirty(inode); | 285 | mark_inode_dirty(inode); |
270 | return 0; | 286 | return 0; |
271 | } | 287 | } |
272 | 288 | ||
273 | static inline void DQUOT_FREE_SPACE_NODIRTY(struct inode *inode, qsize_t nr) | 289 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
274 | { | 290 | { |
275 | inode_sub_bytes(inode, nr); | 291 | inode_sub_bytes(inode, nr); |
276 | } | 292 | } |
277 | 293 | ||
278 | static inline void DQUOT_FREE_SPACE(struct inode *inode, qsize_t nr) | 294 | static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) |
279 | { | 295 | { |
280 | DQUOT_FREE_SPACE_NODIRTY(inode, nr); | 296 | vfs_dq_free_space_nodirty(inode, nr); |
281 | mark_inode_dirty(inode); | 297 | mark_inode_dirty(inode); |
282 | } | 298 | } |
283 | 299 | ||
284 | #endif /* CONFIG_QUOTA */ | 300 | #endif /* CONFIG_QUOTA */ |
285 | 301 | ||
286 | static inline int DQUOT_PREALLOC_BLOCK_NODIRTY(struct inode *inode, qsize_t nr) | 302 | static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr) |
287 | { | 303 | { |
288 | return DQUOT_PREALLOC_SPACE_NODIRTY(inode, | 304 | return vfs_dq_prealloc_space_nodirty(inode, |
289 | nr << inode->i_sb->s_blocksize_bits); | 305 | nr << inode->i_sb->s_blocksize_bits); |
290 | } | 306 | } |
291 | 307 | ||
292 | static inline int DQUOT_PREALLOC_BLOCK(struct inode *inode, qsize_t nr) | 308 | static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr) |
293 | { | 309 | { |
294 | return DQUOT_PREALLOC_SPACE(inode, | 310 | return vfs_dq_prealloc_space(inode, |
295 | nr << inode->i_sb->s_blocksize_bits); | 311 | nr << inode->i_sb->s_blocksize_bits); |
296 | } | 312 | } |
297 | 313 | ||
298 | static inline int DQUOT_ALLOC_BLOCK_NODIRTY(struct inode *inode, qsize_t nr) | 314 | static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr) |
299 | { | 315 | { |
300 | return DQUOT_ALLOC_SPACE_NODIRTY(inode, | 316 | return vfs_dq_alloc_space_nodirty(inode, |
301 | nr << inode->i_sb->s_blocksize_bits); | 317 | nr << inode->i_sb->s_blocksize_bits); |
302 | } | 318 | } |
303 | 319 | ||
304 | static inline int DQUOT_ALLOC_BLOCK(struct inode *inode, qsize_t nr) | 320 | static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr) |
305 | { | 321 | { |
306 | return DQUOT_ALLOC_SPACE(inode, | 322 | return vfs_dq_alloc_space(inode, |
307 | nr << inode->i_sb->s_blocksize_bits); | 323 | nr << inode->i_sb->s_blocksize_bits); |
308 | } | 324 | } |
309 | 325 | ||
310 | static inline void DQUOT_FREE_BLOCK_NODIRTY(struct inode *inode, qsize_t nr) | 326 | static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr) |
311 | { | 327 | { |
312 | DQUOT_FREE_SPACE_NODIRTY(inode, nr << inode->i_sb->s_blocksize_bits); | 328 | vfs_dq_free_space_nodirty(inode, nr << inode->i_sb->s_blocksize_bits); |
313 | } | 329 | } |
314 | 330 | ||
315 | static inline void DQUOT_FREE_BLOCK(struct inode *inode, qsize_t nr) | 331 | static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr) |
316 | { | 332 | { |
317 | DQUOT_FREE_SPACE(inode, nr << inode->i_sb->s_blocksize_bits); | 333 | vfs_dq_free_space(inode, nr << inode->i_sb->s_blocksize_bits); |
318 | } | 334 | } |
319 | 335 | ||
336 | /* | ||
337 | * Define uppercase equivalents for compatibility with old function names | ||
338 | * Can go away when we think all users have been converted (15/04/2008) | ||
339 | */ | ||
340 | #define DQUOT_INIT(inode) vfs_dq_init(inode) | ||
341 | #define DQUOT_DROP(inode) vfs_dq_drop(inode) | ||
342 | #define DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr) \ | ||
343 | vfs_dq_prealloc_space_nodirty(inode, nr) | ||
344 | #define DQUOT_PREALLOC_SPACE(inode, nr) vfs_dq_prealloc_space(inode, nr) | ||
345 | #define DQUOT_ALLOC_SPACE_NODIRTY(inode, nr) \ | ||
346 | vfs_dq_alloc_space_nodirty(inode, nr) | ||
347 | #define DQUOT_ALLOC_SPACE(inode, nr) vfs_dq_alloc_space(inode, nr) | ||
348 | #define DQUOT_PREALLOC_BLOCK_NODIRTY(inode, nr) \ | ||
349 | vfs_dq_prealloc_block_nodirty(inode, nr) | ||
350 | #define DQUOT_PREALLOC_BLOCK(inode, nr) vfs_dq_prealloc_block(inode, nr) | ||
351 | #define DQUOT_ALLOC_BLOCK_NODIRTY(inode, nr) \ | ||
352 | vfs_dq_alloc_block_nodirty(inode, nr) | ||
353 | #define DQUOT_ALLOC_BLOCK(inode, nr) vfs_dq_alloc_block(inode, nr) | ||
354 | #define DQUOT_ALLOC_INODE(inode) vfs_dq_alloc_inode(inode) | ||
355 | #define DQUOT_FREE_SPACE_NODIRTY(inode, nr) \ | ||
356 | vfs_dq_free_space_nodirty(inode, nr) | ||
357 | #define DQUOT_FREE_SPACE(inode, nr) vfs_dq_free_space(inode, nr) | ||
358 | #define DQUOT_FREE_BLOCK_NODIRTY(inode, nr) \ | ||
359 | vfs_dq_free_block_nodirty(inode, nr) | ||
360 | #define DQUOT_FREE_BLOCK(inode, nr) vfs_dq_free_block(inode, nr) | ||
361 | #define DQUOT_FREE_INODE(inode) vfs_dq_free_inode(inode) | ||
362 | #define DQUOT_TRANSFER(inode, iattr) vfs_dq_transfer(inode, iattr) | ||
363 | #define DQUOT_SYNC(sb) vfs_dq_sync(sb) | ||
364 | #define DQUOT_OFF(sb, remount) vfs_dq_off(sb, remount) | ||
365 | #define DQUOT_ON_REMOUNT(sb) vfs_dq_quota_on_remount(sb) | ||
366 | |||
320 | #endif /* _LINUX_QUOTAOPS_ */ | 367 | #endif /* _LINUX_QUOTAOPS_ */ |
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h new file mode 100644 index 000000000000..18a5b9ba9d40 --- /dev/null +++ b/include/linux/ratelimit.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef _LINUX_RATELIMIT_H | ||
2 | #define _LINUX_RATELIMIT_H | ||
3 | #include <linux/param.h> | ||
4 | |||
5 | #define DEFAULT_RATELIMIT_INTERVAL (5 * HZ) | ||
6 | #define DEFAULT_RATELIMIT_BURST 10 | ||
7 | |||
8 | struct ratelimit_state { | ||
9 | int interval; | ||
10 | int burst; | ||
11 | int printed; | ||
12 | int missed; | ||
13 | unsigned long begin; | ||
14 | }; | ||
15 | |||
16 | #define DEFINE_RATELIMIT_STATE(name, interval, burst) \ | ||
17 | struct ratelimit_state name = {interval, burst,} | ||
18 | |||
19 | extern int __ratelimit(struct ratelimit_state *rs); | ||
20 | |||
21 | static inline int ratelimit(void) | ||
22 | { | ||
23 | static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL, | ||
24 | DEFAULT_RATELIMIT_BURST); | ||
25 | return __ratelimit(&rs); | ||
26 | } | ||
27 | #endif | ||
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h index f04b64eca636..0967f03b0705 100644 --- a/include/linux/rcupreempt.h +++ b/include/linux/rcupreempt.h | |||
@@ -115,16 +115,21 @@ DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched); | |||
115 | 115 | ||
116 | static inline void rcu_enter_nohz(void) | 116 | static inline void rcu_enter_nohz(void) |
117 | { | 117 | { |
118 | static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1); | ||
119 | |||
118 | smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */ | 120 | smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */ |
119 | __get_cpu_var(rcu_dyntick_sched).dynticks++; | 121 | __get_cpu_var(rcu_dyntick_sched).dynticks++; |
120 | WARN_ON(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1); | 122 | WARN_ON_RATELIMIT(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1, &rs); |
121 | } | 123 | } |
122 | 124 | ||
123 | static inline void rcu_exit_nohz(void) | 125 | static inline void rcu_exit_nohz(void) |
124 | { | 126 | { |
127 | static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1); | ||
128 | |||
125 | smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */ | 129 | smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */ |
126 | __get_cpu_var(rcu_dyntick_sched).dynticks++; | 130 | __get_cpu_var(rcu_dyntick_sched).dynticks++; |
127 | WARN_ON(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1)); | 131 | WARN_ON_RATELIMIT(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1), |
132 | &rs); | ||
128 | } | 133 | } |
129 | 134 | ||
130 | #else /* CONFIG_NO_HZ */ | 135 | #else /* CONFIG_NO_HZ */ |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 4aacaeecb56f..e9963af16cda 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -526,8 +526,8 @@ struct item_head { | |||
526 | ** p is the array of __u32, i is the index into the array, v is the value | 526 | ** p is the array of __u32, i is the index into the array, v is the value |
527 | ** to store there. | 527 | ** to store there. |
528 | */ | 528 | */ |
529 | #define get_block_num(p, i) le32_to_cpu(get_unaligned((p) + (i))) | 529 | #define get_block_num(p, i) get_unaligned_le32((p) + (i)) |
530 | #define put_block_num(p, i, v) put_unaligned(cpu_to_le32(v), (p) + (i)) | 530 | #define put_block_num(p, i, v) put_unaligned_le32((v), (p) + (i)) |
531 | 531 | ||
532 | // | 532 | // |
533 | // in old version uniqueness field shows key type | 533 | // in old version uniqueness field shows key type |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 336ee43ed7d8..315517e8bfa1 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -152,7 +152,7 @@ struct reiserfs_journal_list { | |||
152 | atomic_t j_nonzerolen; | 152 | atomic_t j_nonzerolen; |
153 | atomic_t j_commit_left; | 153 | atomic_t j_commit_left; |
154 | atomic_t j_older_commits_done; /* all commits older than this on disk */ | 154 | atomic_t j_older_commits_done; /* all commits older than this on disk */ |
155 | struct semaphore j_commit_lock; | 155 | struct mutex j_commit_mutex; |
156 | unsigned long j_trans_id; | 156 | unsigned long j_trans_id; |
157 | time_t j_timestamp; | 157 | time_t j_timestamp; |
158 | struct reiserfs_list_bitmap *j_list_bitmap; | 158 | struct reiserfs_list_bitmap *j_list_bitmap; |
@@ -193,8 +193,8 @@ struct reiserfs_journal { | |||
193 | struct buffer_head *j_header_bh; | 193 | struct buffer_head *j_header_bh; |
194 | 194 | ||
195 | time_t j_trans_start_time; /* time this transaction started */ | 195 | time_t j_trans_start_time; /* time this transaction started */ |
196 | struct semaphore j_lock; | 196 | struct mutex j_mutex; |
197 | struct semaphore j_flush_sem; | 197 | struct mutex j_flush_mutex; |
198 | wait_queue_head_t j_join_wait; /* wait for current transaction to finish before starting new one */ | 198 | wait_queue_head_t j_join_wait; /* wait for current transaction to finish before starting new one */ |
199 | atomic_t j_jlock; /* lock for j_join_wait */ | 199 | atomic_t j_jlock; /* lock for j_join_wait */ |
200 | int j_list_bitmap_index; /* number of next list bitmap to use */ | 200 | int j_list_bitmap_index; /* number of next list bitmap to use */ |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 6d9e1fca098c..fdeadd9740dc 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -63,9 +63,14 @@ u64 res_counter_read_u64(struct res_counter *counter, int member); | |||
63 | ssize_t res_counter_read(struct res_counter *counter, int member, | 63 | ssize_t res_counter_read(struct res_counter *counter, int member, |
64 | const char __user *buf, size_t nbytes, loff_t *pos, | 64 | const char __user *buf, size_t nbytes, loff_t *pos, |
65 | int (*read_strategy)(unsigned long long val, char *s)); | 65 | int (*read_strategy)(unsigned long long val, char *s)); |
66 | ssize_t res_counter_write(struct res_counter *counter, int member, | 66 | |
67 | const char __user *buf, size_t nbytes, loff_t *pos, | 67 | typedef int (*write_strategy_fn)(const char *buf, unsigned long long *val); |
68 | int (*write_strategy)(char *buf, unsigned long long *val)); | 68 | |
69 | int res_counter_memparse_write_strategy(const char *buf, | ||
70 | unsigned long long *res); | ||
71 | |||
72 | int res_counter_write(struct res_counter *counter, int member, | ||
73 | const char *buffer, write_strategy_fn write_strategy); | ||
69 | 74 | ||
70 | /* | 75 | /* |
71 | * the field descriptors. one for each member of res_counter | 76 | * the field descriptors. one for each member of res_counter |
@@ -95,8 +100,10 @@ void res_counter_init(struct res_counter *counter); | |||
95 | * counter->limit _locked call expects the counter->lock to be taken | 100 | * counter->limit _locked call expects the counter->lock to be taken |
96 | */ | 101 | */ |
97 | 102 | ||
98 | int res_counter_charge_locked(struct res_counter *counter, unsigned long val); | 103 | int __must_check res_counter_charge_locked(struct res_counter *counter, |
99 | int res_counter_charge(struct res_counter *counter, unsigned long val); | 104 | unsigned long val); |
105 | int __must_check res_counter_charge(struct res_counter *counter, | ||
106 | unsigned long val); | ||
100 | 107 | ||
101 | /* | 108 | /* |
102 | * uncharge - tell that some portion of the resource is released | 109 | * uncharge - tell that some portion of the resource is released |
@@ -151,4 +158,20 @@ static inline void res_counter_reset_failcnt(struct res_counter *cnt) | |||
151 | cnt->failcnt = 0; | 158 | cnt->failcnt = 0; |
152 | spin_unlock_irqrestore(&cnt->lock, flags); | 159 | spin_unlock_irqrestore(&cnt->lock, flags); |
153 | } | 160 | } |
161 | |||
162 | static inline int res_counter_set_limit(struct res_counter *cnt, | ||
163 | unsigned long long limit) | ||
164 | { | ||
165 | unsigned long flags; | ||
166 | int ret = -EBUSY; | ||
167 | |||
168 | spin_lock_irqsave(&cnt->lock, flags); | ||
169 | if (cnt->usage < limit) { | ||
170 | cnt->limit = limit; | ||
171 | ret = 0; | ||
172 | } | ||
173 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
174 | return ret; | ||
175 | } | ||
176 | |||
154 | #endif | 177 | #endif |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index f2d0d1527721..b01fe004cb5e 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -115,6 +115,23 @@ extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); | |||
115 | 115 | ||
116 | extern struct class *rtc_class; | 116 | extern struct class *rtc_class; |
117 | 117 | ||
118 | /* | ||
119 | * For these RTC methods the device parameter is the physical device | ||
120 | * on whatever bus holds the hardware (I2C, Platform, SPI, etc), which | ||
121 | * was passed to rtc_device_register(). Its driver_data normally holds | ||
122 | * device state, including the rtc_device pointer for the RTC. | ||
123 | * | ||
124 | * Most of these methods are called with rtc_device.ops_lock held, | ||
125 | * through the rtc_*(struct rtc_device *, ...) calls. | ||
126 | * | ||
127 | * The (current) exceptions are mostly filesystem hooks: | ||
128 | * - the proc() hook for procfs | ||
129 | * - non-ioctl() chardev hooks: open(), release(), read_callback() | ||
130 | * - periodic irq calls: irq_set_state(), irq_set_freq() | ||
131 | * | ||
132 | * REVISIT those periodic irq calls *do* have ops_lock when they're | ||
133 | * issued through ioctl() ... | ||
134 | */ | ||
118 | struct rtc_class_ops { | 135 | struct rtc_class_ops { |
119 | int (*open)(struct device *); | 136 | int (*open)(struct device *); |
120 | void (*release)(struct device *); | 137 | void (*release)(struct device *); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index dc7e592c473a..42036ffe6b00 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -506,6 +506,10 @@ struct signal_struct { | |||
506 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 506 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
507 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; | 507 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; |
508 | unsigned long inblock, oublock, cinblock, coublock; | 508 | unsigned long inblock, oublock, cinblock, coublock; |
509 | #ifdef CONFIG_TASK_XACCT | ||
510 | u64 rchar, wchar, syscr, syscw; | ||
511 | #endif | ||
512 | struct task_io_accounting ioac; | ||
509 | 513 | ||
510 | /* | 514 | /* |
511 | * Cumulative ns of scheduled CPU time for dead threads in the | 515 | * Cumulative ns of scheduled CPU time for dead threads in the |
@@ -668,6 +672,10 @@ struct task_delay_info { | |||
668 | /* io operations performed */ | 672 | /* io operations performed */ |
669 | u32 swapin_count; /* total count of the number of swapin block */ | 673 | u32 swapin_count; /* total count of the number of swapin block */ |
670 | /* io operations performed */ | 674 | /* io operations performed */ |
675 | |||
676 | struct timespec freepages_start, freepages_end; | ||
677 | u64 freepages_delay; /* wait for memory reclaim */ | ||
678 | u32 freepages_count; /* total count of memory reclaim */ | ||
671 | }; | 679 | }; |
672 | #endif /* CONFIG_TASK_DELAY_ACCT */ | 680 | #endif /* CONFIG_TASK_DELAY_ACCT */ |
673 | 681 | ||
@@ -1257,7 +1265,7 @@ struct task_struct { | |||
1257 | #if defined(CONFIG_TASK_XACCT) | 1265 | #if defined(CONFIG_TASK_XACCT) |
1258 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1266 | u64 acct_rss_mem1; /* accumulated rss usage */ |
1259 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ | 1267 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ |
1260 | cputime_t acct_stimexpd;/* stime since last update */ | 1268 | cputime_t acct_timexpd; /* stime + utime since last update */ |
1261 | #endif | 1269 | #endif |
1262 | #ifdef CONFIG_CPUSETS | 1270 | #ifdef CONFIG_CPUSETS |
1263 | nodemask_t mems_allowed; | 1271 | nodemask_t mems_allowed; |
@@ -1496,7 +1504,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
1496 | #define PF_KSWAPD 0x00040000 /* I am kswapd */ | 1504 | #define PF_KSWAPD 0x00040000 /* I am kswapd */ |
1497 | #define PF_SWAPOFF 0x00080000 /* I am in swapoff */ | 1505 | #define PF_SWAPOFF 0x00080000 /* I am in swapoff */ |
1498 | #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ | 1506 | #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ |
1499 | #define PF_BORROWED_MM 0x00200000 /* I am a kthread doing use_mm */ | 1507 | #define PF_KTHREAD 0x00200000 /* I am a kernel thread */ |
1500 | #define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ | 1508 | #define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ |
1501 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ | 1509 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ |
1502 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 1510 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
@@ -1715,19 +1723,13 @@ extern struct pid_namespace init_pid_ns; | |||
1715 | * finds a task by its pid in the specified namespace | 1723 | * finds a task by its pid in the specified namespace |
1716 | * find_task_by_vpid(): | 1724 | * find_task_by_vpid(): |
1717 | * finds a task by its virtual pid | 1725 | * finds a task by its virtual pid |
1718 | * find_task_by_pid(): | ||
1719 | * finds a task by its global pid | ||
1720 | * | 1726 | * |
1721 | * see also find_pid() etc in include/linux/pid.h | 1727 | * see also find_vpid() etc in include/linux/pid.h |
1722 | */ | 1728 | */ |
1723 | 1729 | ||
1724 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, | 1730 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, |
1725 | struct pid_namespace *ns); | 1731 | struct pid_namespace *ns); |
1726 | 1732 | ||
1727 | static inline struct task_struct *__deprecated find_task_by_pid(pid_t nr) | ||
1728 | { | ||
1729 | return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns); | ||
1730 | } | ||
1731 | extern struct task_struct *find_task_by_vpid(pid_t nr); | 1733 | extern struct task_struct *find_task_by_vpid(pid_t nr); |
1732 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, | 1734 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, |
1733 | struct pid_namespace *ns); | 1735 | struct pid_namespace *ns); |
@@ -1800,7 +1802,6 @@ extern void force_sig(int, struct task_struct *); | |||
1800 | extern void force_sig_specific(int, struct task_struct *); | 1802 | extern void force_sig_specific(int, struct task_struct *); |
1801 | extern int send_sig(int, struct task_struct *, int); | 1803 | extern int send_sig(int, struct task_struct *, int); |
1802 | extern void zap_other_threads(struct task_struct *p); | 1804 | extern void zap_other_threads(struct task_struct *p); |
1803 | extern int kill_proc(pid_t, int, int); | ||
1804 | extern struct sigqueue *sigqueue_alloc(void); | 1805 | extern struct sigqueue *sigqueue_alloc(void); |
1805 | extern void sigqueue_free(struct sigqueue *); | 1806 | extern void sigqueue_free(struct sigqueue *); |
1806 | extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); | 1807 | extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); |
@@ -1983,6 +1984,13 @@ static inline unsigned long *end_of_stack(struct task_struct *p) | |||
1983 | 1984 | ||
1984 | #endif | 1985 | #endif |
1985 | 1986 | ||
1987 | static inline int object_is_on_stack(void *obj) | ||
1988 | { | ||
1989 | void *stack = task_stack_page(current); | ||
1990 | |||
1991 | return (obj >= stack) && (obj < (stack + THREAD_SIZE)); | ||
1992 | } | ||
1993 | |||
1986 | extern void thread_info_cache_init(void); | 1994 | extern void thread_info_cache_init(void); |
1987 | 1995 | ||
1988 | /* set thread flags in other task's structures | 1996 | /* set thread flags in other task's structures |
@@ -2047,9 +2055,6 @@ static inline int signal_pending_state(long state, struct task_struct *p) | |||
2047 | if (!signal_pending(p)) | 2055 | if (!signal_pending(p)) |
2048 | return 0; | 2056 | return 0; |
2049 | 2057 | ||
2050 | if (state & (__TASK_STOPPED | __TASK_TRACED)) | ||
2051 | return 0; | ||
2052 | |||
2053 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | 2058 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); |
2054 | } | 2059 | } |
2055 | 2060 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index 31c8851ec5d0..f0e9adb22ac2 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -102,9 +102,7 @@ extern unsigned long mmap_min_addr; | |||
102 | #define LSM_SETID_FS 8 | 102 | #define LSM_SETID_FS 8 |
103 | 103 | ||
104 | /* forward declares to avoid warnings */ | 104 | /* forward declares to avoid warnings */ |
105 | struct nfsctl_arg; | ||
106 | struct sched_param; | 105 | struct sched_param; |
107 | struct swap_info_struct; | ||
108 | struct request_sock; | 106 | struct request_sock; |
109 | 107 | ||
110 | /* bprm_apply_creds unsafe reasons */ | 108 | /* bprm_apply_creds unsafe reasons */ |
diff --git a/include/linux/sem.h b/include/linux/sem.h index c8eaad9e4b72..1b191c176bcd 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -78,6 +78,7 @@ struct seminfo { | |||
78 | 78 | ||
79 | #ifdef __KERNEL__ | 79 | #ifdef __KERNEL__ |
80 | #include <asm/atomic.h> | 80 | #include <asm/atomic.h> |
81 | #include <linux/rcupdate.h> | ||
81 | 82 | ||
82 | struct task_struct; | 83 | struct task_struct; |
83 | 84 | ||
@@ -93,23 +94,19 @@ struct sem_array { | |||
93 | time_t sem_otime; /* last semop time */ | 94 | time_t sem_otime; /* last semop time */ |
94 | time_t sem_ctime; /* last change time */ | 95 | time_t sem_ctime; /* last change time */ |
95 | struct sem *sem_base; /* ptr to first semaphore in array */ | 96 | struct sem *sem_base; /* ptr to first semaphore in array */ |
96 | struct sem_queue *sem_pending; /* pending operations to be processed */ | 97 | struct list_head sem_pending; /* pending operations to be processed */ |
97 | struct sem_queue **sem_pending_last; /* last pending operation */ | 98 | struct list_head list_id; /* undo requests on this array */ |
98 | struct sem_undo *undo; /* undo requests on this array */ | ||
99 | unsigned long sem_nsems; /* no. of semaphores in array */ | 99 | unsigned long sem_nsems; /* no. of semaphores in array */ |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* One queue for each sleeping process in the system. */ | 102 | /* One queue for each sleeping process in the system. */ |
103 | struct sem_queue { | 103 | struct sem_queue { |
104 | struct sem_queue * next; /* next entry in the queue */ | 104 | struct list_head list; /* queue of pending operations */ |
105 | struct sem_queue ** prev; /* previous entry in the queue, *(q->prev) == q */ | 105 | struct task_struct *sleeper; /* this process */ |
106 | struct task_struct* sleeper; /* this process */ | 106 | struct sem_undo *undo; /* undo structure */ |
107 | struct sem_undo * undo; /* undo structure */ | ||
108 | int pid; /* process id of requesting process */ | 107 | int pid; /* process id of requesting process */ |
109 | int status; /* completion status of operation */ | 108 | int status; /* completion status of operation */ |
110 | struct sem_array * sma; /* semaphore array for operations */ | 109 | struct sembuf *sops; /* array of pending operations */ |
111 | int id; /* internal sem id */ | ||
112 | struct sembuf * sops; /* array of pending operations */ | ||
113 | int nsops; /* number of operations */ | 110 | int nsops; /* number of operations */ |
114 | int alter; /* does the operation alter the array? */ | 111 | int alter; /* does the operation alter the array? */ |
115 | }; | 112 | }; |
@@ -118,8 +115,11 @@ struct sem_queue { | |||
118 | * when the process exits. | 115 | * when the process exits. |
119 | */ | 116 | */ |
120 | struct sem_undo { | 117 | struct sem_undo { |
121 | struct sem_undo * proc_next; /* next entry on this process */ | 118 | struct list_head list_proc; /* per-process list: all undos from one process. */ |
122 | struct sem_undo * id_next; /* next entry on this semaphore set */ | 119 | /* rcu protected */ |
120 | struct rcu_head rcu; /* rcu struct for sem_undo() */ | ||
121 | struct sem_undo_list *ulp; /* sem_undo_list for the process */ | ||
122 | struct list_head list_id; /* per semaphore array list: all undos for one array */ | ||
123 | int semid; /* semaphore set identifier */ | 123 | int semid; /* semaphore set identifier */ |
124 | short * semadj; /* array of adjustments, one per semaphore */ | 124 | short * semadj; /* array of adjustments, one per semaphore */ |
125 | }; | 125 | }; |
@@ -128,9 +128,9 @@ struct sem_undo { | |||
128 | * that may be shared among all a CLONE_SYSVSEM task group. | 128 | * that may be shared among all a CLONE_SYSVSEM task group. |
129 | */ | 129 | */ |
130 | struct sem_undo_list { | 130 | struct sem_undo_list { |
131 | atomic_t refcnt; | 131 | atomic_t refcnt; |
132 | spinlock_t lock; | 132 | spinlock_t lock; |
133 | struct sem_undo *proc_list; | 133 | struct list_head list_proc; |
134 | }; | 134 | }; |
135 | 135 | ||
136 | struct sysv_sem { | 136 | struct sysv_sem { |
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h index 9cae64b00d6b..7415839ac890 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h | |||
@@ -26,10 +26,8 @@ struct semaphore { | |||
26 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ | 26 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ |
27 | } | 27 | } |
28 | 28 | ||
29 | #define __DECLARE_SEMAPHORE_GENERIC(name, count) \ | 29 | #define DECLARE_MUTEX(name) \ |
30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, count) | 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) |
31 | |||
32 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1) | ||
33 | 31 | ||
34 | static inline void sema_init(struct semaphore *sem, int val) | 32 | static inline void sema_init(struct semaphore *sem, int val) |
35 | { | 33 | { |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index f3a1c0e45021..3b2f6c04855e 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -59,9 +59,6 @@ | |||
59 | #define PORT_SUNZILOG 38 | 59 | #define PORT_SUNZILOG 38 |
60 | #define PORT_SUNSAB 39 | 60 | #define PORT_SUNSAB 39 |
61 | 61 | ||
62 | /* NEC v850. */ | ||
63 | #define PORT_V850E_UART 40 | ||
64 | |||
65 | /* DEC */ | 62 | /* DEC */ |
66 | #define PORT_DZ 46 | 63 | #define PORT_DZ 46 |
67 | #define PORT_ZS 47 | 64 | #define PORT_ZS 47 |
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index ea037f28df91..bef0c46d4713 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
@@ -8,6 +8,12 @@ | |||
8 | #ifndef _LINUX_SIGNALFD_H | 8 | #ifndef _LINUX_SIGNALFD_H |
9 | #define _LINUX_SIGNALFD_H | 9 | #define _LINUX_SIGNALFD_H |
10 | 10 | ||
11 | /* For O_CLOEXEC and O_NONBLOCK */ | ||
12 | #include <linux/fcntl.h> | ||
13 | |||
14 | /* Flags for signalfd4. */ | ||
15 | #define SFD_CLOEXEC O_CLOEXEC | ||
16 | #define SFD_NONBLOCK O_NONBLOCK | ||
11 | 17 | ||
12 | struct signalfd_siginfo { | 18 | struct signalfd_siginfo { |
13 | __u32 ssi_signo; | 19 | __u32 ssi_signo; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 9aa90a6f20e0..41103910f8a2 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -180,7 +180,7 @@ size_t ksize(const void *); | |||
180 | */ | 180 | */ |
181 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | 181 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) |
182 | { | 182 | { |
183 | if (n != 0 && size > ULONG_MAX / n) | 183 | if (size != 0 && n > ULONG_MAX / size) |
184 | return NULL; | 184 | return NULL; |
185 | return __kmalloc(n * size, flags | __GFP_ZERO); | 185 | return __kmalloc(n * size, flags | __GFP_ZERO); |
186 | } | 186 | } |
diff --git a/include/linux/sm501.h b/include/linux/sm501.h index 95c1c39ba445..214f93209b8c 100644 --- a/include/linux/sm501.h +++ b/include/linux/sm501.h | |||
@@ -46,24 +46,6 @@ extern unsigned long sm501_modify_reg(struct device *dev, | |||
46 | unsigned long set, | 46 | unsigned long set, |
47 | unsigned long clear); | 47 | unsigned long clear); |
48 | 48 | ||
49 | /* sm501_gpio_set | ||
50 | * | ||
51 | * set the state of the given GPIO line | ||
52 | */ | ||
53 | |||
54 | extern void sm501_gpio_set(struct device *dev, | ||
55 | unsigned long gpio, | ||
56 | unsigned int to, | ||
57 | unsigned int dir); | ||
58 | |||
59 | /* sm501_gpio_get | ||
60 | * | ||
61 | * get the state of the given GPIO line | ||
62 | */ | ||
63 | |||
64 | extern unsigned long sm501_gpio_get(struct device *dev, | ||
65 | unsigned long gpio); | ||
66 | |||
67 | 49 | ||
68 | /* Platform data definitions */ | 50 | /* Platform data definitions */ |
69 | 51 | ||
@@ -73,6 +55,8 @@ extern unsigned long sm501_gpio_get(struct device *dev, | |||
73 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) | 55 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) |
74 | #define SM501FB_FLAG_PANEL_NO_FPEN (1<<4) | 56 | #define SM501FB_FLAG_PANEL_NO_FPEN (1<<4) |
75 | #define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5) | 57 | #define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5) |
58 | #define SM501FB_FLAG_PANEL_INV_FPEN (1<<6) | ||
59 | #define SM501FB_FLAG_PANEL_INV_VBIASEN (1<<7) | ||
76 | 60 | ||
77 | struct sm501_platdata_fbsub { | 61 | struct sm501_platdata_fbsub { |
78 | struct fb_videomode *def_mode; | 62 | struct fb_videomode *def_mode; |
@@ -102,11 +86,19 @@ struct sm501_platdata_fb { | |||
102 | struct sm501_platdata_fbsub *fb_pnl; | 86 | struct sm501_platdata_fbsub *fb_pnl; |
103 | }; | 87 | }; |
104 | 88 | ||
105 | /* gpio i2c */ | 89 | /* gpio i2c |
90 | * | ||
91 | * Note, we have to pass in the bus number, as the number used will be | ||
92 | * passed to the i2c-gpio driver's platform_device.id, subsequently used | ||
93 | * to register the i2c bus. | ||
94 | */ | ||
106 | 95 | ||
107 | struct sm501_platdata_gpio_i2c { | 96 | struct sm501_platdata_gpio_i2c { |
97 | unsigned int bus_num; | ||
108 | unsigned int pin_sda; | 98 | unsigned int pin_sda; |
109 | unsigned int pin_scl; | 99 | unsigned int pin_scl; |
100 | int udelay; | ||
101 | int timeout; | ||
110 | }; | 102 | }; |
111 | 103 | ||
112 | /* sm501_initdata | 104 | /* sm501_initdata |
@@ -129,6 +121,7 @@ struct sm501_reg_init { | |||
129 | #define SM501_USE_FBACCEL (1<<6) | 121 | #define SM501_USE_FBACCEL (1<<6) |
130 | #define SM501_USE_AC97 (1<<7) | 122 | #define SM501_USE_AC97 (1<<7) |
131 | #define SM501_USE_I2S (1<<8) | 123 | #define SM501_USE_I2S (1<<8) |
124 | #define SM501_USE_GPIO (1<<9) | ||
132 | 125 | ||
133 | #define SM501_USE_ALL (0xffffffff) | 126 | #define SM501_USE_ALL (0xffffffff) |
134 | 127 | ||
@@ -155,6 +148,8 @@ struct sm501_init_gpio { | |||
155 | struct sm501_reg_init gpio_ddr_high; | 148 | struct sm501_reg_init gpio_ddr_high; |
156 | }; | 149 | }; |
157 | 150 | ||
151 | #define SM501_FLAG_SUSPEND_OFF (1<<4) | ||
152 | |||
158 | /* sm501_platdata | 153 | /* sm501_platdata |
159 | * | 154 | * |
160 | * This is passed with the platform device to allow the board | 155 | * This is passed with the platform device to allow the board |
@@ -168,6 +163,12 @@ struct sm501_platdata { | |||
168 | struct sm501_init_gpio *init_gpiop; | 163 | struct sm501_init_gpio *init_gpiop; |
169 | struct sm501_platdata_fb *fb; | 164 | struct sm501_platdata_fb *fb; |
170 | 165 | ||
166 | int flags; | ||
167 | int gpio_base; | ||
168 | |||
169 | int (*get_power)(struct device *dev); | ||
170 | int (*set_power)(struct device *dev, unsigned int on); | ||
171 | |||
171 | struct sm501_platdata_gpio_i2c *gpio_i2c; | 172 | struct sm501_platdata_gpio_i2c *gpio_i2c; |
172 | unsigned int gpio_i2c_nr; | 173 | unsigned int gpio_i2c_nr; |
173 | }; | 174 | }; |
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index 2c5cd55f44ff..923cd8a247b1 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h | |||
@@ -43,18 +43,13 @@ static inline struct smb_inode_info *SMB_I(struct inode *inode) | |||
43 | } | 43 | } |
44 | 44 | ||
45 | /* macro names are short for word, double-word, long value (?) */ | 45 | /* macro names are short for word, double-word, long value (?) */ |
46 | #define WVAL(buf,pos) \ | 46 | #define WVAL(buf, pos) (get_unaligned_le16((u8 *)(buf) + (pos))) |
47 | (le16_to_cpu(get_unaligned((__le16 *)((u8 *)(buf) + (pos))))) | 47 | #define DVAL(buf, pos) (get_unaligned_le32((u8 *)(buf) + (pos))) |
48 | #define DVAL(buf,pos) \ | 48 | #define LVAL(buf, pos) (get_unaligned_le64((u8 *)(buf) + (pos))) |
49 | (le32_to_cpu(get_unaligned((__le32 *)((u8 *)(buf) + (pos))))) | 49 | |
50 | #define LVAL(buf,pos) \ | 50 | #define WSET(buf, pos, val) put_unaligned_le16((val), (u8 *)(buf) + (pos)) |
51 | (le64_to_cpu(get_unaligned((__le64 *)((u8 *)(buf) + (pos))))) | 51 | #define DSET(buf, pos, val) put_unaligned_le32((val), (u8 *)(buf) + (pos)) |
52 | #define WSET(buf,pos,val) \ | 52 | #define LSET(buf, pos, val) put_unaligned_le64((val), (u8 *)(buf) + (pos)) |
53 | put_unaligned(cpu_to_le16((u16)(val)), (__le16 *)((u8 *)(buf) + (pos))) | ||
54 | #define DSET(buf,pos,val) \ | ||
55 | put_unaligned(cpu_to_le32((u32)(val)), (__le32 *)((u8 *)(buf) + (pos))) | ||
56 | #define LSET(buf,pos,val) \ | ||
57 | put_unaligned(cpu_to_le64((u64)(val)), (__le64 *)((u8 *)(buf) + (pos))) | ||
58 | 53 | ||
59 | /* where to find the base of the SMB packet proper */ | 54 | /* where to find the base of the SMB packet proper */ |
60 | #define smb_base(buf) ((u8 *)(((u8 *)(buf))+4)) | 55 | #define smb_base(buf) ((u8 *)(((u8 *)(buf))+4)) |
diff --git a/include/linux/spi/ds1305.h b/include/linux/spi/ds1305.h new file mode 100644 index 000000000000..287ec830eab7 --- /dev/null +++ b/include/linux/spi/ds1305.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef __LINUX_SPI_DS1305_H | ||
2 | #define __LINUX_SPI_DS1305_H | ||
3 | |||
4 | /* | ||
5 | * One-time configuration for ds1305 and ds1306 RTC chips. | ||
6 | * | ||
7 | * Put a pointer to this in spi_board_info.platform_data if you want to | ||
8 | * be sure that Linux (re)initializes this as needed ... after losing | ||
9 | * backup power, and potentially on the first boot. | ||
10 | */ | ||
11 | struct ds1305_platform_data { | ||
12 | |||
13 | /* Trickle charge configuration: it's OK to leave out the MAGIC | ||
14 | * bitmask; mask in either DS1 or DS2, and then one of 2K/4k/8K. | ||
15 | */ | ||
16 | #define DS1305_TRICKLE_MAGIC 0xa0 | ||
17 | #define DS1305_TRICKLE_DS2 0x08 /* two diodes */ | ||
18 | #define DS1305_TRICKLE_DS1 0x04 /* one diode */ | ||
19 | #define DS1305_TRICKLE_2K 0x01 /* 2 KOhm resistance */ | ||
20 | #define DS1305_TRICKLE_4K 0x02 /* 4 KOhm resistance */ | ||
21 | #define DS1305_TRICKLE_8K 0x03 /* 8 KOhm resistance */ | ||
22 | u8 trickle; | ||
23 | |||
24 | /* set only on ds1306 parts */ | ||
25 | bool is_ds1306; | ||
26 | |||
27 | /* ds1306 only: enable 1 Hz output */ | ||
28 | bool en_1hz; | ||
29 | |||
30 | /* REVISIT: the driver currently expects nINT0 to be wired | ||
31 | * as the alarm IRQ. ALM1 may also need to be set up ... | ||
32 | */ | ||
33 | }; | ||
34 | |||
35 | #endif /* __LINUX_SPI_DS1305_H */ | ||
diff --git a/include/linux/spi/mcp23s08.h b/include/linux/spi/mcp23s08.h index 835ddf47d45c..22ef107d7704 100644 --- a/include/linux/spi/mcp23s08.h +++ b/include/linux/spi/mcp23s08.h | |||
@@ -1,18 +1,25 @@ | |||
1 | 1 | ||
2 | /* FIXME driver should be able to handle all four slaves that | 2 | /* FIXME driver should be able to handle IRQs... */ |
3 | * can be hooked up to each chipselect, as well as IRQs... | 3 | |
4 | */ | 4 | struct mcp23s08_chip_info { |
5 | bool is_present; /* true iff populated */ | ||
6 | u8 pullups; /* BIT(x) means enable pullup x */ | ||
7 | }; | ||
5 | 8 | ||
6 | struct mcp23s08_platform_data { | 9 | struct mcp23s08_platform_data { |
7 | /* four slaves can share one SPI chipselect */ | 10 | /* Four slaves (numbered 0..3) can share one SPI chipselect, and |
8 | u8 slave; | 11 | * will provide 8..32 GPIOs using 1..4 gpio_chip instances. |
12 | */ | ||
13 | struct mcp23s08_chip_info chip[4]; | ||
9 | 14 | ||
10 | /* number assigned to the first GPIO */ | 15 | /* "base" is the number of the first GPIO. Dynamic assignment is |
16 | * not currently supported, and even if there are gaps in chip | ||
17 | * addressing the GPIO numbers are sequential .. so for example | ||
18 | * if only slaves 0 and 3 are present, their GPIOs range from | ||
19 | * base to base+15. | ||
20 | */ | ||
11 | unsigned base; | 21 | unsigned base; |
12 | 22 | ||
13 | /* pins with pullups */ | ||
14 | u8 pullups; | ||
15 | |||
16 | void *context; /* param to setup/teardown */ | 23 | void *context; /* param to setup/teardown */ |
17 | 24 | ||
18 | int (*setup)(struct spi_device *spi, | 25 | int (*setup)(struct spi_device *spi, |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index b9a76c972084..a9cc29d46653 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -82,7 +82,7 @@ struct spi_device { | |||
82 | int irq; | 82 | int irq; |
83 | void *controller_state; | 83 | void *controller_state; |
84 | void *controller_data; | 84 | void *controller_data; |
85 | const char *modalias; | 85 | char modalias[32]; |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * likely need more hooks for more protocol options affecting how | 88 | * likely need more hooks for more protocol options affecting how |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index d311a090fae7..61e5610ad165 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -46,6 +46,7 @@ | |||
46 | * linux/spinlock.h: builds the final spin_*() APIs. | 46 | * linux/spinlock.h: builds the final spin_*() APIs. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include <linux/typecheck.h> | ||
49 | #include <linux/preempt.h> | 50 | #include <linux/preempt.h> |
50 | #include <linux/linkage.h> | 51 | #include <linux/linkage.h> |
51 | #include <linux/compiler.h> | 52 | #include <linux/compiler.h> |
@@ -191,23 +192,53 @@ do { \ | |||
191 | 192 | ||
192 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 193 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
193 | 194 | ||
194 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) | 195 | #define spin_lock_irqsave(lock, flags) \ |
195 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) | 196 | do { \ |
196 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) | 197 | typecheck(unsigned long, flags); \ |
198 | flags = _spin_lock_irqsave(lock); \ | ||
199 | } while (0) | ||
200 | #define read_lock_irqsave(lock, flags) \ | ||
201 | do { \ | ||
202 | typecheck(unsigned long, flags); \ | ||
203 | flags = _read_lock_irqsave(lock); \ | ||
204 | } while (0) | ||
205 | #define write_lock_irqsave(lock, flags) \ | ||
206 | do { \ | ||
207 | typecheck(unsigned long, flags); \ | ||
208 | flags = _write_lock_irqsave(lock); \ | ||
209 | } while (0) | ||
197 | 210 | ||
198 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 211 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
199 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | 212 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ |
200 | flags = _spin_lock_irqsave_nested(lock, subclass) | 213 | do { \ |
214 | typecheck(unsigned long, flags); \ | ||
215 | flags = _spin_lock_irqsave_nested(lock, subclass); \ | ||
216 | } while (0) | ||
201 | #else | 217 | #else |
202 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | 218 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ |
203 | flags = _spin_lock_irqsave(lock) | 219 | do { \ |
220 | typecheck(unsigned long, flags); \ | ||
221 | flags = _spin_lock_irqsave(lock); \ | ||
222 | } while (0) | ||
204 | #endif | 223 | #endif |
205 | 224 | ||
206 | #else | 225 | #else |
207 | 226 | ||
208 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) | 227 | #define spin_lock_irqsave(lock, flags) \ |
209 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) | 228 | do { \ |
210 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) | 229 | typecheck(unsigned long, flags); \ |
230 | _spin_lock_irqsave(lock, flags); \ | ||
231 | } while (0) | ||
232 | #define read_lock_irqsave(lock, flags) \ | ||
233 | do { \ | ||
234 | typecheck(unsigned long, flags); \ | ||
235 | _read_lock_irqsave(lock, flags); \ | ||
236 | } while (0) | ||
237 | #define write_lock_irqsave(lock, flags) \ | ||
238 | do { \ | ||
239 | typecheck(unsigned long, flags); \ | ||
240 | _write_lock_irqsave(lock, flags); \ | ||
241 | } while (0) | ||
211 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | 242 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ |
212 | spin_lock_irqsave(lock, flags) | 243 | spin_lock_irqsave(lock, flags) |
213 | 244 | ||
@@ -260,16 +291,25 @@ do { \ | |||
260 | } while (0) | 291 | } while (0) |
261 | #endif | 292 | #endif |
262 | 293 | ||
263 | #define spin_unlock_irqrestore(lock, flags) \ | 294 | #define spin_unlock_irqrestore(lock, flags) \ |
264 | _spin_unlock_irqrestore(lock, flags) | 295 | do { \ |
296 | typecheck(unsigned long, flags); \ | ||
297 | _spin_unlock_irqrestore(lock, flags); \ | ||
298 | } while (0) | ||
265 | #define spin_unlock_bh(lock) _spin_unlock_bh(lock) | 299 | #define spin_unlock_bh(lock) _spin_unlock_bh(lock) |
266 | 300 | ||
267 | #define read_unlock_irqrestore(lock, flags) \ | 301 | #define read_unlock_irqrestore(lock, flags) \ |
268 | _read_unlock_irqrestore(lock, flags) | 302 | do { \ |
303 | typecheck(unsigned long, flags); \ | ||
304 | _read_unlock_irqrestore(lock, flags); \ | ||
305 | } while (0) | ||
269 | #define read_unlock_bh(lock) _read_unlock_bh(lock) | 306 | #define read_unlock_bh(lock) _read_unlock_bh(lock) |
270 | 307 | ||
271 | #define write_unlock_irqrestore(lock, flags) \ | 308 | #define write_unlock_irqrestore(lock, flags) \ |
272 | _write_unlock_irqrestore(lock, flags) | 309 | do { \ |
310 | typecheck(unsigned long, flags); \ | ||
311 | _write_unlock_irqrestore(lock, flags); \ | ||
312 | } while (0) | ||
273 | #define write_unlock_bh(lock) _write_unlock_bh(lock) | 313 | #define write_unlock_bh(lock) _write_unlock_bh(lock) |
274 | 314 | ||
275 | #define spin_trylock_bh(lock) __cond_lock(lock, _spin_trylock_bh(lock)) | 315 | #define spin_trylock_bh(lock) __cond_lock(lock, _spin_trylock_bh(lock)) |
diff --git a/include/linux/string.h b/include/linux/string.h index efdc44593b52..810d80df0a1d 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -111,5 +111,8 @@ extern void argv_free(char **argv); | |||
111 | 111 | ||
112 | extern bool sysfs_streq(const char *s1, const char *s2); | 112 | extern bool sysfs_streq(const char *s1, const char *s2); |
113 | 113 | ||
114 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | ||
115 | const void *from, size_t available); | ||
116 | |||
114 | #endif | 117 | #endif |
115 | #endif /* _LINUX_STRING_H_ */ | 118 | #endif /* _LINUX_STRING_H_ */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 0522f368f9d7..d6ff145919ca 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -305,6 +305,7 @@ asmlinkage long sys_fcntl64(unsigned int fd, | |||
305 | #endif | 305 | #endif |
306 | asmlinkage long sys_dup(unsigned int fildes); | 306 | asmlinkage long sys_dup(unsigned int fildes); |
307 | asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd); | 307 | asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd); |
308 | asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags); | ||
308 | asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); | 309 | asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); |
309 | asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, | 310 | asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, |
310 | unsigned long arg); | 311 | unsigned long arg); |
@@ -409,6 +410,8 @@ asmlinkage long sys_getsockopt(int fd, int level, int optname, | |||
409 | asmlinkage long sys_bind(int, struct sockaddr __user *, int); | 410 | asmlinkage long sys_bind(int, struct sockaddr __user *, int); |
410 | asmlinkage long sys_connect(int, struct sockaddr __user *, int); | 411 | asmlinkage long sys_connect(int, struct sockaddr __user *, int); |
411 | asmlinkage long sys_accept(int, struct sockaddr __user *, int __user *); | 412 | asmlinkage long sys_accept(int, struct sockaddr __user *, int __user *); |
413 | asmlinkage long sys_paccept(int, struct sockaddr __user *, int __user *, | ||
414 | const __user sigset_t *, size_t, int); | ||
412 | asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *); | 415 | asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *); |
413 | asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *); | 416 | asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *); |
414 | asmlinkage long sys_send(int, void __user *, size_t, unsigned); | 417 | asmlinkage long sys_send(int, void __user *, size_t, unsigned); |
@@ -428,6 +431,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | |||
428 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, | 431 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, |
429 | fd_set __user *exp, struct timeval __user *tvp); | 432 | fd_set __user *exp, struct timeval __user *tvp); |
430 | asmlinkage long sys_epoll_create(int size); | 433 | asmlinkage long sys_epoll_create(int size); |
434 | asmlinkage long sys_epoll_create1(int flags); | ||
431 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, | 435 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, |
432 | struct epoll_event __user *event); | 436 | struct epoll_event __user *event); |
433 | asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events, | 437 | asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events, |
@@ -443,7 +447,7 @@ asmlinkage long sys_newuname(struct new_utsname __user *name); | |||
443 | 447 | ||
444 | asmlinkage long sys_getrlimit(unsigned int resource, | 448 | asmlinkage long sys_getrlimit(unsigned int resource, |
445 | struct rlimit __user *rlim); | 449 | struct rlimit __user *rlim); |
446 | #if defined(COMPAT_RLIM_OLD_INFINITY) || !(defined(CONFIG_IA64) || defined(CONFIG_V850)) | 450 | #if defined(COMPAT_RLIM_OLD_INFINITY) || !(defined(CONFIG_IA64)) |
447 | asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim); | 451 | asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim); |
448 | #endif | 452 | #endif |
449 | asmlinkage long sys_setrlimit(unsigned int resource, | 453 | asmlinkage long sys_setrlimit(unsigned int resource, |
@@ -543,6 +547,7 @@ asmlinkage long sys_get_mempolicy(int __user *policy, | |||
543 | unsigned long addr, unsigned long flags); | 547 | unsigned long addr, unsigned long flags); |
544 | 548 | ||
545 | asmlinkage long sys_inotify_init(void); | 549 | asmlinkage long sys_inotify_init(void); |
550 | asmlinkage long sys_inotify_init1(int flags); | ||
546 | asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, | 551 | asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, |
547 | u32 mask); | 552 | u32 mask); |
548 | asmlinkage long sys_inotify_rm_watch(int fd, u32 wd); | 553 | asmlinkage long sys_inotify_rm_watch(int fd, u32 wd); |
@@ -608,12 +613,14 @@ asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, | |||
608 | size_t len); | 613 | size_t len); |
609 | asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache); | 614 | asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache); |
610 | asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemask); | 615 | asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, size_t sizemask); |
616 | asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, size_t sizemask, int flags); | ||
611 | asmlinkage long sys_timerfd_create(int clockid, int flags); | 617 | asmlinkage long sys_timerfd_create(int clockid, int flags); |
612 | asmlinkage long sys_timerfd_settime(int ufd, int flags, | 618 | asmlinkage long sys_timerfd_settime(int ufd, int flags, |
613 | const struct itimerspec __user *utmr, | 619 | const struct itimerspec __user *utmr, |
614 | struct itimerspec __user *otmr); | 620 | struct itimerspec __user *otmr); |
615 | asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); | 621 | asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); |
616 | asmlinkage long sys_eventfd(unsigned int count); | 622 | asmlinkage long sys_eventfd(unsigned int count); |
623 | asmlinkage long sys_eventfd2(unsigned int count, int flags); | ||
617 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); | 624 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); |
618 | 625 | ||
619 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]); | 626 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]); |
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index 5d69c0744fff..18269e956a71 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
@@ -31,7 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | 33 | ||
34 | #define TASKSTATS_VERSION 6 | 34 | #define TASKSTATS_VERSION 7 |
35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN | 35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN |
36 | * in linux/sched.h */ | 36 | * in linux/sched.h */ |
37 | 37 | ||
@@ -157,6 +157,10 @@ struct taskstats { | |||
157 | __u64 ac_utimescaled; /* utime scaled on frequency etc */ | 157 | __u64 ac_utimescaled; /* utime scaled on frequency etc */ |
158 | __u64 ac_stimescaled; /* stime scaled on frequency etc */ | 158 | __u64 ac_stimescaled; /* stime scaled on frequency etc */ |
159 | __u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */ | 159 | __u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */ |
160 | |||
161 | /* Delay waiting for memory reclaim */ | ||
162 | __u64 freepages_count; | ||
163 | __u64 freepages_delay_total; | ||
160 | }; | 164 | }; |
161 | 165 | ||
162 | 166 | ||
diff --git a/include/linux/tick.h b/include/linux/tick.h index a881c652f7e9..d3c02695dc5d 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -49,6 +49,7 @@ struct tick_sched { | |||
49 | unsigned long check_clocks; | 49 | unsigned long check_clocks; |
50 | enum tick_nohz_mode nohz_mode; | 50 | enum tick_nohz_mode nohz_mode; |
51 | ktime_t idle_tick; | 51 | ktime_t idle_tick; |
52 | int inidle; | ||
52 | int tick_stopped; | 53 | int tick_stopped; |
53 | unsigned long idle_jiffies; | 54 | unsigned long idle_jiffies; |
54 | unsigned long idle_calls; | 55 | unsigned long idle_calls; |
@@ -105,14 +106,14 @@ static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | |||
105 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ | 106 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ |
106 | 107 | ||
107 | # ifdef CONFIG_NO_HZ | 108 | # ifdef CONFIG_NO_HZ |
108 | extern void tick_nohz_stop_sched_tick(void); | 109 | extern void tick_nohz_stop_sched_tick(int inidle); |
109 | extern void tick_nohz_restart_sched_tick(void); | 110 | extern void tick_nohz_restart_sched_tick(void); |
110 | extern void tick_nohz_update_jiffies(void); | 111 | extern void tick_nohz_update_jiffies(void); |
111 | extern ktime_t tick_nohz_get_sleep_length(void); | 112 | extern ktime_t tick_nohz_get_sleep_length(void); |
112 | extern void tick_nohz_stop_idle(int cpu); | 113 | extern void tick_nohz_stop_idle(int cpu); |
113 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); | 114 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); |
114 | # else | 115 | # else |
115 | static inline void tick_nohz_stop_sched_tick(void) { } | 116 | static inline void tick_nohz_stop_sched_tick(int inidle) { } |
116 | static inline void tick_nohz_restart_sched_tick(void) { } | 117 | static inline void tick_nohz_restart_sched_tick(void) { } |
117 | static inline void tick_nohz_update_jiffies(void) { } | 118 | static inline void tick_nohz_update_jiffies(void) { } |
118 | static inline ktime_t tick_nohz_get_sleep_length(void) | 119 | static inline ktime_t tick_nohz_get_sleep_length(void) |
diff --git a/include/linux/timerfd.h b/include/linux/timerfd.h index cf2b10d75731..86cb0501d3e2 100644 --- a/include/linux/timerfd.h +++ b/include/linux/timerfd.h | |||
@@ -8,9 +8,15 @@ | |||
8 | #ifndef _LINUX_TIMERFD_H | 8 | #ifndef _LINUX_TIMERFD_H |
9 | #define _LINUX_TIMERFD_H | 9 | #define _LINUX_TIMERFD_H |
10 | 10 | ||
11 | /* For O_CLOEXEC and O_NONBLOCK */ | ||
12 | #include <linux/fcntl.h> | ||
11 | 13 | ||
14 | /* Flags for timerfd_settime. */ | ||
12 | #define TFD_TIMER_ABSTIME (1 << 0) | 15 | #define TFD_TIMER_ABSTIME (1 << 0) |
13 | 16 | ||
17 | /* Flags for timerfd_create. */ | ||
18 | #define TFD_CLOEXEC O_CLOEXEC | ||
19 | #define TFD_NONBLOCK O_NONBLOCK | ||
14 | 20 | ||
15 | 21 | ||
16 | #endif /* _LINUX_TIMERFD_H */ | 22 | #endif /* _LINUX_TIMERFD_H */ |
diff --git a/include/linux/typecheck.h b/include/linux/typecheck.h new file mode 100644 index 000000000000..eb5b74a575be --- /dev/null +++ b/include/linux/typecheck.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef TYPECHECK_H_INCLUDED | ||
2 | #define TYPECHECK_H_INCLUDED | ||
3 | |||
4 | /* | ||
5 | * Check at compile time that something is of a particular type. | ||
6 | * Always evaluates to 1 so you may use it easily in comparisons. | ||
7 | */ | ||
8 | #define typecheck(type,x) \ | ||
9 | ({ type __dummy; \ | ||
10 | typeof(x) __dummy2; \ | ||
11 | (void)(&__dummy == &__dummy2); \ | ||
12 | 1; \ | ||
13 | }) | ||
14 | |||
15 | /* | ||
16 | * Check at compile time that 'function' is a certain type, or is a pointer | ||
17 | * to that type (needs to use typedef for the function type.) | ||
18 | */ | ||
19 | #define typecheck_fn(type,function) \ | ||
20 | ({ typeof(type) __tmp = function; \ | ||
21 | (void)__tmp; \ | ||
22 | }) | ||
23 | |||
24 | #endif /* TYPECHECK_H_INCLUDED */ | ||
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 747c3a49cdc9..c932390c6da0 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -330,7 +330,7 @@ extern int usb_string_id(struct usb_composite_dev *c); | |||
330 | dev_vdbg(&(d)->gadget->dev , fmt , ## args) | 330 | dev_vdbg(&(d)->gadget->dev , fmt , ## args) |
331 | #define ERROR(d, fmt, args...) \ | 331 | #define ERROR(d, fmt, args...) \ |
332 | dev_err(&(d)->gadget->dev , fmt , ## args) | 332 | dev_err(&(d)->gadget->dev , fmt , ## args) |
333 | #define WARN(d, fmt, args...) \ | 333 | #define WARNING(d, fmt, args...) \ |
334 | dev_warn(&(d)->gadget->dev , fmt , ## args) | 334 | dev_warn(&(d)->gadget->dev , fmt , ## args) |
335 | #define INFO(d, fmt, args...) \ | 335 | #define INFO(d, fmt, args...) \ |
336 | dev_info(&(d)->gadget->dev , fmt , ## args) | 336 | dev_info(&(d)->gadget->dev , fmt , ## args) |
diff --git a/include/linux/virtio_9p.h b/include/linux/virtio_9p.h index 8eff0b53910b..b3c4a60ceeb3 100644 --- a/include/linux/virtio_9p.h +++ b/include/linux/virtio_9p.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef _LINUX_VIRTIO_9P_H | 1 | #ifndef _LINUX_VIRTIO_9P_H |
2 | #define _LINUX_VIRTIO_9P_H | 2 | #define _LINUX_VIRTIO_9P_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | ||
4 | * compatible drivers/servers. */ | ||
3 | #include <linux/virtio_config.h> | 5 | #include <linux/virtio_config.h> |
4 | 6 | ||
5 | /* The ID for virtio console */ | 7 | /* The ID for virtio console */ |
diff --git a/include/linux/virtio_balloon.h b/include/linux/virtio_balloon.h index 979524ee75b7..c30c7bfbf39b 100644 --- a/include/linux/virtio_balloon.h +++ b/include/linux/virtio_balloon.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef _LINUX_VIRTIO_BALLOON_H | 1 | #ifndef _LINUX_VIRTIO_BALLOON_H |
2 | #define _LINUX_VIRTIO_BALLOON_H | 2 | #define _LINUX_VIRTIO_BALLOON_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | ||
4 | * compatible drivers/servers. */ | ||
3 | #include <linux/virtio_config.h> | 5 | #include <linux/virtio_config.h> |
4 | 6 | ||
5 | /* The ID for virtio_balloon */ | 7 | /* The ID for virtio_balloon */ |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index 5f79a5f9de79..c1aef85243bf 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef _LINUX_VIRTIO_BLK_H | 1 | #ifndef _LINUX_VIRTIO_BLK_H |
2 | #define _LINUX_VIRTIO_BLK_H | 2 | #define _LINUX_VIRTIO_BLK_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | ||
4 | * compatible drivers/servers. */ | ||
3 | #include <linux/virtio_config.h> | 5 | #include <linux/virtio_config.h> |
4 | 6 | ||
5 | /* The ID for virtio_block */ | 7 | /* The ID for virtio_block */ |
@@ -11,6 +13,7 @@ | |||
11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ | 13 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ |
12 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ | 14 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ |
13 | #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ | 15 | #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ |
16 | #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ | ||
14 | 17 | ||
15 | struct virtio_blk_config | 18 | struct virtio_blk_config |
16 | { | 19 | { |
@@ -26,6 +29,8 @@ struct virtio_blk_config | |||
26 | __u8 heads; | 29 | __u8 heads; |
27 | __u8 sectors; | 30 | __u8 sectors; |
28 | } geometry; | 31 | } geometry; |
32 | /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ | ||
33 | __u32 blk_size; | ||
29 | } __attribute__((packed)); | 34 | } __attribute__((packed)); |
30 | 35 | ||
31 | /* These two define direction. */ | 36 | /* These two define direction. */ |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index f364bbf63c34..bf8ec283b232 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef _LINUX_VIRTIO_CONFIG_H | 1 | #ifndef _LINUX_VIRTIO_CONFIG_H |
2 | #define _LINUX_VIRTIO_CONFIG_H | 2 | #define _LINUX_VIRTIO_CONFIG_H |
3 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | ||
4 | * anyone can use the definitions to implement compatible drivers/servers. */ | ||
5 | |||
3 | /* Virtio devices use a standardized configuration space to define their | 6 | /* Virtio devices use a standardized configuration space to define their |
4 | * features and pass configuration information, but each implementation can | 7 | * features and pass configuration information, but each implementation can |
5 | * store and access that space differently. */ | 8 | * store and access that space differently. */ |
@@ -15,6 +18,12 @@ | |||
15 | /* We've given up on this device. */ | 18 | /* We've given up on this device. */ |
16 | #define VIRTIO_CONFIG_S_FAILED 0x80 | 19 | #define VIRTIO_CONFIG_S_FAILED 0x80 |
17 | 20 | ||
21 | /* Some virtio feature bits (currently bits 28 through 31) are reserved for the | ||
22 | * transport being used (eg. virtio_ring), the rest are per-device feature | ||
23 | * bits. */ | ||
24 | #define VIRTIO_TRANSPORT_F_START 28 | ||
25 | #define VIRTIO_TRANSPORT_F_END 32 | ||
26 | |||
18 | /* Do we get callbacks when the ring is completely used, even if we've | 27 | /* Do we get callbacks when the ring is completely used, even if we've |
19 | * suppressed them? */ | 28 | * suppressed them? */ |
20 | #define VIRTIO_F_NOTIFY_ON_EMPTY 24 | 29 | #define VIRTIO_F_NOTIFY_ON_EMPTY 24 |
@@ -52,9 +61,10 @@ | |||
52 | * @get_features: get the array of feature bits for this device. | 61 | * @get_features: get the array of feature bits for this device. |
53 | * vdev: the virtio_device | 62 | * vdev: the virtio_device |
54 | * Returns the first 32 feature bits (all we currently need). | 63 | * Returns the first 32 feature bits (all we currently need). |
55 | * @set_features: confirm what device features we'll be using. | 64 | * @finalize_features: confirm what device features we'll be using. |
56 | * vdev: the virtio_device | 65 | * vdev: the virtio_device |
57 | * feature: the first 32 feature bits | 66 | * This gives the final feature bits for the device: it can change |
67 | * the dev->feature bits if it wants. | ||
58 | */ | 68 | */ |
59 | struct virtio_config_ops | 69 | struct virtio_config_ops |
60 | { | 70 | { |
@@ -70,7 +80,7 @@ struct virtio_config_ops | |||
70 | void (*callback)(struct virtqueue *)); | 80 | void (*callback)(struct virtqueue *)); |
71 | void (*del_vq)(struct virtqueue *vq); | 81 | void (*del_vq)(struct virtqueue *vq); |
72 | u32 (*get_features)(struct virtio_device *vdev); | 82 | u32 (*get_features)(struct virtio_device *vdev); |
73 | void (*set_features)(struct virtio_device *vdev, u32 features); | 83 | void (*finalize_features)(struct virtio_device *vdev); |
74 | }; | 84 | }; |
75 | 85 | ||
76 | /* If driver didn't advertise the feature, it will never appear. */ | 86 | /* If driver didn't advertise the feature, it will never appear. */ |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index ed2d4ead7eb7..19a0da0dba41 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_VIRTIO_CONSOLE_H | 1 | #ifndef _LINUX_VIRTIO_CONSOLE_H |
2 | #define _LINUX_VIRTIO_CONSOLE_H | 2 | #define _LINUX_VIRTIO_CONSOLE_H |
3 | #include <linux/virtio_config.h> | 3 | #include <linux/virtio_config.h> |
4 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | ||
5 | * anyone can use the definitions to implement compatible drivers/servers. */ | ||
4 | 6 | ||
5 | /* The ID for virtio console */ | 7 | /* The ID for virtio console */ |
6 | #define VIRTIO_ID_CONSOLE 3 | 8 | #define VIRTIO_ID_CONSOLE 3 |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 38c0571820fb..5e33761b9b8a 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef _LINUX_VIRTIO_NET_H | 1 | #ifndef _LINUX_VIRTIO_NET_H |
2 | #define _LINUX_VIRTIO_NET_H | 2 | #define _LINUX_VIRTIO_NET_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | ||
4 | * compatible drivers/servers. */ | ||
3 | #include <linux/virtio_config.h> | 5 | #include <linux/virtio_config.h> |
4 | 6 | ||
5 | /* The ID for virtio_net */ | 7 | /* The ID for virtio_net */ |
diff --git a/include/linux/virtio_pci.h b/include/linux/virtio_pci.h index b3151659cf49..cdef35742932 100644 --- a/include/linux/virtio_pci.h +++ b/include/linux/virtio_pci.h | |||
@@ -9,9 +9,8 @@ | |||
9 | * Authors: | 9 | * Authors: |
10 | * Anthony Liguori <aliguori@us.ibm.com> | 10 | * Anthony Liguori <aliguori@us.ibm.com> |
11 | * | 11 | * |
12 | * This work is licensed under the terms of the GNU GPL, version 2 or later. | 12 | * This header is BSD licensed so anyone can use the definitions to implement |
13 | * See the COPYING file in the top-level directory. | 13 | * compatible drivers/servers. |
14 | * | ||
15 | */ | 14 | */ |
16 | 15 | ||
17 | #ifndef _LINUX_VIRTIO_PCI_H | 16 | #ifndef _LINUX_VIRTIO_PCI_H |
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index abe481ed990e..c4a598fb3826 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h | |||
@@ -120,6 +120,8 @@ struct virtqueue *vring_new_virtqueue(unsigned int num, | |||
120 | void (*notify)(struct virtqueue *vq), | 120 | void (*notify)(struct virtqueue *vq), |
121 | void (*callback)(struct virtqueue *vq)); | 121 | void (*callback)(struct virtqueue *vq)); |
122 | void vring_del_virtqueue(struct virtqueue *vq); | 122 | void vring_del_virtqueue(struct virtqueue *vq); |
123 | /* Filter out transport-specific feature bits. */ | ||
124 | void vring_transport_features(struct virtio_device *vdev); | ||
123 | 125 | ||
124 | irqreturn_t vring_interrupt(int irq, void *_vq); | 126 | irqreturn_t vring_interrupt(int irq, void *_vq); |
125 | #endif /* __KERNEL__ */ | 127 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h index 331afb6c9f62..1a85dab8a940 100644 --- a/include/linux/virtio_rng.h +++ b/include/linux/virtio_rng.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef _LINUX_VIRTIO_RNG_H | 1 | #ifndef _LINUX_VIRTIO_RNG_H |
2 | #define _LINUX_VIRTIO_RNG_H | 2 | #define _LINUX_VIRTIO_RNG_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | ||
4 | * compatible drivers/servers. */ | ||
3 | #include <linux/virtio_config.h> | 5 | #include <linux/virtio_config.h> |
4 | 6 | ||
5 | /* The ID for virtio_rng */ | 7 | /* The ID for virtio_rng */ |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index e83b69346d23..58334d439516 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -44,6 +44,12 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
44 | NR_VM_EVENT_ITEMS | 44 | NR_VM_EVENT_ITEMS |
45 | }; | 45 | }; |
46 | 46 | ||
47 | extern const struct seq_operations fragmentation_op; | ||
48 | extern const struct seq_operations pagetypeinfo_op; | ||
49 | extern const struct seq_operations zoneinfo_op; | ||
50 | extern const struct seq_operations vmstat_op; | ||
51 | extern int sysctl_stat_interval; | ||
52 | |||
47 | #ifdef CONFIG_VM_EVENT_COUNTERS | 53 | #ifdef CONFIG_VM_EVENT_COUNTERS |
48 | /* | 54 | /* |
49 | * Light weight per cpu counter implementation. | 55 | * Light weight per cpu counter implementation. |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 9448ffbdcbf6..14c0e91be9b5 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
13 | #include <linux/console_struct.h> | 13 | #include <linux/console_struct.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/consolemap.h> | ||
15 | 16 | ||
16 | /* | 17 | /* |
17 | * Presently, a lot of graphics programs do not restore the contents of | 18 | * Presently, a lot of graphics programs do not restore the contents of |
@@ -54,6 +55,7 @@ void redraw_screen(struct vc_data *vc, int is_switch); | |||
54 | struct tty_struct; | 55 | struct tty_struct; |
55 | int tioclinux(struct tty_struct *tty, unsigned long arg); | 56 | int tioclinux(struct tty_struct *tty, unsigned long arg); |
56 | 57 | ||
58 | #ifdef CONFIG_CONSOLE_TRANSLATIONS | ||
57 | /* consolemap.c */ | 59 | /* consolemap.c */ |
58 | 60 | ||
59 | struct unimapinit; | 61 | struct unimapinit; |
@@ -71,6 +73,23 @@ void con_free_unimap(struct vc_data *vc); | |||
71 | void con_protect_unimap(struct vc_data *vc, int rdonly); | 73 | void con_protect_unimap(struct vc_data *vc, int rdonly); |
72 | int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | 74 | int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); |
73 | 75 | ||
76 | #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \ | ||
77 | (vc)->vc_toggle_meta ? 0x80 : 0]) | ||
78 | #else | ||
79 | #define con_set_trans_old(arg) (0) | ||
80 | #define con_get_trans_old(arg) (-EINVAL) | ||
81 | #define con_set_trans_new(arg) (0) | ||
82 | #define con_get_trans_new(arg) (-EINVAL) | ||
83 | #define con_clear_unimap(vc, ui) (0) | ||
84 | #define con_set_unimap(vc, ct, list) (0) | ||
85 | #define con_set_default_unimap(vc) (0) | ||
86 | #define con_copy_unimap(d, s) (0) | ||
87 | #define con_get_unimap(vc, ct, uct, list) (-EINVAL) | ||
88 | #define con_free_unimap(vc) do { ; } while (0) | ||
89 | |||
90 | #define vc_translate(vc, c) (c) | ||
91 | #endif | ||
92 | |||
74 | /* vt.c */ | 93 | /* vt.c */ |
75 | int vt_waitactive(int vt); | 94 | int vt_waitactive(int vt); |
76 | void change_console(struct vc_data *new_vc); | 95 | void change_console(struct vc_data *new_vc); |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 542526c6e8ef..5c158c477ac7 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -179,6 +179,8 @@ __create_workqueue_key(const char *name, int singlethread, | |||
179 | extern void destroy_workqueue(struct workqueue_struct *wq); | 179 | extern void destroy_workqueue(struct workqueue_struct *wq); |
180 | 180 | ||
181 | extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); | 181 | extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); |
182 | extern int queue_work_on(int cpu, struct workqueue_struct *wq, | ||
183 | struct work_struct *work); | ||
182 | extern int queue_delayed_work(struct workqueue_struct *wq, | 184 | extern int queue_delayed_work(struct workqueue_struct *wq, |
183 | struct delayed_work *work, unsigned long delay); | 185 | struct delayed_work *work, unsigned long delay); |
184 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 186 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
@@ -188,6 +190,7 @@ extern void flush_workqueue(struct workqueue_struct *wq); | |||
188 | extern void flush_scheduled_work(void); | 190 | extern void flush_scheduled_work(void); |
189 | 191 | ||
190 | extern int schedule_work(struct work_struct *work); | 192 | extern int schedule_work(struct work_struct *work); |
193 | extern int schedule_work_on(int cpu, struct work_struct *work); | ||
191 | extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay); | 194 | extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay); |
192 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, | 195 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, |
193 | unsigned long delay); | 196 | unsigned long delay); |
@@ -198,6 +201,8 @@ extern int keventd_up(void); | |||
198 | extern void init_workqueues(void); | 201 | extern void init_workqueues(void); |
199 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 202 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
200 | 203 | ||
204 | extern int flush_work(struct work_struct *work); | ||
205 | |||
201 | extern int cancel_work_sync(struct work_struct *work); | 206 | extern int cancel_work_sync(struct work_struct *work); |
202 | 207 | ||
203 | /* | 208 | /* |