diff options
Diffstat (limited to 'include')
89 files changed, 812 insertions, 244 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 1172c27adadf..86825ddbe14e 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -320,8 +320,16 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) | |||
320 | 320 | ||
321 | #endif /* CONFIG_CPU_FREQ */ | 321 | #endif /* CONFIG_CPU_FREQ */ |
322 | 322 | ||
323 | /* in processor_pdc.c */ | 323 | /* in processor_core.c */ |
324 | void acpi_processor_set_pdc(acpi_handle handle); | 324 | void acpi_processor_set_pdc(acpi_handle handle); |
325 | #ifdef CONFIG_SMP | ||
326 | int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id); | ||
327 | #else | ||
328 | static inline int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id) | ||
329 | { | ||
330 | return -1; | ||
331 | } | ||
332 | #endif | ||
325 | 333 | ||
326 | /* in processor_throttling.c */ | 334 | /* in processor_throttling.c */ |
327 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | 335 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); |
diff --git a/include/asm-generic/pci-dma-compat.h b/include/asm-generic/pci-dma-compat.h index 37b3706226e7..1437b7da09b2 100644 --- a/include/asm-generic/pci-dma-compat.h +++ b/include/asm-generic/pci-dma-compat.h | |||
@@ -6,9 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
8 | 8 | ||
9 | /* note pci_set_dma_mask isn't here, since it's a public function | ||
10 | * exported from drivers/pci, use dma_supported instead */ | ||
11 | |||
12 | static inline int | 9 | static inline int |
13 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) | 10 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) |
14 | { | 11 | { |
@@ -104,4 +101,16 @@ pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr) | |||
104 | return dma_mapping_error(&pdev->dev, dma_addr); | 101 | return dma_mapping_error(&pdev->dev, dma_addr); |
105 | } | 102 | } |
106 | 103 | ||
104 | #ifdef CONFIG_PCI | ||
105 | static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
106 | { | ||
107 | return dma_set_mask(&dev->dev, mask); | ||
108 | } | ||
109 | |||
110 | static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
111 | { | ||
112 | return dma_set_coherent_mask(&dev->dev, mask); | ||
113 | } | ||
114 | #endif | ||
115 | |||
107 | #endif | 116 | #endif |
diff --git a/include/linux/acct.h b/include/linux/acct.h index 882dc7248766..3e4737fa6cce 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -121,16 +121,15 @@ struct vfsmount; | |||
121 | struct super_block; | 121 | struct super_block; |
122 | struct pacct_struct; | 122 | struct pacct_struct; |
123 | struct pid_namespace; | 123 | struct pid_namespace; |
124 | extern int acct_parm[]; /* for sysctl */ | ||
124 | extern void acct_auto_close_mnt(struct vfsmount *m); | 125 | extern void acct_auto_close_mnt(struct vfsmount *m); |
125 | extern void acct_auto_close(struct super_block *sb); | 126 | extern void acct_auto_close(struct super_block *sb); |
126 | extern void acct_init_pacct(struct pacct_struct *pacct); | ||
127 | extern void acct_collect(long exitcode, int group_dead); | 127 | extern void acct_collect(long exitcode, int group_dead); |
128 | extern void acct_process(void); | 128 | extern void acct_process(void); |
129 | extern void acct_exit_ns(struct pid_namespace *); | 129 | extern void acct_exit_ns(struct pid_namespace *); |
130 | #else | 130 | #else |
131 | #define acct_auto_close_mnt(x) do { } while (0) | 131 | #define acct_auto_close_mnt(x) do { } while (0) |
132 | #define acct_auto_close(x) do { } while (0) | 132 | #define acct_auto_close(x) do { } while (0) |
133 | #define acct_init_pacct(x) do { } while (0) | ||
134 | #define acct_collect(x,y) do { } while (0) | 133 | #define acct_collect(x,y) do { } while (0) |
135 | #define acct_process() do { } while (0) | 134 | #define acct_process() do { } while (0) |
136 | #define acct_exit_ns(ns) do { } while (0) | 135 | #define acct_exit_ns(ns) do { } while (0) |
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 29c0448265cf..ca16c3801a1e 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
@@ -21,22 +21,21 @@ | |||
21 | #define CLCD_UBAS 0x00000010 | 21 | #define CLCD_UBAS 0x00000010 |
22 | #define CLCD_LBAS 0x00000014 | 22 | #define CLCD_LBAS 0x00000014 |
23 | 23 | ||
24 | #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) | 24 | #define CLCD_PL110_IENB 0x00000018 |
25 | #define CLCD_IENB 0x00000018 | 25 | #define CLCD_PL110_CNTL 0x0000001c |
26 | #define CLCD_CNTL 0x0000001c | 26 | #define CLCD_PL110_STAT 0x00000020 |
27 | #else | 27 | #define CLCD_PL110_INTR 0x00000024 |
28 | /* | 28 | #define CLCD_PL110_UCUR 0x00000028 |
29 | * Someone rearranged these two registers on the Versatile | 29 | #define CLCD_PL110_LCUR 0x0000002C |
30 | * platform... | 30 | |
31 | */ | 31 | #define CLCD_PL111_CNTL 0x00000018 |
32 | #define CLCD_IENB 0x0000001c | 32 | #define CLCD_PL111_IENB 0x0000001c |
33 | #define CLCD_CNTL 0x00000018 | 33 | #define CLCD_PL111_RIS 0x00000020 |
34 | #endif | 34 | #define CLCD_PL111_MIS 0x00000024 |
35 | 35 | #define CLCD_PL111_ICR 0x00000028 | |
36 | #define CLCD_STAT 0x00000020 | 36 | #define CLCD_PL111_UCUR 0x0000002c |
37 | #define CLCD_INTR 0x00000024 | 37 | #define CLCD_PL111_LCUR 0x00000030 |
38 | #define CLCD_UCUR 0x00000028 | 38 | |
39 | #define CLCD_LCUR 0x0000002C | ||
40 | #define CLCD_PALL 0x00000200 | 39 | #define CLCD_PALL 0x00000200 |
41 | #define CLCD_PALETTE 0x00000200 | 40 | #define CLCD_PALETTE 0x00000200 |
42 | 41 | ||
@@ -147,6 +146,8 @@ struct clcd_fb { | |||
147 | struct clcd_board *board; | 146 | struct clcd_board *board; |
148 | void *board_data; | 147 | void *board_data; |
149 | void __iomem *regs; | 148 | void __iomem *regs; |
149 | u16 off_ienb; | ||
150 | u16 off_cntl; | ||
150 | u32 clcd_cntl; | 151 | u32 clcd_cntl; |
151 | u32 cmap[16]; | 152 | u32 cmap[16]; |
152 | }; | 153 | }; |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 8c4f884db6b4..4a3d52e545e1 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -36,18 +36,18 @@ struct backlight_device; | |||
36 | struct fb_info; | 36 | struct fb_info; |
37 | 37 | ||
38 | struct backlight_ops { | 38 | struct backlight_ops { |
39 | const unsigned int options; | 39 | unsigned int options; |
40 | 40 | ||
41 | #define BL_CORE_SUSPENDRESUME (1 << 0) | 41 | #define BL_CORE_SUSPENDRESUME (1 << 0) |
42 | 42 | ||
43 | /* Notify the backlight driver some property has changed */ | 43 | /* Notify the backlight driver some property has changed */ |
44 | int (* const update_status)(struct backlight_device *); | 44 | int (*update_status)(struct backlight_device *); |
45 | /* Return the current backlight brightness (accounting for power, | 45 | /* Return the current backlight brightness (accounting for power, |
46 | fb_blank etc.) */ | 46 | fb_blank etc.) */ |
47 | int (* const get_brightness)(struct backlight_device *); | 47 | int (*get_brightness)(struct backlight_device *); |
48 | /* Check if given framebuffer device is the one bound to this backlight; | 48 | /* Check if given framebuffer device is the one bound to this backlight; |
49 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ | 49 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ |
50 | int (* const check_fb)(struct fb_info *); | 50 | int (*check_fb)(struct backlight_device *, struct fb_info *); |
51 | }; | 51 | }; |
52 | 52 | ||
53 | /* This structure defines all the properties of a backlight */ | 53 | /* This structure defines all the properties of a backlight */ |
@@ -103,7 +103,8 @@ static inline void backlight_update_status(struct backlight_device *bd) | |||
103 | } | 103 | } |
104 | 104 | ||
105 | extern struct backlight_device *backlight_device_register(const char *name, | 105 | extern struct backlight_device *backlight_device_register(const char *name, |
106 | struct device *dev, void *devdata, const struct backlight_ops *ops); | 106 | struct device *dev, void *devdata, const struct backlight_ops *ops, |
107 | const struct backlight_properties *props); | ||
107 | extern void backlight_device_unregister(struct backlight_device *bd); | 108 | extern void backlight_device_unregister(struct backlight_device *bd); |
108 | extern void backlight_force_update(struct backlight_device *bd, | 109 | extern void backlight_force_update(struct backlight_device *bd, |
109 | enum backlight_update_reason reason); | 110 | enum backlight_update_reason reason); |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index c9bbcb2a75ae..b8ad1ea99586 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -37,16 +37,24 @@ extern void cgroup_post_fork(struct task_struct *p); | |||
37 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); | 37 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); |
38 | extern int cgroupstats_build(struct cgroupstats *stats, | 38 | extern int cgroupstats_build(struct cgroupstats *stats, |
39 | struct dentry *dentry); | 39 | struct dentry *dentry); |
40 | extern int cgroup_load_subsys(struct cgroup_subsys *ss); | ||
41 | extern void cgroup_unload_subsys(struct cgroup_subsys *ss); | ||
40 | 42 | ||
41 | extern const struct file_operations proc_cgroup_operations; | 43 | extern const struct file_operations proc_cgroup_operations; |
42 | 44 | ||
43 | /* Define the enumeration of all cgroup subsystems */ | 45 | /* Define the enumeration of all builtin cgroup subsystems */ |
44 | #define SUBSYS(_x) _x ## _subsys_id, | 46 | #define SUBSYS(_x) _x ## _subsys_id, |
45 | enum cgroup_subsys_id { | 47 | enum cgroup_subsys_id { |
46 | #include <linux/cgroup_subsys.h> | 48 | #include <linux/cgroup_subsys.h> |
47 | CGROUP_SUBSYS_COUNT | 49 | CGROUP_BUILTIN_SUBSYS_COUNT |
48 | }; | 50 | }; |
49 | #undef SUBSYS | 51 | #undef SUBSYS |
52 | /* | ||
53 | * This define indicates the maximum number of subsystems that can be loaded | ||
54 | * at once. We limit to this many since cgroupfs_root has subsys_bits to keep | ||
55 | * track of all of them. | ||
56 | */ | ||
57 | #define CGROUP_SUBSYS_COUNT (BITS_PER_BYTE*sizeof(unsigned long)) | ||
50 | 58 | ||
51 | /* Per-subsystem/per-cgroup state maintained by the system. */ | 59 | /* Per-subsystem/per-cgroup state maintained by the system. */ |
52 | struct cgroup_subsys_state { | 60 | struct cgroup_subsys_state { |
@@ -76,6 +84,12 @@ enum { | |||
76 | CSS_REMOVED, /* This CSS is dead */ | 84 | CSS_REMOVED, /* This CSS is dead */ |
77 | }; | 85 | }; |
78 | 86 | ||
87 | /* Caller must verify that the css is not for root cgroup */ | ||
88 | static inline void __css_get(struct cgroup_subsys_state *css, int count) | ||
89 | { | ||
90 | atomic_add(count, &css->refcnt); | ||
91 | } | ||
92 | |||
79 | /* | 93 | /* |
80 | * Call css_get() to hold a reference on the css; it can be used | 94 | * Call css_get() to hold a reference on the css; it can be used |
81 | * for a reference obtained via: | 95 | * for a reference obtained via: |
@@ -87,7 +101,7 @@ static inline void css_get(struct cgroup_subsys_state *css) | |||
87 | { | 101 | { |
88 | /* We don't need to reference count the root state */ | 102 | /* We don't need to reference count the root state */ |
89 | if (!test_bit(CSS_ROOT, &css->flags)) | 103 | if (!test_bit(CSS_ROOT, &css->flags)) |
90 | atomic_inc(&css->refcnt); | 104 | __css_get(css, 1); |
91 | } | 105 | } |
92 | 106 | ||
93 | static inline bool css_is_removed(struct cgroup_subsys_state *css) | 107 | static inline bool css_is_removed(struct cgroup_subsys_state *css) |
@@ -118,11 +132,11 @@ static inline bool css_tryget(struct cgroup_subsys_state *css) | |||
118 | * css_get() or css_tryget() | 132 | * css_get() or css_tryget() |
119 | */ | 133 | */ |
120 | 134 | ||
121 | extern void __css_put(struct cgroup_subsys_state *css); | 135 | extern void __css_put(struct cgroup_subsys_state *css, int count); |
122 | static inline void css_put(struct cgroup_subsys_state *css) | 136 | static inline void css_put(struct cgroup_subsys_state *css) |
123 | { | 137 | { |
124 | if (!test_bit(CSS_ROOT, &css->flags)) | 138 | if (!test_bit(CSS_ROOT, &css->flags)) |
125 | __css_put(css); | 139 | __css_put(css, 1); |
126 | } | 140 | } |
127 | 141 | ||
128 | /* bits in struct cgroup flags field */ | 142 | /* bits in struct cgroup flags field */ |
@@ -221,6 +235,10 @@ struct cgroup { | |||
221 | 235 | ||
222 | /* For RCU-protected deletion */ | 236 | /* For RCU-protected deletion */ |
223 | struct rcu_head rcu_head; | 237 | struct rcu_head rcu_head; |
238 | |||
239 | /* List of events which userspace want to recieve */ | ||
240 | struct list_head event_list; | ||
241 | spinlock_t event_list_lock; | ||
224 | }; | 242 | }; |
225 | 243 | ||
226 | /* | 244 | /* |
@@ -258,7 +276,8 @@ struct css_set { | |||
258 | /* | 276 | /* |
259 | * Set of subsystem states, one for each subsystem. This array | 277 | * Set of subsystem states, one for each subsystem. This array |
260 | * is immutable after creation apart from the init_css_set | 278 | * is immutable after creation apart from the init_css_set |
261 | * during subsystem registration (at boot time). | 279 | * during subsystem registration (at boot time) and modular subsystem |
280 | * loading/unloading. | ||
262 | */ | 281 | */ |
263 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; | 282 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; |
264 | 283 | ||
@@ -363,6 +382,23 @@ struct cftype { | |||
363 | int (*trigger)(struct cgroup *cgrp, unsigned int event); | 382 | int (*trigger)(struct cgroup *cgrp, unsigned int event); |
364 | 383 | ||
365 | int (*release)(struct inode *inode, struct file *file); | 384 | int (*release)(struct inode *inode, struct file *file); |
385 | |||
386 | /* | ||
387 | * register_event() callback will be used to add new userspace | ||
388 | * waiter for changes related to the cftype. Implement it if | ||
389 | * you want to provide this functionality. Use eventfd_signal() | ||
390 | * on eventfd to send notification to userspace. | ||
391 | */ | ||
392 | int (*register_event)(struct cgroup *cgrp, struct cftype *cft, | ||
393 | struct eventfd_ctx *eventfd, const char *args); | ||
394 | /* | ||
395 | * unregister_event() callback will be called when userspace | ||
396 | * closes the eventfd or on cgroup removing. | ||
397 | * This callback must be implemented, if you want provide | ||
398 | * notification functionality. | ||
399 | */ | ||
400 | int (*unregister_event)(struct cgroup *cgrp, struct cftype *cft, | ||
401 | struct eventfd_ctx *eventfd); | ||
366 | }; | 402 | }; |
367 | 403 | ||
368 | struct cgroup_scanner { | 404 | struct cgroup_scanner { |
@@ -428,6 +464,8 @@ struct cgroup_subsys { | |||
428 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 464 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
429 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 465 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
430 | struct task_struct *tsk, bool threadgroup); | 466 | struct task_struct *tsk, bool threadgroup); |
467 | void (*cancel_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | ||
468 | struct task_struct *tsk, bool threadgroup); | ||
431 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 469 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
432 | struct cgroup *old_cgrp, struct task_struct *tsk, | 470 | struct cgroup *old_cgrp, struct task_struct *tsk, |
433 | bool threadgroup); | 471 | bool threadgroup); |
@@ -472,6 +510,9 @@ struct cgroup_subsys { | |||
472 | /* used when use_id == true */ | 510 | /* used when use_id == true */ |
473 | struct idr idr; | 511 | struct idr idr; |
474 | spinlock_t id_lock; | 512 | spinlock_t id_lock; |
513 | |||
514 | /* should be defined only by modular subsystems */ | ||
515 | struct module *module; | ||
475 | }; | 516 | }; |
476 | 517 | ||
477 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; | 518 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; |
diff --git a/include/linux/compat.h b/include/linux/compat.h index ef68119a4fd2..717c691ecd8e 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -23,6 +23,7 @@ | |||
23 | typedef __compat_uid32_t compat_uid_t; | 23 | typedef __compat_uid32_t compat_uid_t; |
24 | typedef __compat_gid32_t compat_gid_t; | 24 | typedef __compat_gid32_t compat_gid_t; |
25 | 25 | ||
26 | struct compat_sel_arg_struct; | ||
26 | struct rusage; | 27 | struct rusage; |
27 | 28 | ||
28 | struct compat_itimerspec { | 29 | struct compat_itimerspec { |
@@ -249,6 +250,8 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | |||
249 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 250 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, |
250 | struct compat_timeval __user *tvp); | 251 | struct compat_timeval __user *tvp); |
251 | 252 | ||
253 | asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg); | ||
254 | |||
252 | asmlinkage long compat_sys_wait4(compat_pid_t pid, | 255 | asmlinkage long compat_sys_wait4(compat_pid_t pid, |
253 | compat_uint_t __user *stat_addr, int options, | 256 | compat_uint_t __user *stat_addr, int options, |
254 | struct compat_rusage __user *ru); | 257 | struct compat_rusage __user *ru); |
diff --git a/include/linux/coredump.h b/include/linux/coredump.h index b3c91d7cede4..8ba66a9d9022 100644 --- a/include/linux/coredump.h +++ b/include/linux/coredump.h | |||
@@ -16,6 +16,8 @@ static inline int dump_write(struct file *file, const void *addr, int nr) | |||
16 | 16 | ||
17 | static inline int dump_seek(struct file *file, loff_t off) | 17 | static inline int dump_seek(struct file *file, loff_t off) |
18 | { | 18 | { |
19 | int ret = 1; | ||
20 | |||
19 | if (file->f_op->llseek && file->f_op->llseek != no_llseek) { | 21 | if (file->f_op->llseek && file->f_op->llseek != no_llseek) { |
20 | if (file->f_op->llseek(file, off, SEEK_CUR) < 0) | 22 | if (file->f_op->llseek(file, off, SEEK_CUR) < 0) |
21 | return 0; | 23 | return 0; |
@@ -29,13 +31,15 @@ static inline int dump_seek(struct file *file, loff_t off) | |||
29 | 31 | ||
30 | if (n > PAGE_SIZE) | 32 | if (n > PAGE_SIZE) |
31 | n = PAGE_SIZE; | 33 | n = PAGE_SIZE; |
32 | if (!dump_write(file, buf, n)) | 34 | if (!dump_write(file, buf, n)) { |
33 | return 0; | 35 | ret = 0; |
36 | break; | ||
37 | } | ||
34 | off -= n; | 38 | off -= n; |
35 | } | 39 | } |
36 | free_page((unsigned long)buf); | 40 | free_page((unsigned long)buf); |
37 | } | 41 | } |
38 | return 1; | 42 | return ret; |
39 | } | 43 | } |
40 | 44 | ||
41 | #endif /* _LINUX_COREDUMP_H */ | 45 | #endif /* _LINUX_COREDUMP_H */ |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 4db09f89b637..52507c3e1387 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -280,7 +280,7 @@ static inline void put_cred(const struct cred *_cred) | |||
280 | * task or by holding tasklist_lock to prevent it from being unlinked. | 280 | * task or by holding tasklist_lock to prevent it from being unlinked. |
281 | */ | 281 | */ |
282 | #define __task_cred(task) \ | 282 | #define __task_cred(task) \ |
283 | ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_is_held(&tasklist_lock)))) | 283 | ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_tasklist_lock_is_held()))) |
284 | 284 | ||
285 | /** | 285 | /** |
286 | * get_task_cred - Get another task's objective credentials | 286 | * get_task_cred - Get another task's objective credentials |
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h index 5032b9a31ae7..ad5ec1d0475e 100644 --- a/include/linux/decompress/mm.h +++ b/include/linux/decompress/mm.h | |||
@@ -14,11 +14,21 @@ | |||
14 | 14 | ||
15 | /* Code active when included from pre-boot environment: */ | 15 | /* Code active when included from pre-boot environment: */ |
16 | 16 | ||
17 | /* | ||
18 | * Some architectures want to ensure there is no local data in their | ||
19 | * pre-boot environment, so that data can arbitarily relocated (via | ||
20 | * GOT references). This is achieved by defining STATIC_RW_DATA to | ||
21 | * be null. | ||
22 | */ | ||
23 | #ifndef STATIC_RW_DATA | ||
24 | #define STATIC_RW_DATA static | ||
25 | #endif | ||
26 | |||
17 | /* A trivial malloc implementation, adapted from | 27 | /* A trivial malloc implementation, adapted from |
18 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | 28 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 |
19 | */ | 29 | */ |
20 | static unsigned long malloc_ptr; | 30 | STATIC_RW_DATA unsigned long malloc_ptr; |
21 | static int malloc_count; | 31 | STATIC_RW_DATA int malloc_count; |
22 | 32 | ||
23 | static void *malloc(int size) | 33 | static void *malloc(int size) |
24 | { | 34 | { |
diff --git a/include/linux/device.h b/include/linux/device.h index b30527db3ac0..182192892d45 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -106,7 +106,7 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
106 | 106 | ||
107 | /* All 4 notifers below get called with the target struct device * | 107 | /* All 4 notifers below get called with the target struct device * |
108 | * as an argument. Note that those functions are likely to be called | 108 | * as an argument. Note that those functions are likely to be called |
109 | * with the device semaphore held in the core, so be careful. | 109 | * with the device lock held in the core, so be careful. |
110 | */ | 110 | */ |
111 | #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ | 111 | #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ |
112 | #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ | 112 | #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ |
@@ -251,8 +251,10 @@ extern struct device *class_find_device(struct class *class, | |||
251 | 251 | ||
252 | struct class_attribute { | 252 | struct class_attribute { |
253 | struct attribute attr; | 253 | struct attribute attr; |
254 | ssize_t (*show)(struct class *class, char *buf); | 254 | ssize_t (*show)(struct class *class, struct class_attribute *attr, |
255 | ssize_t (*store)(struct class *class, const char *buf, size_t count); | 255 | char *buf); |
256 | ssize_t (*store)(struct class *class, struct class_attribute *attr, | ||
257 | const char *buf, size_t count); | ||
256 | }; | 258 | }; |
257 | 259 | ||
258 | #define CLASS_ATTR(_name, _mode, _show, _store) \ | 260 | #define CLASS_ATTR(_name, _mode, _show, _store) \ |
@@ -263,6 +265,23 @@ extern int __must_check class_create_file(struct class *class, | |||
263 | extern void class_remove_file(struct class *class, | 265 | extern void class_remove_file(struct class *class, |
264 | const struct class_attribute *attr); | 266 | const struct class_attribute *attr); |
265 | 267 | ||
268 | /* Simple class attribute that is just a static string */ | ||
269 | |||
270 | struct class_attribute_string { | ||
271 | struct class_attribute attr; | ||
272 | char *str; | ||
273 | }; | ||
274 | |||
275 | /* Currently read-only only */ | ||
276 | #define _CLASS_ATTR_STRING(_name, _mode, _str) \ | ||
277 | { __ATTR(_name, _mode, show_class_attr_string, NULL), _str } | ||
278 | #define CLASS_ATTR_STRING(_name, _mode, _str) \ | ||
279 | struct class_attribute_string class_attr_##_name = \ | ||
280 | _CLASS_ATTR_STRING(_name, _mode, _str) | ||
281 | |||
282 | extern ssize_t show_class_attr_string(struct class *class, struct class_attribute *attr, | ||
283 | char *buf); | ||
284 | |||
266 | struct class_interface { | 285 | struct class_interface { |
267 | struct list_head node; | 286 | struct list_head node; |
268 | struct class *class; | 287 | struct class *class; |
@@ -489,6 +508,21 @@ static inline bool device_async_suspend_enabled(struct device *dev) | |||
489 | return !!dev->power.async_suspend; | 508 | return !!dev->power.async_suspend; |
490 | } | 509 | } |
491 | 510 | ||
511 | static inline void device_lock(struct device *dev) | ||
512 | { | ||
513 | down(&dev->sem); | ||
514 | } | ||
515 | |||
516 | static inline int device_trylock(struct device *dev) | ||
517 | { | ||
518 | return down_trylock(&dev->sem); | ||
519 | } | ||
520 | |||
521 | static inline void device_unlock(struct device *dev) | ||
522 | { | ||
523 | up(&dev->sem); | ||
524 | } | ||
525 | |||
492 | void driver_init(void); | 526 | void driver_init(void); |
493 | 527 | ||
494 | /* | 528 | /* |
diff --git a/include/linux/dm9000.h b/include/linux/dm9000.h index c30879cf93bc..96e87693d933 100644 --- a/include/linux/dm9000.h +++ b/include/linux/dm9000.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define DM9000_PLATF_NO_EEPROM (0x0010) | 23 | #define DM9000_PLATF_NO_EEPROM (0x0010) |
24 | #define DM9000_PLATF_SIMPLE_PHY (0x0020) /* Use NSR to find LinkStatus */ | 24 | #define DM9000_PLATF_SIMPLE_PHY (0x0020) /* Use NSR to find LinkStatus */ |
25 | 25 | ||
26 | /* platfrom data for platfrom device structure's platfrom_data field */ | 26 | /* platform data for platform device structure's platform_data field */ |
27 | 27 | ||
28 | struct dm9000_plat_data { | 28 | struct dm9000_plat_data { |
29 | unsigned int flags; | 29 | unsigned int flags; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 91b761846061..ca32ed78b057 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -127,6 +127,14 @@ static inline u64 dma_get_mask(struct device *dev) | |||
127 | return DMA_BIT_MASK(32); | 127 | return DMA_BIT_MASK(32); |
128 | } | 128 | } |
129 | 129 | ||
130 | static inline int dma_set_coherent_mask(struct device *dev, u64 mask) | ||
131 | { | ||
132 | if (!dma_supported(dev, mask)) | ||
133 | return -EIO; | ||
134 | dev->coherent_dma_mask = mask; | ||
135 | return 0; | ||
136 | } | ||
137 | |||
130 | extern u64 dma_get_required_mask(struct device *dev); | 138 | extern u64 dma_get_required_mask(struct device *dev); |
131 | 139 | ||
132 | static inline unsigned int dma_get_max_seg_size(struct device *dev) | 140 | static inline unsigned int dma_get_max_seg_size(struct device *dev) |
@@ -232,4 +240,20 @@ struct dma_attrs; | |||
232 | 240 | ||
233 | #endif /* CONFIG_HAVE_DMA_ATTRS */ | 241 | #endif /* CONFIG_HAVE_DMA_ATTRS */ |
234 | 242 | ||
243 | #ifdef CONFIG_NEED_DMA_MAP_STATE | ||
244 | #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME | ||
245 | #define DEFINE_DMA_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME | ||
246 | #define dma_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME) | ||
247 | #define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) (((PTR)->ADDR_NAME) = (VAL)) | ||
248 | #define dma_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) | ||
249 | #define dma_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) | ||
250 | #else | ||
251 | #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) | ||
252 | #define DEFINE_DMA_UNMAP_LEN(LEN_NAME) | ||
253 | #define dma_unmap_addr(PTR, ADDR_NAME) (0) | ||
254 | #define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
255 | #define dma_unmap_len(PTR, LEN_NAME) (0) | ||
256 | #define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
257 | #endif | ||
258 | |||
235 | #endif | 259 | #endif |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index cca1c3de140d..b33f316bb92e 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -61,6 +61,13 @@ struct ethtool_drvinfo { | |||
61 | /* For PCI devices, use pci_name(pci_dev). */ | 61 | /* For PCI devices, use pci_name(pci_dev). */ |
62 | char reserved1[32]; | 62 | char reserved1[32]; |
63 | char reserved2[12]; | 63 | char reserved2[12]; |
64 | /* | ||
65 | * Some struct members below are filled in | ||
66 | * using ops->get_sset_count(). Obtaining | ||
67 | * this info from ethtool_drvinfo is now | ||
68 | * deprecated; Use ETHTOOL_GSSET_INFO | ||
69 | * instead. | ||
70 | */ | ||
64 | __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */ | 71 | __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */ |
65 | __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ | 72 | __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ |
66 | __u32 testinfo_len; | 73 | __u32 testinfo_len; |
@@ -253,6 +260,17 @@ struct ethtool_gstrings { | |||
253 | __u8 data[0]; | 260 | __u8 data[0]; |
254 | }; | 261 | }; |
255 | 262 | ||
263 | struct ethtool_sset_info { | ||
264 | __u32 cmd; /* ETHTOOL_GSSET_INFO */ | ||
265 | __u32 reserved; | ||
266 | __u64 sset_mask; /* input: each bit selects an sset to query */ | ||
267 | /* output: each bit a returned sset */ | ||
268 | __u32 data[0]; /* ETH_SS_xxx count, in order, based on bits | ||
269 | in sset_mask. One bit implies one | ||
270 | __u32, two bits implies two | ||
271 | __u32's, etc. */ | ||
272 | }; | ||
273 | |||
256 | enum ethtool_test_flags { | 274 | enum ethtool_test_flags { |
257 | ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ | 275 | ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ |
258 | ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ | 276 | ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ |
@@ -606,9 +624,9 @@ struct ethtool_ops { | |||
606 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | 624 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ |
607 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ | 625 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ |
608 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ | 626 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ |
609 | 627 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | |
610 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | 628 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ |
611 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ | 629 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ |
612 | 630 | ||
613 | /* compatibility with older code */ | 631 | /* compatibility with older code */ |
614 | #define SPARC_ETH_GSET ETHTOOL_GSET | 632 | #define SPARC_ETH_GSET ETHTOOL_GSET |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 6b7c444ab8f6..c0f4b364c711 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -131,12 +131,12 @@ struct ftrace_event_call { | |||
131 | void *mod; | 131 | void *mod; |
132 | void *data; | 132 | void *data; |
133 | 133 | ||
134 | int profile_count; | 134 | int perf_refcount; |
135 | int (*profile_enable)(struct ftrace_event_call *); | 135 | int (*perf_event_enable)(struct ftrace_event_call *); |
136 | void (*profile_disable)(struct ftrace_event_call *); | 136 | void (*perf_event_disable)(struct ftrace_event_call *); |
137 | }; | 137 | }; |
138 | 138 | ||
139 | #define FTRACE_MAX_PROFILE_SIZE 2048 | 139 | #define PERF_MAX_TRACE_SIZE 2048 |
140 | 140 | ||
141 | #define MAX_FILTER_PRED 32 | 141 | #define MAX_FILTER_PRED 32 |
142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
@@ -187,22 +187,25 @@ do { \ | |||
187 | 187 | ||
188 | #ifdef CONFIG_PERF_EVENTS | 188 | #ifdef CONFIG_PERF_EVENTS |
189 | struct perf_event; | 189 | struct perf_event; |
190 | extern int ftrace_profile_enable(int event_id); | 190 | |
191 | extern void ftrace_profile_disable(int event_id); | 191 | DECLARE_PER_CPU(struct pt_regs, perf_trace_regs); |
192 | |||
193 | extern int perf_trace_enable(int event_id); | ||
194 | extern void perf_trace_disable(int event_id); | ||
192 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | 195 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, |
193 | char *filter_str); | 196 | char *filter_str); |
194 | extern void ftrace_profile_free_filter(struct perf_event *event); | 197 | extern void ftrace_profile_free_filter(struct perf_event *event); |
195 | extern void * | 198 | extern void * |
196 | ftrace_perf_buf_prepare(int size, unsigned short type, int *rctxp, | 199 | perf_trace_buf_prepare(int size, unsigned short type, int *rctxp, |
197 | unsigned long *irq_flags); | 200 | unsigned long *irq_flags); |
198 | 201 | ||
199 | static inline void | 202 | static inline void |
200 | ftrace_perf_buf_submit(void *raw_data, int size, int rctx, u64 addr, | 203 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, |
201 | u64 count, unsigned long irq_flags) | 204 | u64 count, unsigned long irq_flags, struct pt_regs *regs) |
202 | { | 205 | { |
203 | struct trace_entry *entry = raw_data; | 206 | struct trace_entry *entry = raw_data; |
204 | 207 | ||
205 | perf_tp_event(entry->type, addr, count, raw_data, size); | 208 | perf_tp_event(entry->type, addr, count, raw_data, size, regs); |
206 | perf_swevent_put_recursion_context(rctx); | 209 | perf_swevent_put_recursion_context(rctx); |
207 | local_irq_restore(irq_flags); | 210 | local_irq_restore(irq_flags); |
208 | } | 211 | } |
diff --git a/include/linux/hil.h b/include/linux/hil.h index 13352d7d0caf..523785a9de70 100644 --- a/include/linux/hil.h +++ b/include/linux/hil.h | |||
@@ -168,14 +168,14 @@ enum hil_command { | |||
168 | HIL_CMD_PR6 = 0x45, /* Prompt6 */ | 168 | HIL_CMD_PR6 = 0x45, /* Prompt6 */ |
169 | HIL_CMD_PR7 = 0x46, /* Prompt7 */ | 169 | HIL_CMD_PR7 = 0x46, /* Prompt7 */ |
170 | HIL_CMD_PRM = 0x47, /* Prompt (General Purpose) */ | 170 | HIL_CMD_PRM = 0x47, /* Prompt (General Purpose) */ |
171 | HIL_CMD_AK1 = 0x48, /* Acknowlege1 */ | 171 | HIL_CMD_AK1 = 0x48, /* Acknowledge1 */ |
172 | HIL_CMD_AK2 = 0x49, /* Acknowlege2 */ | 172 | HIL_CMD_AK2 = 0x49, /* Acknowledge2 */ |
173 | HIL_CMD_AK3 = 0x4a, /* Acknowlege3 */ | 173 | HIL_CMD_AK3 = 0x4a, /* Acknowledge3 */ |
174 | HIL_CMD_AK4 = 0x4b, /* Acknowlege4 */ | 174 | HIL_CMD_AK4 = 0x4b, /* Acknowledge4 */ |
175 | HIL_CMD_AK5 = 0x4c, /* Acknowlege5 */ | 175 | HIL_CMD_AK5 = 0x4c, /* Acknowledge5 */ |
176 | HIL_CMD_AK6 = 0x4d, /* Acknowlege6 */ | 176 | HIL_CMD_AK6 = 0x4d, /* Acknowledge6 */ |
177 | HIL_CMD_AK7 = 0x4e, /* Acknowlege7 */ | 177 | HIL_CMD_AK7 = 0x4e, /* Acknowledge7 */ |
178 | HIL_CMD_ACK = 0x4f, /* Acknowlege (General Purpose) */ | 178 | HIL_CMD_ACK = 0x4f, /* Acknowledge (General Purpose) */ |
179 | 179 | ||
180 | /* 0x50 to 0x78 reserved for future use */ | 180 | /* 0x50 to 0x78 reserved for future use */ |
181 | /* 0x80 to 0xEF device-specific commands */ | 181 | /* 0x80 to 0xEF device-specific commands */ |
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index 5977b724f7c6..c70d27af03f9 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
@@ -66,14 +66,14 @@ register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | |||
66 | perf_overflow_handler_t triggered, | 66 | perf_overflow_handler_t triggered, |
67 | int cpu); | 67 | int cpu); |
68 | 68 | ||
69 | extern struct perf_event ** | 69 | extern struct perf_event * __percpu * |
70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
71 | perf_overflow_handler_t triggered); | 71 | perf_overflow_handler_t triggered); |
72 | 72 | ||
73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); | 73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); |
74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); | 74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); |
75 | extern void unregister_hw_breakpoint(struct perf_event *bp); | 75 | extern void unregister_hw_breakpoint(struct perf_event *bp); |
76 | extern void unregister_wide_hw_breakpoint(struct perf_event **cpu_events); | 76 | extern void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events); |
77 | 77 | ||
78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); | 78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); |
79 | extern int dbg_release_bp_slot(struct perf_event *bp); | 79 | extern int dbg_release_bp_slot(struct perf_event *bp); |
@@ -100,7 +100,7 @@ static inline struct perf_event * | |||
100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | 100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, |
101 | perf_overflow_handler_t triggered, | 101 | perf_overflow_handler_t triggered, |
102 | int cpu) { return NULL; } | 102 | int cpu) { return NULL; } |
103 | static inline struct perf_event ** | 103 | static inline struct perf_event * __percpu * |
104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
105 | perf_overflow_handler_t triggered) { return NULL; } | 105 | perf_overflow_handler_t triggered) { return NULL; } |
106 | static inline int | 106 | static inline int |
@@ -109,7 +109,7 @@ static inline int | |||
109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } | 109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } |
110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } | 110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } |
111 | static inline void | 111 | static inline void |
112 | unregister_wide_hw_breakpoint(struct perf_event **cpu_events) { } | 112 | unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events) { } |
113 | static inline int | 113 | static inline int |
114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } | 114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } |
115 | static inline void release_bp_slot(struct perf_event *bp) { } | 115 | static inline void release_bp_slot(struct perf_event *bp) { } |
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h index 111334f5b922..4f98148c11c3 100644 --- a/include/linux/i2c-algo-bit.h +++ b/include/linux/i2c-algo-bit.h | |||
@@ -36,6 +36,8 @@ struct i2c_algo_bit_data { | |||
36 | void (*setscl) (void *data, int state); | 36 | void (*setscl) (void *data, int state); |
37 | int (*getsda) (void *data); | 37 | int (*getsda) (void *data); |
38 | int (*getscl) (void *data); | 38 | int (*getscl) (void *data); |
39 | int (*pre_xfer) (struct i2c_adapter *); | ||
40 | void (*post_xfer) (struct i2c_adapter *); | ||
39 | 41 | ||
40 | /* local settings */ | 42 | /* local settings */ |
41 | int udelay; /* half clock cycle time in us, | 43 | int udelay; /* half clock cycle time in us, |
diff --git a/include/linux/i2c-xiic.h b/include/linux/i2c-xiic.h new file mode 100644 index 000000000000..4f9f2256a97e --- /dev/null +++ b/include/linux/i2c-xiic.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * i2c-xiic.h | ||
3 | * Copyright (c) 2009 Intel Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | */ | ||
18 | |||
19 | /* Supports: | ||
20 | * Xilinx IIC | ||
21 | */ | ||
22 | |||
23 | #ifndef _LINUX_I2C_XIIC_H | ||
24 | #define _LINUX_I2C_XIIC_H | ||
25 | |||
26 | /** | ||
27 | * struct xiic_i2c_platform_data - Platform data of the Xilinx I2C driver | ||
28 | * @num_devices: Number of devices that shall be added when the driver | ||
29 | * is probed. | ||
30 | * @devices: The actuall devices to add. | ||
31 | * | ||
32 | * This purpose of this platform data struct is to be able to provide a number | ||
33 | * of devices that should be added to the I2C bus. The reason is that sometimes | ||
34 | * the I2C board info is not enough, a new PCI board can for instance be | ||
35 | * plugged into a standard PC, and the bus number might be unknown at | ||
36 | * early init time. | ||
37 | */ | ||
38 | struct xiic_i2c_platform_data { | ||
39 | u8 num_devices; | ||
40 | struct i2c_board_info const *devices; | ||
41 | }; | ||
42 | |||
43 | #endif /* _LINUX_I2C_XIIC_H */ | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index abec69b63d7e..b1ed1cd8e2a8 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -32,14 +32,6 @@ extern struct fs_struct init_fs; | |||
32 | } | 32 | } |
33 | 33 | ||
34 | extern struct nsproxy init_nsproxy; | 34 | extern struct nsproxy init_nsproxy; |
35 | #define INIT_NSPROXY(nsproxy) { \ | ||
36 | .pid_ns = &init_pid_ns, \ | ||
37 | .count = ATOMIC_INIT(1), \ | ||
38 | .uts_ns = &init_uts_ns, \ | ||
39 | .mnt_ns = NULL, \ | ||
40 | INIT_NET_NS(net_ns) \ | ||
41 | INIT_IPC_NS(ipc_ns) \ | ||
42 | } | ||
43 | 35 | ||
44 | #define INIT_SIGHAND(sighand) { \ | 36 | #define INIT_SIGHAND(sighand) { \ |
45 | .count = ATOMIC_INIT(1), \ | 37 | .count = ATOMIC_INIT(1), \ |
diff --git a/include/linux/input.h b/include/linux/input.h index dc24effb6d0e..7ed2251b33f1 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -58,10 +58,10 @@ struct input_absinfo { | |||
58 | 58 | ||
59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ | 60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
61 | #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ | 61 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
62 | #define EVIOCSREP _IOW('E', 0x03, int[2]) /* set repeat settings */ | 62 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
63 | #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ | 63 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
64 | #define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ | 64 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ |
65 | 65 | ||
66 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 66 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
67 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 67 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
@@ -1142,8 +1142,10 @@ struct input_dev { | |||
1142 | unsigned int keycodemax; | 1142 | unsigned int keycodemax; |
1143 | unsigned int keycodesize; | 1143 | unsigned int keycodesize; |
1144 | void *keycode; | 1144 | void *keycode; |
1145 | int (*setkeycode)(struct input_dev *dev, int scancode, int keycode); | 1145 | int (*setkeycode)(struct input_dev *dev, |
1146 | int (*getkeycode)(struct input_dev *dev, int scancode, int *keycode); | 1146 | unsigned int scancode, unsigned int keycode); |
1147 | int (*getkeycode)(struct input_dev *dev, | ||
1148 | unsigned int scancode, unsigned int *keycode); | ||
1147 | 1149 | ||
1148 | struct ff_device *ff; | 1150 | struct ff_device *ff; |
1149 | 1151 | ||
@@ -1415,8 +1417,10 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min | |||
1415 | dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); | 1417 | dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); |
1416 | } | 1418 | } |
1417 | 1419 | ||
1418 | int input_get_keycode(struct input_dev *dev, int scancode, int *keycode); | 1420 | int input_get_keycode(struct input_dev *dev, |
1419 | int input_set_keycode(struct input_dev *dev, int scancode, int keycode); | 1421 | unsigned int scancode, unsigned int *keycode); |
1422 | int input_set_keycode(struct input_dev *dev, | ||
1423 | unsigned int scancode, unsigned int keycode); | ||
1420 | 1424 | ||
1421 | extern struct class input_class; | 1425 | extern struct class input_class; |
1422 | 1426 | ||
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 1195a806fe0c..a0bb301afac0 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -42,7 +42,7 @@ struct io_context { | |||
42 | unsigned short ioprio; | 42 | unsigned short ioprio; |
43 | unsigned short ioprio_changed; | 43 | unsigned short ioprio_changed; |
44 | 44 | ||
45 | #ifdef CONFIG_BLK_CGROUP | 45 | #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE) |
46 | unsigned short cgroup_changed; | 46 | unsigned short cgroup_changed; |
47 | #endif | 47 | #endif |
48 | 48 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index dda98410d588..71ab79da7e7f 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -34,22 +34,24 @@ struct resource_list { | |||
34 | */ | 34 | */ |
35 | #define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */ | 35 | #define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */ |
36 | 36 | ||
37 | #define IORESOURCE_TYPE_BITS 0x00000f00 /* Resource type */ | 37 | #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */ |
38 | #define IORESOURCE_IO 0x00000100 | 38 | #define IORESOURCE_IO 0x00000100 |
39 | #define IORESOURCE_MEM 0x00000200 | 39 | #define IORESOURCE_MEM 0x00000200 |
40 | #define IORESOURCE_IRQ 0x00000400 | 40 | #define IORESOURCE_IRQ 0x00000400 |
41 | #define IORESOURCE_DMA 0x00000800 | 41 | #define IORESOURCE_DMA 0x00000800 |
42 | #define IORESOURCE_BUS 0x00001000 | ||
42 | 43 | ||
43 | #define IORESOURCE_PREFETCH 0x00001000 /* No side effects */ | 44 | #define IORESOURCE_PREFETCH 0x00002000 /* No side effects */ |
44 | #define IORESOURCE_READONLY 0x00002000 | 45 | #define IORESOURCE_READONLY 0x00004000 |
45 | #define IORESOURCE_CACHEABLE 0x00004000 | 46 | #define IORESOURCE_CACHEABLE 0x00008000 |
46 | #define IORESOURCE_RANGELENGTH 0x00008000 | 47 | #define IORESOURCE_RANGELENGTH 0x00010000 |
47 | #define IORESOURCE_SHADOWABLE 0x00010000 | 48 | #define IORESOURCE_SHADOWABLE 0x00020000 |
48 | 49 | ||
49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ | 50 | #define IORESOURCE_SIZEALIGN 0x00040000 /* size indicates alignment */ |
50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ | 51 | #define IORESOURCE_STARTALIGN 0x00080000 /* start field is alignment */ |
51 | 52 | ||
52 | #define IORESOURCE_MEM_64 0x00100000 | 53 | #define IORESOURCE_MEM_64 0x00100000 |
54 | #define IORESOURCE_WINDOW 0x00200000 /* forwarded by bridge */ | ||
53 | 55 | ||
54 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ | 56 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ |
55 | #define IORESOURCE_DISABLED 0x10000000 | 57 | #define IORESOURCE_DISABLED 0x10000000 |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 07baa38bce37..51952989ad42 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -62,11 +62,6 @@ extern struct ipc_namespace init_ipc_ns; | |||
62 | extern atomic_t nr_ipc_ns; | 62 | extern atomic_t nr_ipc_ns; |
63 | 63 | ||
64 | extern spinlock_t mq_lock; | 64 | extern spinlock_t mq_lock; |
65 | #if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC) | ||
66 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | ||
67 | #else | ||
68 | #define INIT_IPC_NS(ns) | ||
69 | #endif | ||
70 | 65 | ||
71 | #ifdef CONFIG_SYSVIPC | 66 | #ifdef CONFIG_SYSVIPC |
72 | extern int register_ipcns_notifier(struct ipc_namespace *); | 67 | extern int register_ipcns_notifier(struct ipc_namespace *); |
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index f7c9c75a2775..4b48318ac542 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/device.h> | 40 | #include <linux/device.h> |
41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
42 | #include <linux/ipmi_smi.h> | ||
43 | 42 | ||
44 | /* This files describes the interface for IPMI system management interface | 43 | /* This files describes the interface for IPMI system management interface |
45 | drivers to bind into the IPMI message handler. */ | 44 | drivers to bind into the IPMI message handler. */ |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 384ca8bbf1ac..facb27fe7de0 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #define KMOD_PATH_LEN 256 | 27 | #define KMOD_PATH_LEN 256 |
28 | 28 | ||
29 | #ifdef CONFIG_MODULES | 29 | #ifdef CONFIG_MODULES |
30 | extern char modprobe_path[]; /* for sysctl */ | ||
30 | /* modprobe exit status on success, -ve on error. Return value | 31 | /* modprobe exit status on success, -ve on error. Return value |
31 | * usually useless though. */ | 32 | * usually useless though. */ |
32 | extern int __request_module(bool wait, const char *name, ...) \ | 33 | extern int __request_module(bool wait, const char *name, ...) \ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 58ae8e00fcdd..3950d3c2850d 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -106,7 +106,7 @@ extern char *kobject_get_path(struct kobject *kobj, gfp_t flag); | |||
106 | 106 | ||
107 | struct kobj_type { | 107 | struct kobj_type { |
108 | void (*release)(struct kobject *kobj); | 108 | void (*release)(struct kobject *kobj); |
109 | struct sysfs_ops *sysfs_ops; | 109 | const struct sysfs_ops *sysfs_ops; |
110 | struct attribute **default_attrs; | 110 | struct attribute **default_attrs; |
111 | }; | 111 | }; |
112 | 112 | ||
@@ -118,9 +118,9 @@ struct kobj_uevent_env { | |||
118 | }; | 118 | }; |
119 | 119 | ||
120 | struct kset_uevent_ops { | 120 | struct kset_uevent_ops { |
121 | int (*filter)(struct kset *kset, struct kobject *kobj); | 121 | int (* const filter)(struct kset *kset, struct kobject *kobj); |
122 | const char *(*name)(struct kset *kset, struct kobject *kobj); | 122 | const char *(* const name)(struct kset *kset, struct kobject *kobj); |
123 | int (*uevent)(struct kset *kset, struct kobject *kobj, | 123 | int (* const uevent)(struct kset *kset, struct kobject *kobj, |
124 | struct kobj_uevent_env *env); | 124 | struct kobj_uevent_env *env); |
125 | }; | 125 | }; |
126 | 126 | ||
@@ -132,7 +132,7 @@ struct kobj_attribute { | |||
132 | const char *buf, size_t count); | 132 | const char *buf, size_t count); |
133 | }; | 133 | }; |
134 | 134 | ||
135 | extern struct sysfs_ops kobj_sysfs_ops; | 135 | extern const struct sysfs_ops kobj_sysfs_ops; |
136 | 136 | ||
137 | /** | 137 | /** |
138 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. | 138 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. |
@@ -155,14 +155,14 @@ struct kset { | |||
155 | struct list_head list; | 155 | struct list_head list; |
156 | spinlock_t list_lock; | 156 | spinlock_t list_lock; |
157 | struct kobject kobj; | 157 | struct kobject kobj; |
158 | struct kset_uevent_ops *uevent_ops; | 158 | const struct kset_uevent_ops *uevent_ops; |
159 | }; | 159 | }; |
160 | 160 | ||
161 | extern void kset_init(struct kset *kset); | 161 | extern void kset_init(struct kset *kset); |
162 | extern int __must_check kset_register(struct kset *kset); | 162 | extern int __must_check kset_register(struct kset *kset); |
163 | extern void kset_unregister(struct kset *kset); | 163 | extern void kset_unregister(struct kset *kset); |
164 | extern struct kset * __must_check kset_create_and_add(const char *name, | 164 | extern struct kset * __must_check kset_create_and_add(const char *name, |
165 | struct kset_uevent_ops *u, | 165 | const struct kset_uevent_ops *u, |
166 | struct kobject *parent_kobj); | 166 | struct kobject *parent_kobj); |
167 | 167 | ||
168 | static inline struct kset *to_kset(struct kobject *kobj) | 168 | static inline struct kset *to_kset(struct kobject *kobj) |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 10206a87da19..a03977a96d7e 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -12,6 +12,10 @@ | |||
12 | struct task_struct; | 12 | struct task_struct; |
13 | struct lockdep_map; | 13 | struct lockdep_map; |
14 | 14 | ||
15 | /* for sysctl */ | ||
16 | extern int prove_locking; | ||
17 | extern int lock_stat; | ||
18 | |||
15 | #ifdef CONFIG_LOCKDEP | 19 | #ifdef CONFIG_LOCKDEP |
16 | 20 | ||
17 | #include <linux/linkage.h> | 21 | #include <linux/linkage.h> |
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h index 3a2b2d9b0472..de48d167568b 100644 --- a/include/linux/lru_cache.h +++ b/include/linux/lru_cache.h | |||
@@ -64,7 +64,7 @@ For crash recovery after replication node failure, | |||
64 | usually the condition is softened to regions that _may_ have been target of | 64 | usually the condition is softened to regions that _may_ have been target of |
65 | in-flight WRITE IO, e.g. by only lazily clearing the on-disk write-intent | 65 | in-flight WRITE IO, e.g. by only lazily clearing the on-disk write-intent |
66 | bitmap, trading frequency of meta data transactions against amount of | 66 | bitmap, trading frequency of meta data transactions against amount of |
67 | (possibly unneccessary) resync traffic. | 67 | (possibly unnecessary) resync traffic. |
68 | 68 | ||
69 | If we set a hard limit on the area that may be "hot" at any given time, we | 69 | If we set a hard limit on the area that may be "hot" at any given time, we |
70 | limit the amount of resync traffic needed for crash recovery. | 70 | limit the amount of resync traffic needed for crash recovery. |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 1f9b119f4ace..44301c6affa8 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -124,7 +124,6 @@ static inline bool mem_cgroup_disabled(void) | |||
124 | return false; | 124 | return false; |
125 | } | 125 | } |
126 | 126 | ||
127 | extern bool mem_cgroup_oom_called(struct task_struct *task); | ||
128 | void mem_cgroup_update_file_mapped(struct page *page, int val); | 127 | void mem_cgroup_update_file_mapped(struct page *page, int val); |
129 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 128 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
130 | gfp_t gfp_mask, int nid, | 129 | gfp_t gfp_mask, int nid, |
@@ -258,11 +257,6 @@ static inline bool mem_cgroup_disabled(void) | |||
258 | return true; | 257 | return true; |
259 | } | 258 | } |
260 | 259 | ||
261 | static inline bool mem_cgroup_oom_called(struct task_struct *task) | ||
262 | { | ||
263 | return false; | ||
264 | } | ||
265 | |||
266 | static inline int | 260 | static inline int |
267 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg) | 261 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg) |
268 | { | 262 | { |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 1adfe779eb99..85582e1bcee9 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -36,6 +36,8 @@ struct memory_block { | |||
36 | struct sys_device sysdev; | 36 | struct sys_device sysdev; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | int arch_get_memory_phys_device(unsigned long start_pfn); | ||
40 | |||
39 | /* These states are exposed to userspace as text strings in sysfs */ | 41 | /* These states are exposed to userspace as text strings in sysfs */ |
40 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ | 42 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ |
41 | #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ | 43 | #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3899395a03de..e70f21beb4b4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -971,7 +971,13 @@ static inline void setmax_mm_hiwater_rss(unsigned long *maxrss, | |||
971 | *maxrss = hiwater_rss; | 971 | *maxrss = hiwater_rss; |
972 | } | 972 | } |
973 | 973 | ||
974 | #if defined(SPLIT_RSS_COUNTING) | ||
974 | void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); | 975 | void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); |
976 | #else | ||
977 | static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) | ||
978 | { | ||
979 | } | ||
980 | #endif | ||
975 | 981 | ||
976 | /* | 982 | /* |
977 | * A callback you can register to apply pressure to ageable caches. | 983 | * A callback you can register to apply pressure to ageable caches. |
@@ -1459,5 +1465,7 @@ extern void shake_page(struct page *p, int access); | |||
1459 | extern atomic_long_t mce_bad_pages; | 1465 | extern atomic_long_t mce_bad_pages; |
1460 | extern int soft_offline_page(struct page *page, int flags); | 1466 | extern int soft_offline_page(struct page *page, int flags); |
1461 | 1467 | ||
1468 | extern void dump_page(struct page *page); | ||
1469 | |||
1462 | #endif /* __KERNEL__ */ | 1470 | #endif /* __KERNEL__ */ |
1463 | #endif /* _LINUX_MM_H */ | 1471 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 048b46270aa5..b8bb9a6a1f37 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -203,7 +203,7 @@ enum { | |||
203 | NR_MM_COUNTERS | 203 | NR_MM_COUNTERS |
204 | }; | 204 | }; |
205 | 205 | ||
206 | #if USE_SPLIT_PTLOCKS | 206 | #if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU) |
207 | #define SPLIT_RSS_COUNTING | 207 | #define SPLIT_RSS_COUNTING |
208 | struct mm_rss_stat { | 208 | struct mm_rss_stat { |
209 | atomic_long_t count[NR_MM_COUNTERS]; | 209 | atomic_long_t count[NR_MM_COUNTERS]; |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index bc209d8b7b5c..cf9e458e96b0 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -342,7 +342,7 @@ struct zone { | |||
342 | * prev_priority holds the scanning priority for this zone. It is | 342 | * prev_priority holds the scanning priority for this zone. It is |
343 | * defined as the scanning priority at which we achieved our reclaim | 343 | * defined as the scanning priority at which we achieved our reclaim |
344 | * target at the previous try_to_free_pages() or balance_pgdat() | 344 | * target at the previous try_to_free_pages() or balance_pgdat() |
345 | * invokation. | 345 | * invocation. |
346 | * | 346 | * |
347 | * We use prev_priority as a measure of how much stress page reclaim is | 347 | * We use prev_priority as a measure of how much stress page reclaim is |
348 | * under - it drives the swappiness decision: whether to unmap mapped | 348 | * under - it drives the swappiness decision: whether to unmap mapped |
diff --git a/include/linux/module.h b/include/linux/module.h index dd618eb026aa..5e869ffd34aa 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -175,6 +175,7 @@ struct notifier_block; | |||
175 | 175 | ||
176 | #ifdef CONFIG_MODULES | 176 | #ifdef CONFIG_MODULES |
177 | 177 | ||
178 | extern int modules_disabled; /* for sysctl */ | ||
178 | /* Get/put a kernel symbol (calls must be symmetric) */ | 179 | /* Get/put a kernel symbol (calls must be symmetric) */ |
179 | void *__symbol_get(const char *symbol); | 180 | void *__symbol_get(const char *symbol); |
180 | void *__symbol_get_gpl(const char *symbol); | 181 | void *__symbol_get_gpl(const char *symbol); |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index ce38f1caa5e1..34066e65fdeb 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ | 15 | #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ |
16 | #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry)) | 16 | #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry)) |
17 | #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ | 17 | #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ |
18 | #define MSDOS_LONGNAME 256 /* maximum name length */ | ||
18 | #define CF_LE_W(v) le16_to_cpu(v) | 19 | #define CF_LE_W(v) le16_to_cpu(v) |
19 | #define CF_LE_L(v) le32_to_cpu(v) | 20 | #define CF_LE_L(v) le32_to_cpu(v) |
20 | #define CT_LE_W(v) cpu_to_le16(v) | 21 | #define CT_LE_W(v) cpu_to_le16(v) |
@@ -47,8 +48,8 @@ | |||
47 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ | 48 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ |
48 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) | 49 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) |
49 | 50 | ||
51 | #define FAT_LFN_LEN 255 /* maximum long name length */ | ||
50 | #define MSDOS_NAME 11 /* maximum name length */ | 52 | #define MSDOS_NAME 11 /* maximum name length */ |
51 | #define MSDOS_LONGNAME 256 /* maximum name length */ | ||
52 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ | 53 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ |
53 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ | 54 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ |
54 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ | 55 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index c4fa64b585ff..dba35e413371 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -483,7 +483,7 @@ static inline int num_node_state(enum node_states state) | |||
483 | type *name = kmalloc(sizeof(*name), gfp_flags) | 483 | type *name = kmalloc(sizeof(*name), gfp_flags) |
484 | #define NODEMASK_FREE(m) kfree(m) | 484 | #define NODEMASK_FREE(m) kfree(m) |
485 | #else | 485 | #else |
486 | #define NODEMASK_ALLOC(type, name, gfp_flags) type _name, *name = &_name | 486 | #define NODEMASK_ALLOC(type, name, gfp_flags) type _##name, *name = &_##name |
487 | #define NODEMASK_FREE(m) do {} while (0) | 487 | #define NODEMASK_FREE(m) do {} while (0) |
488 | #endif | 488 | #endif |
489 | 489 | ||
diff --git a/include/linux/of.h b/include/linux/of.h index f6d9cbc39c9c..a367e19bb3af 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -127,7 +127,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
127 | 127 | ||
128 | /* Default string compare functions, Allow arch asm/prom.h to override */ | 128 | /* Default string compare functions, Allow arch asm/prom.h to override */ |
129 | #if !defined(of_compat_cmp) | 129 | #if !defined(of_compat_cmp) |
130 | #define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l)) | 130 | #define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2)) |
131 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) | 131 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) |
132 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) | 132 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) |
133 | #endif | 133 | #endif |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index b0e4eb126236..30b08136fdf3 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -118,6 +118,8 @@ static inline void __init page_cgroup_init_flatmem(void) | |||
118 | #include <linux/swap.h> | 118 | #include <linux/swap.h> |
119 | 119 | ||
120 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 120 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
121 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | ||
122 | unsigned short old, unsigned short new); | ||
121 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); | 123 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); |
122 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); | 124 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); |
123 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); | 125 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); |
diff --git a/include/linux/pci-dma.h b/include/linux/pci-dma.h new file mode 100644 index 000000000000..549a041f9c08 --- /dev/null +++ b/include/linux/pci-dma.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _LINUX_PCI_DMA_H | ||
2 | #define _LINUX_PCI_DMA_H | ||
3 | |||
4 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) DEFINE_DMA_UNMAP_ADDR(ADDR_NAME); | ||
5 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) DEFINE_DMA_UNMAP_LEN(LEN_NAME); | ||
6 | #define pci_unmap_addr dma_unmap_addr | ||
7 | #define pci_unmap_addr_set dma_unmap_addr_set | ||
8 | #define pci_unmap_len dma_unmap_len | ||
9 | #define pci_unmap_len_set dma_unmap_len_set | ||
10 | |||
11 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index cd5809a5963e..a788fa12ff31 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -769,8 +769,6 @@ int pci_try_set_mwi(struct pci_dev *dev); | |||
769 | void pci_clear_mwi(struct pci_dev *dev); | 769 | void pci_clear_mwi(struct pci_dev *dev); |
770 | void pci_intx(struct pci_dev *dev, int enable); | 770 | void pci_intx(struct pci_dev *dev, int enable); |
771 | void pci_msi_off(struct pci_dev *dev); | 771 | void pci_msi_off(struct pci_dev *dev); |
772 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | ||
773 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | ||
774 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); | 772 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); |
775 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); | 773 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); |
776 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 774 | int pcix_get_max_mmrbc(struct pci_dev *dev); |
@@ -904,6 +902,7 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode, | |||
904 | unsigned int command_bits, bool change_bridge); | 902 | unsigned int command_bits, bool change_bridge); |
905 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 903 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
906 | 904 | ||
905 | #include <linux/pci-dma.h> | ||
907 | #include <linux/dmapool.h> | 906 | #include <linux/dmapool.h> |
908 | 907 | ||
909 | #define pci_pool dma_pool | 908 | #define pci_pool dma_pool |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 7b18b4fd5df7..95477038a72a 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -452,6 +452,8 @@ enum perf_callchain_context { | |||
452 | #include <linux/fs.h> | 452 | #include <linux/fs.h> |
453 | #include <linux/pid_namespace.h> | 453 | #include <linux/pid_namespace.h> |
454 | #include <linux/workqueue.h> | 454 | #include <linux/workqueue.h> |
455 | #include <linux/ftrace.h> | ||
456 | #include <linux/cpu.h> | ||
455 | #include <asm/atomic.h> | 457 | #include <asm/atomic.h> |
456 | 458 | ||
457 | #define PERF_MAX_STACK_DEPTH 255 | 459 | #define PERF_MAX_STACK_DEPTH 255 |
@@ -487,9 +489,8 @@ struct hw_perf_event { | |||
487 | struct hrtimer hrtimer; | 489 | struct hrtimer hrtimer; |
488 | }; | 490 | }; |
489 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 491 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
490 | union { /* breakpoint */ | 492 | /* breakpoint */ |
491 | struct arch_hw_breakpoint info; | 493 | struct arch_hw_breakpoint info; |
492 | }; | ||
493 | #endif | 494 | #endif |
494 | }; | 495 | }; |
495 | atomic64_t prev_count; | 496 | atomic64_t prev_count; |
@@ -802,6 +803,13 @@ struct perf_sample_data { | |||
802 | struct perf_raw_record *raw; | 803 | struct perf_raw_record *raw; |
803 | }; | 804 | }; |
804 | 805 | ||
806 | static inline | ||
807 | void perf_sample_data_init(struct perf_sample_data *data, u64 addr) | ||
808 | { | ||
809 | data->addr = addr; | ||
810 | data->raw = NULL; | ||
811 | } | ||
812 | |||
805 | extern void perf_output_sample(struct perf_output_handle *handle, | 813 | extern void perf_output_sample(struct perf_output_handle *handle, |
806 | struct perf_event_header *header, | 814 | struct perf_event_header *header, |
807 | struct perf_sample_data *data, | 815 | struct perf_sample_data *data, |
@@ -841,6 +849,44 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | |||
841 | __perf_sw_event(event_id, nr, nmi, regs, addr); | 849 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
842 | } | 850 | } |
843 | 851 | ||
852 | extern void | ||
853 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); | ||
854 | |||
855 | /* | ||
856 | * Take a snapshot of the regs. Skip ip and frame pointer to | ||
857 | * the nth caller. We only need a few of the regs: | ||
858 | * - ip for PERF_SAMPLE_IP | ||
859 | * - cs for user_mode() tests | ||
860 | * - bp for callchains | ||
861 | * - eflags, for future purposes, just in case | ||
862 | */ | ||
863 | static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) | ||
864 | { | ||
865 | unsigned long ip; | ||
866 | |||
867 | memset(regs, 0, sizeof(*regs)); | ||
868 | |||
869 | switch (skip) { | ||
870 | case 1 : | ||
871 | ip = CALLER_ADDR0; | ||
872 | break; | ||
873 | case 2 : | ||
874 | ip = CALLER_ADDR1; | ||
875 | break; | ||
876 | case 3 : | ||
877 | ip = CALLER_ADDR2; | ||
878 | break; | ||
879 | case 4: | ||
880 | ip = CALLER_ADDR3; | ||
881 | break; | ||
882 | /* No need to support further for now */ | ||
883 | default: | ||
884 | ip = 0; | ||
885 | } | ||
886 | |||
887 | return perf_arch_fetch_caller_regs(regs, ip, skip); | ||
888 | } | ||
889 | |||
844 | extern void __perf_event_mmap(struct vm_area_struct *vma); | 890 | extern void __perf_event_mmap(struct vm_area_struct *vma); |
845 | 891 | ||
846 | static inline void perf_event_mmap(struct vm_area_struct *vma) | 892 | static inline void perf_event_mmap(struct vm_area_struct *vma) |
@@ -858,8 +904,24 @@ extern int sysctl_perf_event_paranoid; | |||
858 | extern int sysctl_perf_event_mlock; | 904 | extern int sysctl_perf_event_mlock; |
859 | extern int sysctl_perf_event_sample_rate; | 905 | extern int sysctl_perf_event_sample_rate; |
860 | 906 | ||
907 | static inline bool perf_paranoid_tracepoint_raw(void) | ||
908 | { | ||
909 | return sysctl_perf_event_paranoid > -1; | ||
910 | } | ||
911 | |||
912 | static inline bool perf_paranoid_cpu(void) | ||
913 | { | ||
914 | return sysctl_perf_event_paranoid > 0; | ||
915 | } | ||
916 | |||
917 | static inline bool perf_paranoid_kernel(void) | ||
918 | { | ||
919 | return sysctl_perf_event_paranoid > 1; | ||
920 | } | ||
921 | |||
861 | extern void perf_event_init(void); | 922 | extern void perf_event_init(void); |
862 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); | 923 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, |
924 | int entry_size, struct pt_regs *regs); | ||
863 | extern void perf_bp_event(struct perf_event *event, void *data); | 925 | extern void perf_bp_event(struct perf_event *event, void *data); |
864 | 926 | ||
865 | #ifndef perf_misc_flags | 927 | #ifndef perf_misc_flags |
@@ -915,5 +977,21 @@ static inline void perf_event_disable(struct perf_event *event) { } | |||
915 | #define perf_output_put(handle, x) \ | 977 | #define perf_output_put(handle, x) \ |
916 | perf_output_copy((handle), &(x), sizeof(x)) | 978 | perf_output_copy((handle), &(x), sizeof(x)) |
917 | 979 | ||
980 | /* | ||
981 | * This has to have a higher priority than migration_notifier in sched.c. | ||
982 | */ | ||
983 | #define perf_cpu_notifier(fn) \ | ||
984 | do { \ | ||
985 | static struct notifier_block fn##_nb __cpuinitdata = \ | ||
986 | { .notifier_call = fn, .priority = 20 }; \ | ||
987 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | ||
988 | (void *)(unsigned long)smp_processor_id()); \ | ||
989 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | ||
990 | (void *)(unsigned long)smp_processor_id()); \ | ||
991 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ | ||
992 | (void *)(unsigned long)smp_processor_id()); \ | ||
993 | register_cpu_notifier(&fn##_nb); \ | ||
994 | } while (0) | ||
995 | |||
918 | #endif /* __KERNEL__ */ | 996 | #endif /* __KERNEL__ */ |
919 | #endif /* _LINUX_PERF_EVENT_H */ | 997 | #endif /* _LINUX_PERF_EVENT_H */ |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 71ff887ca44e..212da17d06af 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -21,7 +21,7 @@ struct platform_device { | |||
21 | u32 num_resources; | 21 | u32 num_resources; |
22 | struct resource * resource; | 22 | struct resource * resource; |
23 | 23 | ||
24 | struct platform_device_id *id_entry; | 24 | const struct platform_device_id *id_entry; |
25 | 25 | ||
26 | /* arch specific additions */ | 26 | /* arch specific additions */ |
27 | struct pdev_archdata archdata; | 27 | struct pdev_archdata archdata; |
@@ -62,7 +62,7 @@ struct platform_driver { | |||
62 | int (*suspend)(struct platform_device *, pm_message_t state); | 62 | int (*suspend)(struct platform_device *, pm_message_t state); |
63 | int (*resume)(struct platform_device *); | 63 | int (*resume)(struct platform_device *); |
64 | struct device_driver driver; | 64 | struct device_driver driver; |
65 | struct platform_device_id *id_table; | 65 | const struct platform_device_id *id_table; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | extern int platform_driver_register(struct platform_driver *); | 68 | extern int platform_driver_register(struct platform_driver *); |
@@ -77,6 +77,11 @@ extern int platform_driver_probe(struct platform_driver *driver, | |||
77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) |
78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) |
79 | 79 | ||
80 | extern struct platform_device *platform_create_bundle(struct platform_driver *driver, | ||
81 | int (*probe)(struct platform_device *), | ||
82 | struct resource *res, unsigned int n_res, | ||
83 | const void *data, size_t size); | ||
84 | |||
80 | /* early platform driver interface */ | 85 | /* early platform driver interface */ |
81 | struct early_platform_driver { | 86 | struct early_platform_driver { |
82 | const char *class_str; | 87 | const char *class_str; |
diff --git a/include/linux/poll.h b/include/linux/poll.h index 6673743946f7..600cc1fde64d 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
@@ -10,8 +10,10 @@ | |||
10 | #include <linux/wait.h> | 10 | #include <linux/wait.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/sysctl.h> | ||
13 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
14 | 15 | ||
16 | extern struct ctl_table epoll_table[]; /* for sysctl */ | ||
15 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating | 17 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating |
16 | additional memory. */ | 18 | additional memory. */ |
17 | #define MAX_STACK_ALLOC 832 | 19 | #define MAX_STACK_ALLOC 832 |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index b5d096d3a9be..ebd2b8fb00d0 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -82,6 +82,7 @@ enum power_supply_property { | |||
82 | POWER_SUPPLY_PROP_PRESENT, | 82 | POWER_SUPPLY_PROP_PRESENT, |
83 | POWER_SUPPLY_PROP_ONLINE, | 83 | POWER_SUPPLY_PROP_ONLINE, |
84 | POWER_SUPPLY_PROP_TECHNOLOGY, | 84 | POWER_SUPPLY_PROP_TECHNOLOGY, |
85 | POWER_SUPPLY_PROP_CYCLE_COUNT, | ||
85 | POWER_SUPPLY_PROP_VOLTAGE_MAX, | 86 | POWER_SUPPLY_PROP_VOLTAGE_MAX, |
86 | POWER_SUPPLY_PROP_VOLTAGE_MIN, | 87 | POWER_SUPPLY_PROP_VOLTAGE_MIN, |
87 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, | 88 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index c5eab89da51e..e1fb60729979 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -264,6 +264,9 @@ static inline void user_enable_single_step(struct task_struct *task) | |||
264 | static inline void user_disable_single_step(struct task_struct *task) | 264 | static inline void user_disable_single_step(struct task_struct *task) |
265 | { | 265 | { |
266 | } | 266 | } |
267 | #else | ||
268 | extern void user_enable_single_step(struct task_struct *); | ||
269 | extern void user_disable_single_step(struct task_struct *); | ||
267 | #endif /* arch_has_single_step */ | 270 | #endif /* arch_has_single_step */ |
268 | 271 | ||
269 | #ifndef arch_has_block_step | 272 | #ifndef arch_has_block_step |
@@ -291,6 +294,8 @@ static inline void user_enable_block_step(struct task_struct *task) | |||
291 | { | 294 | { |
292 | BUG(); /* This can never be called. */ | 295 | BUG(); /* This can never be called. */ |
293 | } | 296 | } |
297 | #else | ||
298 | extern void user_enable_block_step(struct task_struct *); | ||
294 | #endif /* arch_has_block_step */ | 299 | #endif /* arch_has_block_step */ |
295 | 300 | ||
296 | #ifdef ARCH_HAS_USER_SINGLE_STEP_INFO | 301 | #ifdef ARCH_HAS_USER_SINGLE_STEP_INFO |
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 9c295411d01f..5210a5c60877 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
@@ -25,10 +25,10 @@ | |||
25 | 25 | ||
26 | Some example of insert and search follows here. The search is a plain | 26 | Some example of insert and search follows here. The search is a plain |
27 | normal search over an ordered tree. The insert instead must be implemented | 27 | normal search over an ordered tree. The insert instead must be implemented |
28 | int two steps: as first thing the code must insert the element in | 28 | in two steps: First, the code must insert the element in order as a red leaf |
29 | order as a red leaf in the tree, then the support library function | 29 | in the tree, and then the support library function rb_insert_color() must |
30 | rb_insert_color() must be called. Such function will do the | 30 | be called. Such function will do the not trivial work to rebalance the |
31 | not trivial work to rebalance the rbtree if necessary. | 31 | rbtree, if necessary. |
32 | 32 | ||
33 | ----------------------------------------------------------------------- | 33 | ----------------------------------------------------------------------- |
34 | static inline struct page * rb_search_page_cache(struct inode * inode, | 34 | static inline struct page * rb_search_page_cache(struct inode * inode, |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index c84373626336..3024050c82a1 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -41,6 +41,10 @@ | |||
41 | #include <linux/lockdep.h> | 41 | #include <linux/lockdep.h> |
42 | #include <linux/completion.h> | 42 | #include <linux/completion.h> |
43 | 43 | ||
44 | #ifdef CONFIG_RCU_TORTURE_TEST | ||
45 | extern int rcutorture_runnable; /* for sysctl */ | ||
46 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | ||
47 | |||
44 | /** | 48 | /** |
45 | * struct rcu_head - callback structure for use with RCU | 49 | * struct rcu_head - callback structure for use with RCU |
46 | * @next: next update requests in a list | 50 | * @next: next update requests in a list |
@@ -97,6 +101,11 @@ extern struct lockdep_map rcu_sched_lock_map; | |||
97 | # define rcu_read_release_sched() \ | 101 | # define rcu_read_release_sched() \ |
98 | lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) | 102 | lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) |
99 | 103 | ||
104 | static inline int debug_lockdep_rcu_enabled(void) | ||
105 | { | ||
106 | return likely(rcu_scheduler_active && debug_locks); | ||
107 | } | ||
108 | |||
100 | /** | 109 | /** |
101 | * rcu_read_lock_held - might we be in RCU read-side critical section? | 110 | * rcu_read_lock_held - might we be in RCU read-side critical section? |
102 | * | 111 | * |
@@ -104,12 +113,14 @@ extern struct lockdep_map rcu_sched_lock_map; | |||
104 | * an RCU read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 113 | * an RCU read-side critical section. In absence of CONFIG_PROVE_LOCKING, |
105 | * this assumes we are in an RCU read-side critical section unless it can | 114 | * this assumes we are in an RCU read-side critical section unless it can |
106 | * prove otherwise. | 115 | * prove otherwise. |
116 | * | ||
117 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
107 | */ | 118 | */ |
108 | static inline int rcu_read_lock_held(void) | 119 | static inline int rcu_read_lock_held(void) |
109 | { | 120 | { |
110 | if (debug_locks) | 121 | if (!debug_lockdep_rcu_enabled()) |
111 | return lock_is_held(&rcu_lock_map); | 122 | return 1; |
112 | return 1; | 123 | return lock_is_held(&rcu_lock_map); |
113 | } | 124 | } |
114 | 125 | ||
115 | /** | 126 | /** |
@@ -119,12 +130,14 @@ static inline int rcu_read_lock_held(void) | |||
119 | * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 130 | * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING, |
120 | * this assumes we are in an RCU-bh read-side critical section unless it can | 131 | * this assumes we are in an RCU-bh read-side critical section unless it can |
121 | * prove otherwise. | 132 | * prove otherwise. |
133 | * | ||
134 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
122 | */ | 135 | */ |
123 | static inline int rcu_read_lock_bh_held(void) | 136 | static inline int rcu_read_lock_bh_held(void) |
124 | { | 137 | { |
125 | if (debug_locks) | 138 | if (!debug_lockdep_rcu_enabled()) |
126 | return lock_is_held(&rcu_bh_lock_map); | 139 | return 1; |
127 | return 1; | 140 | return lock_is_held(&rcu_bh_lock_map); |
128 | } | 141 | } |
129 | 142 | ||
130 | /** | 143 | /** |
@@ -135,15 +148,26 @@ static inline int rcu_read_lock_bh_held(void) | |||
135 | * this assumes we are in an RCU-sched read-side critical section unless it | 148 | * this assumes we are in an RCU-sched read-side critical section unless it |
136 | * can prove otherwise. Note that disabling of preemption (including | 149 | * can prove otherwise. Note that disabling of preemption (including |
137 | * disabling irqs) counts as an RCU-sched read-side critical section. | 150 | * disabling irqs) counts as an RCU-sched read-side critical section. |
151 | * | ||
152 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
138 | */ | 153 | */ |
154 | #ifdef CONFIG_PREEMPT | ||
139 | static inline int rcu_read_lock_sched_held(void) | 155 | static inline int rcu_read_lock_sched_held(void) |
140 | { | 156 | { |
141 | int lockdep_opinion = 0; | 157 | int lockdep_opinion = 0; |
142 | 158 | ||
159 | if (!debug_lockdep_rcu_enabled()) | ||
160 | return 1; | ||
143 | if (debug_locks) | 161 | if (debug_locks) |
144 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); | 162 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); |
145 | return lockdep_opinion || preempt_count() != 0 || !rcu_scheduler_active; | 163 | return lockdep_opinion || preempt_count() != 0; |
164 | } | ||
165 | #else /* #ifdef CONFIG_PREEMPT */ | ||
166 | static inline int rcu_read_lock_sched_held(void) | ||
167 | { | ||
168 | return 1; | ||
146 | } | 169 | } |
170 | #endif /* #else #ifdef CONFIG_PREEMPT */ | ||
147 | 171 | ||
148 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 172 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
149 | 173 | ||
@@ -164,10 +188,17 @@ static inline int rcu_read_lock_bh_held(void) | |||
164 | return 1; | 188 | return 1; |
165 | } | 189 | } |
166 | 190 | ||
191 | #ifdef CONFIG_PREEMPT | ||
167 | static inline int rcu_read_lock_sched_held(void) | 192 | static inline int rcu_read_lock_sched_held(void) |
168 | { | 193 | { |
169 | return preempt_count() != 0 || !rcu_scheduler_active; | 194 | return !rcu_scheduler_active || preempt_count() != 0; |
195 | } | ||
196 | #else /* #ifdef CONFIG_PREEMPT */ | ||
197 | static inline int rcu_read_lock_sched_held(void) | ||
198 | { | ||
199 | return 1; | ||
170 | } | 200 | } |
201 | #endif /* #else #ifdef CONFIG_PREEMPT */ | ||
171 | 202 | ||
172 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 203 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
173 | 204 | ||
@@ -184,7 +215,7 @@ static inline int rcu_read_lock_sched_held(void) | |||
184 | */ | 215 | */ |
185 | #define rcu_dereference_check(p, c) \ | 216 | #define rcu_dereference_check(p, c) \ |
186 | ({ \ | 217 | ({ \ |
187 | if (debug_locks && !(c)) \ | 218 | if (debug_lockdep_rcu_enabled() && !(c)) \ |
188 | lockdep_rcu_dereference(__FILE__, __LINE__); \ | 219 | lockdep_rcu_dereference(__FILE__, __LINE__); \ |
189 | rcu_dereference_raw(p); \ | 220 | rcu_dereference_raw(p); \ |
190 | }) | 221 | }) |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 988e55fe649b..3005d5a7fce5 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
@@ -64,6 +64,7 @@ extern void kernel_restart(char *cmd); | |||
64 | extern void kernel_halt(void); | 64 | extern void kernel_halt(void); |
65 | extern void kernel_power_off(void); | 65 | extern void kernel_power_off(void); |
66 | 66 | ||
67 | extern int C_A_D; /* for sysctl */ | ||
67 | void ctrl_alt_del(void); | 68 | void ctrl_alt_del(void); |
68 | 69 | ||
69 | #define POWEROFF_CMD_PATH_LEN 256 | 70 | #define POWEROFF_CMD_PATH_LEN 256 |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 97059d08a626..4f82326eb294 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -29,7 +29,7 @@ | |||
29 | /** | 29 | /** |
30 | * enum rfkill_type - type of rfkill switch. | 30 | * enum rfkill_type - type of rfkill switch. |
31 | * | 31 | * |
32 | * @RFKILL_TYPE_ALL: toggles all switches (userspace only) | 32 | * @RFKILL_TYPE_ALL: toggles all switches (requests only - not a switch type) |
33 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. | 33 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. |
34 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. | 34 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. |
35 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. | 35 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 60f88a7fb13d..14dbc83ded20 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -238,6 +238,12 @@ static inline bool is_leap_year(unsigned int year) | |||
238 | return (!(year % 4) && (year % 100)) || !(year % 400); | 238 | return (!(year % 4) && (year % 100)) || !(year % 400); |
239 | } | 239 | } |
240 | 240 | ||
241 | #ifdef CONFIG_RTC_HCTOSYS | ||
242 | extern int rtc_hctosys_ret; | ||
243 | #else | ||
244 | #define rtc_hctosys_ret -ENODEV | ||
245 | #endif | ||
246 | |||
241 | #endif /* __KERNEL__ */ | 247 | #endif /* __KERNEL__ */ |
242 | 248 | ||
243 | #endif /* _LINUX_RTC_H_ */ | 249 | #endif /* _LINUX_RTC_H_ */ |
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h index 281d8fd775e8..8d522ffeda33 100644 --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/plist.h> | 16 | #include <linux/plist.h> |
17 | #include <linux/spinlock_types.h> | 17 | #include <linux/spinlock_types.h> |
18 | 18 | ||
19 | extern int max_lock_depth; /* for sysctl */ | ||
20 | |||
19 | /** | 21 | /** |
20 | * The rt_mutex structure | 22 | * The rt_mutex structure |
21 | * | 23 | * |
diff --git a/include/linux/rwlock.h b/include/linux/rwlock.h index 71e0b00b6f2c..bc2994ed66e1 100644 --- a/include/linux/rwlock.h +++ b/include/linux/rwlock.h | |||
@@ -29,25 +29,25 @@ do { \ | |||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #ifdef CONFIG_DEBUG_SPINLOCK | 31 | #ifdef CONFIG_DEBUG_SPINLOCK |
32 | extern void do_raw_read_lock(rwlock_t *lock); | 32 | extern void do_raw_read_lock(rwlock_t *lock) __acquires(lock); |
33 | #define do_raw_read_lock_flags(lock, flags) do_raw_read_lock(lock) | 33 | #define do_raw_read_lock_flags(lock, flags) do_raw_read_lock(lock) |
34 | extern int do_raw_read_trylock(rwlock_t *lock); | 34 | extern int do_raw_read_trylock(rwlock_t *lock); |
35 | extern void do_raw_read_unlock(rwlock_t *lock); | 35 | extern void do_raw_read_unlock(rwlock_t *lock) __releases(lock); |
36 | extern void do_raw_write_lock(rwlock_t *lock); | 36 | extern void do_raw_write_lock(rwlock_t *lock) __acquires(lock); |
37 | #define do_raw_write_lock_flags(lock, flags) do_raw_write_lock(lock) | 37 | #define do_raw_write_lock_flags(lock, flags) do_raw_write_lock(lock) |
38 | extern int do_raw_write_trylock(rwlock_t *lock); | 38 | extern int do_raw_write_trylock(rwlock_t *lock); |
39 | extern void do_raw_write_unlock(rwlock_t *lock); | 39 | extern void do_raw_write_unlock(rwlock_t *lock) __releases(lock); |
40 | #else | 40 | #else |
41 | # define do_raw_read_lock(rwlock) arch_read_lock(&(rwlock)->raw_lock) | 41 | # define do_raw_read_lock(rwlock) do {__acquire(lock); arch_read_lock(&(rwlock)->raw_lock); } while (0) |
42 | # define do_raw_read_lock_flags(lock, flags) \ | 42 | # define do_raw_read_lock_flags(lock, flags) \ |
43 | arch_read_lock_flags(&(lock)->raw_lock, *(flags)) | 43 | do {__acquire(lock); arch_read_lock_flags(&(lock)->raw_lock, *(flags)); } while (0) |
44 | # define do_raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) | 44 | # define do_raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) |
45 | # define do_raw_read_unlock(rwlock) arch_read_unlock(&(rwlock)->raw_lock) | 45 | # define do_raw_read_unlock(rwlock) do {arch_read_unlock(&(rwlock)->raw_lock); __release(lock); } while (0) |
46 | # define do_raw_write_lock(rwlock) arch_write_lock(&(rwlock)->raw_lock) | 46 | # define do_raw_write_lock(rwlock) do {__acquire(lock); arch_write_lock(&(rwlock)->raw_lock); } while (0) |
47 | # define do_raw_write_lock_flags(lock, flags) \ | 47 | # define do_raw_write_lock_flags(lock, flags) \ |
48 | arch_write_lock_flags(&(lock)->raw_lock, *(flags)) | 48 | do {__acquire(lock); arch_write_lock_flags(&(lock)->raw_lock, *(flags)); } while (0) |
49 | # define do_raw_write_trylock(rwlock) arch_write_trylock(&(rwlock)->raw_lock) | 49 | # define do_raw_write_trylock(rwlock) arch_write_trylock(&(rwlock)->raw_lock) |
50 | # define do_raw_write_unlock(rwlock) arch_write_unlock(&(rwlock)->raw_lock) | 50 | # define do_raw_write_unlock(rwlock) do {arch_write_unlock(&(rwlock)->raw_lock); __release(lock); } while (0) |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #define read_can_lock(rwlock) arch_read_can_lock(&(rwlock)->raw_lock) | 53 | #define read_can_lock(rwlock) arch_read_can_lock(&(rwlock)->raw_lock) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 46c6f8d5dc06..dad7f668ebf7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -258,6 +258,10 @@ extern spinlock_t mmlist_lock; | |||
258 | 258 | ||
259 | struct task_struct; | 259 | struct task_struct; |
260 | 260 | ||
261 | #ifdef CONFIG_PROVE_RCU | ||
262 | extern int lockdep_tasklist_lock_is_held(void); | ||
263 | #endif /* #ifdef CONFIG_PROVE_RCU */ | ||
264 | |||
261 | extern void sched_init(void); | 265 | extern void sched_init(void); |
262 | extern void sched_init_smp(void); | 266 | extern void sched_init_smp(void); |
263 | extern asmlinkage void schedule_tail(struct task_struct *prev); | 267 | extern asmlinkage void schedule_tail(struct task_struct *prev); |
@@ -1473,7 +1477,7 @@ struct task_struct { | |||
1473 | 1477 | ||
1474 | struct list_head *scm_work_list; | 1478 | struct list_head *scm_work_list; |
1475 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 1479 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
1476 | /* Index of current stored adress in ret_stack */ | 1480 | /* Index of current stored address in ret_stack */ |
1477 | int curr_ret_stack; | 1481 | int curr_ret_stack; |
1478 | /* Stack of return addresses for return function tracing */ | 1482 | /* Stack of return addresses for return function tracing */ |
1479 | struct ftrace_ret_stack *ret_stack; | 1483 | struct ftrace_ret_stack *ret_stack; |
@@ -2391,9 +2395,7 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); | |||
2391 | 2395 | ||
2392 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2396 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
2393 | { | 2397 | { |
2394 | sig->cputimer.cputime = INIT_CPUTIME; | ||
2395 | spin_lock_init(&sig->cputimer.lock); | 2398 | spin_lock_init(&sig->cputimer.lock); |
2396 | sig->cputimer.running = 0; | ||
2397 | } | 2399 | } |
2398 | 2400 | ||
2399 | static inline void thread_group_cputime_free(struct signal_struct *sig) | 2401 | static inline void thread_group_cputime_free(struct signal_struct *sig) |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 8c3dd36fe91a..78dd1e7120a9 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -491,9 +491,13 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status) | |||
491 | { | 491 | { |
492 | struct uart_state *state = uport->state; | 492 | struct uart_state *state = uport->state; |
493 | struct tty_port *port = &state->port; | 493 | struct tty_port *port = &state->port; |
494 | struct tty_ldisc *ld = tty_ldisc_ref(port->tty); | ||
495 | struct timespec ts; | ||
494 | 496 | ||
495 | uport->icount.dcd++; | 497 | if (ld && ld->ops->dcd_change) |
498 | getnstimeofday(&ts); | ||
496 | 499 | ||
500 | uport->icount.dcd++; | ||
497 | #ifdef CONFIG_HARD_PPS | 501 | #ifdef CONFIG_HARD_PPS |
498 | if ((uport->flags & UPF_HARDPPS_CD) && status) | 502 | if ((uport->flags & UPF_HARDPPS_CD) && status) |
499 | hardpps(); | 503 | hardpps(); |
@@ -505,6 +509,11 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status) | |||
505 | else if (port->tty) | 509 | else if (port->tty) |
506 | tty_hangup(port->tty); | 510 | tty_hangup(port->tty); |
507 | } | 511 | } |
512 | |||
513 | if (ld && ld->ops->dcd_change) | ||
514 | ld->ops->dcd_change(port->tty, status, &ts); | ||
515 | if (ld) | ||
516 | tty_ldisc_deref(ld); | ||
508 | } | 517 | } |
509 | 518 | ||
510 | /** | 519 | /** |
diff --git a/include/linux/signal.h b/include/linux/signal.h index ab9272cc270c..fcd2b14b1932 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
9 | 9 | ||
10 | /* for sysctl */ | ||
11 | extern int print_fatal_signals; | ||
10 | /* | 12 | /* |
11 | * Real Time signals may be queued. | 13 | * Real Time signals may be queued. |
12 | */ | 14 | */ |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index e28f5a0182e8..4435d1084755 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
@@ -225,6 +225,8 @@ enum | |||
225 | LINUX_MIB_SACKSHIFTED, | 225 | LINUX_MIB_SACKSHIFTED, |
226 | LINUX_MIB_SACKMERGED, | 226 | LINUX_MIB_SACKMERGED, |
227 | LINUX_MIB_SACKSHIFTFALLBACK, | 227 | LINUX_MIB_SACKSHIFTFALLBACK, |
228 | LINUX_MIB_TCPBACKLOGDROP, | ||
229 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ | ||
228 | __LINUX_MIB_MAX | 230 | __LINUX_MIB_MAX |
229 | }; | 231 | }; |
230 | 232 | ||
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 51948eb6927a..b4ae570d3c98 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -12,7 +12,7 @@ enum ads7846_filter { | |||
12 | }; | 12 | }; |
13 | 13 | ||
14 | struct ads7846_platform_data { | 14 | struct ads7846_platform_data { |
15 | u16 model; /* 7843, 7845, 7846. */ | 15 | u16 model; /* 7843, 7845, 7846, 7873. */ |
16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ | 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ |
17 | u16 vref_mv; /* external vref value, milliVolts */ | 17 | u16 vref_mv; /* external vref value, milliVolts */ |
18 | bool keep_vref_on; /* set to keep vref on for differential | 18 | bool keep_vref_on; /* set to keep vref on for differential |
@@ -53,5 +53,6 @@ struct ads7846_platform_data { | |||
53 | int (*filter) (void *filter_data, int data_idx, int *val); | 53 | int (*filter) (void *filter_data, int data_idx, int *val); |
54 | void (*filter_cleanup)(void *filter_data); | 54 | void (*filter_cleanup)(void *filter_data); |
55 | void (*wait_for_sync)(void); | 55 | void (*wait_for_sync)(void); |
56 | bool wakeup; | ||
56 | }; | 57 | }; |
57 | 58 | ||
diff --git a/include/linux/spi/l4f00242t03.h b/include/linux/spi/l4f00242t03.h new file mode 100644 index 000000000000..aee1dbda4edc --- /dev/null +++ b/include/linux/spi/l4f00242t03.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * l4f00242t03.h -- Platform glue for Epson L4F00242T03 LCD | ||
3 | * | ||
4 | * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> | ||
5 | * Based on Marek Vasut work in lms283gf05.h | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_ | ||
22 | #define _INCLUDE_LINUX_SPI_L4F00242T03_H_ | ||
23 | |||
24 | struct l4f00242t03_pdata { | ||
25 | unsigned int reset_gpio; | ||
26 | unsigned int data_enable_gpio; | ||
27 | const char *io_supply; /* will be set to 1.8 V */ | ||
28 | const char *core_supply; /* will be set to 2.8 V */ | ||
29 | }; | ||
30 | |||
31 | #endif /* _INCLUDE_LINUX_SPI_L4F00242T03_H_ */ | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 86088213334a..89fac6a3f78b 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -128,19 +128,21 @@ static inline void smp_mb__after_lock(void) { smp_mb(); } | |||
128 | #define raw_spin_unlock_wait(lock) arch_spin_unlock_wait(&(lock)->raw_lock) | 128 | #define raw_spin_unlock_wait(lock) arch_spin_unlock_wait(&(lock)->raw_lock) |
129 | 129 | ||
130 | #ifdef CONFIG_DEBUG_SPINLOCK | 130 | #ifdef CONFIG_DEBUG_SPINLOCK |
131 | extern void do_raw_spin_lock(raw_spinlock_t *lock); | 131 | extern void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock); |
132 | #define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock) | 132 | #define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock) |
133 | extern int do_raw_spin_trylock(raw_spinlock_t *lock); | 133 | extern int do_raw_spin_trylock(raw_spinlock_t *lock); |
134 | extern void do_raw_spin_unlock(raw_spinlock_t *lock); | 134 | extern void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock); |
135 | #else | 135 | #else |
136 | static inline void do_raw_spin_lock(raw_spinlock_t *lock) | 136 | static inline void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock) |
137 | { | 137 | { |
138 | __acquire(lock); | ||
138 | arch_spin_lock(&lock->raw_lock); | 139 | arch_spin_lock(&lock->raw_lock); |
139 | } | 140 | } |
140 | 141 | ||
141 | static inline void | 142 | static inline void |
142 | do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) | 143 | do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) __acquires(lock) |
143 | { | 144 | { |
145 | __acquire(lock); | ||
144 | arch_spin_lock_flags(&lock->raw_lock, *flags); | 146 | arch_spin_lock_flags(&lock->raw_lock, *flags); |
145 | } | 147 | } |
146 | 148 | ||
@@ -149,9 +151,10 @@ static inline int do_raw_spin_trylock(raw_spinlock_t *lock) | |||
149 | return arch_spin_trylock(&(lock)->raw_lock); | 151 | return arch_spin_trylock(&(lock)->raw_lock); |
150 | } | 152 | } |
151 | 153 | ||
152 | static inline void do_raw_spin_unlock(raw_spinlock_t *lock) | 154 | static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock) |
153 | { | 155 | { |
154 | arch_spin_unlock(&lock->raw_lock); | 156 | arch_spin_unlock(&lock->raw_lock); |
157 | __release(lock); | ||
155 | } | 158 | } |
156 | #endif | 159 | #endif |
157 | 160 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index a2602a8207a6..1f59d9340c4d 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -355,6 +355,7 @@ static inline void disable_swap_token(void) | |||
355 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 355 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
356 | extern void | 356 | extern void |
357 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | 357 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); |
358 | extern int mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep); | ||
358 | #else | 359 | #else |
359 | static inline void | 360 | static inline void |
360 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) | 361 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) |
@@ -485,6 +486,14 @@ mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | |||
485 | { | 486 | { |
486 | } | 487 | } |
487 | 488 | ||
489 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | ||
490 | static inline int | ||
491 | mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep) | ||
492 | { | ||
493 | return 0; | ||
494 | } | ||
495 | #endif | ||
496 | |||
488 | #endif /* CONFIG_SWAP */ | 497 | #endif /* CONFIG_SWAP */ |
489 | #endif /* __KERNEL__*/ | 498 | #endif /* __KERNEL__*/ |
490 | #endif /* _LINUX_SWAP_H */ | 499 | #endif /* _LINUX_SWAP_H */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 8126f239edf0..f994ae58a002 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -23,6 +23,7 @@ struct kexec_segment; | |||
23 | struct linux_dirent; | 23 | struct linux_dirent; |
24 | struct linux_dirent64; | 24 | struct linux_dirent64; |
25 | struct list_head; | 25 | struct list_head; |
26 | struct mmap_arg_struct; | ||
26 | struct msgbuf; | 27 | struct msgbuf; |
27 | struct msghdr; | 28 | struct msghdr; |
28 | struct mmsghdr; | 29 | struct mmsghdr; |
@@ -30,10 +31,13 @@ struct msqid_ds; | |||
30 | struct new_utsname; | 31 | struct new_utsname; |
31 | struct nfsctl_arg; | 32 | struct nfsctl_arg; |
32 | struct __old_kernel_stat; | 33 | struct __old_kernel_stat; |
34 | struct oldold_utsname; | ||
35 | struct old_utsname; | ||
33 | struct pollfd; | 36 | struct pollfd; |
34 | struct rlimit; | 37 | struct rlimit; |
35 | struct rusage; | 38 | struct rusage; |
36 | struct sched_param; | 39 | struct sched_param; |
40 | struct sel_arg_struct; | ||
37 | struct semaphore; | 41 | struct semaphore; |
38 | struct sembuf; | 42 | struct sembuf; |
39 | struct shmid_ds; | 43 | struct shmid_ds; |
@@ -101,18 +105,18 @@ struct perf_event_attr; | |||
101 | 105 | ||
102 | #ifdef CONFIG_PERF_EVENTS | 106 | #ifdef CONFIG_PERF_EVENTS |
103 | 107 | ||
104 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 108 | #define TRACE_SYS_ENTER_PERF_INIT(sname) \ |
105 | .profile_enable = prof_sysenter_enable, \ | 109 | .perf_event_enable = perf_sysenter_enable, \ |
106 | .profile_disable = prof_sysenter_disable, | 110 | .perf_event_disable = perf_sysenter_disable, |
107 | 111 | ||
108 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 112 | #define TRACE_SYS_EXIT_PERF_INIT(sname) \ |
109 | .profile_enable = prof_sysexit_enable, \ | 113 | .perf_event_enable = perf_sysexit_enable, \ |
110 | .profile_disable = prof_sysexit_disable, | 114 | .perf_event_disable = perf_sysexit_disable, |
111 | #else | 115 | #else |
112 | #define TRACE_SYS_ENTER_PROFILE(sname) | 116 | #define TRACE_SYS_ENTER_PERF(sname) |
113 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) | 117 | #define TRACE_SYS_ENTER_PERF_INIT(sname) |
114 | #define TRACE_SYS_EXIT_PROFILE(sname) | 118 | #define TRACE_SYS_EXIT_PERF(sname) |
115 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) | 119 | #define TRACE_SYS_EXIT_PERF_INIT(sname) |
116 | #endif /* CONFIG_PERF_EVENTS */ | 120 | #endif /* CONFIG_PERF_EVENTS */ |
117 | 121 | ||
118 | #ifdef CONFIG_FTRACE_SYSCALLS | 122 | #ifdef CONFIG_FTRACE_SYSCALLS |
@@ -149,7 +153,7 @@ struct perf_event_attr; | |||
149 | .regfunc = reg_event_syscall_enter, \ | 153 | .regfunc = reg_event_syscall_enter, \ |
150 | .unregfunc = unreg_event_syscall_enter, \ | 154 | .unregfunc = unreg_event_syscall_enter, \ |
151 | .data = (void *)&__syscall_meta_##sname,\ | 155 | .data = (void *)&__syscall_meta_##sname,\ |
152 | TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 156 | TRACE_SYS_ENTER_PERF_INIT(sname) \ |
153 | } | 157 | } |
154 | 158 | ||
155 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 159 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
@@ -171,7 +175,7 @@ struct perf_event_attr; | |||
171 | .regfunc = reg_event_syscall_exit, \ | 175 | .regfunc = reg_event_syscall_exit, \ |
172 | .unregfunc = unreg_event_syscall_exit, \ | 176 | .unregfunc = unreg_event_syscall_exit, \ |
173 | .data = (void *)&__syscall_meta_##sname,\ | 177 | .data = (void *)&__syscall_meta_##sname,\ |
174 | TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 178 | TRACE_SYS_EXIT_PERF_INIT(sname) \ |
175 | } | 179 | } |
176 | 180 | ||
177 | #define SYSCALL_METADATA(sname, nb) \ | 181 | #define SYSCALL_METADATA(sname, nb) \ |
@@ -638,6 +642,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | |||
638 | long timeout); | 642 | long timeout); |
639 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, | 643 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, |
640 | fd_set __user *exp, struct timeval __user *tvp); | 644 | fd_set __user *exp, struct timeval __user *tvp); |
645 | asmlinkage long sys_old_select(struct sel_arg_struct __user *arg); | ||
641 | asmlinkage long sys_epoll_create(int size); | 646 | asmlinkage long sys_epoll_create(int size); |
642 | asmlinkage long sys_epoll_create1(int flags); | 647 | asmlinkage long sys_epoll_create1(int flags); |
643 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, | 648 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, |
@@ -652,6 +657,8 @@ asmlinkage long sys_gethostname(char __user *name, int len); | |||
652 | asmlinkage long sys_sethostname(char __user *name, int len); | 657 | asmlinkage long sys_sethostname(char __user *name, int len); |
653 | asmlinkage long sys_setdomainname(char __user *name, int len); | 658 | asmlinkage long sys_setdomainname(char __user *name, int len); |
654 | asmlinkage long sys_newuname(struct new_utsname __user *name); | 659 | asmlinkage long sys_newuname(struct new_utsname __user *name); |
660 | asmlinkage long sys_uname(struct old_utsname __user *); | ||
661 | asmlinkage long sys_olduname(struct oldold_utsname __user *); | ||
655 | 662 | ||
656 | asmlinkage long sys_getrlimit(unsigned int resource, | 663 | asmlinkage long sys_getrlimit(unsigned int resource, |
657 | struct rlimit __user *rlim); | 664 | struct rlimit __user *rlim); |
@@ -681,6 +688,8 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); | |||
681 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); | 688 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); |
682 | asmlinkage long sys_shmdt(char __user *shmaddr); | 689 | asmlinkage long sys_shmdt(char __user *shmaddr); |
683 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | 690 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); |
691 | asmlinkage long sys_ipc(unsigned int call, int first, int second, | ||
692 | unsigned long third, void __user *ptr, long fifth); | ||
684 | 693 | ||
685 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 694 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); |
686 | asmlinkage long sys_mq_unlink(const char __user *name); | 695 | asmlinkage long sys_mq_unlink(const char __user *name); |
@@ -836,4 +845,6 @@ asmlinkage long sys_perf_event_open( | |||
836 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, | 845 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, |
837 | unsigned long prot, unsigned long flags, | 846 | unsigned long prot, unsigned long flags, |
838 | unsigned long fd, unsigned long pgoff); | 847 | unsigned long fd, unsigned long pgoff); |
848 | asmlinkage long sys_old_mmap(struct mmap_arg_struct __user *arg); | ||
849 | |||
839 | #endif | 850 | #endif |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index f395bb3fa2f2..1154c29f4101 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -27,10 +27,12 @@ | |||
27 | 27 | ||
28 | 28 | ||
29 | struct sys_device; | 29 | struct sys_device; |
30 | struct sysdev_class_attribute; | ||
30 | 31 | ||
31 | struct sysdev_class { | 32 | struct sysdev_class { |
32 | const char *name; | 33 | const char *name; |
33 | struct list_head drivers; | 34 | struct list_head drivers; |
35 | struct sysdev_class_attribute **attrs; | ||
34 | 36 | ||
35 | /* Default operations for these types of devices */ | 37 | /* Default operations for these types of devices */ |
36 | int (*shutdown)(struct sys_device *); | 38 | int (*shutdown)(struct sys_device *); |
@@ -41,8 +43,10 @@ struct sysdev_class { | |||
41 | 43 | ||
42 | struct sysdev_class_attribute { | 44 | struct sysdev_class_attribute { |
43 | struct attribute attr; | 45 | struct attribute attr; |
44 | ssize_t (*show)(struct sysdev_class *, char *); | 46 | ssize_t (*show)(struct sysdev_class *, struct sysdev_class_attribute *, |
45 | ssize_t (*store)(struct sysdev_class *, const char *, size_t); | 47 | char *); |
48 | ssize_t (*store)(struct sysdev_class *, struct sysdev_class_attribute *, | ||
49 | const char *, size_t); | ||
46 | }; | 50 | }; |
47 | 51 | ||
48 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ | 52 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ |
@@ -119,6 +123,19 @@ struct sysdev_attribute { | |||
119 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); | 123 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); |
120 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); | 124 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); |
121 | 125 | ||
126 | /* Create/remove NULL terminated attribute list */ | ||
127 | static inline int | ||
128 | sysdev_create_files(struct sys_device *d, struct sysdev_attribute **a) | ||
129 | { | ||
130 | return sysfs_create_files(&d->kobj, (const struct attribute **)a); | ||
131 | } | ||
132 | |||
133 | static inline void | ||
134 | sysdev_remove_files(struct sys_device *d, struct sysdev_attribute **a) | ||
135 | { | ||
136 | return sysfs_remove_files(&d->kobj, (const struct attribute **)a); | ||
137 | } | ||
138 | |||
122 | struct sysdev_ext_attribute { | 139 | struct sysdev_ext_attribute { |
123 | struct sysdev_attribute attr; | 140 | struct sysdev_attribute attr; |
124 | void *var; | 141 | void *var; |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index cfa83083a2d4..f0496b3d1811 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/lockdep.h> | ||
18 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
19 | 20 | ||
20 | struct kobject; | 21 | struct kobject; |
@@ -29,8 +30,33 @@ struct attribute { | |||
29 | const char *name; | 30 | const char *name; |
30 | struct module *owner; | 31 | struct module *owner; |
31 | mode_t mode; | 32 | mode_t mode; |
33 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
34 | struct lock_class_key *key; | ||
35 | struct lock_class_key skey; | ||
36 | #endif | ||
32 | }; | 37 | }; |
33 | 38 | ||
39 | /** | ||
40 | * sysfs_attr_init - initialize a dynamically allocated sysfs attribute | ||
41 | * @attr: struct attribute to initialize | ||
42 | * | ||
43 | * Initialize a dynamically allocated struct attribute so we can | ||
44 | * make lockdep happy. This is a new requirement for attributes | ||
45 | * and initially this is only needed when lockdep is enabled. | ||
46 | * Lockdep gives a nice error when your attribute is added to | ||
47 | * sysfs if you don't have this. | ||
48 | */ | ||
49 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
50 | #define sysfs_attr_init(attr) \ | ||
51 | do { \ | ||
52 | static struct lock_class_key __key; \ | ||
53 | \ | ||
54 | (attr)->key = &__key; \ | ||
55 | } while(0) | ||
56 | #else | ||
57 | #define sysfs_attr_init(attr) do {} while(0) | ||
58 | #endif | ||
59 | |||
34 | struct attribute_group { | 60 | struct attribute_group { |
35 | const char *name; | 61 | const char *name; |
36 | mode_t (*is_visible)(struct kobject *, | 62 | mode_t (*is_visible)(struct kobject *, |
@@ -74,6 +100,18 @@ struct bin_attribute { | |||
74 | struct vm_area_struct *vma); | 100 | struct vm_area_struct *vma); |
75 | }; | 101 | }; |
76 | 102 | ||
103 | /** | ||
104 | * sysfs_bin_attr_init - initialize a dynamically allocated bin_attribute | ||
105 | * @attr: struct bin_attribute to initialize | ||
106 | * | ||
107 | * Initialize a dynamically allocated struct bin_attribute so we | ||
108 | * can make lockdep happy. This is a new requirement for | ||
109 | * attributes and initially this is only needed when lockdep is | ||
110 | * enabled. Lockdep gives a nice error when your attribute is | ||
111 | * added to sysfs if you don't have this. | ||
112 | */ | ||
113 | #define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr) | ||
114 | |||
77 | struct sysfs_ops { | 115 | struct sysfs_ops { |
78 | ssize_t (*show)(struct kobject *, struct attribute *,char *); | 116 | ssize_t (*show)(struct kobject *, struct attribute *,char *); |
79 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 117 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
@@ -94,9 +132,12 @@ int __must_check sysfs_move_dir(struct kobject *kobj, | |||
94 | 132 | ||
95 | int __must_check sysfs_create_file(struct kobject *kobj, | 133 | int __must_check sysfs_create_file(struct kobject *kobj, |
96 | const struct attribute *attr); | 134 | const struct attribute *attr); |
135 | int __must_check sysfs_create_files(struct kobject *kobj, | ||
136 | const struct attribute **attr); | ||
97 | int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, | 137 | int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, |
98 | mode_t mode); | 138 | mode_t mode); |
99 | void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); | 139 | void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); |
140 | void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); | ||
100 | 141 | ||
101 | int __must_check sysfs_create_bin_file(struct kobject *kobj, | 142 | int __must_check sysfs_create_bin_file(struct kobject *kobj, |
102 | const struct bin_attribute *attr); | 143 | const struct bin_attribute *attr); |
@@ -110,6 +151,9 @@ int __must_check sysfs_create_link_nowarn(struct kobject *kobj, | |||
110 | const char *name); | 151 | const char *name); |
111 | void sysfs_remove_link(struct kobject *kobj, const char *name); | 152 | void sysfs_remove_link(struct kobject *kobj, const char *name); |
112 | 153 | ||
154 | int sysfs_rename_link(struct kobject *kobj, struct kobject *target, | ||
155 | const char *old_name, const char *new_name); | ||
156 | |||
113 | int __must_check sysfs_create_group(struct kobject *kobj, | 157 | int __must_check sysfs_create_group(struct kobject *kobj, |
114 | const struct attribute_group *grp); | 158 | const struct attribute_group *grp); |
115 | int sysfs_update_group(struct kobject *kobj, | 159 | int sysfs_update_group(struct kobject *kobj, |
@@ -164,6 +208,12 @@ static inline int sysfs_create_file(struct kobject *kobj, | |||
164 | return 0; | 208 | return 0; |
165 | } | 209 | } |
166 | 210 | ||
211 | static inline int sysfs_create_files(struct kobject *kobj, | ||
212 | const struct attribute **attr) | ||
213 | { | ||
214 | return 0; | ||
215 | } | ||
216 | |||
167 | static inline int sysfs_chmod_file(struct kobject *kobj, | 217 | static inline int sysfs_chmod_file(struct kobject *kobj, |
168 | struct attribute *attr, mode_t mode) | 218 | struct attribute *attr, mode_t mode) |
169 | { | 219 | { |
@@ -175,6 +225,11 @@ static inline void sysfs_remove_file(struct kobject *kobj, | |||
175 | { | 225 | { |
176 | } | 226 | } |
177 | 227 | ||
228 | static inline void sysfs_remove_files(struct kobject *kobj, | ||
229 | const struct attribute **attr) | ||
230 | { | ||
231 | } | ||
232 | |||
178 | static inline int sysfs_create_bin_file(struct kobject *kobj, | 233 | static inline int sysfs_create_bin_file(struct kobject *kobj, |
179 | const struct bin_attribute *attr) | 234 | const struct bin_attribute *attr) |
180 | { | 235 | { |
@@ -203,6 +258,12 @@ static inline void sysfs_remove_link(struct kobject *kobj, const char *name) | |||
203 | { | 258 | { |
204 | } | 259 | } |
205 | 260 | ||
261 | static inline int sysfs_rename_link(struct kobject *k, struct kobject *t, | ||
262 | const char *old_name, const char *new_name) | ||
263 | { | ||
264 | return 0; | ||
265 | } | ||
266 | |||
206 | static inline int sysfs_create_group(struct kobject *kobj, | 267 | static inline int sysfs_create_group(struct kobject *kobj, |
207 | const struct attribute_group *grp) | 268 | const struct attribute_group *grp) |
208 | { | 269 | { |
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index 3398f4553269..b6523c1427ce 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
@@ -14,11 +14,6 @@ | |||
14 | extern struct kmem_cache *taskstats_cache; | 14 | extern struct kmem_cache *taskstats_cache; |
15 | extern struct mutex taskstats_exit_mutex; | 15 | extern struct mutex taskstats_exit_mutex; |
16 | 16 | ||
17 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
18 | { | ||
19 | sig->stats = NULL; | ||
20 | } | ||
21 | |||
22 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 17 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
23 | { | 18 | { |
24 | if (sig->stats) | 19 | if (sig->stats) |
@@ -30,8 +25,6 @@ extern void taskstats_init_early(void); | |||
30 | #else | 25 | #else |
31 | static inline void taskstats_exit(struct task_struct *tsk, int group_dead) | 26 | static inline void taskstats_exit(struct task_struct *tsk, int group_dead) |
32 | {} | 27 | {} |
33 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
34 | {} | ||
35 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 28 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
36 | {} | 29 | {} |
37 | static inline void taskstats_init_early(void) | 30 | static inline void taskstats_init_early(void) |
diff --git a/include/linux/tty.h b/include/linux/tty.h index d96e5882f129..4409967db0c4 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -70,12 +70,13 @@ struct tty_buffer { | |||
70 | 70 | ||
71 | /* | 71 | /* |
72 | * We default to dicing tty buffer allocations to this many characters | 72 | * We default to dicing tty buffer allocations to this many characters |
73 | * in order to avoid multiple page allocations. We assume tty_buffer itself | 73 | * in order to avoid multiple page allocations. We know the size of |
74 | * is under 256 bytes. See tty_buffer_find for the allocation logic this | 74 | * tty_buffer itself but it must also be taken into account that the |
75 | * must match | 75 | * the buffer is 256 byte aligned. See tty_buffer_find for the allocation |
76 | * logic this must match | ||
76 | */ | 77 | */ |
77 | 78 | ||
78 | #define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2) | 79 | #define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF) |
79 | 80 | ||
80 | 81 | ||
81 | struct tty_bufhead { | 82 | struct tty_bufhead { |
@@ -223,6 +224,7 @@ struct tty_port { | |||
223 | wait_queue_head_t close_wait; /* Close waiters */ | 224 | wait_queue_head_t close_wait; /* Close waiters */ |
224 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 225 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
225 | unsigned long flags; /* TTY flags ASY_*/ | 226 | unsigned long flags; /* TTY flags ASY_*/ |
227 | unsigned char console:1; /* port is a console */ | ||
226 | struct mutex mutex; /* Locking */ | 228 | struct mutex mutex; /* Locking */ |
227 | struct mutex buf_mutex; /* Buffer alloc lock */ | 229 | struct mutex buf_mutex; /* Buffer alloc lock */ |
228 | unsigned char *xmit_buf; /* Optional buffer */ | 230 | unsigned char *xmit_buf; /* Optional buffer */ |
@@ -514,6 +516,7 @@ extern void tty_ldisc_enable(struct tty_struct *tty); | |||
514 | 516 | ||
515 | /* n_tty.c */ | 517 | /* n_tty.c */ |
516 | extern struct tty_ldisc_ops tty_ldisc_N_TTY; | 518 | extern struct tty_ldisc_ops tty_ldisc_N_TTY; |
519 | extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops); | ||
517 | 520 | ||
518 | /* tty_audit.c */ | 521 | /* tty_audit.c */ |
519 | #ifdef CONFIG_AUDIT | 522 | #ifdef CONFIG_AUDIT |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 0c4ee9b88f85..526d66f066a3 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
@@ -99,6 +99,12 @@ | |||
99 | * cease I/O to the tty driver. Can sleep. The driver should | 99 | * cease I/O to the tty driver. Can sleep. The driver should |
100 | * seek to perform this action quickly but should wait until | 100 | * seek to perform this action quickly but should wait until |
101 | * any pending driver I/O is completed. | 101 | * any pending driver I/O is completed. |
102 | * | ||
103 | * void (*dcd_change)(struct tty_struct *tty, unsigned int status, | ||
104 | * struct timespec *ts) | ||
105 | * | ||
106 | * Tells the discipline that the DCD pin has changed its status and | ||
107 | * the relative timestamp. Pointer ts can be NULL. | ||
102 | */ | 108 | */ |
103 | 109 | ||
104 | #include <linux/fs.h> | 110 | #include <linux/fs.h> |
@@ -136,6 +142,8 @@ struct tty_ldisc_ops { | |||
136 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, | 142 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, |
137 | char *fp, int count); | 143 | char *fp, int count); |
138 | void (*write_wakeup)(struct tty_struct *); | 144 | void (*write_wakeup)(struct tty_struct *); |
145 | void (*dcd_change)(struct tty_struct *, unsigned int, | ||
146 | struct timespec *); | ||
139 | 147 | ||
140 | struct module *owner; | 148 | struct module *owner; |
141 | 149 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 3492abf82e75..ce1323c4e47c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -512,9 +512,9 @@ extern struct usb_device *usb_get_dev(struct usb_device *dev); | |||
512 | extern void usb_put_dev(struct usb_device *dev); | 512 | extern void usb_put_dev(struct usb_device *dev); |
513 | 513 | ||
514 | /* USB device locking */ | 514 | /* USB device locking */ |
515 | #define usb_lock_device(udev) down(&(udev)->dev.sem) | 515 | #define usb_lock_device(udev) device_lock(&(udev)->dev) |
516 | #define usb_unlock_device(udev) up(&(udev)->dev.sem) | 516 | #define usb_unlock_device(udev) device_unlock(&(udev)->dev) |
517 | #define usb_trylock_device(udev) down_trylock(&(udev)->dev.sem) | 517 | #define usb_trylock_device(udev) device_trylock(&(udev)->dev) |
518 | extern int usb_lock_device_for_reset(struct usb_device *udev, | 518 | extern int usb_lock_device_for_reset(struct usb_device *udev, |
519 | const struct usb_interface *iface); | 519 | const struct usb_interface *iface); |
520 | 520 | ||
@@ -1055,7 +1055,8 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1055 | * @number_of_packets: Lists the number of ISO transfer buffers. | 1055 | * @number_of_packets: Lists the number of ISO transfer buffers. |
1056 | * @interval: Specifies the polling interval for interrupt or isochronous | 1056 | * @interval: Specifies the polling interval for interrupt or isochronous |
1057 | * transfers. The units are frames (milliseconds) for full and low | 1057 | * transfers. The units are frames (milliseconds) for full and low |
1058 | * speed devices, and microframes (1/8 millisecond) for highspeed ones. | 1058 | * speed devices, and microframes (1/8 millisecond) for highspeed |
1059 | * and SuperSpeed devices. | ||
1059 | * @error_count: Returns the number of ISO transfers that reported errors. | 1060 | * @error_count: Returns the number of ISO transfers that reported errors. |
1060 | * @context: For use in completion functions. This normally points to | 1061 | * @context: For use in completion functions. This normally points to |
1061 | * request-specific driver context. | 1062 | * request-specific driver context. |
@@ -1286,9 +1287,16 @@ static inline void usb_fill_bulk_urb(struct urb *urb, | |||
1286 | * | 1287 | * |
1287 | * Initializes a interrupt urb with the proper information needed to submit | 1288 | * Initializes a interrupt urb with the proper information needed to submit |
1288 | * it to a device. | 1289 | * it to a device. |
1289 | * Note that high speed interrupt endpoints use a logarithmic encoding of | 1290 | * |
1290 | * the endpoint interval, and express polling intervals in microframes | 1291 | * Note that High Speed and SuperSpeed interrupt endpoints use a logarithmic |
1291 | * (eight per millisecond) rather than in frames (one per millisecond). | 1292 | * encoding of the endpoint interval, and express polling intervals in |
1293 | * microframes (eight per millisecond) rather than in frames (one per | ||
1294 | * millisecond). | ||
1295 | * | ||
1296 | * Wireless USB also uses the logarithmic encoding, but specifies it in units of | ||
1297 | * 128us instead of 125us. For Wireless USB devices, the interval is passed | ||
1298 | * through to the host controller, rather than being translated into microframe | ||
1299 | * units. | ||
1292 | */ | 1300 | */ |
1293 | static inline void usb_fill_int_urb(struct urb *urb, | 1301 | static inline void usb_fill_int_urb(struct urb *urb, |
1294 | struct usb_device *dev, | 1302 | struct usb_device *dev, |
@@ -1305,7 +1313,7 @@ static inline void usb_fill_int_urb(struct urb *urb, | |||
1305 | urb->transfer_buffer_length = buffer_length; | 1313 | urb->transfer_buffer_length = buffer_length; |
1306 | urb->complete = complete_fn; | 1314 | urb->complete = complete_fn; |
1307 | urb->context = context; | 1315 | urb->context = context; |
1308 | if (dev->speed == USB_SPEED_HIGH) | 1316 | if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) |
1309 | urb->interval = 1 << (interval - 1); | 1317 | urb->interval = 1 << (interval - 1); |
1310 | else | 1318 | else |
1311 | urb->interval = interval; | 1319 | urb->interval = interval; |
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index 6bb293684eb8..4d3e450e2b03 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
@@ -269,8 +269,8 @@ struct uac_format_type_i_ext_descriptor { | |||
269 | __u8 bLength; | 269 | __u8 bLength; |
270 | __u8 bDescriptorType; | 270 | __u8 bDescriptorType; |
271 | __u8 bDescriptorSubtype; | 271 | __u8 bDescriptorSubtype; |
272 | __u8 bSubslotSize; | ||
273 | __u8 bFormatType; | 272 | __u8 bFormatType; |
273 | __u8 bSubslotSize; | ||
274 | __u8 bBitResolution; | 274 | __u8 bBitResolution; |
275 | __u8 bHeaderLength; | 275 | __u8 bHeaderLength; |
276 | __u8 bControlSize; | 276 | __u8 bControlSize; |
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index f508c651e53d..40d1709bdbf4 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -98,6 +98,7 @@ struct virtio_device { | |||
98 | void *priv; | 98 | void *priv; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | #define dev_to_virtio(dev) container_of(dev, struct virtio_device, dev) | ||
101 | int register_virtio_device(struct virtio_device *dev); | 102 | int register_virtio_device(struct virtio_device *dev); |
102 | void unregister_virtio_device(struct virtio_device *dev); | 103 | void unregister_virtio_device(struct virtio_device *dev); |
103 | 104 | ||
diff --git a/include/linux/virtio_9p.h b/include/linux/virtio_9p.h index 332275080083..5cf11765146b 100644 --- a/include/linux/virtio_9p.h +++ b/include/linux/virtio_9p.h | |||
@@ -5,4 +5,16 @@ | |||
5 | #include <linux/virtio_ids.h> | 5 | #include <linux/virtio_ids.h> |
6 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
7 | 7 | ||
8 | /* The feature bitmap for virtio 9P */ | ||
9 | |||
10 | /* The mount point is specified in a config variable */ | ||
11 | #define VIRTIO_9P_MOUNT_TAG 0 | ||
12 | |||
13 | struct virtio_9p_config { | ||
14 | /* length of the tag name */ | ||
15 | __u16 tag_len; | ||
16 | /* non-NULL terminated tag name */ | ||
17 | __u8 tag[0]; | ||
18 | } __attribute__((packed)); | ||
19 | |||
8 | #endif /* _LINUX_VIRTIO_9P_H */ | 20 | #endif /* _LINUX_VIRTIO_9P_H */ |
diff --git a/include/linux/vt.h b/include/linux/vt.h index 778b7b2a47d4..d5dd0bc408fd 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -27,7 +27,7 @@ struct vt_mode { | |||
27 | #define VT_SETMODE 0x5602 /* set mode of active vt */ | 27 | #define VT_SETMODE 0x5602 /* set mode of active vt */ |
28 | #define VT_AUTO 0x00 /* auto vt switching */ | 28 | #define VT_AUTO 0x00 /* auto vt switching */ |
29 | #define VT_PROCESS 0x01 /* process controls switching */ | 29 | #define VT_PROCESS 0x01 /* process controls switching */ |
30 | #define VT_PROCESS_AUTO 0x02 /* process is notified of switching */ | 30 | #define VT_ACKACQ 0x02 /* acknowledge switch */ |
31 | 31 | ||
32 | struct vt_stat { | 32 | struct vt_stat { |
33 | unsigned short v_active; /* active vt */ | 33 | unsigned short v_active; /* active vt */ |
@@ -38,7 +38,6 @@ struct vt_stat { | |||
38 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ | 38 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ |
39 | 39 | ||
40 | #define VT_RELDISP 0x5605 /* release display */ | 40 | #define VT_RELDISP 0x5605 /* release display */ |
41 | #define VT_ACKACQ 0x02 /* acknowledge switch */ | ||
42 | 41 | ||
43 | #define VT_ACTIVATE 0x5606 /* make vt active */ | 42 | #define VT_ACTIVATE 0x5606 /* make vt active */ |
44 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ | 43 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ |
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h index f456534dcaf9..fd882261225e 100644 --- a/include/math-emu/op-common.h +++ b/include/math-emu/op-common.h | |||
@@ -29,7 +29,7 @@ | |||
29 | _FP_FRAC_DECL_##wc(X) | 29 | _FP_FRAC_DECL_##wc(X) |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Finish truely unpacking a native fp value by classifying the kind | 32 | * Finish truly unpacking a native fp value by classifying the kind |
33 | * of fp value and normalizing both the exponent and the fraction. | 33 | * of fp value and normalizing both the exponent and the fraction. |
34 | */ | 34 | */ |
35 | 35 | ||
diff --git a/include/media/davinci/vpfe_capture.h b/include/media/davinci/vpfe_capture.h index d863e5e8426d..4314a5f6a087 100644 --- a/include/media/davinci/vpfe_capture.h +++ b/include/media/davinci/vpfe_capture.h | |||
@@ -165,7 +165,7 @@ struct vpfe_device { | |||
165 | u8 started; | 165 | u8 started; |
166 | /* | 166 | /* |
167 | * offset where second field starts from the starting of the | 167 | * offset where second field starts from the starting of the |
168 | * buffer for field seperated YCbCr formats | 168 | * buffer for field separated YCbCr formats |
169 | */ | 169 | */ |
170 | u32 field_off; | 170 | u32 field_off; |
171 | }; | 171 | }; |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 52e1fff709e4..f076dfa75ae8 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -32,13 +32,13 @@ | |||
32 | /** enum p9_proto_versions - 9P protocol versions | 32 | /** enum p9_proto_versions - 9P protocol versions |
33 | * @p9_proto_legacy: 9P Legacy mode, pre-9P2000.u | 33 | * @p9_proto_legacy: 9P Legacy mode, pre-9P2000.u |
34 | * @p9_proto_2000u: 9P2000.u extension | 34 | * @p9_proto_2000u: 9P2000.u extension |
35 | * @p9_proto_2010L: 9P2010.L extension | 35 | * @p9_proto_2000L: 9P2000.L extension |
36 | */ | 36 | */ |
37 | 37 | ||
38 | enum p9_proto_versions{ | 38 | enum p9_proto_versions{ |
39 | p9_proto_legacy = 0, | 39 | p9_proto_legacy = 0, |
40 | p9_proto_2000u = 1, | 40 | p9_proto_2000u = 1, |
41 | p9_proto_2010L = 2, | 41 | p9_proto_2000L = 2, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | 44 | ||
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 4a808de7c0f6..68f67836e146 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -37,6 +37,24 @@ struct route_info { | |||
37 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 | 37 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 |
38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 | 38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 |
39 | 39 | ||
40 | /* | ||
41 | * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate | ||
42 | * between IPV6_ADDR_PREFERENCES socket option values | ||
43 | * IPV6_PREFER_SRC_TMP = 0x1 | ||
44 | * IPV6_PREFER_SRC_PUBLIC = 0x2 | ||
45 | * IPV6_PREFER_SRC_COA = 0x4 | ||
46 | * and above RT6_LOOKUP_F_SRCPREF_xxx flags. | ||
47 | */ | ||
48 | static inline int rt6_srcprefs2flags(unsigned int srcprefs) | ||
49 | { | ||
50 | /* No need to bitmask because srcprefs have only 3 bits. */ | ||
51 | return srcprefs << 3; | ||
52 | } | ||
53 | |||
54 | static inline unsigned int rt6_flags2srcprefs(int flags) | ||
55 | { | ||
56 | return (flags >> 3) & 7; | ||
57 | } | ||
40 | 58 | ||
41 | extern void ip6_route_input(struct sk_buff *skb); | 59 | extern void ip6_route_input(struct sk_buff *skb); |
42 | 60 | ||
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h index 83b4e008b16d..fbf9d1cda27b 100644 --- a/include/net/ip6_tunnel.h +++ b/include/net/ip6_tunnel.h | |||
@@ -15,7 +15,6 @@ | |||
15 | struct ip6_tnl { | 15 | struct ip6_tnl { |
16 | struct ip6_tnl *next; /* next tunnel in list */ | 16 | struct ip6_tnl *next; /* next tunnel in list */ |
17 | struct net_device *dev; /* virtual device associated with tunnel */ | 17 | struct net_device *dev; /* virtual device associated with tunnel */ |
18 | int recursion; /* depth of hard_start_xmit recursion */ | ||
19 | struct ip6_tnl_parm parms; /* tunnel configuration parameters */ | 18 | struct ip6_tnl_parm parms; /* tunnel configuration parameters */ |
20 | struct flowi fl; /* flowi template for xmit */ | 19 | struct flowi fl; /* flowi template for xmit */ |
21 | struct dst_entry *dst_cache; /* cached dst */ | 20 | struct dst_entry *dst_cache; /* cached dst */ |
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h index 0788c23d2828..11aee7a2972a 100644 --- a/include/net/irda/irttp.h +++ b/include/net/irda/irttp.h | |||
@@ -97,7 +97,7 @@ | |||
97 | #define TTP_MAX_SDU_SIZE 0x01 | 97 | #define TTP_MAX_SDU_SIZE 0x01 |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * This structure contains all data assosiated with one instance of a TTP | 100 | * This structure contains all data associated with one instance of a TTP |
101 | * connection. | 101 | * connection. |
102 | */ | 102 | */ |
103 | struct tsap_cb { | 103 | struct tsap_cb { |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 80eb7cc42ce9..45d7d44d7cbe 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -2426,7 +2426,8 @@ struct rate_control_ops { | |||
2426 | struct ieee80211_sta *sta, void *priv_sta); | 2426 | struct ieee80211_sta *sta, void *priv_sta); |
2427 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, | 2427 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, |
2428 | struct ieee80211_sta *sta, | 2428 | struct ieee80211_sta *sta, |
2429 | void *priv_sta, u32 changed); | 2429 | void *priv_sta, u32 changed, |
2430 | enum nl80211_channel_type oper_chan_type); | ||
2430 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, | 2431 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, |
2431 | void *priv_sta); | 2432 | void *priv_sta); |
2432 | 2433 | ||
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 82b7be4db89a..bd10a7908993 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -100,14 +100,9 @@ struct net { | |||
100 | extern struct net init_net; | 100 | extern struct net init_net; |
101 | 101 | ||
102 | #ifdef CONFIG_NET | 102 | #ifdef CONFIG_NET |
103 | #define INIT_NET_NS(net_ns) .net_ns = &init_net, | ||
104 | |||
105 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); | 103 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); |
106 | 104 | ||
107 | #else /* CONFIG_NET */ | 105 | #else /* CONFIG_NET */ |
108 | |||
109 | #define INIT_NET_NS(net_ns) | ||
110 | |||
111 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) | 106 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) |
112 | { | 107 | { |
113 | /* There is nothing to copy so this is a noop */ | 108 | /* There is nothing to copy so this is a noop */ |
diff --git a/include/net/sock.h b/include/net/sock.h index 6cb1676e409a..092b0551e77f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -253,6 +253,8 @@ struct sock { | |||
253 | struct { | 253 | struct { |
254 | struct sk_buff *head; | 254 | struct sk_buff *head; |
255 | struct sk_buff *tail; | 255 | struct sk_buff *tail; |
256 | int len; | ||
257 | int limit; | ||
256 | } sk_backlog; | 258 | } sk_backlog; |
257 | wait_queue_head_t *sk_sleep; | 259 | wait_queue_head_t *sk_sleep; |
258 | struct dst_entry *sk_dst_cache; | 260 | struct dst_entry *sk_dst_cache; |
@@ -589,8 +591,8 @@ static inline int sk_stream_memory_free(struct sock *sk) | |||
589 | return sk->sk_wmem_queued < sk->sk_sndbuf; | 591 | return sk->sk_wmem_queued < sk->sk_sndbuf; |
590 | } | 592 | } |
591 | 593 | ||
592 | /* The per-socket spinlock must be held here. */ | 594 | /* OOB backlog add */ |
593 | static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | 595 | static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) |
594 | { | 596 | { |
595 | if (!sk->sk_backlog.tail) { | 597 | if (!sk->sk_backlog.tail) { |
596 | sk->sk_backlog.head = sk->sk_backlog.tail = skb; | 598 | sk->sk_backlog.head = sk->sk_backlog.tail = skb; |
@@ -601,6 +603,17 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
601 | skb->next = NULL; | 603 | skb->next = NULL; |
602 | } | 604 | } |
603 | 605 | ||
606 | /* The per-socket spinlock must be held here. */ | ||
607 | static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb) | ||
608 | { | ||
609 | if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1)) | ||
610 | return -ENOBUFS; | ||
611 | |||
612 | __sk_add_backlog(sk, skb); | ||
613 | sk->sk_backlog.len += skb->truesize; | ||
614 | return 0; | ||
615 | } | ||
616 | |||
604 | static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) | 617 | static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) |
605 | { | 618 | { |
606 | return sk->sk_backlog_rcv(sk, skb); | 619 | return sk->sk_backlog_rcv(sk, skb); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 56f0aec40ed6..75be5a28815d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -939,7 +939,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) | |||
939 | 939 | ||
940 | tp->ucopy.memory = 0; | 940 | tp->ucopy.memory = 0; |
941 | } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) { | 941 | } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) { |
942 | wake_up_interruptible_poll(sk->sk_sleep, | 942 | wake_up_interruptible_sync_poll(sk->sk_sleep, |
943 | POLLIN | POLLRDNORM | POLLRDBAND); | 943 | POLLIN | POLLRDNORM | POLLRDBAND); |
944 | if (!inet_csk_ack_scheduled(sk)) | 944 | if (!inet_csk_ack_scheduled(sk)) |
945 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | 945 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index a7df3275b860..d74e080ba6c9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -275,7 +275,8 @@ struct xfrm_policy_afinfo { | |||
275 | struct dst_entry *dst, | 275 | struct dst_entry *dst, |
276 | int nfheader_len); | 276 | int nfheader_len); |
277 | int (*fill_dst)(struct xfrm_dst *xdst, | 277 | int (*fill_dst)(struct xfrm_dst *xdst, |
278 | struct net_device *dev); | 278 | struct net_device *dev, |
279 | struct flowi *fl); | ||
279 | }; | 280 | }; |
280 | 281 | ||
281 | extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); | 282 | extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index ff92b46f5153..ae5196aae1a5 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -338,7 +338,8 @@ struct iscsi_host { | |||
338 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, | 338 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, |
339 | int reason); | 339 | int reason); |
340 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); | 340 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); |
341 | extern int iscsi_eh_target_reset(struct scsi_cmnd *sc); | 341 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); |
342 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); | ||
342 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); | 343 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); |
343 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, | 344 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, |
344 | void (*done)(struct scsi_cmnd *)); | 345 | void (*done)(struct scsi_cmnd *)); |
diff --git a/include/scsi/sg.h b/include/scsi/sg.h index 934ae389671d..a9f3c6fc3f57 100644 --- a/include/scsi/sg.h +++ b/include/scsi/sg.h | |||
@@ -70,6 +70,9 @@ Major new features in SG 3.x driver (cf SG 2.x drivers) | |||
70 | (for the lk 2.2 series). | 70 | (for the lk 2.2 series). |
71 | */ | 71 | */ |
72 | 72 | ||
73 | #ifdef __KERNEL__ | ||
74 | extern int sg_big_buff; /* for sysctl */ | ||
75 | #endif | ||
73 | 76 | ||
74 | /* New interface introduced in the 3.x SG drivers follows */ | 77 | /* New interface introduced in the 3.x SG drivers follows */ |
75 | 78 | ||
diff --git a/include/sound/asound.h b/include/sound/asound.h index 1f57bb92eb5a..098595500632 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
@@ -544,7 +544,7 @@ struct snd_rawmidi_status { | |||
544 | * Timer section - /dev/snd/timer | 544 | * Timer section - /dev/snd/timer |
545 | */ | 545 | */ |
546 | 546 | ||
547 | #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 5) | 547 | #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6) |
548 | 548 | ||
549 | enum { | 549 | enum { |
550 | SNDRV_TIMER_CLASS_NONE = -1, | 550 | SNDRV_TIMER_CLASS_NONE = -1, |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 0804cd594803..ea6f9d4a20e9 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -401,18 +401,18 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
401 | #undef DEFINE_EVENT | 401 | #undef DEFINE_EVENT |
402 | #define DEFINE_EVENT(template, name, proto, args) \ | 402 | #define DEFINE_EVENT(template, name, proto, args) \ |
403 | \ | 403 | \ |
404 | static void ftrace_profile_##name(proto); \ | 404 | static void perf_trace_##name(proto); \ |
405 | \ | 405 | \ |
406 | static notrace int \ | 406 | static notrace int \ |
407 | ftrace_profile_enable_##name(struct ftrace_event_call *unused) \ | 407 | perf_trace_enable_##name(struct ftrace_event_call *unused) \ |
408 | { \ | 408 | { \ |
409 | return register_trace_##name(ftrace_profile_##name); \ | 409 | return register_trace_##name(perf_trace_##name); \ |
410 | } \ | 410 | } \ |
411 | \ | 411 | \ |
412 | static notrace void \ | 412 | static notrace void \ |
413 | ftrace_profile_disable_##name(struct ftrace_event_call *unused) \ | 413 | perf_trace_disable_##name(struct ftrace_event_call *unused) \ |
414 | { \ | 414 | { \ |
415 | unregister_trace_##name(ftrace_profile_##name); \ | 415 | unregister_trace_##name(perf_trace_##name); \ |
416 | } | 416 | } |
417 | 417 | ||
418 | #undef DEFINE_EVENT_PRINT | 418 | #undef DEFINE_EVENT_PRINT |
@@ -507,12 +507,12 @@ ftrace_profile_disable_##name(struct ftrace_event_call *unused) \ | |||
507 | 507 | ||
508 | #ifdef CONFIG_PERF_EVENTS | 508 | #ifdef CONFIG_PERF_EVENTS |
509 | 509 | ||
510 | #define _TRACE_PROFILE_INIT(call) \ | 510 | #define _TRACE_PERF_INIT(call) \ |
511 | .profile_enable = ftrace_profile_enable_##call, \ | 511 | .perf_event_enable = perf_trace_enable_##call, \ |
512 | .profile_disable = ftrace_profile_disable_##call, | 512 | .perf_event_disable = perf_trace_disable_##call, |
513 | 513 | ||
514 | #else | 514 | #else |
515 | #define _TRACE_PROFILE_INIT(call) | 515 | #define _TRACE_PERF_INIT(call) |
516 | #endif /* CONFIG_PERF_EVENTS */ | 516 | #endif /* CONFIG_PERF_EVENTS */ |
517 | 517 | ||
518 | #undef __entry | 518 | #undef __entry |
@@ -638,7 +638,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
638 | .unregfunc = ftrace_raw_unreg_event_##call, \ | 638 | .unregfunc = ftrace_raw_unreg_event_##call, \ |
639 | .print_fmt = print_fmt_##template, \ | 639 | .print_fmt = print_fmt_##template, \ |
640 | .define_fields = ftrace_define_fields_##template, \ | 640 | .define_fields = ftrace_define_fields_##template, \ |
641 | _TRACE_PROFILE_INIT(call) \ | 641 | _TRACE_PERF_INIT(call) \ |
642 | } | 642 | } |
643 | 643 | ||
644 | #undef DEFINE_EVENT_PRINT | 644 | #undef DEFINE_EVENT_PRINT |
@@ -657,18 +657,18 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
657 | .unregfunc = ftrace_raw_unreg_event_##call, \ | 657 | .unregfunc = ftrace_raw_unreg_event_##call, \ |
658 | .print_fmt = print_fmt_##call, \ | 658 | .print_fmt = print_fmt_##call, \ |
659 | .define_fields = ftrace_define_fields_##template, \ | 659 | .define_fields = ftrace_define_fields_##template, \ |
660 | _TRACE_PROFILE_INIT(call) \ | 660 | _TRACE_PERF_INIT(call) \ |
661 | } | 661 | } |
662 | 662 | ||
663 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 663 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
664 | 664 | ||
665 | /* | 665 | /* |
666 | * Define the insertion callback to profile events | 666 | * Define the insertion callback to perf events |
667 | * | 667 | * |
668 | * The job is very similar to ftrace_raw_event_<call> except that we don't | 668 | * The job is very similar to ftrace_raw_event_<call> except that we don't |
669 | * insert in the ring buffer but in a perf counter. | 669 | * insert in the ring buffer but in a perf counter. |
670 | * | 670 | * |
671 | * static void ftrace_profile_<call>(proto) | 671 | * static void ftrace_perf_<call>(proto) |
672 | * { | 672 | * { |
673 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; | 673 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; |
674 | * struct ftrace_event_call *event_call = &event_<call>; | 674 | * struct ftrace_event_call *event_call = &event_<call>; |
@@ -699,9 +699,9 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
699 | * __cpu = smp_processor_id(); | 699 | * __cpu = smp_processor_id(); |
700 | * | 700 | * |
701 | * if (in_nmi()) | 701 | * if (in_nmi()) |
702 | * trace_buf = rcu_dereference(perf_trace_buf_nmi); | 702 | * trace_buf = rcu_dereference_sched(perf_trace_buf_nmi); |
703 | * else | 703 | * else |
704 | * trace_buf = rcu_dereference(perf_trace_buf); | 704 | * trace_buf = rcu_dereference_sched(perf_trace_buf); |
705 | * | 705 | * |
706 | * if (!trace_buf) | 706 | * if (!trace_buf) |
707 | * goto end; | 707 | * goto end; |
@@ -757,13 +757,14 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
757 | #undef DECLARE_EVENT_CLASS | 757 | #undef DECLARE_EVENT_CLASS |
758 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 758 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
759 | static notrace void \ | 759 | static notrace void \ |
760 | ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | 760 | perf_trace_templ_##call(struct ftrace_event_call *event_call, \ |
761 | proto) \ | 761 | proto) \ |
762 | { \ | 762 | { \ |
763 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ | 763 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ |
764 | struct ftrace_raw_##call *entry; \ | 764 | struct ftrace_raw_##call *entry; \ |
765 | u64 __addr = 0, __count = 1; \ | 765 | u64 __addr = 0, __count = 1; \ |
766 | unsigned long irq_flags; \ | 766 | unsigned long irq_flags; \ |
767 | struct pt_regs *__regs; \ | ||
767 | int __entry_size; \ | 768 | int __entry_size; \ |
768 | int __data_size; \ | 769 | int __data_size; \ |
769 | int rctx; \ | 770 | int rctx; \ |
@@ -773,10 +774,10 @@ ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | |||
773 | sizeof(u64)); \ | 774 | sizeof(u64)); \ |
774 | __entry_size -= sizeof(u32); \ | 775 | __entry_size -= sizeof(u32); \ |
775 | \ | 776 | \ |
776 | if (WARN_ONCE(__entry_size > FTRACE_MAX_PROFILE_SIZE, \ | 777 | if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \ |
777 | "profile buffer not large enough")) \ | 778 | "profile buffer not large enough")) \ |
778 | return; \ | 779 | return; \ |
779 | entry = (struct ftrace_raw_##call *)ftrace_perf_buf_prepare( \ | 780 | entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \ |
780 | __entry_size, event_call->id, &rctx, &irq_flags); \ | 781 | __entry_size, event_call->id, &rctx, &irq_flags); \ |
781 | if (!entry) \ | 782 | if (!entry) \ |
782 | return; \ | 783 | return; \ |
@@ -784,17 +785,20 @@ ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | |||
784 | \ | 785 | \ |
785 | { assign; } \ | 786 | { assign; } \ |
786 | \ | 787 | \ |
787 | ftrace_perf_buf_submit(entry, __entry_size, rctx, __addr, \ | 788 | __regs = &__get_cpu_var(perf_trace_regs); \ |
788 | __count, irq_flags); \ | 789 | perf_fetch_caller_regs(__regs, 2); \ |
790 | \ | ||
791 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ | ||
792 | __count, irq_flags, __regs); \ | ||
789 | } | 793 | } |
790 | 794 | ||
791 | #undef DEFINE_EVENT | 795 | #undef DEFINE_EVENT |
792 | #define DEFINE_EVENT(template, call, proto, args) \ | 796 | #define DEFINE_EVENT(template, call, proto, args) \ |
793 | static notrace void ftrace_profile_##call(proto) \ | 797 | static notrace void perf_trace_##call(proto) \ |
794 | { \ | 798 | { \ |
795 | struct ftrace_event_call *event_call = &event_##call; \ | 799 | struct ftrace_event_call *event_call = &event_##call; \ |
796 | \ | 800 | \ |
797 | ftrace_profile_templ_##template(event_call, args); \ | 801 | perf_trace_templ_##template(event_call, args); \ |
798 | } | 802 | } |
799 | 803 | ||
800 | #undef DEFINE_EVENT_PRINT | 804 | #undef DEFINE_EVENT_PRINT |
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 0387100752f0..e5e5f48dbfb3 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
@@ -47,10 +47,10 @@ enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags); | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #ifdef CONFIG_PERF_EVENTS | 49 | #ifdef CONFIG_PERF_EVENTS |
50 | int prof_sysenter_enable(struct ftrace_event_call *call); | 50 | int perf_sysenter_enable(struct ftrace_event_call *call); |
51 | void prof_sysenter_disable(struct ftrace_event_call *call); | 51 | void perf_sysenter_disable(struct ftrace_event_call *call); |
52 | int prof_sysexit_enable(struct ftrace_event_call *call); | 52 | int perf_sysexit_enable(struct ftrace_event_call *call); |
53 | void prof_sysexit_disable(struct ftrace_event_call *call); | 53 | void perf_sysexit_disable(struct ftrace_event_call *call); |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #endif /* _TRACE_SYSCALL_H */ | 56 | #endif /* _TRACE_SYSCALL_H */ |
diff --git a/include/video/broadsheetfb.h b/include/video/broadsheetfb.h index a758534c0272..548d28f4ec67 100644 --- a/include/video/broadsheetfb.h +++ b/include/video/broadsheetfb.h | |||
@@ -29,11 +29,19 @@ | |||
29 | #define BS_CMD_UPD_FULL 0x33 | 29 | #define BS_CMD_UPD_FULL 0x33 |
30 | #define BS_CMD_UPD_GDRV_CLR 0x37 | 30 | #define BS_CMD_UPD_GDRV_CLR 0x37 |
31 | 31 | ||
32 | /* Broadsheet register interface defines */ | ||
33 | #define BS_REG_REV 0x00 | ||
34 | #define BS_REG_PRC 0x02 | ||
35 | |||
32 | /* Broadsheet pin interface specific defines */ | 36 | /* Broadsheet pin interface specific defines */ |
33 | #define BS_CS 0x01 | 37 | #define BS_CS 0x01 |
34 | #define BS_DC 0x02 | 38 | #define BS_DC 0x02 |
35 | #define BS_WR 0x03 | 39 | #define BS_WR 0x03 |
36 | 40 | ||
41 | /* Broadsheet IO interface specific defines */ | ||
42 | #define BS_MMIO_CMD 0x01 | ||
43 | #define BS_MMIO_DATA 0x02 | ||
44 | |||
37 | /* struct used by broadsheet. board specific stuff comes from *board */ | 45 | /* struct used by broadsheet. board specific stuff comes from *board */ |
38 | struct broadsheetfb_par { | 46 | struct broadsheetfb_par { |
39 | struct fb_info *info; | 47 | struct fb_info *info; |
@@ -41,6 +49,8 @@ struct broadsheetfb_par { | |||
41 | void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val); | 49 | void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val); |
42 | u16 (*read_reg)(struct broadsheetfb_par *, u16 reg); | 50 | u16 (*read_reg)(struct broadsheetfb_par *, u16 reg); |
43 | wait_queue_head_t waitq; | 51 | wait_queue_head_t waitq; |
52 | int panel_index; | ||
53 | struct mutex io_lock; | ||
44 | }; | 54 | }; |
45 | 55 | ||
46 | /* board specific routines */ | 56 | /* board specific routines */ |
@@ -48,12 +58,17 @@ struct broadsheet_board { | |||
48 | struct module *owner; | 58 | struct module *owner; |
49 | int (*init)(struct broadsheetfb_par *); | 59 | int (*init)(struct broadsheetfb_par *); |
50 | int (*wait_for_rdy)(struct broadsheetfb_par *); | 60 | int (*wait_for_rdy)(struct broadsheetfb_par *); |
51 | void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8); | ||
52 | void (*set_hdb)(struct broadsheetfb_par *, u16); | ||
53 | u16 (*get_hdb)(struct broadsheetfb_par *); | ||
54 | void (*cleanup)(struct broadsheetfb_par *); | 61 | void (*cleanup)(struct broadsheetfb_par *); |
55 | int (*get_panel_type)(void); | 62 | int (*get_panel_type)(void); |
56 | int (*setup_irq)(struct fb_info *); | 63 | int (*setup_irq)(struct fb_info *); |
57 | }; | ||
58 | 64 | ||
65 | /* Functions for boards that use GPIO */ | ||
66 | void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8); | ||
67 | void (*set_hdb)(struct broadsheetfb_par *, u16); | ||
68 | u16 (*get_hdb)(struct broadsheetfb_par *); | ||
69 | |||
70 | /* Functions for boards that have specialized MMIO */ | ||
71 | void (*mmio_write)(struct broadsheetfb_par *, int type, u16); | ||
72 | u16 (*mmio_read)(struct broadsheetfb_par *); | ||
73 | }; | ||
59 | #endif | 74 | #endif |