aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h3
-rw-r--r--include/linux/blkdev.h4
-rw-r--r--include/linux/bpf-cgroup.h27
-rw-r--r--include/linux/bpf.h8
-rw-r--r--include/linux/bpf_lirc.h5
-rw-r--r--include/linux/compat.h8
-rw-r--r--include/linux/compiler-gcc.h54
-rw-r--r--include/linux/compiler_types.h18
-rw-r--r--include/linux/dax.h2
-rw-r--r--include/linux/filter.h62
-rw-r--r--include/linux/fs.h3
-rw-r--r--include/linux/fsl/guts.h1
-rw-r--r--include/linux/ftrace.h2
-rw-r--r--include/linux/hid.h3
-rw-r--r--include/linux/if_bridge.h4
-rw-r--r--include/linux/igmp.h2
-rw-r--r--include/linux/iio/buffer-dma.h2
-rw-r--r--include/linux/input/mt.h2
-rw-r--r--include/linux/intel-iommu.h1
-rw-r--r--include/linux/kthread.h1
-rw-r--r--include/linux/libata.h24
-rw-r--r--include/linux/marvell_phy.h2
-rw-r--r--include/linux/mlx5/eswitch.h2
-rw-r--r--include/linux/mlx5/mlx5_ifc.h2
-rw-r--r--include/linux/mm.h6
-rw-r--r--include/linux/net.h1
-rw-r--r--include/linux/netdevice.h20
-rw-r--r--include/linux/pci.h2
-rw-r--r--include/linux/pm_domain.h6
-rw-r--r--include/linux/poll.h12
-rw-r--r--include/linux/rmi.h2
-rw-r--r--include/linux/scatterlist.h18
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/sched/task.h2
-rw-r--r--include/linux/skbuff.h13
-rw-r--r--include/linux/slub_def.h4
-rw-r--r--include/linux/syscalls.h5
-rw-r--r--include/linux/uio_driver.h2
38 files changed, 223 insertions, 114 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 4b35a66383f9..e54f40974eb0 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -443,6 +443,9 @@ int acpi_check_resource_conflict(const struct resource *res);
443int acpi_check_region(resource_size_t start, resource_size_t n, 443int acpi_check_region(resource_size_t start, resource_size_t n,
444 const char *name); 444 const char *name);
445 445
446acpi_status acpi_release_memory(acpi_handle handle, struct resource *res,
447 u32 level);
448
446int acpi_resources_are_enforced(void); 449int acpi_resources_are_enforced(void);
447 450
448#ifdef CONFIG_HIBERNATION 451#ifdef CONFIG_HIBERNATION
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 9154570edf29..79226ca8f80f 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1119,8 +1119,8 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q,
1119 if (!q->limits.chunk_sectors) 1119 if (!q->limits.chunk_sectors)
1120 return q->limits.max_sectors; 1120 return q->limits.max_sectors;
1121 1121
1122 return q->limits.chunk_sectors - 1122 return min(q->limits.max_sectors, (unsigned int)(q->limits.chunk_sectors -
1123 (offset & (q->limits.chunk_sectors - 1)); 1123 (offset & (q->limits.chunk_sectors - 1))));
1124} 1124}
1125 1125
1126static inline unsigned int blk_rq_get_max_sectors(struct request *rq, 1126static inline unsigned int blk_rq_get_max_sectors(struct request *rq,
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
index 975fb4cf1bb7..d50c2f0a655a 100644
--- a/include/linux/bpf-cgroup.h
+++ b/include/linux/bpf-cgroup.h
@@ -2,6 +2,7 @@
2#ifndef _BPF_CGROUP_H 2#ifndef _BPF_CGROUP_H
3#define _BPF_CGROUP_H 3#define _BPF_CGROUP_H
4 4
5#include <linux/errno.h>
5#include <linux/jump_label.h> 6#include <linux/jump_label.h>
6#include <uapi/linux/bpf.h> 7#include <uapi/linux/bpf.h>
7 8
@@ -188,12 +189,38 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor,
188 \ 189 \
189 __ret; \ 190 __ret; \
190}) 191})
192int cgroup_bpf_prog_attach(const union bpf_attr *attr,
193 enum bpf_prog_type ptype, struct bpf_prog *prog);
194int cgroup_bpf_prog_detach(const union bpf_attr *attr,
195 enum bpf_prog_type ptype);
196int cgroup_bpf_prog_query(const union bpf_attr *attr,
197 union bpf_attr __user *uattr);
191#else 198#else
192 199
200struct bpf_prog;
193struct cgroup_bpf {}; 201struct cgroup_bpf {};
194static inline void cgroup_bpf_put(struct cgroup *cgrp) {} 202static inline void cgroup_bpf_put(struct cgroup *cgrp) {}
195static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } 203static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
196 204
205static inline int cgroup_bpf_prog_attach(const union bpf_attr *attr,
206 enum bpf_prog_type ptype,
207 struct bpf_prog *prog)
208{
209 return -EINVAL;
210}
211
212static inline int cgroup_bpf_prog_detach(const union bpf_attr *attr,
213 enum bpf_prog_type ptype)
214{
215 return -EINVAL;
216}
217
218static inline int cgroup_bpf_prog_query(const union bpf_attr *attr,
219 union bpf_attr __user *uattr)
220{
221 return -EINVAL;
222}
223
197#define cgroup_bpf_enabled (0) 224#define cgroup_bpf_enabled (0)
198#define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) 225#define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0)
199#define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; }) 226#define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; })
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 7df32a3200f7..8827e797ff97 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -696,6 +696,8 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map)
696struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); 696struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key);
697struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); 697struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key);
698int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); 698int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type);
699int sockmap_get_from_fd(const union bpf_attr *attr, int type,
700 struct bpf_prog *prog);
699#else 701#else
700static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) 702static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key)
701{ 703{
@@ -714,6 +716,12 @@ static inline int sock_map_prog(struct bpf_map *map,
714{ 716{
715 return -EOPNOTSUPP; 717 return -EOPNOTSUPP;
716} 718}
719
720static inline int sockmap_get_from_fd(const union bpf_attr *attr, int type,
721 struct bpf_prog *prog)
722{
723 return -EINVAL;
724}
717#endif 725#endif
718 726
719#if defined(CONFIG_XDP_SOCKETS) 727#if defined(CONFIG_XDP_SOCKETS)
diff --git a/include/linux/bpf_lirc.h b/include/linux/bpf_lirc.h
index 5f8a4283092d..9d9ff755ec29 100644
--- a/include/linux/bpf_lirc.h
+++ b/include/linux/bpf_lirc.h
@@ -5,11 +5,12 @@
5#include <uapi/linux/bpf.h> 5#include <uapi/linux/bpf.h>
6 6
7#ifdef CONFIG_BPF_LIRC_MODE2 7#ifdef CONFIG_BPF_LIRC_MODE2
8int lirc_prog_attach(const union bpf_attr *attr); 8int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog);
9int lirc_prog_detach(const union bpf_attr *attr); 9int lirc_prog_detach(const union bpf_attr *attr);
10int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); 10int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr);
11#else 11#else
12static inline int lirc_prog_attach(const union bpf_attr *attr) 12static inline int lirc_prog_attach(const union bpf_attr *attr,
13 struct bpf_prog *prog)
13{ 14{
14 return -EINVAL; 15 return -EINVAL;
15} 16}
diff --git a/include/linux/compat.h b/include/linux/compat.h
index b1a5562b3215..c68acc47da57 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -72,6 +72,9 @@
72 */ 72 */
73#ifndef COMPAT_SYSCALL_DEFINEx 73#ifndef COMPAT_SYSCALL_DEFINEx
74#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ 74#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
75 __diag_push(); \
76 __diag_ignore(GCC, 8, "-Wattribute-alias", \
77 "Type aliasing is used to sanitize syscall arguments");\
75 asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ 78 asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
76 asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ 79 asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
77 __attribute__((alias(__stringify(__se_compat_sys##name)))); \ 80 __attribute__((alias(__stringify(__se_compat_sys##name)))); \
@@ -80,8 +83,11 @@
80 asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ 83 asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
81 asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ 84 asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
82 { \ 85 { \
83 return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ 86 long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
87 __MAP(x,__SC_TEST,__VA_ARGS__); \
88 return ret; \
84 } \ 89 } \
90 __diag_pop(); \
85 static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) 91 static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
86#endif /* COMPAT_SYSCALL_DEFINEx */ 92#endif /* COMPAT_SYSCALL_DEFINEx */
87 93
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index f1a7492a5cc8..573f5a7d42d4 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -66,25 +66,40 @@
66#endif 66#endif
67 67
68/* 68/*
69 * Feature detection for gnu_inline (gnu89 extern inline semantics). Either
70 * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics,
71 * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not
72 * defined so the gnu89 semantics are the default.
73 */
74#ifdef __GNUC_STDC_INLINE__
75# define __gnu_inline __attribute__((gnu_inline))
76#else
77# define __gnu_inline
78#endif
79
80/*
69 * Force always-inline if the user requests it so via the .config, 81 * Force always-inline if the user requests it so via the .config,
70 * or if gcc is too old. 82 * or if gcc is too old.
71 * GCC does not warn about unused static inline functions for 83 * GCC does not warn about unused static inline functions for
72 * -Wunused-function. This turns out to avoid the need for complex #ifdef 84 * -Wunused-function. This turns out to avoid the need for complex #ifdef
73 * directives. Suppress the warning in clang as well by using "unused" 85 * directives. Suppress the warning in clang as well by using "unused"
74 * function attribute, which is redundant but not harmful for gcc. 86 * function attribute, which is redundant but not harmful for gcc.
87 * Prefer gnu_inline, so that extern inline functions do not emit an
88 * externally visible function. This makes extern inline behave as per gnu89
89 * semantics rather than c99. This prevents multiple symbol definition errors
90 * of extern inline functions at link time.
91 * A lot of inline functions can cause havoc with function tracing.
75 */ 92 */
76#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ 93#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
77 !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) 94 !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
78#define inline inline __attribute__((always_inline,unused)) notrace 95#define inline \
79#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace 96 inline __attribute__((always_inline, unused)) notrace __gnu_inline
80#define __inline __inline __attribute__((always_inline,unused)) notrace
81#else 97#else
82/* A lot of inline functions can cause havoc with function tracing */ 98#define inline inline __attribute__((unused)) notrace __gnu_inline
83#define inline inline __attribute__((unused)) notrace
84#define __inline__ __inline__ __attribute__((unused)) notrace
85#define __inline __inline __attribute__((unused)) notrace
86#endif 99#endif
87 100
101#define __inline__ inline
102#define __inline inline
88#define __always_inline inline __attribute__((always_inline)) 103#define __always_inline inline __attribute__((always_inline))
89#define noinline __attribute__((noinline)) 104#define noinline __attribute__((noinline))
90 105
@@ -347,3 +362,28 @@
347#if GCC_VERSION >= 50100 362#if GCC_VERSION >= 50100
348#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 363#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
349#endif 364#endif
365
366/*
367 * Turn individual warnings and errors on and off locally, depending
368 * on version.
369 */
370#define __diag_GCC(version, severity, s) \
371 __diag_GCC_ ## version(__diag_GCC_ ## severity s)
372
373/* Severity used in pragma directives */
374#define __diag_GCC_ignore ignored
375#define __diag_GCC_warn warning
376#define __diag_GCC_error error
377
378/* Compilers before gcc-4.6 do not understand "#pragma GCC diagnostic push" */
379#if GCC_VERSION >= 40600
380#define __diag_str1(s) #s
381#define __diag_str(s) __diag_str1(s)
382#define __diag(s) _Pragma(__diag_str(GCC diagnostic s))
383#endif
384
385#if GCC_VERSION >= 80000
386#define __diag_GCC_8(s) __diag(s)
387#else
388#define __diag_GCC_8(s)
389#endif
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 6b79a9bba9a7..a8ba6b04152c 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -271,4 +271,22 @@ struct ftrace_likely_data {
271# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) 271# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
272#endif 272#endif
273 273
274#ifndef __diag
275#define __diag(string)
276#endif
277
278#ifndef __diag_GCC
279#define __diag_GCC(version, severity, string)
280#endif
281
282#define __diag_push() __diag(push)
283#define __diag_pop() __diag(pop)
284
285#define __diag_ignore(compiler, version, option, comment) \
286 __diag_ ## compiler(version, ignore, option)
287#define __diag_warn(compiler, version, option, comment) \
288 __diag_ ## compiler(version, warn, option)
289#define __diag_error(compiler, version, option, comment) \
290 __diag_ ## compiler(version, error, option)
291
274#endif /* __LINUX_COMPILER_TYPES_H */ 292#endif /* __LINUX_COMPILER_TYPES_H */
diff --git a/include/linux/dax.h b/include/linux/dax.h
index 3855e3800f48..deb0f663252f 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -135,7 +135,7 @@ void dax_flush(struct dax_device *dax_dev, void *addr, size_t size);
135 135
136ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, 136ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
137 const struct iomap_ops *ops); 137 const struct iomap_ops *ops);
138int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size, 138vm_fault_t dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size,
139 pfn_t *pfnp, int *errp, const struct iomap_ops *ops); 139 pfn_t *pfnp, int *errp, const struct iomap_ops *ops);
140vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf, 140vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf,
141 enum page_entry_size pe_size, pfn_t pfn); 141 enum page_entry_size pe_size, pfn_t pfn);
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 20f2659dd829..c73dd7396886 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -470,9 +470,7 @@ struct sock_fprog_kern {
470}; 470};
471 471
472struct bpf_binary_header { 472struct bpf_binary_header {
473 u16 pages; 473 u32 pages;
474 u16 locked:1;
475
476 /* Some arches need word alignment for their instructions */ 474 /* Some arches need word alignment for their instructions */
477 u8 image[] __aligned(4); 475 u8 image[] __aligned(4);
478}; 476};
@@ -481,7 +479,7 @@ struct bpf_prog {
481 u16 pages; /* Number of allocated pages */ 479 u16 pages; /* Number of allocated pages */
482 u16 jited:1, /* Is our filter JIT'ed? */ 480 u16 jited:1, /* Is our filter JIT'ed? */
483 jit_requested:1,/* archs need to JIT the prog */ 481 jit_requested:1,/* archs need to JIT the prog */
484 locked:1, /* Program image locked? */ 482 undo_set_mem:1, /* Passed set_memory_ro() checkpoint */
485 gpl_compatible:1, /* Is filter GPL compatible? */ 483 gpl_compatible:1, /* Is filter GPL compatible? */
486 cb_access:1, /* Is control block accessed? */ 484 cb_access:1, /* Is control block accessed? */
487 dst_needed:1, /* Do we need dst entry? */ 485 dst_needed:1, /* Do we need dst entry? */
@@ -677,46 +675,24 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default)
677 675
678static inline void bpf_prog_lock_ro(struct bpf_prog *fp) 676static inline void bpf_prog_lock_ro(struct bpf_prog *fp)
679{ 677{
680#ifdef CONFIG_ARCH_HAS_SET_MEMORY 678 fp->undo_set_mem = 1;
681 fp->locked = 1; 679 set_memory_ro((unsigned long)fp, fp->pages);
682 if (set_memory_ro((unsigned long)fp, fp->pages))
683 fp->locked = 0;
684#endif
685} 680}
686 681
687static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) 682static inline void bpf_prog_unlock_ro(struct bpf_prog *fp)
688{ 683{
689#ifdef CONFIG_ARCH_HAS_SET_MEMORY 684 if (fp->undo_set_mem)
690 if (fp->locked) { 685 set_memory_rw((unsigned long)fp, fp->pages);
691 WARN_ON_ONCE(set_memory_rw((unsigned long)fp, fp->pages));
692 /* In case set_memory_rw() fails, we want to be the first
693 * to crash here instead of some random place later on.
694 */
695 fp->locked = 0;
696 }
697#endif
698} 686}
699 687
700static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) 688static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr)
701{ 689{
702#ifdef CONFIG_ARCH_HAS_SET_MEMORY 690 set_memory_ro((unsigned long)hdr, hdr->pages);
703 hdr->locked = 1;
704 if (set_memory_ro((unsigned long)hdr, hdr->pages))
705 hdr->locked = 0;
706#endif
707} 691}
708 692
709static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) 693static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr)
710{ 694{
711#ifdef CONFIG_ARCH_HAS_SET_MEMORY 695 set_memory_rw((unsigned long)hdr, hdr->pages);
712 if (hdr->locked) {
713 WARN_ON_ONCE(set_memory_rw((unsigned long)hdr, hdr->pages));
714 /* In case set_memory_rw() fails, we want to be the first
715 * to crash here instead of some random place later on.
716 */
717 hdr->locked = 0;
718 }
719#endif
720} 696}
721 697
722static inline struct bpf_binary_header * 698static inline struct bpf_binary_header *
@@ -728,22 +704,6 @@ bpf_jit_binary_hdr(const struct bpf_prog *fp)
728 return (void *)addr; 704 return (void *)addr;
729} 705}
730 706
731#ifdef CONFIG_ARCH_HAS_SET_MEMORY
732static inline int bpf_prog_check_pages_ro_single(const struct bpf_prog *fp)
733{
734 if (!fp->locked)
735 return -ENOLCK;
736 if (fp->jited) {
737 const struct bpf_binary_header *hdr = bpf_jit_binary_hdr(fp);
738
739 if (!hdr->locked)
740 return -ENOLCK;
741 }
742
743 return 0;
744}
745#endif
746
747int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap); 707int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap);
748static inline int sk_filter(struct sock *sk, struct sk_buff *skb) 708static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
749{ 709{
@@ -805,8 +765,8 @@ static inline bool bpf_dump_raw_ok(void)
805struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, 765struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
806 const struct bpf_insn *patch, u32 len); 766 const struct bpf_insn *patch, u32 len);
807 767
808static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb, 768static inline int xdp_ok_fwd_dev(const struct net_device *fwd,
809 struct net_device *fwd) 769 unsigned int pktlen)
810{ 770{
811 unsigned int len; 771 unsigned int len;
812 772
@@ -814,7 +774,7 @@ static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb,
814 return -ENETDOWN; 774 return -ENETDOWN;
815 775
816 len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN; 776 len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN;
817 if (skb->len > len) 777 if (pktlen > len)
818 return -EMSGSIZE; 778 return -EMSGSIZE;
819 779
820 return 0; 780 return 0;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 5c91108846db..805bf22898cf 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1720,8 +1720,6 @@ struct file_operations {
1720 int (*iterate) (struct file *, struct dir_context *); 1720 int (*iterate) (struct file *, struct dir_context *);
1721 int (*iterate_shared) (struct file *, struct dir_context *); 1721 int (*iterate_shared) (struct file *, struct dir_context *);
1722 __poll_t (*poll) (struct file *, struct poll_table_struct *); 1722 __poll_t (*poll) (struct file *, struct poll_table_struct *);
1723 struct wait_queue_head * (*get_poll_head)(struct file *, __poll_t);
1724 __poll_t (*poll_mask) (struct file *, __poll_t);
1725 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 1723 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
1726 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 1724 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
1727 int (*mmap) (struct file *, struct vm_area_struct *); 1725 int (*mmap) (struct file *, struct vm_area_struct *);
@@ -2422,6 +2420,7 @@ extern struct file *filp_open(const char *, int, umode_t);
2422extern struct file *file_open_root(struct dentry *, struct vfsmount *, 2420extern struct file *file_open_root(struct dentry *, struct vfsmount *,
2423 const char *, int, umode_t); 2421 const char *, int, umode_t);
2424extern struct file * dentry_open(const struct path *, int, const struct cred *); 2422extern struct file * dentry_open(const struct path *, int, const struct cred *);
2423extern struct file *filp_clone_open(struct file *);
2425extern int filp_close(struct file *, fl_owner_t id); 2424extern int filp_close(struct file *, fl_owner_t id);
2426 2425
2427extern struct filename *getname_flags(const char __user *, int, int *); 2426extern struct filename *getname_flags(const char __user *, int, int *);
diff --git a/include/linux/fsl/guts.h b/include/linux/fsl/guts.h
index 3efa3b861d44..941b11811f85 100644
--- a/include/linux/fsl/guts.h
+++ b/include/linux/fsl/guts.h
@@ -16,6 +16,7 @@
16#define __FSL_GUTS_H__ 16#define __FSL_GUTS_H__
17 17
18#include <linux/types.h> 18#include <linux/types.h>
19#include <linux/io.h>
19 20
20/** 21/**
21 * Global Utility Registers. 22 * Global Utility Registers.
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 8154f4920fcb..ebb77674be90 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -223,7 +223,6 @@ extern enum ftrace_tracing_type_t ftrace_tracing_type;
223 */ 223 */
224int register_ftrace_function(struct ftrace_ops *ops); 224int register_ftrace_function(struct ftrace_ops *ops);
225int unregister_ftrace_function(struct ftrace_ops *ops); 225int unregister_ftrace_function(struct ftrace_ops *ops);
226void clear_ftrace_function(void);
227 226
228extern void ftrace_stub(unsigned long a0, unsigned long a1, 227extern void ftrace_stub(unsigned long a0, unsigned long a1,
229 struct ftrace_ops *op, struct pt_regs *regs); 228 struct ftrace_ops *op, struct pt_regs *regs);
@@ -239,7 +238,6 @@ static inline int ftrace_nr_registered_ops(void)
239{ 238{
240 return 0; 239 return 0;
241} 240}
242static inline void clear_ftrace_function(void) { }
243static inline void ftrace_kill(void) { } 241static inline void ftrace_kill(void) { }
244static inline void ftrace_free_init_mem(void) { } 242static inline void ftrace_free_init_mem(void) { }
245static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } 243static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { }
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 41a3d5775394..773bcb1d4044 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -511,6 +511,7 @@ struct hid_output_fifo {
511#define HID_STAT_ADDED BIT(0) 511#define HID_STAT_ADDED BIT(0)
512#define HID_STAT_PARSED BIT(1) 512#define HID_STAT_PARSED BIT(1)
513#define HID_STAT_DUP_DETECTED BIT(2) 513#define HID_STAT_DUP_DETECTED BIT(2)
514#define HID_STAT_REPROBED BIT(3)
514 515
515struct hid_input { 516struct hid_input {
516 struct list_head list; 517 struct list_head list;
@@ -579,7 +580,7 @@ struct hid_device { /* device report descriptor */
579 bool battery_avoid_query; 580 bool battery_avoid_query;
580#endif 581#endif
581 582
582 unsigned int status; /* see STAT flags above */ 583 unsigned long status; /* see STAT flags above */
583 unsigned claimed; /* Claimed by hidinput, hiddev? */ 584 unsigned claimed; /* Claimed by hidinput, hiddev? */
584 unsigned quirks; /* Various quirks the device can pull on us */ 585 unsigned quirks; /* Various quirks the device can pull on us */
585 bool io_started; /* If IO has started */ 586 bool io_started; /* If IO has started */
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
index 7843b98e1c6e..c20c7e197d07 100644
--- a/include/linux/if_bridge.h
+++ b/include/linux/if_bridge.h
@@ -105,13 +105,13 @@ static inline bool br_vlan_enabled(const struct net_device *dev)
105 105
106static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid) 106static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid)
107{ 107{
108 return -1; 108 return -EINVAL;
109} 109}
110 110
111static inline int br_vlan_get_info(const struct net_device *dev, u16 vid, 111static inline int br_vlan_get_info(const struct net_device *dev, u16 vid,
112 struct bridge_vlan_info *p_vinfo) 112 struct bridge_vlan_info *p_vinfo)
113{ 113{
114 return -1; 114 return -EINVAL;
115} 115}
116#endif 116#endif
117 117
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index f8231854b5d6..119f53941c12 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -109,6 +109,8 @@ struct ip_mc_list {
109extern int ip_check_mc_rcu(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u8 proto); 109extern int ip_check_mc_rcu(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u8 proto);
110extern int igmp_rcv(struct sk_buff *); 110extern int igmp_rcv(struct sk_buff *);
111extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr); 111extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr);
112extern int ip_mc_join_group_ssm(struct sock *sk, struct ip_mreqn *imr,
113 unsigned int mode);
112extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr); 114extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr);
113extern void ip_mc_drop_socket(struct sock *sk); 115extern void ip_mc_drop_socket(struct sock *sk);
114extern int ip_mc_source(int add, int omode, struct sock *sk, 116extern int ip_mc_source(int add, int omode, struct sock *sk,
diff --git a/include/linux/iio/buffer-dma.h b/include/linux/iio/buffer-dma.h
index 767467d886de..67c75372b691 100644
--- a/include/linux/iio/buffer-dma.h
+++ b/include/linux/iio/buffer-dma.h
@@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n,
141 char __user *user_buffer); 141 char __user *user_buffer);
142size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); 142size_t iio_dma_buffer_data_available(struct iio_buffer *buffer);
143int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); 143int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd);
144int iio_dma_buffer_set_length(struct iio_buffer *buffer, int length); 144int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length);
145int iio_dma_buffer_request_update(struct iio_buffer *buffer); 145int iio_dma_buffer_request_update(struct iio_buffer *buffer);
146 146
147int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, 147int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h
index d7188de4db96..3f4bf60b0bb5 100644
--- a/include/linux/input/mt.h
+++ b/include/linux/input/mt.h
@@ -100,7 +100,7 @@ static inline bool input_is_mt_axis(int axis)
100 return axis == ABS_MT_SLOT || input_is_mt_value(axis); 100 return axis == ABS_MT_SLOT || input_is_mt_value(axis);
101} 101}
102 102
103void input_mt_report_slot_state(struct input_dev *dev, 103bool input_mt_report_slot_state(struct input_dev *dev,
104 unsigned int tool_type, bool active); 104 unsigned int tool_type, bool active);
105 105
106void input_mt_report_finger_count(struct input_dev *dev, int count); 106void input_mt_report_finger_count(struct input_dev *dev, int count);
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 1df940196ab2..ef169d67df92 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -121,6 +121,7 @@
121#define ecap_srs(e) ((e >> 31) & 0x1) 121#define ecap_srs(e) ((e >> 31) & 0x1)
122#define ecap_ers(e) ((e >> 30) & 0x1) 122#define ecap_ers(e) ((e >> 30) & 0x1)
123#define ecap_prs(e) ((e >> 29) & 0x1) 123#define ecap_prs(e) ((e >> 29) & 0x1)
124#define ecap_broken_pasid(e) ((e >> 28) & 0x1)
124#define ecap_dis(e) ((e >> 27) & 0x1) 125#define ecap_dis(e) ((e >> 27) & 0x1)
125#define ecap_nest(e) ((e >> 26) & 0x1) 126#define ecap_nest(e) ((e >> 26) & 0x1)
126#define ecap_mts(e) ((e >> 25) & 0x1) 127#define ecap_mts(e) ((e >> 25) & 0x1)
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 2803264c512f..c1961761311d 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -62,7 +62,6 @@ void *kthread_probe_data(struct task_struct *k);
62int kthread_park(struct task_struct *k); 62int kthread_park(struct task_struct *k);
63void kthread_unpark(struct task_struct *k); 63void kthread_unpark(struct task_struct *k);
64void kthread_parkme(void); 64void kthread_parkme(void);
65void kthread_park_complete(struct task_struct *k);
66 65
67int kthreadd(void *unused); 66int kthreadd(void *unused);
68extern struct task_struct *kthreadd_task; 67extern struct task_struct *kthreadd_task;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 8b8946dd63b9..32f247cb5e9e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -210,6 +210,7 @@ enum {
210 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ 210 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
211 /* (doesn't imply presence) */ 211 /* (doesn't imply presence) */
212 ATA_FLAG_SATA = (1 << 1), 212 ATA_FLAG_SATA = (1 << 1),
213 ATA_FLAG_NO_LPM = (1 << 2), /* host not happy with LPM */
213 ATA_FLAG_NO_LOG_PAGE = (1 << 5), /* do not issue log page read */ 214 ATA_FLAG_NO_LOG_PAGE = (1 << 5), /* do not issue log page read */
214 ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */ 215 ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */
215 ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ 216 ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */
@@ -1495,6 +1496,29 @@ static inline bool ata_tag_valid(unsigned int tag)
1495 return tag < ATA_MAX_QUEUE || ata_tag_internal(tag); 1496 return tag < ATA_MAX_QUEUE || ata_tag_internal(tag);
1496} 1497}
1497 1498
1499#define __ata_qc_for_each(ap, qc, tag, max_tag, fn) \
1500 for ((tag) = 0; (tag) < (max_tag) && \
1501 ({ qc = fn((ap), (tag)); 1; }); (tag)++) \
1502
1503/*
1504 * Internal use only, iterate commands ignoring error handling and
1505 * status of 'qc'.
1506 */
1507#define ata_qc_for_each_raw(ap, qc, tag) \
1508 __ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE, __ata_qc_from_tag)
1509
1510/*
1511 * Iterate all potential commands that can be queued
1512 */
1513#define ata_qc_for_each(ap, qc, tag) \
1514 __ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE, ata_qc_from_tag)
1515
1516/*
1517 * Like ata_qc_for_each, but with the internal tag included
1518 */
1519#define ata_qc_for_each_with_internal(ap, qc, tag) \
1520 __ata_qc_for_each(ap, qc, tag, ATA_MAX_QUEUE + 1, ata_qc_from_tag)
1521
1498/* 1522/*
1499 * device helpers 1523 * device helpers
1500 */ 1524 */
diff --git a/include/linux/marvell_phy.h b/include/linux/marvell_phy.h
index 4f5f8c21e283..1eb6f244588d 100644
--- a/include/linux/marvell_phy.h
+++ b/include/linux/marvell_phy.h
@@ -27,6 +27,8 @@
27 */ 27 */
28#define MARVELL_PHY_ID_88E6390 0x01410f90 28#define MARVELL_PHY_ID_88E6390 0x01410f90
29 29
30#define MARVELL_PHY_FAMILY_ID(id) ((id) >> 4)
31
30/* struct phy_device dev_flags definitions */ 32/* struct phy_device dev_flags definitions */
31#define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001 33#define MARVELL_PHY_M1145_FLAGS_RESISTANCE 0x00000001
32#define MARVELL_PHY_M1118_DNS323_LEDS 0x00000002 34#define MARVELL_PHY_M1118_DNS323_LEDS 0x00000002
diff --git a/include/linux/mlx5/eswitch.h b/include/linux/mlx5/eswitch.h
index d3c9db492b30..fab5121ffb8f 100644
--- a/include/linux/mlx5/eswitch.h
+++ b/include/linux/mlx5/eswitch.h
@@ -8,6 +8,8 @@
8 8
9#include <linux/mlx5/driver.h> 9#include <linux/mlx5/driver.h>
10 10
11#define MLX5_ESWITCH_MANAGER(mdev) MLX5_CAP_GEN(mdev, eswitch_manager)
12
11enum { 13enum {
12 SRIOV_NONE, 14 SRIOV_NONE,
13 SRIOV_LEGACY, 15 SRIOV_LEGACY,
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 27134c4fcb76..ac281f5ec9b8 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -922,7 +922,7 @@ struct mlx5_ifc_cmd_hca_cap_bits {
922 u8 vnic_env_queue_counters[0x1]; 922 u8 vnic_env_queue_counters[0x1];
923 u8 ets[0x1]; 923 u8 ets[0x1];
924 u8 nic_flow_table[0x1]; 924 u8 nic_flow_table[0x1];
925 u8 eswitch_flow_table[0x1]; 925 u8 eswitch_manager[0x1];
926 u8 device_memory[0x1]; 926 u8 device_memory[0x1];
927 u8 mcam_reg[0x1]; 927 u8 mcam_reg[0x1];
928 u8 pcam_reg[0x1]; 928 u8 pcam_reg[0x1];
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a0fbb9ffe380..d3a3842316b8 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -155,7 +155,9 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,
155 * mmap() functions). 155 * mmap() functions).
156 */ 156 */
157 157
158extern struct kmem_cache *vm_area_cachep; 158struct vm_area_struct *vm_area_alloc(struct mm_struct *);
159struct vm_area_struct *vm_area_dup(struct vm_area_struct *);
160void vm_area_free(struct vm_area_struct *);
159 161
160#ifndef CONFIG_MMU 162#ifndef CONFIG_MMU
161extern struct rb_root nommu_region_tree; 163extern struct rb_root nommu_region_tree;
@@ -2132,7 +2134,7 @@ extern int __meminit __early_pfn_to_nid(unsigned long pfn,
2132 struct mminit_pfnnid_cache *state); 2134 struct mminit_pfnnid_cache *state);
2133#endif 2135#endif
2134 2136
2135#ifdef CONFIG_HAVE_MEMBLOCK 2137#if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP)
2136void zero_resv_unavail(void); 2138void zero_resv_unavail(void);
2137#else 2139#else
2138static inline void zero_resv_unavail(void) {} 2140static inline void zero_resv_unavail(void) {}
diff --git a/include/linux/net.h b/include/linux/net.h
index 08b6eb964dd6..6554d3ba4396 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -147,7 +147,6 @@ struct proto_ops {
147 int (*getname) (struct socket *sock, 147 int (*getname) (struct socket *sock,
148 struct sockaddr *addr, 148 struct sockaddr *addr,
149 int peer); 149 int peer);
150 __poll_t (*poll_mask) (struct socket *sock, __poll_t events);
151 __poll_t (*poll) (struct file *file, struct socket *sock, 150 __poll_t (*poll) (struct file *file, struct socket *sock,
152 struct poll_table_struct *wait); 151 struct poll_table_struct *wait);
153 int (*ioctl) (struct socket *sock, unsigned int cmd, 152 int (*ioctl) (struct socket *sock, unsigned int cmd,
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3ec9850c7936..3d0cc0b5cec2 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2789,11 +2789,31 @@ static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp,
2789 if (PTR_ERR(pp) != -EINPROGRESS) 2789 if (PTR_ERR(pp) != -EINPROGRESS)
2790 NAPI_GRO_CB(skb)->flush |= flush; 2790 NAPI_GRO_CB(skb)->flush |= flush;
2791} 2791}
2792static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb,
2793 struct sk_buff **pp,
2794 int flush,
2795 struct gro_remcsum *grc)
2796{
2797 if (PTR_ERR(pp) != -EINPROGRESS) {
2798 NAPI_GRO_CB(skb)->flush |= flush;
2799 skb_gro_remcsum_cleanup(skb, grc);
2800 skb->remcsum_offload = 0;
2801 }
2802}
2792#else 2803#else
2793static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush) 2804static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush)
2794{ 2805{
2795 NAPI_GRO_CB(skb)->flush |= flush; 2806 NAPI_GRO_CB(skb)->flush |= flush;
2796} 2807}
2808static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb,
2809 struct sk_buff **pp,
2810 int flush,
2811 struct gro_remcsum *grc)
2812{
2813 NAPI_GRO_CB(skb)->flush |= flush;
2814 skb_gro_remcsum_cleanup(skb, grc);
2815 skb->remcsum_offload = 0;
2816}
2797#endif 2817#endif
2798 2818
2799static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, 2819static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 340029b2fb38..abd5d5e17aee 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1240,6 +1240,8 @@ int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
1240unsigned long pci_address_to_pio(phys_addr_t addr); 1240unsigned long pci_address_to_pio(phys_addr_t addr);
1241phys_addr_t pci_pio_to_address(unsigned long pio); 1241phys_addr_t pci_pio_to_address(unsigned long pio);
1242int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr); 1242int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr);
1243int devm_pci_remap_iospace(struct device *dev, const struct resource *res,
1244 phys_addr_t phys_addr);
1243void pci_unmap_iospace(struct resource *res); 1245void pci_unmap_iospace(struct resource *res);
1244void __iomem *devm_pci_remap_cfgspace(struct device *dev, 1246void __iomem *devm_pci_remap_cfgspace(struct device *dev,
1245 resource_size_t offset, 1247 resource_size_t offset,
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 9206a4fef9ac..cb8d84090cfb 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -234,7 +234,7 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
234int of_genpd_parse_idle_states(struct device_node *dn, 234int of_genpd_parse_idle_states(struct device_node *dn,
235 struct genpd_power_state **states, int *n); 235 struct genpd_power_state **states, int *n);
236unsigned int of_genpd_opp_to_performance_state(struct device *dev, 236unsigned int of_genpd_opp_to_performance_state(struct device *dev,
237 struct device_node *opp_node); 237 struct device_node *np);
238 238
239int genpd_dev_pm_attach(struct device *dev); 239int genpd_dev_pm_attach(struct device *dev);
240struct device *genpd_dev_pm_attach_by_id(struct device *dev, 240struct device *genpd_dev_pm_attach_by_id(struct device *dev,
@@ -274,9 +274,9 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn,
274 274
275static inline unsigned int 275static inline unsigned int
276of_genpd_opp_to_performance_state(struct device *dev, 276of_genpd_opp_to_performance_state(struct device *dev,
277 struct device_node *opp_node) 277 struct device_node *np)
278{ 278{
279 return -ENODEV; 279 return 0;
280} 280}
281 281
282static inline int genpd_dev_pm_attach(struct device *dev) 282static inline int genpd_dev_pm_attach(struct device *dev)
diff --git a/include/linux/poll.h b/include/linux/poll.h
index fdf86b4cbc71..7e0fdcf905d2 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -74,18 +74,18 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
74 pt->_key = ~(__poll_t)0; /* all events enabled */ 74 pt->_key = ~(__poll_t)0; /* all events enabled */
75} 75}
76 76
77static inline bool file_has_poll_mask(struct file *file) 77static inline bool file_can_poll(struct file *file)
78{ 78{
79 return file->f_op->get_poll_head && file->f_op->poll_mask; 79 return file->f_op->poll;
80} 80}
81 81
82static inline bool file_can_poll(struct file *file) 82static inline __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt)
83{ 83{
84 return file->f_op->poll || file_has_poll_mask(file); 84 if (unlikely(!file->f_op->poll))
85 return DEFAULT_POLLMASK;
86 return file->f_op->poll(file, pt);
85} 87}
86 88
87__poll_t vfs_poll(struct file *file, struct poll_table_struct *pt);
88
89struct poll_table_entry { 89struct poll_table_entry {
90 struct file *filp; 90 struct file *filp;
91 __poll_t key; 91 __poll_t key;
diff --git a/include/linux/rmi.h b/include/linux/rmi.h
index 64125443f8a6..5ef5c7c412a7 100644
--- a/include/linux/rmi.h
+++ b/include/linux/rmi.h
@@ -354,6 +354,8 @@ struct rmi_driver_data {
354 struct mutex irq_mutex; 354 struct mutex irq_mutex;
355 struct input_dev *input; 355 struct input_dev *input;
356 356
357 struct irq_domain *irqdomain;
358
357 u8 pdt_props; 359 u8 pdt_props;
358 360
359 u8 num_rx_electrodes; 361 u8 num_rx_electrodes;
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 51f52020ad5f..093aa57120b0 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -9,9 +9,6 @@
9#include <asm/io.h> 9#include <asm/io.h>
10 10
11struct scatterlist { 11struct scatterlist {
12#ifdef CONFIG_DEBUG_SG
13 unsigned long sg_magic;
14#endif
15 unsigned long page_link; 12 unsigned long page_link;
16 unsigned int offset; 13 unsigned int offset;
17 unsigned int length; 14 unsigned int length;
@@ -64,7 +61,6 @@ struct sg_table {
64 * 61 *
65 */ 62 */
66 63
67#define SG_MAGIC 0x87654321
68#define SG_CHAIN 0x01UL 64#define SG_CHAIN 0x01UL
69#define SG_END 0x02UL 65#define SG_END 0x02UL
70 66
@@ -98,7 +94,6 @@ static inline void sg_assign_page(struct scatterlist *sg, struct page *page)
98 */ 94 */
99 BUG_ON((unsigned long) page & (SG_CHAIN | SG_END)); 95 BUG_ON((unsigned long) page & (SG_CHAIN | SG_END));
100#ifdef CONFIG_DEBUG_SG 96#ifdef CONFIG_DEBUG_SG
101 BUG_ON(sg->sg_magic != SG_MAGIC);
102 BUG_ON(sg_is_chain(sg)); 97 BUG_ON(sg_is_chain(sg));
103#endif 98#endif
104 sg->page_link = page_link | (unsigned long) page; 99 sg->page_link = page_link | (unsigned long) page;
@@ -129,7 +124,6 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page,
129static inline struct page *sg_page(struct scatterlist *sg) 124static inline struct page *sg_page(struct scatterlist *sg)
130{ 125{
131#ifdef CONFIG_DEBUG_SG 126#ifdef CONFIG_DEBUG_SG
132 BUG_ON(sg->sg_magic != SG_MAGIC);
133 BUG_ON(sg_is_chain(sg)); 127 BUG_ON(sg_is_chain(sg));
134#endif 128#endif
135 return (struct page *)((sg)->page_link & ~(SG_CHAIN | SG_END)); 129 return (struct page *)((sg)->page_link & ~(SG_CHAIN | SG_END));
@@ -195,9 +189,6 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
195 **/ 189 **/
196static inline void sg_mark_end(struct scatterlist *sg) 190static inline void sg_mark_end(struct scatterlist *sg)
197{ 191{
198#ifdef CONFIG_DEBUG_SG
199 BUG_ON(sg->sg_magic != SG_MAGIC);
200#endif
201 /* 192 /*
202 * Set termination bit, clear potential chain bit 193 * Set termination bit, clear potential chain bit
203 */ 194 */
@@ -215,9 +206,6 @@ static inline void sg_mark_end(struct scatterlist *sg)
215 **/ 206 **/
216static inline void sg_unmark_end(struct scatterlist *sg) 207static inline void sg_unmark_end(struct scatterlist *sg)
217{ 208{
218#ifdef CONFIG_DEBUG_SG
219 BUG_ON(sg->sg_magic != SG_MAGIC);
220#endif
221 sg->page_link &= ~SG_END; 209 sg->page_link &= ~SG_END;
222} 210}
223 211
@@ -260,12 +248,6 @@ static inline void *sg_virt(struct scatterlist *sg)
260static inline void sg_init_marker(struct scatterlist *sgl, 248static inline void sg_init_marker(struct scatterlist *sgl,
261 unsigned int nents) 249 unsigned int nents)
262{ 250{
263#ifdef CONFIG_DEBUG_SG
264 unsigned int i;
265
266 for (i = 0; i < nents; i++)
267 sgl[i].sg_magic = SG_MAGIC;
268#endif
269 sg_mark_end(&sgl[nents - 1]); 251 sg_mark_end(&sgl[nents - 1]);
270} 252}
271 253
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9256118bd40c..43731fe51c97 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -118,7 +118,7 @@ struct task_group;
118 * the comment with set_special_state(). 118 * the comment with set_special_state().
119 */ 119 */
120#define is_special_task_state(state) \ 120#define is_special_task_state(state) \
121 ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_DEAD)) 121 ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_PARKED | TASK_DEAD))
122 122
123#define __set_current_state(state_value) \ 123#define __set_current_state(state_value) \
124 do { \ 124 do { \
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index 5be31eb7b266..108ede99e533 100644
--- a/include/linux/sched/task.h
+++ b/include/linux/sched/task.h
@@ -75,7 +75,7 @@ extern long _do_fork(unsigned long, unsigned long, unsigned long, int __user *,
75extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *); 75extern long do_fork(unsigned long, unsigned long, unsigned long, int __user *, int __user *);
76struct task_struct *fork_idle(int); 76struct task_struct *fork_idle(int);
77extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); 77extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
78extern long kernel_wait4(pid_t, int *, int, struct rusage *); 78extern long kernel_wait4(pid_t, int __user *, int, struct rusage *);
79 79
80extern void free_task(struct task_struct *tsk); 80extern void free_task(struct task_struct *tsk);
81 81
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index c86885954994..610a201126ee 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -630,6 +630,7 @@ typedef unsigned char *sk_buff_data_t;
630 * @hash: the packet hash 630 * @hash: the packet hash
631 * @queue_mapping: Queue mapping for multiqueue devices 631 * @queue_mapping: Queue mapping for multiqueue devices
632 * @xmit_more: More SKBs are pending for this queue 632 * @xmit_more: More SKBs are pending for this queue
633 * @pfmemalloc: skbuff was allocated from PFMEMALLOC reserves
633 * @ndisc_nodetype: router type (from link layer) 634 * @ndisc_nodetype: router type (from link layer)
634 * @ooo_okay: allow the mapping of a socket to a queue to be changed 635 * @ooo_okay: allow the mapping of a socket to a queue to be changed
635 * @l4_hash: indicate hash is a canonical 4-tuple hash over transport 636 * @l4_hash: indicate hash is a canonical 4-tuple hash over transport
@@ -735,7 +736,7 @@ struct sk_buff {
735 peeked:1, 736 peeked:1,
736 head_frag:1, 737 head_frag:1,
737 xmit_more:1, 738 xmit_more:1,
738 __unused:1; /* one bit hole */ 739 pfmemalloc:1;
739 740
740 /* fields enclosed in headers_start/headers_end are copied 741 /* fields enclosed in headers_start/headers_end are copied
741 * using a single memcpy() in __copy_skb_header() 742 * using a single memcpy() in __copy_skb_header()
@@ -754,31 +755,30 @@ struct sk_buff {
754 755
755 __u8 __pkt_type_offset[0]; 756 __u8 __pkt_type_offset[0];
756 __u8 pkt_type:3; 757 __u8 pkt_type:3;
757 __u8 pfmemalloc:1;
758 __u8 ignore_df:1; 758 __u8 ignore_df:1;
759
760 __u8 nf_trace:1; 759 __u8 nf_trace:1;
761 __u8 ip_summed:2; 760 __u8 ip_summed:2;
762 __u8 ooo_okay:1; 761 __u8 ooo_okay:1;
762
763 __u8 l4_hash:1; 763 __u8 l4_hash:1;
764 __u8 sw_hash:1; 764 __u8 sw_hash:1;
765 __u8 wifi_acked_valid:1; 765 __u8 wifi_acked_valid:1;
766 __u8 wifi_acked:1; 766 __u8 wifi_acked:1;
767
768 __u8 no_fcs:1; 767 __u8 no_fcs:1;
769 /* Indicates the inner headers are valid in the skbuff. */ 768 /* Indicates the inner headers are valid in the skbuff. */
770 __u8 encapsulation:1; 769 __u8 encapsulation:1;
771 __u8 encap_hdr_csum:1; 770 __u8 encap_hdr_csum:1;
772 __u8 csum_valid:1; 771 __u8 csum_valid:1;
772
773 __u8 csum_complete_sw:1; 773 __u8 csum_complete_sw:1;
774 __u8 csum_level:2; 774 __u8 csum_level:2;
775 __u8 csum_not_inet:1; 775 __u8 csum_not_inet:1;
776
777 __u8 dst_pending_confirm:1; 776 __u8 dst_pending_confirm:1;
778#ifdef CONFIG_IPV6_NDISC_NODETYPE 777#ifdef CONFIG_IPV6_NDISC_NODETYPE
779 __u8 ndisc_nodetype:2; 778 __u8 ndisc_nodetype:2;
780#endif 779#endif
781 __u8 ipvs_property:1; 780 __u8 ipvs_property:1;
781
782 __u8 inner_protocol_type:1; 782 __u8 inner_protocol_type:1;
783 __u8 remcsum_offload:1; 783 __u8 remcsum_offload:1;
784#ifdef CONFIG_NET_SWITCHDEV 784#ifdef CONFIG_NET_SWITCHDEV
@@ -3252,7 +3252,8 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
3252 int *peeked, int *off, int *err); 3252 int *peeked, int *off, int *err);
3253struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, 3253struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
3254 int *err); 3254 int *err);
3255__poll_t datagram_poll_mask(struct socket *sock, __poll_t events); 3255__poll_t datagram_poll(struct file *file, struct socket *sock,
3256 struct poll_table_struct *wait);
3256int skb_copy_datagram_iter(const struct sk_buff *from, int offset, 3257int skb_copy_datagram_iter(const struct sk_buff *from, int offset,
3257 struct iov_iter *to, int size); 3258 struct iov_iter *to, int size);
3258static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset, 3259static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset,
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 09fa2c6f0e68..3a1a1dbc6f49 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -155,8 +155,12 @@ struct kmem_cache {
155 155
156#ifdef CONFIG_SYSFS 156#ifdef CONFIG_SYSFS
157#define SLAB_SUPPORTS_SYSFS 157#define SLAB_SUPPORTS_SYSFS
158void sysfs_slab_unlink(struct kmem_cache *);
158void sysfs_slab_release(struct kmem_cache *); 159void sysfs_slab_release(struct kmem_cache *);
159#else 160#else
161static inline void sysfs_slab_unlink(struct kmem_cache *s)
162{
163}
160static inline void sysfs_slab_release(struct kmem_cache *s) 164static inline void sysfs_slab_release(struct kmem_cache *s)
161{ 165{
162} 166}
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 73810808cdf2..5c1a0933768e 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -11,6 +11,7 @@
11#ifndef _LINUX_SYSCALLS_H 11#ifndef _LINUX_SYSCALLS_H
12#define _LINUX_SYSCALLS_H 12#define _LINUX_SYSCALLS_H
13 13
14struct __aio_sigset;
14struct epoll_event; 15struct epoll_event;
15struct iattr; 16struct iattr;
16struct inode; 17struct inode;
@@ -231,6 +232,9 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
231 */ 232 */
232#ifndef __SYSCALL_DEFINEx 233#ifndef __SYSCALL_DEFINEx
233#define __SYSCALL_DEFINEx(x, name, ...) \ 234#define __SYSCALL_DEFINEx(x, name, ...) \
235 __diag_push(); \
236 __diag_ignore(GCC, 8, "-Wattribute-alias", \
237 "Type aliasing is used to sanitize syscall arguments");\
234 asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ 238 asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
235 __attribute__((alias(__stringify(__se_sys##name)))); \ 239 __attribute__((alias(__stringify(__se_sys##name)))); \
236 ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ 240 ALLOW_ERROR_INJECTION(sys##name, ERRNO); \
@@ -243,6 +247,7 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
243 __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ 247 __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
244 return ret; \ 248 return ret; \
245 } \ 249 } \
250 __diag_pop(); \
246 static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) 251 static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
247#endif /* __SYSCALL_DEFINEx */ 252#endif /* __SYSCALL_DEFINEx */
248 253
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
index 6c5f2074e14f..6f8b68cd460f 100644
--- a/include/linux/uio_driver.h
+++ b/include/linux/uio_driver.h
@@ -75,7 +75,7 @@ struct uio_device {
75 struct fasync_struct *async_queue; 75 struct fasync_struct *async_queue;
76 wait_queue_head_t wait; 76 wait_queue_head_t wait;
77 struct uio_info *info; 77 struct uio_info *info;
78 spinlock_t info_lock; 78 struct mutex info_lock;
79 struct kobject *map_dir; 79 struct kobject *map_dir;
80 struct kobject *portio_dir; 80 struct kobject *portio_dir;
81}; 81};