diff options
Diffstat (limited to 'include/linux')
65 files changed, 1145 insertions, 444 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index fd6a452b0ceb..fba8051fb297 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -163,8 +163,6 @@ struct acpi_pci_driver { | |||
163 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); | 163 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); |
164 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); | 164 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); |
165 | 165 | ||
166 | #ifdef CONFIG_ACPI_EC | ||
167 | |||
168 | extern int ec_read(u8 addr, u8 *val); | 166 | extern int ec_read(u8 addr, u8 *val); |
169 | extern int ec_write(u8 addr, u8 val); | 167 | extern int ec_write(u8 addr, u8 val); |
170 | extern int ec_transaction(u8 command, | 168 | extern int ec_transaction(u8 command, |
@@ -172,8 +170,6 @@ extern int ec_transaction(u8 command, | |||
172 | u8 *rdata, unsigned rdata_len, | 170 | u8 *rdata, unsigned rdata_len, |
173 | int force_poll); | 171 | int force_poll); |
174 | 172 | ||
175 | #endif /*CONFIG_ACPI_EC*/ | ||
176 | |||
177 | #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) | 173 | #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) |
178 | 174 | ||
179 | typedef void (*wmi_notify_handler) (u32 value, void *context); | 175 | typedef void (*wmi_notify_handler) (u32 value, void *context); |
@@ -194,6 +190,50 @@ extern bool wmi_has_guid(const char *guid); | |||
194 | 190 | ||
195 | #endif /* CONFIG_ACPI_WMI */ | 191 | #endif /* CONFIG_ACPI_WMI */ |
196 | 192 | ||
193 | #define ACPI_VIDEO_OUTPUT_SWITCHING 0x0001 | ||
194 | #define ACPI_VIDEO_DEVICE_POSTING 0x0002 | ||
195 | #define ACPI_VIDEO_ROM_AVAILABLE 0x0004 | ||
196 | #define ACPI_VIDEO_BACKLIGHT 0x0008 | ||
197 | #define ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR 0x0010 | ||
198 | #define ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO 0x0020 | ||
199 | #define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR 0x0040 | ||
200 | #define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO 0x0080 | ||
201 | #define ACPI_VIDEO_BACKLIGHT_DMI_VENDOR 0x0100 | ||
202 | #define ACPI_VIDEO_BACKLIGHT_DMI_VIDEO 0x0200 | ||
203 | #define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR 0x0400 | ||
204 | #define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO 0x0800 | ||
205 | |||
206 | #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) | ||
207 | |||
208 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); | ||
209 | extern long acpi_is_video_device(struct acpi_device *device); | ||
210 | extern int acpi_video_backlight_support(void); | ||
211 | extern int acpi_video_display_switch_support(void); | ||
212 | |||
213 | #else | ||
214 | |||
215 | static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle) | ||
216 | { | ||
217 | return 0; | ||
218 | } | ||
219 | |||
220 | static inline long acpi_is_video_device(struct acpi_device *device) | ||
221 | { | ||
222 | return 0; | ||
223 | } | ||
224 | |||
225 | static inline int acpi_video_backlight_support(void) | ||
226 | { | ||
227 | return 0; | ||
228 | } | ||
229 | |||
230 | static inline int acpi_video_display_switch_support(void) | ||
231 | { | ||
232 | return 0; | ||
233 | } | ||
234 | |||
235 | #endif /* defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) */ | ||
236 | |||
197 | extern int acpi_blacklisted(void); | 237 | extern int acpi_blacklisted(void); |
198 | #ifdef CONFIG_DMI | 238 | #ifdef CONFIG_DMI |
199 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 239 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 6272a395d43c..8f0672d13eb1 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -391,6 +391,7 @@ extern int audit_classify_arch(int arch); | |||
391 | #ifdef CONFIG_AUDITSYSCALL | 391 | #ifdef CONFIG_AUDITSYSCALL |
392 | /* These are defined in auditsc.c */ | 392 | /* These are defined in auditsc.c */ |
393 | /* Public API */ | 393 | /* Public API */ |
394 | extern void audit_finish_fork(struct task_struct *child); | ||
394 | extern int audit_alloc(struct task_struct *task); | 395 | extern int audit_alloc(struct task_struct *task); |
395 | extern void audit_free(struct task_struct *task); | 396 | extern void audit_free(struct task_struct *task); |
396 | extern void audit_syscall_entry(int arch, | 397 | extern void audit_syscall_entry(int arch, |
@@ -434,7 +435,7 @@ static inline void audit_ptrace(struct task_struct *t) | |||
434 | 435 | ||
435 | /* Private API (for audit.c only) */ | 436 | /* Private API (for audit.c only) */ |
436 | extern unsigned int audit_serial(void); | 437 | extern unsigned int audit_serial(void); |
437 | extern void auditsc_get_stamp(struct audit_context *ctx, | 438 | extern int auditsc_get_stamp(struct audit_context *ctx, |
438 | struct timespec *t, unsigned int *serial); | 439 | struct timespec *t, unsigned int *serial); |
439 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); | 440 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); |
440 | #define audit_get_loginuid(t) ((t)->loginuid) | 441 | #define audit_get_loginuid(t) ((t)->loginuid) |
@@ -504,6 +505,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) | |||
504 | extern int audit_n_rules; | 505 | extern int audit_n_rules; |
505 | extern int audit_signals; | 506 | extern int audit_signals; |
506 | #else | 507 | #else |
508 | #define audit_finish_fork(t) | ||
507 | #define audit_alloc(t) ({ 0; }) | 509 | #define audit_alloc(t) ({ 0; }) |
508 | #define audit_free(t) do { ; } while (0) | 510 | #define audit_free(t) do { ; } while (0) |
509 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) | 511 | #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) |
@@ -516,7 +518,7 @@ extern int audit_signals; | |||
516 | #define audit_inode(n,d) do { ; } while (0) | 518 | #define audit_inode(n,d) do { ; } while (0) |
517 | #define audit_inode_child(d,i,p) do { ; } while (0) | 519 | #define audit_inode_child(d,i,p) do { ; } while (0) |
518 | #define audit_core_dumps(i) do { ; } while (0) | 520 | #define audit_core_dumps(i) do { ; } while (0) |
519 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | 521 | #define auditsc_get_stamp(c,t,s) (0) |
520 | #define audit_get_loginuid(t) (-1) | 522 | #define audit_get_loginuid(t) (-1) |
521 | #define audit_get_sessionid(t) (-1) | 523 | #define audit_get_sessionid(t) (-1) |
522 | #define audit_log_task_context(b) do { ; } while (0) | 524 | #define audit_log_task_context(b) do { ; } while (0) |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 1c91a176b9ae..6a642098e5c3 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -236,12 +236,16 @@ static inline void *bio_data(struct bio *bio) | |||
236 | #define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1) | 236 | #define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1) |
237 | #define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx) | 237 | #define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx) |
238 | 238 | ||
239 | /* Default implementation of BIOVEC_PHYS_MERGEABLE */ | ||
240 | #define __BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ | ||
241 | ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) | ||
242 | |||
239 | /* | 243 | /* |
240 | * allow arch override, for eg virtualized architectures (put in asm/io.h) | 244 | * allow arch override, for eg virtualized architectures (put in asm/io.h) |
241 | */ | 245 | */ |
242 | #ifndef BIOVEC_PHYS_MERGEABLE | 246 | #ifndef BIOVEC_PHYS_MERGEABLE |
243 | #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ | 247 | #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ |
244 | ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) | 248 | __BIOVEC_PHYS_MERGEABLE(vec1, vec2) |
245 | #endif | 249 | #endif |
246 | 250 | ||
247 | #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \ | 251 | #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a135256b272c..031a315c0509 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -662,6 +662,7 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn; | |||
662 | * default timeout for SG_IO if none specified | 662 | * default timeout for SG_IO if none specified |
663 | */ | 663 | */ |
664 | #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ) | 664 | #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ) |
665 | #define BLK_MIN_SG_TIMEOUT (7 * HZ) | ||
665 | 666 | ||
666 | #ifdef CONFIG_BOUNCE | 667 | #ifdef CONFIG_BOUNCE |
667 | extern int init_emergency_isa_pool(void); | 668 | extern int init_emergency_isa_pool(void); |
@@ -786,6 +787,8 @@ static inline void blk_run_address_space(struct address_space *mapping) | |||
786 | blk_run_backing_dev(mapping->backing_dev_info, NULL); | 787 | blk_run_backing_dev(mapping->backing_dev_info, NULL); |
787 | } | 788 | } |
788 | 789 | ||
790 | extern void blkdev_dequeue_request(struct request *req); | ||
791 | |||
789 | /* | 792 | /* |
790 | * blk_end_request() and friends. | 793 | * blk_end_request() and friends. |
791 | * __blk_end_request() and end_request() must be called with | 794 | * __blk_end_request() and end_request() must be called with |
@@ -820,11 +823,6 @@ extern void blk_update_request(struct request *rq, int error, | |||
820 | extern unsigned int blk_rq_bytes(struct request *rq); | 823 | extern unsigned int blk_rq_bytes(struct request *rq); |
821 | extern unsigned int blk_rq_cur_bytes(struct request *rq); | 824 | extern unsigned int blk_rq_cur_bytes(struct request *rq); |
822 | 825 | ||
823 | static inline void blkdev_dequeue_request(struct request *req) | ||
824 | { | ||
825 | elv_dequeue_request(req->q, req); | ||
826 | } | ||
827 | |||
828 | /* | 826 | /* |
829 | * Access functions for manipulating queue properties | 827 | * Access functions for manipulating queue properties |
830 | */ | 828 | */ |
@@ -921,6 +919,8 @@ extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | |||
921 | 919 | ||
922 | #define MAX_SEGMENT_SIZE 65536 | 920 | #define MAX_SEGMENT_SIZE 65536 |
923 | 921 | ||
922 | #define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL | ||
923 | |||
924 | #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) | 924 | #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) |
925 | 925 | ||
926 | static inline int queue_hardsect_size(struct request_queue *q) | 926 | static inline int queue_hardsect_size(struct request_queue *q) |
diff --git a/include/linux/c2port.h b/include/linux/c2port.h new file mode 100644 index 000000000000..7b5a2388ba67 --- /dev/null +++ b/include/linux/c2port.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * Silicon Labs C2 port Linux support | ||
3 | * | ||
4 | * Copyright (c) 2007 Rodolfo Giometti <giometti@linux.it> | ||
5 | * Copyright (c) 2007 Eurotech S.p.A. <info@eurotech.it> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation | ||
10 | */ | ||
11 | |||
12 | #include <linux/device.h> | ||
13 | |||
14 | #define C2PORT_NAME_LEN 32 | ||
15 | |||
16 | /* | ||
17 | * C2 port basic structs | ||
18 | */ | ||
19 | |||
20 | /* Main struct */ | ||
21 | struct c2port_ops; | ||
22 | struct c2port_device { | ||
23 | unsigned int access:1; | ||
24 | unsigned int flash_access:1; | ||
25 | |||
26 | int id; | ||
27 | char name[C2PORT_NAME_LEN]; | ||
28 | struct c2port_ops *ops; | ||
29 | struct mutex mutex; /* prevent races during read/write */ | ||
30 | |||
31 | struct device *dev; | ||
32 | |||
33 | void *private_data; | ||
34 | }; | ||
35 | |||
36 | /* Basic operations */ | ||
37 | struct c2port_ops { | ||
38 | /* Flash layout */ | ||
39 | unsigned short block_size; /* flash block size in bytes */ | ||
40 | unsigned short blocks_num; /* flash blocks number */ | ||
41 | |||
42 | /* Enable or disable the access to C2 port */ | ||
43 | void (*access)(struct c2port_device *dev, int status); | ||
44 | |||
45 | /* Set C2D data line as input/output */ | ||
46 | void (*c2d_dir)(struct c2port_device *dev, int dir); | ||
47 | |||
48 | /* Read/write C2D data line */ | ||
49 | int (*c2d_get)(struct c2port_device *dev); | ||
50 | void (*c2d_set)(struct c2port_device *dev, int status); | ||
51 | |||
52 | /* Write C2CK clock line */ | ||
53 | void (*c2ck_set)(struct c2port_device *dev, int status); | ||
54 | }; | ||
55 | |||
56 | /* | ||
57 | * Exported functions | ||
58 | */ | ||
59 | |||
60 | #define to_class_dev(obj) container_of((obj), struct class_device, kobj) | ||
61 | #define to_c2port_device(obj) container_of((obj), struct c2port_device, class) | ||
62 | |||
63 | extern struct c2port_device *c2port_device_register(char *name, | ||
64 | struct c2port_ops *ops, void *devdata); | ||
65 | extern void c2port_device_unregister(struct c2port_device *dev); | ||
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index e9ca210ffa5b..f50785ad4781 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/skbuff.h> | 19 | #include <linux/skbuff.h> |
20 | #include <linux/netdevice.h> | 20 | #include <linux/netdevice.h> |
21 | 21 | ||
22 | #define CAN_VERSION "20071116" | 22 | #define CAN_VERSION "20081130" |
23 | 23 | ||
24 | /* increment this number each time you change some user-space interface */ | 24 | /* increment this number each time you change some user-space interface */ |
25 | #define CAN_ABI_VERSION "8" | 25 | #define CAN_ABI_VERSION "8" |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 8b00f6643e93..1164963c3a85 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -25,7 +25,6 @@ struct cgroup; | |||
25 | 25 | ||
26 | extern int cgroup_init_early(void); | 26 | extern int cgroup_init_early(void); |
27 | extern int cgroup_init(void); | 27 | extern int cgroup_init(void); |
28 | extern void cgroup_init_smp(void); | ||
29 | extern void cgroup_lock(void); | 28 | extern void cgroup_lock(void); |
30 | extern bool cgroup_lock_live_group(struct cgroup *cgrp); | 29 | extern bool cgroup_lock_live_group(struct cgroup *cgrp); |
31 | extern void cgroup_unlock(void); | 30 | extern void cgroup_unlock(void); |
@@ -348,8 +347,6 @@ struct cgroup_subsys { | |||
348 | struct cgroupfs_root *root; | 347 | struct cgroupfs_root *root; |
349 | 348 | ||
350 | struct list_head sibling; | 349 | struct list_head sibling; |
351 | |||
352 | void *private; | ||
353 | }; | 350 | }; |
354 | 351 | ||
355 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; | 352 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; |
@@ -410,7 +407,6 @@ void cgroup_mm_owner_callbacks(struct task_struct *old, | |||
410 | 407 | ||
411 | static inline int cgroup_init_early(void) { return 0; } | 408 | static inline int cgroup_init_early(void) { return 0; } |
412 | static inline int cgroup_init(void) { return 0; } | 409 | static inline int cgroup_init(void) { return 0; } |
413 | static inline void cgroup_init_smp(void) {} | ||
414 | static inline void cgroup_fork(struct task_struct *p) {} | 410 | static inline void cgroup_fork(struct task_struct *p) {} |
415 | static inline void cgroup_fork_callbacks(struct task_struct *p) {} | 411 | static inline void cgroup_fork_callbacks(struct task_struct *p) {} |
416 | static inline void cgroup_post_fork(struct task_struct *p) {} | 412 | static inline void cgroup_post_fork(struct task_struct *p) {} |
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h index 8c0f9505b48c..7605fdd1eb65 100644 --- a/include/linux/cnt32_to_63.h +++ b/include/linux/cnt32_to_63.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <asm/byteorder.h> | 18 | #include <asm/byteorder.h> |
19 | #include <asm/system.h> | ||
19 | 20 | ||
20 | /* this is used only to give gcc a clue about good code generation */ | 21 | /* this is used only to give gcc a clue about good code generation */ |
21 | union cnt32_to_63 { | 22 | union cnt32_to_63 { |
@@ -53,11 +54,19 @@ union cnt32_to_63 { | |||
53 | * needed increment. And any race in updating the value in memory is harmless | 54 | * needed increment. And any race in updating the value in memory is harmless |
54 | * as the same value would simply be stored more than once. | 55 | * as the same value would simply be stored more than once. |
55 | * | 56 | * |
56 | * The only restriction for the algorithm to work properly is that this | 57 | * The restrictions for the algorithm to work properly are: |
57 | * code must be executed at least once per each half period of the 32-bit | 58 | * |
58 | * counter to properly update the state bit in memory. This is usually not a | 59 | * 1) this code must be called at least once per each half period of the |
59 | * problem in practice, but if it is then a kernel timer could be scheduled | 60 | * 32-bit counter; |
60 | * to manage for this code to be executed often enough. | 61 | * |
62 | * 2) this code must not be preempted for a duration longer than the | ||
63 | * 32-bit counter half period minus the longest period between two | ||
64 | * calls to this code. | ||
65 | * | ||
66 | * Those requirements ensure proper update to the state bit in memory. | ||
67 | * This is usually not a problem in practice, but if it is then a kernel | ||
68 | * timer should be scheduled to manage for this code to be executed often | ||
69 | * enough. | ||
61 | * | 70 | * |
62 | * Note that the top bit (bit 63) in the returned value should be considered | 71 | * Note that the top bit (bit 63) in the returned value should be considered |
63 | * as garbage. It is not cleared here because callers are likely to use a | 72 | * as garbage. It is not cleared here because callers are likely to use a |
@@ -68,9 +77,10 @@ union cnt32_to_63 { | |||
68 | */ | 77 | */ |
69 | #define cnt32_to_63(cnt_lo) \ | 78 | #define cnt32_to_63(cnt_lo) \ |
70 | ({ \ | 79 | ({ \ |
71 | static volatile u32 __m_cnt_hi; \ | 80 | static u32 __m_cnt_hi; \ |
72 | union cnt32_to_63 __x; \ | 81 | union cnt32_to_63 __x; \ |
73 | __x.hi = __m_cnt_hi; \ | 82 | __x.hi = __m_cnt_hi; \ |
83 | smp_rmb(); \ | ||
74 | __x.lo = (cnt_lo); \ | 84 | __x.lo = (cnt_lo); \ |
75 | if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ | 85 | if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ |
76 | __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ | 86 | __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ |
diff --git a/include/linux/compat.h b/include/linux/compat.h index f061a1ea1b74..e88f3ecf38b4 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -252,12 +252,10 @@ extern int compat_ptrace_request(struct task_struct *child, | |||
252 | compat_long_t request, | 252 | compat_long_t request, |
253 | compat_ulong_t addr, compat_ulong_t data); | 253 | compat_ulong_t addr, compat_ulong_t data); |
254 | 254 | ||
255 | #ifdef __ARCH_WANT_COMPAT_SYS_PTRACE | ||
256 | extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | 255 | extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request, |
257 | compat_ulong_t addr, compat_ulong_t data); | 256 | compat_ulong_t addr, compat_ulong_t data); |
258 | asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, | 257 | asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, |
259 | compat_long_t addr, compat_long_t data); | 258 | compat_long_t addr, compat_long_t data); |
260 | #endif /* __ARCH_WANT_COMPAT_SYS_PTRACE */ | ||
261 | 259 | ||
262 | /* | 260 | /* |
263 | * epoll (fs/eventpoll.c) compat bits follow ... | 261 | * epoll (fs/eventpoll.c) compat bits follow ... |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index d3219d73f8e6..21e1dd43e52a 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -5,6 +5,9 @@ | |||
5 | * Cpumasks provide a bitmap suitable for representing the | 5 | * Cpumasks provide a bitmap suitable for representing the |
6 | * set of CPU's in a system, one bit position per CPU number. | 6 | * set of CPU's in a system, one bit position per CPU number. |
7 | * | 7 | * |
8 | * The new cpumask_ ops take a "struct cpumask *"; the old ones | ||
9 | * use cpumask_t. | ||
10 | * | ||
8 | * See detailed comments in the file linux/bitmap.h describing the | 11 | * See detailed comments in the file linux/bitmap.h describing the |
9 | * data type on which these cpumasks are based. | 12 | * data type on which these cpumasks are based. |
10 | * | 13 | * |
@@ -31,7 +34,7 @@ | |||
31 | * will span the entire range of NR_CPUS. | 34 | * will span the entire range of NR_CPUS. |
32 | * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | 35 | * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
33 | * | 36 | * |
34 | * The available cpumask operations are: | 37 | * The obsolescent cpumask operations are: |
35 | * | 38 | * |
36 | * void cpu_set(cpu, mask) turn on bit 'cpu' in mask | 39 | * void cpu_set(cpu, mask) turn on bit 'cpu' in mask |
37 | * void cpu_clear(cpu, mask) turn off bit 'cpu' in mask | 40 | * void cpu_clear(cpu, mask) turn off bit 'cpu' in mask |
@@ -138,7 +141,7 @@ | |||
138 | #include <linux/threads.h> | 141 | #include <linux/threads.h> |
139 | #include <linux/bitmap.h> | 142 | #include <linux/bitmap.h> |
140 | 143 | ||
141 | typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; | 144 | typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; |
142 | extern cpumask_t _unused_cpumask_arg_; | 145 | extern cpumask_t _unused_cpumask_arg_; |
143 | 146 | ||
144 | #define cpu_set(cpu, dst) __cpu_set((cpu), &(dst)) | 147 | #define cpu_set(cpu, dst) __cpu_set((cpu), &(dst)) |
@@ -527,4 +530,556 @@ extern cpumask_t cpu_active_map; | |||
527 | #define for_each_online_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_online_map) | 530 | #define for_each_online_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_online_map) |
528 | #define for_each_present_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_present_map) | 531 | #define for_each_present_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_present_map) |
529 | 532 | ||
533 | /* These are the new versions of the cpumask operators: passed by pointer. | ||
534 | * The older versions will be implemented in terms of these, then deleted. */ | ||
535 | #define cpumask_bits(maskp) ((maskp)->bits) | ||
536 | |||
537 | #if NR_CPUS <= BITS_PER_LONG | ||
538 | #define CPU_BITS_ALL \ | ||
539 | { \ | ||
540 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
541 | } | ||
542 | |||
543 | /* This produces more efficient code. */ | ||
544 | #define nr_cpumask_bits NR_CPUS | ||
545 | |||
546 | #else /* NR_CPUS > BITS_PER_LONG */ | ||
547 | |||
548 | #define CPU_BITS_ALL \ | ||
549 | { \ | ||
550 | [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ | ||
551 | [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ | ||
552 | } | ||
553 | |||
554 | #define nr_cpumask_bits nr_cpu_ids | ||
555 | #endif /* NR_CPUS > BITS_PER_LONG */ | ||
556 | |||
557 | /* verify cpu argument to cpumask_* operators */ | ||
558 | static inline unsigned int cpumask_check(unsigned int cpu) | ||
559 | { | ||
560 | #ifdef CONFIG_DEBUG_PER_CPU_MAPS | ||
561 | WARN_ON_ONCE(cpu >= nr_cpumask_bits); | ||
562 | #endif /* CONFIG_DEBUG_PER_CPU_MAPS */ | ||
563 | return cpu; | ||
564 | } | ||
565 | |||
566 | #if NR_CPUS == 1 | ||
567 | /* Uniprocessor. Assume all masks are "1". */ | ||
568 | static inline unsigned int cpumask_first(const struct cpumask *srcp) | ||
569 | { | ||
570 | return 0; | ||
571 | } | ||
572 | |||
573 | /* Valid inputs for n are -1 and 0. */ | ||
574 | static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) | ||
575 | { | ||
576 | return n+1; | ||
577 | } | ||
578 | |||
579 | static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) | ||
580 | { | ||
581 | return n+1; | ||
582 | } | ||
583 | |||
584 | static inline unsigned int cpumask_next_and(int n, | ||
585 | const struct cpumask *srcp, | ||
586 | const struct cpumask *andp) | ||
587 | { | ||
588 | return n+1; | ||
589 | } | ||
590 | |||
591 | /* cpu must be a valid cpu, ie 0, so there's no other choice. */ | ||
592 | static inline unsigned int cpumask_any_but(const struct cpumask *mask, | ||
593 | unsigned int cpu) | ||
594 | { | ||
595 | return 1; | ||
596 | } | ||
597 | |||
598 | #define for_each_cpu(cpu, mask) \ | ||
599 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) | ||
600 | #define for_each_cpu_and(cpu, mask, and) \ | ||
601 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and) | ||
602 | #else | ||
603 | /** | ||
604 | * cpumask_first - get the first cpu in a cpumask | ||
605 | * @srcp: the cpumask pointer | ||
606 | * | ||
607 | * Returns >= nr_cpu_ids if no cpus set. | ||
608 | */ | ||
609 | static inline unsigned int cpumask_first(const struct cpumask *srcp) | ||
610 | { | ||
611 | return find_first_bit(cpumask_bits(srcp), nr_cpumask_bits); | ||
612 | } | ||
613 | |||
614 | /** | ||
615 | * cpumask_next - get the next cpu in a cpumask | ||
616 | * @n: the cpu prior to the place to search (ie. return will be > @n) | ||
617 | * @srcp: the cpumask pointer | ||
618 | * | ||
619 | * Returns >= nr_cpu_ids if no further cpus set. | ||
620 | */ | ||
621 | static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) | ||
622 | { | ||
623 | /* -1 is a legal arg here. */ | ||
624 | if (n != -1) | ||
625 | cpumask_check(n); | ||
626 | return find_next_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1); | ||
627 | } | ||
628 | |||
629 | /** | ||
630 | * cpumask_next_zero - get the next unset cpu in a cpumask | ||
631 | * @n: the cpu prior to the place to search (ie. return will be > @n) | ||
632 | * @srcp: the cpumask pointer | ||
633 | * | ||
634 | * Returns >= nr_cpu_ids if no further cpus unset. | ||
635 | */ | ||
636 | static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) | ||
637 | { | ||
638 | /* -1 is a legal arg here. */ | ||
639 | if (n != -1) | ||
640 | cpumask_check(n); | ||
641 | return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1); | ||
642 | } | ||
643 | |||
644 | int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *); | ||
645 | int cpumask_any_but(const struct cpumask *mask, unsigned int cpu); | ||
646 | |||
647 | /** | ||
648 | * for_each_cpu - iterate over every cpu in a mask | ||
649 | * @cpu: the (optionally unsigned) integer iterator | ||
650 | * @mask: the cpumask pointer | ||
651 | * | ||
652 | * After the loop, cpu is >= nr_cpu_ids. | ||
653 | */ | ||
654 | #define for_each_cpu(cpu, mask) \ | ||
655 | for ((cpu) = -1; \ | ||
656 | (cpu) = cpumask_next((cpu), (mask)), \ | ||
657 | (cpu) < nr_cpu_ids;) | ||
658 | |||
659 | /** | ||
660 | * for_each_cpu_and - iterate over every cpu in both masks | ||
661 | * @cpu: the (optionally unsigned) integer iterator | ||
662 | * @mask: the first cpumask pointer | ||
663 | * @and: the second cpumask pointer | ||
664 | * | ||
665 | * This saves a temporary CPU mask in many places. It is equivalent to: | ||
666 | * struct cpumask tmp; | ||
667 | * cpumask_and(&tmp, &mask, &and); | ||
668 | * for_each_cpu(cpu, &tmp) | ||
669 | * ... | ||
670 | * | ||
671 | * After the loop, cpu is >= nr_cpu_ids. | ||
672 | */ | ||
673 | #define for_each_cpu_and(cpu, mask, and) \ | ||
674 | for ((cpu) = -1; \ | ||
675 | (cpu) = cpumask_next_and((cpu), (mask), (and)), \ | ||
676 | (cpu) < nr_cpu_ids;) | ||
677 | #endif /* SMP */ | ||
678 | |||
679 | #define CPU_BITS_NONE \ | ||
680 | { \ | ||
681 | [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \ | ||
682 | } | ||
683 | |||
684 | #define CPU_BITS_CPU0 \ | ||
685 | { \ | ||
686 | [0] = 1UL \ | ||
687 | } | ||
688 | |||
689 | /** | ||
690 | * cpumask_set_cpu - set a cpu in a cpumask | ||
691 | * @cpu: cpu number (< nr_cpu_ids) | ||
692 | * @dstp: the cpumask pointer | ||
693 | */ | ||
694 | static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) | ||
695 | { | ||
696 | set_bit(cpumask_check(cpu), cpumask_bits(dstp)); | ||
697 | } | ||
698 | |||
699 | /** | ||
700 | * cpumask_clear_cpu - clear a cpu in a cpumask | ||
701 | * @cpu: cpu number (< nr_cpu_ids) | ||
702 | * @dstp: the cpumask pointer | ||
703 | */ | ||
704 | static inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp) | ||
705 | { | ||
706 | clear_bit(cpumask_check(cpu), cpumask_bits(dstp)); | ||
707 | } | ||
708 | |||
709 | /** | ||
710 | * cpumask_test_cpu - test for a cpu in a cpumask | ||
711 | * @cpu: cpu number (< nr_cpu_ids) | ||
712 | * @cpumask: the cpumask pointer | ||
713 | * | ||
714 | * No static inline type checking - see Subtlety (1) above. | ||
715 | */ | ||
716 | #define cpumask_test_cpu(cpu, cpumask) \ | ||
717 | test_bit(cpumask_check(cpu), (cpumask)->bits) | ||
718 | |||
719 | /** | ||
720 | * cpumask_test_and_set_cpu - atomically test and set a cpu in a cpumask | ||
721 | * @cpu: cpu number (< nr_cpu_ids) | ||
722 | * @cpumask: the cpumask pointer | ||
723 | * | ||
724 | * test_and_set_bit wrapper for cpumasks. | ||
725 | */ | ||
726 | static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) | ||
727 | { | ||
728 | return test_and_set_bit(cpumask_check(cpu), cpumask_bits(cpumask)); | ||
729 | } | ||
730 | |||
731 | /** | ||
732 | * cpumask_setall - set all cpus (< nr_cpu_ids) in a cpumask | ||
733 | * @dstp: the cpumask pointer | ||
734 | */ | ||
735 | static inline void cpumask_setall(struct cpumask *dstp) | ||
736 | { | ||
737 | bitmap_fill(cpumask_bits(dstp), nr_cpumask_bits); | ||
738 | } | ||
739 | |||
740 | /** | ||
741 | * cpumask_clear - clear all cpus (< nr_cpu_ids) in a cpumask | ||
742 | * @dstp: the cpumask pointer | ||
743 | */ | ||
744 | static inline void cpumask_clear(struct cpumask *dstp) | ||
745 | { | ||
746 | bitmap_zero(cpumask_bits(dstp), nr_cpumask_bits); | ||
747 | } | ||
748 | |||
749 | /** | ||
750 | * cpumask_and - *dstp = *src1p & *src2p | ||
751 | * @dstp: the cpumask result | ||
752 | * @src1p: the first input | ||
753 | * @src2p: the second input | ||
754 | */ | ||
755 | static inline void cpumask_and(struct cpumask *dstp, | ||
756 | const struct cpumask *src1p, | ||
757 | const struct cpumask *src2p) | ||
758 | { | ||
759 | bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), | ||
760 | cpumask_bits(src2p), nr_cpumask_bits); | ||
761 | } | ||
762 | |||
763 | /** | ||
764 | * cpumask_or - *dstp = *src1p | *src2p | ||
765 | * @dstp: the cpumask result | ||
766 | * @src1p: the first input | ||
767 | * @src2p: the second input | ||
768 | */ | ||
769 | static inline void cpumask_or(struct cpumask *dstp, const struct cpumask *src1p, | ||
770 | const struct cpumask *src2p) | ||
771 | { | ||
772 | bitmap_or(cpumask_bits(dstp), cpumask_bits(src1p), | ||
773 | cpumask_bits(src2p), nr_cpumask_bits); | ||
774 | } | ||
775 | |||
776 | /** | ||
777 | * cpumask_xor - *dstp = *src1p ^ *src2p | ||
778 | * @dstp: the cpumask result | ||
779 | * @src1p: the first input | ||
780 | * @src2p: the second input | ||
781 | */ | ||
782 | static inline void cpumask_xor(struct cpumask *dstp, | ||
783 | const struct cpumask *src1p, | ||
784 | const struct cpumask *src2p) | ||
785 | { | ||
786 | bitmap_xor(cpumask_bits(dstp), cpumask_bits(src1p), | ||
787 | cpumask_bits(src2p), nr_cpumask_bits); | ||
788 | } | ||
789 | |||
790 | /** | ||
791 | * cpumask_andnot - *dstp = *src1p & ~*src2p | ||
792 | * @dstp: the cpumask result | ||
793 | * @src1p: the first input | ||
794 | * @src2p: the second input | ||
795 | */ | ||
796 | static inline void cpumask_andnot(struct cpumask *dstp, | ||
797 | const struct cpumask *src1p, | ||
798 | const struct cpumask *src2p) | ||
799 | { | ||
800 | bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), | ||
801 | cpumask_bits(src2p), nr_cpumask_bits); | ||
802 | } | ||
803 | |||
804 | /** | ||
805 | * cpumask_complement - *dstp = ~*srcp | ||
806 | * @dstp: the cpumask result | ||
807 | * @srcp: the input to invert | ||
808 | */ | ||
809 | static inline void cpumask_complement(struct cpumask *dstp, | ||
810 | const struct cpumask *srcp) | ||
811 | { | ||
812 | bitmap_complement(cpumask_bits(dstp), cpumask_bits(srcp), | ||
813 | nr_cpumask_bits); | ||
814 | } | ||
815 | |||
816 | /** | ||
817 | * cpumask_equal - *src1p == *src2p | ||
818 | * @src1p: the first input | ||
819 | * @src2p: the second input | ||
820 | */ | ||
821 | static inline bool cpumask_equal(const struct cpumask *src1p, | ||
822 | const struct cpumask *src2p) | ||
823 | { | ||
824 | return bitmap_equal(cpumask_bits(src1p), cpumask_bits(src2p), | ||
825 | nr_cpumask_bits); | ||
826 | } | ||
827 | |||
828 | /** | ||
829 | * cpumask_intersects - (*src1p & *src2p) != 0 | ||
830 | * @src1p: the first input | ||
831 | * @src2p: the second input | ||
832 | */ | ||
833 | static inline bool cpumask_intersects(const struct cpumask *src1p, | ||
834 | const struct cpumask *src2p) | ||
835 | { | ||
836 | return bitmap_intersects(cpumask_bits(src1p), cpumask_bits(src2p), | ||
837 | nr_cpumask_bits); | ||
838 | } | ||
839 | |||
840 | /** | ||
841 | * cpumask_subset - (*src1p & ~*src2p) == 0 | ||
842 | * @src1p: the first input | ||
843 | * @src2p: the second input | ||
844 | */ | ||
845 | static inline int cpumask_subset(const struct cpumask *src1p, | ||
846 | const struct cpumask *src2p) | ||
847 | { | ||
848 | return bitmap_subset(cpumask_bits(src1p), cpumask_bits(src2p), | ||
849 | nr_cpumask_bits); | ||
850 | } | ||
851 | |||
852 | /** | ||
853 | * cpumask_empty - *srcp == 0 | ||
854 | * @srcp: the cpumask to that all cpus < nr_cpu_ids are clear. | ||
855 | */ | ||
856 | static inline bool cpumask_empty(const struct cpumask *srcp) | ||
857 | { | ||
858 | return bitmap_empty(cpumask_bits(srcp), nr_cpumask_bits); | ||
859 | } | ||
860 | |||
861 | /** | ||
862 | * cpumask_full - *srcp == 0xFFFFFFFF... | ||
863 | * @srcp: the cpumask to that all cpus < nr_cpu_ids are set. | ||
864 | */ | ||
865 | static inline bool cpumask_full(const struct cpumask *srcp) | ||
866 | { | ||
867 | return bitmap_full(cpumask_bits(srcp), nr_cpumask_bits); | ||
868 | } | ||
869 | |||
870 | /** | ||
871 | * cpumask_weight - Count of bits in *srcp | ||
872 | * @srcp: the cpumask to count bits (< nr_cpu_ids) in. | ||
873 | */ | ||
874 | static inline unsigned int cpumask_weight(const struct cpumask *srcp) | ||
875 | { | ||
876 | return bitmap_weight(cpumask_bits(srcp), nr_cpumask_bits); | ||
877 | } | ||
878 | |||
879 | /** | ||
880 | * cpumask_shift_right - *dstp = *srcp >> n | ||
881 | * @dstp: the cpumask result | ||
882 | * @srcp: the input to shift | ||
883 | * @n: the number of bits to shift by | ||
884 | */ | ||
885 | static inline void cpumask_shift_right(struct cpumask *dstp, | ||
886 | const struct cpumask *srcp, int n) | ||
887 | { | ||
888 | bitmap_shift_right(cpumask_bits(dstp), cpumask_bits(srcp), n, | ||
889 | nr_cpumask_bits); | ||
890 | } | ||
891 | |||
892 | /** | ||
893 | * cpumask_shift_left - *dstp = *srcp << n | ||
894 | * @dstp: the cpumask result | ||
895 | * @srcp: the input to shift | ||
896 | * @n: the number of bits to shift by | ||
897 | */ | ||
898 | static inline void cpumask_shift_left(struct cpumask *dstp, | ||
899 | const struct cpumask *srcp, int n) | ||
900 | { | ||
901 | bitmap_shift_left(cpumask_bits(dstp), cpumask_bits(srcp), n, | ||
902 | nr_cpumask_bits); | ||
903 | } | ||
904 | |||
905 | /** | ||
906 | * cpumask_copy - *dstp = *srcp | ||
907 | * @dstp: the result | ||
908 | * @srcp: the input cpumask | ||
909 | */ | ||
910 | static inline void cpumask_copy(struct cpumask *dstp, | ||
911 | const struct cpumask *srcp) | ||
912 | { | ||
913 | bitmap_copy(cpumask_bits(dstp), cpumask_bits(srcp), nr_cpumask_bits); | ||
914 | } | ||
915 | |||
916 | /** | ||
917 | * cpumask_any - pick a "random" cpu from *srcp | ||
918 | * @srcp: the input cpumask | ||
919 | * | ||
920 | * Returns >= nr_cpu_ids if no cpus set. | ||
921 | */ | ||
922 | #define cpumask_any(srcp) cpumask_first(srcp) | ||
923 | |||
924 | /** | ||
925 | * cpumask_first_and - return the first cpu from *srcp1 & *srcp2 | ||
926 | * @src1p: the first input | ||
927 | * @src2p: the second input | ||
928 | * | ||
929 | * Returns >= nr_cpu_ids if no cpus set in both. See also cpumask_next_and(). | ||
930 | */ | ||
931 | #define cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p)) | ||
932 | |||
933 | /** | ||
934 | * cpumask_any_and - pick a "random" cpu from *mask1 & *mask2 | ||
935 | * @mask1: the first input cpumask | ||
936 | * @mask2: the second input cpumask | ||
937 | * | ||
938 | * Returns >= nr_cpu_ids if no cpus set. | ||
939 | */ | ||
940 | #define cpumask_any_and(mask1, mask2) cpumask_first_and((mask1), (mask2)) | ||
941 | |||
942 | /** | ||
943 | * cpumask_of - the cpumask containing just a given cpu | ||
944 | * @cpu: the cpu (<= nr_cpu_ids) | ||
945 | */ | ||
946 | #define cpumask_of(cpu) (get_cpu_mask(cpu)) | ||
947 | |||
948 | /** | ||
949 | * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask * | ||
950 | * @bitmap: the bitmap | ||
951 | * | ||
952 | * There are a few places where cpumask_var_t isn't appropriate and | ||
953 | * static cpumasks must be used (eg. very early boot), yet we don't | ||
954 | * expose the definition of 'struct cpumask'. | ||
955 | * | ||
956 | * This does the conversion, and can be used as a constant initializer. | ||
957 | */ | ||
958 | #define to_cpumask(bitmap) \ | ||
959 | ((struct cpumask *)(1 ? (bitmap) \ | ||
960 | : (void *)sizeof(__check_is_bitmap(bitmap)))) | ||
961 | |||
962 | static inline int __check_is_bitmap(const unsigned long *bitmap) | ||
963 | { | ||
964 | return 1; | ||
965 | } | ||
966 | |||
967 | /** | ||
968 | * cpumask_size - size to allocate for a 'struct cpumask' in bytes | ||
969 | * | ||
970 | * This will eventually be a runtime variable, depending on nr_cpu_ids. | ||
971 | */ | ||
972 | static inline size_t cpumask_size(void) | ||
973 | { | ||
974 | /* FIXME: Once all cpumask assignments are eliminated, this | ||
975 | * can be nr_cpumask_bits */ | ||
976 | return BITS_TO_LONGS(NR_CPUS) * sizeof(long); | ||
977 | } | ||
978 | |||
979 | /* | ||
980 | * cpumask_var_t: struct cpumask for stack usage. | ||
981 | * | ||
982 | * Oh, the wicked games we play! In order to make kernel coding a | ||
983 | * little more difficult, we typedef cpumask_var_t to an array or a | ||
984 | * pointer: doing &mask on an array is a noop, so it still works. | ||
985 | * | ||
986 | * ie. | ||
987 | * cpumask_var_t tmpmask; | ||
988 | * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL)) | ||
989 | * return -ENOMEM; | ||
990 | * | ||
991 | * ... use 'tmpmask' like a normal struct cpumask * ... | ||
992 | * | ||
993 | * free_cpumask_var(tmpmask); | ||
994 | */ | ||
995 | #ifdef CONFIG_CPUMASK_OFFSTACK | ||
996 | typedef struct cpumask *cpumask_var_t; | ||
997 | |||
998 | bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags); | ||
999 | void alloc_bootmem_cpumask_var(cpumask_var_t *mask); | ||
1000 | void free_cpumask_var(cpumask_var_t mask); | ||
1001 | void free_bootmem_cpumask_var(cpumask_var_t mask); | ||
1002 | |||
1003 | #else | ||
1004 | typedef struct cpumask cpumask_var_t[1]; | ||
1005 | |||
1006 | static inline bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) | ||
1007 | { | ||
1008 | return true; | ||
1009 | } | ||
1010 | |||
1011 | static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask) | ||
1012 | { | ||
1013 | } | ||
1014 | |||
1015 | static inline void free_cpumask_var(cpumask_var_t mask) | ||
1016 | { | ||
1017 | } | ||
1018 | |||
1019 | static inline void free_bootmem_cpumask_var(cpumask_var_t mask) | ||
1020 | { | ||
1021 | } | ||
1022 | #endif /* CONFIG_CPUMASK_OFFSTACK */ | ||
1023 | |||
1024 | /* The pointer versions of the maps, these will become the primary versions. */ | ||
1025 | #define cpu_possible_mask ((const struct cpumask *)&cpu_possible_map) | ||
1026 | #define cpu_online_mask ((const struct cpumask *)&cpu_online_map) | ||
1027 | #define cpu_present_mask ((const struct cpumask *)&cpu_present_map) | ||
1028 | #define cpu_active_mask ((const struct cpumask *)&cpu_active_map) | ||
1029 | |||
1030 | /* It's common to want to use cpu_all_mask in struct member initializers, | ||
1031 | * so it has to refer to an address rather than a pointer. */ | ||
1032 | extern const DECLARE_BITMAP(cpu_all_bits, NR_CPUS); | ||
1033 | #define cpu_all_mask to_cpumask(cpu_all_bits) | ||
1034 | |||
1035 | /* First bits of cpu_bit_bitmap are in fact unset. */ | ||
1036 | #define cpu_none_mask to_cpumask(cpu_bit_bitmap[0]) | ||
1037 | |||
1038 | /* Wrappers for arch boot code to manipulate normally-constant masks */ | ||
1039 | static inline void set_cpu_possible(unsigned int cpu, bool possible) | ||
1040 | { | ||
1041 | if (possible) | ||
1042 | cpumask_set_cpu(cpu, &cpu_possible_map); | ||
1043 | else | ||
1044 | cpumask_clear_cpu(cpu, &cpu_possible_map); | ||
1045 | } | ||
1046 | |||
1047 | static inline void set_cpu_present(unsigned int cpu, bool present) | ||
1048 | { | ||
1049 | if (present) | ||
1050 | cpumask_set_cpu(cpu, &cpu_present_map); | ||
1051 | else | ||
1052 | cpumask_clear_cpu(cpu, &cpu_present_map); | ||
1053 | } | ||
1054 | |||
1055 | static inline void set_cpu_online(unsigned int cpu, bool online) | ||
1056 | { | ||
1057 | if (online) | ||
1058 | cpumask_set_cpu(cpu, &cpu_online_map); | ||
1059 | else | ||
1060 | cpumask_clear_cpu(cpu, &cpu_online_map); | ||
1061 | } | ||
1062 | |||
1063 | static inline void set_cpu_active(unsigned int cpu, bool active) | ||
1064 | { | ||
1065 | if (active) | ||
1066 | cpumask_set_cpu(cpu, &cpu_active_map); | ||
1067 | else | ||
1068 | cpumask_clear_cpu(cpu, &cpu_active_map); | ||
1069 | } | ||
1070 | |||
1071 | static inline void init_cpu_present(const struct cpumask *src) | ||
1072 | { | ||
1073 | cpumask_copy(&cpu_present_map, src); | ||
1074 | } | ||
1075 | |||
1076 | static inline void init_cpu_possible(const struct cpumask *src) | ||
1077 | { | ||
1078 | cpumask_copy(&cpu_possible_map, src); | ||
1079 | } | ||
1080 | |||
1081 | static inline void init_cpu_online(const struct cpumask *src) | ||
1082 | { | ||
1083 | cpumask_copy(&cpu_online_map, src); | ||
1084 | } | ||
530 | #endif /* __LINUX_CPUMASK_H */ | 1085 | #endif /* __LINUX_CPUMASK_H */ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 2691926fb506..8e540d32c9fe 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -74,8 +74,6 @@ static inline int cpuset_do_slab_mem_spread(void) | |||
74 | return current->flags & PF_SPREAD_SLAB; | 74 | return current->flags & PF_SPREAD_SLAB; |
75 | } | 75 | } |
76 | 76 | ||
77 | extern void cpuset_track_online_nodes(void); | ||
78 | |||
79 | extern int current_cpuset_is_being_rebound(void); | 77 | extern int current_cpuset_is_being_rebound(void); |
80 | 78 | ||
81 | extern void rebuild_sched_domains(void); | 79 | extern void rebuild_sched_domains(void); |
@@ -151,8 +149,6 @@ static inline int cpuset_do_slab_mem_spread(void) | |||
151 | return 0; | 149 | return 0; |
152 | } | 150 | } |
153 | 151 | ||
154 | static inline void cpuset_track_online_nodes(void) {} | ||
155 | |||
156 | static inline int current_cpuset_is_being_rebound(void) | 152 | static inline int current_cpuset_is_being_rebound(void) |
157 | { | 153 | { |
158 | return 0; | 154 | return 0; |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 8f225339eee9..5a361f85cfec 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -44,11 +44,6 @@ static inline bool should_send_signal(struct task_struct *p) | |||
44 | return !(p->flags & PF_FREEZER_NOSIG); | 44 | return !(p->flags & PF_FREEZER_NOSIG); |
45 | } | 45 | } |
46 | 46 | ||
47 | /* | ||
48 | * Wake up a frozen process | ||
49 | */ | ||
50 | extern int __thaw_process(struct task_struct *p); | ||
51 | |||
52 | /* Takes and releases task alloc lock using task_lock() */ | 47 | /* Takes and releases task alloc lock using task_lock() */ |
53 | extern int thaw_process(struct task_struct *p); | 48 | extern int thaw_process(struct task_struct *p); |
54 | 49 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5b248d61430c..4a853ef6fd35 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -63,23 +63,24 @@ extern int dir_notify_enable; | |||
63 | #define MAY_ACCESS 16 | 63 | #define MAY_ACCESS 16 |
64 | #define MAY_OPEN 32 | 64 | #define MAY_OPEN 32 |
65 | 65 | ||
66 | #define FMODE_READ ((__force fmode_t)1) | 66 | /* file is open for reading */ |
67 | #define FMODE_WRITE ((__force fmode_t)2) | 67 | #define FMODE_READ ((__force fmode_t)1) |
68 | 68 | /* file is open for writing */ | |
69 | /* Internal kernel extensions */ | 69 | #define FMODE_WRITE ((__force fmode_t)2) |
70 | #define FMODE_LSEEK ((__force fmode_t)4) | 70 | /* file is seekable */ |
71 | #define FMODE_PREAD ((__force fmode_t)8) | 71 | #define FMODE_LSEEK ((__force fmode_t)4) |
72 | #define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ | 72 | /* file can be accessed using pread/pwrite */ |
73 | 73 | #define FMODE_PREAD ((__force fmode_t)8) | |
74 | /* File is being opened for execution. Primary users of this flag are | 74 | #define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ |
75 | distributed filesystems that can use it to achieve correct ETXTBUSY | 75 | /* File is opened for execution with sys_execve / sys_uselib */ |
76 | behavior for cross-node execution/opening_for_writing of files */ | 76 | #define FMODE_EXEC ((__force fmode_t)16) |
77 | #define FMODE_EXEC ((__force fmode_t)16) | 77 | /* File is opened with O_NDELAY (only set for block devices) */ |
78 | 78 | #define FMODE_NDELAY ((__force fmode_t)32) | |
79 | #define FMODE_NDELAY ((__force fmode_t)32) | 79 | /* File is opened with O_EXCL (only set for block devices) */ |
80 | #define FMODE_EXCL ((__force fmode_t)64) | 80 | #define FMODE_EXCL ((__force fmode_t)64) |
81 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls | ||
82 | (specialy hack for floppy.c) */ | ||
81 | #define FMODE_WRITE_IOCTL ((__force fmode_t)128) | 83 | #define FMODE_WRITE_IOCTL ((__force fmode_t)128) |
82 | #define FMODE_NDELAY_NOW ((__force fmode_t)256) | ||
83 | 84 | ||
84 | #define RW_MASK 1 | 85 | #define RW_MASK 1 |
85 | #define RWA_MASK 2 | 86 | #define RWA_MASK 2 |
@@ -489,13 +490,6 @@ struct address_space_operations { | |||
489 | int (*readpages)(struct file *filp, struct address_space *mapping, | 490 | int (*readpages)(struct file *filp, struct address_space *mapping, |
490 | struct list_head *pages, unsigned nr_pages); | 491 | struct list_head *pages, unsigned nr_pages); |
491 | 492 | ||
492 | /* | ||
493 | * ext3 requires that a successful prepare_write() call be followed | ||
494 | * by a commit_write() call - they must be balanced | ||
495 | */ | ||
496 | int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); | ||
497 | int (*commit_write)(struct file *, struct page *, unsigned, unsigned); | ||
498 | |||
499 | int (*write_begin)(struct file *, struct address_space *mapping, | 493 | int (*write_begin)(struct file *, struct address_space *mapping, |
500 | loff_t pos, unsigned len, unsigned flags, | 494 | loff_t pos, unsigned len, unsigned flags, |
501 | struct page **pagep, void **fsdata); | 495 | struct page **pagep, void **fsdata); |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 4e625e0094c8..708bab58d8d0 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -49,7 +49,8 @@ struct gianfar_platform_data { | |||
49 | u32 device_flags; | 49 | u32 device_flags; |
50 | /* board specific information */ | 50 | /* board specific information */ |
51 | u32 board_flags; | 51 | u32 board_flags; |
52 | char bus_id[MII_BUS_ID_SIZE]; | 52 | int mdio_bus; /* Bus controlled by us */ |
53 | char bus_id[MII_BUS_ID_SIZE]; /* Bus PHY is on */ | ||
53 | u32 phy_id; | 54 | u32 phy_id; |
54 | u8 mac_addr[6]; | 55 | u8 mac_addr[6]; |
55 | phy_interface_t interface; | 56 | phy_interface_t interface; |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index a3d46151be19..9c5bc6be2b09 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -6,9 +6,10 @@ | |||
6 | #include <linux/ktime.h> | 6 | #include <linux/ktime.h> |
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/module.h> | ||
9 | #include <linux/kallsyms.h> | 10 | #include <linux/kallsyms.h> |
10 | 11 | ||
11 | #ifdef CONFIG_FTRACE | 12 | #ifdef CONFIG_FUNCTION_TRACER |
12 | 13 | ||
13 | extern int ftrace_enabled; | 14 | extern int ftrace_enabled; |
14 | extern int | 15 | extern int |
@@ -36,16 +37,14 @@ void clear_ftrace_function(void); | |||
36 | 37 | ||
37 | extern void ftrace_stub(unsigned long a0, unsigned long a1); | 38 | extern void ftrace_stub(unsigned long a0, unsigned long a1); |
38 | 39 | ||
39 | #else /* !CONFIG_FTRACE */ | 40 | #else /* !CONFIG_FUNCTION_TRACER */ |
40 | # define register_ftrace_function(ops) do { } while (0) | 41 | # define register_ftrace_function(ops) do { } while (0) |
41 | # define unregister_ftrace_function(ops) do { } while (0) | 42 | # define unregister_ftrace_function(ops) do { } while (0) |
42 | # define clear_ftrace_function(ops) do { } while (0) | 43 | # define clear_ftrace_function(ops) do { } while (0) |
43 | static inline void ftrace_kill_atomic(void) { } | 44 | static inline void ftrace_kill(void) { } |
44 | #endif /* CONFIG_FTRACE */ | 45 | #endif /* CONFIG_FUNCTION_TRACER */ |
45 | 46 | ||
46 | #ifdef CONFIG_DYNAMIC_FTRACE | 47 | #ifdef CONFIG_DYNAMIC_FTRACE |
47 | # define FTRACE_HASHBITS 10 | ||
48 | # define FTRACE_HASHSIZE (1<<FTRACE_HASHBITS) | ||
49 | 48 | ||
50 | enum { | 49 | enum { |
51 | FTRACE_FL_FREE = (1 << 0), | 50 | FTRACE_FL_FREE = (1 << 0), |
@@ -58,9 +57,9 @@ enum { | |||
58 | }; | 57 | }; |
59 | 58 | ||
60 | struct dyn_ftrace { | 59 | struct dyn_ftrace { |
61 | struct hlist_node node; | 60 | struct list_head list; |
62 | unsigned long ip; /* address of mcount call-site */ | 61 | unsigned long ip; /* address of mcount call-site */ |
63 | unsigned long flags; | 62 | unsigned long flags; |
64 | }; | 63 | }; |
65 | 64 | ||
66 | int ftrace_force_update(void); | 65 | int ftrace_force_update(void); |
@@ -71,14 +70,33 @@ extern int ftrace_ip_converted(unsigned long ip); | |||
71 | extern unsigned char *ftrace_nop_replace(void); | 70 | extern unsigned char *ftrace_nop_replace(void); |
72 | extern unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr); | 71 | extern unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr); |
73 | extern int ftrace_dyn_arch_init(void *data); | 72 | extern int ftrace_dyn_arch_init(void *data); |
74 | extern int ftrace_mcount_set(unsigned long *data); | ||
75 | extern int ftrace_modify_code(unsigned long ip, unsigned char *old_code, | ||
76 | unsigned char *new_code); | ||
77 | extern int ftrace_update_ftrace_func(ftrace_func_t func); | 73 | extern int ftrace_update_ftrace_func(ftrace_func_t func); |
78 | extern void ftrace_caller(void); | 74 | extern void ftrace_caller(void); |
79 | extern void ftrace_call(void); | 75 | extern void ftrace_call(void); |
80 | extern void mcount_call(void); | 76 | extern void mcount_call(void); |
81 | 77 | ||
78 | /** | ||
79 | * ftrace_modify_code - modify code segment | ||
80 | * @ip: the address of the code segment | ||
81 | * @old_code: the contents of what is expected to be there | ||
82 | * @new_code: the code to patch in | ||
83 | * | ||
84 | * This is a very sensitive operation and great care needs | ||
85 | * to be taken by the arch. The operation should carefully | ||
86 | * read the location, check to see if what is read is indeed | ||
87 | * what we expect it to be, and then on success of the compare, | ||
88 | * it should write to the location. | ||
89 | * | ||
90 | * Return must be: | ||
91 | * 0 on success | ||
92 | * -EFAULT on error reading the location | ||
93 | * -EINVAL on a failed compare of the contents | ||
94 | * -EPERM on error writing to the location | ||
95 | * Any other value will be considered a failure. | ||
96 | */ | ||
97 | extern int ftrace_modify_code(unsigned long ip, unsigned char *old_code, | ||
98 | unsigned char *new_code); | ||
99 | |||
82 | extern int skip_trace(unsigned long ip); | 100 | extern int skip_trace(unsigned long ip); |
83 | 101 | ||
84 | extern void ftrace_release(void *start, unsigned long size); | 102 | extern void ftrace_release(void *start, unsigned long size); |
@@ -97,11 +115,10 @@ static inline void ftrace_release(void *start, unsigned long size) { } | |||
97 | 115 | ||
98 | /* totally disable ftrace - can not re-enable after this */ | 116 | /* totally disable ftrace - can not re-enable after this */ |
99 | void ftrace_kill(void); | 117 | void ftrace_kill(void); |
100 | void ftrace_kill_atomic(void); | ||
101 | 118 | ||
102 | static inline void tracer_disable(void) | 119 | static inline void tracer_disable(void) |
103 | { | 120 | { |
104 | #ifdef CONFIG_FTRACE | 121 | #ifdef CONFIG_FUNCTION_TRACER |
105 | ftrace_enabled = 0; | 122 | ftrace_enabled = 0; |
106 | #endif | 123 | #endif |
107 | } | 124 | } |
@@ -113,7 +130,7 @@ static inline void tracer_disable(void) | |||
113 | */ | 130 | */ |
114 | static inline int __ftrace_enabled_save(void) | 131 | static inline int __ftrace_enabled_save(void) |
115 | { | 132 | { |
116 | #ifdef CONFIG_FTRACE | 133 | #ifdef CONFIG_FUNCTION_TRACER |
117 | int saved_ftrace_enabled = ftrace_enabled; | 134 | int saved_ftrace_enabled = ftrace_enabled; |
118 | ftrace_enabled = 0; | 135 | ftrace_enabled = 0; |
119 | return saved_ftrace_enabled; | 136 | return saved_ftrace_enabled; |
@@ -124,7 +141,7 @@ static inline int __ftrace_enabled_save(void) | |||
124 | 141 | ||
125 | static inline void __ftrace_enabled_restore(int enabled) | 142 | static inline void __ftrace_enabled_restore(int enabled) |
126 | { | 143 | { |
127 | #ifdef CONFIG_FTRACE | 144 | #ifdef CONFIG_FUNCTION_TRACER |
128 | ftrace_enabled = enabled; | 145 | ftrace_enabled = enabled; |
129 | #endif | 146 | #endif |
130 | } | 147 | } |
@@ -215,7 +232,7 @@ ftrace_init_module(unsigned long *start, unsigned long *end) { } | |||
215 | 232 | ||
216 | struct boot_trace { | 233 | struct boot_trace { |
217 | pid_t caller; | 234 | pid_t caller; |
218 | char func[KSYM_NAME_LEN]; | 235 | char func[KSYM_SYMBOL_LEN]; |
219 | int result; | 236 | int result; |
220 | unsigned long long duration; /* usecs */ | 237 | unsigned long long duration; /* usecs */ |
221 | ktime_t calltime; | 238 | ktime_t calltime; |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index e439e6aed832..3df7742ce246 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -522,7 +522,9 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf); | |||
522 | 522 | ||
523 | extern int disk_expand_part_tbl(struct gendisk *disk, int target); | 523 | extern int disk_expand_part_tbl(struct gendisk *disk, int target); |
524 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 524 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
525 | extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int); | 525 | extern struct hd_struct * __must_check add_partition(struct gendisk *disk, |
526 | int partno, sector_t start, | ||
527 | sector_t len, int flags); | ||
526 | extern void delete_partition(struct gendisk *, int); | 528 | extern void delete_partition(struct gendisk *, int); |
527 | extern void printk_all_partitions(void); | 529 | extern void printk_all_partitions(void); |
528 | 530 | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index 5355ca4b939e..e5780f8c934a 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -410,6 +410,7 @@ struct hid_output_fifo { | |||
410 | #define HID_SUSPENDED 5 | 410 | #define HID_SUSPENDED 5 |
411 | #define HID_CLEAR_HALT 6 | 411 | #define HID_CLEAR_HALT 6 |
412 | #define HID_DISCONNECTED 7 | 412 | #define HID_DISCONNECTED 7 |
413 | #define HID_STARTED 8 | ||
413 | 414 | ||
414 | struct hid_input { | 415 | struct hid_input { |
415 | struct list_head list; | 416 | struct list_head list; |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 7dcbc82f3b7b..13875ce9112a 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -63,12 +63,14 @@ static inline void *kmap_atomic(struct page *page, enum km_type idx) | |||
63 | #endif /* CONFIG_HIGHMEM */ | 63 | #endif /* CONFIG_HIGHMEM */ |
64 | 64 | ||
65 | /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ | 65 | /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ |
66 | #ifndef clear_user_highpage | ||
66 | static inline void clear_user_highpage(struct page *page, unsigned long vaddr) | 67 | static inline void clear_user_highpage(struct page *page, unsigned long vaddr) |
67 | { | 68 | { |
68 | void *addr = kmap_atomic(page, KM_USER0); | 69 | void *addr = kmap_atomic(page, KM_USER0); |
69 | clear_user_page(addr, vaddr, page); | 70 | clear_user_page(addr, vaddr, page); |
70 | kunmap_atomic(addr, KM_USER0); | 71 | kunmap_atomic(addr, KM_USER0); |
71 | } | 72 | } |
73 | #endif | ||
72 | 74 | ||
73 | #ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE | 75 | #ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE |
74 | /** | 76 | /** |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 2b3645b1acf4..3eba43878dcb 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -46,9 +46,6 @@ enum hrtimer_restart { | |||
46 | * hrtimer callback modes: | 46 | * hrtimer callback modes: |
47 | * | 47 | * |
48 | * HRTIMER_CB_SOFTIRQ: Callback must run in softirq context | 48 | * HRTIMER_CB_SOFTIRQ: Callback must run in softirq context |
49 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context | ||
50 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and | ||
51 | * does not restart the timer | ||
52 | * HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context | 49 | * HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context |
53 | * Special mode for tick emulation and | 50 | * Special mode for tick emulation and |
54 | * scheduler timer. Such timers are per | 51 | * scheduler timer. Such timers are per |
@@ -61,8 +58,6 @@ enum hrtimer_restart { | |||
61 | */ | 58 | */ |
62 | enum hrtimer_cb_mode { | 59 | enum hrtimer_cb_mode { |
63 | HRTIMER_CB_SOFTIRQ, | 60 | HRTIMER_CB_SOFTIRQ, |
64 | HRTIMER_CB_IRQSAFE, | ||
65 | HRTIMER_CB_IRQSAFE_NO_RESTART, | ||
66 | HRTIMER_CB_IRQSAFE_PERCPU, | 61 | HRTIMER_CB_IRQSAFE_PERCPU, |
67 | HRTIMER_CB_IRQSAFE_UNLOCKED, | 62 | HRTIMER_CB_IRQSAFE_UNLOCKED, |
68 | }; | 63 | }; |
@@ -239,7 +234,7 @@ static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time) | |||
239 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); | 234 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); |
240 | } | 235 | } |
241 | 236 | ||
242 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, unsigned long ns) | 237 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns) |
243 | { | 238 | { |
244 | timer->_expires = ktime_add_ns(timer->_expires, ns); | 239 | timer->_expires = ktime_add_ns(timer->_expires, ns); |
245 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); | 240 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 54525be4b5f8..010fb26a1579 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1296,6 +1296,13 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o | |||
1296 | #define ide_pci_register_driver(d) pci_register_driver(d) | 1296 | #define ide_pci_register_driver(d) pci_register_driver(d) |
1297 | #endif | 1297 | #endif |
1298 | 1298 | ||
1299 | static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) | ||
1300 | { | ||
1301 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 5) != 5) | ||
1302 | return 1; | ||
1303 | return 0; | ||
1304 | } | ||
1305 | |||
1299 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, | 1306 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, |
1300 | hw_regs_t *, hw_regs_t **); | 1307 | hw_regs_t *, hw_regs_t **); |
1301 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1308 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
@@ -1375,6 +1382,7 @@ enum { | |||
1375 | IDE_HFLAG_IO_32BIT = (1 << 24), | 1382 | IDE_HFLAG_IO_32BIT = (1 << 24), |
1376 | /* unmask IRQs */ | 1383 | /* unmask IRQs */ |
1377 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), | 1384 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), |
1385 | IDE_HFLAG_BROKEN_ALTSTATUS = (1 << 26), | ||
1378 | /* serialize ports if DMA is possible (for sl82c105) */ | 1386 | /* serialize ports if DMA is possible (for sl82c105) */ |
1379 | IDE_HFLAG_SERIALIZE_DMA = (1 << 27), | 1387 | IDE_HFLAG_SERIALIZE_DMA = (1 << 27), |
1380 | /* force host out of "simplex" mode */ | 1388 | /* force host out of "simplex" mode */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index fa035f96f2a3..dd846df8cd32 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -52,13 +52,14 @@ struct idr_layer { | |||
52 | unsigned long bitmap; /* A zero bit means "space here" */ | 52 | unsigned long bitmap; /* A zero bit means "space here" */ |
53 | struct idr_layer *ary[1<<IDR_BITS]; | 53 | struct idr_layer *ary[1<<IDR_BITS]; |
54 | int count; /* When zero, we can release it */ | 54 | int count; /* When zero, we can release it */ |
55 | int layer; /* distance from leaf */ | ||
55 | struct rcu_head rcu_head; | 56 | struct rcu_head rcu_head; |
56 | }; | 57 | }; |
57 | 58 | ||
58 | struct idr { | 59 | struct idr { |
59 | struct idr_layer *top; | 60 | struct idr_layer *top; |
60 | struct idr_layer *id_free; | 61 | struct idr_layer *id_free; |
61 | int layers; | 62 | int layers; /* only valid without concurrent changes */ |
62 | int id_free_cnt; | 63 | int id_free_cnt; |
63 | spinlock_t lock; | 64 | spinlock_t lock; |
64 | }; | 65 | }; |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 9e7b49b8062d..a5cb0c3f6dcf 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -114,6 +114,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); | |||
114 | 114 | ||
115 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | 115 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, |
116 | u16 vlan_tci, int polling); | 116 | u16 vlan_tci, int polling); |
117 | extern int vlan_hwaccel_do_receive(struct sk_buff *skb); | ||
118 | |||
117 | #else | 119 | #else |
118 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) | 120 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) |
119 | { | 121 | { |
@@ -133,6 +135,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | |||
133 | BUG(); | 135 | BUG(); |
134 | return NET_XMIT_SUCCESS; | 136 | return NET_XMIT_SUCCESS; |
135 | } | 137 | } |
138 | |||
139 | static inline int vlan_hwaccel_do_receive(struct sk_buff *skb) | ||
140 | { | ||
141 | return 0; | ||
142 | } | ||
136 | #endif | 143 | #endif |
137 | 144 | ||
138 | /** | 145 | /** |
diff --git a/include/linux/init.h b/include/linux/init.h index 0c1264668be0..68cb0265d009 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -112,21 +112,25 @@ | |||
112 | #define __FINIT .previous | 112 | #define __FINIT .previous |
113 | 113 | ||
114 | #define __INITDATA .section ".init.data","aw" | 114 | #define __INITDATA .section ".init.data","aw" |
115 | #define __INITRODATA .section ".init.rodata","a" | ||
115 | #define __FINITDATA .previous | 116 | #define __FINITDATA .previous |
116 | 117 | ||
117 | #define __DEVINIT .section ".devinit.text", "ax" | 118 | #define __DEVINIT .section ".devinit.text", "ax" |
118 | #define __DEVINITDATA .section ".devinit.data", "aw" | 119 | #define __DEVINITDATA .section ".devinit.data", "aw" |
120 | #define __DEVINITRODATA .section ".devinit.rodata", "a" | ||
119 | 121 | ||
120 | #define __CPUINIT .section ".cpuinit.text", "ax" | 122 | #define __CPUINIT .section ".cpuinit.text", "ax" |
121 | #define __CPUINITDATA .section ".cpuinit.data", "aw" | 123 | #define __CPUINITDATA .section ".cpuinit.data", "aw" |
124 | #define __CPUINITRODATA .section ".cpuinit.rodata", "a" | ||
122 | 125 | ||
123 | #define __MEMINIT .section ".meminit.text", "ax" | 126 | #define __MEMINIT .section ".meminit.text", "ax" |
124 | #define __MEMINITDATA .section ".meminit.data", "aw" | 127 | #define __MEMINITDATA .section ".meminit.data", "aw" |
128 | #define __MEMINITRODATA .section ".meminit.rodata", "a" | ||
125 | 129 | ||
126 | /* silence warnings when references are OK */ | 130 | /* silence warnings when references are OK */ |
127 | #define __REF .section ".ref.text", "ax" | 131 | #define __REF .section ".ref.text", "ax" |
128 | #define __REFDATA .section ".ref.data", "aw" | 132 | #define __REFDATA .section ".ref.data", "aw" |
129 | #define __REFCONST .section ".ref.rodata", "aw" | 133 | #define __REFCONST .section ".ref.rodata", "a" |
130 | 134 | ||
131 | #ifndef __ASSEMBLY__ | 135 | #ifndef __ASSEMBLY__ |
132 | /* | 136 | /* |
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index bd578578a8b9..37ea2894b3c0 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
@@ -134,6 +134,8 @@ extern void inotify_remove_watch_locked(struct inotify_handle *, | |||
134 | struct inotify_watch *); | 134 | struct inotify_watch *); |
135 | extern void get_inotify_watch(struct inotify_watch *); | 135 | extern void get_inotify_watch(struct inotify_watch *); |
136 | extern void put_inotify_watch(struct inotify_watch *); | 136 | extern void put_inotify_watch(struct inotify_watch *); |
137 | extern int pin_inotify_watch(struct inotify_watch *); | ||
138 | extern void unpin_inotify_watch(struct inotify_watch *); | ||
137 | 139 | ||
138 | #else | 140 | #else |
139 | 141 | ||
@@ -228,6 +230,15 @@ static inline void put_inotify_watch(struct inotify_watch *watch) | |||
228 | { | 230 | { |
229 | } | 231 | } |
230 | 232 | ||
233 | extern inline int pin_inotify_watch(struct inotify_watch *watch) | ||
234 | { | ||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | extern inline void unpin_inotify_watch(struct inotify_watch *watch) | ||
239 | { | ||
240 | } | ||
241 | |||
231 | #endif /* CONFIG_INOTIFY */ | 242 | #endif /* CONFIG_INOTIFY */ |
232 | 243 | ||
233 | #endif /* __KERNEL __ */ | 244 | #endif /* __KERNEL __ */ |
diff --git a/include/linux/input.h b/include/linux/input.h index b86fb5581ce6..5341e8251f8c 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -238,6 +238,7 @@ struct input_absinfo { | |||
238 | #define KEY_KPEQUAL 117 | 238 | #define KEY_KPEQUAL 117 |
239 | #define KEY_KPPLUSMINUS 118 | 239 | #define KEY_KPPLUSMINUS 118 |
240 | #define KEY_PAUSE 119 | 240 | #define KEY_PAUSE 119 |
241 | #define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ | ||
241 | 242 | ||
242 | #define KEY_KPCOMMA 121 | 243 | #define KEY_KPCOMMA 121 |
243 | #define KEY_HANGEUL 122 | 244 | #define KEY_HANGEUL 122 |
@@ -322,6 +323,7 @@ struct input_absinfo { | |||
322 | #define KEY_PAUSECD 201 | 323 | #define KEY_PAUSECD 201 |
323 | #define KEY_PROG3 202 | 324 | #define KEY_PROG3 202 |
324 | #define KEY_PROG4 203 | 325 | #define KEY_PROG4 203 |
326 | #define KEY_DASHBOARD 204 /* AL Dashboard */ | ||
325 | #define KEY_SUSPEND 205 | 327 | #define KEY_SUSPEND 205 |
326 | #define KEY_CLOSE 206 /* AC Close */ | 328 | #define KEY_CLOSE 206 /* AC Close */ |
327 | #define KEY_PLAY 207 | 329 | #define KEY_PLAY 207 |
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h new file mode 100644 index 000000000000..82df31726a54 --- /dev/null +++ b/include/linux/io-mapping.h | |||
@@ -0,0 +1,125 @@ | |||
1 | /* | ||
2 | * Copyright © 2008 Keith Packard <keithp@keithp.com> | ||
3 | * | ||
4 | * This file is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of version 2 of the GNU General Public License | ||
6 | * as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software Foundation, | ||
15 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
16 | */ | ||
17 | |||
18 | #ifndef _LINUX_IO_MAPPING_H | ||
19 | #define _LINUX_IO_MAPPING_H | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | #include <asm/io.h> | ||
23 | #include <asm/page.h> | ||
24 | #include <asm/iomap.h> | ||
25 | |||
26 | /* | ||
27 | * The io_mapping mechanism provides an abstraction for mapping | ||
28 | * individual pages from an io device to the CPU in an efficient fashion. | ||
29 | * | ||
30 | * See Documentation/io_mapping.txt | ||
31 | */ | ||
32 | |||
33 | /* this struct isn't actually defined anywhere */ | ||
34 | struct io_mapping; | ||
35 | |||
36 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP | ||
37 | |||
38 | /* | ||
39 | * For small address space machines, mapping large objects | ||
40 | * into the kernel virtual space isn't practical. Where | ||
41 | * available, use fixmap support to dynamically map pages | ||
42 | * of the object at run time. | ||
43 | */ | ||
44 | |||
45 | static inline struct io_mapping * | ||
46 | io_mapping_create_wc(unsigned long base, unsigned long size) | ||
47 | { | ||
48 | return (struct io_mapping *) base; | ||
49 | } | ||
50 | |||
51 | static inline void | ||
52 | io_mapping_free(struct io_mapping *mapping) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | /* Atomic map/unmap */ | ||
57 | static inline void * | ||
58 | io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | ||
59 | { | ||
60 | offset += (unsigned long) mapping; | ||
61 | return iomap_atomic_prot_pfn(offset >> PAGE_SHIFT, KM_USER0, | ||
62 | __pgprot(__PAGE_KERNEL_WC)); | ||
63 | } | ||
64 | |||
65 | static inline void | ||
66 | io_mapping_unmap_atomic(void *vaddr) | ||
67 | { | ||
68 | iounmap_atomic(vaddr, KM_USER0); | ||
69 | } | ||
70 | |||
71 | static inline void * | ||
72 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | ||
73 | { | ||
74 | offset += (unsigned long) mapping; | ||
75 | return ioremap_wc(offset, PAGE_SIZE); | ||
76 | } | ||
77 | |||
78 | static inline void | ||
79 | io_mapping_unmap(void *vaddr) | ||
80 | { | ||
81 | iounmap(vaddr); | ||
82 | } | ||
83 | |||
84 | #else | ||
85 | |||
86 | /* Create the io_mapping object*/ | ||
87 | static inline struct io_mapping * | ||
88 | io_mapping_create_wc(unsigned long base, unsigned long size) | ||
89 | { | ||
90 | return (struct io_mapping *) ioremap_wc(base, size); | ||
91 | } | ||
92 | |||
93 | static inline void | ||
94 | io_mapping_free(struct io_mapping *mapping) | ||
95 | { | ||
96 | iounmap(mapping); | ||
97 | } | ||
98 | |||
99 | /* Atomic map/unmap */ | ||
100 | static inline void * | ||
101 | io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | ||
102 | { | ||
103 | return ((char *) mapping) + offset; | ||
104 | } | ||
105 | |||
106 | static inline void | ||
107 | io_mapping_unmap_atomic(void *vaddr) | ||
108 | { | ||
109 | } | ||
110 | |||
111 | /* Non-atomic map/unmap */ | ||
112 | static inline void * | ||
113 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | ||
114 | { | ||
115 | return ((char *) mapping) + offset; | ||
116 | } | ||
117 | |||
118 | static inline void | ||
119 | io_mapping_unmap(void *vaddr) | ||
120 | { | ||
121 | } | ||
122 | |||
123 | #endif /* HAVE_ATOMIC_IOMAP */ | ||
124 | |||
125 | #endif /* _LINUX_IO_MAPPING_H */ | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index d058c57be02d..3dddfa703ebd 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -63,7 +63,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
63 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ | 63 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ |
64 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ | 64 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ |
65 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ | 65 | #define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ |
66 | #define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ | 66 | #define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ |
67 | #define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/ | ||
67 | 68 | ||
68 | #ifdef CONFIG_IRQ_PER_CPU | 69 | #ifdef CONFIG_IRQ_PER_CPU |
69 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 70 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
@@ -130,7 +131,7 @@ struct irq_chip { | |||
130 | 131 | ||
131 | /** | 132 | /** |
132 | * struct irq_desc - interrupt descriptor | 133 | * struct irq_desc - interrupt descriptor |
133 | * | 134 | * @irq: interrupt number for this descriptor |
134 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] | 135 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] |
135 | * @chip: low level interrupt hardware access | 136 | * @chip: low level interrupt hardware access |
136 | * @msi_desc: MSI descriptor | 137 | * @msi_desc: MSI descriptor |
@@ -149,7 +150,6 @@ struct irq_chip { | |||
149 | * @cpu: cpu index useful for balancing | 150 | * @cpu: cpu index useful for balancing |
150 | * @pending_mask: pending rebalanced interrupts | 151 | * @pending_mask: pending rebalanced interrupts |
151 | * @dir: /proc/irq/ procfs entry | 152 | * @dir: /proc/irq/ procfs entry |
152 | * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP | ||
153 | * @name: flow handler name for /proc/interrupts output | 153 | * @name: flow handler name for /proc/interrupts output |
154 | */ | 154 | */ |
155 | struct irq_desc { | 155 | struct irq_desc { |
@@ -210,7 +210,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new); | |||
210 | 210 | ||
211 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 211 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
212 | 212 | ||
213 | void set_pending_irq(unsigned int irq, cpumask_t mask); | ||
214 | void move_native_irq(int irq); | 213 | void move_native_irq(int irq); |
215 | void move_masked_irq(int irq); | 214 | void move_masked_irq(int irq); |
216 | 215 | ||
@@ -228,10 +227,6 @@ static inline void move_masked_irq(int irq) | |||
228 | { | 227 | { |
229 | } | 228 | } |
230 | 229 | ||
231 | static inline void set_pending_irq(unsigned int irq, cpumask_t mask) | ||
232 | { | ||
233 | } | ||
234 | |||
235 | #endif /* CONFIG_GENERIC_PENDING_IRQ */ | 230 | #endif /* CONFIG_GENERIC_PENDING_IRQ */ |
236 | 231 | ||
237 | #else /* CONFIG_SMP */ | 232 | #else /* CONFIG_SMP */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 396a350b87a6..dc7e0d0a6474 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -116,6 +116,8 @@ extern int _cond_resched(void); | |||
116 | # define might_resched() do { } while (0) | 116 | # define might_resched() do { } while (0) |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP | ||
120 | void __might_sleep(char *file, int line); | ||
119 | /** | 121 | /** |
120 | * might_sleep - annotation for functions that can sleep | 122 | * might_sleep - annotation for functions that can sleep |
121 | * | 123 | * |
@@ -126,8 +128,6 @@ extern int _cond_resched(void); | |||
126 | * be bitten later when the calling function happens to sleep when it is not | 128 | * be bitten later when the calling function happens to sleep when it is not |
127 | * supposed to. | 129 | * supposed to. |
128 | */ | 130 | */ |
129 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP | ||
130 | void __might_sleep(char *file, int line); | ||
131 | # define might_sleep() \ | 131 | # define might_sleep() \ |
132 | do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) | 132 | do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) |
133 | #else | 133 | #else |
@@ -318,32 +318,36 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
318 | return buf; | 318 | return buf; |
319 | } | 319 | } |
320 | 320 | ||
321 | #define pr_emerg(fmt, arg...) \ | 321 | #ifndef pr_fmt |
322 | printk(KERN_EMERG fmt, ##arg) | 322 | #define pr_fmt(fmt) fmt |
323 | #define pr_alert(fmt, arg...) \ | 323 | #endif |
324 | printk(KERN_ALERT fmt, ##arg) | 324 | |
325 | #define pr_crit(fmt, arg...) \ | 325 | #define pr_emerg(fmt, ...) \ |
326 | printk(KERN_CRIT fmt, ##arg) | 326 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) |
327 | #define pr_err(fmt, arg...) \ | 327 | #define pr_alert(fmt, ...) \ |
328 | printk(KERN_ERR fmt, ##arg) | 328 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) |
329 | #define pr_warning(fmt, arg...) \ | 329 | #define pr_crit(fmt, ...) \ |
330 | printk(KERN_WARNING fmt, ##arg) | 330 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) |
331 | #define pr_notice(fmt, arg...) \ | 331 | #define pr_err(fmt, ...) \ |
332 | printk(KERN_NOTICE fmt, ##arg) | 332 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) |
333 | #define pr_info(fmt, arg...) \ | 333 | #define pr_warning(fmt, ...) \ |
334 | printk(KERN_INFO fmt, ##arg) | 334 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) |
335 | #define pr_notice(fmt, ...) \ | ||
336 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
337 | #define pr_info(fmt, ...) \ | ||
338 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
335 | 339 | ||
336 | /* If you are writing a driver, please use dev_dbg instead */ | 340 | /* If you are writing a driver, please use dev_dbg instead */ |
337 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 341 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) |
338 | #define pr_debug(fmt, ...) do { \ | 342 | #define pr_debug(fmt, ...) do { \ |
339 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ | 343 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ |
340 | } while (0) | 344 | } while (0) |
341 | #elif defined(DEBUG) | 345 | #elif defined(DEBUG) |
342 | #define pr_debug(fmt, arg...) \ | 346 | #define pr_debug(fmt, ...) \ |
343 | printk(KERN_DEBUG fmt, ##arg) | 347 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
344 | #else | 348 | #else |
345 | #define pr_debug(fmt, arg...) \ | 349 | #define pr_debug(fmt, ...) \ |
346 | ({ if (0) printk(KERN_DEBUG fmt, ##arg); 0; }) | 350 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) |
347 | #endif | 351 | #endif |
348 | 352 | ||
349 | /* | 353 | /* |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 797fcd781242..f18b86fa8655 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -489,6 +489,9 @@ struct kvm_assigned_pci_dev { | |||
489 | __u32 busnr; | 489 | __u32 busnr; |
490 | __u32 devfn; | 490 | __u32 devfn; |
491 | __u32 flags; | 491 | __u32 flags; |
492 | union { | ||
493 | __u32 reserved[12]; | ||
494 | }; | ||
492 | }; | 495 | }; |
493 | 496 | ||
494 | struct kvm_assigned_irq { | 497 | struct kvm_assigned_irq { |
@@ -496,6 +499,9 @@ struct kvm_assigned_irq { | |||
496 | __u32 host_irq; | 499 | __u32 host_irq; |
497 | __u32 guest_irq; | 500 | __u32 guest_irq; |
498 | __u32 flags; | 501 | __u32 flags; |
502 | union { | ||
503 | __u32 reserved[12]; | ||
504 | }; | ||
499 | }; | 505 | }; |
500 | 506 | ||
501 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 507 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 3833c48fae3a..bb92be2153bc 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -37,6 +37,8 @@ | |||
37 | #define KVM_REQ_UNHALT 6 | 37 | #define KVM_REQ_UNHALT 6 |
38 | #define KVM_REQ_MMU_SYNC 7 | 38 | #define KVM_REQ_MMU_SYNC 7 |
39 | 39 | ||
40 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | ||
41 | |||
40 | struct kvm_vcpu; | 42 | struct kvm_vcpu; |
41 | extern struct kmem_cache *kvm_vcpu_cache; | 43 | extern struct kmem_cache *kvm_vcpu_cache; |
42 | 44 | ||
@@ -306,15 +308,18 @@ struct kvm_assigned_dev_kernel { | |||
306 | int host_irq; | 308 | int host_irq; |
307 | int guest_irq; | 309 | int guest_irq; |
308 | int irq_requested; | 310 | int irq_requested; |
311 | int irq_source_id; | ||
309 | struct pci_dev *dev; | 312 | struct pci_dev *dev; |
310 | struct kvm *kvm; | 313 | struct kvm *kvm; |
311 | }; | 314 | }; |
312 | void kvm_set_irq(struct kvm *kvm, int irq, int level); | 315 | void kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level); |
313 | void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi); | 316 | void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi); |
314 | void kvm_register_irq_ack_notifier(struct kvm *kvm, | 317 | void kvm_register_irq_ack_notifier(struct kvm *kvm, |
315 | struct kvm_irq_ack_notifier *kian); | 318 | struct kvm_irq_ack_notifier *kian); |
316 | void kvm_unregister_irq_ack_notifier(struct kvm *kvm, | 319 | void kvm_unregister_irq_ack_notifier(struct kvm *kvm, |
317 | struct kvm_irq_ack_notifier *kian); | 320 | struct kvm_irq_ack_notifier *kian); |
321 | int kvm_request_irq_source_id(struct kvm *kvm); | ||
322 | void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); | ||
318 | 323 | ||
319 | #ifdef CONFIG_DMAR | 324 | #ifdef CONFIG_DMAR |
320 | int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn, | 325 | int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn, |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 507f53ef8038..ed3f26eb5df1 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -372,6 +372,10 @@ enum { | |||
372 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ | 372 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ |
373 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ | 373 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ |
374 | ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ | 374 | ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ |
375 | ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */ | ||
376 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands | ||
377 | not multiple of 16 bytes */ | ||
378 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ | ||
375 | 379 | ||
376 | /* DMA mask for user DMA control: User visible values; DO NOT | 380 | /* DMA mask for user DMA control: User visible values; DO NOT |
377 | renumber */ | 381 | renumber */ |
@@ -695,6 +699,7 @@ struct ata_port { | |||
695 | unsigned int cbl; /* cable type; ATA_CBL_xxx */ | 699 | unsigned int cbl; /* cable type; ATA_CBL_xxx */ |
696 | 700 | ||
697 | struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; | 701 | struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; |
702 | unsigned long qc_allocated; | ||
698 | unsigned int qc_active; | 703 | unsigned int qc_active; |
699 | int nr_active_links; /* #links with active qcs */ | 704 | int nr_active_links; /* #links with active qcs */ |
700 | 705 | ||
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 331e5f1c2d8e..29aec6e10020 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -331,10 +331,11 @@ static inline void lockdep_on(void) | |||
331 | # define lock_set_subclass(l, s, i) do { } while (0) | 331 | # define lock_set_subclass(l, s, i) do { } while (0) |
332 | # define lockdep_init() do { } while (0) | 332 | # define lockdep_init() do { } while (0) |
333 | # define lockdep_info() do { } while (0) | 333 | # define lockdep_info() do { } while (0) |
334 | # define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) | 334 | # define lockdep_init_map(lock, name, key, sub) \ |
335 | do { (void)(name); (void)(key); } while (0) | ||
335 | # define lockdep_set_class(lock, key) do { (void)(key); } while (0) | 336 | # define lockdep_set_class(lock, key) do { (void)(key); } while (0) |
336 | # define lockdep_set_class_and_name(lock, key, name) \ | 337 | # define lockdep_set_class_and_name(lock, key, name) \ |
337 | do { (void)(key); } while (0) | 338 | do { (void)(key); (void)(name); } while (0) |
338 | #define lockdep_set_class_and_subclass(lock, key, sub) \ | 339 | #define lockdep_set_class_and_subclass(lock, key, sub) \ |
339 | do { (void)(key); } while (0) | 340 | do { (void)(key); } while (0) |
340 | #define lockdep_set_subclass(lock, sub) do { } while (0) | 341 | #define lockdep_set_subclass(lock, sub) do { } while (0) |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 2f5f8a5ef2a0..36c82c9e6ea7 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -91,7 +91,7 @@ extern int memory_notify(unsigned long val, void *v); | |||
91 | 91 | ||
92 | #ifdef CONFIG_MEMORY_HOTPLUG | 92 | #ifdef CONFIG_MEMORY_HOTPLUG |
93 | #define hotplug_memory_notifier(fn, pri) { \ | 93 | #define hotplug_memory_notifier(fn, pri) { \ |
94 | static struct notifier_block fn##_mem_nb = \ | 94 | static __meminitdata struct notifier_block fn##_mem_nb =\ |
95 | { .notifier_call = fn, .priority = pri }; \ | 95 | { .notifier_call = fn, .priority = pri }; \ |
96 | register_memory_notifier(&fn##_mem_nb); \ | 96 | register_memory_notifier(&fn##_mem_nb); \ |
97 | } | 97 | } |
diff --git a/include/linux/mfd/wm8350/rtc.h b/include/linux/mfd/wm8350/rtc.h index dfda69e9f440..24add2bef6c9 100644 --- a/include/linux/mfd/wm8350/rtc.h +++ b/include/linux/mfd/wm8350/rtc.h | |||
@@ -261,6 +261,8 @@ | |||
261 | 261 | ||
262 | struct wm8350_rtc { | 262 | struct wm8350_rtc { |
263 | struct platform_device *pdev; | 263 | struct platform_device *pdev; |
264 | struct rtc_device *rtc; | ||
265 | int alarm_enabled; /* used over suspend/resume */ | ||
264 | }; | 266 | }; |
265 | 267 | ||
266 | #endif | 268 | #endif |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index bd9977b89490..371086fd946f 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -179,6 +179,7 @@ struct mlx4_caps { | |||
179 | int num_ports; | 179 | int num_ports; |
180 | int vl_cap[MLX4_MAX_PORTS + 1]; | 180 | int vl_cap[MLX4_MAX_PORTS + 1]; |
181 | int ib_mtu_cap[MLX4_MAX_PORTS + 1]; | 181 | int ib_mtu_cap[MLX4_MAX_PORTS + 1]; |
182 | __be32 ib_port_def_cap[MLX4_MAX_PORTS + 1]; | ||
182 | u64 def_mac[MLX4_MAX_PORTS + 1]; | 183 | u64 def_mac[MLX4_MAX_PORTS + 1]; |
183 | int eth_mtu_cap[MLX4_MAX_PORTS + 1]; | 184 | int eth_mtu_cap[MLX4_MAX_PORTS + 1]; |
184 | int gid_table_len[MLX4_MAX_PORTS + 1]; | 185 | int gid_table_len[MLX4_MAX_PORTS + 1]; |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index ee6e822d5994..403aa505f27e 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -130,7 +130,7 @@ struct mmc_card { | |||
130 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) | 130 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) |
131 | 131 | ||
132 | #define mmc_card_name(c) ((c)->cid.prod_name) | 132 | #define mmc_card_name(c) ((c)->cid.prod_name) |
133 | #define mmc_card_id(c) ((c)->dev.bus_id) | 133 | #define mmc_card_id(c) (dev_name(&(c)->dev)) |
134 | 134 | ||
135 | #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) | 135 | #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) |
136 | #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) | 136 | #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index bde891f64591..f842f234e44f 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -176,7 +176,7 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
176 | 176 | ||
177 | #define mmc_dev(x) ((x)->parent) | 177 | #define mmc_dev(x) ((x)->parent) |
178 | #define mmc_classdev(x) (&(x)->class_dev) | 178 | #define mmc_classdev(x) (&(x)->class_dev) |
179 | #define mmc_hostname(x) ((x)->class_dev.bus_id) | 179 | #define mmc_hostname(x) (dev_name(&(x)->class_dev)) |
180 | 180 | ||
181 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 181 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); |
182 | extern int mmc_resume_host(struct mmc_host *); | 182 | extern int mmc_resume_host(struct mmc_host *); |
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index 07bee4a0d457..451bdfc85830 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h | |||
@@ -63,7 +63,7 @@ struct sdio_func { | |||
63 | 63 | ||
64 | #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT) | 64 | #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT) |
65 | 65 | ||
66 | #define sdio_func_id(f) ((f)->dev.bus_id) | 66 | #define sdio_func_id(f) (dev_name(&(f)->dev)) |
67 | 67 | ||
68 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) | 68 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) |
69 | #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) | 69 | #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index eb71b45fdf5a..97b91d1abb43 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -135,6 +135,7 @@ struct usb_device_id { | |||
135 | 135 | ||
136 | struct hid_device_id { | 136 | struct hid_device_id { |
137 | __u16 bus; | 137 | __u16 bus; |
138 | __u16 pad1; | ||
138 | __u32 vendor; | 139 | __u32 vendor; |
139 | __u32 product; | 140 | __u32 product; |
140 | kernel_ulong_t driver_data | 141 | kernel_ulong_t driver_data |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index ba63858056c7..e0a9b207920d 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -46,11 +46,6 @@ | |||
46 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ | 46 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ |
47 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) | 47 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) |
48 | 48 | ||
49 | /* valid file mode bits */ | ||
50 | #define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO) | ||
51 | /* Convert attribute bits and a mask to the UNIX mode. */ | ||
52 | #define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO)) | ||
53 | |||
54 | #define MSDOS_NAME 11 /* maximum name length */ | 49 | #define MSDOS_NAME 11 /* maximum name length */ |
55 | #define MSDOS_LONGNAME 256 /* maximum name length */ | 50 | #define MSDOS_LONGNAME 256 /* maximum name length */ |
56 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ | 51 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ |
@@ -167,282 +162,10 @@ struct msdos_dir_slot { | |||
167 | }; | 162 | }; |
168 | 163 | ||
169 | #ifdef __KERNEL__ | 164 | #ifdef __KERNEL__ |
170 | |||
171 | #include <linux/buffer_head.h> | ||
172 | #include <linux/string.h> | ||
173 | #include <linux/nls.h> | ||
174 | #include <linux/fs.h> | ||
175 | #include <linux/mutex.h> | ||
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 | |||
186 | struct fat_mount_options { | ||
187 | uid_t fs_uid; | ||
188 | gid_t fs_gid; | ||
189 | unsigned short fs_fmask; | ||
190 | unsigned short fs_dmask; | ||
191 | unsigned short codepage; /* Codepage for shortname conversions */ | ||
192 | char *iocharset; /* Charset used for filename input/display */ | ||
193 | unsigned short shortname; /* flags for shortname display/create rule */ | ||
194 | unsigned char name_check; /* r = relaxed, n = normal, s = strict */ | ||
195 | unsigned short allow_utime;/* permission for setting the [am]time */ | ||
196 | unsigned quiet:1, /* set = fake successful chmods and chowns */ | ||
197 | showexec:1, /* set = only set x bit for com/exe/bat */ | ||
198 | sys_immutable:1, /* set = system files are immutable */ | ||
199 | dotsOK:1, /* set = hidden and system files are named '.filename' */ | ||
200 | isvfat:1, /* 0=no vfat long filename support, 1=vfat support */ | ||
201 | utf8:1, /* Use of UTF-8 character set (Default) */ | ||
202 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ | ||
203 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ | ||
204 | flush:1, /* write things quickly */ | ||
205 | nocase:1, /* Does this need case conversion? 0=need case conversion*/ | ||
206 | usefree:1, /* Use free_clusters for FAT32 */ | ||
207 | tz_utc:1; /* Filesystem timestamps are in UTC */ | ||
208 | }; | ||
209 | |||
210 | #define FAT_HASH_BITS 8 | ||
211 | #define FAT_HASH_SIZE (1UL << FAT_HASH_BITS) | ||
212 | #define FAT_HASH_MASK (FAT_HASH_SIZE-1) | ||
213 | |||
214 | /* | ||
215 | * MS-DOS file system in-core superblock data | ||
216 | */ | ||
217 | struct msdos_sb_info { | ||
218 | unsigned short sec_per_clus; /* sectors/cluster */ | ||
219 | unsigned short cluster_bits; /* log2(cluster_size) */ | ||
220 | unsigned int cluster_size; /* cluster size */ | ||
221 | unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */ | ||
222 | unsigned short fat_start; | ||
223 | unsigned long fat_length; /* FAT start & length (sec.) */ | ||
224 | unsigned long dir_start; | ||
225 | unsigned short dir_entries; /* root dir start & entries */ | ||
226 | unsigned long data_start; /* first data sector */ | ||
227 | unsigned long max_cluster; /* maximum cluster number */ | ||
228 | unsigned long root_cluster; /* first cluster of the root directory */ | ||
229 | unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */ | ||
230 | struct mutex fat_lock; | ||
231 | unsigned int prev_free; /* previously allocated cluster number */ | ||
232 | unsigned int free_clusters; /* -1 if undefined */ | ||
233 | unsigned int free_clus_valid; /* is free_clusters valid? */ | ||
234 | struct fat_mount_options options; | ||
235 | struct nls_table *nls_disk; /* Codepage used on disk */ | ||
236 | struct nls_table *nls_io; /* Charset used for input and display */ | ||
237 | const void *dir_ops; /* Opaque; default directory operations */ | ||
238 | int dir_per_block; /* dir entries per block */ | ||
239 | int dir_per_block_bits; /* log2(dir_per_block) */ | ||
240 | |||
241 | int fatent_shift; | ||
242 | struct fatent_operations *fatent_ops; | ||
243 | |||
244 | spinlock_t inode_hash_lock; | ||
245 | struct hlist_head inode_hashtable[FAT_HASH_SIZE]; | ||
246 | }; | ||
247 | |||
248 | #define FAT_CACHE_VALID 0 /* special case for valid cache */ | ||
249 | |||
250 | /* | ||
251 | * MS-DOS file system inode data in memory | ||
252 | */ | ||
253 | struct msdos_inode_info { | ||
254 | spinlock_t cache_lru_lock; | ||
255 | struct list_head cache_lru; | ||
256 | int nr_caches; | ||
257 | /* for avoiding the race between fat_free() and fat_get_cluster() */ | ||
258 | unsigned int cache_valid_id; | ||
259 | |||
260 | loff_t mmu_private; | ||
261 | int i_start; /* first cluster or 0 */ | ||
262 | int i_logstart; /* logical first cluster */ | ||
263 | int i_attrs; /* unused attribute bits */ | ||
264 | loff_t i_pos; /* on-disk position of directory entry or 0 */ | ||
265 | struct hlist_node i_fat_hash; /* hash by i_location */ | ||
266 | struct inode vfs_inode; | ||
267 | }; | ||
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 | |||
277 | static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb) | ||
278 | { | ||
279 | return sb->s_fs_info; | ||
280 | } | ||
281 | |||
282 | static inline struct msdos_inode_info *MSDOS_I(struct inode *inode) | ||
283 | { | ||
284 | return container_of(inode, struct msdos_inode_info, vfs_inode); | ||
285 | } | ||
286 | |||
287 | /* Return the FAT attribute byte for this inode */ | ||
288 | static inline u8 fat_attr(struct inode *inode) | ||
289 | { | ||
290 | return ((inode->i_mode & S_IWUGO) ? ATTR_NONE : ATTR_RO) | | ||
291 | (S_ISDIR(inode->i_mode) ? ATTR_DIR : ATTR_NONE) | | ||
292 | MSDOS_I(inode)->i_attrs; | ||
293 | } | ||
294 | |||
295 | static inline unsigned char fat_checksum(const __u8 *name) | ||
296 | { | ||
297 | unsigned char s = name[0]; | ||
298 | s = (s<<7) + (s>>1) + name[1]; s = (s<<7) + (s>>1) + name[2]; | ||
299 | s = (s<<7) + (s>>1) + name[3]; s = (s<<7) + (s>>1) + name[4]; | ||
300 | s = (s<<7) + (s>>1) + name[5]; s = (s<<7) + (s>>1) + name[6]; | ||
301 | s = (s<<7) + (s>>1) + name[7]; s = (s<<7) + (s>>1) + name[8]; | ||
302 | s = (s<<7) + (s>>1) + name[9]; s = (s<<7) + (s>>1) + name[10]; | ||
303 | return s; | ||
304 | } | ||
305 | |||
306 | static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus) | ||
307 | { | ||
308 | return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus | ||
309 | + sbi->data_start; | ||
310 | } | ||
311 | |||
312 | static inline void fat16_towchar(wchar_t *dst, const __u8 *src, size_t len) | ||
313 | { | ||
314 | #ifdef __BIG_ENDIAN | ||
315 | while (len--) { | ||
316 | *dst++ = src[0] | (src[1] << 8); | ||
317 | src += 2; | ||
318 | } | ||
319 | #else | ||
320 | memcpy(dst, src, len * 2); | ||
321 | #endif | ||
322 | } | ||
323 | |||
324 | static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) | ||
325 | { | ||
326 | #ifdef __BIG_ENDIAN | ||
327 | while (len--) { | ||
328 | dst[0] = *src & 0x00FF; | ||
329 | dst[1] = (*src & 0xFF00) >> 8; | ||
330 | dst += 2; | ||
331 | src++; | ||
332 | } | ||
333 | #else | ||
334 | memcpy(dst, src, len * 2); | ||
335 | #endif | ||
336 | } | ||
337 | |||
338 | /* media of boot sector */ | 165 | /* media of boot sector */ |
339 | static inline int fat_valid_media(u8 media) | 166 | static inline int fat_valid_media(u8 media) |
340 | { | 167 | { |
341 | return 0xf8 <= media || media == 0xf0; | 168 | return 0xf8 <= media || media == 0xf0; |
342 | } | 169 | } |
343 | 170 | #endif /* !__KERNEL__ */ | |
344 | /* fat/cache.c */ | 171 | #endif /* !_LINUX_MSDOS_FS_H */ |
345 | extern void fat_cache_inval_inode(struct inode *inode); | ||
346 | extern int fat_get_cluster(struct inode *inode, int cluster, | ||
347 | int *fclus, int *dclus); | ||
348 | extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, | ||
349 | unsigned long *mapped_blocks); | ||
350 | |||
351 | /* fat/dir.c */ | ||
352 | extern const struct file_operations fat_dir_operations; | ||
353 | extern int fat_search_long(struct inode *inode, const unsigned char *name, | ||
354 | int name_len, struct fat_slot_info *sinfo); | ||
355 | extern int fat_dir_empty(struct inode *dir); | ||
356 | extern int fat_subdirs(struct inode *dir); | ||
357 | extern int fat_scan(struct inode *dir, const unsigned char *name, | ||
358 | struct fat_slot_info *sinfo); | ||
359 | extern int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh, | ||
360 | struct msdos_dir_entry **de, loff_t *i_pos); | ||
361 | extern int fat_alloc_new_dir(struct inode *dir, struct timespec *ts); | ||
362 | extern int fat_add_entries(struct inode *dir, void *slots, int nr_slots, | ||
363 | struct fat_slot_info *sinfo); | ||
364 | extern int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo); | ||
365 | |||
366 | /* fat/fatent.c */ | ||
367 | struct fat_entry { | ||
368 | int entry; | ||
369 | union { | ||
370 | u8 *ent12_p[2]; | ||
371 | __le16 *ent16_p; | ||
372 | __le32 *ent32_p; | ||
373 | } u; | ||
374 | int nr_bhs; | ||
375 | struct buffer_head *bhs[2]; | ||
376 | }; | ||
377 | |||
378 | static inline void fatent_init(struct fat_entry *fatent) | ||
379 | { | ||
380 | fatent->nr_bhs = 0; | ||
381 | fatent->entry = 0; | ||
382 | fatent->u.ent32_p = NULL; | ||
383 | fatent->bhs[0] = fatent->bhs[1] = NULL; | ||
384 | } | ||
385 | |||
386 | static inline void fatent_set_entry(struct fat_entry *fatent, int entry) | ||
387 | { | ||
388 | fatent->entry = entry; | ||
389 | fatent->u.ent32_p = NULL; | ||
390 | } | ||
391 | |||
392 | static inline void fatent_brelse(struct fat_entry *fatent) | ||
393 | { | ||
394 | int i; | ||
395 | fatent->u.ent32_p = NULL; | ||
396 | for (i = 0; i < fatent->nr_bhs; i++) | ||
397 | brelse(fatent->bhs[i]); | ||
398 | fatent->nr_bhs = 0; | ||
399 | fatent->bhs[0] = fatent->bhs[1] = NULL; | ||
400 | } | ||
401 | |||
402 | extern void fat_ent_access_init(struct super_block *sb); | ||
403 | extern int fat_ent_read(struct inode *inode, struct fat_entry *fatent, | ||
404 | int entry); | ||
405 | extern int fat_ent_write(struct inode *inode, struct fat_entry *fatent, | ||
406 | int new, int wait); | ||
407 | extern int fat_alloc_clusters(struct inode *inode, int *cluster, | ||
408 | int nr_cluster); | ||
409 | extern int fat_free_clusters(struct inode *inode, int cluster); | ||
410 | extern int fat_count_free_clusters(struct super_block *sb); | ||
411 | |||
412 | /* fat/file.c */ | ||
413 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, | ||
414 | unsigned int cmd, unsigned long arg); | ||
415 | extern const struct file_operations fat_file_operations; | ||
416 | extern const struct inode_operations fat_file_inode_operations; | ||
417 | extern int fat_setattr(struct dentry * dentry, struct iattr * attr); | ||
418 | extern void fat_truncate(struct inode *inode); | ||
419 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, | ||
420 | struct kstat *stat); | ||
421 | |||
422 | /* fat/inode.c */ | ||
423 | extern void fat_attach(struct inode *inode, loff_t i_pos); | ||
424 | extern void fat_detach(struct inode *inode); | ||
425 | extern struct inode *fat_iget(struct super_block *sb, loff_t i_pos); | ||
426 | extern struct inode *fat_build_inode(struct super_block *sb, | ||
427 | struct msdos_dir_entry *de, loff_t i_pos); | ||
428 | extern int fat_sync_inode(struct inode *inode); | ||
429 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, | ||
430 | const struct inode_operations *fs_dir_inode_ops, int isvfat); | ||
431 | |||
432 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | ||
433 | struct inode *i2); | ||
434 | /* fat/misc.c */ | ||
435 | extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); | ||
436 | extern void fat_clusters_flush(struct super_block *sb); | ||
437 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); | ||
438 | extern int date_dos2unix(unsigned short time, unsigned short date, int tz_utc); | ||
439 | extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date, | ||
440 | int tz_utc); | ||
441 | extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); | ||
442 | |||
443 | int fat_cache_init(void); | ||
444 | void fat_cache_destroy(void); | ||
445 | |||
446 | #endif /* __KERNEL__ */ | ||
447 | |||
448 | #endif | ||
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index ee5124ec319e..00e2b575021f 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -282,9 +282,25 @@ struct cfi_private { | |||
282 | /* | 282 | /* |
283 | * Returns the command address according to the given geometry. | 283 | * Returns the command address according to the given geometry. |
284 | */ | 284 | */ |
285 | static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, int interleave, int type) | 285 | static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, |
286 | struct map_info *map, struct cfi_private *cfi) | ||
286 | { | 287 | { |
287 | return (cmd_ofs * type) * interleave; | 288 | unsigned bankwidth = map_bankwidth(map); |
289 | unsigned interleave = cfi_interleave(cfi); | ||
290 | unsigned type = cfi->device_type; | ||
291 | uint32_t addr; | ||
292 | |||
293 | addr = (cmd_ofs * type) * interleave; | ||
294 | |||
295 | /* Modify the unlock address if we are in compatiblity mode. | ||
296 | * For 16bit devices on 8 bit busses | ||
297 | * and 32bit devices on 16 bit busses | ||
298 | * set the low bit of the alternating bit sequence of the address. | ||
299 | */ | ||
300 | if (((type * interleave) > bankwidth) && ((uint8_t)cmd_ofs == 0xaa)) | ||
301 | addr |= (type >> 1)*interleave; | ||
302 | |||
303 | return addr; | ||
288 | } | 304 | } |
289 | 305 | ||
290 | /* | 306 | /* |
@@ -430,7 +446,7 @@ static inline uint32_t cfi_send_gen_cmd(u_char cmd, uint32_t cmd_addr, uint32_t | |||
430 | int type, map_word *prev_val) | 446 | int type, map_word *prev_val) |
431 | { | 447 | { |
432 | map_word val; | 448 | map_word val; |
433 | uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, cfi_interleave(cfi), type); | 449 | uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, map, cfi); |
434 | val = cfi_build_cmd(cmd, map, cfi); | 450 | val = cfi_build_cmd(cmd, map, cfi); |
435 | 451 | ||
436 | if (prev_val) | 452 | if (prev_val) |
diff --git a/include/linux/net.h b/include/linux/net.h index 6dc14a240042..4515efae4c39 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ | 40 | #define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ |
41 | #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ | 41 | #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ |
42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ | 42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ |
43 | #define SYS_PACCEPT 18 /* sys_paccept(2) */ | 43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ |
44 | 44 | ||
45 | typedef enum { | 45 | typedef enum { |
46 | SS_FREE = 0, /* not allocated */ | 46 | SS_FREE = 0, /* not allocated */ |
@@ -100,7 +100,7 @@ enum sock_type { | |||
100 | * remaining bits are used as flags. */ | 100 | * remaining bits are used as flags. */ |
101 | #define SOCK_TYPE_MASK 0xf | 101 | #define SOCK_TYPE_MASK 0xf |
102 | 102 | ||
103 | /* Flags for socket, socketpair, paccept */ | 103 | /* Flags for socket, socketpair, accept4 */ |
104 | #define SOCK_CLOEXEC O_CLOEXEC | 104 | #define SOCK_CLOEXEC O_CLOEXEC |
105 | #ifndef SOCK_NONBLOCK | 105 | #ifndef SOCK_NONBLOCK |
106 | #define SOCK_NONBLOCK O_NONBLOCK | 106 | #define SOCK_NONBLOCK O_NONBLOCK |
@@ -223,8 +223,6 @@ extern int sock_map_fd(struct socket *sock, int flags); | |||
223 | extern struct socket *sockfd_lookup(int fd, int *err); | 223 | extern struct socket *sockfd_lookup(int fd, int *err); |
224 | #define sockfd_put(sock) fput(sock->file) | 224 | #define sockfd_put(sock) fput(sock->file) |
225 | 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); | ||
228 | 226 | ||
229 | #define net_random() random32() | 227 | #define net_random() random32() |
230 | #define net_srandom(seed) srandom32((__force u32)seed) | 228 | #define net_srandom(seed) srandom32((__force u32)seed) |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c8bcb59adfdf..e26f54952892 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -319,6 +319,7 @@ enum | |||
319 | { | 319 | { |
320 | NAPI_STATE_SCHED, /* Poll is scheduled */ | 320 | NAPI_STATE_SCHED, /* Poll is scheduled */ |
321 | NAPI_STATE_DISABLE, /* Disable pending */ | 321 | NAPI_STATE_DISABLE, /* Disable pending */ |
322 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | ||
322 | }; | 323 | }; |
323 | 324 | ||
324 | extern void __napi_schedule(struct napi_struct *n); | 325 | extern void __napi_schedule(struct napi_struct *n); |
@@ -1497,6 +1498,12 @@ static inline void netif_rx_complete(struct net_device *dev, | |||
1497 | { | 1498 | { |
1498 | unsigned long flags; | 1499 | unsigned long flags; |
1499 | 1500 | ||
1501 | /* | ||
1502 | * don't let napi dequeue from the cpu poll list | ||
1503 | * just in case its running on a different cpu | ||
1504 | */ | ||
1505 | if (unlikely(test_bit(NAPI_STATE_NPSVC, &napi->state))) | ||
1506 | return; | ||
1500 | local_irq_save(flags); | 1507 | local_irq_save(flags); |
1501 | __netif_rx_complete(dev, napi); | 1508 | __netif_rx_complete(dev, napi); |
1502 | local_irq_restore(flags); | 1509 | local_irq_restore(flags); |
@@ -1537,7 +1544,6 @@ static inline void __netif_tx_unlock_bh(struct netdev_queue *txq) | |||
1537 | /** | 1544 | /** |
1538 | * netif_tx_lock - grab network device transmit lock | 1545 | * netif_tx_lock - grab network device transmit lock |
1539 | * @dev: network device | 1546 | * @dev: network device |
1540 | * @cpu: cpu number of lock owner | ||
1541 | * | 1547 | * |
1542 | * Get network device transmit lock | 1548 | * Get network device transmit lock |
1543 | */ | 1549 | */ |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index c19595c89304..29fe9ea1d346 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -141,6 +141,7 @@ enum ctattr_protonat { | |||
141 | #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) | 141 | #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) |
142 | 142 | ||
143 | enum ctattr_natseq { | 143 | enum ctattr_natseq { |
144 | CTA_NAT_SEQ_UNSPEC, | ||
144 | CTA_NAT_SEQ_CORRECTION_POS, | 145 | CTA_NAT_SEQ_CORRECTION_POS, |
145 | CTA_NAT_SEQ_OFFSET_BEFORE, | 146 | CTA_NAT_SEQ_OFFSET_BEFORE, |
146 | CTA_NAT_SEQ_OFFSET_AFTER, | 147 | CTA_NAT_SEQ_OFFSET_AFTER, |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index be41b609c88f..e52ce475d19f 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -251,7 +251,7 @@ struct xt_target_param { | |||
251 | */ | 251 | */ |
252 | struct xt_tgchk_param { | 252 | struct xt_tgchk_param { |
253 | const char *table; | 253 | const char *table; |
254 | void *entryinfo; | 254 | const void *entryinfo; |
255 | const struct xt_target *target; | 255 | const struct xt_target *target; |
256 | void *targinfo; | 256 | void *targinfo; |
257 | unsigned int hook_mask; | 257 | unsigned int hook_mask; |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index f546ad6fc028..1e6d34bfa094 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -17,7 +17,7 @@ struct page_cgroup { | |||
17 | struct list_head lru; /* per cgroup LRU list */ | 17 | struct list_head lru; /* per cgroup LRU list */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | void __init pgdat_page_cgroup_init(struct pglist_data *pgdat); | 20 | void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat); |
21 | void __init page_cgroup_init(void); | 21 | void __init page_cgroup_init(void); |
22 | struct page_cgroup *lookup_page_cgroup(struct page *page); | 22 | struct page_cgroup *lookup_page_cgroup(struct page *page); |
23 | 23 | ||
@@ -91,7 +91,7 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc) | |||
91 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 91 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
92 | struct page_cgroup; | 92 | struct page_cgroup; |
93 | 93 | ||
94 | static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat) | 94 | static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat) |
95 | { | 95 | { |
96 | } | 96 | } |
97 | 97 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index c75b82bda327..feb4657bb043 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1136,7 +1136,7 @@ static inline void pci_mmcfg_late_init(void) { } | |||
1136 | #endif | 1136 | #endif |
1137 | 1137 | ||
1138 | #ifdef CONFIG_HAS_IOMEM | 1138 | #ifdef CONFIG_HAS_IOMEM |
1139 | static inline void * pci_ioremap_bar(struct pci_dev *pdev, int bar) | 1139 | static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) |
1140 | { | 1140 | { |
1141 | /* | 1141 | /* |
1142 | * Make sure the BAR is actually a memory resource, not an IO resource | 1142 | * Make sure the BAR is actually a memory resource, not an IO resource |
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h index 18a5b9ba9d40..00044b856453 100644 --- a/include/linux/ratelimit.h +++ b/include/linux/ratelimit.h | |||
@@ -17,11 +17,4 @@ struct ratelimit_state { | |||
17 | struct ratelimit_state name = {interval, burst,} | 17 | struct ratelimit_state name = {interval, burst,} |
18 | 18 | ||
19 | extern int __ratelimit(struct ratelimit_state *rs); | 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 | 20 | #endif |
diff --git a/include/linux/resource.h b/include/linux/resource.h index aaa423a6f3d9..40fc7e626082 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h | |||
@@ -59,10 +59,10 @@ struct rlimit { | |||
59 | #define _STK_LIM (8*1024*1024) | 59 | #define _STK_LIM (8*1024*1024) |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * GPG wants 32kB of mlocked memory, to make sure pass phrases | 62 | * GPG2 wants 64kB of mlocked memory, to make sure pass phrases |
63 | * and other sensitive information are never written to disk. | 63 | * and other sensitive information are never written to disk. |
64 | */ | 64 | */ |
65 | #define MLOCK_LIMIT (8 * PAGE_SIZE) | 65 | #define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * Due to binary compatibility, the actual resource numbers | 68 | * Due to binary compatibility, the actual resource numbers |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 536b0ca46a03..e097c2e6b6dc 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -120,6 +120,9 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer); | |||
120 | u64 ring_buffer_time_stamp(int cpu); | 120 | u64 ring_buffer_time_stamp(int cpu); |
121 | void ring_buffer_normalize_time_stamp(int cpu, u64 *ts); | 121 | void ring_buffer_normalize_time_stamp(int cpu, u64 *ts); |
122 | 122 | ||
123 | void tracing_on(void); | ||
124 | void tracing_off(void); | ||
125 | |||
123 | enum ring_buffer_flags { | 126 | enum ring_buffer_flags { |
124 | RB_FL_OVERWRITE = 1 << 0, | 127 | RB_FL_OVERWRITE = 1 << 0, |
125 | }; | 128 | }; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8478f334d732..55e30d114477 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -247,6 +247,7 @@ extern void init_idle(struct task_struct *idle, int cpu); | |||
247 | extern void init_idle_bootup_task(struct task_struct *idle); | 247 | extern void init_idle_bootup_task(struct task_struct *idle); |
248 | 248 | ||
249 | extern int runqueue_is_locked(void); | 249 | extern int runqueue_is_locked(void); |
250 | extern void task_rq_unlock_wait(struct task_struct *p); | ||
250 | 251 | ||
251 | extern cpumask_t nohz_cpu_mask; | 252 | extern cpumask_t nohz_cpu_mask; |
252 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 253 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
@@ -629,6 +630,10 @@ struct user_struct { | |||
629 | atomic_t inotify_watches; /* How many inotify watches does this user have? */ | 630 | atomic_t inotify_watches; /* How many inotify watches does this user have? */ |
630 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ | 631 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ |
631 | #endif | 632 | #endif |
633 | #ifdef CONFIG_EPOLL | ||
634 | atomic_t epoll_devs; /* The number of epoll descriptors currently open */ | ||
635 | atomic_t epoll_watches; /* The number of file descriptors currently watched */ | ||
636 | #endif | ||
632 | #ifdef CONFIG_POSIX_MQUEUE | 637 | #ifdef CONFIG_POSIX_MQUEUE |
633 | /* protected by mq_lock */ | 638 | /* protected by mq_lock */ |
634 | unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ | 639 | unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ |
@@ -936,7 +941,6 @@ struct sched_class { | |||
936 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup); | 941 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup); |
937 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); | 942 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); |
938 | void (*yield_task) (struct rq *rq); | 943 | void (*yield_task) (struct rq *rq); |
939 | int (*select_task_rq)(struct task_struct *p, int sync); | ||
940 | 944 | ||
941 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int sync); | 945 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int sync); |
942 | 946 | ||
@@ -944,6 +948,8 @@ struct sched_class { | |||
944 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 948 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
945 | 949 | ||
946 | #ifdef CONFIG_SMP | 950 | #ifdef CONFIG_SMP |
951 | int (*select_task_rq)(struct task_struct *p, int sync); | ||
952 | |||
947 | unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, | 953 | unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, |
948 | struct rq *busiest, unsigned long max_load_move, | 954 | struct rq *busiest, unsigned long max_load_move, |
949 | struct sched_domain *sd, enum cpu_idle_type idle, | 955 | struct sched_domain *sd, enum cpu_idle_type idle, |
@@ -955,16 +961,17 @@ struct sched_class { | |||
955 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 961 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
956 | void (*post_schedule) (struct rq *this_rq); | 962 | void (*post_schedule) (struct rq *this_rq); |
957 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); | 963 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); |
958 | #endif | ||
959 | 964 | ||
960 | void (*set_curr_task) (struct rq *rq); | ||
961 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); | ||
962 | void (*task_new) (struct rq *rq, struct task_struct *p); | ||
963 | void (*set_cpus_allowed)(struct task_struct *p, | 965 | void (*set_cpus_allowed)(struct task_struct *p, |
964 | const cpumask_t *newmask); | 966 | const cpumask_t *newmask); |
965 | 967 | ||
966 | void (*rq_online)(struct rq *rq); | 968 | void (*rq_online)(struct rq *rq); |
967 | void (*rq_offline)(struct rq *rq); | 969 | void (*rq_offline)(struct rq *rq); |
970 | #endif | ||
971 | |||
972 | void (*set_curr_task) (struct rq *rq); | ||
973 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); | ||
974 | void (*task_new) (struct rq *rq, struct task_struct *p); | ||
968 | 975 | ||
969 | void (*switched_from) (struct rq *this_rq, struct task_struct *task, | 976 | void (*switched_from) (struct rq *this_rq, struct task_struct *task, |
970 | int running); | 977 | int running); |
@@ -1347,6 +1354,8 @@ struct task_struct { | |||
1347 | */ | 1354 | */ |
1348 | unsigned long timer_slack_ns; | 1355 | unsigned long timer_slack_ns; |
1349 | unsigned long default_timer_slack_ns; | 1356 | unsigned long default_timer_slack_ns; |
1357 | |||
1358 | struct list_head *scm_work_list; | ||
1350 | }; | 1359 | }; |
1351 | 1360 | ||
1352 | /* | 1361 | /* |
diff --git a/include/linux/security.h b/include/linux/security.h index f5c4a51eb42e..e3d4ecda2673 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1585,6 +1585,7 @@ int security_syslog(int type); | |||
1585 | int security_settime(struct timespec *ts, struct timezone *tz); | 1585 | int security_settime(struct timespec *ts, struct timezone *tz); |
1586 | int security_vm_enough_memory(long pages); | 1586 | int security_vm_enough_memory(long pages); |
1587 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); | 1587 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); |
1588 | int security_vm_enough_memory_kern(long pages); | ||
1588 | int security_bprm_alloc(struct linux_binprm *bprm); | 1589 | int security_bprm_alloc(struct linux_binprm *bprm); |
1589 | void security_bprm_free(struct linux_binprm *bprm); | 1590 | void security_bprm_free(struct linux_binprm *bprm); |
1590 | void security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe); | 1591 | void security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe); |
@@ -1817,14 +1818,23 @@ static inline int security_settime(struct timespec *ts, struct timezone *tz) | |||
1817 | 1818 | ||
1818 | static inline int security_vm_enough_memory(long pages) | 1819 | static inline int security_vm_enough_memory(long pages) |
1819 | { | 1820 | { |
1821 | WARN_ON(current->mm == NULL); | ||
1820 | return cap_vm_enough_memory(current->mm, pages); | 1822 | return cap_vm_enough_memory(current->mm, pages); |
1821 | } | 1823 | } |
1822 | 1824 | ||
1823 | static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) | 1825 | static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) |
1824 | { | 1826 | { |
1827 | WARN_ON(mm == NULL); | ||
1825 | return cap_vm_enough_memory(mm, pages); | 1828 | return cap_vm_enough_memory(mm, pages); |
1826 | } | 1829 | } |
1827 | 1830 | ||
1831 | static inline int security_vm_enough_memory_kern(long pages) | ||
1832 | { | ||
1833 | /* If current->mm is a kernel thread then we will pass NULL, | ||
1834 | for this specific case that is fine */ | ||
1835 | return cap_vm_enough_memory(current->mm, pages); | ||
1836 | } | ||
1837 | |||
1828 | static inline int security_bprm_alloc(struct linux_binprm *bprm) | 1838 | static inline int security_bprm_alloc(struct linux_binprm *bprm) |
1829 | { | 1839 | { |
1830 | return 0; | 1840 | return 0; |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index e27f216361fc..4e4f1277f3bf 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -155,6 +155,9 @@ | |||
155 | 155 | ||
156 | #define PORT_SC26XX 82 | 156 | #define PORT_SC26XX 82 |
157 | 157 | ||
158 | /* SH-SCI */ | ||
159 | #define PORT_SCIFA 83 | ||
160 | |||
158 | #ifdef __KERNEL__ | 161 | #ifdef __KERNEL__ |
159 | 162 | ||
160 | #include <linux/compiler.h> | 163 | #include <linux/compiler.h> |
diff --git a/include/linux/slab.h b/include/linux/slab.h index ba965c84ae06..000da12b5cf0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -23,6 +23,34 @@ | |||
23 | #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ | 23 | #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ |
24 | #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ | 24 | #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ |
25 | #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ | 25 | #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ |
26 | /* | ||
27 | * SLAB_DESTROY_BY_RCU - **WARNING** READ THIS! | ||
28 | * | ||
29 | * This delays freeing the SLAB page by a grace period, it does _NOT_ | ||
30 | * delay object freeing. This means that if you do kmem_cache_free() | ||
31 | * that memory location is free to be reused at any time. Thus it may | ||
32 | * be possible to see another object there in the same RCU grace period. | ||
33 | * | ||
34 | * This feature only ensures the memory location backing the object | ||
35 | * stays valid, the trick to using this is relying on an independent | ||
36 | * object validation pass. Something like: | ||
37 | * | ||
38 | * rcu_read_lock() | ||
39 | * again: | ||
40 | * obj = lockless_lookup(key); | ||
41 | * if (obj) { | ||
42 | * if (!try_get_ref(obj)) // might fail for free objects | ||
43 | * goto again; | ||
44 | * | ||
45 | * if (obj->key != key) { // not the object we expected | ||
46 | * put_ref(obj); | ||
47 | * goto again; | ||
48 | * } | ||
49 | * } | ||
50 | * rcu_read_unlock(); | ||
51 | * | ||
52 | * See also the comment on struct slab_rcu in mm/slab.c. | ||
53 | */ | ||
26 | #define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ | 54 | #define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ |
27 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ | 55 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ |
28 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ | 56 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 2e4d58b26c06..6e7ba16ff454 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -64,8 +64,17 @@ extern void smp_cpus_done(unsigned int max_cpus); | |||
64 | * Call a function on all other processors | 64 | * Call a function on all other processors |
65 | */ | 65 | */ |
66 | int smp_call_function(void(*func)(void *info), void *info, int wait); | 66 | int smp_call_function(void(*func)(void *info), void *info, int wait); |
67 | /* Deprecated: use smp_call_function_many() which uses a cpumask ptr. */ | ||
67 | int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, | 68 | int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, |
68 | int wait); | 69 | int wait); |
70 | |||
71 | static inline void smp_call_function_many(const struct cpumask *mask, | ||
72 | void (*func)(void *info), void *info, | ||
73 | int wait) | ||
74 | { | ||
75 | smp_call_function_mask(*mask, func, info, wait); | ||
76 | } | ||
77 | |||
69 | int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, | 78 | int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, |
70 | int wait); | 79 | int wait); |
71 | void __smp_call_function_single(int cpuid, struct call_single_data *data); | 80 | void __smp_call_function_single(int cpuid, struct call_single_data *data); |
@@ -137,6 +146,8 @@ static inline void smp_send_reschedule(int cpu) { } | |||
137 | }) | 146 | }) |
138 | #define smp_call_function_mask(mask, func, info, wait) \ | 147 | #define smp_call_function_mask(mask, func, info, wait) \ |
139 | (up_smp_call_function(func, info)) | 148 | (up_smp_call_function(func, info)) |
149 | #define smp_call_function_many(mask, func, info, wait) \ | ||
150 | (up_smp_call_function(func, info)) | ||
140 | static inline void init_call_single_data(void) | 151 | static inline void init_call_single_data(void) |
141 | { | 152 | { |
142 | } | 153 | } |
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index b8db32cea1de..bf8de281b4ed 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
@@ -18,6 +18,9 @@ | |||
18 | * duplex (MicroWire) controllers. Provide chipslect() and txrx_bufs(), | 18 | * duplex (MicroWire) controllers. Provide chipslect() and txrx_bufs(), |
19 | * and custom setup()/cleanup() methods. | 19 | * and custom setup()/cleanup() methods. |
20 | */ | 20 | */ |
21 | |||
22 | #include <linux/workqueue.h> | ||
23 | |||
21 | struct spi_bitbang { | 24 | struct spi_bitbang { |
22 | struct workqueue_struct *workqueue; | 25 | struct workqueue_struct *workqueue; |
23 | struct work_struct work; | 26 | struct work_struct work; |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index e530026eedf7..17d9b58f6379 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -427,12 +427,16 @@ static inline int ssb_dma_mapping_error(struct ssb_device *dev, dma_addr_t addr) | |||
427 | { | 427 | { |
428 | switch (dev->bus->bustype) { | 428 | switch (dev->bus->bustype) { |
429 | case SSB_BUSTYPE_PCI: | 429 | case SSB_BUSTYPE_PCI: |
430 | #ifdef CONFIG_SSB_PCIHOST | ||
430 | return pci_dma_mapping_error(dev->bus->host_pci, addr); | 431 | return pci_dma_mapping_error(dev->bus->host_pci, addr); |
432 | #endif | ||
433 | break; | ||
431 | case SSB_BUSTYPE_SSB: | 434 | case SSB_BUSTYPE_SSB: |
432 | return dma_mapping_error(dev->dev, addr); | 435 | return dma_mapping_error(dev->dev, addr); |
433 | default: | 436 | default: |
434 | __ssb_dma_not_implemented(dev); | 437 | break; |
435 | } | 438 | } |
439 | __ssb_dma_not_implemented(dev); | ||
436 | return -ENOSYS; | 440 | return -ENOSYS; |
437 | } | 441 | } |
438 | 442 | ||
@@ -441,12 +445,16 @@ static inline dma_addr_t ssb_dma_map_single(struct ssb_device *dev, void *p, | |||
441 | { | 445 | { |
442 | switch (dev->bus->bustype) { | 446 | switch (dev->bus->bustype) { |
443 | case SSB_BUSTYPE_PCI: | 447 | case SSB_BUSTYPE_PCI: |
448 | #ifdef CONFIG_SSB_PCIHOST | ||
444 | return pci_map_single(dev->bus->host_pci, p, size, dir); | 449 | return pci_map_single(dev->bus->host_pci, p, size, dir); |
450 | #endif | ||
451 | break; | ||
445 | case SSB_BUSTYPE_SSB: | 452 | case SSB_BUSTYPE_SSB: |
446 | return dma_map_single(dev->dev, p, size, dir); | 453 | return dma_map_single(dev->dev, p, size, dir); |
447 | default: | 454 | default: |
448 | __ssb_dma_not_implemented(dev); | 455 | break; |
449 | } | 456 | } |
457 | __ssb_dma_not_implemented(dev); | ||
450 | return 0; | 458 | return 0; |
451 | } | 459 | } |
452 | 460 | ||
@@ -455,14 +463,18 @@ static inline void ssb_dma_unmap_single(struct ssb_device *dev, dma_addr_t dma_a | |||
455 | { | 463 | { |
456 | switch (dev->bus->bustype) { | 464 | switch (dev->bus->bustype) { |
457 | case SSB_BUSTYPE_PCI: | 465 | case SSB_BUSTYPE_PCI: |
466 | #ifdef CONFIG_SSB_PCIHOST | ||
458 | pci_unmap_single(dev->bus->host_pci, dma_addr, size, dir); | 467 | pci_unmap_single(dev->bus->host_pci, dma_addr, size, dir); |
459 | return; | 468 | return; |
469 | #endif | ||
470 | break; | ||
460 | case SSB_BUSTYPE_SSB: | 471 | case SSB_BUSTYPE_SSB: |
461 | dma_unmap_single(dev->dev, dma_addr, size, dir); | 472 | dma_unmap_single(dev->dev, dma_addr, size, dir); |
462 | return; | 473 | return; |
463 | default: | 474 | default: |
464 | __ssb_dma_not_implemented(dev); | 475 | break; |
465 | } | 476 | } |
477 | __ssb_dma_not_implemented(dev); | ||
466 | } | 478 | } |
467 | 479 | ||
468 | static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev, | 480 | static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev, |
@@ -472,15 +484,19 @@ static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev, | |||
472 | { | 484 | { |
473 | switch (dev->bus->bustype) { | 485 | switch (dev->bus->bustype) { |
474 | case SSB_BUSTYPE_PCI: | 486 | case SSB_BUSTYPE_PCI: |
487 | #ifdef CONFIG_SSB_PCIHOST | ||
475 | pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, | 488 | pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, |
476 | size, dir); | 489 | size, dir); |
477 | return; | 490 | return; |
491 | #endif | ||
492 | break; | ||
478 | case SSB_BUSTYPE_SSB: | 493 | case SSB_BUSTYPE_SSB: |
479 | dma_sync_single_for_cpu(dev->dev, dma_addr, size, dir); | 494 | dma_sync_single_for_cpu(dev->dev, dma_addr, size, dir); |
480 | return; | 495 | return; |
481 | default: | 496 | default: |
482 | __ssb_dma_not_implemented(dev); | 497 | break; |
483 | } | 498 | } |
499 | __ssb_dma_not_implemented(dev); | ||
484 | } | 500 | } |
485 | 501 | ||
486 | static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev, | 502 | static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev, |
@@ -490,15 +506,19 @@ static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev, | |||
490 | { | 506 | { |
491 | switch (dev->bus->bustype) { | 507 | switch (dev->bus->bustype) { |
492 | case SSB_BUSTYPE_PCI: | 508 | case SSB_BUSTYPE_PCI: |
509 | #ifdef CONFIG_SSB_PCIHOST | ||
493 | pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, | 510 | pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, |
494 | size, dir); | 511 | size, dir); |
495 | return; | 512 | return; |
513 | #endif | ||
514 | break; | ||
496 | case SSB_BUSTYPE_SSB: | 515 | case SSB_BUSTYPE_SSB: |
497 | dma_sync_single_for_device(dev->dev, dma_addr, size, dir); | 516 | dma_sync_single_for_device(dev->dev, dma_addr, size, dir); |
498 | return; | 517 | return; |
499 | default: | 518 | default: |
500 | __ssb_dma_not_implemented(dev); | 519 | break; |
501 | } | 520 | } |
521 | __ssb_dma_not_implemented(dev); | ||
502 | } | 522 | } |
503 | 523 | ||
504 | static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev, | 524 | static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev, |
@@ -509,17 +529,21 @@ static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev, | |||
509 | { | 529 | { |
510 | switch (dev->bus->bustype) { | 530 | switch (dev->bus->bustype) { |
511 | case SSB_BUSTYPE_PCI: | 531 | case SSB_BUSTYPE_PCI: |
532 | #ifdef CONFIG_SSB_PCIHOST | ||
512 | /* Just sync everything. That's all the PCI API can do. */ | 533 | /* Just sync everything. That's all the PCI API can do. */ |
513 | pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, | 534 | pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, |
514 | offset + size, dir); | 535 | offset + size, dir); |
515 | return; | 536 | return; |
537 | #endif | ||
538 | break; | ||
516 | case SSB_BUSTYPE_SSB: | 539 | case SSB_BUSTYPE_SSB: |
517 | dma_sync_single_range_for_cpu(dev->dev, dma_addr, offset, | 540 | dma_sync_single_range_for_cpu(dev->dev, dma_addr, offset, |
518 | size, dir); | 541 | size, dir); |
519 | return; | 542 | return; |
520 | default: | 543 | default: |
521 | __ssb_dma_not_implemented(dev); | 544 | break; |
522 | } | 545 | } |
546 | __ssb_dma_not_implemented(dev); | ||
523 | } | 547 | } |
524 | 548 | ||
525 | static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev, | 549 | static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev, |
@@ -530,17 +554,21 @@ static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev, | |||
530 | { | 554 | { |
531 | switch (dev->bus->bustype) { | 555 | switch (dev->bus->bustype) { |
532 | case SSB_BUSTYPE_PCI: | 556 | case SSB_BUSTYPE_PCI: |
557 | #ifdef CONFIG_SSB_PCIHOST | ||
533 | /* Just sync everything. That's all the PCI API can do. */ | 558 | /* Just sync everything. That's all the PCI API can do. */ |
534 | pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, | 559 | pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, |
535 | offset + size, dir); | 560 | offset + size, dir); |
536 | return; | 561 | return; |
562 | #endif | ||
563 | break; | ||
537 | case SSB_BUSTYPE_SSB: | 564 | case SSB_BUSTYPE_SSB: |
538 | dma_sync_single_range_for_device(dev->dev, dma_addr, offset, | 565 | dma_sync_single_range_for_device(dev->dev, dma_addr, offset, |
539 | size, dir); | 566 | size, dir); |
540 | return; | 567 | return; |
541 | default: | 568 | default: |
542 | __ssb_dma_not_implemented(dev); | 569 | break; |
543 | } | 570 | } |
571 | __ssb_dma_not_implemented(dev); | ||
544 | } | 572 | } |
545 | 573 | ||
546 | 574 | ||
diff --git a/include/linux/string.h b/include/linux/string.h index 810d80df0a1d..d18fc198aa2f 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _LINUX_STRING_H_ | 1 | #ifndef _LINUX_STRING_H_ |
2 | #define _LINUX_STRING_H_ | 2 | #define _LINUX_STRING_H_ |
3 | 3 | ||
4 | /* We don't want strings.h stuff being user by user stuff by accident */ | 4 | /* We don't want strings.h stuff being used by user stuff by accident */ |
5 | 5 | ||
6 | #ifndef __KERNEL__ | 6 | #ifndef __KERNEL__ |
7 | #include <string.h> | 7 | #include <string.h> |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index d6ff145919ca..04fb47bfb920 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -410,8 +410,7 @@ asmlinkage long sys_getsockopt(int fd, int level, int optname, | |||
410 | asmlinkage long sys_bind(int, struct sockaddr __user *, int); | 410 | asmlinkage long sys_bind(int, struct sockaddr __user *, int); |
411 | asmlinkage long sys_connect(int, struct sockaddr __user *, int); | 411 | asmlinkage long sys_connect(int, struct sockaddr __user *, int); |
412 | 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 *, | 413 | asmlinkage long sys_accept4(int, struct sockaddr __user *, int __user *, int); |
414 | const __user sigset_t *, size_t, int); | ||
415 | asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *); | 414 | asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *); |
416 | asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *); | 415 | asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *); |
417 | asmlinkage long sys_send(int, void __user *, size_t, unsigned); | 416 | asmlinkage long sys_send(int, void __user *, size_t, unsigned); |
diff --git a/include/linux/telephony.h b/include/linux/telephony.h index 5b2b6261f193..f63afe330add 100644 --- a/include/linux/telephony.h +++ b/include/linux/telephony.h | |||
@@ -14,7 +14,7 @@ | |||
14 | * Authors: Ed Okerson, <eokerson@quicknet.net> | 14 | * Authors: Ed Okerson, <eokerson@quicknet.net> |
15 | * Greg Herlein, <gherlein@quicknet.net> | 15 | * Greg Herlein, <gherlein@quicknet.net> |
16 | * | 16 | * |
17 | * Contributors: Alan Cox, <alan@redhat.com> | 17 | * Contributors: Alan Cox, <alan@lxorguk.ukuu.org.uk> |
18 | * David W. Erhart, <derhart@quicknet.net> | 18 | * David W. Erhart, <derhart@quicknet.net> |
19 | * | 19 | * |
20 | * IN NO EVENT SHALL QUICKNET TECHNOLOGIES, INC. BE LIABLE TO ANY PARTY FOR | 20 | * IN NO EVENT SHALL QUICKNET TECHNOLOGIES, INC. BE LIABLE TO ANY PARTY FOR |
diff --git a/include/linux/timer.h b/include/linux/timer.h index d4ba79248a27..daf9685b861c 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -186,4 +186,9 @@ unsigned long __round_jiffies_relative(unsigned long j, int cpu); | |||
186 | unsigned long round_jiffies(unsigned long j); | 186 | unsigned long round_jiffies(unsigned long j); |
187 | unsigned long round_jiffies_relative(unsigned long j); | 187 | unsigned long round_jiffies_relative(unsigned long j); |
188 | 188 | ||
189 | unsigned long __round_jiffies_up(unsigned long j, int cpu); | ||
190 | unsigned long __round_jiffies_up_relative(unsigned long j, int cpu); | ||
191 | unsigned long round_jiffies_up(unsigned long j); | ||
192 | unsigned long round_jiffies_up_relative(unsigned long j); | ||
193 | |||
189 | #endif | 194 | #endif |
diff --git a/include/linux/topology.h b/include/linux/topology.h index 2158fc0d5a56..117f1b7405cf 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -99,7 +99,7 @@ void arch_update_cpu_topology(void); | |||
99 | | SD_BALANCE_FORK \ | 99 | | SD_BALANCE_FORK \ |
100 | | SD_BALANCE_EXEC \ | 100 | | SD_BALANCE_EXEC \ |
101 | | SD_WAKE_AFFINE \ | 101 | | SD_WAKE_AFFINE \ |
102 | | SD_WAKE_IDLE \ | 102 | | SD_WAKE_BALANCE \ |
103 | | SD_SHARE_CPUPOWER, \ | 103 | | SD_SHARE_CPUPOWER, \ |
104 | .last_balance = jiffies, \ | 104 | .last_balance = jiffies, \ |
105 | .balance_interval = 1, \ | 105 | .balance_interval = 1, \ |
@@ -120,10 +120,10 @@ void arch_update_cpu_topology(void); | |||
120 | .wake_idx = 1, \ | 120 | .wake_idx = 1, \ |
121 | .forkexec_idx = 1, \ | 121 | .forkexec_idx = 1, \ |
122 | .flags = SD_LOAD_BALANCE \ | 122 | .flags = SD_LOAD_BALANCE \ |
123 | | SD_BALANCE_NEWIDLE \ | ||
124 | | SD_BALANCE_FORK \ | 123 | | SD_BALANCE_FORK \ |
125 | | SD_BALANCE_EXEC \ | 124 | | SD_BALANCE_EXEC \ |
126 | | SD_WAKE_AFFINE \ | 125 | | SD_WAKE_AFFINE \ |
126 | | SD_WAKE_BALANCE \ | ||
127 | | SD_SHARE_PKG_RESOURCES\ | 127 | | SD_SHARE_PKG_RESOURCES\ |
128 | | BALANCE_FOR_MC_POWER, \ | 128 | | BALANCE_FOR_MC_POWER, \ |
129 | .last_balance = jiffies, \ | 129 | .last_balance = jiffies, \ |
@@ -146,10 +146,10 @@ void arch_update_cpu_topology(void); | |||
146 | .wake_idx = 1, \ | 146 | .wake_idx = 1, \ |
147 | .forkexec_idx = 1, \ | 147 | .forkexec_idx = 1, \ |
148 | .flags = SD_LOAD_BALANCE \ | 148 | .flags = SD_LOAD_BALANCE \ |
149 | | SD_BALANCE_NEWIDLE \ | ||
150 | | SD_BALANCE_FORK \ | ||
151 | | SD_BALANCE_EXEC \ | 149 | | SD_BALANCE_EXEC \ |
150 | | SD_BALANCE_FORK \ | ||
152 | | SD_WAKE_AFFINE \ | 151 | | SD_WAKE_AFFINE \ |
152 | | SD_WAKE_BALANCE \ | ||
153 | | BALANCE_FOR_PKG_POWER,\ | 153 | | BALANCE_FOR_PKG_POWER,\ |
154 | .last_balance = jiffies, \ | 154 | .last_balance = jiffies, \ |
155 | .balance_interval = 1, \ | 155 | .balance_interval = 1, \ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 8fa973bede5e..f72aa51f7bcd 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -108,6 +108,7 @@ enum usb_interface_condition { | |||
108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
109 | * @is_active: flag set when the interface is bound and not suspended. | 109 | * @is_active: flag set when the interface is bound and not suspended. |
110 | * @sysfs_files_created: sysfs attributes exist | 110 | * @sysfs_files_created: sysfs attributes exist |
111 | * @unregistering: flag set when the interface is being unregistered | ||
111 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 112 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
112 | * capability during autosuspend. | 113 | * capability during autosuspend. |
113 | * @needs_altsetting0: flag set when a set-interface request for altsetting 0 | 114 | * @needs_altsetting0: flag set when a set-interface request for altsetting 0 |
@@ -163,6 +164,7 @@ struct usb_interface { | |||
163 | enum usb_interface_condition condition; /* state of binding */ | 164 | enum usb_interface_condition condition; /* state of binding */ |
164 | unsigned is_active:1; /* the interface is not suspended */ | 165 | unsigned is_active:1; /* the interface is not suspended */ |
165 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ | 166 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ |
167 | unsigned unregistering:1; /* unregistration is in progress */ | ||
166 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 168 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
167 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ | 169 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ |
168 | unsigned needs_binding:1; /* needs delayed unbind/rebind */ | 170 | unsigned needs_binding:1; /* needs delayed unbind/rebind */ |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 73a2f4eb1f7a..9b42baed3900 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -158,8 +158,12 @@ struct usb_ctrlrequest { | |||
158 | * (rarely) accepted by SET_DESCRIPTOR. | 158 | * (rarely) accepted by SET_DESCRIPTOR. |
159 | * | 159 | * |
160 | * Note that all multi-byte values here are encoded in little endian | 160 | * Note that all multi-byte values here are encoded in little endian |
161 | * byte order "on the wire". But when exposed through Linux-USB APIs, | 161 | * byte order "on the wire". Within the kernel and when exposed |
162 | * they've been converted to cpu byte order. | 162 | * through the Linux-USB APIs, they are not converted to cpu byte |
163 | * order; it is the responsibility of the client code to do this. | ||
164 | * The single exception is when device and configuration descriptors (but | ||
165 | * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD); | ||
166 | * in this case the fields are converted to host endianness by the kernel. | ||
163 | */ | 167 | */ |
164 | 168 | ||
165 | /* | 169 | /* |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 89a5a1231ffb..b36291130f22 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -240,4 +240,12 @@ void cancel_rearming_delayed_work(struct delayed_work *work) | |||
240 | cancel_delayed_work_sync(work); | 240 | cancel_delayed_work_sync(work); |
241 | } | 241 | } |
242 | 242 | ||
243 | #ifndef CONFIG_SMP | ||
244 | static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg) | ||
245 | { | ||
246 | return fn(arg); | ||
247 | } | ||
248 | #else | ||
249 | long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg); | ||
250 | #endif /* CONFIG_SMP */ | ||
243 | #endif | 251 | #endif |