diff options
Diffstat (limited to 'include')
55 files changed, 362 insertions, 148 deletions
diff --git a/include/asm-generic/mm_hooks.h b/include/asm-generic/mm_hooks.h index ea189d88a3cc..8ac4e68a12f0 100644 --- a/include/asm-generic/mm_hooks.h +++ b/include/asm-generic/mm_hooks.h | |||
| @@ -7,9 +7,10 @@ | |||
| 7 | #ifndef _ASM_GENERIC_MM_HOOKS_H | 7 | #ifndef _ASM_GENERIC_MM_HOOKS_H |
| 8 | #define _ASM_GENERIC_MM_HOOKS_H | 8 | #define _ASM_GENERIC_MM_HOOKS_H |
| 9 | 9 | ||
| 10 | static inline void arch_dup_mmap(struct mm_struct *oldmm, | 10 | static inline int arch_dup_mmap(struct mm_struct *oldmm, |
| 11 | struct mm_struct *mm) | 11 | struct mm_struct *mm) |
| 12 | { | 12 | { |
| 13 | return 0; | ||
| 13 | } | 14 | } |
| 14 | 15 | ||
| 15 | static inline void arch_exit_mmap(struct mm_struct *mm) | 16 | static inline void arch_exit_mmap(struct mm_struct *mm) |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index b234d54f2cb6..868e68561f91 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
| @@ -1025,6 +1025,11 @@ static inline int pmd_clear_huge(pmd_t *pmd) | |||
| 1025 | struct file; | 1025 | struct file; |
| 1026 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | 1026 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, |
| 1027 | unsigned long size, pgprot_t *vma_prot); | 1027 | unsigned long size, pgprot_t *vma_prot); |
| 1028 | |||
| 1029 | #ifndef CONFIG_X86_ESPFIX64 | ||
| 1030 | static inline void init_espfix_bsp(void) { } | ||
| 1031 | #endif | ||
| 1032 | |||
| 1028 | #endif /* !__ASSEMBLY__ */ | 1033 | #endif /* !__ASSEMBLY__ */ |
| 1029 | 1034 | ||
| 1030 | #ifndef io_remap_pfn_range | 1035 | #ifndef io_remap_pfn_range |
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h index 38d9c5861ed8..f38227a78eae 100644 --- a/include/crypto/if_alg.h +++ b/include/crypto/if_alg.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/if_alg.h> | 18 | #include <linux/if_alg.h> |
| 19 | #include <linux/scatterlist.h> | 19 | #include <linux/scatterlist.h> |
| 20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
| 21 | #include <linux/atomic.h> | ||
| 21 | #include <net/sock.h> | 22 | #include <net/sock.h> |
| 22 | 23 | ||
| 23 | #include <crypto/aead.h> | 24 | #include <crypto/aead.h> |
| @@ -150,7 +151,7 @@ struct af_alg_ctx { | |||
| 150 | struct crypto_wait wait; | 151 | struct crypto_wait wait; |
| 151 | 152 | ||
| 152 | size_t used; | 153 | size_t used; |
| 153 | size_t rcvused; | 154 | atomic_t rcvused; |
| 154 | 155 | ||
| 155 | bool more; | 156 | bool more; |
| 156 | bool merge; | 157 | bool merge; |
| @@ -215,7 +216,7 @@ static inline int af_alg_rcvbuf(struct sock *sk) | |||
| 215 | struct af_alg_ctx *ctx = ask->private; | 216 | struct af_alg_ctx *ctx = ask->private; |
| 216 | 217 | ||
| 217 | return max_t(int, max_t(int, sk->sk_rcvbuf & PAGE_MASK, PAGE_SIZE) - | 218 | return max_t(int, max_t(int, sk->sk_rcvbuf & PAGE_MASK, PAGE_SIZE) - |
| 218 | ctx->rcvused, 0); | 219 | atomic_read(&ctx->rcvused), 0); |
| 219 | } | 220 | } |
| 220 | 221 | ||
| 221 | /** | 222 | /** |
diff --git a/include/crypto/mcryptd.h b/include/crypto/mcryptd.h index cceafa01f907..b67404fc4b34 100644 --- a/include/crypto/mcryptd.h +++ b/include/crypto/mcryptd.h | |||
| @@ -27,6 +27,7 @@ static inline struct mcryptd_ahash *__mcryptd_ahash_cast( | |||
| 27 | 27 | ||
| 28 | struct mcryptd_cpu_queue { | 28 | struct mcryptd_cpu_queue { |
| 29 | struct crypto_queue queue; | 29 | struct crypto_queue queue; |
| 30 | spinlock_t q_lock; | ||
| 30 | struct work_struct work; | 31 | struct work_struct work; |
| 31 | }; | 32 | }; |
| 32 | 33 | ||
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h index 6e45608b2399..9da6ce22803f 100644 --- a/include/kvm/arm_arch_timer.h +++ b/include/kvm/arm_arch_timer.h | |||
| @@ -62,7 +62,7 @@ struct arch_timer_cpu { | |||
| 62 | bool enabled; | 62 | bool enabled; |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | int kvm_timer_hyp_init(void); | 65 | int kvm_timer_hyp_init(bool); |
| 66 | int kvm_timer_enable(struct kvm_vcpu *vcpu); | 66 | int kvm_timer_enable(struct kvm_vcpu *vcpu); |
| 67 | int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu); | 67 | int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu); |
| 68 | void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu); | 68 | void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu); |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 82f0c8fd7be8..23d29b39f71e 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -492,6 +492,8 @@ extern unsigned int bvec_nr_vecs(unsigned short idx); | |||
| 492 | 492 | ||
| 493 | #define bio_set_dev(bio, bdev) \ | 493 | #define bio_set_dev(bio, bdev) \ |
| 494 | do { \ | 494 | do { \ |
| 495 | if ((bio)->bi_disk != (bdev)->bd_disk) \ | ||
| 496 | bio_clear_flag(bio, BIO_THROTTLED);\ | ||
| 495 | (bio)->bi_disk = (bdev)->bd_disk; \ | 497 | (bio)->bi_disk = (bdev)->bd_disk; \ |
| 496 | (bio)->bi_partno = (bdev)->bd_partno; \ | 498 | (bio)->bi_partno = (bdev)->bd_partno; \ |
| 497 | } while (0) | 499 | } while (0) |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index a1e628e032da..9e7d8bd776d2 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
| @@ -50,8 +50,6 @@ struct blk_issue_stat { | |||
| 50 | struct bio { | 50 | struct bio { |
| 51 | struct bio *bi_next; /* request queue link */ | 51 | struct bio *bi_next; /* request queue link */ |
| 52 | struct gendisk *bi_disk; | 52 | struct gendisk *bi_disk; |
| 53 | u8 bi_partno; | ||
| 54 | blk_status_t bi_status; | ||
| 55 | unsigned int bi_opf; /* bottom bits req flags, | 53 | unsigned int bi_opf; /* bottom bits req flags, |
| 56 | * top bits REQ_OP. Use | 54 | * top bits REQ_OP. Use |
| 57 | * accessors. | 55 | * accessors. |
| @@ -59,8 +57,8 @@ struct bio { | |||
| 59 | unsigned short bi_flags; /* status, etc and bvec pool number */ | 57 | unsigned short bi_flags; /* status, etc and bvec pool number */ |
| 60 | unsigned short bi_ioprio; | 58 | unsigned short bi_ioprio; |
| 61 | unsigned short bi_write_hint; | 59 | unsigned short bi_write_hint; |
| 62 | 60 | blk_status_t bi_status; | |
| 63 | struct bvec_iter bi_iter; | 61 | u8 bi_partno; |
| 64 | 62 | ||
| 65 | /* Number of segments in this BIO after | 63 | /* Number of segments in this BIO after |
| 66 | * physical address coalescing is performed. | 64 | * physical address coalescing is performed. |
| @@ -74,8 +72,9 @@ struct bio { | |||
| 74 | unsigned int bi_seg_front_size; | 72 | unsigned int bi_seg_front_size; |
| 75 | unsigned int bi_seg_back_size; | 73 | unsigned int bi_seg_back_size; |
| 76 | 74 | ||
| 77 | atomic_t __bi_remaining; | 75 | struct bvec_iter bi_iter; |
| 78 | 76 | ||
| 77 | atomic_t __bi_remaining; | ||
| 79 | bio_end_io_t *bi_end_io; | 78 | bio_end_io_t *bi_end_io; |
| 80 | 79 | ||
| 81 | void *bi_private; | 80 | void *bi_private; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8089ca17db9a..0ce8a372d506 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -135,7 +135,7 @@ typedef __u32 __bitwise req_flags_t; | |||
| 135 | struct request { | 135 | struct request { |
| 136 | struct list_head queuelist; | 136 | struct list_head queuelist; |
| 137 | union { | 137 | union { |
| 138 | call_single_data_t csd; | 138 | struct __call_single_data csd; |
| 139 | u64 fifo_time; | 139 | u64 fifo_time; |
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| @@ -241,14 +241,24 @@ struct request { | |||
| 241 | struct request *next_rq; | 241 | struct request *next_rq; |
| 242 | }; | 242 | }; |
| 243 | 243 | ||
| 244 | static inline bool blk_op_is_scsi(unsigned int op) | ||
| 245 | { | ||
| 246 | return op == REQ_OP_SCSI_IN || op == REQ_OP_SCSI_OUT; | ||
| 247 | } | ||
| 248 | |||
| 249 | static inline bool blk_op_is_private(unsigned int op) | ||
| 250 | { | ||
| 251 | return op == REQ_OP_DRV_IN || op == REQ_OP_DRV_OUT; | ||
| 252 | } | ||
| 253 | |||
| 244 | static inline bool blk_rq_is_scsi(struct request *rq) | 254 | static inline bool blk_rq_is_scsi(struct request *rq) |
| 245 | { | 255 | { |
| 246 | return req_op(rq) == REQ_OP_SCSI_IN || req_op(rq) == REQ_OP_SCSI_OUT; | 256 | return blk_op_is_scsi(req_op(rq)); |
| 247 | } | 257 | } |
| 248 | 258 | ||
| 249 | static inline bool blk_rq_is_private(struct request *rq) | 259 | static inline bool blk_rq_is_private(struct request *rq) |
| 250 | { | 260 | { |
| 251 | return req_op(rq) == REQ_OP_DRV_IN || req_op(rq) == REQ_OP_DRV_OUT; | 261 | return blk_op_is_private(req_op(rq)); |
| 252 | } | 262 | } |
| 253 | 263 | ||
| 254 | static inline bool blk_rq_is_passthrough(struct request *rq) | 264 | static inline bool blk_rq_is_passthrough(struct request *rq) |
| @@ -256,6 +266,13 @@ static inline bool blk_rq_is_passthrough(struct request *rq) | |||
| 256 | return blk_rq_is_scsi(rq) || blk_rq_is_private(rq); | 266 | return blk_rq_is_scsi(rq) || blk_rq_is_private(rq); |
| 257 | } | 267 | } |
| 258 | 268 | ||
| 269 | static inline bool bio_is_passthrough(struct bio *bio) | ||
| 270 | { | ||
| 271 | unsigned op = bio_op(bio); | ||
| 272 | |||
| 273 | return blk_op_is_scsi(op) || blk_op_is_private(op); | ||
| 274 | } | ||
| 275 | |||
| 259 | static inline unsigned short req_get_ioprio(struct request *req) | 276 | static inline unsigned short req_get_ioprio(struct request *req) |
| 260 | { | 277 | { |
| 261 | return req->ioprio; | 278 | return req->ioprio; |
| @@ -948,7 +965,7 @@ extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, | |||
| 948 | extern void blk_rq_unprep_clone(struct request *rq); | 965 | extern void blk_rq_unprep_clone(struct request *rq); |
| 949 | extern blk_status_t blk_insert_cloned_request(struct request_queue *q, | 966 | extern blk_status_t blk_insert_cloned_request(struct request_queue *q, |
| 950 | struct request *rq); | 967 | struct request *rq); |
| 951 | extern int blk_rq_append_bio(struct request *rq, struct bio *bio); | 968 | extern int blk_rq_append_bio(struct request *rq, struct bio **bio); |
| 952 | extern void blk_delay_queue(struct request_queue *, unsigned long); | 969 | extern void blk_delay_queue(struct request_queue *, unsigned long); |
| 953 | extern void blk_queue_split(struct request_queue *, struct bio **); | 970 | extern void blk_queue_split(struct request_queue *, struct bio **); |
| 954 | extern void blk_recount_segments(struct request_queue *, struct bio *); | 971 | extern void blk_recount_segments(struct request_queue *, struct bio *); |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index e55e4255a210..0b25cf87b6d6 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -43,7 +43,14 @@ struct bpf_map_ops { | |||
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | struct bpf_map { | 45 | struct bpf_map { |
| 46 | atomic_t refcnt; | 46 | /* 1st cacheline with read-mostly members of which some |
| 47 | * are also accessed in fast-path (e.g. ops, max_entries). | ||
| 48 | */ | ||
| 49 | const struct bpf_map_ops *ops ____cacheline_aligned; | ||
| 50 | struct bpf_map *inner_map_meta; | ||
| 51 | #ifdef CONFIG_SECURITY | ||
| 52 | void *security; | ||
| 53 | #endif | ||
| 47 | enum bpf_map_type map_type; | 54 | enum bpf_map_type map_type; |
| 48 | u32 key_size; | 55 | u32 key_size; |
| 49 | u32 value_size; | 56 | u32 value_size; |
| @@ -52,15 +59,17 @@ struct bpf_map { | |||
| 52 | u32 pages; | 59 | u32 pages; |
| 53 | u32 id; | 60 | u32 id; |
| 54 | int numa_node; | 61 | int numa_node; |
| 55 | struct user_struct *user; | 62 | bool unpriv_array; |
| 56 | const struct bpf_map_ops *ops; | 63 | /* 7 bytes hole */ |
| 57 | struct work_struct work; | 64 | |
| 65 | /* 2nd cacheline with misc members to avoid false sharing | ||
| 66 | * particularly with refcounting. | ||
| 67 | */ | ||
| 68 | struct user_struct *user ____cacheline_aligned; | ||
| 69 | atomic_t refcnt; | ||
| 58 | atomic_t usercnt; | 70 | atomic_t usercnt; |
| 59 | struct bpf_map *inner_map_meta; | 71 | struct work_struct work; |
| 60 | char name[BPF_OBJ_NAME_LEN]; | 72 | char name[BPF_OBJ_NAME_LEN]; |
| 61 | #ifdef CONFIG_SECURITY | ||
| 62 | void *security; | ||
| 63 | #endif | ||
| 64 | }; | 73 | }; |
| 65 | 74 | ||
| 66 | /* function argument constraints */ | 75 | /* function argument constraints */ |
| @@ -221,6 +230,7 @@ struct bpf_prog_aux { | |||
| 221 | struct bpf_array { | 230 | struct bpf_array { |
| 222 | struct bpf_map map; | 231 | struct bpf_map map; |
| 223 | u32 elem_size; | 232 | u32 elem_size; |
| 233 | u32 index_mask; | ||
| 224 | /* 'ownership' of prog_array is claimed by the first program that | 234 | /* 'ownership' of prog_array is claimed by the first program that |
| 225 | * is going to use this map or by the first program which FD is stored | 235 | * is going to use this map or by the first program which FD is stored |
| 226 | * in the map to make sure that all callers and callees have the same | 236 | * in the map to make sure that all callers and callees have the same |
| @@ -419,6 +429,8 @@ static inline int bpf_map_attr_numa_node(const union bpf_attr *attr) | |||
| 419 | attr->numa_node : NUMA_NO_NODE; | 429 | attr->numa_node : NUMA_NO_NODE; |
| 420 | } | 430 | } |
| 421 | 431 | ||
| 432 | struct bpf_prog *bpf_prog_get_type_path(const char *name, enum bpf_prog_type type); | ||
| 433 | |||
| 422 | #else /* !CONFIG_BPF_SYSCALL */ | 434 | #else /* !CONFIG_BPF_SYSCALL */ |
| 423 | static inline struct bpf_prog *bpf_prog_get(u32 ufd) | 435 | static inline struct bpf_prog *bpf_prog_get(u32 ufd) |
| 424 | { | 436 | { |
| @@ -506,6 +518,12 @@ static inline int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, | |||
| 506 | { | 518 | { |
| 507 | return 0; | 519 | return 0; |
| 508 | } | 520 | } |
| 521 | |||
| 522 | static inline struct bpf_prog *bpf_prog_get_type_path(const char *name, | ||
| 523 | enum bpf_prog_type type) | ||
| 524 | { | ||
| 525 | return ERR_PTR(-EOPNOTSUPP); | ||
| 526 | } | ||
| 509 | #endif /* CONFIG_BPF_SYSCALL */ | 527 | #endif /* CONFIG_BPF_SYSCALL */ |
| 510 | 528 | ||
| 511 | static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, | 529 | static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, |
| @@ -514,6 +532,8 @@ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, | |||
| 514 | return bpf_prog_get_type_dev(ufd, type, false); | 532 | return bpf_prog_get_type_dev(ufd, type, false); |
| 515 | } | 533 | } |
| 516 | 534 | ||
| 535 | bool bpf_prog_get_ok(struct bpf_prog *, enum bpf_prog_type *, bool); | ||
| 536 | |||
| 517 | int bpf_prog_offload_compile(struct bpf_prog *prog); | 537 | int bpf_prog_offload_compile(struct bpf_prog *prog); |
| 518 | void bpf_prog_offload_destroy(struct bpf_prog *prog); | 538 | void bpf_prog_offload_destroy(struct bpf_prog *prog); |
| 519 | 539 | ||
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index c561b986bab0..1632bb13ad8a 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h | |||
| @@ -15,11 +15,11 @@ | |||
| 15 | * In practice this is far bigger than any realistic pointer offset; this limit | 15 | * In practice this is far bigger than any realistic pointer offset; this limit |
| 16 | * ensures that umax_value + (int)off + (int)size cannot overflow a u64. | 16 | * ensures that umax_value + (int)off + (int)size cannot overflow a u64. |
| 17 | */ | 17 | */ |
| 18 | #define BPF_MAX_VAR_OFF (1ULL << 31) | 18 | #define BPF_MAX_VAR_OFF (1 << 29) |
| 19 | /* Maximum variable size permitted for ARG_CONST_SIZE[_OR_ZERO]. This ensures | 19 | /* Maximum variable size permitted for ARG_CONST_SIZE[_OR_ZERO]. This ensures |
| 20 | * that converting umax_value to int cannot overflow. | 20 | * that converting umax_value to int cannot overflow. |
| 21 | */ | 21 | */ |
| 22 | #define BPF_MAX_VAR_SIZ INT_MAX | 22 | #define BPF_MAX_VAR_SIZ (1 << 29) |
| 23 | 23 | ||
| 24 | /* Liveness marks, used for registers and spilled-regs (in stack slots). | 24 | /* Liveness marks, used for registers and spilled-regs (in stack slots). |
| 25 | * Read marks propagate upwards until they find a write mark; they record that | 25 | * Read marks propagate upwards until they find a write mark; they record that |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 2272ded07496..631354acfa72 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -219,7 +219,7 @@ | |||
| 219 | /* Mark a function definition as prohibited from being cloned. */ | 219 | /* Mark a function definition as prohibited from being cloned. */ |
| 220 | #define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) | 220 | #define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) |
| 221 | 221 | ||
| 222 | #ifdef RANDSTRUCT_PLUGIN | 222 | #if defined(RANDSTRUCT_PLUGIN) && !defined(__CHECKER__) |
| 223 | #define __randomize_layout __attribute__((randomize_layout)) | 223 | #define __randomize_layout __attribute__((randomize_layout)) |
| 224 | #define __no_randomize_layout __attribute__((no_randomize_layout)) | 224 | #define __no_randomize_layout __attribute__((no_randomize_layout)) |
| 225 | #endif | 225 | #endif |
diff --git a/include/linux/completion.h b/include/linux/completion.h index 94a59ba7d422..519e94915d18 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
| @@ -32,7 +32,6 @@ struct completion { | |||
| 32 | #define init_completion(x) __init_completion(x) | 32 | #define init_completion(x) __init_completion(x) |
| 33 | static inline void complete_acquire(struct completion *x) {} | 33 | static inline void complete_acquire(struct completion *x) {} |
| 34 | static inline void complete_release(struct completion *x) {} | 34 | static inline void complete_release(struct completion *x) {} |
| 35 | static inline void complete_release_commit(struct completion *x) {} | ||
| 36 | 35 | ||
| 37 | #define COMPLETION_INITIALIZER(work) \ | 36 | #define COMPLETION_INITIALIZER(work) \ |
| 38 | { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } | 37 | { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index a04ef7c15c6a..7b01bc11c692 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -47,6 +47,13 @@ extern void cpu_remove_dev_attr(struct device_attribute *attr); | |||
| 47 | extern int cpu_add_dev_attr_group(struct attribute_group *attrs); | 47 | extern int cpu_add_dev_attr_group(struct attribute_group *attrs); |
| 48 | extern void cpu_remove_dev_attr_group(struct attribute_group *attrs); | 48 | extern void cpu_remove_dev_attr_group(struct attribute_group *attrs); |
| 49 | 49 | ||
| 50 | extern ssize_t cpu_show_meltdown(struct device *dev, | ||
| 51 | struct device_attribute *attr, char *buf); | ||
| 52 | extern ssize_t cpu_show_spectre_v1(struct device *dev, | ||
| 53 | struct device_attribute *attr, char *buf); | ||
| 54 | extern ssize_t cpu_show_spectre_v2(struct device *dev, | ||
| 55 | struct device_attribute *attr, char *buf); | ||
| 56 | |||
| 50 | extern __printf(4, 5) | 57 | extern __printf(4, 5) |
| 51 | struct device *cpu_device_create(struct device *parent, void *drvdata, | 58 | struct device *cpu_device_create(struct device *parent, void *drvdata, |
| 52 | const struct attribute_group **groups, | 59 | const struct attribute_group **groups, |
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index 201ab7267986..1a32e558eb11 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h | |||
| @@ -86,7 +86,7 @@ enum cpuhp_state { | |||
| 86 | CPUHP_MM_ZSWP_POOL_PREPARE, | 86 | CPUHP_MM_ZSWP_POOL_PREPARE, |
| 87 | CPUHP_KVM_PPC_BOOK3S_PREPARE, | 87 | CPUHP_KVM_PPC_BOOK3S_PREPARE, |
| 88 | CPUHP_ZCOMP_PREPARE, | 88 | CPUHP_ZCOMP_PREPARE, |
| 89 | CPUHP_TIMERS_DEAD, | 89 | CPUHP_TIMERS_PREPARE, |
| 90 | CPUHP_MIPS_SOC_PREPARE, | 90 | CPUHP_MIPS_SOC_PREPARE, |
| 91 | CPUHP_BP_PREPARE_DYN, | 91 | CPUHP_BP_PREPARE_DYN, |
| 92 | CPUHP_BP_PREPARE_DYN_END = CPUHP_BP_PREPARE_DYN + 20, | 92 | CPUHP_BP_PREPARE_DYN_END = CPUHP_BP_PREPARE_DYN + 20, |
diff --git a/include/linux/crash_core.h b/include/linux/crash_core.h index 06097ef30449..b511f6d24b42 100644 --- a/include/linux/crash_core.h +++ b/include/linux/crash_core.h | |||
| @@ -42,6 +42,8 @@ phys_addr_t paddr_vmcoreinfo_note(void); | |||
| 42 | vmcoreinfo_append_str("PAGESIZE=%ld\n", value) | 42 | vmcoreinfo_append_str("PAGESIZE=%ld\n", value) |
| 43 | #define VMCOREINFO_SYMBOL(name) \ | 43 | #define VMCOREINFO_SYMBOL(name) \ |
| 44 | vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name) | 44 | vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name) |
| 45 | #define VMCOREINFO_SYMBOL_ARRAY(name) \ | ||
| 46 | vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)name) | ||
| 45 | #define VMCOREINFO_SIZE(name) \ | 47 | #define VMCOREINFO_SIZE(name) \ |
| 46 | vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \ | 48 | vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \ |
| 47 | (unsigned long)sizeof(name)) | 49 | (unsigned long)sizeof(name)) |
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 4178d2493547..5e335b6203f4 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
| @@ -71,7 +71,7 @@ extern void delayacct_init(void); | |||
| 71 | extern void __delayacct_tsk_init(struct task_struct *); | 71 | extern void __delayacct_tsk_init(struct task_struct *); |
| 72 | extern void __delayacct_tsk_exit(struct task_struct *); | 72 | extern void __delayacct_tsk_exit(struct task_struct *); |
| 73 | extern void __delayacct_blkio_start(void); | 73 | extern void __delayacct_blkio_start(void); |
| 74 | extern void __delayacct_blkio_end(void); | 74 | extern void __delayacct_blkio_end(struct task_struct *); |
| 75 | extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); | 75 | extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); |
| 76 | extern __u64 __delayacct_blkio_ticks(struct task_struct *); | 76 | extern __u64 __delayacct_blkio_ticks(struct task_struct *); |
| 77 | extern void __delayacct_freepages_start(void); | 77 | extern void __delayacct_freepages_start(void); |
| @@ -122,10 +122,10 @@ static inline void delayacct_blkio_start(void) | |||
| 122 | __delayacct_blkio_start(); | 122 | __delayacct_blkio_start(); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | static inline void delayacct_blkio_end(void) | 125 | static inline void delayacct_blkio_end(struct task_struct *p) |
| 126 | { | 126 | { |
| 127 | if (current->delays) | 127 | if (current->delays) |
| 128 | __delayacct_blkio_end(); | 128 | __delayacct_blkio_end(p); |
| 129 | delayacct_clear_flag(DELAYACCT_PF_BLKIO); | 129 | delayacct_clear_flag(DELAYACCT_PF_BLKIO); |
| 130 | } | 130 | } |
| 131 | 131 | ||
| @@ -169,7 +169,7 @@ static inline void delayacct_tsk_free(struct task_struct *tsk) | |||
| 169 | {} | 169 | {} |
| 170 | static inline void delayacct_blkio_start(void) | 170 | static inline void delayacct_blkio_start(void) |
| 171 | {} | 171 | {} |
| 172 | static inline void delayacct_blkio_end(void) | 172 | static inline void delayacct_blkio_end(struct task_struct *p) |
| 173 | {} | 173 | {} |
| 174 | static inline int delayacct_add_tsk(struct taskstats *d, | 174 | static inline int delayacct_add_tsk(struct taskstats *d, |
| 175 | struct task_struct *tsk) | 175 | struct task_struct *tsk) |
diff --git a/include/linux/efi.h b/include/linux/efi.h index d813f7b04da7..29fdf8029cf6 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -140,11 +140,13 @@ struct efi_boot_memmap { | |||
| 140 | 140 | ||
| 141 | struct capsule_info { | 141 | struct capsule_info { |
| 142 | efi_capsule_header_t header; | 142 | efi_capsule_header_t header; |
| 143 | efi_capsule_header_t *capsule; | ||
| 143 | int reset_type; | 144 | int reset_type; |
| 144 | long index; | 145 | long index; |
| 145 | size_t count; | 146 | size_t count; |
| 146 | size_t total_size; | 147 | size_t total_size; |
| 147 | phys_addr_t *pages; | 148 | struct page **pages; |
| 149 | phys_addr_t *phys; | ||
| 148 | size_t page_bytes_remain; | 150 | size_t page_bytes_remain; |
| 149 | }; | 151 | }; |
| 150 | 152 | ||
diff --git a/include/linux/fscache.h b/include/linux/fscache.h index f4ff47d4a893..fe0c349684fa 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h | |||
| @@ -755,7 +755,7 @@ bool fscache_maybe_release_page(struct fscache_cookie *cookie, | |||
| 755 | { | 755 | { |
| 756 | if (fscache_cookie_valid(cookie) && PageFsCache(page)) | 756 | if (fscache_cookie_valid(cookie) && PageFsCache(page)) |
| 757 | return __fscache_maybe_release_page(cookie, page, gfp); | 757 | return __fscache_maybe_release_page(cookie, page, gfp); |
| 758 | return false; | 758 | return true; |
| 759 | } | 759 | } |
| 760 | 760 | ||
| 761 | /** | 761 | /** |
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 55e672592fa9..7258cd676df4 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h | |||
| @@ -66,9 +66,10 @@ struct gpio_irq_chip { | |||
| 66 | /** | 66 | /** |
| 67 | * @lock_key: | 67 | * @lock_key: |
| 68 | * | 68 | * |
| 69 | * Per GPIO IRQ chip lockdep class. | 69 | * Per GPIO IRQ chip lockdep classes. |
| 70 | */ | 70 | */ |
| 71 | struct lock_class_key *lock_key; | 71 | struct lock_class_key *lock_key; |
| 72 | struct lock_class_key *request_key; | ||
| 72 | 73 | ||
| 73 | /** | 74 | /** |
| 74 | * @parent_handler: | 75 | * @parent_handler: |
| @@ -323,7 +324,8 @@ extern const char *gpiochip_is_requested(struct gpio_chip *chip, | |||
| 323 | 324 | ||
| 324 | /* add/remove chips */ | 325 | /* add/remove chips */ |
| 325 | extern int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, | 326 | extern int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, |
| 326 | struct lock_class_key *lock_key); | 327 | struct lock_class_key *lock_key, |
| 328 | struct lock_class_key *request_key); | ||
| 327 | 329 | ||
| 328 | /** | 330 | /** |
| 329 | * gpiochip_add_data() - register a gpio_chip | 331 | * gpiochip_add_data() - register a gpio_chip |
| @@ -350,11 +352,13 @@ extern int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, | |||
| 350 | */ | 352 | */ |
| 351 | #ifdef CONFIG_LOCKDEP | 353 | #ifdef CONFIG_LOCKDEP |
| 352 | #define gpiochip_add_data(chip, data) ({ \ | 354 | #define gpiochip_add_data(chip, data) ({ \ |
| 353 | static struct lock_class_key key; \ | 355 | static struct lock_class_key lock_key; \ |
| 354 | gpiochip_add_data_with_key(chip, data, &key); \ | 356 | static struct lock_class_key request_key; \ |
| 357 | gpiochip_add_data_with_key(chip, data, &lock_key, \ | ||
| 358 | &request_key); \ | ||
| 355 | }) | 359 | }) |
| 356 | #else | 360 | #else |
| 357 | #define gpiochip_add_data(chip, data) gpiochip_add_data_with_key(chip, data, NULL) | 361 | #define gpiochip_add_data(chip, data) gpiochip_add_data_with_key(chip, data, NULL, NULL) |
| 358 | #endif | 362 | #endif |
| 359 | 363 | ||
| 360 | static inline int gpiochip_add(struct gpio_chip *chip) | 364 | static inline int gpiochip_add(struct gpio_chip *chip) |
| @@ -429,7 +433,8 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip, | |||
| 429 | irq_flow_handler_t handler, | 433 | irq_flow_handler_t handler, |
| 430 | unsigned int type, | 434 | unsigned int type, |
| 431 | bool threaded, | 435 | bool threaded, |
| 432 | struct lock_class_key *lock_key); | 436 | struct lock_class_key *lock_key, |
| 437 | struct lock_class_key *request_key); | ||
| 433 | 438 | ||
| 434 | #ifdef CONFIG_LOCKDEP | 439 | #ifdef CONFIG_LOCKDEP |
| 435 | 440 | ||
| @@ -445,10 +450,12 @@ static inline int gpiochip_irqchip_add(struct gpio_chip *gpiochip, | |||
| 445 | irq_flow_handler_t handler, | 450 | irq_flow_handler_t handler, |
| 446 | unsigned int type) | 451 | unsigned int type) |
| 447 | { | 452 | { |
| 448 | static struct lock_class_key key; | 453 | static struct lock_class_key lock_key; |
| 454 | static struct lock_class_key request_key; | ||
| 449 | 455 | ||
| 450 | return gpiochip_irqchip_add_key(gpiochip, irqchip, first_irq, | 456 | return gpiochip_irqchip_add_key(gpiochip, irqchip, first_irq, |
| 451 | handler, type, false, &key); | 457 | handler, type, false, |
| 458 | &lock_key, &request_key); | ||
| 452 | } | 459 | } |
| 453 | 460 | ||
| 454 | static inline int gpiochip_irqchip_add_nested(struct gpio_chip *gpiochip, | 461 | static inline int gpiochip_irqchip_add_nested(struct gpio_chip *gpiochip, |
| @@ -458,10 +465,12 @@ static inline int gpiochip_irqchip_add_nested(struct gpio_chip *gpiochip, | |||
| 458 | unsigned int type) | 465 | unsigned int type) |
| 459 | { | 466 | { |
| 460 | 467 | ||
| 461 | static struct lock_class_key key; | 468 | static struct lock_class_key lock_key; |
| 469 | static struct lock_class_key request_key; | ||
| 462 | 470 | ||
| 463 | return gpiochip_irqchip_add_key(gpiochip, irqchip, first_irq, | 471 | return gpiochip_irqchip_add_key(gpiochip, irqchip, first_irq, |
| 464 | handler, type, true, &key); | 472 | handler, type, true, |
| 473 | &lock_key, &request_key); | ||
| 465 | } | 474 | } |
| 466 | #else | 475 | #else |
| 467 | static inline int gpiochip_irqchip_add(struct gpio_chip *gpiochip, | 476 | static inline int gpiochip_irqchip_add(struct gpio_chip *gpiochip, |
| @@ -471,7 +480,7 @@ static inline int gpiochip_irqchip_add(struct gpio_chip *gpiochip, | |||
| 471 | unsigned int type) | 480 | unsigned int type) |
| 472 | { | 481 | { |
| 473 | return gpiochip_irqchip_add_key(gpiochip, irqchip, first_irq, | 482 | return gpiochip_irqchip_add_key(gpiochip, irqchip, first_irq, |
| 474 | handler, type, false, NULL); | 483 | handler, type, false, NULL, NULL); |
| 475 | } | 484 | } |
| 476 | 485 | ||
| 477 | static inline int gpiochip_irqchip_add_nested(struct gpio_chip *gpiochip, | 486 | static inline int gpiochip_irqchip_add_nested(struct gpio_chip *gpiochip, |
| @@ -481,7 +490,7 @@ static inline int gpiochip_irqchip_add_nested(struct gpio_chip *gpiochip, | |||
| 481 | unsigned int type) | 490 | unsigned int type) |
| 482 | { | 491 | { |
| 483 | return gpiochip_irqchip_add_key(gpiochip, irqchip, first_irq, | 492 | return gpiochip_irqchip_add_key(gpiochip, irqchip, first_irq, |
| 484 | handler, type, true, NULL); | 493 | handler, type, true, NULL, NULL); |
| 485 | } | 494 | } |
| 486 | #endif /* CONFIG_LOCKDEP */ | 495 | #endif /* CONFIG_LOCKDEP */ |
| 487 | 496 | ||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index cb18c6290ca8..8415bf1a9776 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -273,7 +273,8 @@ struct ipv6_pinfo { | |||
| 273 | * 100: prefer care-of address | 273 | * 100: prefer care-of address |
| 274 | */ | 274 | */ |
| 275 | dontfrag:1, | 275 | dontfrag:1, |
| 276 | autoflowlabel:1; | 276 | autoflowlabel:1, |
| 277 | autoflowlabel_set:1; | ||
| 277 | __u8 min_hopcount; | 278 | __u8 min_hopcount; |
| 278 | __u8 tclass; | 279 | __u8 tclass; |
| 279 | __be32 rcv_flowinfo; | 280 | __be32 rcv_flowinfo; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index e140f69163b6..a0231e96a578 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -212,6 +212,7 @@ struct irq_data { | |||
| 212 | * mask. Applies only to affinity managed irqs. | 212 | * mask. Applies only to affinity managed irqs. |
| 213 | * IRQD_SINGLE_TARGET - IRQ allows only a single affinity target | 213 | * IRQD_SINGLE_TARGET - IRQ allows only a single affinity target |
| 214 | * IRQD_DEFAULT_TRIGGER_SET - Expected trigger already been set | 214 | * IRQD_DEFAULT_TRIGGER_SET - Expected trigger already been set |
| 215 | * IRQD_CAN_RESERVE - Can use reservation mode | ||
| 215 | */ | 216 | */ |
| 216 | enum { | 217 | enum { |
| 217 | IRQD_TRIGGER_MASK = 0xf, | 218 | IRQD_TRIGGER_MASK = 0xf, |
| @@ -233,6 +234,7 @@ enum { | |||
| 233 | IRQD_MANAGED_SHUTDOWN = (1 << 23), | 234 | IRQD_MANAGED_SHUTDOWN = (1 << 23), |
| 234 | IRQD_SINGLE_TARGET = (1 << 24), | 235 | IRQD_SINGLE_TARGET = (1 << 24), |
| 235 | IRQD_DEFAULT_TRIGGER_SET = (1 << 25), | 236 | IRQD_DEFAULT_TRIGGER_SET = (1 << 25), |
| 237 | IRQD_CAN_RESERVE = (1 << 26), | ||
| 236 | }; | 238 | }; |
| 237 | 239 | ||
| 238 | #define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors) | 240 | #define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors) |
| @@ -377,6 +379,21 @@ static inline bool irqd_is_managed_and_shutdown(struct irq_data *d) | |||
| 377 | return __irqd_to_state(d) & IRQD_MANAGED_SHUTDOWN; | 379 | return __irqd_to_state(d) & IRQD_MANAGED_SHUTDOWN; |
| 378 | } | 380 | } |
| 379 | 381 | ||
| 382 | static inline void irqd_set_can_reserve(struct irq_data *d) | ||
| 383 | { | ||
| 384 | __irqd_to_state(d) |= IRQD_CAN_RESERVE; | ||
| 385 | } | ||
| 386 | |||
| 387 | static inline void irqd_clr_can_reserve(struct irq_data *d) | ||
| 388 | { | ||
| 389 | __irqd_to_state(d) &= ~IRQD_CAN_RESERVE; | ||
| 390 | } | ||
| 391 | |||
| 392 | static inline bool irqd_can_reserve(struct irq_data *d) | ||
| 393 | { | ||
| 394 | return __irqd_to_state(d) & IRQD_CAN_RESERVE; | ||
| 395 | } | ||
| 396 | |||
| 380 | #undef __irqd_to_state | 397 | #undef __irqd_to_state |
| 381 | 398 | ||
| 382 | static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) | 399 | static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 39fb3700f7a9..25b33b664537 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -255,12 +255,15 @@ static inline bool irq_is_percpu_devid(unsigned int irq) | |||
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | static inline void | 257 | static inline void |
| 258 | irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) | 258 | irq_set_lockdep_class(unsigned int irq, struct lock_class_key *lock_class, |
| 259 | struct lock_class_key *request_class) | ||
| 259 | { | 260 | { |
| 260 | struct irq_desc *desc = irq_to_desc(irq); | 261 | struct irq_desc *desc = irq_to_desc(irq); |
| 261 | 262 | ||
| 262 | if (desc) | 263 | if (desc) { |
| 263 | lockdep_set_class(&desc->lock, class); | 264 | lockdep_set_class(&desc->lock, lock_class); |
| 265 | lockdep_set_class(&desc->request_mutex, request_class); | ||
| 266 | } | ||
| 264 | } | 267 | } |
| 265 | 268 | ||
| 266 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI | 269 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI |
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index a34355d19546..48c7e86bb556 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
| @@ -113,7 +113,7 @@ struct irq_domain_ops { | |||
| 113 | unsigned int nr_irqs, void *arg); | 113 | unsigned int nr_irqs, void *arg); |
| 114 | void (*free)(struct irq_domain *d, unsigned int virq, | 114 | void (*free)(struct irq_domain *d, unsigned int virq, |
| 115 | unsigned int nr_irqs); | 115 | unsigned int nr_irqs); |
| 116 | int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool early); | 116 | int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool reserve); |
| 117 | void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data); | 117 | void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data); |
| 118 | int (*translate)(struct irq_domain *d, struct irq_fwspec *fwspec, | 118 | int (*translate)(struct irq_domain *d, struct irq_fwspec *fwspec, |
| 119 | unsigned long *out_hwirq, unsigned int *out_type); | 119 | unsigned long *out_hwirq, unsigned int *out_type); |
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h index 46cb57d5eb13..1b3996ff3f16 100644 --- a/include/linux/irqflags.h +++ b/include/linux/irqflags.h | |||
| @@ -27,22 +27,18 @@ | |||
| 27 | # define trace_hardirq_enter() \ | 27 | # define trace_hardirq_enter() \ |
| 28 | do { \ | 28 | do { \ |
| 29 | current->hardirq_context++; \ | 29 | current->hardirq_context++; \ |
| 30 | crossrelease_hist_start(XHLOCK_HARD); \ | ||
| 31 | } while (0) | 30 | } while (0) |
| 32 | # define trace_hardirq_exit() \ | 31 | # define trace_hardirq_exit() \ |
| 33 | do { \ | 32 | do { \ |
| 34 | current->hardirq_context--; \ | 33 | current->hardirq_context--; \ |
| 35 | crossrelease_hist_end(XHLOCK_HARD); \ | ||
| 36 | } while (0) | 34 | } while (0) |
| 37 | # define lockdep_softirq_enter() \ | 35 | # define lockdep_softirq_enter() \ |
| 38 | do { \ | 36 | do { \ |
| 39 | current->softirq_context++; \ | 37 | current->softirq_context++; \ |
| 40 | crossrelease_hist_start(XHLOCK_SOFT); \ | ||
| 41 | } while (0) | 38 | } while (0) |
| 42 | # define lockdep_softirq_exit() \ | 39 | # define lockdep_softirq_exit() \ |
| 43 | do { \ | 40 | do { \ |
| 44 | current->softirq_context--; \ | 41 | current->softirq_context--; \ |
| 45 | crossrelease_hist_end(XHLOCK_SOFT); \ | ||
| 46 | } while (0) | 42 | } while (0) |
| 47 | # define INIT_TRACE_IRQFLAGS .softirqs_enabled = 1, | 43 | # define INIT_TRACE_IRQFLAGS .softirqs_enabled = 1, |
| 48 | #else | 44 | #else |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 2e75dc34bff5..3251d9c0d313 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -475,8 +475,6 @@ enum xhlock_context_t { | |||
| 475 | #define STATIC_LOCKDEP_MAP_INIT(_name, _key) \ | 475 | #define STATIC_LOCKDEP_MAP_INIT(_name, _key) \ |
| 476 | { .name = (_name), .key = (void *)(_key), } | 476 | { .name = (_name), .key = (void *)(_key), } |
| 477 | 477 | ||
| 478 | static inline void crossrelease_hist_start(enum xhlock_context_t c) {} | ||
| 479 | static inline void crossrelease_hist_end(enum xhlock_context_t c) {} | ||
| 480 | static inline void lockdep_invariant_state(bool force) {} | 478 | static inline void lockdep_invariant_state(bool force) {} |
| 481 | static inline void lockdep_init_task(struct task_struct *task) {} | 479 | static inline void lockdep_init_task(struct task_struct *task) {} |
| 482 | static inline void lockdep_free_task(struct task_struct *task) {} | 480 | static inline void lockdep_free_task(struct task_struct *task) {} |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index a2a1318a3d0c..c3d3f04d8cc6 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
| @@ -915,10 +915,10 @@ enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN}; | |||
| 915 | #define LTR_L1SS_PWR_GATE_CHECK_CARD_EN BIT(6) | 915 | #define LTR_L1SS_PWR_GATE_CHECK_CARD_EN BIT(6) |
| 916 | 916 | ||
| 917 | enum dev_aspm_mode { | 917 | enum dev_aspm_mode { |
| 918 | DEV_ASPM_DISABLE = 0, | ||
| 919 | DEV_ASPM_DYNAMIC, | 918 | DEV_ASPM_DYNAMIC, |
| 920 | DEV_ASPM_BACKDOOR, | 919 | DEV_ASPM_BACKDOOR, |
| 921 | DEV_ASPM_STATIC, | 920 | DEV_ASPM_STATIC, |
| 921 | DEV_ASPM_DISABLE, | ||
| 922 | }; | 922 | }; |
| 923 | 923 | ||
| 924 | /* | 924 | /* |
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index a886b51511ab..a0610427e168 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
| 37 | #include <linux/completion.h> | 37 | #include <linux/completion.h> |
| 38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
| 39 | #include <linux/irq.h> | ||
| 39 | #include <linux/spinlock_types.h> | 40 | #include <linux/spinlock_types.h> |
| 40 | #include <linux/semaphore.h> | 41 | #include <linux/semaphore.h> |
| 41 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
| @@ -556,6 +557,7 @@ struct mlx5_core_sriov { | |||
| 556 | }; | 557 | }; |
| 557 | 558 | ||
| 558 | struct mlx5_irq_info { | 559 | struct mlx5_irq_info { |
| 560 | cpumask_var_t mask; | ||
| 559 | char name[MLX5_MAX_IRQ_NAME]; | 561 | char name[MLX5_MAX_IRQ_NAME]; |
| 560 | }; | 562 | }; |
| 561 | 563 | ||
| @@ -1048,7 +1050,7 @@ int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx, | |||
| 1048 | enum mlx5_eq_type type); | 1050 | enum mlx5_eq_type type); |
| 1049 | int mlx5_destroy_unmap_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq); | 1051 | int mlx5_destroy_unmap_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq); |
| 1050 | int mlx5_start_eqs(struct mlx5_core_dev *dev); | 1052 | int mlx5_start_eqs(struct mlx5_core_dev *dev); |
| 1051 | int mlx5_stop_eqs(struct mlx5_core_dev *dev); | 1053 | void mlx5_stop_eqs(struct mlx5_core_dev *dev); |
| 1052 | int mlx5_vector2eqn(struct mlx5_core_dev *dev, int vector, int *eqn, | 1054 | int mlx5_vector2eqn(struct mlx5_core_dev *dev, int vector, int *eqn, |
| 1053 | unsigned int *irqn); | 1055 | unsigned int *irqn); |
| 1054 | int mlx5_core_attach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn); | 1056 | int mlx5_core_attach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn); |
| @@ -1164,6 +1166,10 @@ int mlx5_cmd_create_vport_lag(struct mlx5_core_dev *dev); | |||
| 1164 | int mlx5_cmd_destroy_vport_lag(struct mlx5_core_dev *dev); | 1166 | int mlx5_cmd_destroy_vport_lag(struct mlx5_core_dev *dev); |
| 1165 | bool mlx5_lag_is_active(struct mlx5_core_dev *dev); | 1167 | bool mlx5_lag_is_active(struct mlx5_core_dev *dev); |
| 1166 | struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev); | 1168 | struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev); |
| 1169 | int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev, | ||
| 1170 | u64 *values, | ||
| 1171 | int num_counters, | ||
| 1172 | size_t *offsets); | ||
| 1167 | struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev); | 1173 | struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev); |
| 1168 | void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up); | 1174 | void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up); |
| 1169 | 1175 | ||
| @@ -1226,7 +1232,23 @@ enum { | |||
| 1226 | static inline const struct cpumask * | 1232 | static inline const struct cpumask * |
| 1227 | mlx5_get_vector_affinity(struct mlx5_core_dev *dev, int vector) | 1233 | mlx5_get_vector_affinity(struct mlx5_core_dev *dev, int vector) |
| 1228 | { | 1234 | { |
| 1229 | return pci_irq_get_affinity(dev->pdev, MLX5_EQ_VEC_COMP_BASE + vector); | 1235 | const struct cpumask *mask; |
| 1236 | struct irq_desc *desc; | ||
| 1237 | unsigned int irq; | ||
| 1238 | int eqn; | ||
| 1239 | int err; | ||
| 1240 | |||
| 1241 | err = mlx5_vector2eqn(dev, vector, &eqn, &irq); | ||
| 1242 | if (err) | ||
| 1243 | return NULL; | ||
| 1244 | |||
| 1245 | desc = irq_to_desc(irq); | ||
| 1246 | #ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK | ||
| 1247 | mask = irq_data_get_effective_affinity_mask(&desc->irq_data); | ||
| 1248 | #else | ||
| 1249 | mask = desc->irq_common_data.affinity; | ||
| 1250 | #endif | ||
| 1251 | return mask; | ||
| 1230 | } | 1252 | } |
| 1231 | 1253 | ||
| 1232 | #endif /* MLX5_DRIVER_H */ | 1254 | #endif /* MLX5_DRIVER_H */ |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 38a7577a9ce7..1391a82da98e 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
| @@ -147,7 +147,7 @@ enum { | |||
| 147 | MLX5_CMD_OP_ALLOC_Q_COUNTER = 0x771, | 147 | MLX5_CMD_OP_ALLOC_Q_COUNTER = 0x771, |
| 148 | MLX5_CMD_OP_DEALLOC_Q_COUNTER = 0x772, | 148 | MLX5_CMD_OP_DEALLOC_Q_COUNTER = 0x772, |
| 149 | MLX5_CMD_OP_QUERY_Q_COUNTER = 0x773, | 149 | MLX5_CMD_OP_QUERY_Q_COUNTER = 0x773, |
| 150 | MLX5_CMD_OP_SET_RATE_LIMIT = 0x780, | 150 | MLX5_CMD_OP_SET_PP_RATE_LIMIT = 0x780, |
| 151 | MLX5_CMD_OP_QUERY_RATE_LIMIT = 0x781, | 151 | MLX5_CMD_OP_QUERY_RATE_LIMIT = 0x781, |
| 152 | MLX5_CMD_OP_CREATE_SCHEDULING_ELEMENT = 0x782, | 152 | MLX5_CMD_OP_CREATE_SCHEDULING_ELEMENT = 0x782, |
| 153 | MLX5_CMD_OP_DESTROY_SCHEDULING_ELEMENT = 0x783, | 153 | MLX5_CMD_OP_DESTROY_SCHEDULING_ELEMENT = 0x783, |
| @@ -1027,8 +1027,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { | |||
| 1027 | u8 log_max_wq_sz[0x5]; | 1027 | u8 log_max_wq_sz[0x5]; |
| 1028 | 1028 | ||
| 1029 | u8 nic_vport_change_event[0x1]; | 1029 | u8 nic_vport_change_event[0x1]; |
| 1030 | u8 disable_local_lb[0x1]; | 1030 | u8 disable_local_lb_uc[0x1]; |
| 1031 | u8 reserved_at_3e2[0x9]; | 1031 | u8 disable_local_lb_mc[0x1]; |
| 1032 | u8 reserved_at_3e3[0x8]; | ||
| 1032 | u8 log_max_vlan_list[0x5]; | 1033 | u8 log_max_vlan_list[0x5]; |
| 1033 | u8 reserved_at_3f0[0x3]; | 1034 | u8 reserved_at_3f0[0x3]; |
| 1034 | u8 log_max_current_mc_list[0x5]; | 1035 | u8 log_max_current_mc_list[0x5]; |
| @@ -7239,7 +7240,7 @@ struct mlx5_ifc_add_vxlan_udp_dport_in_bits { | |||
| 7239 | u8 vxlan_udp_port[0x10]; | 7240 | u8 vxlan_udp_port[0x10]; |
| 7240 | }; | 7241 | }; |
| 7241 | 7242 | ||
| 7242 | struct mlx5_ifc_set_rate_limit_out_bits { | 7243 | struct mlx5_ifc_set_pp_rate_limit_out_bits { |
| 7243 | u8 status[0x8]; | 7244 | u8 status[0x8]; |
| 7244 | u8 reserved_at_8[0x18]; | 7245 | u8 reserved_at_8[0x18]; |
| 7245 | 7246 | ||
| @@ -7248,7 +7249,7 @@ struct mlx5_ifc_set_rate_limit_out_bits { | |||
| 7248 | u8 reserved_at_40[0x40]; | 7249 | u8 reserved_at_40[0x40]; |
| 7249 | }; | 7250 | }; |
| 7250 | 7251 | ||
| 7251 | struct mlx5_ifc_set_rate_limit_in_bits { | 7252 | struct mlx5_ifc_set_pp_rate_limit_in_bits { |
| 7252 | u8 opcode[0x10]; | 7253 | u8 opcode[0x10]; |
| 7253 | u8 reserved_at_10[0x10]; | 7254 | u8 reserved_at_10[0x10]; |
| 7254 | 7255 | ||
| @@ -7261,6 +7262,8 @@ struct mlx5_ifc_set_rate_limit_in_bits { | |||
| 7261 | u8 reserved_at_60[0x20]; | 7262 | u8 reserved_at_60[0x20]; |
| 7262 | 7263 | ||
| 7263 | u8 rate_limit[0x20]; | 7264 | u8 rate_limit[0x20]; |
| 7265 | |||
| 7266 | u8 reserved_at_a0[0x160]; | ||
| 7264 | }; | 7267 | }; |
| 7265 | 7268 | ||
| 7266 | struct mlx5_ifc_access_register_out_bits { | 7269 | struct mlx5_ifc_access_register_out_bits { |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 49b4257ce1ea..f3075d6c7e82 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -85,7 +85,7 @@ struct netlink_ext_ack { | |||
| 85 | * to the lack of an output buffer.) | 85 | * to the lack of an output buffer.) |
| 86 | */ | 86 | */ |
| 87 | #define NL_SET_ERR_MSG(extack, msg) do { \ | 87 | #define NL_SET_ERR_MSG(extack, msg) do { \ |
| 88 | static const char __msg[] = (msg); \ | 88 | static const char __msg[] = msg; \ |
| 89 | struct netlink_ext_ack *__extack = (extack); \ | 89 | struct netlink_ext_ack *__extack = (extack); \ |
| 90 | \ | 90 | \ |
| 91 | if (__extack) \ | 91 | if (__extack) \ |
| @@ -101,7 +101,7 @@ struct netlink_ext_ack { | |||
| 101 | } while (0) | 101 | } while (0) |
| 102 | 102 | ||
| 103 | #define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \ | 103 | #define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \ |
| 104 | static const char __msg[] = (msg); \ | 104 | static const char __msg[] = msg; \ |
| 105 | struct netlink_ext_ack *__extack = (extack); \ | 105 | struct netlink_ext_ack *__extack = (extack); \ |
| 106 | \ | 106 | \ |
| 107 | if (__extack) { \ | 107 | if (__extack) { \ |
diff --git a/include/linux/pti.h b/include/linux/pti.h new file mode 100644 index 000000000000..0174883a935a --- /dev/null +++ b/include/linux/pti.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0 | ||
| 2 | #ifndef _INCLUDE_PTI_H | ||
| 3 | #define _INCLUDE_PTI_H | ||
| 4 | |||
| 5 | #ifdef CONFIG_PAGE_TABLE_ISOLATION | ||
| 6 | #include <asm/pti.h> | ||
| 7 | #else | ||
| 8 | static inline void pti_init(void) { } | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #endif | ||
diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h index 6866df4f31b5..d72b2e7dd500 100644 --- a/include/linux/ptr_ring.h +++ b/include/linux/ptr_ring.h | |||
| @@ -174,6 +174,15 @@ static inline int ptr_ring_produce_bh(struct ptr_ring *r, void *ptr) | |||
| 174 | * if they dereference the pointer - see e.g. PTR_RING_PEEK_CALL. | 174 | * if they dereference the pointer - see e.g. PTR_RING_PEEK_CALL. |
| 175 | * If ring is never resized, and if the pointer is merely | 175 | * If ring is never resized, and if the pointer is merely |
| 176 | * tested, there's no need to take the lock - see e.g. __ptr_ring_empty. | 176 | * tested, there's no need to take the lock - see e.g. __ptr_ring_empty. |
| 177 | * However, if called outside the lock, and if some other CPU | ||
| 178 | * consumes ring entries at the same time, the value returned | ||
| 179 | * is not guaranteed to be correct. | ||
| 180 | * In this case - to avoid incorrectly detecting the ring | ||
| 181 | * as empty - the CPU consuming the ring entries is responsible | ||
| 182 | * for either consuming all ring entries until the ring is empty, | ||
| 183 | * or synchronizing with some other CPU and causing it to | ||
| 184 | * execute __ptr_ring_peek and/or consume the ring enteries | ||
| 185 | * after the synchronization point. | ||
| 177 | */ | 186 | */ |
| 178 | static inline void *__ptr_ring_peek(struct ptr_ring *r) | 187 | static inline void *__ptr_ring_peek(struct ptr_ring *r) |
| 179 | { | 188 | { |
| @@ -182,10 +191,7 @@ static inline void *__ptr_ring_peek(struct ptr_ring *r) | |||
| 182 | return NULL; | 191 | return NULL; |
| 183 | } | 192 | } |
| 184 | 193 | ||
| 185 | /* Note: callers invoking this in a loop must use a compiler barrier, | 194 | /* See __ptr_ring_peek above for locking rules. */ |
| 186 | * for example cpu_relax(). Callers must take consumer_lock | ||
| 187 | * if the ring is ever resized - see e.g. ptr_ring_empty. | ||
| 188 | */ | ||
| 189 | static inline bool __ptr_ring_empty(struct ptr_ring *r) | 195 | static inline bool __ptr_ring_empty(struct ptr_ring *r) |
| 190 | { | 196 | { |
| 191 | return !__ptr_ring_peek(r); | 197 | return !__ptr_ring_peek(r); |
diff --git a/include/linux/sh_eth.h b/include/linux/sh_eth.h index ff3642d267f7..94081e9a5010 100644 --- a/include/linux/sh_eth.h +++ b/include/linux/sh_eth.h | |||
| @@ -17,7 +17,6 @@ struct sh_eth_plat_data { | |||
| 17 | unsigned char mac_addr[ETH_ALEN]; | 17 | unsigned char mac_addr[ETH_ALEN]; |
| 18 | unsigned no_ether_link:1; | 18 | unsigned no_ether_link:1; |
| 19 | unsigned ether_link_active_low:1; | 19 | unsigned ether_link_active_low:1; |
| 20 | unsigned needs_init:1; | ||
| 21 | }; | 20 | }; |
| 22 | 21 | ||
| 23 | #endif | 22 | #endif |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 7b2170bfd6e7..bc6bb325d1bf 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -126,7 +126,7 @@ void spi_statistics_add_transfer_stats(struct spi_statistics *stats, | |||
| 126 | * for that name. This appears in the sysfs "modalias" attribute | 126 | * for that name. This appears in the sysfs "modalias" attribute |
| 127 | * for driver coldplugging, and in uevents used for hotplugging | 127 | * for driver coldplugging, and in uevents used for hotplugging |
| 128 | * @cs_gpio: gpio number of the chipselect line (optional, -ENOENT when | 128 | * @cs_gpio: gpio number of the chipselect line (optional, -ENOENT when |
| 129 | * when not using a GPIO line) | 129 | * not using a GPIO line) |
| 130 | * | 130 | * |
| 131 | * @statistics: statistics for the spi_device | 131 | * @statistics: statistics for the spi_device |
| 132 | * | 132 | * |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 9c5a2628d6ce..1d3877c39a00 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
| @@ -124,6 +124,11 @@ static inline bool is_write_device_private_entry(swp_entry_t entry) | |||
| 124 | return unlikely(swp_type(entry) == SWP_DEVICE_WRITE); | 124 | return unlikely(swp_type(entry) == SWP_DEVICE_WRITE); |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | static inline unsigned long device_private_entry_to_pfn(swp_entry_t entry) | ||
| 128 | { | ||
| 129 | return swp_offset(entry); | ||
| 130 | } | ||
| 131 | |||
| 127 | static inline struct page *device_private_entry_to_page(swp_entry_t entry) | 132 | static inline struct page *device_private_entry_to_page(swp_entry_t entry) |
| 128 | { | 133 | { |
| 129 | return pfn_to_page(swp_offset(entry)); | 134 | return pfn_to_page(swp_offset(entry)); |
| @@ -154,6 +159,11 @@ static inline bool is_write_device_private_entry(swp_entry_t entry) | |||
| 154 | return false; | 159 | return false; |
| 155 | } | 160 | } |
| 156 | 161 | ||
| 162 | static inline unsigned long device_private_entry_to_pfn(swp_entry_t entry) | ||
| 163 | { | ||
| 164 | return 0; | ||
| 165 | } | ||
| 166 | |||
| 157 | static inline struct page *device_private_entry_to_page(swp_entry_t entry) | 167 | static inline struct page *device_private_entry_to_page(swp_entry_t entry) |
| 158 | { | 168 | { |
| 159 | return NULL; | 169 | return NULL; |
| @@ -189,6 +199,11 @@ static inline int is_write_migration_entry(swp_entry_t entry) | |||
| 189 | return unlikely(swp_type(entry) == SWP_MIGRATION_WRITE); | 199 | return unlikely(swp_type(entry) == SWP_MIGRATION_WRITE); |
| 190 | } | 200 | } |
| 191 | 201 | ||
| 202 | static inline unsigned long migration_entry_to_pfn(swp_entry_t entry) | ||
| 203 | { | ||
| 204 | return swp_offset(entry); | ||
| 205 | } | ||
| 206 | |||
| 192 | static inline struct page *migration_entry_to_page(swp_entry_t entry) | 207 | static inline struct page *migration_entry_to_page(swp_entry_t entry) |
| 193 | { | 208 | { |
| 194 | struct page *p = pfn_to_page(swp_offset(entry)); | 209 | struct page *p = pfn_to_page(swp_offset(entry)); |
| @@ -218,6 +233,12 @@ static inline int is_migration_entry(swp_entry_t swp) | |||
| 218 | { | 233 | { |
| 219 | return 0; | 234 | return 0; |
| 220 | } | 235 | } |
| 236 | |||
| 237 | static inline unsigned long migration_entry_to_pfn(swp_entry_t entry) | ||
| 238 | { | ||
| 239 | return 0; | ||
| 240 | } | ||
| 241 | |||
| 221 | static inline struct page *migration_entry_to_page(swp_entry_t entry) | 242 | static inline struct page *migration_entry_to_page(swp_entry_t entry) |
| 222 | { | 243 | { |
| 223 | return NULL; | 244 | return NULL; |
diff --git a/include/linux/tick.h b/include/linux/tick.h index f442d1a42025..7cc35921218e 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
| @@ -119,6 +119,7 @@ extern void tick_nohz_idle_exit(void); | |||
| 119 | extern void tick_nohz_irq_exit(void); | 119 | extern void tick_nohz_irq_exit(void); |
| 120 | extern ktime_t tick_nohz_get_sleep_length(void); | 120 | extern ktime_t tick_nohz_get_sleep_length(void); |
| 121 | extern unsigned long tick_nohz_get_idle_calls(void); | 121 | extern unsigned long tick_nohz_get_idle_calls(void); |
| 122 | extern unsigned long tick_nohz_get_idle_calls_cpu(int cpu); | ||
| 122 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); | 123 | extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); |
| 123 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); | 124 | extern u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time); |
| 124 | #else /* !CONFIG_NO_HZ_COMMON */ | 125 | #else /* !CONFIG_NO_HZ_COMMON */ |
diff --git a/include/linux/timer.h b/include/linux/timer.h index 04af640ea95b..2448f9cc48a3 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -207,9 +207,11 @@ unsigned long round_jiffies_up(unsigned long j); | |||
| 207 | unsigned long round_jiffies_up_relative(unsigned long j); | 207 | unsigned long round_jiffies_up_relative(unsigned long j); |
| 208 | 208 | ||
| 209 | #ifdef CONFIG_HOTPLUG_CPU | 209 | #ifdef CONFIG_HOTPLUG_CPU |
| 210 | int timers_prepare_cpu(unsigned int cpu); | ||
| 210 | int timers_dead_cpu(unsigned int cpu); | 211 | int timers_dead_cpu(unsigned int cpu); |
| 211 | #else | 212 | #else |
| 212 | #define timers_dead_cpu NULL | 213 | #define timers_prepare_cpu NULL |
| 214 | #define timers_dead_cpu NULL | ||
| 213 | #endif | 215 | #endif |
| 214 | 216 | ||
| 215 | #endif | 217 | #endif |
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index bae807eb2933..853291714ae0 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h | |||
| @@ -31,11 +31,17 @@ | |||
| 31 | #else | 31 | #else |
| 32 | #define MODULE_RANDSTRUCT_PLUGIN | 32 | #define MODULE_RANDSTRUCT_PLUGIN |
| 33 | #endif | 33 | #endif |
| 34 | #ifdef RETPOLINE | ||
| 35 | #define MODULE_VERMAGIC_RETPOLINE "retpoline " | ||
| 36 | #else | ||
| 37 | #define MODULE_VERMAGIC_RETPOLINE "" | ||
| 38 | #endif | ||
| 34 | 39 | ||
| 35 | #define VERMAGIC_STRING \ | 40 | #define VERMAGIC_STRING \ |
| 36 | UTS_RELEASE " " \ | 41 | UTS_RELEASE " " \ |
| 37 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ | 42 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ |
| 38 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \ | 43 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \ |
| 39 | MODULE_ARCH_VERMAGIC \ | 44 | MODULE_ARCH_VERMAGIC \ |
| 40 | MODULE_RANDSTRUCT_PLUGIN | 45 | MODULE_RANDSTRUCT_PLUGIN \ |
| 46 | MODULE_VERMAGIC_RETPOLINE | ||
| 41 | 47 | ||
diff --git a/include/net/arp.h b/include/net/arp.h index dc8cd47f883b..977aabfcdc03 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
| @@ -20,6 +20,9 @@ static inline u32 arp_hashfn(const void *pkey, const struct net_device *dev, u32 | |||
| 20 | 20 | ||
| 21 | static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key) | 21 | static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev, u32 key) |
| 22 | { | 22 | { |
| 23 | if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) | ||
| 24 | key = INADDR_ANY; | ||
| 25 | |||
| 23 | return ___neigh_lookup_noref(&arp_tbl, neigh_key_eq32, arp_hashfn, &key, dev); | 26 | return ___neigh_lookup_noref(&arp_tbl, neigh_key_eq32, arp_hashfn, &key, dev); |
| 24 | } | 27 | } |
| 25 | 28 | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8b8118a7fadb..fb94a8bd8ab5 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -815,6 +815,8 @@ struct cfg80211_csa_settings { | |||
| 815 | u8 count; | 815 | u8 count; |
| 816 | }; | 816 | }; |
| 817 | 817 | ||
| 818 | #define CFG80211_MAX_NUM_DIFFERENT_CHANNELS 10 | ||
| 819 | |||
| 818 | /** | 820 | /** |
| 819 | * struct iface_combination_params - input parameters for interface combinations | 821 | * struct iface_combination_params - input parameters for interface combinations |
| 820 | * | 822 | * |
| @@ -3226,7 +3228,6 @@ struct cfg80211_ops { | |||
| 3226 | * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN. | 3228 | * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN. |
| 3227 | * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing | 3229 | * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing |
| 3228 | * auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH. | 3230 | * auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH. |
| 3229 | * @WIPHY_FLAG_SUPPORTS_SCHED_SCAN: The device supports scheduled scans. | ||
| 3230 | * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the | 3231 | * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the |
| 3231 | * firmware. | 3232 | * firmware. |
| 3232 | * @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP. | 3233 | * @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP. |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 0105445cab83..8e08b6da72f3 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
| @@ -694,9 +694,7 @@ struct tc_cls_matchall_offload { | |||
| 694 | }; | 694 | }; |
| 695 | 695 | ||
| 696 | enum tc_clsbpf_command { | 696 | enum tc_clsbpf_command { |
| 697 | TC_CLSBPF_ADD, | 697 | TC_CLSBPF_OFFLOAD, |
| 698 | TC_CLSBPF_REPLACE, | ||
| 699 | TC_CLSBPF_DESTROY, | ||
| 700 | TC_CLSBPF_STATS, | 698 | TC_CLSBPF_STATS, |
| 701 | }; | 699 | }; |
| 702 | 700 | ||
| @@ -705,6 +703,7 @@ struct tc_cls_bpf_offload { | |||
| 705 | enum tc_clsbpf_command command; | 703 | enum tc_clsbpf_command command; |
| 706 | struct tcf_exts *exts; | 704 | struct tcf_exts *exts; |
| 707 | struct bpf_prog *prog; | 705 | struct bpf_prog *prog; |
| 706 | struct bpf_prog *oldprog; | ||
| 708 | const char *name; | 707 | const char *name; |
| 709 | bool exts_integrated; | 708 | bool exts_integrated; |
| 710 | u32 gen_flags; | 709 | u32 gen_flags; |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 83a3e47d5845..becf86aa4ac6 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
| @@ -179,6 +179,7 @@ struct Qdisc_ops { | |||
| 179 | const struct Qdisc_class_ops *cl_ops; | 179 | const struct Qdisc_class_ops *cl_ops; |
| 180 | char id[IFNAMSIZ]; | 180 | char id[IFNAMSIZ]; |
| 181 | int priv_size; | 181 | int priv_size; |
| 182 | unsigned int static_flags; | ||
| 182 | 183 | ||
| 183 | int (*enqueue)(struct sk_buff *skb, | 184 | int (*enqueue)(struct sk_buff *skb, |
| 184 | struct Qdisc *sch, | 185 | struct Qdisc *sch, |
| @@ -444,6 +445,7 @@ void qdisc_tree_reduce_backlog(struct Qdisc *qdisc, unsigned int n, | |||
| 444 | unsigned int len); | 445 | unsigned int len); |
| 445 | struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, | 446 | struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue, |
| 446 | const struct Qdisc_ops *ops); | 447 | const struct Qdisc_ops *ops); |
| 448 | void qdisc_free(struct Qdisc *qdisc); | ||
| 447 | struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, | 449 | struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, |
| 448 | const struct Qdisc_ops *ops, u32 parentid); | 450 | const struct Qdisc_ops *ops, u32 parentid); |
| 449 | void __qdisc_calculate_pkt_len(struct sk_buff *skb, | 451 | void __qdisc_calculate_pkt_len(struct sk_buff *skb, |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 2f8f93da5dc2..9a5ccf03a59b 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -966,7 +966,7 @@ void sctp_transport_burst_limited(struct sctp_transport *); | |||
| 966 | void sctp_transport_burst_reset(struct sctp_transport *); | 966 | void sctp_transport_burst_reset(struct sctp_transport *); |
| 967 | unsigned long sctp_transport_timeout(struct sctp_transport *); | 967 | unsigned long sctp_transport_timeout(struct sctp_transport *); |
| 968 | void sctp_transport_reset(struct sctp_transport *t); | 968 | void sctp_transport_reset(struct sctp_transport *t); |
| 969 | void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu); | 969 | bool sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu); |
| 970 | void sctp_transport_immediate_rtx(struct sctp_transport *); | 970 | void sctp_transport_immediate_rtx(struct sctp_transport *); |
| 971 | void sctp_transport_dst_release(struct sctp_transport *t); | 971 | void sctp_transport_dst_release(struct sctp_transport *t); |
| 972 | void sctp_transport_dst_confirm(struct sctp_transport *t); | 972 | void sctp_transport_dst_confirm(struct sctp_transport *t); |
diff --git a/include/net/sock.h b/include/net/sock.h index 9155da422692..7a7b14e9628a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -1514,6 +1514,11 @@ static inline bool sock_owned_by_user(const struct sock *sk) | |||
| 1514 | return sk->sk_lock.owned; | 1514 | return sk->sk_lock.owned; |
| 1515 | } | 1515 | } |
| 1516 | 1516 | ||
| 1517 | static inline bool sock_owned_by_user_nocheck(const struct sock *sk) | ||
| 1518 | { | ||
| 1519 | return sk->sk_lock.owned; | ||
| 1520 | } | ||
| 1521 | |||
| 1517 | /* no reclassification while locks are held */ | 1522 | /* no reclassification while locks are held */ |
| 1518 | static inline bool sock_allow_reclassification(const struct sock *csk) | 1523 | static inline bool sock_allow_reclassification(const struct sock *csk) |
| 1519 | { | 1524 | { |
diff --git a/include/net/tls.h b/include/net/tls.h index 936cfc5cab7d..9185e53a743c 100644 --- a/include/net/tls.h +++ b/include/net/tls.h | |||
| @@ -170,7 +170,7 @@ static inline bool tls_is_pending_open_record(struct tls_context *tls_ctx) | |||
| 170 | 170 | ||
| 171 | static inline void tls_err_abort(struct sock *sk) | 171 | static inline void tls_err_abort(struct sock *sk) |
| 172 | { | 172 | { |
| 173 | sk->sk_err = -EBADMSG; | 173 | sk->sk_err = EBADMSG; |
| 174 | sk->sk_error_report(sk); | 174 | sk->sk_error_report(sk); |
| 175 | } | 175 | } |
| 176 | 176 | ||
diff --git a/include/net/vxlan.h b/include/net/vxlan.h index 13223396dc64..f96391e84a8a 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h | |||
| @@ -146,7 +146,7 @@ struct vxlanhdr_gpe { | |||
| 146 | np_applied:1, | 146 | np_applied:1, |
| 147 | instance_applied:1, | 147 | instance_applied:1, |
| 148 | version:2, | 148 | version:2, |
| 149 | reserved_flags2:2; | 149 | reserved_flags2:2; |
| 150 | #elif defined(__BIG_ENDIAN_BITFIELD) | 150 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 151 | u8 reserved_flags2:2, | 151 | u8 reserved_flags2:2, |
| 152 | version:2, | 152 | version:2, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index dc28a98ce97c..ae35991b5877 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -1570,6 +1570,9 @@ int xfrm_init_state(struct xfrm_state *x); | |||
| 1570 | int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb); | 1570 | int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb); |
| 1571 | int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type); | 1571 | int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type); |
| 1572 | int xfrm_input_resume(struct sk_buff *skb, int nexthdr); | 1572 | int xfrm_input_resume(struct sk_buff *skb, int nexthdr); |
| 1573 | int xfrm_trans_queue(struct sk_buff *skb, | ||
| 1574 | int (*finish)(struct net *, struct sock *, | ||
| 1575 | struct sk_buff *)); | ||
| 1573 | int xfrm_output_resume(struct sk_buff *skb, int err); | 1576 | int xfrm_output_resume(struct sk_buff *skb, int err); |
| 1574 | int xfrm_output(struct sock *sk, struct sk_buff *skb); | 1577 | int xfrm_output(struct sock *sk, struct sk_buff *skb); |
| 1575 | int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb); | 1578 | int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb); |
diff --git a/include/trace/events/clk.h b/include/trace/events/clk.h index 758607226bfd..2cd449328aee 100644 --- a/include/trace/events/clk.h +++ b/include/trace/events/clk.h | |||
| @@ -134,12 +134,12 @@ DECLARE_EVENT_CLASS(clk_parent, | |||
| 134 | 134 | ||
| 135 | TP_STRUCT__entry( | 135 | TP_STRUCT__entry( |
| 136 | __string( name, core->name ) | 136 | __string( name, core->name ) |
| 137 | __string( pname, parent->name ) | 137 | __string( pname, parent ? parent->name : "none" ) |
| 138 | ), | 138 | ), |
| 139 | 139 | ||
| 140 | TP_fast_assign( | 140 | TP_fast_assign( |
| 141 | __assign_str(name, core->name); | 141 | __assign_str(name, core->name); |
| 142 | __assign_str(pname, parent->name); | 142 | __assign_str(pname, parent ? parent->name : "none"); |
| 143 | ), | 143 | ), |
| 144 | 144 | ||
| 145 | TP_printk("%s %s", __get_str(name), __get_str(pname)) | 145 | TP_printk("%s %s", __get_str(name), __get_str(pname)) |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index e4b0b8e09932..2c735a3e6613 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
| @@ -211,7 +211,7 @@ TRACE_EVENT(kvm_ack_irq, | |||
| 211 | { KVM_TRACE_MMIO_WRITE, "write" } | 211 | { KVM_TRACE_MMIO_WRITE, "write" } |
| 212 | 212 | ||
| 213 | TRACE_EVENT(kvm_mmio, | 213 | TRACE_EVENT(kvm_mmio, |
| 214 | TP_PROTO(int type, int len, u64 gpa, u64 val), | 214 | TP_PROTO(int type, int len, u64 gpa, void *val), |
| 215 | TP_ARGS(type, len, gpa, val), | 215 | TP_ARGS(type, len, gpa, val), |
| 216 | 216 | ||
| 217 | TP_STRUCT__entry( | 217 | TP_STRUCT__entry( |
| @@ -225,7 +225,10 @@ TRACE_EVENT(kvm_mmio, | |||
| 225 | __entry->type = type; | 225 | __entry->type = type; |
| 226 | __entry->len = len; | 226 | __entry->len = len; |
| 227 | __entry->gpa = gpa; | 227 | __entry->gpa = gpa; |
| 228 | __entry->val = val; | 228 | __entry->val = 0; |
| 229 | if (val) | ||
| 230 | memcpy(&__entry->val, val, | ||
| 231 | min_t(u32, sizeof(__entry->val), len)); | ||
| 229 | ), | 232 | ), |
| 230 | 233 | ||
| 231 | TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx", | 234 | TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx", |
diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h index 07cccca6cbf1..ab34c561f26b 100644 --- a/include/trace/events/tcp.h +++ b/include/trace/events/tcp.h | |||
| @@ -25,6 +25,35 @@ | |||
| 25 | tcp_state_name(TCP_CLOSING), \ | 25 | tcp_state_name(TCP_CLOSING), \ |
| 26 | tcp_state_name(TCP_NEW_SYN_RECV)) | 26 | tcp_state_name(TCP_NEW_SYN_RECV)) |
| 27 | 27 | ||
| 28 | #define TP_STORE_V4MAPPED(__entry, saddr, daddr) \ | ||
| 29 | do { \ | ||
| 30 | struct in6_addr *pin6; \ | ||
| 31 | \ | ||
| 32 | pin6 = (struct in6_addr *)__entry->saddr_v6; \ | ||
| 33 | ipv6_addr_set_v4mapped(saddr, pin6); \ | ||
| 34 | pin6 = (struct in6_addr *)__entry->daddr_v6; \ | ||
| 35 | ipv6_addr_set_v4mapped(daddr, pin6); \ | ||
| 36 | } while (0) | ||
| 37 | |||
| 38 | #if IS_ENABLED(CONFIG_IPV6) | ||
| 39 | #define TP_STORE_ADDRS(__entry, saddr, daddr, saddr6, daddr6) \ | ||
| 40 | do { \ | ||
| 41 | if (sk->sk_family == AF_INET6) { \ | ||
| 42 | struct in6_addr *pin6; \ | ||
| 43 | \ | ||
| 44 | pin6 = (struct in6_addr *)__entry->saddr_v6; \ | ||
| 45 | *pin6 = saddr6; \ | ||
| 46 | pin6 = (struct in6_addr *)__entry->daddr_v6; \ | ||
| 47 | *pin6 = daddr6; \ | ||
| 48 | } else { \ | ||
| 49 | TP_STORE_V4MAPPED(__entry, saddr, daddr); \ | ||
| 50 | } \ | ||
| 51 | } while (0) | ||
| 52 | #else | ||
| 53 | #define TP_STORE_ADDRS(__entry, saddr, daddr, saddr6, daddr6) \ | ||
| 54 | TP_STORE_V4MAPPED(__entry, saddr, daddr) | ||
| 55 | #endif | ||
| 56 | |||
| 28 | /* | 57 | /* |
| 29 | * tcp event with arguments sk and skb | 58 | * tcp event with arguments sk and skb |
| 30 | * | 59 | * |
| @@ -50,7 +79,6 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb, | |||
| 50 | 79 | ||
| 51 | TP_fast_assign( | 80 | TP_fast_assign( |
| 52 | struct inet_sock *inet = inet_sk(sk); | 81 | struct inet_sock *inet = inet_sk(sk); |
| 53 | struct in6_addr *pin6; | ||
| 54 | __be32 *p32; | 82 | __be32 *p32; |
| 55 | 83 | ||
| 56 | __entry->skbaddr = skb; | 84 | __entry->skbaddr = skb; |
| @@ -65,20 +93,8 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb, | |||
| 65 | p32 = (__be32 *) __entry->daddr; | 93 | p32 = (__be32 *) __entry->daddr; |
| 66 | *p32 = inet->inet_daddr; | 94 | *p32 = inet->inet_daddr; |
| 67 | 95 | ||
| 68 | #if IS_ENABLED(CONFIG_IPV6) | 96 | TP_STORE_ADDRS(__entry, inet->inet_saddr, inet->inet_daddr, |
| 69 | if (sk->sk_family == AF_INET6) { | 97 | sk->sk_v6_rcv_saddr, sk->sk_v6_daddr); |
| 70 | pin6 = (struct in6_addr *)__entry->saddr_v6; | ||
| 71 | *pin6 = sk->sk_v6_rcv_saddr; | ||
| 72 | pin6 = (struct in6_addr *)__entry->daddr_v6; | ||
| 73 | *pin6 = sk->sk_v6_daddr; | ||
| 74 | } else | ||
| 75 | #endif | ||
| 76 | { | ||
| 77 | pin6 = (struct in6_addr *)__entry->saddr_v6; | ||
| 78 | ipv6_addr_set_v4mapped(inet->inet_saddr, pin6); | ||
| 79 | pin6 = (struct in6_addr *)__entry->daddr_v6; | ||
| 80 | ipv6_addr_set_v4mapped(inet->inet_daddr, pin6); | ||
| 81 | } | ||
| 82 | ), | 98 | ), |
| 83 | 99 | ||
| 84 | TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c", | 100 | TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c", |
| @@ -127,7 +143,6 @@ DECLARE_EVENT_CLASS(tcp_event_sk, | |||
| 127 | 143 | ||
| 128 | TP_fast_assign( | 144 | TP_fast_assign( |
| 129 | struct inet_sock *inet = inet_sk(sk); | 145 | struct inet_sock *inet = inet_sk(sk); |
| 130 | struct in6_addr *pin6; | ||
| 131 | __be32 *p32; | 146 | __be32 *p32; |
| 132 | 147 | ||
| 133 | __entry->skaddr = sk; | 148 | __entry->skaddr = sk; |
| @@ -141,20 +156,8 @@ DECLARE_EVENT_CLASS(tcp_event_sk, | |||
| 141 | p32 = (__be32 *) __entry->daddr; | 156 | p32 = (__be32 *) __entry->daddr; |
| 142 | *p32 = inet->inet_daddr; | 157 | *p32 = inet->inet_daddr; |
| 143 | 158 | ||
| 144 | #if IS_ENABLED(CONFIG_IPV6) | 159 | TP_STORE_ADDRS(__entry, inet->inet_saddr, inet->inet_daddr, |
| 145 | if (sk->sk_family == AF_INET6) { | 160 | sk->sk_v6_rcv_saddr, sk->sk_v6_daddr); |
| 146 | pin6 = (struct in6_addr *)__entry->saddr_v6; | ||
| 147 | *pin6 = sk->sk_v6_rcv_saddr; | ||
| 148 | pin6 = (struct in6_addr *)__entry->daddr_v6; | ||
| 149 | *pin6 = sk->sk_v6_daddr; | ||
| 150 | } else | ||
| 151 | #endif | ||
| 152 | { | ||
| 153 | pin6 = (struct in6_addr *)__entry->saddr_v6; | ||
| 154 | ipv6_addr_set_v4mapped(inet->inet_saddr, pin6); | ||
| 155 | pin6 = (struct in6_addr *)__entry->daddr_v6; | ||
| 156 | ipv6_addr_set_v4mapped(inet->inet_daddr, pin6); | ||
| 157 | } | ||
| 158 | ), | 161 | ), |
| 159 | 162 | ||
| 160 | TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c", | 163 | TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c", |
| @@ -197,7 +200,6 @@ TRACE_EVENT(tcp_set_state, | |||
| 197 | 200 | ||
| 198 | TP_fast_assign( | 201 | TP_fast_assign( |
| 199 | struct inet_sock *inet = inet_sk(sk); | 202 | struct inet_sock *inet = inet_sk(sk); |
| 200 | struct in6_addr *pin6; | ||
| 201 | __be32 *p32; | 203 | __be32 *p32; |
| 202 | 204 | ||
| 203 | __entry->skaddr = sk; | 205 | __entry->skaddr = sk; |
| @@ -213,20 +215,8 @@ TRACE_EVENT(tcp_set_state, | |||
| 213 | p32 = (__be32 *) __entry->daddr; | 215 | p32 = (__be32 *) __entry->daddr; |
| 214 | *p32 = inet->inet_daddr; | 216 | *p32 = inet->inet_daddr; |
| 215 | 217 | ||
| 216 | #if IS_ENABLED(CONFIG_IPV6) | 218 | TP_STORE_ADDRS(__entry, inet->inet_saddr, inet->inet_daddr, |
| 217 | if (sk->sk_family == AF_INET6) { | 219 | sk->sk_v6_rcv_saddr, sk->sk_v6_daddr); |
| 218 | pin6 = (struct in6_addr *)__entry->saddr_v6; | ||
| 219 | *pin6 = sk->sk_v6_rcv_saddr; | ||
| 220 | pin6 = (struct in6_addr *)__entry->daddr_v6; | ||
| 221 | *pin6 = sk->sk_v6_daddr; | ||
| 222 | } else | ||
| 223 | #endif | ||
| 224 | { | ||
| 225 | pin6 = (struct in6_addr *)__entry->saddr_v6; | ||
| 226 | ipv6_addr_set_v4mapped(inet->inet_saddr, pin6); | ||
| 227 | pin6 = (struct in6_addr *)__entry->daddr_v6; | ||
| 228 | ipv6_addr_set_v4mapped(inet->inet_daddr, pin6); | ||
| 229 | } | ||
| 230 | ), | 220 | ), |
| 231 | 221 | ||
| 232 | TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c oldstate=%s newstate=%s", | 222 | TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c oldstate=%s newstate=%s", |
| @@ -256,7 +246,6 @@ TRACE_EVENT(tcp_retransmit_synack, | |||
| 256 | 246 | ||
| 257 | TP_fast_assign( | 247 | TP_fast_assign( |
| 258 | struct inet_request_sock *ireq = inet_rsk(req); | 248 | struct inet_request_sock *ireq = inet_rsk(req); |
| 259 | struct in6_addr *pin6; | ||
| 260 | __be32 *p32; | 249 | __be32 *p32; |
| 261 | 250 | ||
| 262 | __entry->skaddr = sk; | 251 | __entry->skaddr = sk; |
| @@ -271,20 +260,8 @@ TRACE_EVENT(tcp_retransmit_synack, | |||
| 271 | p32 = (__be32 *) __entry->daddr; | 260 | p32 = (__be32 *) __entry->daddr; |
| 272 | *p32 = ireq->ir_rmt_addr; | 261 | *p32 = ireq->ir_rmt_addr; |
| 273 | 262 | ||
| 274 | #if IS_ENABLED(CONFIG_IPV6) | 263 | TP_STORE_ADDRS(__entry, ireq->ir_loc_addr, ireq->ir_rmt_addr, |
| 275 | if (sk->sk_family == AF_INET6) { | 264 | ireq->ir_v6_loc_addr, ireq->ir_v6_rmt_addr); |
| 276 | pin6 = (struct in6_addr *)__entry->saddr_v6; | ||
| 277 | *pin6 = ireq->ir_v6_loc_addr; | ||
| 278 | pin6 = (struct in6_addr *)__entry->daddr_v6; | ||
| 279 | *pin6 = ireq->ir_v6_rmt_addr; | ||
| 280 | } else | ||
| 281 | #endif | ||
| 282 | { | ||
| 283 | pin6 = (struct in6_addr *)__entry->saddr_v6; | ||
| 284 | ipv6_addr_set_v4mapped(ireq->ir_loc_addr, pin6); | ||
| 285 | pin6 = (struct in6_addr *)__entry->daddr_v6; | ||
| 286 | ipv6_addr_set_v4mapped(ireq->ir_rmt_addr, pin6); | ||
| 287 | } | ||
| 288 | ), | 265 | ), |
| 289 | 266 | ||
| 290 | TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c", | 267 | TP_printk("sport=%hu dport=%hu saddr=%pI4 daddr=%pI4 saddrv6=%pI6c daddrv6=%pI6c", |
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 3ee3bf7c8526..144de4d2f385 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #define _UAPI_LINUX_IF_ETHER_H | 23 | #define _UAPI_LINUX_IF_ETHER_H |
| 24 | 24 | ||
| 25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
| 26 | #include <linux/libc-compat.h> | ||
| 26 | 27 | ||
| 27 | /* | 28 | /* |
| 28 | * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble | 29 | * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble |
| @@ -149,11 +150,13 @@ | |||
| 149 | * This is an Ethernet frame header. | 150 | * This is an Ethernet frame header. |
| 150 | */ | 151 | */ |
| 151 | 152 | ||
| 153 | #if __UAPI_DEF_ETHHDR | ||
| 152 | struct ethhdr { | 154 | struct ethhdr { |
| 153 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ | 155 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
| 154 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ | 156 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
| 155 | __be16 h_proto; /* packet type ID field */ | 157 | __be16 h_proto; /* packet type ID field */ |
| 156 | } __attribute__((packed)); | 158 | } __attribute__((packed)); |
| 159 | #endif | ||
| 157 | 160 | ||
| 158 | 161 | ||
| 159 | #endif /* _UAPI_LINUX_IF_ETHER_H */ | 162 | #endif /* _UAPI_LINUX_IF_ETHER_H */ |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 496e59a2738b..8fb90a0819c3 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -932,6 +932,8 @@ struct kvm_ppc_resize_hpt { | |||
| 932 | #define KVM_CAP_HYPERV_SYNIC2 148 | 932 | #define KVM_CAP_HYPERV_SYNIC2 148 |
| 933 | #define KVM_CAP_HYPERV_VP_INDEX 149 | 933 | #define KVM_CAP_HYPERV_VP_INDEX 149 |
| 934 | #define KVM_CAP_S390_AIS_MIGRATION 150 | 934 | #define KVM_CAP_S390_AIS_MIGRATION 150 |
| 935 | #define KVM_CAP_PPC_GET_CPU_CHAR 151 | ||
| 936 | #define KVM_CAP_S390_BPB 152 | ||
| 935 | 937 | ||
| 936 | #ifdef KVM_CAP_IRQ_ROUTING | 938 | #ifdef KVM_CAP_IRQ_ROUTING |
| 937 | 939 | ||
| @@ -1261,6 +1263,8 @@ struct kvm_s390_ucas_mapping { | |||
| 1261 | #define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg) | 1263 | #define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg) |
| 1262 | /* Available with KVM_CAP_PPC_RADIX_MMU */ | 1264 | /* Available with KVM_CAP_PPC_RADIX_MMU */ |
| 1263 | #define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info) | 1265 | #define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info) |
| 1266 | /* Available with KVM_CAP_PPC_GET_CPU_CHAR */ | ||
| 1267 | #define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char) | ||
| 1264 | 1268 | ||
| 1265 | /* ioctl for vm fd */ | 1269 | /* ioctl for vm fd */ |
| 1266 | #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device) | 1270 | #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device) |
diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h index 282875cf8056..fc29efaa918c 100644 --- a/include/uapi/linux/libc-compat.h +++ b/include/uapi/linux/libc-compat.h | |||
| @@ -168,47 +168,106 @@ | |||
| 168 | 168 | ||
| 169 | /* If we did not see any headers from any supported C libraries, | 169 | /* If we did not see any headers from any supported C libraries, |
| 170 | * or we are being included in the kernel, then define everything | 170 | * or we are being included in the kernel, then define everything |
| 171 | * that we need. */ | 171 | * that we need. Check for previous __UAPI_* definitions to give |
| 172 | * unsupported C libraries a way to opt out of any kernel definition. */ | ||
| 172 | #else /* !defined(__GLIBC__) */ | 173 | #else /* !defined(__GLIBC__) */ |
| 173 | 174 | ||
| 174 | /* Definitions for if.h */ | 175 | /* Definitions for if.h */ |
| 176 | #ifndef __UAPI_DEF_IF_IFCONF | ||
| 175 | #define __UAPI_DEF_IF_IFCONF 1 | 177 | #define __UAPI_DEF_IF_IFCONF 1 |
| 178 | #endif | ||
| 179 | #ifndef __UAPI_DEF_IF_IFMAP | ||
| 176 | #define __UAPI_DEF_IF_IFMAP 1 | 180 | #define __UAPI_DEF_IF_IFMAP 1 |
| 181 | #endif | ||
| 182 | #ifndef __UAPI_DEF_IF_IFNAMSIZ | ||
| 177 | #define __UAPI_DEF_IF_IFNAMSIZ 1 | 183 | #define __UAPI_DEF_IF_IFNAMSIZ 1 |
| 184 | #endif | ||
| 185 | #ifndef __UAPI_DEF_IF_IFREQ | ||
| 178 | #define __UAPI_DEF_IF_IFREQ 1 | 186 | #define __UAPI_DEF_IF_IFREQ 1 |
| 187 | #endif | ||
| 179 | /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ | 188 | /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ |
| 189 | #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS | ||
| 180 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 | 190 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 |
| 191 | #endif | ||
| 181 | /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ | 192 | /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ |
| 193 | #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO | ||
| 182 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 | 194 | #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 |
| 195 | #endif | ||
| 183 | 196 | ||
| 184 | /* Definitions for in.h */ | 197 | /* Definitions for in.h */ |
| 198 | #ifndef __UAPI_DEF_IN_ADDR | ||
| 185 | #define __UAPI_DEF_IN_ADDR 1 | 199 | #define __UAPI_DEF_IN_ADDR 1 |
| 200 | #endif | ||
| 201 | #ifndef __UAPI_DEF_IN_IPPROTO | ||
| 186 | #define __UAPI_DEF_IN_IPPROTO 1 | 202 | #define __UAPI_DEF_IN_IPPROTO 1 |
| 203 | #endif | ||
| 204 | #ifndef __UAPI_DEF_IN_PKTINFO | ||
| 187 | #define __UAPI_DEF_IN_PKTINFO 1 | 205 | #define __UAPI_DEF_IN_PKTINFO 1 |
| 206 | #endif | ||
| 207 | #ifndef __UAPI_DEF_IP_MREQ | ||
| 188 | #define __UAPI_DEF_IP_MREQ 1 | 208 | #define __UAPI_DEF_IP_MREQ 1 |
| 209 | #endif | ||
| 210 | #ifndef __UAPI_DEF_SOCKADDR_IN | ||
| 189 | #define __UAPI_DEF_SOCKADDR_IN 1 | 211 | #define __UAPI_DEF_SOCKADDR_IN 1 |
| 212 | #endif | ||
| 213 | #ifndef __UAPI_DEF_IN_CLASS | ||
| 190 | #define __UAPI_DEF_IN_CLASS 1 | 214 | #define __UAPI_DEF_IN_CLASS 1 |
| 215 | #endif | ||
| 191 | 216 | ||
| 192 | /* Definitions for in6.h */ | 217 | /* Definitions for in6.h */ |
| 218 | #ifndef __UAPI_DEF_IN6_ADDR | ||
| 193 | #define __UAPI_DEF_IN6_ADDR 1 | 219 | #define __UAPI_DEF_IN6_ADDR 1 |
| 220 | #endif | ||
| 221 | #ifndef __UAPI_DEF_IN6_ADDR_ALT | ||
| 194 | #define __UAPI_DEF_IN6_ADDR_ALT 1 | 222 | #define __UAPI_DEF_IN6_ADDR_ALT 1 |
| 223 | #endif | ||
| 224 | #ifndef __UAPI_DEF_SOCKADDR_IN6 | ||
| 195 | #define __UAPI_DEF_SOCKADDR_IN6 1 | 225 | #define __UAPI_DEF_SOCKADDR_IN6 1 |
| 226 | #endif | ||
| 227 | #ifndef __UAPI_DEF_IPV6_MREQ | ||
| 196 | #define __UAPI_DEF_IPV6_MREQ 1 | 228 | #define __UAPI_DEF_IPV6_MREQ 1 |
| 229 | #endif | ||
| 230 | #ifndef __UAPI_DEF_IPPROTO_V6 | ||
| 197 | #define __UAPI_DEF_IPPROTO_V6 1 | 231 | #define __UAPI_DEF_IPPROTO_V6 1 |
| 232 | #endif | ||
| 233 | #ifndef __UAPI_DEF_IPV6_OPTIONS | ||
| 198 | #define __UAPI_DEF_IPV6_OPTIONS 1 | 234 | #define __UAPI_DEF_IPV6_OPTIONS 1 |
| 235 | #endif | ||
| 236 | #ifndef __UAPI_DEF_IN6_PKTINFO | ||
| 199 | #define __UAPI_DEF_IN6_PKTINFO 1 | 237 | #define __UAPI_DEF_IN6_PKTINFO 1 |
| 238 | #endif | ||
| 239 | #ifndef __UAPI_DEF_IP6_MTUINFO | ||
| 200 | #define __UAPI_DEF_IP6_MTUINFO 1 | 240 | #define __UAPI_DEF_IP6_MTUINFO 1 |
| 241 | #endif | ||
| 201 | 242 | ||
| 202 | /* Definitions for ipx.h */ | 243 | /* Definitions for ipx.h */ |
| 244 | #ifndef __UAPI_DEF_SOCKADDR_IPX | ||
| 203 | #define __UAPI_DEF_SOCKADDR_IPX 1 | 245 | #define __UAPI_DEF_SOCKADDR_IPX 1 |
| 246 | #endif | ||
| 247 | #ifndef __UAPI_DEF_IPX_ROUTE_DEFINITION | ||
| 204 | #define __UAPI_DEF_IPX_ROUTE_DEFINITION 1 | 248 | #define __UAPI_DEF_IPX_ROUTE_DEFINITION 1 |
| 249 | #endif | ||
| 250 | #ifndef __UAPI_DEF_IPX_INTERFACE_DEFINITION | ||
| 205 | #define __UAPI_DEF_IPX_INTERFACE_DEFINITION 1 | 251 | #define __UAPI_DEF_IPX_INTERFACE_DEFINITION 1 |
| 252 | #endif | ||
| 253 | #ifndef __UAPI_DEF_IPX_CONFIG_DATA | ||
| 206 | #define __UAPI_DEF_IPX_CONFIG_DATA 1 | 254 | #define __UAPI_DEF_IPX_CONFIG_DATA 1 |
| 255 | #endif | ||
| 256 | #ifndef __UAPI_DEF_IPX_ROUTE_DEF | ||
| 207 | #define __UAPI_DEF_IPX_ROUTE_DEF 1 | 257 | #define __UAPI_DEF_IPX_ROUTE_DEF 1 |
| 258 | #endif | ||
| 208 | 259 | ||
| 209 | /* Definitions for xattr.h */ | 260 | /* Definitions for xattr.h */ |
| 261 | #ifndef __UAPI_DEF_XATTR | ||
| 210 | #define __UAPI_DEF_XATTR 1 | 262 | #define __UAPI_DEF_XATTR 1 |
| 263 | #endif | ||
| 211 | 264 | ||
| 212 | #endif /* __GLIBC__ */ | 265 | #endif /* __GLIBC__ */ |
| 213 | 266 | ||
| 267 | /* Definitions for if_ether.h */ | ||
| 268 | /* allow libcs like musl to deactivate this, glibc does not implement this. */ | ||
| 269 | #ifndef __UAPI_DEF_ETHHDR | ||
| 270 | #define __UAPI_DEF_ETHHDR 1 | ||
| 271 | #endif | ||
| 272 | |||
| 214 | #endif /* _UAPI_LIBC_COMPAT_H */ | 273 | #endif /* _UAPI_LIBC_COMPAT_H */ |
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h index 3fea7709a441..57ccfb32e87f 100644 --- a/include/uapi/linux/netfilter/nf_conntrack_common.h +++ b/include/uapi/linux/netfilter/nf_conntrack_common.h | |||
| @@ -36,7 +36,7 @@ enum ip_conntrack_info { | |||
| 36 | 36 | ||
| 37 | #define NF_CT_STATE_INVALID_BIT (1 << 0) | 37 | #define NF_CT_STATE_INVALID_BIT (1 << 0) |
| 38 | #define NF_CT_STATE_BIT(ctinfo) (1 << ((ctinfo) % IP_CT_IS_REPLY + 1)) | 38 | #define NF_CT_STATE_BIT(ctinfo) (1 << ((ctinfo) % IP_CT_IS_REPLY + 1)) |
| 39 | #define NF_CT_STATE_UNTRACKED_BIT (1 << (IP_CT_UNTRACKED + 1)) | 39 | #define NF_CT_STATE_UNTRACKED_BIT (1 << 6) |
| 40 | 40 | ||
| 41 | /* Bitset representing status of connection. */ | 41 | /* Bitset representing status of connection. */ |
| 42 | enum ip_conntrack_status { | 42 | enum ip_conntrack_status { |
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 4265d7f9e1f2..dcfab5e3b55c 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -363,7 +363,6 @@ enum ovs_tunnel_key_attr { | |||
| 363 | OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */ | 363 | OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */ |
| 364 | OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ | 364 | OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */ |
| 365 | OVS_TUNNEL_KEY_ATTR_PAD, | 365 | OVS_TUNNEL_KEY_ATTR_PAD, |
| 366 | OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* be32 ERSPAN index. */ | ||
| 367 | __OVS_TUNNEL_KEY_ATTR_MAX | 366 | __OVS_TUNNEL_KEY_ATTR_MAX |
| 368 | }; | 367 | }; |
| 369 | 368 | ||
diff --git a/include/xen/balloon.h b/include/xen/balloon.h index 4914b93a23f2..61f410fd74e4 100644 --- a/include/xen/balloon.h +++ b/include/xen/balloon.h | |||
| @@ -44,3 +44,8 @@ static inline void xen_balloon_init(void) | |||
| 44 | { | 44 | { |
| 45 | } | 45 | } |
| 46 | #endif | 46 | #endif |
| 47 | |||
| 48 | #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG | ||
| 49 | struct resource; | ||
| 50 | void arch_xen_balloon_init(struct resource *hostmem_resource); | ||
| 51 | #endif | ||
