diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 06:27:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 06:27:18 -0400 |
commit | 4958134df54c2c84e9c22ea042761d439164d26e (patch) | |
tree | 503177afab11f7d25b12a84ce25b481d305c51ba /include | |
parent | c4f528795d1add8b63652673f7262729f679c6c1 (diff) | |
parent | c698ca5278934c0ae32297a8725ced2e27585d7f (diff) |
Merge 4.16-rc6 into tty-next
We want the serial/tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
35 files changed, 198 insertions, 95 deletions
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index d32b688eb346..d23dcdd1bd95 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h | |||
@@ -56,6 +56,7 @@ struct drm_printer; | |||
56 | #define DRIVER_ATOMIC 0x10000 | 56 | #define DRIVER_ATOMIC 0x10000 |
57 | #define DRIVER_KMS_LEGACY_CONTEXT 0x20000 | 57 | #define DRIVER_KMS_LEGACY_CONTEXT 0x20000 |
58 | #define DRIVER_SYNCOBJ 0x40000 | 58 | #define DRIVER_SYNCOBJ 0x40000 |
59 | #define DRIVER_PREFER_XBGR_30BPP 0x80000 | ||
59 | 60 | ||
60 | /** | 61 | /** |
61 | * struct drm_driver - DRM driver structure | 62 | * struct drm_driver - DRM driver structure |
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index cdbd142ca7f2..02924ae2527e 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h | |||
@@ -360,6 +360,7 @@ void kvm_vgic_put(struct kvm_vcpu *vcpu); | |||
360 | bool kvm_vcpu_has_pending_irqs(struct kvm_vcpu *vcpu); | 360 | bool kvm_vcpu_has_pending_irqs(struct kvm_vcpu *vcpu); |
361 | void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu); | 361 | void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu); |
362 | void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu); | 362 | void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu); |
363 | void kvm_vgic_reset_mapped_irq(struct kvm_vcpu *vcpu, u32 vintid); | ||
363 | 364 | ||
364 | void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg); | 365 | void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg); |
365 | 366 | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index d0eb659fa733..ce547a25e8ae 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -511,6 +511,7 @@ void zero_fill_bio(struct bio *bio); | |||
511 | extern struct bio_vec *bvec_alloc(gfp_t, int, unsigned long *, mempool_t *); | 511 | extern struct bio_vec *bvec_alloc(gfp_t, int, unsigned long *, mempool_t *); |
512 | extern void bvec_free(mempool_t *, struct bio_vec *, unsigned int); | 512 | extern void bvec_free(mempool_t *, struct bio_vec *, unsigned int); |
513 | extern unsigned int bvec_nr_vecs(unsigned short idx); | 513 | extern unsigned int bvec_nr_vecs(unsigned short idx); |
514 | extern const char *bio_devname(struct bio *bio, char *buffer); | ||
514 | 515 | ||
515 | #define bio_set_dev(bio, bdev) \ | 516 | #define bio_set_dev(bio, bdev) \ |
516 | do { \ | 517 | do { \ |
@@ -529,9 +530,6 @@ do { \ | |||
529 | #define bio_dev(bio) \ | 530 | #define bio_dev(bio) \ |
530 | disk_devt((bio)->bi_disk) | 531 | disk_devt((bio)->bi_disk) |
531 | 532 | ||
532 | #define bio_devname(bio, buf) \ | ||
533 | __bdevname(bio_dev(bio), (buf)) | ||
534 | |||
535 | #ifdef CONFIG_BLK_CGROUP | 533 | #ifdef CONFIG_BLK_CGROUP |
536 | int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css); | 534 | int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css); |
537 | void bio_disassociate_task(struct bio *bio); | 535 | void bio_disassociate_task(struct bio *bio); |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 8a9643857c4a..16c3027074a2 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/if.h> | 17 | #include <linux/if.h> |
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
19 | #include <linux/aio_abi.h> /* for aio_context_t */ | 19 | #include <linux/aio_abi.h> /* for aio_context_t */ |
20 | #include <linux/uaccess.h> | ||
20 | #include <linux/unistd.h> | 21 | #include <linux/unistd.h> |
21 | 22 | ||
22 | #include <asm/compat.h> | 23 | #include <asm/compat.h> |
@@ -229,13 +230,13 @@ typedef struct compat_siginfo { | |||
229 | short int _addr_lsb; /* Valid LSB of the reported address. */ | 230 | short int _addr_lsb; /* Valid LSB of the reported address. */ |
230 | /* used when si_code=SEGV_BNDERR */ | 231 | /* used when si_code=SEGV_BNDERR */ |
231 | struct { | 232 | struct { |
232 | short _dummy_bnd; | 233 | compat_uptr_t _dummy_bnd; |
233 | compat_uptr_t _lower; | 234 | compat_uptr_t _lower; |
234 | compat_uptr_t _upper; | 235 | compat_uptr_t _upper; |
235 | } _addr_bnd; | 236 | } _addr_bnd; |
236 | /* used when si_code=SEGV_PKUERR */ | 237 | /* used when si_code=SEGV_PKUERR */ |
237 | struct { | 238 | struct { |
238 | short _dummy_pkey; | 239 | compat_uptr_t _dummy_pkey; |
239 | u32 _pkey; | 240 | u32 _pkey; |
240 | } _addr_pkey; | 241 | } _addr_pkey; |
241 | }; | 242 | }; |
@@ -550,8 +551,29 @@ asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv, | |||
550 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); | 551 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); |
551 | 552 | ||
552 | extern int get_compat_sigset(sigset_t *set, const compat_sigset_t __user *compat); | 553 | extern int get_compat_sigset(sigset_t *set, const compat_sigset_t __user *compat); |
553 | extern int put_compat_sigset(compat_sigset_t __user *compat, | 554 | |
554 | const sigset_t *set, unsigned int size); | 555 | /* |
556 | * Defined inline such that size can be compile time constant, which avoids | ||
557 | * CONFIG_HARDENED_USERCOPY complaining about copies from task_struct | ||
558 | */ | ||
559 | static inline int | ||
560 | put_compat_sigset(compat_sigset_t __user *compat, const sigset_t *set, | ||
561 | unsigned int size) | ||
562 | { | ||
563 | /* size <= sizeof(compat_sigset_t) <= sizeof(sigset_t) */ | ||
564 | #ifdef __BIG_ENDIAN | ||
565 | compat_sigset_t v; | ||
566 | switch (_NSIG_WORDS) { | ||
567 | case 4: v.sig[7] = (set->sig[3] >> 32); v.sig[6] = set->sig[3]; | ||
568 | case 3: v.sig[5] = (set->sig[2] >> 32); v.sig[4] = set->sig[2]; | ||
569 | case 2: v.sig[3] = (set->sig[1] >> 32); v.sig[2] = set->sig[1]; | ||
570 | case 1: v.sig[1] = (set->sig[0] >> 32); v.sig[0] = set->sig[0]; | ||
571 | } | ||
572 | return copy_to_user(compat, &v, size) ? -EFAULT : 0; | ||
573 | #else | ||
574 | return copy_to_user(compat, set, size) ? -EFAULT : 0; | ||
575 | #endif | ||
576 | } | ||
555 | 577 | ||
556 | asmlinkage long compat_sys_migrate_pages(compat_pid_t pid, | 578 | asmlinkage long compat_sys_migrate_pages(compat_pid_t pid, |
557 | compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes, | 579 | compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes, |
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index d02a4df3f473..d3f264a5b04d 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h | |||
@@ -27,3 +27,8 @@ | |||
27 | #if __has_feature(address_sanitizer) | 27 | #if __has_feature(address_sanitizer) |
28 | #define __SANITIZE_ADDRESS__ | 28 | #define __SANITIZE_ADDRESS__ |
29 | #endif | 29 | #endif |
30 | |||
31 | /* Clang doesn't have a way to turn it off per-function, yet. */ | ||
32 | #ifdef __noretpoline | ||
33 | #undef __noretpoline | ||
34 | #endif | ||
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 901c1ccb3374..e2c7f4369eff 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -93,6 +93,10 @@ | |||
93 | #define __weak __attribute__((weak)) | 93 | #define __weak __attribute__((weak)) |
94 | #define __alias(symbol) __attribute__((alias(#symbol))) | 94 | #define __alias(symbol) __attribute__((alias(#symbol))) |
95 | 95 | ||
96 | #ifdef RETPOLINE | ||
97 | #define __noretpoline __attribute__((indirect_branch("keep"))) | ||
98 | #endif | ||
99 | |||
96 | /* | 100 | /* |
97 | * it doesn't make sense on ARM (currently the only user of __naked) | 101 | * it doesn't make sense on ARM (currently the only user of __naked) |
98 | * to trace naked functions because then mcount is called without | 102 | * to trace naked functions because then mcount is called without |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2a815560fda0..c6baf767619e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1317,6 +1317,7 @@ extern int send_sigurg(struct fown_struct *fown); | |||
1317 | #define SB_I_CGROUPWB 0x00000001 /* cgroup-aware writeback enabled */ | 1317 | #define SB_I_CGROUPWB 0x00000001 /* cgroup-aware writeback enabled */ |
1318 | #define SB_I_NOEXEC 0x00000002 /* Ignore executables on this fs */ | 1318 | #define SB_I_NOEXEC 0x00000002 /* Ignore executables on this fs */ |
1319 | #define SB_I_NODEV 0x00000004 /* Ignore devices on this fs */ | 1319 | #define SB_I_NODEV 0x00000004 /* Ignore devices on this fs */ |
1320 | #define SB_I_MULTIROOT 0x00000008 /* Multiple roots to the dentry tree */ | ||
1320 | 1321 | ||
1321 | /* sb->s_iflags to limit user namespace mounts */ | 1322 | /* sb->s_iflags to limit user namespace mounts */ |
1322 | #define SB_I_USERNS_VISIBLE 0x00000010 /* fstype already mounted */ | 1323 | #define SB_I_USERNS_VISIBLE 0x00000010 /* fstype already mounted */ |
@@ -3198,7 +3199,7 @@ static inline bool vma_is_fsdax(struct vm_area_struct *vma) | |||
3198 | if (!vma_is_dax(vma)) | 3199 | if (!vma_is_dax(vma)) |
3199 | return false; | 3200 | return false; |
3200 | inode = file_inode(vma->vm_file); | 3201 | inode = file_inode(vma->vm_file); |
3201 | if (inode->i_mode == S_IFCHR) | 3202 | if (S_ISCHR(inode->i_mode)) |
3202 | return false; /* device-dax */ | 3203 | return false; /* device-dax */ |
3203 | return true; | 3204 | return true; |
3204 | } | 3205 | } |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 5e3531027b51..c826b0b5232a 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -198,6 +198,7 @@ struct gendisk { | |||
198 | void *private_data; | 198 | void *private_data; |
199 | 199 | ||
200 | int flags; | 200 | int flags; |
201 | struct rw_semaphore lookup_sem; | ||
201 | struct kobject *slave_dir; | 202 | struct kobject *slave_dir; |
202 | 203 | ||
203 | struct timer_rand_state *random; | 204 | struct timer_rand_state *random; |
@@ -600,8 +601,9 @@ extern void delete_partition(struct gendisk *, int); | |||
600 | extern void printk_all_partitions(void); | 601 | extern void printk_all_partitions(void); |
601 | 602 | ||
602 | extern struct gendisk *__alloc_disk_node(int minors, int node_id); | 603 | extern struct gendisk *__alloc_disk_node(int minors, int node_id); |
603 | extern struct kobject *get_disk(struct gendisk *disk); | 604 | extern struct kobject *get_disk_and_module(struct gendisk *disk); |
604 | extern void put_disk(struct gendisk *disk); | 605 | extern void put_disk(struct gendisk *disk); |
606 | extern void put_disk_and_module(struct gendisk *disk); | ||
605 | extern void blk_register_region(dev_t devt, unsigned long range, | 607 | extern void blk_register_region(dev_t devt, unsigned long range, |
606 | struct module *module, | 608 | struct module *module, |
607 | struct kobject *(*probe)(dev_t, int *, void *), | 609 | struct kobject *(*probe)(dev_t, int *, void *), |
diff --git a/include/linux/init.h b/include/linux/init.h index 506a98151131..bc27cf03c41e 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -6,10 +6,10 @@ | |||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | 7 | ||
8 | /* Built-in __init functions needn't be compiled with retpoline */ | 8 | /* Built-in __init functions needn't be compiled with retpoline */ |
9 | #if defined(RETPOLINE) && !defined(MODULE) | 9 | #if defined(__noretpoline) && !defined(MODULE) |
10 | #define __noretpoline __attribute__((indirect_branch("keep"))) | 10 | #define __noinitretpoline __noretpoline |
11 | #else | 11 | #else |
12 | #define __noretpoline | 12 | #define __noinitretpoline |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | /* These macros are used to mark some functions or | 15 | /* These macros are used to mark some functions or |
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | /* These are for everybody (although not all archs will actually | 48 | /* These are for everybody (although not all archs will actually |
49 | discard it in modules) */ | 49 | discard it in modules) */ |
50 | #define __init __section(.init.text) __cold __latent_entropy __noretpoline | 50 | #define __init __section(.init.text) __cold __latent_entropy __noinitretpoline |
51 | #define __initdata __section(.init.data) | 51 | #define __initdata __section(.init.data) |
52 | #define __initconst __section(.init.rodata) | 52 | #define __initconst __section(.init.rodata) |
53 | #define __exitdata __section(.exit.data) | 53 | #define __exitdata __section(.exit.data) |
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index c00c4c33e432..b26eccc78fb1 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h | |||
@@ -503,6 +503,7 @@ | |||
503 | 503 | ||
504 | #define ICH_HCR_EN (1 << 0) | 504 | #define ICH_HCR_EN (1 << 0) |
505 | #define ICH_HCR_UIE (1 << 1) | 505 | #define ICH_HCR_UIE (1 << 1) |
506 | #define ICH_HCR_NPIE (1 << 3) | ||
506 | #define ICH_HCR_TC (1 << 10) | 507 | #define ICH_HCR_TC (1 << 10) |
507 | #define ICH_HCR_TALL0 (1 << 11) | 508 | #define ICH_HCR_TALL0 (1 << 11) |
508 | #define ICH_HCR_TALL1 (1 << 12) | 509 | #define ICH_HCR_TALL1 (1 << 12) |
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h index d3453ee072fc..68d8b1f73682 100644 --- a/include/linux/irqchip/arm-gic.h +++ b/include/linux/irqchip/arm-gic.h | |||
@@ -84,6 +84,7 @@ | |||
84 | 84 | ||
85 | #define GICH_HCR_EN (1 << 0) | 85 | #define GICH_HCR_EN (1 << 0) |
86 | #define GICH_HCR_UIE (1 << 1) | 86 | #define GICH_HCR_UIE (1 << 1) |
87 | #define GICH_HCR_NPIE (1 << 3) | ||
87 | 88 | ||
88 | #define GICH_LR_VIRTUALID (0x3ff << 0) | 89 | #define GICH_LR_VIRTUALID (0x3ff << 0) |
89 | #define GICH_LR_PHYSID_CPUID_SHIFT (10) | 90 | #define GICH_LR_PHYSID_CPUID_SHIFT (10) |
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index b6a29c126cc4..2168cc6b8b30 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
@@ -151,6 +151,7 @@ extern struct jump_entry __start___jump_table[]; | |||
151 | extern struct jump_entry __stop___jump_table[]; | 151 | extern struct jump_entry __stop___jump_table[]; |
152 | 152 | ||
153 | extern void jump_label_init(void); | 153 | extern void jump_label_init(void); |
154 | extern void jump_label_invalidate_init(void); | ||
154 | extern void jump_label_lock(void); | 155 | extern void jump_label_lock(void); |
155 | extern void jump_label_unlock(void); | 156 | extern void jump_label_unlock(void); |
156 | extern void arch_jump_label_transform(struct jump_entry *entry, | 157 | extern void arch_jump_label_transform(struct jump_entry *entry, |
@@ -198,6 +199,8 @@ static __always_inline void jump_label_init(void) | |||
198 | static_key_initialized = true; | 199 | static_key_initialized = true; |
199 | } | 200 | } |
200 | 201 | ||
202 | static inline void jump_label_invalidate_init(void) {} | ||
203 | |||
201 | static __always_inline bool static_key_false(struct static_key *key) | 204 | static __always_inline bool static_key_false(struct static_key *key) |
202 | { | 205 | { |
203 | if (unlikely(static_key_count(key) > 0)) | 206 | if (unlikely(static_key_count(key) > 0)) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ce51455e2adf..3fd291503576 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -472,6 +472,7 @@ extern bool parse_option_str(const char *str, const char *option); | |||
472 | extern char *next_arg(char *args, char **param, char **val); | 472 | extern char *next_arg(char *args, char **param, char **val); |
473 | 473 | ||
474 | extern int core_kernel_text(unsigned long addr); | 474 | extern int core_kernel_text(unsigned long addr); |
475 | extern int init_kernel_text(unsigned long addr); | ||
475 | extern int core_kernel_data(unsigned long addr); | 476 | extern int core_kernel_data(unsigned long addr); |
476 | extern int __kernel_text_address(unsigned long addr); | 477 | extern int __kernel_text_address(unsigned long addr); |
477 | extern int kernel_text_address(unsigned long addr); | 478 | extern int kernel_text_address(unsigned long addr); |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ac0062b74aed..6930c63126c7 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -1105,7 +1105,6 @@ static inline void kvm_irq_routing_update(struct kvm *kvm) | |||
1105 | { | 1105 | { |
1106 | } | 1106 | } |
1107 | #endif | 1107 | #endif |
1108 | void kvm_arch_irq_routing_update(struct kvm *kvm); | ||
1109 | 1108 | ||
1110 | static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) | 1109 | static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) |
1111 | { | 1110 | { |
@@ -1114,6 +1113,8 @@ static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) | |||
1114 | 1113 | ||
1115 | #endif /* CONFIG_HAVE_KVM_EVENTFD */ | 1114 | #endif /* CONFIG_HAVE_KVM_EVENTFD */ |
1116 | 1115 | ||
1116 | void kvm_arch_irq_routing_update(struct kvm *kvm); | ||
1117 | |||
1117 | static inline void kvm_make_request(int req, struct kvm_vcpu *vcpu) | 1118 | static inline void kvm_make_request(int req, struct kvm_vcpu *vcpu) |
1118 | { | 1119 | { |
1119 | /* | 1120 | /* |
@@ -1272,4 +1273,7 @@ static inline long kvm_arch_vcpu_async_ioctl(struct file *filp, | |||
1272 | } | 1273 | } |
1273 | #endif /* CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL */ | 1274 | #endif /* CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL */ |
1274 | 1275 | ||
1276 | void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm, | ||
1277 | unsigned long start, unsigned long end); | ||
1278 | |||
1275 | #endif | 1279 | #endif |
diff --git a/include/linux/nospec.h b/include/linux/nospec.h index fbc98e2c8228..e791ebc65c9c 100644 --- a/include/linux/nospec.h +++ b/include/linux/nospec.h | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #ifndef _LINUX_NOSPEC_H | 6 | #ifndef _LINUX_NOSPEC_H |
7 | #define _LINUX_NOSPEC_H | 7 | #define _LINUX_NOSPEC_H |
8 | #include <asm/barrier.h> | ||
8 | 9 | ||
9 | /** | 10 | /** |
10 | * array_index_mask_nospec() - generate a ~0 mask when index < size, 0 otherwise | 11 | * array_index_mask_nospec() - generate a ~0 mask when index < size, 0 otherwise |
@@ -30,26 +31,6 @@ static inline unsigned long array_index_mask_nospec(unsigned long index, | |||
30 | #endif | 31 | #endif |
31 | 32 | ||
32 | /* | 33 | /* |
33 | * Warn developers about inappropriate array_index_nospec() usage. | ||
34 | * | ||
35 | * Even if the CPU speculates past the WARN_ONCE branch, the | ||
36 | * sign bit of @index is taken into account when generating the | ||
37 | * mask. | ||
38 | * | ||
39 | * This warning is compiled out when the compiler can infer that | ||
40 | * @index and @size are less than LONG_MAX. | ||
41 | */ | ||
42 | #define array_index_mask_nospec_check(index, size) \ | ||
43 | ({ \ | ||
44 | if (WARN_ONCE(index > LONG_MAX || size > LONG_MAX, \ | ||
45 | "array_index_nospec() limited to range of [0, LONG_MAX]\n")) \ | ||
46 | _mask = 0; \ | ||
47 | else \ | ||
48 | _mask = array_index_mask_nospec(index, size); \ | ||
49 | _mask; \ | ||
50 | }) | ||
51 | |||
52 | /* | ||
53 | * array_index_nospec - sanitize an array index after a bounds check | 34 | * array_index_nospec - sanitize an array index after a bounds check |
54 | * | 35 | * |
55 | * For a code sequence like: | 36 | * For a code sequence like: |
@@ -67,12 +48,11 @@ static inline unsigned long array_index_mask_nospec(unsigned long index, | |||
67 | ({ \ | 48 | ({ \ |
68 | typeof(index) _i = (index); \ | 49 | typeof(index) _i = (index); \ |
69 | typeof(size) _s = (size); \ | 50 | typeof(size) _s = (size); \ |
70 | unsigned long _mask = array_index_mask_nospec_check(_i, _s); \ | 51 | unsigned long _mask = array_index_mask_nospec(_i, _s); \ |
71 | \ | 52 | \ |
72 | BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \ | 53 | BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \ |
73 | BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \ | 54 | BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \ |
74 | \ | 55 | \ |
75 | _i &= _mask; \ | 56 | (typeof(_i)) (_i & _mask); \ |
76 | _i; \ | ||
77 | }) | 57 | }) |
78 | #endif /* _LINUX_NOSPEC_H */ | 58 | #endif /* _LINUX_NOSPEC_H */ |
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h index 88865e0ebf4d..091033a6b836 100644 --- a/include/linux/of_pci.h +++ b/include/linux/of_pci.h | |||
@@ -13,7 +13,6 @@ struct device_node; | |||
13 | struct device_node *of_pci_find_child_device(struct device_node *parent, | 13 | struct device_node *of_pci_find_child_device(struct device_node *parent, |
14 | unsigned int devfn); | 14 | unsigned int devfn); |
15 | int of_pci_get_devfn(struct device_node *np); | 15 | int of_pci_get_devfn(struct device_node *np); |
16 | int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); | ||
17 | int of_pci_parse_bus_range(struct device_node *node, struct resource *res); | 16 | int of_pci_parse_bus_range(struct device_node *node, struct resource *res); |
18 | int of_get_pci_domain_nr(struct device_node *node); | 17 | int of_get_pci_domain_nr(struct device_node *node); |
19 | int of_pci_get_max_link_speed(struct device_node *node); | 18 | int of_pci_get_max_link_speed(struct device_node *node); |
@@ -34,12 +33,6 @@ static inline int of_pci_get_devfn(struct device_node *np) | |||
34 | } | 33 | } |
35 | 34 | ||
36 | static inline int | 35 | static inline int |
37 | of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin) | ||
38 | { | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | static inline int | ||
43 | of_pci_parse_bus_range(struct device_node *node, struct resource *res) | 36 | of_pci_parse_bus_range(struct device_node *node, struct resource *res) |
44 | { | 37 | { |
45 | return -EINVAL; | 38 | return -EINVAL; |
@@ -67,6 +60,16 @@ of_pci_get_max_link_speed(struct device_node *node) | |||
67 | static inline void of_pci_check_probe_only(void) { } | 60 | static inline void of_pci_check_probe_only(void) { } |
68 | #endif | 61 | #endif |
69 | 62 | ||
63 | #if IS_ENABLED(CONFIG_OF_IRQ) | ||
64 | int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); | ||
65 | #else | ||
66 | static inline int | ||
67 | of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin) | ||
68 | { | ||
69 | return 0; | ||
70 | } | ||
71 | #endif | ||
72 | |||
70 | #if defined(CONFIG_OF_ADDRESS) | 73 | #if defined(CONFIG_OF_ADDRESS) |
71 | int of_pci_get_host_bridge_resources(struct device_node *dev, | 74 | int of_pci_get_host_bridge_resources(struct device_node *dev, |
72 | unsigned char busno, unsigned char bus_max, | 75 | unsigned char busno, unsigned char bus_max, |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 5a0c3e53e7c2..d7069539f351 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -924,6 +924,7 @@ void phy_device_remove(struct phy_device *phydev); | |||
924 | int phy_init_hw(struct phy_device *phydev); | 924 | int phy_init_hw(struct phy_device *phydev); |
925 | int phy_suspend(struct phy_device *phydev); | 925 | int phy_suspend(struct phy_device *phydev); |
926 | int phy_resume(struct phy_device *phydev); | 926 | int phy_resume(struct phy_device *phydev); |
927 | int __phy_resume(struct phy_device *phydev); | ||
927 | int phy_loopback(struct phy_device *phydev, bool enable); | 928 | int phy_loopback(struct phy_device *phydev, bool enable); |
928 | struct phy_device *phy_attach(struct net_device *dev, const char *bus_id, | 929 | struct phy_device *phy_attach(struct net_device *dev, const char *bus_id, |
929 | phy_interface_t interface); | 930 | phy_interface_t interface); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c1e66bdcf583..ddf77cf4ff2d 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -3285,8 +3285,7 @@ int skb_zerocopy(struct sk_buff *to, struct sk_buff *from, | |||
3285 | void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); | 3285 | void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); |
3286 | int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); | 3286 | int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); |
3287 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); | 3287 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); |
3288 | unsigned int skb_gso_transport_seglen(const struct sk_buff *skb); | 3288 | bool skb_gso_validate_network_len(const struct sk_buff *skb, unsigned int mtu); |
3289 | bool skb_gso_validate_mtu(const struct sk_buff *skb, unsigned int mtu); | ||
3290 | bool skb_gso_validate_mac_len(const struct sk_buff *skb, unsigned int len); | 3289 | bool skb_gso_validate_mac_len(const struct sk_buff *skb, unsigned int len); |
3291 | struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); | 3290 | struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features); |
3292 | struct sk_buff *skb_vlan_untag(struct sk_buff *skb); | 3291 | struct sk_buff *skb_vlan_untag(struct sk_buff *skb); |
@@ -4104,38 +4103,6 @@ static inline bool skb_head_is_locked(const struct sk_buff *skb) | |||
4104 | return !skb->head_frag || skb_cloned(skb); | 4103 | return !skb->head_frag || skb_cloned(skb); |
4105 | } | 4104 | } |
4106 | 4105 | ||
4107 | /** | ||
4108 | * skb_gso_network_seglen - Return length of individual segments of a gso packet | ||
4109 | * | ||
4110 | * @skb: GSO skb | ||
4111 | * | ||
4112 | * skb_gso_network_seglen is used to determine the real size of the | ||
4113 | * individual segments, including Layer3 (IP, IPv6) and L4 headers (TCP/UDP). | ||
4114 | * | ||
4115 | * The MAC/L2 header is not accounted for. | ||
4116 | */ | ||
4117 | static inline unsigned int skb_gso_network_seglen(const struct sk_buff *skb) | ||
4118 | { | ||
4119 | unsigned int hdr_len = skb_transport_header(skb) - | ||
4120 | skb_network_header(skb); | ||
4121 | return hdr_len + skb_gso_transport_seglen(skb); | ||
4122 | } | ||
4123 | |||
4124 | /** | ||
4125 | * skb_gso_mac_seglen - Return length of individual segments of a gso packet | ||
4126 | * | ||
4127 | * @skb: GSO skb | ||
4128 | * | ||
4129 | * skb_gso_mac_seglen is used to determine the real size of the | ||
4130 | * individual segments, including MAC/L2, Layer3 (IP, IPv6) and L4 | ||
4131 | * headers (TCP/UDP). | ||
4132 | */ | ||
4133 | static inline unsigned int skb_gso_mac_seglen(const struct sk_buff *skb) | ||
4134 | { | ||
4135 | unsigned int hdr_len = skb_transport_header(skb) - skb_mac_header(skb); | ||
4136 | return hdr_len + skb_gso_transport_seglen(skb); | ||
4137 | } | ||
4138 | |||
4139 | /* Local Checksum Offload. | 4106 | /* Local Checksum Offload. |
4140 | * Compute outer checksum based on the assumption that the | 4107 | * Compute outer checksum based on the assumption that the |
4141 | * inner checksum will be offloaded later. | 4108 | * inner checksum will be offloaded later. |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 0a6c71e0ad01..47f8af22f216 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -364,6 +364,7 @@ struct tty_file_private { | |||
364 | #define TTY_PTY_LOCK 16 /* pty private */ | 364 | #define TTY_PTY_LOCK 16 /* pty private */ |
365 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ | 365 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ |
366 | #define TTY_HUPPED 18 /* Post driver->hangup() */ | 366 | #define TTY_HUPPED 18 /* Post driver->hangup() */ |
367 | #define TTY_HUPPING 19 /* Hangup in progress */ | ||
367 | #define TTY_LDISC_HALTED 22 /* Line discipline is halted */ | 368 | #define TTY_LDISC_HALTED 22 /* Line discipline is halted */ |
368 | 369 | ||
369 | /* Values for tty->flow_change */ | 370 | /* Values for tty->flow_change */ |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index f1fcec2fd5f8..b7a99ce56bc9 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -63,4 +63,7 @@ | |||
63 | */ | 63 | */ |
64 | #define USB_QUIRK_DISCONNECT_SUSPEND BIT(12) | 64 | #define USB_QUIRK_DISCONNECT_SUSPEND BIT(12) |
65 | 65 | ||
66 | /* Device needs a pause after every control message. */ | ||
67 | #define USB_QUIRK_DELAY_CTRL_MSG BIT(13) | ||
68 | |||
66 | #endif /* __LINUX_USB_QUIRKS_H */ | 69 | #endif /* __LINUX_USB_QUIRKS_H */ |
diff --git a/include/media/demux.h b/include/media/demux.h index c4df6cee48e6..bf00a5a41a90 100644 --- a/include/media/demux.h +++ b/include/media/demux.h | |||
@@ -117,7 +117,7 @@ struct dmx_ts_feed { | |||
117 | * specified by @filter_value that will be used on the filter | 117 | * specified by @filter_value that will be used on the filter |
118 | * match logic. | 118 | * match logic. |
119 | * @filter_mode: Contains a 16 bytes (128 bits) filter mode. | 119 | * @filter_mode: Contains a 16 bytes (128 bits) filter mode. |
120 | * @parent: Pointer to struct dmx_section_feed. | 120 | * @parent: Back-pointer to struct dmx_section_feed. |
121 | * @priv: Pointer to private data of the API client. | 121 | * @priv: Pointer to private data of the API client. |
122 | * | 122 | * |
123 | * | 123 | * |
@@ -130,8 +130,9 @@ struct dmx_section_filter { | |||
130 | u8 filter_value[DMX_MAX_FILTER_SIZE]; | 130 | u8 filter_value[DMX_MAX_FILTER_SIZE]; |
131 | u8 filter_mask[DMX_MAX_FILTER_SIZE]; | 131 | u8 filter_mask[DMX_MAX_FILTER_SIZE]; |
132 | u8 filter_mode[DMX_MAX_FILTER_SIZE]; | 132 | u8 filter_mode[DMX_MAX_FILTER_SIZE]; |
133 | struct dmx_section_feed *parent; /* Back-pointer */ | 133 | struct dmx_section_feed *parent; |
134 | void *priv; /* Pointer to private data of the API client */ | 134 | |
135 | void *priv; | ||
135 | }; | 136 | }; |
136 | 137 | ||
137 | /** | 138 | /** |
@@ -193,6 +194,10 @@ struct dmx_section_feed { | |||
193 | * @buffer2: Pointer to the tail of the filtered TS packets, or NULL. | 194 | * @buffer2: Pointer to the tail of the filtered TS packets, or NULL. |
194 | * @buffer2_length: Length of the TS data in buffer2. | 195 | * @buffer2_length: Length of the TS data in buffer2. |
195 | * @source: Indicates which TS feed is the source of the callback. | 196 | * @source: Indicates which TS feed is the source of the callback. |
197 | * @buffer_flags: Address where buffer flags are stored. Those are | ||
198 | * used to report discontinuity users via DVB | ||
199 | * memory mapped API, as defined by | ||
200 | * &enum dmx_buffer_flags. | ||
196 | * | 201 | * |
197 | * This function callback prototype, provided by the client of the demux API, | 202 | * This function callback prototype, provided by the client of the demux API, |
198 | * is called from the demux code. The function is only called when filtering | 203 | * is called from the demux code. The function is only called when filtering |
@@ -245,7 +250,8 @@ typedef int (*dmx_ts_cb)(const u8 *buffer1, | |||
245 | size_t buffer1_length, | 250 | size_t buffer1_length, |
246 | const u8 *buffer2, | 251 | const u8 *buffer2, |
247 | size_t buffer2_length, | 252 | size_t buffer2_length, |
248 | struct dmx_ts_feed *source); | 253 | struct dmx_ts_feed *source, |
254 | u32 *buffer_flags); | ||
249 | 255 | ||
250 | /** | 256 | /** |
251 | * typedef dmx_section_cb - DVB demux TS filter callback function prototype | 257 | * typedef dmx_section_cb - DVB demux TS filter callback function prototype |
@@ -261,6 +267,10 @@ typedef int (*dmx_ts_cb)(const u8 *buffer1, | |||
261 | * including headers and CRC. | 267 | * including headers and CRC. |
262 | * @source: Indicates which section feed is the source of the | 268 | * @source: Indicates which section feed is the source of the |
263 | * callback. | 269 | * callback. |
270 | * @buffer_flags: Address where buffer flags are stored. Those are | ||
271 | * used to report discontinuity users via DVB | ||
272 | * memory mapped API, as defined by | ||
273 | * &enum dmx_buffer_flags. | ||
264 | * | 274 | * |
265 | * This function callback prototype, provided by the client of the demux API, | 275 | * This function callback prototype, provided by the client of the demux API, |
266 | * is called from the demux code. The function is only called when | 276 | * is called from the demux code. The function is only called when |
@@ -286,7 +296,8 @@ typedef int (*dmx_section_cb)(const u8 *buffer1, | |||
286 | size_t buffer1_len, | 296 | size_t buffer1_len, |
287 | const u8 *buffer2, | 297 | const u8 *buffer2, |
288 | size_t buffer2_len, | 298 | size_t buffer2_len, |
289 | struct dmx_section_filter *source); | 299 | struct dmx_section_filter *source, |
300 | u32 *buffer_flags); | ||
290 | 301 | ||
291 | /* | 302 | /* |
292 | * DVB Front-End | 303 | * DVB Front-End |
diff --git a/include/media/dmxdev.h b/include/media/dmxdev.h index 2f5cb2c7b6a7..baafa3b8aca4 100644 --- a/include/media/dmxdev.h +++ b/include/media/dmxdev.h | |||
@@ -163,6 +163,7 @@ struct dmxdev_filter { | |||
163 | * @demux: pointer to &struct dmx_demux. | 163 | * @demux: pointer to &struct dmx_demux. |
164 | * @filternum: number of filters. | 164 | * @filternum: number of filters. |
165 | * @capabilities: demux capabilities as defined by &enum dmx_demux_caps. | 165 | * @capabilities: demux capabilities as defined by &enum dmx_demux_caps. |
166 | * @may_do_mmap: flag used to indicate if the device may do mmap. | ||
166 | * @exit: flag to indicate that the demux is being released. | 167 | * @exit: flag to indicate that the demux is being released. |
167 | * @dvr_orig_fe: pointer to &struct dmx_frontend. | 168 | * @dvr_orig_fe: pointer to &struct dmx_frontend. |
168 | * @dvr_buffer: embedded &struct dvb_ringbuffer for DVB output. | 169 | * @dvr_buffer: embedded &struct dvb_ringbuffer for DVB output. |
@@ -180,6 +181,7 @@ struct dmxdev { | |||
180 | int filternum; | 181 | int filternum; |
181 | int capabilities; | 182 | int capabilities; |
182 | 183 | ||
184 | unsigned int may_do_mmap:1; | ||
183 | unsigned int exit:1; | 185 | unsigned int exit:1; |
184 | #define DMXDEV_CAP_DUPLEX 1 | 186 | #define DMXDEV_CAP_DUPLEX 1 |
185 | struct dmx_frontend *dvr_orig_fe; | 187 | struct dmx_frontend *dvr_orig_fe; |
diff --git a/include/media/dvb_demux.h b/include/media/dvb_demux.h index b07092038f4b..3b6aeca7a49e 100644 --- a/include/media/dvb_demux.h +++ b/include/media/dvb_demux.h | |||
@@ -115,6 +115,8 @@ struct dvb_demux_filter { | |||
115 | * @pid: PID to be filtered. | 115 | * @pid: PID to be filtered. |
116 | * @timeout: feed timeout. | 116 | * @timeout: feed timeout. |
117 | * @filter: pointer to &struct dvb_demux_filter. | 117 | * @filter: pointer to &struct dvb_demux_filter. |
118 | * @buffer_flags: Buffer flags used to report discontinuity users via DVB | ||
119 | * memory mapped API, as defined by &enum dmx_buffer_flags. | ||
118 | * @ts_type: type of TS, as defined by &enum ts_filter_type. | 120 | * @ts_type: type of TS, as defined by &enum ts_filter_type. |
119 | * @pes_type: type of PES, as defined by &enum dmx_ts_pes. | 121 | * @pes_type: type of PES, as defined by &enum dmx_ts_pes. |
120 | * @cc: MPEG-TS packet continuity counter | 122 | * @cc: MPEG-TS packet continuity counter |
@@ -145,6 +147,8 @@ struct dvb_demux_feed { | |||
145 | ktime_t timeout; | 147 | ktime_t timeout; |
146 | struct dvb_demux_filter *filter; | 148 | struct dvb_demux_filter *filter; |
147 | 149 | ||
150 | u32 buffer_flags; | ||
151 | |||
148 | enum ts_filter_type ts_type; | 152 | enum ts_filter_type ts_type; |
149 | enum dmx_ts_pes pes_type; | 153 | enum dmx_ts_pes pes_type; |
150 | 154 | ||
diff --git a/include/media/dvb_vb2.h b/include/media/dvb_vb2.h index 01d1202d1a55..8cb88452cd6c 100644 --- a/include/media/dvb_vb2.h +++ b/include/media/dvb_vb2.h | |||
@@ -85,6 +85,12 @@ struct dvb_buffer { | |||
85 | * @nonblocking: | 85 | * @nonblocking: |
86 | * If different than zero, device is operating on non-blocking | 86 | * If different than zero, device is operating on non-blocking |
87 | * mode. | 87 | * mode. |
88 | * @flags: buffer flags as defined by &enum dmx_buffer_flags. | ||
89 | * Filled only at &DMX_DQBUF. &DMX_QBUF should zero this field. | ||
90 | * @count: monotonic counter for filled buffers. Helps to identify | ||
91 | * data stream loses. Filled only at &DMX_DQBUF. &DMX_QBUF should | ||
92 | * zero this field. | ||
93 | * | ||
88 | * @name: name of the device type. Currently, it can either be | 94 | * @name: name of the device type. Currently, it can either be |
89 | * "dvr" or "demux_filter". | 95 | * "dvr" or "demux_filter". |
90 | */ | 96 | */ |
@@ -100,10 +106,14 @@ struct dvb_vb2_ctx { | |||
100 | int buf_siz; | 106 | int buf_siz; |
101 | int buf_cnt; | 107 | int buf_cnt; |
102 | int nonblocking; | 108 | int nonblocking; |
109 | |||
110 | enum dmx_buffer_flags flags; | ||
111 | u32 count; | ||
112 | |||
103 | char name[DVB_VB2_NAME_MAX + 1]; | 113 | char name[DVB_VB2_NAME_MAX + 1]; |
104 | }; | 114 | }; |
105 | 115 | ||
106 | #ifndef DVB_MMAP | 116 | #ifndef CONFIG_DVB_MMAP |
107 | static inline int dvb_vb2_init(struct dvb_vb2_ctx *ctx, | 117 | static inline int dvb_vb2_init(struct dvb_vb2_ctx *ctx, |
108 | const char *name, int non_blocking) | 118 | const char *name, int non_blocking) |
109 | { | 119 | { |
@@ -114,7 +124,7 @@ static inline int dvb_vb2_release(struct dvb_vb2_ctx *ctx) | |||
114 | return 0; | 124 | return 0; |
115 | }; | 125 | }; |
116 | #define dvb_vb2_is_streaming(ctx) (0) | 126 | #define dvb_vb2_is_streaming(ctx) (0) |
117 | #define dvb_vb2_fill_buffer(ctx, file, wait) (0) | 127 | #define dvb_vb2_fill_buffer(ctx, file, wait, flags) (0) |
118 | 128 | ||
119 | static inline __poll_t dvb_vb2_poll(struct dvb_vb2_ctx *ctx, | 129 | static inline __poll_t dvb_vb2_poll(struct dvb_vb2_ctx *ctx, |
120 | struct file *file, | 130 | struct file *file, |
@@ -153,9 +163,13 @@ int dvb_vb2_is_streaming(struct dvb_vb2_ctx *ctx); | |||
153 | * @ctx: control struct for VB2 handler | 163 | * @ctx: control struct for VB2 handler |
154 | * @src: place where the data is stored | 164 | * @src: place where the data is stored |
155 | * @len: number of bytes to be copied from @src | 165 | * @len: number of bytes to be copied from @src |
166 | * @buffer_flags: | ||
167 | * pointer to buffer flags as defined by &enum dmx_buffer_flags. | ||
168 | * can be NULL. | ||
156 | */ | 169 | */ |
157 | int dvb_vb2_fill_buffer(struct dvb_vb2_ctx *ctx, | 170 | int dvb_vb2_fill_buffer(struct dvb_vb2_ctx *ctx, |
158 | const unsigned char *src, int len); | 171 | const unsigned char *src, int len, |
172 | enum dmx_buffer_flags *buffer_flags); | ||
159 | 173 | ||
160 | /** | 174 | /** |
161 | * dvb_vb2_poll - Wrapper to vb2_core_streamon() for Digital TV | 175 | * dvb_vb2_poll - Wrapper to vb2_core_streamon() for Digital TV |
diff --git a/include/net/devlink.h b/include/net/devlink.h index 6545b03e97f7..4de35ed12bcc 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h | |||
@@ -257,6 +257,18 @@ struct devlink_resource_size_params { | |||
257 | enum devlink_resource_unit unit; | 257 | enum devlink_resource_unit unit; |
258 | }; | 258 | }; |
259 | 259 | ||
260 | static inline void | ||
261 | devlink_resource_size_params_init(struct devlink_resource_size_params *size_params, | ||
262 | u64 size_min, u64 size_max, | ||
263 | u64 size_granularity, | ||
264 | enum devlink_resource_unit unit) | ||
265 | { | ||
266 | size_params->size_min = size_min; | ||
267 | size_params->size_max = size_max; | ||
268 | size_params->size_granularity = size_granularity; | ||
269 | size_params->unit = unit; | ||
270 | } | ||
271 | |||
260 | /** | 272 | /** |
261 | * struct devlink_resource - devlink resource | 273 | * struct devlink_resource - devlink resource |
262 | * @name: name of the resource | 274 | * @name: name of the resource |
@@ -278,7 +290,7 @@ struct devlink_resource { | |||
278 | u64 size_new; | 290 | u64 size_new; |
279 | bool size_valid; | 291 | bool size_valid; |
280 | struct devlink_resource *parent; | 292 | struct devlink_resource *parent; |
281 | struct devlink_resource_size_params *size_params; | 293 | struct devlink_resource_size_params size_params; |
282 | struct list_head list; | 294 | struct list_head list; |
283 | struct list_head resource_list; | 295 | struct list_head resource_list; |
284 | const struct devlink_resource_ops *resource_ops; | 296 | const struct devlink_resource_ops *resource_ops; |
@@ -402,7 +414,7 @@ int devlink_resource_register(struct devlink *devlink, | |||
402 | u64 resource_size, | 414 | u64 resource_size, |
403 | u64 resource_id, | 415 | u64 resource_id, |
404 | u64 parent_resource_id, | 416 | u64 parent_resource_id, |
405 | struct devlink_resource_size_params *size_params, | 417 | const struct devlink_resource_size_params *size_params, |
406 | const struct devlink_resource_ops *resource_ops); | 418 | const struct devlink_resource_ops *resource_ops); |
407 | void devlink_resources_unregister(struct devlink *devlink, | 419 | void devlink_resources_unregister(struct devlink *devlink, |
408 | struct devlink_resource *resource); | 420 | struct devlink_resource *resource); |
@@ -556,7 +568,7 @@ devlink_resource_register(struct devlink *devlink, | |||
556 | u64 resource_size, | 568 | u64 resource_size, |
557 | u64 resource_id, | 569 | u64 resource_id, |
558 | u64 parent_resource_id, | 570 | u64 parent_resource_id, |
559 | struct devlink_resource_size_params *size_params, | 571 | const struct devlink_resource_size_params *size_params, |
560 | const struct devlink_resource_ops *resource_ops) | 572 | const struct devlink_resource_ops *resource_ops) |
561 | { | 573 | { |
562 | return 0; | 574 | return 0; |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index d8d4a902a88d..2280b2351739 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -68,6 +68,9 @@ struct scsi_cmnd { | |||
68 | struct list_head list; /* scsi_cmnd participates in queue lists */ | 68 | struct list_head list; /* scsi_cmnd participates in queue lists */ |
69 | struct list_head eh_entry; /* entry for the host eh_cmd_q */ | 69 | struct list_head eh_entry; /* entry for the host eh_cmd_q */ |
70 | struct delayed_work abort_work; | 70 | struct delayed_work abort_work; |
71 | |||
72 | struct rcu_head rcu; | ||
73 | |||
71 | int eh_eflags; /* Used by error handlr */ | 74 | int eh_eflags; /* Used by error handlr */ |
72 | 75 | ||
73 | /* | 76 | /* |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 1a1df0d21ee3..a8b7bf879ced 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -571,8 +571,6 @@ struct Scsi_Host { | |||
571 | struct blk_mq_tag_set tag_set; | 571 | struct blk_mq_tag_set tag_set; |
572 | }; | 572 | }; |
573 | 573 | ||
574 | struct rcu_head rcu; | ||
575 | |||
576 | atomic_t host_busy; /* commands actually active on low-level */ | 574 | atomic_t host_busy; /* commands actually active on low-level */ |
577 | atomic_t host_blocked; | 575 | atomic_t host_blocked; |
578 | 576 | ||
diff --git a/include/soc/arc/mcip.h b/include/soc/arc/mcip.h index c2d1b15da136..a91f25151a5b 100644 --- a/include/soc/arc/mcip.h +++ b/include/soc/arc/mcip.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #define ARC_REG_MCIP_BCR 0x0d0 | 16 | #define ARC_REG_MCIP_BCR 0x0d0 |
17 | #define ARC_REG_MCIP_IDU_BCR 0x0D5 | 17 | #define ARC_REG_MCIP_IDU_BCR 0x0D5 |
18 | #define ARC_REG_GFRC_BUILD 0x0D6 | ||
18 | #define ARC_REG_MCIP_CMD 0x600 | 19 | #define ARC_REG_MCIP_CMD 0x600 |
19 | #define ARC_REG_MCIP_WDATA 0x601 | 20 | #define ARC_REG_MCIP_WDATA 0x601 |
20 | #define ARC_REG_MCIP_READBACK 0x602 | 21 | #define ARC_REG_MCIP_READBACK 0x602 |
@@ -36,10 +37,14 @@ struct mcip_cmd { | |||
36 | #define CMD_SEMA_RELEASE 0x12 | 37 | #define CMD_SEMA_RELEASE 0x12 |
37 | 38 | ||
38 | #define CMD_DEBUG_SET_MASK 0x34 | 39 | #define CMD_DEBUG_SET_MASK 0x34 |
40 | #define CMD_DEBUG_READ_MASK 0x35 | ||
39 | #define CMD_DEBUG_SET_SELECT 0x36 | 41 | #define CMD_DEBUG_SET_SELECT 0x36 |
42 | #define CMD_DEBUG_READ_SELECT 0x37 | ||
40 | 43 | ||
41 | #define CMD_GFRC_READ_LO 0x42 | 44 | #define CMD_GFRC_READ_LO 0x42 |
42 | #define CMD_GFRC_READ_HI 0x43 | 45 | #define CMD_GFRC_READ_HI 0x43 |
46 | #define CMD_GFRC_SET_CORE 0x47 | ||
47 | #define CMD_GFRC_READ_CORE 0x48 | ||
43 | 48 | ||
44 | #define CMD_IDU_ENABLE 0x71 | 49 | #define CMD_IDU_ENABLE 0x71 |
45 | #define CMD_IDU_DISABLE 0x72 | 50 | #define CMD_IDU_DISABLE 0x72 |
diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index 85dc965afd89..99c902e460c2 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h | |||
@@ -102,13 +102,13 @@ typedef struct siginfo { | |||
102 | short _addr_lsb; /* LSB of the reported address */ | 102 | short _addr_lsb; /* LSB of the reported address */ |
103 | /* used when si_code=SEGV_BNDERR */ | 103 | /* used when si_code=SEGV_BNDERR */ |
104 | struct { | 104 | struct { |
105 | short _dummy_bnd; | 105 | void *_dummy_bnd; |
106 | void __user *_lower; | 106 | void __user *_lower; |
107 | void __user *_upper; | 107 | void __user *_upper; |
108 | } _addr_bnd; | 108 | } _addr_bnd; |
109 | /* used when si_code=SEGV_PKUERR */ | 109 | /* used when si_code=SEGV_PKUERR */ |
110 | struct { | 110 | struct { |
111 | short _dummy_pkey; | 111 | void *_dummy_pkey; |
112 | __u32 _pkey; | 112 | __u32 _pkey; |
113 | } _addr_pkey; | 113 | } _addr_pkey; |
114 | }; | 114 | }; |
diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h index 91a31ffed828..9a781f0611df 100644 --- a/include/uapi/drm/virtgpu_drm.h +++ b/include/uapi/drm/virtgpu_drm.h | |||
@@ -63,6 +63,7 @@ struct drm_virtgpu_execbuffer { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */ | 65 | #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */ |
66 | #define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2 /* do we have the capset fix */ | ||
66 | 67 | ||
67 | struct drm_virtgpu_getparam { | 68 | struct drm_virtgpu_getparam { |
68 | __u64 param; | 69 | __u64 param; |
diff --git a/include/uapi/linux/blktrace_api.h b/include/uapi/linux/blktrace_api.h index 20d1490d6377..3c50e07ee833 100644 --- a/include/uapi/linux/blktrace_api.h +++ b/include/uapi/linux/blktrace_api.h | |||
@@ -131,7 +131,7 @@ enum { | |||
131 | #define BLKTRACE_BDEV_SIZE 32 | 131 | #define BLKTRACE_BDEV_SIZE 32 |
132 | 132 | ||
133 | /* | 133 | /* |
134 | * User setup structure passed with BLKTRACESTART | 134 | * User setup structure passed with BLKTRACESETUP |
135 | */ | 135 | */ |
136 | struct blk_user_trace_setup { | 136 | struct blk_user_trace_setup { |
137 | char name[BLKTRACE_BDEV_SIZE]; /* output */ | 137 | char name[BLKTRACE_BDEV_SIZE]; /* output */ |
diff --git a/include/uapi/linux/dvb/dmx.h b/include/uapi/linux/dvb/dmx.h index 5f3c5a918f00..b4112f0b6dd3 100644 --- a/include/uapi/linux/dvb/dmx.h +++ b/include/uapi/linux/dvb/dmx.h | |||
@@ -212,6 +212,32 @@ struct dmx_stc { | |||
212 | }; | 212 | }; |
213 | 213 | ||
214 | /** | 214 | /** |
215 | * enum dmx_buffer_flags - DMX memory-mapped buffer flags | ||
216 | * | ||
217 | * @DMX_BUFFER_FLAG_HAD_CRC32_DISCARD: | ||
218 | * Indicates that the Kernel discarded one or more frames due to wrong | ||
219 | * CRC32 checksum. | ||
220 | * @DMX_BUFFER_FLAG_TEI: | ||
221 | * Indicates that the Kernel has detected a Transport Error indicator | ||
222 | * (TEI) on a filtered pid. | ||
223 | * @DMX_BUFFER_PKT_COUNTER_MISMATCH: | ||
224 | * Indicates that the Kernel has detected a packet counter mismatch | ||
225 | * on a filtered pid. | ||
226 | * @DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED: | ||
227 | * Indicates that the Kernel has detected one or more frame discontinuity. | ||
228 | * @DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR: | ||
229 | * Received at least one packet with a frame discontinuity indicator. | ||
230 | */ | ||
231 | |||
232 | enum dmx_buffer_flags { | ||
233 | DMX_BUFFER_FLAG_HAD_CRC32_DISCARD = 1 << 0, | ||
234 | DMX_BUFFER_FLAG_TEI = 1 << 1, | ||
235 | DMX_BUFFER_PKT_COUNTER_MISMATCH = 1 << 2, | ||
236 | DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED = 1 << 3, | ||
237 | DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR = 1 << 4, | ||
238 | }; | ||
239 | |||
240 | /** | ||
215 | * struct dmx_buffer - dmx buffer info | 241 | * struct dmx_buffer - dmx buffer info |
216 | * | 242 | * |
217 | * @index: id number of the buffer | 243 | * @index: id number of the buffer |
@@ -220,15 +246,24 @@ struct dmx_stc { | |||
220 | * offset from the start of the device memory for this plane, | 246 | * offset from the start of the device memory for this plane, |
221 | * (or a "cookie" that should be passed to mmap() as offset) | 247 | * (or a "cookie" that should be passed to mmap() as offset) |
222 | * @length: size in bytes of the buffer | 248 | * @length: size in bytes of the buffer |
249 | * @flags: bit array of buffer flags as defined by &enum dmx_buffer_flags. | ||
250 | * Filled only at &DMX_DQBUF. | ||
251 | * @count: monotonic counter for filled buffers. Helps to identify | ||
252 | * data stream loses. Filled only at &DMX_DQBUF. | ||
223 | * | 253 | * |
224 | * Contains data exchanged by application and driver using one of the streaming | 254 | * Contains data exchanged by application and driver using one of the streaming |
225 | * I/O methods. | 255 | * I/O methods. |
256 | * | ||
257 | * Please notice that, for &DMX_QBUF, only @index should be filled. | ||
258 | * On &DMX_DQBUF calls, all fields will be filled by the Kernel. | ||
226 | */ | 259 | */ |
227 | struct dmx_buffer { | 260 | struct dmx_buffer { |
228 | __u32 index; | 261 | __u32 index; |
229 | __u32 bytesused; | 262 | __u32 bytesused; |
230 | __u32 offset; | 263 | __u32 offset; |
231 | __u32 length; | 264 | __u32 length; |
265 | __u32 flags; | ||
266 | __u32 count; | ||
232 | }; | 267 | }; |
233 | 268 | ||
234 | /** | 269 | /** |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 0fb5ef939732..7b26d4b0b052 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
@@ -761,6 +761,7 @@ struct kvm_ppc_resize_hpt { | |||
761 | #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 | 761 | #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 |
762 | #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 | 762 | #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 |
763 | #define KVM_GET_EMULATED_CPUID _IOWR(KVMIO, 0x09, struct kvm_cpuid2) | 763 | #define KVM_GET_EMULATED_CPUID _IOWR(KVMIO, 0x09, struct kvm_cpuid2) |
764 | #define KVM_GET_MSR_FEATURE_INDEX_LIST _IOWR(KVMIO, 0x0a, struct kvm_msr_list) | ||
764 | 765 | ||
765 | /* | 766 | /* |
766 | * Extension capability list. | 767 | * Extension capability list. |
@@ -934,6 +935,7 @@ struct kvm_ppc_resize_hpt { | |||
934 | #define KVM_CAP_S390_AIS_MIGRATION 150 | 935 | #define KVM_CAP_S390_AIS_MIGRATION 150 |
935 | #define KVM_CAP_PPC_GET_CPU_CHAR 151 | 936 | #define KVM_CAP_PPC_GET_CPU_CHAR 151 |
936 | #define KVM_CAP_S390_BPB 152 | 937 | #define KVM_CAP_S390_BPB 152 |
938 | #define KVM_CAP_GET_MSR_FEATURES 153 | ||
937 | 939 | ||
938 | #ifdef KVM_CAP_IRQ_ROUTING | 940 | #ifdef KVM_CAP_IRQ_ROUTING |
939 | 941 | ||
diff --git a/include/uapi/linux/psp-sev.h b/include/uapi/linux/psp-sev.h index 3d77fe91239a..9008f31c7eb6 100644 --- a/include/uapi/linux/psp-sev.h +++ b/include/uapi/linux/psp-sev.h | |||
@@ -42,7 +42,7 @@ typedef enum { | |||
42 | SEV_RET_INVALID_PLATFORM_STATE, | 42 | SEV_RET_INVALID_PLATFORM_STATE, |
43 | SEV_RET_INVALID_GUEST_STATE, | 43 | SEV_RET_INVALID_GUEST_STATE, |
44 | SEV_RET_INAVLID_CONFIG, | 44 | SEV_RET_INAVLID_CONFIG, |
45 | SEV_RET_INVALID_len, | 45 | SEV_RET_INVALID_LEN, |
46 | SEV_RET_ALREADY_OWNED, | 46 | SEV_RET_ALREADY_OWNED, |
47 | SEV_RET_INVALID_CERTIFICATE, | 47 | SEV_RET_INVALID_CERTIFICATE, |
48 | SEV_RET_POLICY_FAILURE, | 48 | SEV_RET_POLICY_FAILURE, |
diff --git a/include/uapi/misc/ocxl.h b/include/uapi/misc/ocxl.h index 4b0b0b756f3e..0af83d80fb3e 100644 --- a/include/uapi/misc/ocxl.h +++ b/include/uapi/misc/ocxl.h | |||
@@ -32,6 +32,22 @@ struct ocxl_ioctl_attach { | |||
32 | __u64 reserved3; | 32 | __u64 reserved3; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | struct ocxl_ioctl_metadata { | ||
36 | __u16 version; // struct version, always backwards compatible | ||
37 | |||
38 | // Version 0 fields | ||
39 | __u8 afu_version_major; | ||
40 | __u8 afu_version_minor; | ||
41 | __u32 pasid; // PASID assigned to the current context | ||
42 | |||
43 | __u64 pp_mmio_size; // Per PASID MMIO size | ||
44 | __u64 global_mmio_size; | ||
45 | |||
46 | // End version 0 fields | ||
47 | |||
48 | __u64 reserved[13]; // Total of 16*u64 | ||
49 | }; | ||
50 | |||
35 | struct ocxl_ioctl_irq_fd { | 51 | struct ocxl_ioctl_irq_fd { |
36 | __u64 irq_offset; | 52 | __u64 irq_offset; |
37 | __s32 eventfd; | 53 | __s32 eventfd; |
@@ -45,5 +61,6 @@ struct ocxl_ioctl_irq_fd { | |||
45 | #define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64) | 61 | #define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64) |
46 | #define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64) | 62 | #define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64) |
47 | #define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd) | 63 | #define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd) |
64 | #define OCXL_IOCTL_GET_METADATA _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata) | ||
48 | 65 | ||
49 | #endif /* _UAPI_MISC_OCXL_H */ | 66 | #endif /* _UAPI_MISC_OCXL_H */ |