aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-03-15 10:27:06 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-03-15 10:27:06 -0400
commit2d3b5fa3a39d16c880bda3cf2bd9dd6ed5a01f74 (patch)
treee20283fe2ed46aa35c8ca5fc1724ba067cd2e2f8 /include
parent3f17522ce461a31e7ced6311b28fcf5b8a763316 (diff)
parent7278a22143b003e9af7b9ca1b5f1c40ae4b55d98 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/cred.h2
-rw-r--r--include/linux/ethtool.h24
-rw-r--r--include/linux/hw_breakpoint.h8
-rw-r--r--include/linux/i2c-algo-bit.h2
-rw-r--r--include/linux/i2c-xiic.h43
-rw-r--r--include/linux/input.h20
-rw-r--r--include/linux/perf_event.h27
-rw-r--r--include/linux/rcupdate.h45
-rw-r--r--include/linux/rfkill.h2
-rw-r--r--include/linux/rwlock.h20
-rw-r--r--include/linux/sched.h4
-rw-r--r--include/linux/snmp.h2
-rw-r--r--include/linux/spi/ads7846.h3
-rw-r--r--include/linux/spinlock.h13
-rw-r--r--include/linux/virtio.h1
-rw-r--r--include/linux/virtio_9p.h12
-rw-r--r--include/net/9p/client.h4
-rw-r--r--include/net/ip6_route.h18
-rw-r--r--include/net/ip6_tunnel.h1
-rw-r--r--include/net/mac80211.h3
-rw-r--r--include/net/sock.h17
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/net/xfrm.h3
-rw-r--r--include/trace/ftrace.h4
24 files changed, 225 insertions, 55 deletions
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/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
263struct 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
256enum ethtool_test_flags { 274enum 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/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
69extern struct perf_event ** 69extern struct perf_event * __percpu *
70register_wide_hw_breakpoint(struct perf_event_attr *attr, 70register_wide_hw_breakpoint(struct perf_event_attr *attr,
71 perf_overflow_handler_t triggered); 71 perf_overflow_handler_t triggered);
72 72
73extern int register_perf_hw_breakpoint(struct perf_event *bp); 73extern int register_perf_hw_breakpoint(struct perf_event *bp);
74extern int __register_perf_hw_breakpoint(struct perf_event *bp); 74extern int __register_perf_hw_breakpoint(struct perf_event *bp);
75extern void unregister_hw_breakpoint(struct perf_event *bp); 75extern void unregister_hw_breakpoint(struct perf_event *bp);
76extern void unregister_wide_hw_breakpoint(struct perf_event **cpu_events); 76extern void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events);
77 77
78extern int dbg_reserve_bp_slot(struct perf_event *bp); 78extern int dbg_reserve_bp_slot(struct perf_event *bp);
79extern int dbg_release_bp_slot(struct perf_event *bp); 79extern int dbg_release_bp_slot(struct perf_event *bp);
@@ -100,7 +100,7 @@ static inline struct perf_event *
100register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, 100register_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; }
103static inline struct perf_event ** 103static inline struct perf_event * __percpu *
104register_wide_hw_breakpoint(struct perf_event_attr *attr, 104register_wide_hw_breakpoint(struct perf_event_attr *attr,
105 perf_overflow_handler_t triggered) { return NULL; } 105 perf_overflow_handler_t triggered) { return NULL; }
106static inline int 106static 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; }
110static inline void unregister_hw_breakpoint(struct perf_event *bp) { } 110static inline void unregister_hw_breakpoint(struct perf_event *bp) { }
111static inline void 111static inline void
112unregister_wide_hw_breakpoint(struct perf_event **cpu_events) { } 112unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events) { }
113static inline int 113static inline int
114reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } 114reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; }
115static inline void release_bp_slot(struct perf_event *bp) { } 115static 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 */
38struct 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/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
1418int input_get_keycode(struct input_dev *dev, int scancode, int *keycode); 1420int input_get_keycode(struct input_dev *dev,
1419int input_set_keycode(struct input_dev *dev, int scancode, int keycode); 1421 unsigned int scancode, unsigned int *keycode);
1422int input_set_keycode(struct input_dev *dev,
1423 unsigned int scancode, unsigned int keycode);
1420 1424
1421extern struct class input_class; 1425extern struct class input_class;
1422 1426
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 7b18b4fd5df7..6f8cd7da1a01 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -487,9 +487,8 @@ struct hw_perf_event {
487 struct hrtimer hrtimer; 487 struct hrtimer hrtimer;
488 }; 488 };
489#ifdef CONFIG_HAVE_HW_BREAKPOINT 489#ifdef CONFIG_HAVE_HW_BREAKPOINT
490 union { /* breakpoint */ 490 /* breakpoint */
491 struct arch_hw_breakpoint info; 491 struct arch_hw_breakpoint info;
492 };
493#endif 492#endif
494 }; 493 };
495 atomic64_t prev_count; 494 atomic64_t prev_count;
@@ -802,6 +801,13 @@ struct perf_sample_data {
802 struct perf_raw_record *raw; 801 struct perf_raw_record *raw;
803}; 802};
804 803
804static inline
805void perf_sample_data_init(struct perf_sample_data *data, u64 addr)
806{
807 data->addr = addr;
808 data->raw = NULL;
809}
810
805extern void perf_output_sample(struct perf_output_handle *handle, 811extern void perf_output_sample(struct perf_output_handle *handle,
806 struct perf_event_header *header, 812 struct perf_event_header *header,
807 struct perf_sample_data *data, 813 struct perf_sample_data *data,
@@ -858,6 +864,21 @@ extern int sysctl_perf_event_paranoid;
858extern int sysctl_perf_event_mlock; 864extern int sysctl_perf_event_mlock;
859extern int sysctl_perf_event_sample_rate; 865extern int sysctl_perf_event_sample_rate;
860 866
867static inline bool perf_paranoid_tracepoint_raw(void)
868{
869 return sysctl_perf_event_paranoid > -1;
870}
871
872static inline bool perf_paranoid_cpu(void)
873{
874 return sysctl_perf_event_paranoid > 0;
875}
876
877static inline bool perf_paranoid_kernel(void)
878{
879 return sysctl_perf_event_paranoid > 1;
880}
881
861extern void perf_event_init(void); 882extern void perf_event_init(void);
862extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); 883extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size);
863extern void perf_bp_event(struct perf_event *event, void *data); 884extern void perf_bp_event(struct perf_event *event, void *data);
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index a005cac5e302..3024050c82a1 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -101,6 +101,11 @@ extern struct lockdep_map rcu_sched_lock_map;
101# define rcu_read_release_sched() \ 101# define rcu_read_release_sched() \
102 lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) 102 lock_release(&rcu_sched_lock_map, 1, _THIS_IP_)
103 103
104static inline int debug_lockdep_rcu_enabled(void)
105{
106 return likely(rcu_scheduler_active && debug_locks);
107}
108
104/** 109/**
105 * 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?
106 * 111 *
@@ -108,12 +113,14 @@ extern struct lockdep_map rcu_sched_lock_map;
108 * 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,
109 * 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
110 * prove otherwise. 115 * prove otherwise.
116 *
117 * Check rcu_scheduler_active to prevent false positives during boot.
111 */ 118 */
112static inline int rcu_read_lock_held(void) 119static inline int rcu_read_lock_held(void)
113{ 120{
114 if (debug_locks) 121 if (!debug_lockdep_rcu_enabled())
115 return lock_is_held(&rcu_lock_map); 122 return 1;
116 return 1; 123 return lock_is_held(&rcu_lock_map);
117} 124}
118 125
119/** 126/**
@@ -123,12 +130,14 @@ static inline int rcu_read_lock_held(void)
123 * 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,
124 * 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
125 * prove otherwise. 132 * prove otherwise.
133 *
134 * Check rcu_scheduler_active to prevent false positives during boot.
126 */ 135 */
127static inline int rcu_read_lock_bh_held(void) 136static inline int rcu_read_lock_bh_held(void)
128{ 137{
129 if (debug_locks) 138 if (!debug_lockdep_rcu_enabled())
130 return lock_is_held(&rcu_bh_lock_map); 139 return 1;
131 return 1; 140 return lock_is_held(&rcu_bh_lock_map);
132} 141}
133 142
134/** 143/**
@@ -139,15 +148,26 @@ static inline int rcu_read_lock_bh_held(void)
139 * 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
140 * can prove otherwise. Note that disabling of preemption (including 149 * can prove otherwise. Note that disabling of preemption (including
141 * 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.
142 */ 153 */
154#ifdef CONFIG_PREEMPT
143static inline int rcu_read_lock_sched_held(void) 155static inline int rcu_read_lock_sched_held(void)
144{ 156{
145 int lockdep_opinion = 0; 157 int lockdep_opinion = 0;
146 158
159 if (!debug_lockdep_rcu_enabled())
160 return 1;
147 if (debug_locks) 161 if (debug_locks)
148 lockdep_opinion = lock_is_held(&rcu_sched_lock_map); 162 lockdep_opinion = lock_is_held(&rcu_sched_lock_map);
149 return lockdep_opinion || preempt_count() != 0 || !rcu_scheduler_active; 163 return lockdep_opinion || preempt_count() != 0;
164}
165#else /* #ifdef CONFIG_PREEMPT */
166static inline int rcu_read_lock_sched_held(void)
167{
168 return 1;
150} 169}
170#endif /* #else #ifdef CONFIG_PREEMPT */
151 171
152#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ 172#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
153 173
@@ -168,10 +188,17 @@ static inline int rcu_read_lock_bh_held(void)
168 return 1; 188 return 1;
169} 189}
170 190
191#ifdef CONFIG_PREEMPT
171static inline int rcu_read_lock_sched_held(void) 192static inline int rcu_read_lock_sched_held(void)
172{ 193{
173 return preempt_count() != 0 || !rcu_scheduler_active; 194 return !rcu_scheduler_active || preempt_count() != 0;
195}
196#else /* #ifdef CONFIG_PREEMPT */
197static inline int rcu_read_lock_sched_held(void)
198{
199 return 1;
174} 200}
201#endif /* #else #ifdef CONFIG_PREEMPT */
175 202
176#endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ 203#endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */
177 204
@@ -188,7 +215,7 @@ static inline int rcu_read_lock_sched_held(void)
188 */ 215 */
189#define rcu_dereference_check(p, c) \ 216#define rcu_dereference_check(p, c) \
190 ({ \ 217 ({ \
191 if (debug_locks && !(c)) \ 218 if (debug_lockdep_rcu_enabled() && !(c)) \
192 lockdep_rcu_dereference(__FILE__, __LINE__); \ 219 lockdep_rcu_dereference(__FILE__, __LINE__); \
193 rcu_dereference_raw(p); \ 220 rcu_dereference_raw(p); \
194 }) 221 })
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/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 8d70ff802da2..dad7f668ebf7 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -258,6 +258,10 @@ extern spinlock_t mmlist_lock;
258 258
259struct task_struct; 259struct task_struct;
260 260
261#ifdef CONFIG_PROVE_RCU
262extern int lockdep_tasklist_lock_is_held(void);
263#endif /* #ifdef CONFIG_PROVE_RCU */
264
261extern void sched_init(void); 265extern void sched_init(void);
262extern void sched_init_smp(void); 266extern void sched_init_smp(void);
263extern asmlinkage void schedule_tail(struct task_struct *prev); 267extern asmlinkage void schedule_tail(struct task_struct *prev);
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
14struct ads7846_platform_data { 14struct 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/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
136static inline void do_raw_spin_lock(raw_spinlock_t *lock) 136static 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
141static inline void 142static inline void
142do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) 143do_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
152static inline void do_raw_spin_unlock(raw_spinlock_t *lock) 154static 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/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)
101int register_virtio_device(struct virtio_device *dev); 102int register_virtio_device(struct virtio_device *dev);
102void unregister_virtio_device(struct virtio_device *dev); 103void 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
13struct 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/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
38enum p9_proto_versions{ 38enum 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 */
48static 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
54static inline unsigned int rt6_flags2srcprefs(int flags)
55{
56 return (flags >> 3) & 7;
57}
40 58
41extern void ip6_route_input(struct sk_buff *skb); 59extern 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 @@
15struct ip6_tnl { 15struct 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/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/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 */
593static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) 595static 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. */
607static 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
604static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) 617static 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
281extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); 282extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo);
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 0804cd594803..601ad7744247 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -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;