diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-04 11:19:21 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-04 11:19:21 -0400 |
| commit | c318a821b9828ef3be97d5d896d146e7daa43c86 (patch) | |
| tree | 7ed40911ffebcbabf87ec4be692f6fb154053687 /include/linux | |
| parent | 322832f2f19e04c866a0ce4bdac8cff8e695f2b3 (diff) | |
| parent | a99cde438de0c4c0cecc1d1af1a55a75b10bfdef (diff) | |
Merge 4.7-rc6 into usb-next
We want the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/audit.h | 24 | ||||
| -rw-r--r-- | include/linux/bpf.h | 32 | ||||
| -rw-r--r-- | include/linux/dcache.h | 1 | ||||
| -rw-r--r-- | include/linux/inet_diag.h | 6 | ||||
| -rw-r--r-- | include/linux/init_task.h | 2 | ||||
| -rw-r--r-- | include/linux/jump_label.h | 16 | ||||
| -rw-r--r-- | include/linux/kasan.h | 11 | ||||
| -rw-r--r-- | include/linux/mfd/da9052/da9052.h | 2 | ||||
| -rw-r--r-- | include/linux/mlx4/device.h | 1 | ||||
| -rw-r--r-- | include/linux/mlx5/qp.h | 1 | ||||
| -rw-r--r-- | include/linux/mm.h | 2 | ||||
| -rw-r--r-- | include/linux/net.h | 3 | ||||
| -rw-r--r-- | include/linux/pwm.h | 16 | ||||
| -rw-r--r-- | include/linux/qed/qed_eth_if.h | 1 | ||||
| -rw-r--r-- | include/linux/reset.h | 211 | ||||
| -rw-r--r-- | include/linux/sched.h | 2 | ||||
| -rw-r--r-- | include/linux/sock_diag.h | 6 | ||||
| -rw-r--r-- | include/linux/usb/ehci_def.h | 4 |
18 files changed, 252 insertions, 89 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 | ||
| 351 | static 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 | |||
| 363 | static inline void audit_put_tty(struct tty_struct *tty) | ||
| 364 | { | ||
| 365 | tty_kref_put(tty); | ||
| 366 | } | ||
| 367 | |||
| 368 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); | 350 | extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); |
| 369 | extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); | 351 | extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); |
| 370 | extern void __audit_bprm(struct linux_binprm *bprm); | 352 | extern 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 | } |
| 525 | static inline struct tty_struct *audit_get_tty(struct task_struct *tsk) | ||
| 526 | { | ||
| 527 | return NULL; | ||
| 528 | } | ||
| 529 | static inline void audit_put_tty(struct tty_struct *tty) | ||
| 530 | { } | ||
| 531 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) | 507 | static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) |
| 532 | { } | 508 | { } |
| 533 | static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, | 509 | static 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 */ | ||
| 115 | enum 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 | |||
| 114 | struct bpf_prog; | 139 | struct bpf_prog; |
| 115 | 140 | ||
| 116 | struct bpf_verifier_ops { | 141 | struct 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) | |||
| 238 | static inline void bpf_prog_put(struct bpf_prog *prog) | 264 | static inline void bpf_prog_put(struct bpf_prog *prog) |
| 239 | { | 265 | { |
| 240 | } | 266 | } |
| 267 | |||
| 268 | static 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 f28100f6b556..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 | ||
| 216 | extern seqlock_t rename_lock; | 217 | extern seqlock_t rename_lock; |
| 217 | 218 | ||
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 | ||
| 53 | int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk); | 53 | int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk); |
| 54 | 54 | ||
| 55 | void inet_diag_msg_common_fill(struct inet_diag_msg *r, struct sock *sk); | ||
| 56 | |||
| 57 | int 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 | |||
| 55 | extern int inet_diag_register(const struct inet_diag_handler *handler); | 61 | extern int inet_diag_register(const struct inet_diag_handler *handler); |
| 56 | extern void inet_diag_unregister(const struct inet_diag_handler *handler); | 62 | extern 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/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 | |||
| 120 | static inline int static_key_count(struct static_key *key) | 122 | static 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 | ||
| 170 | static inline int static_key_count(struct static_key *key) | ||
| 171 | { | ||
| 172 | return atomic_read(&key->enabled); | ||
| 173 | } | ||
| 174 | |||
| 165 | static __always_inline void jump_label_init(void) | 175 | static __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 | ||
| 60 | void kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags); | 60 | void kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags); |
| 61 | void kasan_kfree_large(const void *ptr); | 61 | void kasan_kfree_large(const void *ptr); |
| 62 | void kasan_kfree(void *ptr); | 62 | void kasan_poison_kfree(void *ptr); |
| 63 | void kasan_kmalloc(struct kmem_cache *s, const void *object, size_t size, | 63 | void kasan_kmalloc(struct kmem_cache *s, const void *object, size_t size, |
| 64 | gfp_t flags); | 64 | gfp_t flags); |
| 65 | void kasan_krealloc(const void *object, size_t new_size, gfp_t flags); | 65 | void kasan_krealloc(const void *object, size_t new_size, gfp_t flags); |
| 66 | 66 | ||
| 67 | void kasan_slab_alloc(struct kmem_cache *s, void *object, gfp_t flags); | 67 | void kasan_slab_alloc(struct kmem_cache *s, void *object, gfp_t flags); |
| 68 | bool kasan_slab_free(struct kmem_cache *s, void *object); | 68 | bool kasan_slab_free(struct kmem_cache *s, void *object); |
| 69 | void kasan_poison_slab_free(struct kmem_cache *s, void *object); | ||
| 70 | 69 | ||
| 71 | struct kasan_cache { | 70 | struct kasan_cache { |
| 72 | int alloc_meta_offset; | 71 | int alloc_meta_offset; |
| @@ -76,6 +75,9 @@ struct kasan_cache { | |||
| 76 | int kasan_module_alloc(void *addr, size_t size); | 75 | int kasan_module_alloc(void *addr, size_t size); |
| 77 | void kasan_free_shadow(const struct vm_struct *vm); | 76 | void kasan_free_shadow(const struct vm_struct *vm); |
| 78 | 77 | ||
| 78 | size_t ksize(const void *); | ||
| 79 | static inline void kasan_unpoison_slab(const void *ptr) { ksize(ptr); } | ||
| 80 | |||
| 79 | #else /* CONFIG_KASAN */ | 81 | #else /* CONFIG_KASAN */ |
| 80 | 82 | ||
| 81 | static inline void kasan_unpoison_shadow(const void *address, size_t size) {} | 83 | static 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 | ||
| 103 | static inline void kasan_kmalloc_large(void *ptr, size_t size, gfp_t flags) {} | 105 | static inline void kasan_kmalloc_large(void *ptr, size_t size, gfp_t flags) {} |
| 104 | static inline void kasan_kfree_large(const void *ptr) {} | 106 | static inline void kasan_kfree_large(const void *ptr) {} |
| 105 | static inline void kasan_kfree(void *ptr) {} | 107 | static inline void kasan_poison_kfree(void *ptr) {} |
| 106 | static inline void kasan_kmalloc(struct kmem_cache *s, const void *object, | 108 | static 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) {} |
| 108 | static inline void kasan_krealloc(const void *object, size_t new_size, | 110 | static 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 | } |
| 117 | static inline void kasan_poison_slab_free(struct kmem_cache *s, void *object) {} | ||
| 118 | 119 | ||
| 119 | static inline int kasan_module_alloc(void *addr, size_t size) { return 0; } | 120 | static inline int kasan_module_alloc(void *addr, size_t size) { return 0; } |
| 120 | static inline void kasan_free_shadow(const struct vm_struct *vm) {} | 121 | static inline void kasan_free_shadow(const struct vm_struct *vm) {} |
| 121 | 122 | ||
| 123 | static 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/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, | |||
| 171 | static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, | 171 | static 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 { | |||
| 466 | enum { | 466 | enum { |
| 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/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 { | |||
| 172 | enum { | 172 | enum { |
| 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 | ||
| 604 | void do_set_pte(struct vm_area_struct *vma, unsigned long address, | 604 | void 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/pwm.h b/include/linux/pwm.h index 908b67c847cd..c038ae36b10e 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h | |||
| @@ -464,6 +464,8 @@ static inline bool pwm_can_sleep(struct pwm_device *pwm) | |||
| 464 | 464 | ||
| 465 | static inline void pwm_apply_args(struct pwm_device *pwm) | 465 | static inline void pwm_apply_args(struct pwm_device *pwm) |
| 466 | { | 466 | { |
| 467 | struct pwm_state state = { }; | ||
| 468 | |||
| 467 | /* | 469 | /* |
| 468 | * 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 |
| 469 | * 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. |
| @@ -476,18 +478,20 @@ static inline void pwm_apply_args(struct pwm_device *pwm) | |||
| 476 | * at startup (even if they are actually enabled), thus authorizing | 478 | * at startup (even if they are actually enabled), thus authorizing |
| 477 | * polarity setting. | 479 | * polarity setting. |
| 478 | * | 480 | * |
| 479 | * Instead of setting ->enabled to false, we call pwm_disable() | 481 | * To fulfill this requirement, we apply a new state which disables |
| 480 | * before pwm_set_polarity() to ensure that everything is configured | 482 | * the PWM device and set the reference period and polarity config. |
| 481 | * as expected, and the PWM is really disabled when the user request | ||
| 482 | * it. | ||
| 483 | * | 483 | * |
| 484 | * Note that PWM users requiring a smooth handover between the | 484 | * Note that PWM users requiring a smooth handover between the |
| 485 | * bootloader and the kernel (like critical regulators controlled by | 485 | * bootloader and the kernel (like critical regulators controlled by |
| 486 | * 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 |
| 487 | * pwm_apply_args(). | 487 | * pwm_apply_args(). |
| 488 | */ | 488 | */ |
| 489 | pwm_disable(pwm); | 489 | |
| 490 | 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); | ||
| 491 | } | 495 | } |
| 492 | 496 | ||
| 493 | struct pwm_lookup { | 497 | struct 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 | ||
| 54 | struct qed_stop_rxq_params { | 55 | struct 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 | */ |
| 101 | static inline struct reset_control *__must_check reset_control_get( | 101 | static 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 | ||
| 110 | static 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 | ||
| 138 | static 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 | |||
| 144 | static 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 | */ |
| 154 | static inline struct reset_control *of_reset_control_get( | 160 | static 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 | */ | ||
| 185 | static 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 | */ |
| 170 | static inline struct reset_control *of_reset_control_get_by_index( | 202 | static 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 | */ |
| 185 | static inline struct reset_control *__must_check devm_reset_control_get( | 230 | static 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 | |||
| 194 | static 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 | */ |
| 209 | static inline struct reset_control *devm_reset_control_get_by_index( | 248 | static 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 | ||
| 273 | static 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 | |||
| 279 | static 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 | */ | ||
| 297 | static inline struct reset_control * | ||
| 298 | devm_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 | */ |
| 240 | static inline struct reset_control *devm_reset_control_get_shared_by_index( | 313 | static inline struct reset_control * |
| 241 | struct device *dev, int index) | 314 | devm_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 | */ | ||
| 327 | static 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 | |||
| 333 | static 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 | |||
| 339 | static 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 | |||
| 345 | static 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 | |||
| 351 | static 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 | |||
| 357 | static 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 | |||
| 364 | static 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 | ||
| 3010 | extern void thread_info_cache_init(void); | 3010 | extern void thread_stack_cache_init(void); |
| 3011 | 3011 | ||
| 3012 | #ifdef CONFIG_DEBUG_STACK_USAGE | 3012 | #ifdef CONFIG_DEBUG_STACK_USAGE |
| 3013 | static inline unsigned long stack_not_used(struct task_struct *p) | 3013 | static inline unsigned long stack_not_used(struct task_struct *p) |
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/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 */ |
