diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 03:04:54 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 03:04:54 -0400 |
| commit | 83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f (patch) | |
| tree | 6016c386c321cd6a3e8575e01ed9f10834fc5081 /include | |
| parent | 34bcfdac8c92cc7971254ba5856afd12047c50b2 (diff) | |
| parent | 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe (diff) | |
Merge 4.18-rc5 into char-misc-next
We want the char-misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
47 files changed, 334 insertions, 232 deletions
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index faddde44de8c..3063125197ad 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
| @@ -265,33 +265,41 @@ static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb, | |||
| 265 | * For now w.r.t page table cache, mark the range_size as PAGE_SIZE | 265 | * For now w.r.t page table cache, mark the range_size as PAGE_SIZE |
| 266 | */ | 266 | */ |
| 267 | 267 | ||
| 268 | #ifndef pte_free_tlb | ||
| 268 | #define pte_free_tlb(tlb, ptep, address) \ | 269 | #define pte_free_tlb(tlb, ptep, address) \ |
| 269 | do { \ | 270 | do { \ |
| 270 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ | 271 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ |
| 271 | __pte_free_tlb(tlb, ptep, address); \ | 272 | __pte_free_tlb(tlb, ptep, address); \ |
| 272 | } while (0) | 273 | } while (0) |
| 274 | #endif | ||
| 273 | 275 | ||
| 276 | #ifndef pmd_free_tlb | ||
| 274 | #define pmd_free_tlb(tlb, pmdp, address) \ | 277 | #define pmd_free_tlb(tlb, pmdp, address) \ |
| 275 | do { \ | 278 | do { \ |
| 276 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ | 279 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ |
| 277 | __pmd_free_tlb(tlb, pmdp, address); \ | 280 | __pmd_free_tlb(tlb, pmdp, address); \ |
| 278 | } while (0) | 281 | } while (0) |
| 282 | #endif | ||
| 279 | 283 | ||
| 280 | #ifndef __ARCH_HAS_4LEVEL_HACK | 284 | #ifndef __ARCH_HAS_4LEVEL_HACK |
| 285 | #ifndef pud_free_tlb | ||
| 281 | #define pud_free_tlb(tlb, pudp, address) \ | 286 | #define pud_free_tlb(tlb, pudp, address) \ |
| 282 | do { \ | 287 | do { \ |
| 283 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ | 288 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ |
| 284 | __pud_free_tlb(tlb, pudp, address); \ | 289 | __pud_free_tlb(tlb, pudp, address); \ |
| 285 | } while (0) | 290 | } while (0) |
| 286 | #endif | 291 | #endif |
| 292 | #endif | ||
| 287 | 293 | ||
| 288 | #ifndef __ARCH_HAS_5LEVEL_HACK | 294 | #ifndef __ARCH_HAS_5LEVEL_HACK |
| 295 | #ifndef p4d_free_tlb | ||
| 289 | #define p4d_free_tlb(tlb, pudp, address) \ | 296 | #define p4d_free_tlb(tlb, pudp, address) \ |
| 290 | do { \ | 297 | do { \ |
| 291 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ | 298 | __tlb_adjust_range(tlb, address, PAGE_SIZE); \ |
| 292 | __p4d_free_tlb(tlb, pudp, address); \ | 299 | __p4d_free_tlb(tlb, pudp, address); \ |
| 293 | } while (0) | 300 | } while (0) |
| 294 | #endif | 301 | #endif |
| 302 | #endif | ||
| 295 | 303 | ||
| 296 | #define tlb_migrate_finish(mm) do {} while (0) | 304 | #define tlb_migrate_finish(mm) do {} while (0) |
| 297 | 305 | ||
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h index cc414db9da0a..482461d8931d 100644 --- a/include/crypto/if_alg.h +++ b/include/crypto/if_alg.h | |||
| @@ -245,7 +245,8 @@ ssize_t af_alg_sendpage(struct socket *sock, struct page *page, | |||
| 245 | int offset, size_t size, int flags); | 245 | int offset, size_t size, int flags); |
| 246 | void af_alg_free_resources(struct af_alg_async_req *areq); | 246 | void af_alg_free_resources(struct af_alg_async_req *areq); |
| 247 | void af_alg_async_cb(struct crypto_async_request *_req, int err); | 247 | void af_alg_async_cb(struct crypto_async_request *_req, int err); |
| 248 | __poll_t af_alg_poll_mask(struct socket *sock, __poll_t events); | 248 | __poll_t af_alg_poll(struct file *file, struct socket *sock, |
| 249 | poll_table *wait); | ||
| 249 | struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, | 250 | struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, |
| 250 | unsigned int areqlen); | 251 | unsigned int areqlen); |
| 251 | int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, | 252 | int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, |
diff --git a/include/dt-bindings/clock/imx6ul-clock.h b/include/dt-bindings/clock/imx6ul-clock.h index 9564597cbfac..0aa1d9c3e0b9 100644 --- a/include/dt-bindings/clock/imx6ul-clock.h +++ b/include/dt-bindings/clock/imx6ul-clock.h | |||
| @@ -235,27 +235,25 @@ | |||
| 235 | #define IMX6UL_CLK_CSI_PODF 222 | 235 | #define IMX6UL_CLK_CSI_PODF 222 |
| 236 | #define IMX6UL_CLK_PLL3_120M 223 | 236 | #define IMX6UL_CLK_PLL3_120M 223 |
| 237 | #define IMX6UL_CLK_KPP 224 | 237 | #define IMX6UL_CLK_KPP 224 |
| 238 | #define IMX6UL_CLK_CKO1_SEL 225 | 238 | #define IMX6ULL_CLK_ESAI_PRED 225 |
| 239 | #define IMX6UL_CLK_CKO1_PODF 226 | 239 | #define IMX6ULL_CLK_ESAI_PODF 226 |
| 240 | #define IMX6UL_CLK_CKO1 227 | 240 | #define IMX6ULL_CLK_ESAI_EXTAL 227 |
| 241 | #define IMX6UL_CLK_CKO2_SEL 228 | 241 | #define IMX6ULL_CLK_ESAI_MEM 228 |
| 242 | #define IMX6UL_CLK_CKO2_PODF 229 | 242 | #define IMX6ULL_CLK_ESAI_IPG 229 |
| 243 | #define IMX6UL_CLK_CKO2 230 | 243 | #define IMX6ULL_CLK_DCP_CLK 230 |
| 244 | #define IMX6UL_CLK_CKO 231 | 244 | #define IMX6ULL_CLK_EPDC_PRE_SEL 231 |
| 245 | 245 | #define IMX6ULL_CLK_EPDC_SEL 232 | |
| 246 | /* For i.MX6ULL */ | 246 | #define IMX6ULL_CLK_EPDC_PODF 233 |
| 247 | #define IMX6ULL_CLK_ESAI_PRED 232 | 247 | #define IMX6ULL_CLK_EPDC_ACLK 234 |
| 248 | #define IMX6ULL_CLK_ESAI_PODF 233 | 248 | #define IMX6ULL_CLK_EPDC_PIX 235 |
| 249 | #define IMX6ULL_CLK_ESAI_EXTAL 234 | 249 | #define IMX6ULL_CLK_ESAI_SEL 236 |
| 250 | #define IMX6ULL_CLK_ESAI_MEM 235 | 250 | #define IMX6UL_CLK_CKO1_SEL 237 |
| 251 | #define IMX6ULL_CLK_ESAI_IPG 236 | 251 | #define IMX6UL_CLK_CKO1_PODF 238 |
| 252 | #define IMX6ULL_CLK_DCP_CLK 237 | 252 | #define IMX6UL_CLK_CKO1 239 |
| 253 | #define IMX6ULL_CLK_EPDC_PRE_SEL 238 | 253 | #define IMX6UL_CLK_CKO2_SEL 240 |
| 254 | #define IMX6ULL_CLK_EPDC_SEL 239 | 254 | #define IMX6UL_CLK_CKO2_PODF 241 |
| 255 | #define IMX6ULL_CLK_EPDC_PODF 240 | 255 | #define IMX6UL_CLK_CKO2 242 |
| 256 | #define IMX6ULL_CLK_EPDC_ACLK 241 | 256 | #define IMX6UL_CLK_CKO 243 |
| 257 | #define IMX6ULL_CLK_EPDC_PIX 242 | ||
| 258 | #define IMX6ULL_CLK_ESAI_SEL 243 | ||
| 259 | #define IMX6UL_CLK_END 244 | 257 | #define IMX6UL_CLK_END 244 |
| 260 | 258 | ||
| 261 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ | 259 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ |
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); | |||
| 443 | int acpi_check_region(resource_size_t start, resource_size_t n, | 443 | int acpi_check_region(resource_size_t start, resource_size_t n, |
| 444 | const char *name); | 444 | const char *name); |
| 445 | 445 | ||
| 446 | acpi_status acpi_release_memory(acpi_handle handle, struct resource *res, | ||
| 447 | u32 level); | ||
| 448 | |||
| 446 | int acpi_resources_are_enforced(void); | 449 | int 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 | ||
| 1126 | static inline unsigned int blk_rq_get_max_sectors(struct request *rq, | 1126 | static 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..79795c5fa7c3 100644 --- a/include/linux/bpf-cgroup.h +++ b/include/linux/bpf-cgroup.h | |||
| @@ -188,12 +188,38 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, | |||
| 188 | \ | 188 | \ |
| 189 | __ret; \ | 189 | __ret; \ |
| 190 | }) | 190 | }) |
| 191 | int cgroup_bpf_prog_attach(const union bpf_attr *attr, | ||
| 192 | enum bpf_prog_type ptype, struct bpf_prog *prog); | ||
| 193 | int cgroup_bpf_prog_detach(const union bpf_attr *attr, | ||
| 194 | enum bpf_prog_type ptype); | ||
| 195 | int cgroup_bpf_prog_query(const union bpf_attr *attr, | ||
| 196 | union bpf_attr __user *uattr); | ||
| 191 | #else | 197 | #else |
| 192 | 198 | ||
| 199 | struct bpf_prog; | ||
| 193 | struct cgroup_bpf {}; | 200 | struct cgroup_bpf {}; |
| 194 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} | 201 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} |
| 195 | static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } | 202 | static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } |
| 196 | 203 | ||
| 204 | static inline int cgroup_bpf_prog_attach(const union bpf_attr *attr, | ||
| 205 | enum bpf_prog_type ptype, | ||
| 206 | struct bpf_prog *prog) | ||
| 207 | { | ||
| 208 | return -EINVAL; | ||
| 209 | } | ||
| 210 | |||
| 211 | static inline int cgroup_bpf_prog_detach(const union bpf_attr *attr, | ||
| 212 | enum bpf_prog_type ptype) | ||
| 213 | { | ||
| 214 | return -EINVAL; | ||
| 215 | } | ||
| 216 | |||
| 217 | static inline int cgroup_bpf_prog_query(const union bpf_attr *attr, | ||
| 218 | union bpf_attr __user *uattr) | ||
| 219 | { | ||
| 220 | return -EINVAL; | ||
| 221 | } | ||
| 222 | |||
| 197 | #define cgroup_bpf_enabled (0) | 223 | #define cgroup_bpf_enabled (0) |
| 198 | #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) | 224 | #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) |
| 199 | #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; }) | 225 | #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) | |||
| 696 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); | 696 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); |
| 697 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); | 697 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); |
| 698 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); | 698 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); |
| 699 | int sockmap_get_from_fd(const union bpf_attr *attr, int type, | ||
| 700 | struct bpf_prog *prog); | ||
| 699 | #else | 701 | #else |
| 700 | static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) | 702 | static 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 | |||
| 720 | static 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 |
| 8 | int lirc_prog_attach(const union bpf_attr *attr); | 8 | int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); |
| 9 | int lirc_prog_detach(const union bpf_attr *attr); | 9 | int lirc_prog_detach(const union bpf_attr *attr); |
| 10 | int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); | 10 | int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); |
| 11 | #else | 11 | #else |
| 12 | static inline int lirc_prog_attach(const union bpf_attr *attr) | 12 | static 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 | ||
| 136 | ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, | 136 | ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, |
| 137 | const struct iomap_ops *ops); | 137 | const struct iomap_ops *ops); |
| 138 | int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size, | 138 | vm_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); |
| 140 | vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf, | 140 | vm_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 b615df57b7d5..300baad62c88 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -470,16 +470,16 @@ struct sock_fprog_kern { | |||
| 470 | }; | 470 | }; |
| 471 | 471 | ||
| 472 | struct bpf_binary_header { | 472 | struct bpf_binary_header { |
| 473 | u16 pages; | 473 | u32 pages; |
| 474 | u16 locked:1; | 474 | /* Some arches need word alignment for their instructions */ |
| 475 | u8 image[]; | 475 | u8 image[] __aligned(4); |
| 476 | }; | 476 | }; |
| 477 | 477 | ||
| 478 | struct bpf_prog { | 478 | struct bpf_prog { |
| 479 | u16 pages; /* Number of allocated pages */ | 479 | u16 pages; /* Number of allocated pages */ |
| 480 | u16 jited:1, /* Is our filter JIT'ed? */ | 480 | u16 jited:1, /* Is our filter JIT'ed? */ |
| 481 | jit_requested:1,/* archs need to JIT the prog */ | 481 | jit_requested:1,/* archs need to JIT the prog */ |
| 482 | locked:1, /* Program image locked? */ | 482 | undo_set_mem:1, /* Passed set_memory_ro() checkpoint */ |
| 483 | gpl_compatible:1, /* Is filter GPL compatible? */ | 483 | gpl_compatible:1, /* Is filter GPL compatible? */ |
| 484 | cb_access:1, /* Is control block accessed? */ | 484 | cb_access:1, /* Is control block accessed? */ |
| 485 | dst_needed:1, /* Do we need dst entry? */ | 485 | dst_needed:1, /* Do we need dst entry? */ |
| @@ -675,46 +675,24 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default) | |||
| 675 | 675 | ||
| 676 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) | 676 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) |
| 677 | { | 677 | { |
| 678 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 678 | fp->undo_set_mem = 1; |
| 679 | fp->locked = 1; | 679 | set_memory_ro((unsigned long)fp, fp->pages); |
| 680 | if (set_memory_ro((unsigned long)fp, fp->pages)) | ||
| 681 | fp->locked = 0; | ||
| 682 | #endif | ||
| 683 | } | 680 | } |
| 684 | 681 | ||
| 685 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) | 682 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) |
| 686 | { | 683 | { |
| 687 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 684 | if (fp->undo_set_mem) |
| 688 | if (fp->locked) { | 685 | set_memory_rw((unsigned long)fp, fp->pages); |
| 689 | WARN_ON_ONCE(set_memory_rw((unsigned long)fp, fp->pages)); | ||
| 690 | /* In case set_memory_rw() fails, we want to be the first | ||
| 691 | * to crash here instead of some random place later on. | ||
| 692 | */ | ||
| 693 | fp->locked = 0; | ||
| 694 | } | ||
| 695 | #endif | ||
| 696 | } | 686 | } |
| 697 | 687 | ||
| 698 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) | 688 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) |
| 699 | { | 689 | { |
| 700 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 690 | set_memory_ro((unsigned long)hdr, hdr->pages); |
| 701 | hdr->locked = 1; | ||
| 702 | if (set_memory_ro((unsigned long)hdr, hdr->pages)) | ||
| 703 | hdr->locked = 0; | ||
| 704 | #endif | ||
| 705 | } | 691 | } |
| 706 | 692 | ||
| 707 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) | 693 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) |
| 708 | { | 694 | { |
| 709 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 695 | set_memory_rw((unsigned long)hdr, hdr->pages); |
| 710 | if (hdr->locked) { | ||
| 711 | WARN_ON_ONCE(set_memory_rw((unsigned long)hdr, hdr->pages)); | ||
| 712 | /* In case set_memory_rw() fails, we want to be the first | ||
| 713 | * to crash here instead of some random place later on. | ||
| 714 | */ | ||
| 715 | hdr->locked = 0; | ||
| 716 | } | ||
| 717 | #endif | ||
| 718 | } | 696 | } |
| 719 | 697 | ||
| 720 | static inline struct bpf_binary_header * | 698 | static inline struct bpf_binary_header * |
| @@ -726,22 +704,6 @@ bpf_jit_binary_hdr(const struct bpf_prog *fp) | |||
| 726 | return (void *)addr; | 704 | return (void *)addr; |
| 727 | } | 705 | } |
| 728 | 706 | ||
| 729 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | ||
| 730 | static inline int bpf_prog_check_pages_ro_single(const struct bpf_prog *fp) | ||
| 731 | { | ||
| 732 | if (!fp->locked) | ||
| 733 | return -ENOLCK; | ||
| 734 | if (fp->jited) { | ||
| 735 | const struct bpf_binary_header *hdr = bpf_jit_binary_hdr(fp); | ||
| 736 | |||
| 737 | if (!hdr->locked) | ||
| 738 | return -ENOLCK; | ||
| 739 | } | ||
| 740 | |||
| 741 | return 0; | ||
| 742 | } | ||
| 743 | #endif | ||
| 744 | |||
| 745 | int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap); | 707 | int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap); |
| 746 | static inline int sk_filter(struct sock *sk, struct sk_buff *skb) | 708 | static inline int sk_filter(struct sock *sk, struct sk_buff *skb) |
| 747 | { | 709 | { |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5c91108846db..d78d146a98da 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 *); |
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 | */ |
| 224 | int register_ftrace_function(struct ftrace_ops *ops); | 224 | int register_ftrace_function(struct ftrace_ops *ops); |
| 225 | int unregister_ftrace_function(struct ftrace_ops *ops); | 225 | int unregister_ftrace_function(struct ftrace_ops *ops); |
| 226 | void clear_ftrace_function(void); | ||
| 227 | 226 | ||
| 228 | extern void ftrace_stub(unsigned long a0, unsigned long a1, | 227 | extern 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 | } |
| 242 | static inline void clear_ftrace_function(void) { } | ||
| 243 | static inline void ftrace_kill(void) { } | 241 | static inline void ftrace_kill(void) { } |
| 244 | static inline void ftrace_free_init_mem(void) { } | 242 | static inline void ftrace_free_init_mem(void) { } |
| 245 | static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } | 243 | static 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 | ||
| 515 | struct hid_input { | 516 | struct 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/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); |
| 142 | size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); | 142 | size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); |
| 143 | int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); | 143 | int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); |
| 144 | int iio_dma_buffer_set_length(struct iio_buffer *buffer, int length); | 144 | int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length); |
| 145 | int iio_dma_buffer_request_update(struct iio_buffer *buffer); | 145 | int iio_dma_buffer_request_update(struct iio_buffer *buffer); |
| 146 | 146 | ||
| 147 | int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, | 147 | int 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 | ||
| 103 | void input_mt_report_slot_state(struct input_dev *dev, | 103 | bool 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 | ||
| 106 | void input_mt_report_finger_count(struct input_dev *dev, int count); | 106 | void input_mt_report_finger_count(struct input_dev *dev, int count); |
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); | |||
| 62 | int kthread_park(struct task_struct *k); | 62 | int kthread_park(struct task_struct *k); |
| 63 | void kthread_unpark(struct task_struct *k); | 63 | void kthread_unpark(struct task_struct *k); |
| 64 | void kthread_parkme(void); | 64 | void kthread_parkme(void); |
| 65 | void kthread_park_complete(struct task_struct *k); | ||
| 66 | 65 | ||
| 67 | int kthreadd(void *unused); | 66 | int kthreadd(void *unused); |
| 68 | extern struct task_struct *kthreadd_task; | 67 | extern 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/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 | |||
| 11 | enum { | 13 | enum { |
| 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/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 | } |
| 2792 | static 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 |
| 2793 | static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush) | 2804 | static 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 | } |
| 2808 | static 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 | ||
| 2799 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 2819 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
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); | |||
| 234 | int of_genpd_parse_idle_states(struct device_node *dn, | 234 | int 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); |
| 236 | unsigned int of_genpd_opp_to_performance_state(struct device *dev, | 236 | unsigned int of_genpd_opp_to_performance_state(struct device *dev, |
| 237 | struct device_node *opp_node); | 237 | struct device_node *np); |
| 238 | 238 | ||
| 239 | int genpd_dev_pm_attach(struct device *dev); | 239 | int genpd_dev_pm_attach(struct device *dev); |
| 240 | struct device *genpd_dev_pm_attach_by_id(struct device *dev, | 240 | struct 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 | ||
| 275 | static inline unsigned int | 275 | static inline unsigned int |
| 276 | of_genpd_opp_to_performance_state(struct device *dev, | 276 | of_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 | ||
| 282 | static inline int genpd_dev_pm_attach(struct device *dev) | 282 | static 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 | ||
| 77 | static inline bool file_has_poll_mask(struct file *file) | 77 | static 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 | ||
| 82 | static inline bool file_can_poll(struct file *file) | 82 | static 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 | |||
| 89 | struct poll_table_entry { | 89 | struct 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 | ||
| 11 | struct scatterlist { | 11 | struct 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, | |||
| 129 | static inline struct page *sg_page(struct scatterlist *sg) | 124 | static 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 | **/ |
| 196 | static inline void sg_mark_end(struct scatterlist *sg) | 190 | static 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 | **/ |
| 216 | static inline void sg_unmark_end(struct scatterlist *sg) | 207 | static 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) | |||
| 260 | static inline void sg_init_marker(struct scatterlist *sgl, | 248 | static 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/skbuff.h b/include/linux/skbuff.h index c86885954994..164cdedf6012 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -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); |
| 3253 | struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, | 3253 | struct 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); | ||
| 3256 | int skb_copy_datagram_iter(const struct sk_buff *from, int offset, | 3257 | int 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); |
| 3258 | static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset, | 3259 | static 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 |
| 158 | void sysfs_slab_unlink(struct kmem_cache *); | ||
| 158 | void sysfs_slab_release(struct kmem_cache *); | 159 | void sysfs_slab_release(struct kmem_cache *); |
| 159 | #else | 160 | #else |
| 161 | static inline void sysfs_slab_unlink(struct kmem_cache *s) | ||
| 162 | { | ||
| 163 | } | ||
| 160 | static inline void sysfs_slab_release(struct kmem_cache *s) | 164 | static 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..a368a68cb667 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -231,6 +231,9 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) | |||
| 231 | */ | 231 | */ |
| 232 | #ifndef __SYSCALL_DEFINEx | 232 | #ifndef __SYSCALL_DEFINEx |
| 233 | #define __SYSCALL_DEFINEx(x, name, ...) \ | 233 | #define __SYSCALL_DEFINEx(x, name, ...) \ |
| 234 | __diag_push(); \ | ||
| 235 | __diag_ignore(GCC, 8, "-Wattribute-alias", \ | ||
| 236 | "Type aliasing is used to sanitize syscall arguments");\ | ||
| 234 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ | 237 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ |
| 235 | __attribute__((alias(__stringify(__se_sys##name)))); \ | 238 | __attribute__((alias(__stringify(__se_sys##name)))); \ |
| 236 | ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ | 239 | ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ |
| @@ -243,6 +246,7 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) | |||
| 243 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ | 246 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ |
| 244 | return ret; \ | 247 | return ret; \ |
| 245 | } \ | 248 | } \ |
| 249 | __diag_pop(); \ | ||
| 246 | static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) | 250 | static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
| 247 | #endif /* __SYSCALL_DEFINEx */ | 251 | #endif /* __SYSCALL_DEFINEx */ |
| 248 | 252 | ||
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 | }; |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 53ce8176c313..ec9d6bc65855 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
| @@ -271,7 +271,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, | |||
| 271 | int flags); | 271 | int flags); |
| 272 | int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, | 272 | int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, |
| 273 | size_t len, int flags); | 273 | size_t len, int flags); |
| 274 | __poll_t bt_sock_poll_mask(struct socket *sock, __poll_t events); | 274 | __poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait); |
| 275 | int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | 275 | int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); |
| 276 | int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); | 276 | int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); |
| 277 | int bt_sock_wait_ready(struct sock *sk, unsigned long flags); | 277 | int bt_sock_wait_ready(struct sock *sk, unsigned long flags); |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index b0eaeb02d46d..f4c21b5a1242 100644 --- a/include/net/iucv/af_iucv.h +++ b/include/net/iucv/af_iucv.h | |||
| @@ -153,6 +153,8 @@ struct iucv_sock_list { | |||
| 153 | atomic_t autobind_name; | 153 | atomic_t autobind_name; |
| 154 | }; | 154 | }; |
| 155 | 155 | ||
| 156 | __poll_t iucv_sock_poll(struct file *file, struct socket *sock, | ||
| 157 | poll_table *wait); | ||
| 156 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); | 158 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); |
| 157 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); | 159 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); |
| 158 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); | 160 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 47e35cce3b64..a71264d75d7f 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -128,6 +128,7 @@ struct net { | |||
| 128 | #endif | 128 | #endif |
| 129 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 129 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 130 | struct netns_nf_frag nf_frag; | 130 | struct netns_nf_frag nf_frag; |
| 131 | struct ctl_table_header *nf_frag_frags_hdr; | ||
| 131 | #endif | 132 | #endif |
| 132 | struct sock *nfnl; | 133 | struct sock *nfnl; |
| 133 | struct sock *nfnl_stash; | 134 | struct sock *nfnl_stash; |
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index c978a31b0f84..762ac9931b62 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h | |||
| @@ -109,7 +109,6 @@ struct netns_ipv6 { | |||
| 109 | 109 | ||
| 110 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 110 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 111 | struct netns_nf_frag { | 111 | struct netns_nf_frag { |
| 112 | struct netns_sysctl_ipv6 sysctl; | ||
| 113 | struct netns_frags frags; | 112 | struct netns_frags frags; |
| 114 | }; | 113 | }; |
| 115 | #endif | 114 | #endif |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index a3c1a2c47cd4..20b059574e60 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
| @@ -111,6 +111,11 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q, | |||
| 111 | { | 111 | { |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static inline bool tcf_block_shared(struct tcf_block *block) | ||
| 115 | { | ||
| 116 | return false; | ||
| 117 | } | ||
| 118 | |||
| 114 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) | 119 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) |
| 115 | { | 120 | { |
| 116 | return NULL; | 121 | return NULL; |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 30b3e2fe240a..8c2caa370e0f 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
| @@ -109,7 +109,8 @@ int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb); | |||
| 109 | int sctp_inet_listen(struct socket *sock, int backlog); | 109 | int sctp_inet_listen(struct socket *sock, int backlog); |
| 110 | void sctp_write_space(struct sock *sk); | 110 | void sctp_write_space(struct sock *sk); |
| 111 | void sctp_data_ready(struct sock *sk); | 111 | void sctp_data_ready(struct sock *sk); |
| 112 | __poll_t sctp_poll_mask(struct socket *sock, __poll_t events); | 112 | __poll_t sctp_poll(struct file *file, struct socket *sock, |
| 113 | poll_table *wait); | ||
| 113 | void sctp_sock_rfree(struct sk_buff *skb); | 114 | void sctp_sock_rfree(struct sk_buff *skb); |
| 114 | void sctp_copy_sock(struct sock *newsk, struct sock *sk, | 115 | void sctp_copy_sock(struct sock *newsk, struct sock *sk, |
| 115 | struct sctp_association *asoc); | 116 | struct sctp_association *asoc); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 0448e7c5d2b4..800582b5dd54 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -388,7 +388,8 @@ bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst); | |||
| 388 | void tcp_close(struct sock *sk, long timeout); | 388 | void tcp_close(struct sock *sk, long timeout); |
| 389 | void tcp_init_sock(struct sock *sk); | 389 | void tcp_init_sock(struct sock *sk); |
| 390 | void tcp_init_transfer(struct sock *sk, int bpf_op); | 390 | void tcp_init_transfer(struct sock *sk, int bpf_op); |
| 391 | __poll_t tcp_poll_mask(struct socket *sock, __poll_t events); | 391 | __poll_t tcp_poll(struct file *file, struct socket *sock, |
| 392 | struct poll_table_struct *wait); | ||
| 392 | int tcp_getsockopt(struct sock *sk, int level, int optname, | 393 | int tcp_getsockopt(struct sock *sk, int level, int optname, |
| 393 | char __user *optval, int __user *optlen); | 394 | char __user *optval, int __user *optlen); |
| 394 | int tcp_setsockopt(struct sock *sk, int level, int optname, | 395 | int tcp_setsockopt(struct sock *sk, int level, int optname, |
diff --git a/include/net/tls.h b/include/net/tls.h index 7f84ea3e217c..70c273777fe9 100644 --- a/include/net/tls.h +++ b/include/net/tls.h | |||
| @@ -109,7 +109,8 @@ struct tls_sw_context_rx { | |||
| 109 | 109 | ||
| 110 | struct strparser strp; | 110 | struct strparser strp; |
| 111 | void (*saved_data_ready)(struct sock *sk); | 111 | void (*saved_data_ready)(struct sock *sk); |
| 112 | __poll_t (*sk_poll_mask)(struct socket *sock, __poll_t events); | 112 | unsigned int (*sk_poll)(struct file *file, struct socket *sock, |
| 113 | struct poll_table_struct *wait); | ||
| 113 | struct sk_buff *recv_pkt; | 114 | struct sk_buff *recv_pkt; |
| 114 | u8 control; | 115 | u8 control; |
| 115 | bool decrypted; | 116 | bool decrypted; |
| @@ -224,7 +225,8 @@ void tls_sw_free_resources_tx(struct sock *sk); | |||
| 224 | void tls_sw_free_resources_rx(struct sock *sk); | 225 | void tls_sw_free_resources_rx(struct sock *sk); |
| 225 | int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, | 226 | int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, |
| 226 | int nonblock, int flags, int *addr_len); | 227 | int nonblock, int flags, int *addr_len); |
| 227 | __poll_t tls_sw_poll_mask(struct socket *sock, __poll_t events); | 228 | unsigned int tls_sw_poll(struct file *file, struct socket *sock, |
| 229 | struct poll_table_struct *wait); | ||
| 228 | ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, | 230 | ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, |
| 229 | struct pipe_inode_info *pipe, | 231 | struct pipe_inode_info *pipe, |
| 230 | size_t len, unsigned int flags); | 232 | size_t len, unsigned int flags); |
diff --git a/include/net/udp.h b/include/net/udp.h index b1ea8b0f5e6a..81afdacd4fff 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
| @@ -285,7 +285,7 @@ int udp_init_sock(struct sock *sk); | |||
| 285 | int udp_pre_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); | 285 | int udp_pre_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
| 286 | int __udp_disconnect(struct sock *sk, int flags); | 286 | int __udp_disconnect(struct sock *sk, int flags); |
| 287 | int udp_disconnect(struct sock *sk, int flags); | 287 | int udp_disconnect(struct sock *sk, int flags); |
| 288 | __poll_t udp_poll_mask(struct socket *sock, __poll_t events); | 288 | __poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait); |
| 289 | struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, | 289 | struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, |
| 290 | netdev_features_t features, | 290 | netdev_features_t features, |
| 291 | bool is_ipv6); | 291 | bool is_ipv6); |
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h index d00221345c19..3c5038b587ba 100644 --- a/include/uapi/linux/aio_abi.h +++ b/include/uapi/linux/aio_abi.h | |||
| @@ -39,8 +39,10 @@ enum { | |||
| 39 | IOCB_CMD_PWRITE = 1, | 39 | IOCB_CMD_PWRITE = 1, |
| 40 | IOCB_CMD_FSYNC = 2, | 40 | IOCB_CMD_FSYNC = 2, |
| 41 | IOCB_CMD_FDSYNC = 3, | 41 | IOCB_CMD_FDSYNC = 3, |
| 42 | /* 4 was the experimental IOCB_CMD_PREADX */ | 42 | /* These two are experimental. |
| 43 | IOCB_CMD_POLL = 5, | 43 | * IOCB_CMD_PREADX = 4, |
| 44 | * IOCB_CMD_POLL = 5, | ||
| 45 | */ | ||
| 44 | IOCB_CMD_NOOP = 6, | 46 | IOCB_CMD_NOOP = 6, |
| 45 | IOCB_CMD_PREADV = 7, | 47 | IOCB_CMD_PREADV = 7, |
| 46 | IOCB_CMD_PWRITEV = 8, | 48 | IOCB_CMD_PWRITEV = 8, |
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 59b19b6a40d7..b7db3261c62d 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
| @@ -1857,7 +1857,8 @@ union bpf_attr { | |||
| 1857 | * is resolved), the nexthop address is returned in ipv4_dst | 1857 | * is resolved), the nexthop address is returned in ipv4_dst |
| 1858 | * or ipv6_dst based on family, smac is set to mac address of | 1858 | * or ipv6_dst based on family, smac is set to mac address of |
| 1859 | * egress device, dmac is set to nexthop mac address, rt_metric | 1859 | * egress device, dmac is set to nexthop mac address, rt_metric |
| 1860 | * is set to metric from route (IPv4/IPv6 only). | 1860 | * is set to metric from route (IPv4/IPv6 only), and ifindex |
| 1861 | * is set to the device index of the nexthop from the FIB lookup. | ||
| 1861 | * | 1862 | * |
| 1862 | * *plen* argument is the size of the passed in struct. | 1863 | * *plen* argument is the size of the passed in struct. |
| 1863 | * *flags* argument can be a combination of one or more of the | 1864 | * *flags* argument can be a combination of one or more of the |
| @@ -1873,9 +1874,10 @@ union bpf_attr { | |||
| 1873 | * *ctx* is either **struct xdp_md** for XDP programs or | 1874 | * *ctx* is either **struct xdp_md** for XDP programs or |
| 1874 | * **struct sk_buff** tc cls_act programs. | 1875 | * **struct sk_buff** tc cls_act programs. |
| 1875 | * Return | 1876 | * Return |
| 1876 | * Egress device index on success, 0 if packet needs to continue | 1877 | * * < 0 if any input argument is invalid |
| 1877 | * up the stack for further processing or a negative error in case | 1878 | * * 0 on success (packet is forwarded, nexthop neighbor exists) |
| 1878 | * of failure. | 1879 | * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the |
| 1880 | * * packet is not forwarded or needs assist from full stack | ||
| 1879 | * | 1881 | * |
| 1880 | * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) | 1882 | * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) |
| 1881 | * Description | 1883 | * Description |
| @@ -2612,6 +2614,18 @@ struct bpf_raw_tracepoint_args { | |||
| 2612 | #define BPF_FIB_LOOKUP_DIRECT BIT(0) | 2614 | #define BPF_FIB_LOOKUP_DIRECT BIT(0) |
| 2613 | #define BPF_FIB_LOOKUP_OUTPUT BIT(1) | 2615 | #define BPF_FIB_LOOKUP_OUTPUT BIT(1) |
| 2614 | 2616 | ||
| 2617 | enum { | ||
| 2618 | BPF_FIB_LKUP_RET_SUCCESS, /* lookup successful */ | ||
| 2619 | BPF_FIB_LKUP_RET_BLACKHOLE, /* dest is blackholed; can be dropped */ | ||
| 2620 | BPF_FIB_LKUP_RET_UNREACHABLE, /* dest is unreachable; can be dropped */ | ||
| 2621 | BPF_FIB_LKUP_RET_PROHIBIT, /* dest not allowed; can be dropped */ | ||
| 2622 | BPF_FIB_LKUP_RET_NOT_FWDED, /* packet is not forwarded */ | ||
| 2623 | BPF_FIB_LKUP_RET_FWD_DISABLED, /* fwding is not enabled on ingress */ | ||
| 2624 | BPF_FIB_LKUP_RET_UNSUPP_LWT, /* fwd requires encapsulation */ | ||
| 2625 | BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */ | ||
| 2626 | BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */ | ||
| 2627 | }; | ||
| 2628 | |||
| 2615 | struct bpf_fib_lookup { | 2629 | struct bpf_fib_lookup { |
| 2616 | /* input: network family for lookup (AF_INET, AF_INET6) | 2630 | /* input: network family for lookup (AF_INET, AF_INET6) |
| 2617 | * output: network family of egress nexthop | 2631 | * output: network family of egress nexthop |
| @@ -2625,7 +2639,11 @@ struct bpf_fib_lookup { | |||
| 2625 | 2639 | ||
| 2626 | /* total length of packet from network header - used for MTU check */ | 2640 | /* total length of packet from network header - used for MTU check */ |
| 2627 | __u16 tot_len; | 2641 | __u16 tot_len; |
| 2628 | __u32 ifindex; /* L3 device index for lookup */ | 2642 | |
| 2643 | /* input: L3 device index for lookup | ||
| 2644 | * output: device index from FIB lookup | ||
| 2645 | */ | ||
| 2646 | __u32 ifindex; | ||
| 2629 | 2647 | ||
| 2630 | union { | 2648 | union { |
| 2631 | /* inputs to lookup */ | 2649 | /* inputs to lookup */ |
diff --git a/include/uapi/linux/rseq.h b/include/uapi/linux/rseq.h index d620fa43756c..9a402fdb60e9 100644 --- a/include/uapi/linux/rseq.h +++ b/include/uapi/linux/rseq.h | |||
| @@ -10,13 +10,8 @@ | |||
| 10 | * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 10 | * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #ifdef __KERNEL__ | 13 | #include <linux/types.h> |
| 14 | # include <linux/types.h> | 14 | #include <asm/byteorder.h> |
| 15 | #else | ||
| 16 | # include <stdint.h> | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #include <linux/types_32_64.h> | ||
| 20 | 15 | ||
| 21 | enum rseq_cpu_id_state { | 16 | enum rseq_cpu_id_state { |
| 22 | RSEQ_CPU_ID_UNINITIALIZED = -1, | 17 | RSEQ_CPU_ID_UNINITIALIZED = -1, |
| @@ -52,10 +47,10 @@ struct rseq_cs { | |||
| 52 | __u32 version; | 47 | __u32 version; |
| 53 | /* enum rseq_cs_flags */ | 48 | /* enum rseq_cs_flags */ |
| 54 | __u32 flags; | 49 | __u32 flags; |
| 55 | LINUX_FIELD_u32_u64(start_ip); | 50 | __u64 start_ip; |
| 56 | /* Offset from start_ip. */ | 51 | /* Offset from start_ip. */ |
| 57 | LINUX_FIELD_u32_u64(post_commit_offset); | 52 | __u64 post_commit_offset; |
| 58 | LINUX_FIELD_u32_u64(abort_ip); | 53 | __u64 abort_ip; |
| 59 | } __attribute__((aligned(4 * sizeof(__u64)))); | 54 | } __attribute__((aligned(4 * sizeof(__u64)))); |
| 60 | 55 | ||
| 61 | /* | 56 | /* |
| @@ -67,28 +62,30 @@ struct rseq_cs { | |||
| 67 | struct rseq { | 62 | struct rseq { |
| 68 | /* | 63 | /* |
| 69 | * Restartable sequences cpu_id_start field. Updated by the | 64 | * Restartable sequences cpu_id_start field. Updated by the |
| 70 | * kernel, and read by user-space with single-copy atomicity | 65 | * kernel. Read by user-space with single-copy atomicity |
| 71 | * semantics. Aligned on 32-bit. Always contains a value in the | 66 | * semantics. This field should only be read by the thread which |
| 72 | * range of possible CPUs, although the value may not be the | 67 | * registered this data structure. Aligned on 32-bit. Always |
| 73 | * actual current CPU (e.g. if rseq is not initialized). This | 68 | * contains a value in the range of possible CPUs, although the |
| 74 | * CPU number value should always be compared against the value | 69 | * value may not be the actual current CPU (e.g. if rseq is not |
| 75 | * of the cpu_id field before performing a rseq commit or | 70 | * initialized). This CPU number value should always be compared |
| 76 | * returning a value read from a data structure indexed using | 71 | * against the value of the cpu_id field before performing a rseq |
| 77 | * the cpu_id_start value. | 72 | * commit or returning a value read from a data structure indexed |
| 73 | * using the cpu_id_start value. | ||
| 78 | */ | 74 | */ |
| 79 | __u32 cpu_id_start; | 75 | __u32 cpu_id_start; |
| 80 | /* | 76 | /* |
| 81 | * Restartable sequences cpu_id field. Updated by the kernel, | 77 | * Restartable sequences cpu_id field. Updated by the kernel. |
| 82 | * and read by user-space with single-copy atomicity semantics. | 78 | * Read by user-space with single-copy atomicity semantics. This |
| 83 | * Aligned on 32-bit. Values RSEQ_CPU_ID_UNINITIALIZED and | 79 | * field should only be read by the thread which registered this |
| 84 | * RSEQ_CPU_ID_REGISTRATION_FAILED have a special semantic: the | 80 | * data structure. Aligned on 32-bit. Values |
| 85 | * former means "rseq uninitialized", and latter means "rseq | 81 | * RSEQ_CPU_ID_UNINITIALIZED and RSEQ_CPU_ID_REGISTRATION_FAILED |
| 86 | * initialization failed". This value is meant to be read within | 82 | * have a special semantic: the former means "rseq uninitialized", |
| 87 | * rseq critical sections and compared with the cpu_id_start | 83 | * and latter means "rseq initialization failed". This value is |
| 88 | * value previously read, before performing the commit instruction, | 84 | * meant to be read within rseq critical sections and compared |
| 89 | * or read and compared with the cpu_id_start value before returning | 85 | * with the cpu_id_start value previously read, before performing |
| 90 | * a value loaded from a data structure indexed using the | 86 | * the commit instruction, or read and compared with the |
| 91 | * cpu_id_start value. | 87 | * cpu_id_start value before returning a value loaded from a data |
| 88 | * structure indexed using the cpu_id_start value. | ||
| 92 | */ | 89 | */ |
| 93 | __u32 cpu_id; | 90 | __u32 cpu_id; |
| 94 | /* | 91 | /* |
| @@ -105,27 +102,44 @@ struct rseq { | |||
| 105 | * targeted by the rseq_cs. Also needs to be set to NULL by user-space | 102 | * targeted by the rseq_cs. Also needs to be set to NULL by user-space |
| 106 | * before reclaiming memory that contains the targeted struct rseq_cs. | 103 | * before reclaiming memory that contains the targeted struct rseq_cs. |
| 107 | * | 104 | * |
| 108 | * Read and set by the kernel with single-copy atomicity semantics. | 105 | * Read and set by the kernel. Set by user-space with single-copy |
| 109 | * Set by user-space with single-copy atomicity semantics. Aligned | 106 | * atomicity semantics. This field should only be updated by the |
| 110 | * on 64-bit. | 107 | * thread which registered this data structure. Aligned on 64-bit. |
| 111 | */ | 108 | */ |
| 112 | LINUX_FIELD_u32_u64(rseq_cs); | 109 | union { |
| 110 | __u64 ptr64; | ||
| 111 | #ifdef __LP64__ | ||
| 112 | __u64 ptr; | ||
| 113 | #else | ||
| 114 | struct { | ||
| 115 | #if (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || defined(__BIG_ENDIAN) | ||
| 116 | __u32 padding; /* Initialized to zero. */ | ||
| 117 | __u32 ptr32; | ||
| 118 | #else /* LITTLE */ | ||
| 119 | __u32 ptr32; | ||
| 120 | __u32 padding; /* Initialized to zero. */ | ||
| 121 | #endif /* ENDIAN */ | ||
| 122 | } ptr; | ||
| 123 | #endif | ||
| 124 | } rseq_cs; | ||
| 125 | |||
| 113 | /* | 126 | /* |
| 114 | * - RSEQ_DISABLE flag: | 127 | * Restartable sequences flags field. |
| 128 | * | ||
| 129 | * This field should only be updated by the thread which | ||
| 130 | * registered this data structure. Read by the kernel. | ||
| 131 | * Mainly used for single-stepping through rseq critical sections | ||
| 132 | * with debuggers. | ||
| 115 | * | 133 | * |
| 116 | * Fallback fast-track flag for single-stepping. | ||
| 117 | * Set by user-space if lack of progress is detected. | ||
| 118 | * Cleared by user-space after rseq finish. | ||
| 119 | * Read by the kernel. | ||
| 120 | * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT | 134 | * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT |
| 121 | * Inhibit instruction sequence block restart and event | 135 | * Inhibit instruction sequence block restart on preemption |
| 122 | * counter increment on preemption for this thread. | 136 | * for this thread. |
| 123 | * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL | 137 | * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL |
| 124 | * Inhibit instruction sequence block restart and event | 138 | * Inhibit instruction sequence block restart on signal |
| 125 | * counter increment on signal delivery for this thread. | 139 | * delivery for this thread. |
| 126 | * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE | 140 | * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE |
| 127 | * Inhibit instruction sequence block restart and event | 141 | * Inhibit instruction sequence block restart on migration for |
| 128 | * counter increment on migration for this thread. | 142 | * this thread. |
| 129 | */ | 143 | */ |
| 130 | __u32 flags; | 144 | __u32 flags; |
| 131 | } __attribute__((aligned(4 * sizeof(__u64)))); | 145 | } __attribute__((aligned(4 * sizeof(__u64)))); |
diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h index 6e299349b158..b7b57967d90f 100644 --- a/include/uapi/linux/target_core_user.h +++ b/include/uapi/linux/target_core_user.h | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | #define TCMU_MAILBOX_VERSION 2 | 44 | #define TCMU_MAILBOX_VERSION 2 |
| 45 | #define ALIGN_SIZE 64 /* Should be enough for most CPUs */ | 45 | #define ALIGN_SIZE 64 /* Should be enough for most CPUs */ |
| 46 | #define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */ | 46 | #define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */ |
| 47 | #define TCMU_MAILBOX_FLAG_CAP_READ_LEN (1 << 1) /* Read data length */ | ||
| 47 | 48 | ||
| 48 | struct tcmu_mailbox { | 49 | struct tcmu_mailbox { |
| 49 | __u16 version; | 50 | __u16 version; |
| @@ -71,6 +72,7 @@ struct tcmu_cmd_entry_hdr { | |||
| 71 | __u16 cmd_id; | 72 | __u16 cmd_id; |
| 72 | __u8 kflags; | 73 | __u8 kflags; |
| 73 | #define TCMU_UFLAG_UNKNOWN_OP 0x1 | 74 | #define TCMU_UFLAG_UNKNOWN_OP 0x1 |
| 75 | #define TCMU_UFLAG_READ_LEN 0x2 | ||
| 74 | __u8 uflags; | 76 | __u8 uflags; |
| 75 | 77 | ||
| 76 | } __packed; | 78 | } __packed; |
| @@ -119,7 +121,7 @@ struct tcmu_cmd_entry { | |||
| 119 | __u8 scsi_status; | 121 | __u8 scsi_status; |
| 120 | __u8 __pad1; | 122 | __u8 __pad1; |
| 121 | __u16 __pad2; | 123 | __u16 __pad2; |
| 122 | __u32 __pad3; | 124 | __u32 read_len; |
| 123 | char sense_buffer[TCMU_SENSE_BUFFERSIZE]; | 125 | char sense_buffer[TCMU_SENSE_BUFFERSIZE]; |
| 124 | } rsp; | 126 | } rsp; |
| 125 | }; | 127 | }; |
diff --git a/include/uapi/linux/types_32_64.h b/include/uapi/linux/types_32_64.h deleted file mode 100644 index 0a87ace34a57..000000000000 --- a/include/uapi/linux/types_32_64.h +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef _UAPI_LINUX_TYPES_32_64_H | ||
| 3 | #define _UAPI_LINUX_TYPES_32_64_H | ||
| 4 | |||
| 5 | /* | ||
| 6 | * linux/types_32_64.h | ||
| 7 | * | ||
| 8 | * Integer type declaration for pointers across 32-bit and 64-bit systems. | ||
| 9 | * | ||
| 10 | * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifdef __KERNEL__ | ||
| 14 | # include <linux/types.h> | ||
| 15 | #else | ||
| 16 | # include <stdint.h> | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #include <asm/byteorder.h> | ||
| 20 | |||
| 21 | #ifdef __BYTE_ORDER | ||
| 22 | # if (__BYTE_ORDER == __BIG_ENDIAN) | ||
| 23 | # define LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 24 | # else | ||
| 25 | # define LINUX_BYTE_ORDER_LITTLE_ENDIAN | ||
| 26 | # endif | ||
| 27 | #else | ||
| 28 | # ifdef __BIG_ENDIAN | ||
| 29 | # define LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 30 | # else | ||
| 31 | # define LINUX_BYTE_ORDER_LITTLE_ENDIAN | ||
| 32 | # endif | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifdef __LP64__ | ||
| 36 | # define LINUX_FIELD_u32_u64(field) __u64 field | ||
| 37 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) field = (intptr_t)v | ||
| 38 | #else | ||
| 39 | # ifdef LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 40 | # define LINUX_FIELD_u32_u64(field) __u32 field ## _padding, field | ||
| 41 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \ | ||
| 42 | field ## _padding = 0, field = (intptr_t)v | ||
| 43 | # else | ||
| 44 | # define LINUX_FIELD_u32_u64(field) __u32 field, field ## _padding | ||
| 45 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \ | ||
| 46 | field = (intptr_t)v, field ## _padding = 0 | ||
| 47 | # endif | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #endif /* _UAPI_LINUX_TYPES_32_64_H */ | ||
