aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-07-09 04:43:49 -0400
committerIngo Molnar <mingo@kernel.org>2016-07-09 04:43:49 -0400
commit52e31f89cc40c613b22e62108fe12b27433a888e (patch)
treec3cd45d6950706c32efdd341715e70b6ee6d7a5e /include/linux
parent9a7e7b571826c4399aa639af4a670642d96d935c (diff)
parentee40fb2948fc99096836995d4f3ddcc0efbac790 (diff)
Merge branch 'linus' into x86/asm, to pick up fixes before merging new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/audit.h24
-rw-r--r--include/linux/bpf.h32
-rw-r--r--include/linux/dcache.h13
-rw-r--r--include/linux/iio/common/st_sensors.h9
-rw-r--r--include/linux/inet_diag.h6
-rw-r--r--include/linux/init_task.h2
-rw-r--r--include/linux/isa.h5
-rw-r--r--include/linux/jump_label.h16
-rw-r--r--include/linux/kasan.h11
-rw-r--r--include/linux/leds.h23
-rw-r--r--include/linux/mfd/da9052/da9052.h2
-rw-r--r--include/linux/mlx4/device.h1
-rw-r--r--include/linux/mlx5/driver.h1
-rw-r--r--include/linux/mlx5/qp.h1
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/net.h3
-rw-r--r--include/linux/of.h2
-rw-r--r--include/linux/of_pci.h2
-rw-r--r--include/linux/of_reserved_mem.h7
-rw-r--r--include/linux/pwm.h19
-rw-r--r--include/linux/qed/qed_eth_if.h1
-rw-r--r--include/linux/reset.h211
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/skbuff.h20
-rw-r--r--include/linux/sock_diag.h6
-rw-r--r--include/linux/sunrpc/clnt.h2
-rw-r--r--include/linux/sunrpc/svc_xprt.h1
-rw-r--r--include/linux/sunrpc/xprt.h1
-rw-r--r--include/linux/thermal.h2
-rw-r--r--include/linux/usb/ehci_def.h4
-rw-r--r--include/linux/usb/gadget.h3
-rw-r--r--include/linux/usb/musb.h5
32 files changed, 330 insertions, 109 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 961a417d641e..e38e3fc13ea8 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -26,7 +26,6 @@
26#include <linux/sched.h> 26#include <linux/sched.h>
27#include <linux/ptrace.h> 27#include <linux/ptrace.h>
28#include <uapi/linux/audit.h> 28#include <uapi/linux/audit.h>
29#include <linux/tty.h>
30 29
31#define AUDIT_INO_UNSET ((unsigned long)-1) 30#define AUDIT_INO_UNSET ((unsigned long)-1)
32#define AUDIT_DEV_UNSET ((dev_t)-1) 31#define AUDIT_DEV_UNSET ((dev_t)-1)
@@ -348,23 +347,6 @@ static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
348 return tsk->sessionid; 347 return tsk->sessionid;
349} 348}
350 349
351static inline struct tty_struct *audit_get_tty(struct task_struct *tsk)
352{
353 struct tty_struct *tty = NULL;
354 unsigned long flags;
355
356 spin_lock_irqsave(&tsk->sighand->siglock, flags);
357 if (tsk->signal)
358 tty = tty_kref_get(tsk->signal->tty);
359 spin_unlock_irqrestore(&tsk->sighand->siglock, flags);
360 return tty;
361}
362
363static inline void audit_put_tty(struct tty_struct *tty)
364{
365 tty_kref_put(tty);
366}
367
368extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); 350extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
369extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); 351extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
370extern void __audit_bprm(struct linux_binprm *bprm); 352extern void __audit_bprm(struct linux_binprm *bprm);
@@ -522,12 +504,6 @@ static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
522{ 504{
523 return -1; 505 return -1;
524} 506}
525static inline struct tty_struct *audit_get_tty(struct task_struct *tsk)
526{
527 return NULL;
528}
529static inline void audit_put_tty(struct tty_struct *tty)
530{ }
531static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) 507static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
532{ } 508{ }
533static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, 509static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 8ee27b8afe81..0de4de6dd43e 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -111,6 +111,31 @@ enum bpf_access_type {
111 BPF_WRITE = 2 111 BPF_WRITE = 2
112}; 112};
113 113
114/* types of values stored in eBPF registers */
115enum bpf_reg_type {
116 NOT_INIT = 0, /* nothing was written into register */
117 UNKNOWN_VALUE, /* reg doesn't contain a valid pointer */
118 PTR_TO_CTX, /* reg points to bpf_context */
119 CONST_PTR_TO_MAP, /* reg points to struct bpf_map */
120 PTR_TO_MAP_VALUE, /* reg points to map element value */
121 PTR_TO_MAP_VALUE_OR_NULL,/* points to map elem value or NULL */
122 FRAME_PTR, /* reg == frame_pointer */
123 PTR_TO_STACK, /* reg == frame_pointer + imm */
124 CONST_IMM, /* constant integer value */
125
126 /* PTR_TO_PACKET represents:
127 * skb->data
128 * skb->data + imm
129 * skb->data + (u16) var
130 * skb->data + (u16) var + imm
131 * if (range > 0) then [ptr, ptr + range - off) is safe to access
132 * if (id > 0) means that some 'var' was added
133 * if (off > 0) menas that 'imm' was added
134 */
135 PTR_TO_PACKET,
136 PTR_TO_PACKET_END, /* skb->data + headlen */
137};
138
114struct bpf_prog; 139struct bpf_prog;
115 140
116struct bpf_verifier_ops { 141struct bpf_verifier_ops {
@@ -120,7 +145,8 @@ struct bpf_verifier_ops {
120 /* return true if 'size' wide access at offset 'off' within bpf_context 145 /* return true if 'size' wide access at offset 'off' within bpf_context
121 * with 'type' (read or write) is allowed 146 * with 'type' (read or write) is allowed
122 */ 147 */
123 bool (*is_valid_access)(int off, int size, enum bpf_access_type type); 148 bool (*is_valid_access)(int off, int size, enum bpf_access_type type,
149 enum bpf_reg_type *reg_type);
124 150
125 u32 (*convert_ctx_access)(enum bpf_access_type type, int dst_reg, 151 u32 (*convert_ctx_access)(enum bpf_access_type type, int dst_reg,
126 int src_reg, int ctx_off, 152 int src_reg, int ctx_off,
@@ -238,6 +264,10 @@ static inline struct bpf_prog *bpf_prog_get(u32 ufd)
238static inline void bpf_prog_put(struct bpf_prog *prog) 264static inline void bpf_prog_put(struct bpf_prog *prog)
239{ 265{
240} 266}
267
268static inline void bpf_prog_put_rcu(struct bpf_prog *prog)
269{
270}
241#endif /* CONFIG_BPF_SYSCALL */ 271#endif /* CONFIG_BPF_SYSCALL */
242 272
243/* verifier prototypes for helper functions called from eBPF programs */ 273/* verifier prototypes for helper functions called from eBPF programs */
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 484c8792da82..f53fa055021a 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -212,6 +212,7 @@ struct dentry_operations {
212#define DCACHE_OP_REAL 0x08000000 212#define DCACHE_OP_REAL 0x08000000
213 213
214#define DCACHE_PAR_LOOKUP 0x10000000 /* being looked up (with parent locked shared) */ 214#define DCACHE_PAR_LOOKUP 0x10000000 /* being looked up (with parent locked shared) */
215#define DCACHE_DENTRY_CURSOR 0x20000000
215 216
216extern seqlock_t rename_lock; 217extern seqlock_t rename_lock;
217 218
@@ -575,5 +576,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry,
575 return inode; 576 return inode;
576} 577}
577 578
579/**
580 * d_real_inode - Return the real inode
581 * @dentry: The dentry to query
582 *
583 * If dentry is on an union/overlay, then return the underlying, real inode.
584 * Otherwise return d_inode().
585 */
586static inline struct inode *d_real_inode(struct dentry *dentry)
587{
588 return d_backing_inode(d_real(dentry));
589}
590
578 591
579#endif /* __LINUX_DCACHE_H */ 592#endif /* __LINUX_DCACHE_H */
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index d029ffac0d69..99403b19092f 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -223,6 +223,8 @@ struct st_sensor_settings {
223 * @get_irq_data_ready: Function to get the IRQ used for data ready signal. 223 * @get_irq_data_ready: Function to get the IRQ used for data ready signal.
224 * @tf: Transfer function structure used by I/O operations. 224 * @tf: Transfer function structure used by I/O operations.
225 * @tb: Transfer buffers and mutex used by I/O operations. 225 * @tb: Transfer buffers and mutex used by I/O operations.
226 * @hw_irq_trigger: if we're using the hardware interrupt on the sensor.
227 * @hw_timestamp: Latest timestamp from the interrupt handler, when in use.
226 */ 228 */
227struct st_sensor_data { 229struct st_sensor_data {
228 struct device *dev; 230 struct device *dev;
@@ -247,6 +249,9 @@ struct st_sensor_data {
247 249
248 const struct st_sensor_transfer_function *tf; 250 const struct st_sensor_transfer_function *tf;
249 struct st_sensor_transfer_buffer tb; 251 struct st_sensor_transfer_buffer tb;
252
253 bool hw_irq_trigger;
254 s64 hw_timestamp;
250}; 255};
251 256
252#ifdef CONFIG_IIO_BUFFER 257#ifdef CONFIG_IIO_BUFFER
@@ -260,7 +265,8 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
260 const struct iio_trigger_ops *trigger_ops); 265 const struct iio_trigger_ops *trigger_ops);
261 266
262void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); 267void st_sensors_deallocate_trigger(struct iio_dev *indio_dev);
263 268int st_sensors_validate_device(struct iio_trigger *trig,
269 struct iio_dev *indio_dev);
264#else 270#else
265static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev, 271static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
266 const struct iio_trigger_ops *trigger_ops) 272 const struct iio_trigger_ops *trigger_ops)
@@ -271,6 +277,7 @@ static inline void st_sensors_deallocate_trigger(struct iio_dev *indio_dev)
271{ 277{
272 return; 278 return;
273} 279}
280#define st_sensors_validate_device NULL
274#endif 281#endif
275 282
276int st_sensors_init_sensor(struct iio_dev *indio_dev, 283int st_sensors_init_sensor(struct iio_dev *indio_dev,
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
index 7c27fa1030e8..feb04ea20f11 100644
--- a/include/linux/inet_diag.h
+++ b/include/linux/inet_diag.h
@@ -52,6 +52,12 @@ struct sock *inet_diag_find_one_icsk(struct net *net,
52 52
53int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk); 53int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk);
54 54
55void inet_diag_msg_common_fill(struct inet_diag_msg *r, struct sock *sk);
56
57int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb,
58 struct inet_diag_msg *r, int ext,
59 struct user_namespace *user_ns);
60
55extern int inet_diag_register(const struct inet_diag_handler *handler); 61extern int inet_diag_register(const struct inet_diag_handler *handler);
56extern void inet_diag_unregister(const struct inet_diag_handler *handler); 62extern void inet_diag_unregister(const struct inet_diag_handler *handler);
57#endif /* _INET_DIAG_H_ */ 63#endif /* _INET_DIAG_H_ */
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index f2cb8d45513d..f8834f820ec2 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -190,7 +190,7 @@ extern struct task_group root_task_group;
190#define INIT_TASK(tsk) \ 190#define INIT_TASK(tsk) \
191{ \ 191{ \
192 .state = 0, \ 192 .state = 0, \
193 .stack = &init_thread_info, \ 193 .stack = init_stack, \
194 .usage = ATOMIC_INIT(2), \ 194 .usage = ATOMIC_INIT(2), \
195 .flags = PF_KTHREAD, \ 195 .flags = PF_KTHREAD, \
196 .prio = MAX_PRIO-20, \ 196 .prio = MAX_PRIO-20, \
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 5ab85281230b..f2d0258414cf 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -6,6 +6,7 @@
6#define __LINUX_ISA_H 6#define __LINUX_ISA_H
7 7
8#include <linux/device.h> 8#include <linux/device.h>
9#include <linux/errno.h>
9#include <linux/kernel.h> 10#include <linux/kernel.h>
10 11
11struct isa_driver { 12struct isa_driver {
@@ -22,13 +23,13 @@ struct isa_driver {
22 23
23#define to_isa_driver(x) container_of((x), struct isa_driver, driver) 24#define to_isa_driver(x) container_of((x), struct isa_driver, driver)
24 25
25#ifdef CONFIG_ISA 26#ifdef CONFIG_ISA_BUS_API
26int isa_register_driver(struct isa_driver *, unsigned int); 27int isa_register_driver(struct isa_driver *, unsigned int);
27void isa_unregister_driver(struct isa_driver *); 28void isa_unregister_driver(struct isa_driver *);
28#else 29#else
29static inline int isa_register_driver(struct isa_driver *d, unsigned int i) 30static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
30{ 31{
31 return 0; 32 return -ENODEV;
32} 33}
33 34
34static inline void isa_unregister_driver(struct isa_driver *d) 35static inline void isa_unregister_driver(struct isa_driver *d)
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 0536524bb9eb..68904469fba1 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -117,13 +117,18 @@ struct module;
117 117
118#include <linux/atomic.h> 118#include <linux/atomic.h>
119 119
120#ifdef HAVE_JUMP_LABEL
121
120static inline int static_key_count(struct static_key *key) 122static inline int static_key_count(struct static_key *key)
121{ 123{
122 return atomic_read(&key->enabled); 124 /*
125 * -1 means the first static_key_slow_inc() is in progress.
126 * static_key_enabled() must return true, so return 1 here.
127 */
128 int n = atomic_read(&key->enabled);
129 return n >= 0 ? n : 1;
123} 130}
124 131
125#ifdef HAVE_JUMP_LABEL
126
127#define JUMP_TYPE_FALSE 0UL 132#define JUMP_TYPE_FALSE 0UL
128#define JUMP_TYPE_TRUE 1UL 133#define JUMP_TYPE_TRUE 1UL
129#define JUMP_TYPE_MASK 1UL 134#define JUMP_TYPE_MASK 1UL
@@ -162,6 +167,11 @@ extern void jump_label_apply_nops(struct module *mod);
162 167
163#else /* !HAVE_JUMP_LABEL */ 168#else /* !HAVE_JUMP_LABEL */
164 169
170static inline int static_key_count(struct static_key *key)
171{
172 return atomic_read(&key->enabled);
173}
174
165static __always_inline void jump_label_init(void) 175static __always_inline void jump_label_init(void)
166{ 176{
167 static_key_initialized = true; 177 static_key_initialized = true;
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 611927f5870d..ac4b3c46a84d 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -59,14 +59,13 @@ void kasan_poison_object_data(struct kmem_cache *cache, void *object);
59 59
60void kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags); 60void kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags);
61void kasan_kfree_large(const void *ptr); 61void kasan_kfree_large(const void *ptr);
62void kasan_kfree(void *ptr); 62void kasan_poison_kfree(void *ptr);
63void kasan_kmalloc(struct kmem_cache *s, const void *object, size_t size, 63void kasan_kmalloc(struct kmem_cache *s, const void *object, size_t size,
64 gfp_t flags); 64 gfp_t flags);
65void kasan_krealloc(const void *object, size_t new_size, gfp_t flags); 65void kasan_krealloc(const void *object, size_t new_size, gfp_t flags);
66 66
67void kasan_slab_alloc(struct kmem_cache *s, void *object, gfp_t flags); 67void kasan_slab_alloc(struct kmem_cache *s, void *object, gfp_t flags);
68bool kasan_slab_free(struct kmem_cache *s, void *object); 68bool kasan_slab_free(struct kmem_cache *s, void *object);
69void kasan_poison_slab_free(struct kmem_cache *s, void *object);
70 69
71struct kasan_cache { 70struct kasan_cache {
72 int alloc_meta_offset; 71 int alloc_meta_offset;
@@ -76,6 +75,9 @@ struct kasan_cache {
76int kasan_module_alloc(void *addr, size_t size); 75int kasan_module_alloc(void *addr, size_t size);
77void kasan_free_shadow(const struct vm_struct *vm); 76void kasan_free_shadow(const struct vm_struct *vm);
78 77
78size_t ksize(const void *);
79static inline void kasan_unpoison_slab(const void *ptr) { ksize(ptr); }
80
79#else /* CONFIG_KASAN */ 81#else /* CONFIG_KASAN */
80 82
81static inline void kasan_unpoison_shadow(const void *address, size_t size) {} 83static inline void kasan_unpoison_shadow(const void *address, size_t size) {}
@@ -102,7 +104,7 @@ static inline void kasan_poison_object_data(struct kmem_cache *cache,
102 104
103static inline void kasan_kmalloc_large(void *ptr, size_t size, gfp_t flags) {} 105static inline void kasan_kmalloc_large(void *ptr, size_t size, gfp_t flags) {}
104static inline void kasan_kfree_large(const void *ptr) {} 106static inline void kasan_kfree_large(const void *ptr) {}
105static inline void kasan_kfree(void *ptr) {} 107static inline void kasan_poison_kfree(void *ptr) {}
106static inline void kasan_kmalloc(struct kmem_cache *s, const void *object, 108static inline void kasan_kmalloc(struct kmem_cache *s, const void *object,
107 size_t size, gfp_t flags) {} 109 size_t size, gfp_t flags) {}
108static inline void kasan_krealloc(const void *object, size_t new_size, 110static inline void kasan_krealloc(const void *object, size_t new_size,
@@ -114,11 +116,12 @@ static inline bool kasan_slab_free(struct kmem_cache *s, void *object)
114{ 116{
115 return false; 117 return false;
116} 118}
117static inline void kasan_poison_slab_free(struct kmem_cache *s, void *object) {}
118 119
119static inline int kasan_module_alloc(void *addr, size_t size) { return 0; } 120static inline int kasan_module_alloc(void *addr, size_t size) { return 0; }
120static inline void kasan_free_shadow(const struct vm_struct *vm) {} 121static inline void kasan_free_shadow(const struct vm_struct *vm) {}
121 122
123static inline void kasan_unpoison_slab(const void *ptr) { }
124
122#endif /* CONFIG_KASAN */ 125#endif /* CONFIG_KASAN */
123 126
124#endif /* LINUX_KASAN_H */ 127#endif /* LINUX_KASAN_H */
diff --git a/include/linux/leds.h b/include/linux/leds.h
index d2b13066e781..e5e7f2e80a54 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -42,15 +42,16 @@ struct led_classdev {
42#define LED_UNREGISTERING (1 << 1) 42#define LED_UNREGISTERING (1 << 1)
43 /* Upper 16 bits reflect control information */ 43 /* Upper 16 bits reflect control information */
44#define LED_CORE_SUSPENDRESUME (1 << 16) 44#define LED_CORE_SUSPENDRESUME (1 << 16)
45#define LED_BLINK_ONESHOT (1 << 17) 45#define LED_BLINK_SW (1 << 17)
46#define LED_BLINK_ONESHOT_STOP (1 << 18) 46#define LED_BLINK_ONESHOT (1 << 18)
47#define LED_BLINK_INVERT (1 << 19) 47#define LED_BLINK_ONESHOT_STOP (1 << 19)
48#define LED_BLINK_BRIGHTNESS_CHANGE (1 << 20) 48#define LED_BLINK_INVERT (1 << 20)
49#define LED_BLINK_DISABLE (1 << 21) 49#define LED_BLINK_BRIGHTNESS_CHANGE (1 << 21)
50#define LED_SYSFS_DISABLE (1 << 22) 50#define LED_BLINK_DISABLE (1 << 22)
51#define LED_DEV_CAP_FLASH (1 << 23) 51#define LED_SYSFS_DISABLE (1 << 23)
52#define LED_HW_PLUGGABLE (1 << 24) 52#define LED_DEV_CAP_FLASH (1 << 24)
53#define LED_PANIC_INDICATOR (1 << 25) 53#define LED_HW_PLUGGABLE (1 << 25)
54#define LED_PANIC_INDICATOR (1 << 26)
54 55
55 /* Set LED brightness level 56 /* Set LED brightness level
56 * Must not sleep. Use brightness_set_blocking for drivers 57 * Must not sleep. Use brightness_set_blocking for drivers
@@ -72,8 +73,8 @@ struct led_classdev {
72 * and if both are zero then a sensible default should be chosen. 73 * and if both are zero then a sensible default should be chosen.
73 * The call should adjust the timings in that case and if it can't 74 * The call should adjust the timings in that case and if it can't
74 * match the values specified exactly. 75 * match the values specified exactly.
75 * Deactivate blinking again when the brightness is set to a fixed 76 * Deactivate blinking again when the brightness is set to LED_OFF
76 * value via the brightness_set() callback. 77 * via the brightness_set() callback.
77 */ 78 */
78 int (*blink_set)(struct led_classdev *led_cdev, 79 int (*blink_set)(struct led_classdev *led_cdev,
79 unsigned long *delay_on, 80 unsigned long *delay_on,
diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h
index c18a4c19d6fc..ce9230af09c2 100644
--- a/include/linux/mfd/da9052/da9052.h
+++ b/include/linux/mfd/da9052/da9052.h
@@ -171,7 +171,7 @@ static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg,
171static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, 171static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg,
172 unsigned reg_cnt, unsigned char *val) 172 unsigned reg_cnt, unsigned char *val)
173{ 173{
174 int ret; 174 int ret = 0;
175 int i; 175 int i;
176 176
177 for (i = 0; i < reg_cnt; i++) { 177 for (i = 0; i < reg_cnt; i++) {
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 80dec87a94f8..d46a0e7f144d 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -466,6 +466,7 @@ enum {
466enum { 466enum {
467 MLX4_INTERFACE_STATE_UP = 1 << 0, 467 MLX4_INTERFACE_STATE_UP = 1 << 0,
468 MLX4_INTERFACE_STATE_DELETION = 1 << 1, 468 MLX4_INTERFACE_STATE_DELETION = 1 << 1,
469 MLX4_INTERFACE_STATE_SHUTDOWN = 1 << 2,
469}; 470};
470 471
471#define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \ 472#define MSTR_SM_CHANGE_MASK (MLX4_EQ_PORT_INFO_MSTR_SM_SL_CHANGE_MASK | \
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 80776d0c52dc..fd72ecf0ce9f 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -629,6 +629,7 @@ struct mlx5_cmd_work_ent {
629 void *uout; 629 void *uout;
630 int uout_size; 630 int uout_size;
631 mlx5_cmd_cbk_t callback; 631 mlx5_cmd_cbk_t callback;
632 struct delayed_work cb_timeout_work;
632 void *context; 633 void *context;
633 int idx; 634 int idx;
634 struct completion done; 635 struct completion done;
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
index 266320feb160..ab310819ac36 100644
--- a/include/linux/mlx5/qp.h
+++ b/include/linux/mlx5/qp.h
@@ -172,6 +172,7 @@ enum {
172enum { 172enum {
173 MLX5_FENCE_MODE_NONE = 0 << 5, 173 MLX5_FENCE_MODE_NONE = 0 << 5,
174 MLX5_FENCE_MODE_INITIATOR_SMALL = 1 << 5, 174 MLX5_FENCE_MODE_INITIATOR_SMALL = 1 << 5,
175 MLX5_FENCE_MODE_FENCE = 2 << 5,
175 MLX5_FENCE_MODE_STRONG_ORDERING = 3 << 5, 176 MLX5_FENCE_MODE_STRONG_ORDERING = 3 << 5,
176 MLX5_FENCE_MODE_SMALL_AND_FENCE = 4 << 5, 177 MLX5_FENCE_MODE_SMALL_AND_FENCE = 4 << 5,
177}; 178};
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 5df5feb49575..ece042dfe23c 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -602,7 +602,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
602} 602}
603 603
604void do_set_pte(struct vm_area_struct *vma, unsigned long address, 604void do_set_pte(struct vm_area_struct *vma, unsigned long address,
605 struct page *page, pte_t *pte, bool write, bool anon, bool old); 605 struct page *page, pte_t *pte, bool write, bool anon);
606#endif 606#endif
607 607
608/* 608/*
diff --git a/include/linux/net.h b/include/linux/net.h
index 9aa49a05fe38..25aa03b51c4e 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -251,7 +251,8 @@ do { \
251 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ 251 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
252 if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ 252 if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
253 net_ratelimit()) \ 253 net_ratelimit()) \
254 __dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__); \ 254 __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
255 ##__VA_ARGS__); \
255} while (0) 256} while (0)
256#elif defined(DEBUG) 257#elif defined(DEBUG)
257#define net_dbg_ratelimited(fmt, ...) \ 258#define net_dbg_ratelimited(fmt, ...) \
diff --git a/include/linux/of.h b/include/linux/of.h
index c7292e8ea080..74eb28cadbef 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -614,7 +614,7 @@ static inline struct device_node *of_parse_phandle(const struct device_node *np,
614 return NULL; 614 return NULL;
615} 615}
616 616
617static inline int of_parse_phandle_with_args(struct device_node *np, 617static inline int of_parse_phandle_with_args(const struct device_node *np,
618 const char *list_name, 618 const char *list_name,
619 const char *cells_name, 619 const char *cells_name,
620 int index, 620 int index,
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h
index f6e9e85164e8..b969e9443962 100644
--- a/include/linux/of_pci.h
+++ b/include/linux/of_pci.h
@@ -8,7 +8,7 @@ struct pci_dev;
8struct of_phandle_args; 8struct of_phandle_args;
9struct device_node; 9struct device_node;
10 10
11#ifdef CONFIG_OF 11#ifdef CONFIG_OF_PCI
12int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq); 12int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq);
13struct device_node *of_pci_find_child_device(struct device_node *parent, 13struct device_node *of_pci_find_child_device(struct device_node *parent,
14 unsigned int devfn); 14 unsigned int devfn);
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h
index ad2f67054372..c201060e0c6d 100644
--- a/include/linux/of_reserved_mem.h
+++ b/include/linux/of_reserved_mem.h
@@ -31,6 +31,13 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem);
31int of_reserved_mem_device_init(struct device *dev); 31int of_reserved_mem_device_init(struct device *dev);
32void of_reserved_mem_device_release(struct device *dev); 32void of_reserved_mem_device_release(struct device *dev);
33 33
34int early_init_dt_alloc_reserved_memory_arch(phys_addr_t size,
35 phys_addr_t align,
36 phys_addr_t start,
37 phys_addr_t end,
38 bool nomap,
39 phys_addr_t *res_base);
40
34void fdt_init_reserved_mem(void); 41void fdt_init_reserved_mem(void);
35void fdt_reserved_mem_save_node(unsigned long node, const char *uname, 42void fdt_reserved_mem_save_node(unsigned long node, const char *uname,
36 phys_addr_t base, phys_addr_t size); 43 phys_addr_t base, phys_addr_t size);
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 17018f3c066e..c038ae36b10e 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -235,6 +235,9 @@ static inline int pwm_config(struct pwm_device *pwm, int duty_ns,
235 if (!pwm) 235 if (!pwm)
236 return -EINVAL; 236 return -EINVAL;
237 237
238 if (duty_ns < 0 || period_ns < 0)
239 return -EINVAL;
240
238 pwm_get_state(pwm, &state); 241 pwm_get_state(pwm, &state);
239 if (state.duty_cycle == duty_ns && state.period == period_ns) 242 if (state.duty_cycle == duty_ns && state.period == period_ns)
240 return 0; 243 return 0;
@@ -461,6 +464,8 @@ static inline bool pwm_can_sleep(struct pwm_device *pwm)
461 464
462static inline void pwm_apply_args(struct pwm_device *pwm) 465static inline void pwm_apply_args(struct pwm_device *pwm)
463{ 466{
467 struct pwm_state state = { };
468
464 /* 469 /*
465 * PWM users calling pwm_apply_args() expect to have a fresh config 470 * PWM users calling pwm_apply_args() expect to have a fresh config
466 * where the polarity and period are set according to pwm_args info. 471 * where the polarity and period are set according to pwm_args info.
@@ -473,18 +478,20 @@ static inline void pwm_apply_args(struct pwm_device *pwm)
473 * at startup (even if they are actually enabled), thus authorizing 478 * at startup (even if they are actually enabled), thus authorizing
474 * polarity setting. 479 * polarity setting.
475 * 480 *
476 * Instead of setting ->enabled to false, we call pwm_disable() 481 * To fulfill this requirement, we apply a new state which disables
477 * before pwm_set_polarity() to ensure that everything is configured 482 * the PWM device and set the reference period and polarity config.
478 * as expected, and the PWM is really disabled when the user request
479 * it.
480 * 483 *
481 * Note that PWM users requiring a smooth handover between the 484 * Note that PWM users requiring a smooth handover between the
482 * bootloader and the kernel (like critical regulators controlled by 485 * bootloader and the kernel (like critical regulators controlled by
483 * PWM devices) will have to switch to the atomic API and avoid calling 486 * PWM devices) will have to switch to the atomic API and avoid calling
484 * pwm_apply_args(). 487 * pwm_apply_args().
485 */ 488 */
486 pwm_disable(pwm); 489
487 pwm_set_polarity(pwm, pwm->args.polarity); 490 state.enabled = false;
491 state.polarity = pwm->args.polarity;
492 state.period = pwm->args.period;
493
494 pwm_apply_state(pwm, &state);
488} 495}
489 496
490struct pwm_lookup { 497struct pwm_lookup {
diff --git a/include/linux/qed/qed_eth_if.h b/include/linux/qed/qed_eth_if.h
index 6ae8cb4a61d3..6c876a63558d 100644
--- a/include/linux/qed/qed_eth_if.h
+++ b/include/linux/qed/qed_eth_if.h
@@ -49,6 +49,7 @@ struct qed_start_vport_params {
49 bool drop_ttl0; 49 bool drop_ttl0;
50 u8 vport_id; 50 u8 vport_id;
51 u16 mtu; 51 u16 mtu;
52 bool clear_stats;
52}; 53};
53 54
54struct qed_stop_rxq_params { 55struct qed_stop_rxq_params {
diff --git a/include/linux/reset.h b/include/linux/reset.h
index ec0306ce7b92..45a4abeb6acb 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -84,8 +84,8 @@ static inline struct reset_control *__devm_reset_control_get(
84#endif /* CONFIG_RESET_CONTROLLER */ 84#endif /* CONFIG_RESET_CONTROLLER */
85 85
86/** 86/**
87 * reset_control_get - Lookup and obtain an exclusive reference to a 87 * reset_control_get_exclusive - Lookup and obtain an exclusive reference
88 * reset controller. 88 * to a reset controller.
89 * @dev: device to be reset by the controller 89 * @dev: device to be reset by the controller
90 * @id: reset line name 90 * @id: reset line name
91 * 91 *
@@ -98,8 +98,8 @@ static inline struct reset_control *__devm_reset_control_get(
98 * 98 *
99 * Use of id names is optional. 99 * Use of id names is optional.
100 */ 100 */
101static inline struct reset_control *__must_check reset_control_get( 101static inline struct reset_control *
102 struct device *dev, const char *id) 102__must_check reset_control_get_exclusive(struct device *dev, const char *id)
103{ 103{
104#ifndef CONFIG_RESET_CONTROLLER 104#ifndef CONFIG_RESET_CONTROLLER
105 WARN_ON(1); 105 WARN_ON(1);
@@ -107,12 +107,6 @@ static inline struct reset_control *__must_check reset_control_get(
107 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0); 107 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
108} 108}
109 109
110static inline struct reset_control *reset_control_get_optional(
111 struct device *dev, const char *id)
112{
113 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
114}
115
116/** 110/**
117 * reset_control_get_shared - Lookup and obtain a shared reference to a 111 * reset_control_get_shared - Lookup and obtain a shared reference to a
118 * reset controller. 112 * reset controller.
@@ -141,9 +135,21 @@ static inline struct reset_control *reset_control_get_shared(
141 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1); 135 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1);
142} 136}
143 137
138static inline struct reset_control *reset_control_get_optional_exclusive(
139 struct device *dev, const char *id)
140{
141 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
142}
143
144static inline struct reset_control *reset_control_get_optional_shared(
145 struct device *dev, const char *id)
146{
147 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1);
148}
149
144/** 150/**
145 * of_reset_control_get - Lookup and obtain an exclusive reference to a 151 * of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
146 * reset controller. 152 * to a reset controller.
147 * @node: device to be reset by the controller 153 * @node: device to be reset by the controller
148 * @id: reset line name 154 * @id: reset line name
149 * 155 *
@@ -151,15 +157,41 @@ static inline struct reset_control *reset_control_get_shared(
151 * 157 *
152 * Use of id names is optional. 158 * Use of id names is optional.
153 */ 159 */
154static inline struct reset_control *of_reset_control_get( 160static inline struct reset_control *of_reset_control_get_exclusive(
155 struct device_node *node, const char *id) 161 struct device_node *node, const char *id)
156{ 162{
157 return __of_reset_control_get(node, id, 0, 0); 163 return __of_reset_control_get(node, id, 0, 0);
158} 164}
159 165
160/** 166/**
161 * of_reset_control_get_by_index - Lookup and obtain an exclusive reference to 167 * of_reset_control_get_shared - Lookup and obtain an shared reference
162 * a reset controller by index. 168 * to a reset controller.
169 * @node: device to be reset by the controller
170 * @id: reset line name
171 *
172 * When a reset-control is shared, the behavior of reset_control_assert /
173 * deassert is changed, the reset-core will keep track of a deassert_count
174 * and only (re-)assert the reset after reset_control_assert has been called
175 * as many times as reset_control_deassert was called. Also see the remark
176 * about shared reset-controls in the reset_control_assert docs.
177 *
178 * Calling reset_control_assert without first calling reset_control_deassert
179 * is not allowed on a shared reset control. Calling reset_control_reset is
180 * also not allowed on a shared reset control.
181 * Returns a struct reset_control or IS_ERR() condition containing errno.
182 *
183 * Use of id names is optional.
184 */
185static inline struct reset_control *of_reset_control_get_shared(
186 struct device_node *node, const char *id)
187{
188 return __of_reset_control_get(node, id, 0, 1);
189}
190
191/**
192 * of_reset_control_get_exclusive_by_index - Lookup and obtain an exclusive
193 * reference to a reset controller
194 * by index.
163 * @node: device to be reset by the controller 195 * @node: device to be reset by the controller
164 * @index: index of the reset controller 196 * @index: index of the reset controller
165 * 197 *
@@ -167,49 +199,60 @@ static inline struct reset_control *of_reset_control_get(
167 * in whatever order. Returns a struct reset_control or IS_ERR() condition 199 * in whatever order. Returns a struct reset_control or IS_ERR() condition
168 * containing errno. 200 * containing errno.
169 */ 201 */
170static inline struct reset_control *of_reset_control_get_by_index( 202static inline struct reset_control *of_reset_control_get_exclusive_by_index(
171 struct device_node *node, int index) 203 struct device_node *node, int index)
172{ 204{
173 return __of_reset_control_get(node, NULL, index, 0); 205 return __of_reset_control_get(node, NULL, index, 0);
174} 206}
175 207
176/** 208/**
177 * devm_reset_control_get - resource managed reset_control_get() 209 * of_reset_control_get_shared_by_index - Lookup and obtain an shared
178 * @dev: device to be reset by the controller 210 * reference to a reset controller
179 * @id: reset line name 211 * by index.
212 * @node: device to be reset by the controller
213 * @index: index of the reset controller
214 *
215 * When a reset-control is shared, the behavior of reset_control_assert /
216 * deassert is changed, the reset-core will keep track of a deassert_count
217 * and only (re-)assert the reset after reset_control_assert has been called
218 * as many times as reset_control_deassert was called. Also see the remark
219 * about shared reset-controls in the reset_control_assert docs.
220 *
221 * Calling reset_control_assert without first calling reset_control_deassert
222 * is not allowed on a shared reset control. Calling reset_control_reset is
223 * also not allowed on a shared reset control.
224 * Returns a struct reset_control or IS_ERR() condition containing errno.
180 * 225 *
181 * Managed reset_control_get(). For reset controllers returned from this 226 * This is to be used to perform a list of resets for a device or power domain
182 * function, reset_control_put() is called automatically on driver detach. 227 * in whatever order. Returns a struct reset_control or IS_ERR() condition
183 * See reset_control_get() for more information. 228 * containing errno.
184 */ 229 */
185static inline struct reset_control *__must_check devm_reset_control_get( 230static inline struct reset_control *of_reset_control_get_shared_by_index(
186 struct device *dev, const char *id) 231 struct device_node *node, int index)
187{
188#ifndef CONFIG_RESET_CONTROLLER
189 WARN_ON(1);
190#endif
191 return __devm_reset_control_get(dev, id, 0, 0);
192}
193
194static inline struct reset_control *devm_reset_control_get_optional(
195 struct device *dev, const char *id)
196{ 232{
197 return __devm_reset_control_get(dev, id, 0, 0); 233 return __of_reset_control_get(node, NULL, index, 1);
198} 234}
199 235
200/** 236/**
201 * devm_reset_control_get_by_index - resource managed reset_control_get 237 * devm_reset_control_get_exclusive - resource managed
238 * reset_control_get_exclusive()
202 * @dev: device to be reset by the controller 239 * @dev: device to be reset by the controller
203 * @index: index of the reset controller 240 * @id: reset line name
204 * 241 *
205 * Managed reset_control_get(). For reset controllers returned from this 242 * Managed reset_control_get_exclusive(). For reset controllers returned
206 * function, reset_control_put() is called automatically on driver detach. 243 * from this function, reset_control_put() is called automatically on driver
207 * See reset_control_get() for more information. 244 * detach.
245 *
246 * See reset_control_get_exclusive() for more information.
208 */ 247 */
209static inline struct reset_control *devm_reset_control_get_by_index( 248static inline struct reset_control *
210 struct device *dev, int index) 249__must_check devm_reset_control_get_exclusive(struct device *dev,
250 const char *id)
211{ 251{
212 return __devm_reset_control_get(dev, NULL, index, 0); 252#ifndef CONFIG_RESET_CONTROLLER
253 WARN_ON(1);
254#endif
255 return __devm_reset_control_get(dev, id, 0, 0);
213} 256}
214 257
215/** 258/**
@@ -227,6 +270,36 @@ static inline struct reset_control *devm_reset_control_get_shared(
227 return __devm_reset_control_get(dev, id, 0, 1); 270 return __devm_reset_control_get(dev, id, 0, 1);
228} 271}
229 272
273static inline struct reset_control *devm_reset_control_get_optional_exclusive(
274 struct device *dev, const char *id)
275{
276 return __devm_reset_control_get(dev, id, 0, 0);
277}
278
279static inline struct reset_control *devm_reset_control_get_optional_shared(
280 struct device *dev, const char *id)
281{
282 return __devm_reset_control_get(dev, id, 0, 1);
283}
284
285/**
286 * devm_reset_control_get_exclusive_by_index - resource managed
287 * reset_control_get_exclusive()
288 * @dev: device to be reset by the controller
289 * @index: index of the reset controller
290 *
291 * Managed reset_control_get_exclusive(). For reset controllers returned from
292 * this function, reset_control_put() is called automatically on driver
293 * detach.
294 *
295 * See reset_control_get_exclusive() for more information.
296 */
297static inline struct reset_control *
298devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
299{
300 return __devm_reset_control_get(dev, NULL, index, 0);
301}
302
230/** 303/**
231 * devm_reset_control_get_shared_by_index - resource managed 304 * devm_reset_control_get_shared_by_index - resource managed
232 * reset_control_get_shared 305 * reset_control_get_shared
@@ -237,10 +310,60 @@ static inline struct reset_control *devm_reset_control_get_shared(
237 * this function, reset_control_put() is called automatically on driver detach. 310 * this function, reset_control_put() is called automatically on driver detach.
238 * See reset_control_get_shared() for more information. 311 * See reset_control_get_shared() for more information.
239 */ 312 */
240static inline struct reset_control *devm_reset_control_get_shared_by_index( 313static inline struct reset_control *
241 struct device *dev, int index) 314devm_reset_control_get_shared_by_index(struct device *dev, int index)
242{ 315{
243 return __devm_reset_control_get(dev, NULL, index, 1); 316 return __devm_reset_control_get(dev, NULL, index, 1);
244} 317}
245 318
319/*
320 * TEMPORARY calls to use during transition:
321 *
322 * of_reset_control_get() => of_reset_control_get_exclusive()
323 *
324 * These inline function calls will be removed once all consumers
325 * have been moved over to the new explicit API.
326 */
327static inline struct reset_control *reset_control_get(
328 struct device *dev, const char *id)
329{
330 return reset_control_get_exclusive(dev, id);
331}
332
333static inline struct reset_control *reset_control_get_optional(
334 struct device *dev, const char *id)
335{
336 return reset_control_get_optional_exclusive(dev, id);
337}
338
339static inline struct reset_control *of_reset_control_get(
340 struct device_node *node, const char *id)
341{
342 return of_reset_control_get_exclusive(node, id);
343}
344
345static inline struct reset_control *of_reset_control_get_by_index(
346 struct device_node *node, int index)
347{
348 return of_reset_control_get_exclusive_by_index(node, index);
349}
350
351static inline struct reset_control *devm_reset_control_get(
352 struct device *dev, const char *id)
353{
354 return devm_reset_control_get_exclusive(dev, id);
355}
356
357static inline struct reset_control *devm_reset_control_get_optional(
358 struct device *dev, const char *id)
359{
360 return devm_reset_control_get_optional_exclusive(dev, id);
361
362}
363
364static inline struct reset_control *devm_reset_control_get_by_index(
365 struct device *dev, int index)
366{
367 return devm_reset_control_get_exclusive_by_index(dev, index);
368}
246#endif 369#endif
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6e42ada26345..253538f29ade 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -3007,7 +3007,7 @@ static inline int object_is_on_stack(void *obj)
3007 return (obj >= stack) && (obj < (stack + THREAD_SIZE)); 3007 return (obj >= stack) && (obj < (stack + THREAD_SIZE));
3008} 3008}
3009 3009
3010extern void thread_info_cache_init(void); 3010extern void thread_stack_cache_init(void);
3011 3011
3012#ifdef CONFIG_DEBUG_STACK_USAGE 3012#ifdef CONFIG_DEBUG_STACK_USAGE
3013static inline unsigned long stack_not_used(struct task_struct *p) 3013static inline unsigned long stack_not_used(struct task_struct *p)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index ee38a4127475..f39b37180c41 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1062,6 +1062,7 @@ __skb_set_sw_hash(struct sk_buff *skb, __u32 hash, bool is_l4)
1062} 1062}
1063 1063
1064void __skb_get_hash(struct sk_buff *skb); 1064void __skb_get_hash(struct sk_buff *skb);
1065u32 __skb_get_hash_symmetric(struct sk_buff *skb);
1065u32 skb_get_poff(const struct sk_buff *skb); 1066u32 skb_get_poff(const struct sk_buff *skb);
1066u32 __skb_get_poff(const struct sk_buff *skb, void *data, 1067u32 __skb_get_poff(const struct sk_buff *skb, void *data,
1067 const struct flow_keys *keys, int hlen); 1068 const struct flow_keys *keys, int hlen);
@@ -2870,6 +2871,25 @@ static inline void skb_postpush_rcsum(struct sk_buff *skb,
2870} 2871}
2871 2872
2872/** 2873/**
2874 * skb_push_rcsum - push skb and update receive checksum
2875 * @skb: buffer to update
2876 * @len: length of data pulled
2877 *
2878 * This function performs an skb_push on the packet and updates
2879 * the CHECKSUM_COMPLETE checksum. It should be used on
2880 * receive path processing instead of skb_push unless you know
2881 * that the checksum difference is zero (e.g., a valid IP header)
2882 * or you are setting ip_summed to CHECKSUM_NONE.
2883 */
2884static inline unsigned char *skb_push_rcsum(struct sk_buff *skb,
2885 unsigned int len)
2886{
2887 skb_push(skb, len);
2888 skb_postpush_rcsum(skb, skb->data, len);
2889 return skb->data;
2890}
2891
2892/**
2873 * pskb_trim_rcsum - trim received skb and update checksum 2893 * pskb_trim_rcsum - trim received skb and update checksum
2874 * @skb: buffer to trim 2894 * @skb: buffer to trim
2875 * @len: new length 2895 * @len: new length
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
index 4018b48f2b3b..a0596ca0e80a 100644
--- a/include/linux/sock_diag.h
+++ b/include/linux/sock_diag.h
@@ -36,6 +36,9 @@ enum sknetlink_groups sock_diag_destroy_group(const struct sock *sk)
36{ 36{
37 switch (sk->sk_family) { 37 switch (sk->sk_family) {
38 case AF_INET: 38 case AF_INET:
39 if (sk->sk_type == SOCK_RAW)
40 return SKNLGRP_NONE;
41
39 switch (sk->sk_protocol) { 42 switch (sk->sk_protocol) {
40 case IPPROTO_TCP: 43 case IPPROTO_TCP:
41 return SKNLGRP_INET_TCP_DESTROY; 44 return SKNLGRP_INET_TCP_DESTROY;
@@ -45,6 +48,9 @@ enum sknetlink_groups sock_diag_destroy_group(const struct sock *sk)
45 return SKNLGRP_NONE; 48 return SKNLGRP_NONE;
46 } 49 }
47 case AF_INET6: 50 case AF_INET6:
51 if (sk->sk_type == SOCK_RAW)
52 return SKNLGRP_NONE;
53
48 switch (sk->sk_protocol) { 54 switch (sk->sk_protocol) {
49 case IPPROTO_TCP: 55 case IPPROTO_TCP:
50 return SKNLGRP_INET6_TCP_DESTROY; 56 return SKNLGRP_INET6_TCP_DESTROY;
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 19c659d1c0f8..b6810c92b8bb 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -137,8 +137,6 @@ struct rpc_create_args {
137#define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) 137#define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9)
138 138
139struct rpc_clnt *rpc_create(struct rpc_create_args *args); 139struct rpc_clnt *rpc_create(struct rpc_create_args *args);
140struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args,
141 struct rpc_xprt *xprt);
142struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, 140struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
143 const struct rpc_program *, u32); 141 const struct rpc_program *, u32);
144struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); 142struct rpc_clnt *rpc_clone_client(struct rpc_clnt *);
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index b7dabc4baafd..79ba50856707 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -84,6 +84,7 @@ struct svc_xprt {
84 84
85 struct net *xpt_net; 85 struct net *xpt_net;
86 struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ 86 struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */
87 struct rpc_xprt_switch *xpt_bc_xps; /* NFSv4.1 backchannel */
87}; 88};
88 89
89static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) 90static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u)
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 5aa3834619a8..5e3e1b63dbb3 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -297,6 +297,7 @@ struct xprt_create {
297 size_t addrlen; 297 size_t addrlen;
298 const char *servername; 298 const char *servername;
299 struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ 299 struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */
300 struct rpc_xprt_switch *bc_xps;
300 unsigned int flags; 301 unsigned int flags;
301}; 302};
302 303
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index e45abe7db9a6..ee517bef0db0 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -335,6 +335,8 @@ struct thermal_genl_event {
335 * @get_trend: a pointer to a function that reads the sensor temperature trend. 335 * @get_trend: a pointer to a function that reads the sensor temperature trend.
336 * @set_emul_temp: a pointer to a function that sets sensor emulated 336 * @set_emul_temp: a pointer to a function that sets sensor emulated
337 * temperature. 337 * temperature.
338 * @set_trip_temp: a pointer to a function that sets the trip temperature on
339 * hardware.
338 */ 340 */
339struct thermal_zone_of_device_ops { 341struct thermal_zone_of_device_ops {
340 int (*get_temp)(void *, int *); 342 int (*get_temp)(void *, int *);
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h
index 966889a20ea3..e479033bd782 100644
--- a/include/linux/usb/ehci_def.h
+++ b/include/linux/usb/ehci_def.h
@@ -180,11 +180,11 @@ struct ehci_regs {
180 * PORTSCx 180 * PORTSCx
181 */ 181 */
182 /* HOSTPC: offset 0x84 */ 182 /* HOSTPC: offset 0x84 */
183 u32 hostpc[1]; /* HOSTPC extension */ 183 u32 hostpc[0]; /* HOSTPC extension */
184#define HOSTPC_PHCD (1<<22) /* Phy clock disable */ 184#define HOSTPC_PHCD (1<<22) /* Phy clock disable */
185#define HOSTPC_PSPD (3<<25) /* Port speed detection */ 185#define HOSTPC_PSPD (3<<25) /* Port speed detection */
186 186
187 u32 reserved5[16]; 187 u32 reserved5[17];
188 188
189 /* USBMODE_EX: offset 0xc8 */ 189 /* USBMODE_EX: offset 0xc8 */
190 u32 usbmode_ex; /* USB Device mode extension */ 190 u32 usbmode_ex; /* USB Device mode extension */
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 457651bf45b0..fefe8b06a63d 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -1034,6 +1034,8 @@ static inline int usb_gadget_activate(struct usb_gadget *gadget)
1034 * @udc_name: A name of UDC this driver should be bound to. If udc_name is NULL, 1034 * @udc_name: A name of UDC this driver should be bound to. If udc_name is NULL,
1035 * this driver will be bound to any available UDC. 1035 * this driver will be bound to any available UDC.
1036 * @pending: UDC core private data used for deferred probe of this driver. 1036 * @pending: UDC core private data used for deferred probe of this driver.
1037 * @match_existing_only: If udc is not found, return an error and don't add this
1038 * gadget driver to list of pending driver
1037 * 1039 *
1038 * Devices are disabled till a gadget driver successfully bind()s, which 1040 * Devices are disabled till a gadget driver successfully bind()s, which
1039 * means the driver will handle setup() requests needed to enumerate (and 1041 * means the driver will handle setup() requests needed to enumerate (and
@@ -1097,6 +1099,7 @@ struct usb_gadget_driver {
1097 1099
1098 char *udc_name; 1100 char *udc_name;
1099 struct list_head pending; 1101 struct list_head pending;
1102 unsigned match_existing_only:1;
1100}; 1103};
1101 1104
1102 1105
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index 0b3da40a525e..d315c8907869 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -142,10 +142,11 @@ enum musb_vbus_id_status {
142}; 142};
143 143
144#if IS_ENABLED(CONFIG_USB_MUSB_HDRC) 144#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
145void musb_mailbox(enum musb_vbus_id_status status); 145int musb_mailbox(enum musb_vbus_id_status status);
146#else 146#else
147static inline void musb_mailbox(enum musb_vbus_id_status status) 147static inline int musb_mailbox(enum musb_vbus_id_status status)
148{ 148{
149 return 0;
149} 150}
150#endif 151#endif
151 152