diff options
Diffstat (limited to 'include/linux')
60 files changed, 248 insertions, 155 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 93b98856007a..71d70d1fbce2 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -166,6 +166,9 @@ unifdef-y += acct.h | |||
166 | unifdef-y += adb.h | 166 | unifdef-y += adb.h |
167 | unifdef-y += adfs_fs.h | 167 | unifdef-y += adfs_fs.h |
168 | unifdef-y += agpgart.h | 168 | unifdef-y += agpgart.h |
169 | ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),) | ||
170 | unifdef-y += a.out.h | ||
171 | endif | ||
169 | unifdef-y += apm_bios.h | 172 | unifdef-y += apm_bios.h |
170 | unifdef-y += atalk.h | 173 | unifdef-y += atalk.h |
171 | unifdef-y += atmdev.h | 174 | unifdef-y += atmdev.h |
diff --git a/include/linux/a.out.h b/include/linux/a.out.h index 208f4e8ed304..e86dfca44589 100644 --- a/include/linux/a.out.h +++ b/include/linux/a.out.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef __A_OUT_GNU_H__ | 1 | #ifndef __A_OUT_GNU_H__ |
2 | #define __A_OUT_GNU_H__ | 2 | #define __A_OUT_GNU_H__ |
3 | 3 | ||
4 | #ifdef CONFIG_ARCH_SUPPORTS_AOUT | ||
5 | |||
6 | #define __GNU_EXEC_MACROS__ | 4 | #define __GNU_EXEC_MACROS__ |
7 | 5 | ||
8 | #ifndef __STRUCT_EXEC_OVERRIDE__ | 6 | #ifndef __STRUCT_EXEC_OVERRIDE__ |
@@ -277,10 +275,4 @@ struct relocation_info | |||
277 | #endif /* no N_RELOCATION_INFO_DECLARED. */ | 275 | #endif /* no N_RELOCATION_INFO_DECLARED. */ |
278 | 276 | ||
279 | #endif /*__ASSEMBLY__ */ | 277 | #endif /*__ASSEMBLY__ */ |
280 | #else /* CONFIG_ARCH_SUPPORTS_AOUT */ | ||
281 | #ifndef __ASSEMBLY__ | ||
282 | struct exec { | ||
283 | }; | ||
284 | #endif | ||
285 | #endif /* CONFIG_ARCH_SUPPORTS_AOUT */ | ||
286 | #endif /* __A_OUT_GNU_H__ */ | 278 | #endif /* __A_OUT_GNU_H__ */ |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 661d90d6cf7c..972b12bcfb36 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -30,14 +30,6 @@ | |||
30 | #ifndef _AGP_BACKEND_H | 30 | #ifndef _AGP_BACKEND_H |
31 | #define _AGP_BACKEND_H 1 | 31 | #define _AGP_BACKEND_H 1 |
32 | 32 | ||
33 | #ifndef TRUE | ||
34 | #define TRUE 1 | ||
35 | #endif | ||
36 | |||
37 | #ifndef FALSE | ||
38 | #define FALSE 0 | ||
39 | #endif | ||
40 | |||
41 | enum chipset_type { | 33 | enum chipset_type { |
42 | NOT_SUPPORTED, | 34 | NOT_SUPPORTED, |
43 | SUPPORTED, | 35 | SUPPORTED, |
@@ -57,7 +49,7 @@ struct agp_kern_info { | |||
57 | size_t aper_size; | 49 | size_t aper_size; |
58 | int max_memory; /* In pages */ | 50 | int max_memory; /* In pages */ |
59 | int current_memory; | 51 | int current_memory; |
60 | int cant_use_aperture; | 52 | bool cant_use_aperture; |
61 | unsigned long page_mask; | 53 | unsigned long page_mask; |
62 | struct vm_operations_struct *vm_ops; | 54 | struct vm_operations_struct *vm_ops; |
63 | }; | 55 | }; |
@@ -83,9 +75,9 @@ struct agp_memory { | |||
83 | off_t pg_start; | 75 | off_t pg_start; |
84 | u32 type; | 76 | u32 type; |
85 | u32 physical; | 77 | u32 physical; |
86 | u8 is_bound; | 78 | bool is_bound; |
87 | u8 is_flushed; | 79 | bool is_flushed; |
88 | u8 vmalloc_flag; | 80 | bool vmalloc_flag; |
89 | }; | 81 | }; |
90 | 82 | ||
91 | #define AGP_NORMAL_MEMORY 0 | 83 | #define AGP_NORMAL_MEMORY 0 |
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index 62aef589eb94..c8fdb6e658e1 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h | |||
@@ -206,8 +206,8 @@ struct agp_front_data { | |||
206 | struct agp_controller *current_controller; | 206 | struct agp_controller *current_controller; |
207 | struct agp_controller *controllers; | 207 | struct agp_controller *controllers; |
208 | struct agp_file_private *file_priv_list; | 208 | struct agp_file_private *file_priv_list; |
209 | u8 used_by_controller; | 209 | bool used_by_controller; |
210 | u8 backend_acquired; | 210 | bool backend_acquired; |
211 | }; | 211 | }; |
212 | 212 | ||
213 | #endif /* __KERNEL__ */ | 213 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 63c3bb98558f..8b82974bdc12 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -571,7 +571,7 @@ extern void audit_log_lost(const char *message); | |||
571 | extern int audit_update_lsm_rules(void); | 571 | extern int audit_update_lsm_rules(void); |
572 | 572 | ||
573 | /* Private API (for audit.c only) */ | 573 | /* Private API (for audit.c only) */ |
574 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 574 | extern int audit_filter_user(struct netlink_skb_parms *cb); |
575 | extern int audit_filter_type(int type); | 575 | extern int audit_filter_type(int type); |
576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
577 | void *data, size_t datasz, uid_t loginuid, | 577 | void *data, size_t datasz, uid_t loginuid, |
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h index 05e540d6963a..7ffe03f4693d 100644 --- a/include/linux/bitrev.h +++ b/include/linux/bitrev.h | |||
@@ -10,6 +10,7 @@ static inline u8 bitrev8(u8 byte) | |||
10 | return byte_rev_table[byte]; | 10 | return byte_rev_table[byte]; |
11 | } | 11 | } |
12 | 12 | ||
13 | extern u16 bitrev16(u16 in); | ||
13 | extern u32 bitrev32(u32 in); | 14 | extern u32 bitrev32(u32 in); |
14 | 15 | ||
15 | #endif /* _LINUX_BITREV_H */ | 16 | #endif /* _LINUX_BITREV_H */ |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 6a5dbdc8a7dc..686895bacd9d 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -94,7 +94,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
94 | unsigned long freepfn, | 94 | unsigned long freepfn, |
95 | unsigned long startpfn, | 95 | unsigned long startpfn, |
96 | unsigned long endpfn); | 96 | unsigned long endpfn); |
97 | extern void reserve_bootmem_node(pg_data_t *pgdat, | 97 | extern int reserve_bootmem_node(pg_data_t *pgdat, |
98 | unsigned long physaddr, | 98 | unsigned long physaddr, |
99 | unsigned long size, | 99 | unsigned long size, |
100 | int flags); | 100 | int flags); |
diff --git a/include/linux/capability.h b/include/linux/capability.h index f4ea0dd9a618..02673846d205 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -31,11 +31,11 @@ struct task_struct; | |||
31 | #define _LINUX_CAPABILITY_VERSION_1 0x19980330 | 31 | #define _LINUX_CAPABILITY_VERSION_1 0x19980330 |
32 | #define _LINUX_CAPABILITY_U32S_1 1 | 32 | #define _LINUX_CAPABILITY_U32S_1 1 |
33 | 33 | ||
34 | #define _LINUX_CAPABILITY_VERSION_2 0x20071026 | 34 | #define _LINUX_CAPABILITY_VERSION_2 0x20071026 /* deprecated - use v3 */ |
35 | #define _LINUX_CAPABILITY_U32S_2 2 | 35 | #define _LINUX_CAPABILITY_U32S_2 2 |
36 | 36 | ||
37 | #define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_2 | 37 | #define _LINUX_CAPABILITY_VERSION_3 0x20080522 |
38 | #define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_2 | 38 | #define _LINUX_CAPABILITY_U32S_3 2 |
39 | 39 | ||
40 | typedef struct __user_cap_header_struct { | 40 | typedef struct __user_cap_header_struct { |
41 | __u32 version; | 41 | __u32 version; |
@@ -77,10 +77,23 @@ struct vfs_cap_data { | |||
77 | } data[VFS_CAP_U32]; | 77 | } data[VFS_CAP_U32]; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | #ifdef __KERNEL__ | 80 | #ifndef __KERNEL__ |
81 | |||
82 | /* | ||
83 | * Backwardly compatible definition for source code - trapped in a | ||
84 | * 32-bit world. If you find you need this, please consider using | ||
85 | * libcap to untrap yourself... | ||
86 | */ | ||
87 | #define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_1 | ||
88 | #define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_1 | ||
89 | |||
90 | #else | ||
91 | |||
92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 | ||
93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 | ||
81 | 94 | ||
82 | typedef struct kernel_cap_struct { | 95 | typedef struct kernel_cap_struct { |
83 | __u32 cap[_LINUX_CAPABILITY_U32S]; | 96 | __u32 cap[_KERNEL_CAPABILITY_U32S]; |
84 | } kernel_cap_t; | 97 | } kernel_cap_t; |
85 | 98 | ||
86 | #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) | 99 | #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) |
@@ -351,7 +364,7 @@ typedef struct kernel_cap_struct { | |||
351 | */ | 364 | */ |
352 | 365 | ||
353 | #define CAP_FOR_EACH_U32(__capi) \ | 366 | #define CAP_FOR_EACH_U32(__capi) \ |
354 | for (__capi = 0; __capi < _LINUX_CAPABILITY_U32S; ++__capi) | 367 | for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi) |
355 | 368 | ||
356 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ | 369 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ |
357 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ | 370 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ |
@@ -361,7 +374,7 @@ typedef struct kernel_cap_struct { | |||
361 | 374 | ||
362 | # define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) | 375 | # define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) |
363 | 376 | ||
364 | #if _LINUX_CAPABILITY_U32S != 2 | 377 | #if _KERNEL_CAPABILITY_U32S != 2 |
365 | # error Fix up hand-coded capability macro initializers | 378 | # error Fix up hand-coded capability macro initializers |
366 | #else /* HAND-CODED capability initializers */ | 379 | #else /* HAND-CODED capability initializers */ |
367 | 380 | ||
@@ -372,7 +385,7 @@ typedef struct kernel_cap_struct { | |||
372 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ | 385 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ |
373 | CAP_FS_MASK_B1 } }) | 386 | CAP_FS_MASK_B1 } }) |
374 | 387 | ||
375 | #endif /* _LINUX_CAPABILITY_U32S != 2 */ | 388 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
376 | 389 | ||
377 | #define CAP_INIT_INH_SET CAP_EMPTY_SET | 390 | #define CAP_INIT_INH_SET CAP_EMPTY_SET |
378 | 391 | ||
@@ -488,6 +501,8 @@ extern const kernel_cap_t __cap_empty_set; | |||
488 | extern const kernel_cap_t __cap_full_set; | 501 | extern const kernel_cap_t __cap_full_set; |
489 | extern const kernel_cap_t __cap_init_eff_set; | 502 | extern const kernel_cap_t __cap_init_eff_set; |
490 | 503 | ||
504 | kernel_cap_t cap_set_effective(const kernel_cap_t pE_new); | ||
505 | |||
491 | int capable(int cap); | 506 | int capable(int cap); |
492 | int __capable(struct task_struct *t, int cap); | 507 | int __capable(struct task_struct *t, int cap); |
493 | 508 | ||
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h index 1605dd8aa646..6f9f19d66591 100644 --- a/include/linux/cfag12864b.h +++ b/include/linux/cfag12864b.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Description: cfag12864b LCD driver header | 4 | * Description: cfag12864b LCD driver header |
5 | * License: GPLv2 | 5 | * License: GPLv2 |
6 | * | 6 | * |
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | 7 | * Author: Copyright (C) Miguel Ojeda Sandonis |
8 | * Date: 2006-10-12 | 8 | * Date: 2006-10-12 |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 51e6b1e520e6..dcf77fa826b5 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -82,6 +82,7 @@ struct cpuidle_state_kobj { | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | struct cpuidle_device { | 84 | struct cpuidle_device { |
85 | unsigned int registered:1; | ||
85 | unsigned int enabled:1; | 86 | unsigned int enabled:1; |
86 | unsigned int cpu; | 87 | unsigned int cpu; |
87 | 88 | ||
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 5df3db58fcc6..c24875bd9c5b 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -353,6 +353,10 @@ static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp, | |||
353 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) | 353 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) |
354 | #endif /* NR_CPUS */ | 354 | #endif /* NR_CPUS */ |
355 | 355 | ||
356 | #define next_cpu_nr(n, src) next_cpu(n, src) | ||
357 | #define cpus_weight_nr(cpumask) cpus_weight(cpumask) | ||
358 | #define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask) | ||
359 | |||
356 | /* | 360 | /* |
357 | * The following particular system cpumasks and operations manage | 361 | * The following particular system cpumasks and operations manage |
358 | * possible, present and online cpus. Each of them is a fixed size | 362 | * possible, present and online cpus. Each of them is a fixed size |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 2a6639407c80..d982eb89c77d 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -300,7 +300,7 @@ extern int d_validate(struct dentry *, struct dentry *); | |||
300 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | 300 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); |
301 | 301 | ||
302 | extern char *__d_path(const struct path *path, struct path *root, char *, int); | 302 | extern char *__d_path(const struct path *path, struct path *root, char *, int); |
303 | extern char *d_path(struct path *, char *, int); | 303 | extern char *d_path(const struct path *, char *, int); |
304 | extern char *dentry_path(struct dentry *, char *, int); | 304 | extern char *dentry_path(struct dentry *, char *, int); |
305 | 305 | ||
306 | /* Allocation counts.. */ | 306 | /* Allocation counts.. */ |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index f4a5871767f5..4aaa4afb1cb9 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_DEBUG_LOCKING_H | 1 | #ifndef __LINUX_DEBUG_LOCKING_H |
2 | #define __LINUX_DEBUG_LOCKING_H | 2 | #define __LINUX_DEBUG_LOCKING_H |
3 | 3 | ||
4 | #include <linux/kernel.h> | ||
5 | |||
4 | struct task_struct; | 6 | struct task_struct; |
5 | 7 | ||
6 | extern int debug_locks; | 8 | extern int debug_locks; |
@@ -11,14 +13,6 @@ extern int debug_locks_silent; | |||
11 | */ | 13 | */ |
12 | extern int debug_locks_off(void); | 14 | extern int debug_locks_off(void); |
13 | 15 | ||
14 | /* | ||
15 | * In the debug case we carry the caller's instruction pointer into | ||
16 | * other functions, but we dont want the function argument overhead | ||
17 | * in the nondebug case - hence these macros: | ||
18 | */ | ||
19 | #define _RET_IP_ (unsigned long)__builtin_return_address(0) | ||
20 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | ||
21 | |||
22 | #define DEBUG_LOCKS_WARN_ON(c) \ | 16 | #define DEBUG_LOCKS_WARN_ON(c) \ |
23 | ({ \ | 17 | ({ \ |
24 | int __ret = 0; \ | 18 | int __ret = 0; \ |
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index 4d10c7328d2d..6c7eff2ebada 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
@@ -13,7 +13,7 @@ struct firmware { | |||
13 | 13 | ||
14 | struct device; | 14 | struct device; |
15 | 15 | ||
16 | #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE) | 16 | #if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE)) |
17 | int request_firmware(const struct firmware **fw, const char *name, | 17 | int request_firmware(const struct firmware **fw, const char *name, |
18 | struct device *device); | 18 | struct device *device); |
19 | int request_firmware_nowait( | 19 | int request_firmware_nowait( |
diff --git a/include/linux/fs.h b/include/linux/fs.h index f413085f748e..d8e2762ed14d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -83,6 +83,7 @@ extern int dir_notify_enable; | |||
83 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) | 83 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) |
84 | #define READ_META (READ | (1 << BIO_RW_META)) | 84 | #define READ_META (READ | (1 << BIO_RW_META)) |
85 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) | 85 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) |
86 | #define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC)) | ||
86 | #define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) | 87 | #define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) |
87 | 88 | ||
88 | #define SEL_IN 1 | 89 | #define SEL_IN 1 |
@@ -894,8 +895,6 @@ static inline int file_check_writeable(struct file *filp) | |||
894 | typedef struct files_struct *fl_owner_t; | 895 | typedef struct files_struct *fl_owner_t; |
895 | 896 | ||
896 | struct file_lock_operations { | 897 | struct file_lock_operations { |
897 | void (*fl_insert)(struct file_lock *); /* lock insertion callback */ | ||
898 | void (*fl_remove)(struct file_lock *); /* lock removal callback */ | ||
899 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); | 898 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); |
900 | void (*fl_release_private)(struct file_lock *); | 899 | void (*fl_release_private)(struct file_lock *); |
901 | }; | 900 | }; |
@@ -2000,7 +1999,10 @@ extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | |||
2000 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); | 1999 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); |
2001 | extern void simple_release_fs(struct vfsmount **mount, int *count); | 2000 | extern void simple_release_fs(struct vfsmount **mount, int *count); |
2002 | 2001 | ||
2003 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 2002 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, |
2003 | loff_t *ppos, const void *from, size_t available); | ||
2004 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | ||
2005 | const void *from, size_t available); | ||
2004 | 2006 | ||
2005 | #ifdef CONFIG_MIGRATION | 2007 | #ifdef CONFIG_MIGRATION |
2006 | extern int buffer_migrate_page(struct address_space *, | 2008 | extern int buffer_migrate_page(struct address_space *, |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index fb9af6a0fe9c..8dc730132192 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -171,7 +171,7 @@ struct i2c_client { | |||
171 | struct i2c_adapter *adapter; /* the adapter we sit on */ | 171 | struct i2c_adapter *adapter; /* the adapter we sit on */ |
172 | struct i2c_driver *driver; /* and our access routines */ | 172 | struct i2c_driver *driver; /* and our access routines */ |
173 | struct device dev; /* the device structure */ | 173 | struct device dev; /* the device structure */ |
174 | int irq; /* irq issued by device (or -1) */ | 174 | int irq; /* irq issued by device */ |
175 | struct list_head list; /* DEPRECATED */ | 175 | struct list_head list; /* DEPRECATED */ |
176 | struct completion released; | 176 | struct completion released; |
177 | }; | 177 | }; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index f8f195c20da2..9918772bf274 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -153,7 +153,7 @@ enum { ide_unknown, ide_generic, ide_pci, | |||
153 | ide_qd65xx, ide_umc8672, ide_ht6560b, | 153 | ide_qd65xx, ide_umc8672, ide_ht6560b, |
154 | ide_rz1000, ide_trm290, | 154 | ide_rz1000, ide_trm290, |
155 | ide_cmd646, ide_cy82c693, ide_4drives, | 155 | ide_cmd646, ide_cy82c693, ide_4drives, |
156 | ide_pmac, ide_etrax100, ide_acorn, | 156 | ide_pmac, ide_acorn, |
157 | ide_au1xxx, ide_palm3710 | 157 | ide_au1xxx, ide_palm3710 |
158 | }; | 158 | }; |
159 | 159 | ||
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index f1fbe9c930d7..d4efe4014705 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -41,7 +41,7 @@ struct ip_tunnel_prl { | |||
41 | __u16 __reserved; | 41 | __u16 __reserved; |
42 | __u32 datalen; | 42 | __u32 datalen; |
43 | __u32 __reserved2; | 43 | __u32 __reserved2; |
44 | void __user *data; | 44 | /* data follows */ |
45 | }; | 45 | }; |
46 | 46 | ||
47 | /* PRL flags */ | 47 | /* PRL flags */ |
diff --git a/include/linux/in_route.h b/include/linux/in_route.h index 61f25c30a2a0..b261b8c915f0 100644 --- a/include/linux/in_route.h +++ b/include/linux/in_route.h | |||
@@ -10,19 +10,19 @@ | |||
10 | #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC | 10 | #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC |
11 | 11 | ||
12 | #define RTCF_NOTIFY 0x00010000 | 12 | #define RTCF_NOTIFY 0x00010000 |
13 | #define RTCF_DIRECTDST 0x00020000 | 13 | #define RTCF_DIRECTDST 0x00020000 /* unused */ |
14 | #define RTCF_REDIRECTED 0x00040000 | 14 | #define RTCF_REDIRECTED 0x00040000 |
15 | #define RTCF_TPROXY 0x00080000 | 15 | #define RTCF_TPROXY 0x00080000 /* unused */ |
16 | 16 | ||
17 | #define RTCF_FAST 0x00200000 | 17 | #define RTCF_FAST 0x00200000 /* unused */ |
18 | #define RTCF_MASQ 0x00400000 | 18 | #define RTCF_MASQ 0x00400000 /* unused */ |
19 | #define RTCF_SNAT 0x00800000 | 19 | #define RTCF_SNAT 0x00800000 /* unused */ |
20 | #define RTCF_DOREDIRECT 0x01000000 | 20 | #define RTCF_DOREDIRECT 0x01000000 |
21 | #define RTCF_DIRECTSRC 0x04000000 | 21 | #define RTCF_DIRECTSRC 0x04000000 |
22 | #define RTCF_DNAT 0x08000000 | 22 | #define RTCF_DNAT 0x08000000 |
23 | #define RTCF_BROADCAST 0x10000000 | 23 | #define RTCF_BROADCAST 0x10000000 |
24 | #define RTCF_MULTICAST 0x20000000 | 24 | #define RTCF_MULTICAST 0x20000000 |
25 | #define RTCF_REJECT 0x40000000 | 25 | #define RTCF_REJECT 0x40000000 /* unused */ |
26 | #define RTCF_LOCAL 0x80000000 | 26 | #define RTCF_LOCAL 0x80000000 |
27 | 27 | ||
28 | #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) | 28 | #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) |
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h index 80335b7d77c5..c4335faebb63 100644 --- a/include/linux/inet_lro.h +++ b/include/linux/inet_lro.h | |||
@@ -84,7 +84,11 @@ struct net_lro_mgr { | |||
84 | from received packets and eth protocol | 84 | from received packets and eth protocol |
85 | is still ETH_P_8021Q */ | 85 | is still ETH_P_8021Q */ |
86 | 86 | ||
87 | u32 ip_summed; /* Set in non generated SKBs in page mode */ | 87 | /* |
88 | * Set for generated SKBs that are not added to | ||
89 | * the frag list in fragmented mode | ||
90 | */ | ||
91 | u32 ip_summed; | ||
88 | u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY | 92 | u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY |
89 | * or CHECKSUM_NONE */ | 93 | * or CHECKSUM_NONE */ |
90 | 94 | ||
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 7009b0cdd06f..c6f51ad52d5b 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -117,7 +117,6 @@ struct in_ifaddr | |||
117 | __be32 ifa_address; | 117 | __be32 ifa_address; |
118 | __be32 ifa_mask; | 118 | __be32 ifa_mask; |
119 | __be32 ifa_broadcast; | 119 | __be32 ifa_broadcast; |
120 | __be32 ifa_anycast; | ||
121 | unsigned char ifa_scope; | 120 | unsigned char ifa_scope; |
122 | unsigned char ifa_flags; | 121 | unsigned char ifa_flags; |
123 | unsigned char ifa_prefixlen; | 122 | unsigned char ifa_prefixlen; |
diff --git a/include/linux/input.h b/include/linux/input.h index 28a094fcfe20..d150c57e5f0a 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -534,8 +534,8 @@ struct input_absinfo { | |||
534 | 534 | ||
535 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ | 535 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ |
536 | #define KEY_FRAMEFORWARD 0x1b5 | 536 | #define KEY_FRAMEFORWARD 0x1b5 |
537 | |||
538 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | 537 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
538 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | ||
539 | 539 | ||
540 | #define KEY_DEL_EOL 0x1c0 | 540 | #define KEY_DEL_EOL 0x1c0 |
541 | #define KEY_DEL_EOS 0x1c1 | 541 | #define KEY_DEL_EOS 0x1c1 |
@@ -637,7 +637,9 @@ struct input_absinfo { | |||
637 | #define SW_LID 0x00 /* set = lid shut */ | 637 | #define SW_LID 0x00 /* set = lid shut */ |
638 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ | 638 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
639 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ | 639 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
640 | #define SW_RADIO 0x03 /* set = radio enabled */ | 640 | #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" |
641 | set = radio enabled */ | ||
642 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ | ||
641 | #define SW_MAX 0x0f | 643 | #define SW_MAX 0x0f |
642 | #define SW_CNT (SW_MAX+1) | 644 | #define SW_CNT (SW_MAX+1) |
643 | 645 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d5d40a9f7929..c6801bffe76d 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -53,14 +53,14 @@ struct resource_list { | |||
53 | #define IORESOURCE_AUTO 0x40000000 | 53 | #define IORESOURCE_AUTO 0x40000000 |
54 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ | 54 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ |
55 | 55 | ||
56 | /* ISA PnP IRQ specific bits (IORESOURCE_BITS) */ | 56 | /* PnP IRQ specific bits (IORESOURCE_BITS) */ |
57 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) | 57 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) |
58 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) | 58 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) |
59 | #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) | 59 | #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) |
60 | #define IORESOURCE_IRQ_LOWLEVEL (1<<3) | 60 | #define IORESOURCE_IRQ_LOWLEVEL (1<<3) |
61 | #define IORESOURCE_IRQ_SHAREABLE (1<<4) | 61 | #define IORESOURCE_IRQ_SHAREABLE (1<<4) |
62 | 62 | ||
63 | /* ISA PnP DMA specific bits (IORESOURCE_BITS) */ | 63 | /* PnP DMA specific bits (IORESOURCE_BITS) */ |
64 | #define IORESOURCE_DMA_TYPE_MASK (3<<0) | 64 | #define IORESOURCE_DMA_TYPE_MASK (3<<0) |
65 | #define IORESOURCE_DMA_8BIT (0<<0) | 65 | #define IORESOURCE_DMA_8BIT (0<<0) |
66 | #define IORESOURCE_DMA_8AND16BIT (1<<0) | 66 | #define IORESOURCE_DMA_8AND16BIT (1<<0) |
@@ -76,7 +76,7 @@ struct resource_list { | |||
76 | #define IORESOURCE_DMA_TYPEB (2<<6) | 76 | #define IORESOURCE_DMA_TYPEB (2<<6) |
77 | #define IORESOURCE_DMA_TYPEF (3<<6) | 77 | #define IORESOURCE_DMA_TYPEF (3<<6) |
78 | 78 | ||
79 | /* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */ | 79 | /* PnP memory I/O specific bits (IORESOURCE_BITS) */ |
80 | #define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ | 80 | #define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ |
81 | #define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ | 81 | #define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ |
82 | #define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ | 82 | #define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 10b666b61add..cde056e08181 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op | |||
396 | { | 396 | { |
397 | struct request_sock *req = reqsk_alloc(ops); | 397 | struct request_sock *req = reqsk_alloc(ops); |
398 | 398 | ||
399 | if (req != NULL) | 399 | if (req != NULL) { |
400 | inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); | 400 | inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); |
401 | inet6_rsk(req)->pktopts = NULL; | ||
402 | } | ||
401 | 403 | ||
402 | return req; | 404 | return req; |
403 | } | 405 | } |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 05e2b307161a..d147f0f90360 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -919,6 +919,9 @@ struct journal_s | |||
919 | struct proc_dir_entry *j_proc_entry; | 919 | struct proc_dir_entry *j_proc_entry; |
920 | struct transaction_stats_s j_stats; | 920 | struct transaction_stats_s j_stats; |
921 | 921 | ||
922 | /* Failed journal commit ID */ | ||
923 | unsigned int j_failed_commit; | ||
924 | |||
922 | /* | 925 | /* |
923 | * An opaque pointer to fs-private information. ext3 puts its | 926 | * An opaque pointer to fs-private information. ext3 puts its |
924 | * superblock pointer here | 927 | * superblock pointer here |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 792bf0aa779b..2e70006c7fa8 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -46,6 +46,9 @@ extern const char linux_proc_banner[]; | |||
46 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 46 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
47 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 47 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
48 | 48 | ||
49 | #define _RET_IP_ (unsigned long)__builtin_return_address(0) | ||
50 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | ||
51 | |||
49 | #ifdef CONFIG_LBD | 52 | #ifdef CONFIG_LBD |
50 | # include <asm/div64.h> | 53 | # include <asm/div64.h> |
51 | # define sector_div(a, b) do_div(a, b) | 54 | # define sector_div(a, b) do_div(a, b) |
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h index a2c54acceb4e..cb311798e0bc 100644 --- a/include/linux/ks0108.h +++ b/include/linux/ks0108.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Description: ks0108 LCD Controller driver header | 4 | * Description: ks0108 LCD Controller driver header |
5 | * License: GPLv2 | 5 | * License: GPLv2 |
6 | * | 6 | * |
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | 7 | * Author: Copyright (C) Miguel Ojeda Sandonis |
8 | * Date: 2006-10-31 | 8 | * Date: 2006-10-31 |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 398978972b7a..de9d1df4bba2 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #define KVM_REQ_REPORT_TPR_ACCESS 2 | 33 | #define KVM_REQ_REPORT_TPR_ACCESS 2 |
34 | #define KVM_REQ_MMU_RELOAD 3 | 34 | #define KVM_REQ_MMU_RELOAD 3 |
35 | #define KVM_REQ_TRIPLE_FAULT 4 | 35 | #define KVM_REQ_TRIPLE_FAULT 4 |
36 | #define KVM_REQ_PENDING_TIMER 5 | ||
36 | 37 | ||
37 | struct kvm_vcpu; | 38 | struct kvm_vcpu; |
38 | extern struct kmem_cache *kvm_vcpu_cache; | 39 | extern struct kmem_cache *kvm_vcpu_cache; |
@@ -297,7 +298,7 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn) | |||
297 | return (gpa_t)gfn << PAGE_SHIFT; | 298 | return (gpa_t)gfn << PAGE_SHIFT; |
298 | } | 299 | } |
299 | 300 | ||
300 | static inline void kvm_migrate_apic_timer(struct kvm_vcpu *vcpu) | 301 | static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu) |
301 | { | 302 | { |
302 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); | 303 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); |
303 | } | 304 | } |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 4a92fbafce9d..e57e5d08312d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -111,13 +111,10 @@ enum { | |||
111 | /* various global constants */ | 111 | /* various global constants */ |
112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, | 112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, |
113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ | 113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ |
114 | ATA_MAX_PORTS = 8, | ||
115 | ATA_DEF_QUEUE = 1, | 114 | ATA_DEF_QUEUE = 1, |
116 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 115 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
117 | ATA_MAX_QUEUE = 32, | 116 | ATA_MAX_QUEUE = 32, |
118 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, | 117 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, |
119 | ATA_MAX_BUS = 2, | ||
120 | ATA_DEF_BUSY_WAIT = 10000, | ||
121 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 118 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
122 | 119 | ||
123 | ATAPI_MAX_DRAIN = 16 << 10, | 120 | ATAPI_MAX_DRAIN = 16 << 10, |
@@ -1435,7 +1432,8 @@ extern void ata_sff_qc_prep(struct ata_queued_cmd *qc); | |||
1435 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); | 1432 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); |
1436 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); | 1433 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1437 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1434 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1438 | extern u8 ata_sff_altstatus(struct ata_port *ap); | 1435 | extern void ata_sff_pause(struct ata_port *ap); |
1436 | extern void ata_sff_dma_pause(struct ata_port *ap); | ||
1439 | extern int ata_sff_busy_sleep(struct ata_port *ap, | 1437 | extern int ata_sff_busy_sleep(struct ata_port *ap, |
1440 | unsigned long timeout_pat, unsigned long timeout); | 1438 | unsigned long timeout_pat, unsigned long timeout); |
1441 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); | 1439 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); |
@@ -1496,19 +1494,6 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1496 | #endif /* CONFIG_PCI */ | 1494 | #endif /* CONFIG_PCI */ |
1497 | 1495 | ||
1498 | /** | 1496 | /** |
1499 | * ata_sff_pause - Flush writes and pause 400 nanoseconds. | ||
1500 | * @ap: Port to wait for. | ||
1501 | * | ||
1502 | * LOCKING: | ||
1503 | * Inherited from caller. | ||
1504 | */ | ||
1505 | static inline void ata_sff_pause(struct ata_port *ap) | ||
1506 | { | ||
1507 | ata_sff_altstatus(ap); | ||
1508 | ndelay(400); | ||
1509 | } | ||
1510 | |||
1511 | /** | ||
1512 | * ata_sff_busy_wait - Wait for a port status register | 1497 | * ata_sff_busy_wait - Wait for a port status register |
1513 | * @ap: Port to wait for. | 1498 | * @ap: Port to wait for. |
1514 | * @bits: bits that must be clear | 1499 | * @bits: bits that must be clear |
diff --git a/include/linux/math64.h b/include/linux/math64.h index c1a5f81501ff..c87f1528703a 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
@@ -81,4 +81,25 @@ static inline s64 div_s64(s64 dividend, s32 divisor) | |||
81 | } | 81 | } |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder); | ||
85 | |||
86 | static __always_inline u32 | ||
87 | __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) | ||
88 | { | ||
89 | u32 ret = 0; | ||
90 | |||
91 | while (dividend >= divisor) { | ||
92 | /* The following asm() prevents the compiler from | ||
93 | optimising this loop into a modulo operation. */ | ||
94 | asm("" : "+rm"(dividend)); | ||
95 | |||
96 | dividend -= divisor; | ||
97 | ret++; | ||
98 | } | ||
99 | |||
100 | *remainder = dividend; | ||
101 | |||
102 | return ret; | ||
103 | } | ||
104 | |||
84 | #endif /* _LINUX_MATH64_H */ | 105 | #endif /* _LINUX_MATH64_H */ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 73e358612eaf..ea9f5ad9ec8e 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -77,14 +77,6 @@ extern int __add_pages(struct zone *zone, unsigned long start_pfn, | |||
77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | 77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, |
78 | unsigned long nr_pages); | 78 | unsigned long nr_pages); |
79 | 79 | ||
80 | /* | ||
81 | * Walk through all memory which is registered as resource. | ||
82 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
83 | */ | ||
84 | extern int walk_memory_resource(unsigned long start_pfn, | ||
85 | unsigned long nr_pages, void *arg, | ||
86 | int (*func)(unsigned long, unsigned long, void *)); | ||
87 | |||
88 | #ifdef CONFIG_NUMA | 80 | #ifdef CONFIG_NUMA |
89 | extern int memory_add_physaddr_to_nid(u64 start); | 81 | extern int memory_add_physaddr_to_nid(u64 start); |
90 | #else | 82 | #else |
@@ -199,6 +191,14 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
199 | 191 | ||
200 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 192 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
201 | 193 | ||
194 | /* | ||
195 | * Walk through all memory which is registered as resource. | ||
196 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
197 | */ | ||
198 | extern int walk_memory_resource(unsigned long start_pfn, | ||
199 | unsigned long nr_pages, void *arg, | ||
200 | int (*func)(unsigned long, unsigned long, void *)); | ||
201 | |||
202 | extern int add_memory(int nid, u64 start, u64 size); | 202 | extern int add_memory(int nid, u64 start, u64 size); |
203 | extern int arch_add_memory(int nid, u64 start, u64 size); | 203 | extern int arch_add_memory(int nid, u64 start, u64 size); |
204 | extern int remove_memory(u64 start, u64 size); | 204 | extern int remove_memory(u64 start, u64 size); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index c31a9cd2a30e..586a943cab01 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb, | |||
760 | * (see walk_page_range for more details) | 760 | * (see walk_page_range for more details) |
761 | */ | 761 | */ |
762 | struct mm_walk { | 762 | struct mm_walk { |
763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *); | 763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *); |
764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *); | 764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *); |
765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *); | 765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *); | 766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
767 | int (*pte_hole)(unsigned long, unsigned long, void *); | 767 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
768 | struct mm_struct *mm; | ||
769 | void *private; | ||
768 | }; | 770 | }; |
769 | 771 | ||
770 | int walk_page_range(const struct mm_struct *, unsigned long addr, | 772 | int walk_page_range(unsigned long addr, unsigned long end, |
771 | unsigned long end, const struct mm_walk *walk, | 773 | struct mm_walk *walk); |
772 | void *private); | ||
773 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 774 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, |
774 | unsigned long end, unsigned long floor, unsigned long ceiling); | 775 | unsigned long end, unsigned long floor, unsigned long ceiling); |
775 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, | 776 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index b03b27457413..81cd36b735b0 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -57,12 +57,6 @@ | |||
57 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ | 57 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ |
58 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ | 58 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ |
59 | 59 | ||
60 | /* media of boot sector */ | ||
61 | static inline int fat_valid_media(u8 media) | ||
62 | { | ||
63 | return 0xf8 <= media || media == 0xf0; | ||
64 | } | ||
65 | |||
66 | #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ | 60 | #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ |
67 | MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) | 61 | MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) |
68 | 62 | ||
@@ -334,6 +328,12 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) | |||
334 | #endif | 328 | #endif |
335 | } | 329 | } |
336 | 330 | ||
331 | /* media of boot sector */ | ||
332 | static inline int fat_valid_media(u8 media) | ||
333 | { | ||
334 | return 0xf8 <= media || media == 0xf0; | ||
335 | } | ||
336 | |||
337 | /* fat/cache.c */ | 337 | /* fat/cache.c */ |
338 | extern void fat_cache_inval_inode(struct inode *inode); | 338 | extern void fat_cache_inval_inode(struct inode *inode); |
339 | extern int fat_get_cluster(struct inode *inode, int cluster, | 339 | extern int fat_get_cluster(struct inode *inode, int cluster, |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 6f3b8e79a991..56abf1558fdd 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -64,11 +64,11 @@ struct msginfo { | |||
64 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ | 64 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ |
65 | 65 | ||
66 | /* unused */ | 66 | /* unused */ |
67 | #define MSGPOOL (MSGMNI * MSGMNB) /* size in bytes of message pool */ | 67 | #define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */ |
68 | #define MSGTQL MSGMNB /* number of system message headers */ | 68 | #define MSGTQL MSGMNB /* number of system message headers */ |
69 | #define MSGMAP MSGMNB /* number of entries in message map */ | 69 | #define MSGMAP MSGMNB /* number of entries in message map */ |
70 | #define MSGSSZ 16 /* message segment size */ | 70 | #define MSGSSZ 16 /* message segment size */ |
71 | #define __MSGSEG (MSGPOOL / MSGSSZ) /* max no. of segments */ | 71 | #define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */ |
72 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) | 72 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) |
73 | 73 | ||
74 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c42bc7f533a5..53ea3dc8b0e8 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/mtd/nand.h | 2 | * linux/include/linux/mtd/nand.h |
3 | * | 3 | * |
4 | * Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com> | 4 | * Copyright (c) 2000 David Woodhouse <dwmw2@infradead.org> |
5 | * Steven J. Hill <sjhill@realitydiluted.com> | 5 | * Steven J. Hill <sjhill@realitydiluted.com> |
6 | * Thomas Gleixner <tglx@linutronix.de> | 6 | * Thomas Gleixner <tglx@linutronix.de> |
7 | * | 7 | * |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f27fd2009334..25f87102ab66 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -88,6 +88,8 @@ struct wireless_dev; | |||
88 | #define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ | 88 | #define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ |
89 | #define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ | 89 | #define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ |
90 | 90 | ||
91 | #ifdef __KERNEL__ | ||
92 | |||
91 | /* | 93 | /* |
92 | * Compute the worst case header length according to the protocols | 94 | * Compute the worst case header length according to the protocols |
93 | * used. | 95 | * used. |
@@ -114,6 +116,8 @@ struct wireless_dev; | |||
114 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 116 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
115 | #endif | 117 | #endif |
116 | 118 | ||
119 | #endif /* __KERNEL__ */ | ||
120 | |||
117 | struct net_device_subqueue | 121 | struct net_device_subqueue |
118 | { | 122 | { |
119 | /* Give a control state for each queue. This struct may contain | 123 | /* Give a control state for each queue. This struct may contain |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 590cff32415d..f31debfac926 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -306,5 +306,29 @@ static inline void __ClearPageTail(struct page *page) | |||
306 | } | 306 | } |
307 | 307 | ||
308 | #endif /* !PAGEFLAGS_EXTENDED */ | 308 | #endif /* !PAGEFLAGS_EXTENDED */ |
309 | |||
310 | #define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ | ||
311 | 1 << PG_buddy | 1 << PG_writeback | \ | ||
312 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active) | ||
313 | |||
314 | /* | ||
315 | * Flags checked in bad_page(). Pages on the free list should not have | ||
316 | * these flags set. It they are, there is a problem. | ||
317 | */ | ||
318 | #define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty) | ||
319 | |||
320 | /* | ||
321 | * Flags checked when a page is freed. Pages being freed should not have | ||
322 | * these flags set. It they are, there is a problem. | ||
323 | */ | ||
324 | #define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved) | ||
325 | |||
326 | /* | ||
327 | * Flags checked when a page is prepped for return by the page allocator. | ||
328 | * Pages being prepped should not have these flags set. It they are, there | ||
329 | * is a problem. | ||
330 | */ | ||
331 | #define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty) | ||
332 | |||
309 | #endif /* !__GENERATING_BOUNDS_H */ | 333 | #endif /* !__GENERATING_BOUNDS_H */ |
310 | #endif /* PAGE_FLAGS_H */ | 334 | #endif /* PAGE_FLAGS_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 509159bcd4e7..d18b1dd49fab 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -206,6 +206,7 @@ struct pci_dev { | |||
206 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 206 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
207 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 207 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
208 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 208 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
209 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ | ||
209 | #ifdef CONFIG_PCI_MSI | 210 | #ifdef CONFIG_PCI_MSI |
210 | struct list_head msi_list; | 211 | struct list_head msi_list; |
211 | #endif | 212 | #endif |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 9b940e644179..65953822c9cb 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -716,6 +716,7 @@ | |||
716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
717 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 | 717 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 |
718 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 | 718 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 |
719 | #define PCI_DEVICE_ID_HP_CISSE 0x323a | ||
719 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | 720 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 |
720 | 721 | ||
721 | #define PCI_VENDOR_ID_PCTECH 0x1042 | 722 | #define PCI_VENDOR_ID_PCTECH 0x1042 |
@@ -1519,6 +1520,7 @@ | |||
1519 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 | 1520 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 |
1520 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 | 1521 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 |
1521 | #define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 | 1522 | #define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 |
1523 | #define PCI_DEVICE_ID_MARVELL_CAFE_SD 0x4101 | ||
1522 | 1524 | ||
1523 | #define PCI_VENDOR_ID_V3 0x11b0 | 1525 | #define PCI_VENDOR_ID_V3 0x11b0 |
1524 | #define PCI_DEVICE_ID_V3_V960 0x0001 | 1526 | #define PCI_DEVICE_ID_V3_V960 0x0001 |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 9883bc942262..fff1d27ddb4c 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | struct net; | 10 | struct net; |
11 | struct completion; | 11 | struct completion; |
12 | struct mm_struct; | ||
13 | |||
12 | /* | 14 | /* |
13 | * The proc filesystem constants/structures | 15 | * The proc filesystem constants/structures |
14 | */ | 16 | */ |
@@ -101,8 +103,6 @@ extern spinlock_t proc_subdir_lock; | |||
101 | extern void proc_root_init(void); | 103 | extern void proc_root_init(void); |
102 | extern void proc_misc_init(void); | 104 | extern void proc_misc_init(void); |
103 | 105 | ||
104 | struct mm_struct; | ||
105 | |||
106 | void proc_flush_task(struct task_struct *task); | 106 | void proc_flush_task(struct task_struct *task); |
107 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); | 107 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); |
108 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); | 108 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h new file mode 100644 index 000000000000..bde4586f4382 --- /dev/null +++ b/include/linux/rculist.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _LINUX_RCULIST_H | ||
2 | #define _LINUX_RCULIST_H | ||
3 | |||
4 | #include <linux/list.h> | ||
5 | |||
6 | #endif /* _LINUX_RCULIST_H */ | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 44c81c744538..b358c704d102 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -246,6 +246,7 @@ enum rt_class_t | |||
246 | { | 246 | { |
247 | RT_TABLE_UNSPEC=0, | 247 | RT_TABLE_UNSPEC=0, |
248 | /* User defined values */ | 248 | /* User defined values */ |
249 | RT_TABLE_COMPAT=252, | ||
249 | RT_TABLE_DEFAULT=253, | 250 | RT_TABLE_DEFAULT=253, |
250 | RT_TABLE_MAIN=254, | 251 | RT_TABLE_MAIN=254, |
251 | RT_TABLE_LOCAL=255, | 252 | RT_TABLE_LOCAL=255, |
@@ -267,10 +268,10 @@ enum rtattr_type_t | |||
267 | RTA_PREFSRC, | 268 | RTA_PREFSRC, |
268 | RTA_METRICS, | 269 | RTA_METRICS, |
269 | RTA_MULTIPATH, | 270 | RTA_MULTIPATH, |
270 | RTA_PROTOINFO, | 271 | RTA_PROTOINFO, /* no longer used */ |
271 | RTA_FLOW, | 272 | RTA_FLOW, |
272 | RTA_CACHEINFO, | 273 | RTA_CACHEINFO, |
273 | RTA_SESSION, | 274 | RTA_SESSION, /* no longer used */ |
274 | RTA_MP_ALGO, /* no longer used */ | 275 | RTA_MP_ALGO, /* no longer used */ |
275 | RTA_TABLE, | 276 | RTA_TABLE, |
276 | __RTA_MAX | 277 | __RTA_MAX |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ae0be3c62375..c5d3f847ca8d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2026,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p) | |||
2026 | return signal_pending(p) && __fatal_signal_pending(p); | 2026 | return signal_pending(p) && __fatal_signal_pending(p); |
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | static inline int signal_pending_state(long state, struct task_struct *p) | ||
2030 | { | ||
2031 | if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) | ||
2032 | return 0; | ||
2033 | if (!signal_pending(p)) | ||
2034 | return 0; | ||
2035 | |||
2036 | if (state & (__TASK_STOPPED | __TASK_TRACED)) | ||
2037 | return 0; | ||
2038 | |||
2039 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | ||
2040 | } | ||
2041 | |||
2029 | static inline int need_resched(void) | 2042 | static inline int need_resched(void) |
2030 | { | 2043 | { |
2031 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); | 2044 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); |
diff --git a/include/linux/securebits.h b/include/linux/securebits.h index c1f19dbceb05..92f09bdf1175 100644 --- a/include/linux/securebits.h +++ b/include/linux/securebits.h | |||
@@ -7,14 +7,15 @@ | |||
7 | inheritance of root-permissions and suid-root executable under | 7 | inheritance of root-permissions and suid-root executable under |
8 | compatibility mode. We raise the effective and inheritable bitmasks | 8 | compatibility mode. We raise the effective and inheritable bitmasks |
9 | *of the executable file* if the effective uid of the new process is | 9 | *of the executable file* if the effective uid of the new process is |
10 | 0. If the real uid is 0, we raise the inheritable bitmask of the | 10 | 0. If the real uid is 0, we raise the effective (legacy) bit of the |
11 | executable file. */ | 11 | executable file. */ |
12 | #define SECURE_NOROOT 0 | 12 | #define SECURE_NOROOT 0 |
13 | #define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */ | 13 | #define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */ |
14 | 14 | ||
15 | /* When set, setuid to/from uid 0 does not trigger capability-"fixes" | 15 | /* When set, setuid to/from uid 0 does not trigger capability-"fixup". |
16 | to be compatible with old programs relying on set*uid to loose | 16 | When unset, to provide compatiblility with old programs relying on |
17 | privileges. When unset, setuid doesn't change privileges. */ | 17 | set*uid to gain/lose privilege, transitions to/from uid 0 cause |
18 | capabilities to be gained/lost. */ | ||
18 | #define SECURE_NO_SETUID_FIXUP 2 | 19 | #define SECURE_NO_SETUID_FIXUP 2 |
19 | #define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ | 20 | #define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ |
20 | 21 | ||
@@ -26,10 +27,10 @@ | |||
26 | #define SECURE_KEEP_CAPS 4 | 27 | #define SECURE_KEEP_CAPS 4 |
27 | #define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */ | 28 | #define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */ |
28 | 29 | ||
29 | /* Each securesetting is implemented using two bits. One bit specify | 30 | /* Each securesetting is implemented using two bits. One bit specifies |
30 | whether the setting is on or off. The other bit specify whether the | 31 | whether the setting is on or off. The other bit specify whether the |
31 | setting is fixed or not. A setting which is fixed cannot be changed | 32 | setting is locked or not. A setting which is locked cannot be |
32 | from user-level. */ | 33 | changed from user-level. */ |
33 | #define issecure_mask(X) (1 << (X)) | 34 | #define issecure_mask(X) (1 << (X)) |
34 | #define issecure(X) (issecure_mask(X) & current->securebits) | 35 | #define issecure(X) (issecure_mask(X) & current->securebits) |
35 | 36 | ||
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d32123ae08ad..d8f31de632c5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -192,6 +192,7 @@ struct uart_ops { | |||
192 | void (*shutdown)(struct uart_port *); | 192 | void (*shutdown)(struct uart_port *); |
193 | void (*set_termios)(struct uart_port *, struct ktermios *new, | 193 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
194 | struct ktermios *old); | 194 | struct ktermios *old); |
195 | void (*set_ldisc)(struct uart_port *); | ||
195 | void (*pm)(struct uart_port *, unsigned int state, | 196 | void (*pm)(struct uart_port *, unsigned int state, |
196 | unsigned int oldstate); | 197 | unsigned int oldstate); |
197 | int (*set_wake)(struct uart_port *, unsigned int state); | 198 | int (*set_wake)(struct uart_port *, unsigned int state); |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 805ed4b92f9a..9aa90a6f20e0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk). | 2 | * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk). |
3 | * | 3 | * |
4 | * (C) SGI 2006, Christoph Lameter <clameter@sgi.com> | 4 | * (C) SGI 2006, Christoph Lameter |
5 | * Cleaned up and restructured to ease the addition of alternative | 5 | * Cleaned up and restructured to ease the addition of alternative |
6 | * implementations of SLAB allocators. | 6 | * implementations of SLAB allocators. |
7 | */ | 7 | */ |
@@ -276,6 +276,17 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
276 | return kmalloc(size, flags | __GFP_ZERO); | 276 | return kmalloc(size, flags | __GFP_ZERO); |
277 | } | 277 | } |
278 | 278 | ||
279 | /** | ||
280 | * kzalloc_node - allocate zeroed memory from a particular memory node. | ||
281 | * @size: how many bytes of memory are required. | ||
282 | * @flags: the type of memory to allocate (see kmalloc). | ||
283 | * @node: memory node from which to allocate | ||
284 | */ | ||
285 | static inline void *kzalloc_node(size_t size, gfp_t flags, int node) | ||
286 | { | ||
287 | return kmalloc_node(size, flags | __GFP_ZERO, node); | ||
288 | } | ||
289 | |||
279 | #ifdef CONFIG_SLABINFO | 290 | #ifdef CONFIG_SLABINFO |
280 | extern const struct seq_operations slabinfo_op; | 291 | extern const struct seq_operations slabinfo_op; |
281 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | 292 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 71e43a12ebbb..d117ea2825a9 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -4,7 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * SLUB : A Slab allocator without object queues. | 5 | * SLUB : A Slab allocator without object queues. |
6 | * | 6 | * |
7 | * (C) 2007 SGI, Christoph Lameter <clameter@sgi.com> | 7 | * (C) 2007 SGI, Christoph Lameter |
8 | */ | 8 | */ |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/gfp.h> | 10 | #include <linux/gfp.h> |
@@ -137,10 +137,12 @@ static __always_inline int kmalloc_index(size_t size) | |||
137 | if (size <= KMALLOC_MIN_SIZE) | 137 | if (size <= KMALLOC_MIN_SIZE) |
138 | return KMALLOC_SHIFT_LOW; | 138 | return KMALLOC_SHIFT_LOW; |
139 | 139 | ||
140 | #if KMALLOC_MIN_SIZE <= 64 | ||
140 | if (size > 64 && size <= 96) | 141 | if (size > 64 && size <= 96) |
141 | return 1; | 142 | return 1; |
142 | if (size > 128 && size <= 192) | 143 | if (size > 128 && size <= 192) |
143 | return 2; | 144 | return 2; |
145 | #endif | ||
144 | if (size <= 8) return 3; | 146 | if (size <= 8) return 3; |
145 | if (size <= 16) return 4; | 147 | if (size <= 16) return 4; |
146 | if (size <= 32) return 5; | 148 | if (size <= 32) return 5; |
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h index e9bbe3ebd721..d5ca78b93a3b 100644 --- a/include/linux/spi/mmc_spi.h +++ b/include/linux/spi/mmc_spi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_SPI_MMC_SPI_H | 1 | #ifndef __LINUX_SPI_MMC_SPI_H |
2 | #define __LINUX_SPI_MMC_SPI_H | 2 | #define __LINUX_SPI_MMC_SPI_H |
3 | 3 | ||
4 | #include <linux/interrupt.h> | ||
5 | |||
4 | struct device; | 6 | struct device; |
5 | struct mmc_host; | 7 | struct mmc_host; |
6 | 8 | ||
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index 01fbdf5fef22..942e38736901 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h | |||
@@ -100,7 +100,7 @@ extern char * nvram_get(const char *name); | |||
100 | /* Get the device MAC address */ | 100 | /* Get the device MAC address */ |
101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | 101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) |
102 | { | 102 | { |
103 | #ifdef CONFIG_BCM947XX | 103 | #ifdef CONFIG_BCM47XX |
104 | char *res = nvram_get("et0macaddr"); | 104 | char *res = nvram_get("et0macaddr"); |
105 | if (res) | 105 | if (res) |
106 | memcpy(macaddr, res, 6); | 106 | memcpy(macaddr, res, 6); |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 18e62e3d406f..b31b6b74aa28 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -239,11 +239,6 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | |||
239 | return (struct tcp_request_sock *)req; | 239 | return (struct tcp_request_sock *)req; |
240 | } | 240 | } |
241 | 241 | ||
242 | struct tcp_deferred_accept_info { | ||
243 | struct sock *listen_sk; | ||
244 | struct request_sock *request; | ||
245 | }; | ||
246 | |||
247 | struct tcp_sock { | 242 | struct tcp_sock { |
248 | /* inet_connection_sock has to be the first member of tcp_sock */ | 243 | /* inet_connection_sock has to be the first member of tcp_sock */ |
249 | struct inet_connection_sock inet_conn; | 244 | struct inet_connection_sock inet_conn; |
@@ -379,8 +374,6 @@ struct tcp_sock { | |||
379 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 374 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
380 | int linger2; | 375 | int linger2; |
381 | 376 | ||
382 | struct tcp_deferred_accept_info defer_tcp_accept; | ||
383 | |||
384 | unsigned long last_synq_overflow; | 377 | unsigned long last_synq_overflow; |
385 | 378 | ||
386 | u32 tso_deferred; | 379 | u32 tso_deferred; |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 06d3e6eb9ca8..917707e6151d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -66,8 +66,7 @@ struct thermal_cooling_device { | |||
66 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) | 66 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) |
67 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) | 67 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) |
68 | 68 | ||
69 | #if defined(CONFIG_HWMON) || \ | 69 | #if defined(CONFIG_THERMAL_HWMON) |
70 | (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE)) | ||
71 | /* thermal zone devices with the same type share one hwmon device */ | 70 | /* thermal zone devices with the same type share one hwmon device */ |
72 | struct thermal_hwmon_device { | 71 | struct thermal_hwmon_device { |
73 | char type[THERMAL_NAME_LENGTH]; | 72 | char type[THERMAL_NAME_LENGTH]; |
@@ -94,8 +93,7 @@ struct thermal_zone_device { | |||
94 | struct idr idr; | 93 | struct idr idr; |
95 | struct mutex lock; /* protect cooling devices list */ | 94 | struct mutex lock; /* protect cooling devices list */ |
96 | struct list_head node; | 95 | struct list_head node; |
97 | #if defined(CONFIG_HWMON) || \ | 96 | #if defined(CONFIG_THERMAL_HWMON) |
98 | (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE)) | ||
99 | struct list_head hwmon_node; | 97 | struct list_head hwmon_node; |
100 | struct thermal_hwmon_device *hwmon; | 98 | struct thermal_hwmon_device *hwmon; |
101 | struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ | 99 | struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ |
diff --git a/include/linux/time.h b/include/linux/time.h index d32ef0ad4c0a..e15206a7e82e 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | # include <linux/cache.h> | 7 | # include <linux/cache.h> |
8 | # include <linux/seqlock.h> | 8 | # include <linux/seqlock.h> |
9 | # include <linux/math64.h> | ||
9 | #endif | 10 | #endif |
10 | 11 | ||
11 | #ifndef _STRUCT_TIMESPEC | 12 | #ifndef _STRUCT_TIMESPEC |
@@ -169,18 +170,13 @@ extern struct timeval ns_to_timeval(const s64 nsec); | |||
169 | * timespec_add_ns - Adds nanoseconds to a timespec | 170 | * timespec_add_ns - Adds nanoseconds to a timespec |
170 | * @a: pointer to timespec to be incremented | 171 | * @a: pointer to timespec to be incremented |
171 | * @ns: unsigned nanoseconds value to be added | 172 | * @ns: unsigned nanoseconds value to be added |
173 | * | ||
174 | * This must always be inlined because its used from the x86-64 vdso, | ||
175 | * which cannot call other kernel functions. | ||
172 | */ | 176 | */ |
173 | static inline void timespec_add_ns(struct timespec *a, u64 ns) | 177 | static __always_inline void timespec_add_ns(struct timespec *a, u64 ns) |
174 | { | 178 | { |
175 | ns += a->tv_nsec; | 179 | a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); |
176 | while(unlikely(ns >= NSEC_PER_SEC)) { | ||
177 | /* The following asm() prevents the compiler from | ||
178 | * optimising this loop into a modulo operation. */ | ||
179 | asm("" : "+r"(ns)); | ||
180 | |||
181 | ns -= NSEC_PER_SEC; | ||
182 | a->tv_sec++; | ||
183 | } | ||
184 | a->tv_nsec = ns; | 180 | a->tv_nsec = ns; |
185 | } | 181 | } |
186 | #endif /* __KERNEL__ */ | 182 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 7f7121f9c968..324a3b231d40 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define N_6PACK 7 | 36 | #define N_6PACK 7 |
37 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | 37 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ |
38 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | 38 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ |
39 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | 39 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus */ |
40 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | 40 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ |
41 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ | 41 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ |
42 | /* cards about SMS messages */ | 42 | /* cards about SMS messages */ |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 59f1c0bd8f9c..d2a003586761 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -27,8 +27,7 @@ | |||
27 | * This routine is called by the kernel to write a series of | 27 | * This routine is called by the kernel to write a series of |
28 | * characters to the tty device. The characters may come from | 28 | * characters to the tty device. The characters may come from |
29 | * user space or kernel space. This routine will return the | 29 | * user space or kernel space. This routine will return the |
30 | * number of characters actually accepted for writing. This | 30 | * number of characters actually accepted for writing. |
31 | * routine is mandatory. | ||
32 | * | 31 | * |
33 | * Optional: Required for writable devices. | 32 | * Optional: Required for writable devices. |
34 | * | 33 | * |
@@ -134,7 +133,7 @@ | |||
134 | * This routine notifies the tty driver that it should hangup the | 133 | * This routine notifies the tty driver that it should hangup the |
135 | * tty device. | 134 | * tty device. |
136 | * | 135 | * |
137 | * Required: | 136 | * Optional: |
138 | * | 137 | * |
139 | * void (*break_ctl)(struct tty_stuct *tty, int state); | 138 | * void (*break_ctl)(struct tty_stuct *tty, int state); |
140 | * | 139 | * |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index c1411189ba6c..4a535ea1e123 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -865,9 +865,9 @@ struct v4l2_querymenu | |||
865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) | 865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) |
866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) | 866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) |
867 | 867 | ||
868 | /* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ | 868 | /* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ |
869 | #define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) | 869 | #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) |
870 | #define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) | 870 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) |
871 | 871 | ||
872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) | 872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) |
873 | enum v4l2_power_line_frequency { | 873 | enum v4l2_power_line_frequency { |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index d4695a3356d0..5f79a5f9de79 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
@@ -10,18 +10,19 @@ | |||
10 | #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ | 10 | #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ |
11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ | 11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ |
12 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ | 12 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ |
13 | #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ | ||
13 | 14 | ||
14 | struct virtio_blk_config | 15 | struct virtio_blk_config |
15 | { | 16 | { |
16 | /* The capacity (in 512-byte sectors). */ | 17 | /* The capacity (in 512-byte sectors). */ |
17 | __le64 capacity; | 18 | __u64 capacity; |
18 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ | 19 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ |
19 | __le32 size_max; | 20 | __u32 size_max; |
20 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ | 21 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ |
21 | __le32 seg_max; | 22 | __u32 seg_max; |
22 | /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ | 23 | /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ |
23 | struct virtio_blk_geometry { | 24 | struct virtio_blk_geometry { |
24 | __le16 cylinders; | 25 | __u16 cylinders; |
25 | __u8 heads; | 26 | __u8 heads; |
26 | __u8 sectors; | 27 | __u8 sectors; |
27 | } geometry; | 28 | } geometry; |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 50db245c81ad..f364bbf63c34 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -15,6 +15,10 @@ | |||
15 | /* We've given up on this device. */ | 15 | /* We've given up on this device. */ |
16 | #define VIRTIO_CONFIG_S_FAILED 0x80 | 16 | #define VIRTIO_CONFIG_S_FAILED 0x80 |
17 | 17 | ||
18 | /* Do we get callbacks when the ring is completely used, even if we've | ||
19 | * suppressed them? */ | ||
20 | #define VIRTIO_F_NOTIFY_ON_EMPTY 24 | ||
21 | |||
18 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
19 | #include <linux/virtio.h> | 23 | #include <linux/virtio.h> |
20 | 24 | ||
@@ -99,7 +103,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, | |||
99 | * The return value is -ENOENT if the feature doesn't exist. Otherwise | 103 | * The return value is -ENOENT if the feature doesn't exist. Otherwise |
100 | * the config value is copied into whatever is pointed to by v. */ | 104 | * the config value is copied into whatever is pointed to by v. */ |
101 | #define virtio_config_val(vdev, fbit, offset, v) \ | 105 | #define virtio_config_val(vdev, fbit, offset, v) \ |
102 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v)) | 106 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v)) |
103 | 107 | ||
104 | static inline int virtio_config_buf(struct virtio_device *vdev, | 108 | static inline int virtio_config_buf(struct virtio_device *vdev, |
105 | unsigned int fbit, | 109 | unsigned int fbit, |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 9405aa6cdf26..38c0571820fb 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -38,7 +38,7 @@ struct virtio_net_hdr | |||
38 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set | 38 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set |
39 | __u8 gso_type; | 39 | __u8 gso_type; |
40 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ | 40 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ |
41 | __u16 gso_size; /* Bytes to append to gso_hdr_len per frame */ | 41 | __u16 gso_size; /* Bytes to append to hdr_len per frame */ |
42 | __u16 csum_start; /* Position to start checksumming from */ | 42 | __u16 csum_start; /* Position to start checksumming from */ |
43 | __u16 csum_offset; /* Offset after that to place checksum */ | 43 | __u16 csum_offset; /* Offset after that to place checksum */ |
44 | }; | 44 | }; |
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h new file mode 100644 index 000000000000..331afb6c9f62 --- /dev/null +++ b/include/linux/virtio_rng.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LINUX_VIRTIO_RNG_H | ||
2 | #define _LINUX_VIRTIO_RNG_H | ||
3 | #include <linux/virtio_config.h> | ||
4 | |||
5 | /* The ID for virtio_rng */ | ||
6 | #define VIRTIO_ID_RNG 4 | ||
7 | |||
8 | #endif /* _LINUX_VIRTIO_RNG_H */ | ||
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h index 4d13732e9cf0..6f69968eab24 100644 --- a/include/linux/wm97xx.h +++ b/include/linux/wm97xx.h | |||
@@ -100,6 +100,7 @@ | |||
100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ | 100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ |
101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ | 101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ |
102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ | 102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ |
103 | #define WM9713_45W 0x1000 /* set for 5 wire panel */ | ||
103 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ | 104 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ |
104 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ | 105 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ |
105 | #define WM9713_WAIT 0x0200 /* coordinate wait */ | 106 | #define WM9713_WAIT 0x0200 /* coordinate wait */ |