diff options
| author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-01-07 18:51:13 -0500 |
|---|---|---|
| committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-01-07 18:51:13 -0500 |
| commit | abaee091a18c19ccd86feb1c8374585d82e96777 (patch) | |
| tree | 01602bae73e1278c3d98dafe1c269049927c58ce /include | |
| parent | a2746fb16e41b7c8f02aa4d2605ecce97abbebbd (diff) | |
| parent | 3f8d6f2a0797e8c650a47e5c1b5c2601a46f4293 (diff) | |
Merge branch 'jejb-scsi' into misc
Diffstat (limited to 'include')
41 files changed, 235 insertions, 252 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 0b921ae06cd8..0a271ca1f7c7 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -309,6 +309,11 @@ struct drm_file { | |||
| 309 | unsigned universal_planes:1; | 309 | unsigned universal_planes:1; |
| 310 | /* true if client understands atomic properties */ | 310 | /* true if client understands atomic properties */ |
| 311 | unsigned atomic:1; | 311 | unsigned atomic:1; |
| 312 | /* | ||
| 313 | * This client is allowed to gain master privileges for @master. | ||
| 314 | * Protected by struct drm_device::master_mutex. | ||
| 315 | */ | ||
| 316 | unsigned allowed_master:1; | ||
| 312 | 317 | ||
| 313 | struct pid *pid; | 318 | struct pid *pid; |
| 314 | kuid_t uid; | 319 | kuid_t uid; |
| @@ -910,6 +915,7 @@ extern int drm_open(struct inode *inode, struct file *filp); | |||
| 910 | extern ssize_t drm_read(struct file *filp, char __user *buffer, | 915 | extern ssize_t drm_read(struct file *filp, char __user *buffer, |
| 911 | size_t count, loff_t *offset); | 916 | size_t count, loff_t *offset); |
| 912 | extern int drm_release(struct inode *inode, struct file *filp); | 917 | extern int drm_release(struct inode *inode, struct file *filp); |
| 918 | extern int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv); | ||
| 913 | 919 | ||
| 914 | /* Mapping support (drm_vm.h) */ | 920 | /* Mapping support (drm_vm.h) */ |
| 915 | extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); | 921 | extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); |
| @@ -947,6 +953,10 @@ extern void drm_send_vblank_event(struct drm_device *dev, unsigned int pipe, | |||
| 947 | struct drm_pending_vblank_event *e); | 953 | struct drm_pending_vblank_event *e); |
| 948 | extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc, | 954 | extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc, |
| 949 | struct drm_pending_vblank_event *e); | 955 | struct drm_pending_vblank_event *e); |
| 956 | extern void drm_arm_vblank_event(struct drm_device *dev, unsigned int pipe, | ||
| 957 | struct drm_pending_vblank_event *e); | ||
| 958 | extern void drm_crtc_arm_vblank_event(struct drm_crtc *crtc, | ||
| 959 | struct drm_pending_vblank_event *e); | ||
| 950 | extern bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe); | 960 | extern bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe); |
| 951 | extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc); | 961 | extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc); |
| 952 | extern int drm_vblank_get(struct drm_device *dev, unsigned int pipe); | 962 | extern int drm_vblank_get(struct drm_device *dev, unsigned int pipe); |
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index e67aeac2aee0..4b74c97d297a 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h | |||
| @@ -136,6 +136,9 @@ drm_atomic_connectors_for_crtc(struct drm_atomic_state *state, | |||
| 136 | 136 | ||
| 137 | void drm_atomic_legacy_backoff(struct drm_atomic_state *state); | 137 | void drm_atomic_legacy_backoff(struct drm_atomic_state *state); |
| 138 | 138 | ||
| 139 | void | ||
| 140 | drm_atomic_clean_old_fb(struct drm_device *dev, unsigned plane_mask, int ret); | ||
| 141 | |||
| 139 | int __must_check drm_atomic_check_only(struct drm_atomic_state *state); | 142 | int __must_check drm_atomic_check_only(struct drm_atomic_state *state); |
| 140 | int __must_check drm_atomic_commit(struct drm_atomic_state *state); | 143 | int __must_check drm_atomic_commit(struct drm_atomic_state *state); |
| 141 | int __must_check drm_atomic_async_commit(struct drm_atomic_state *state); | 144 | int __must_check drm_atomic_async_commit(struct drm_atomic_state *state); |
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index 9c747cb14ad8..d2f41477f8ae 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h | |||
| @@ -342,10 +342,10 @@ int kvm_vgic_inject_mapped_irq(struct kvm *kvm, int cpuid, | |||
| 342 | struct irq_phys_map *map, bool level); | 342 | struct irq_phys_map *map, bool level); |
| 343 | void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg); | 343 | void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg); |
| 344 | int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu); | 344 | int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu); |
| 345 | int kvm_vgic_vcpu_active_irq(struct kvm_vcpu *vcpu); | ||
| 346 | struct irq_phys_map *kvm_vgic_map_phys_irq(struct kvm_vcpu *vcpu, | 345 | struct irq_phys_map *kvm_vgic_map_phys_irq(struct kvm_vcpu *vcpu, |
| 347 | int virt_irq, int irq); | 346 | int virt_irq, int irq); |
| 348 | int kvm_vgic_unmap_phys_irq(struct kvm_vcpu *vcpu, struct irq_phys_map *map); | 347 | int kvm_vgic_unmap_phys_irq(struct kvm_vcpu *vcpu, struct irq_phys_map *map); |
| 348 | bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, struct irq_phys_map *map); | ||
| 349 | 349 | ||
| 350 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) | 350 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) |
| 351 | #define vgic_initialized(k) (!!((k)->arch.vgic.nr_cpus)) | 351 | #define vgic_initialized(k) (!!((k)->arch.vgic.nr_cpus)) |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 054833939995..1991aea2ec4c 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -870,8 +870,8 @@ static inline int acpi_dev_get_property(struct acpi_device *adev, | |||
| 870 | } | 870 | } |
| 871 | 871 | ||
| 872 | static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode, | 872 | static inline int acpi_node_get_property_reference(struct fwnode_handle *fwnode, |
| 873 | const char *name, const char *cells_name, | 873 | const char *name, size_t index, |
| 874 | size_t index, struct acpi_reference_args *args) | 874 | struct acpi_reference_args *args) |
| 875 | { | 875 | { |
| 876 | return -ENXIO; | 876 | return -ENXIO; |
| 877 | } | 877 | } |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 3fe27f8d91f0..0169ba2e2e64 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -254,6 +254,7 @@ struct queue_limits { | |||
| 254 | unsigned long virt_boundary_mask; | 254 | unsigned long virt_boundary_mask; |
| 255 | 255 | ||
| 256 | unsigned int max_hw_sectors; | 256 | unsigned int max_hw_sectors; |
| 257 | unsigned int max_dev_sectors; | ||
| 257 | unsigned int chunk_sectors; | 258 | unsigned int chunk_sectors; |
| 258 | unsigned int max_sectors; | 259 | unsigned int max_sectors; |
| 259 | unsigned int max_segment_size; | 260 | unsigned int max_segment_size; |
| @@ -773,7 +774,6 @@ extern void blk_rq_set_block_pc(struct request *); | |||
| 773 | extern void blk_requeue_request(struct request_queue *, struct request *); | 774 | extern void blk_requeue_request(struct request_queue *, struct request *); |
| 774 | extern void blk_add_request_payload(struct request *rq, struct page *page, | 775 | extern void blk_add_request_payload(struct request *rq, struct page *page, |
| 775 | unsigned int len); | 776 | unsigned int len); |
| 776 | extern int blk_rq_check_limits(struct request_queue *q, struct request *rq); | ||
| 777 | extern int blk_lld_busy(struct request_queue *q); | 777 | extern int blk_lld_busy(struct request_queue *q); |
| 778 | extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, | 778 | extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, |
| 779 | struct bio_set *bs, gfp_t gfp_mask, | 779 | struct bio_set *bs, gfp_t gfp_mask, |
| @@ -794,6 +794,8 @@ extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, | |||
| 794 | extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, | 794 | extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, |
| 795 | struct scsi_ioctl_command __user *); | 795 | struct scsi_ioctl_command __user *); |
| 796 | 796 | ||
| 797 | extern int blk_queue_enter(struct request_queue *q, gfp_t gfp); | ||
| 798 | extern void blk_queue_exit(struct request_queue *q); | ||
| 797 | extern void blk_start_queue(struct request_queue *q); | 799 | extern void blk_start_queue(struct request_queue *q); |
| 798 | extern void blk_stop_queue(struct request_queue *q); | 800 | extern void blk_stop_queue(struct request_queue *q); |
| 799 | extern void blk_sync_queue(struct request_queue *q); | 801 | extern void blk_sync_queue(struct request_queue *q); |
| @@ -958,7 +960,6 @@ extern struct request_queue *blk_init_allocated_queue(struct request_queue *, | |||
| 958 | extern void blk_cleanup_queue(struct request_queue *); | 960 | extern void blk_cleanup_queue(struct request_queue *); |
| 959 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 961 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
| 960 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 962 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
| 961 | extern void blk_limits_max_hw_sectors(struct queue_limits *, unsigned int); | ||
| 962 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | 963 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); |
| 963 | extern void blk_queue_chunk_sectors(struct request_queue *, unsigned int); | 964 | extern void blk_queue_chunk_sectors(struct request_queue *, unsigned int); |
| 964 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); | 965 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index de464e6683b6..83d1926c61e4 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -40,6 +40,7 @@ struct bpf_map { | |||
| 40 | struct user_struct *user; | 40 | struct user_struct *user; |
| 41 | const struct bpf_map_ops *ops; | 41 | const struct bpf_map_ops *ops; |
| 42 | struct work_struct work; | 42 | struct work_struct work; |
| 43 | atomic_t usercnt; | ||
| 43 | }; | 44 | }; |
| 44 | 45 | ||
| 45 | struct bpf_map_type_list { | 46 | struct bpf_map_type_list { |
| @@ -167,8 +168,10 @@ struct bpf_prog *bpf_prog_get(u32 ufd); | |||
| 167 | void bpf_prog_put(struct bpf_prog *prog); | 168 | void bpf_prog_put(struct bpf_prog *prog); |
| 168 | void bpf_prog_put_rcu(struct bpf_prog *prog); | 169 | void bpf_prog_put_rcu(struct bpf_prog *prog); |
| 169 | 170 | ||
| 170 | struct bpf_map *bpf_map_get(u32 ufd); | 171 | struct bpf_map *bpf_map_get_with_uref(u32 ufd); |
| 171 | struct bpf_map *__bpf_map_get(struct fd f); | 172 | struct bpf_map *__bpf_map_get(struct fd f); |
| 173 | void bpf_map_inc(struct bpf_map *map, bool uref); | ||
| 174 | void bpf_map_put_with_uref(struct bpf_map *map); | ||
| 172 | void bpf_map_put(struct bpf_map *map); | 175 | void bpf_map_put(struct bpf_map *map); |
| 173 | 176 | ||
| 174 | extern int sysctl_unprivileged_bpf_disabled; | 177 | extern int sysctl_unprivileged_bpf_disabled; |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index a8a335b7fce0..758a029011b1 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
| @@ -197,6 +197,16 @@ static inline struct configfs_subsystem *to_configfs_subsystem(struct config_gro | |||
| 197 | int configfs_register_subsystem(struct configfs_subsystem *subsys); | 197 | int configfs_register_subsystem(struct configfs_subsystem *subsys); |
| 198 | void configfs_unregister_subsystem(struct configfs_subsystem *subsys); | 198 | void configfs_unregister_subsystem(struct configfs_subsystem *subsys); |
| 199 | 199 | ||
| 200 | int configfs_register_group(struct config_group *parent_group, | ||
| 201 | struct config_group *group); | ||
| 202 | void configfs_unregister_group(struct config_group *group); | ||
| 203 | |||
| 204 | struct config_group * | ||
| 205 | configfs_register_default_group(struct config_group *parent_group, | ||
| 206 | const char *name, | ||
| 207 | struct config_item_type *item_type); | ||
| 208 | void configfs_unregister_default_group(struct config_group *group); | ||
| 209 | |||
| 200 | /* These functions can sleep and can alloc with GFP_KERNEL */ | 210 | /* These functions can sleep and can alloc with GFP_KERNEL */ |
| 201 | /* WARNING: These cannot be called underneath configfs callbacks!! */ | 211 | /* WARNING: These cannot be called underneath configfs callbacks!! */ |
| 202 | int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target); | 212 | int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target); |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index ef4c5b1a860f..177c7680c1a8 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -77,6 +77,7 @@ struct cpufreq_policy { | |||
| 77 | unsigned int suspend_freq; /* freq to set during suspend */ | 77 | unsigned int suspend_freq; /* freq to set during suspend */ |
| 78 | 78 | ||
| 79 | unsigned int policy; /* see above */ | 79 | unsigned int policy; /* see above */ |
| 80 | unsigned int last_policy; /* policy before unplug */ | ||
| 80 | struct cpufreq_governor *governor; /* see below */ | 81 | struct cpufreq_governor *governor; /* see below */ |
| 81 | void *governor_data; | 82 | void *governor_data; |
| 82 | bool governor_enabled; /* governor start/stop flag */ | 83 | bool governor_enabled; /* governor start/stop flag */ |
diff --git a/include/linux/dns_resolver.h b/include/linux/dns_resolver.h index cc92268af89a..6ac3cad9aef1 100644 --- a/include/linux/dns_resolver.h +++ b/include/linux/dns_resolver.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | #ifdef __KERNEL__ | 27 | #ifdef __KERNEL__ |
| 28 | 28 | ||
| 29 | extern int dns_query(const char *type, const char *name, size_t namelen, | 29 | extern int dns_query(const char *type, const char *name, size_t namelen, |
| 30 | const char *options, char **_result, time_t *_expiry); | 30 | const char *options, char **_result, time64_t *_expiry); |
| 31 | 31 | ||
| 32 | #endif /* KERNEL */ | 32 | #endif /* KERNEL */ |
| 33 | 33 | ||
diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h index 7be22da321f3..a4cf57cd0f75 100644 --- a/include/linux/enclosure.h +++ b/include/linux/enclosure.h | |||
| @@ -29,7 +29,11 @@ | |||
| 29 | /* A few generic types ... taken from ses-2 */ | 29 | /* A few generic types ... taken from ses-2 */ |
| 30 | enum enclosure_component_type { | 30 | enum enclosure_component_type { |
| 31 | ENCLOSURE_COMPONENT_DEVICE = 0x01, | 31 | ENCLOSURE_COMPONENT_DEVICE = 0x01, |
| 32 | ENCLOSURE_COMPONENT_CONTROLLER_ELECTRONICS = 0x07, | ||
| 33 | ENCLOSURE_COMPONENT_SCSI_TARGET_PORT = 0x14, | ||
| 34 | ENCLOSURE_COMPONENT_SCSI_INITIATOR_PORT = 0x15, | ||
| 32 | ENCLOSURE_COMPONENT_ARRAY_DEVICE = 0x17, | 35 | ENCLOSURE_COMPONENT_ARRAY_DEVICE = 0x17, |
| 36 | ENCLOSURE_COMPONENT_SAS_EXPANDER = 0x18, | ||
| 33 | }; | 37 | }; |
| 34 | 38 | ||
| 35 | /* ses-2 common element status */ | 39 | /* ses-2 common element status */ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 6523109e136d..8942af0813e3 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -271,7 +271,7 @@ static inline int gfpflags_to_migratetype(const gfp_t gfp_flags) | |||
| 271 | 271 | ||
| 272 | static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) | 272 | static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) |
| 273 | { | 273 | { |
| 274 | return gfp_flags & __GFP_DIRECT_RECLAIM; | 274 | return (bool __force)(gfp_flags & __GFP_DIRECT_RECLAIM); |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | #ifdef CONFIG_HIGHMEM | 277 | #ifdef CONFIG_HIGHMEM |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 0ef2a97ccdb5..402753bccafa 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -227,7 +227,7 @@ struct ipv6_pinfo { | |||
| 227 | struct ipv6_ac_socklist *ipv6_ac_list; | 227 | struct ipv6_ac_socklist *ipv6_ac_list; |
| 228 | struct ipv6_fl_socklist __rcu *ipv6_fl_list; | 228 | struct ipv6_fl_socklist __rcu *ipv6_fl_list; |
| 229 | 229 | ||
| 230 | struct ipv6_txoptions *opt; | 230 | struct ipv6_txoptions __rcu *opt; |
| 231 | struct sk_buff *pktoptions; | 231 | struct sk_buff *pktoptions; |
| 232 | struct sk_buff *rxpmtu; | 232 | struct sk_buff *rxpmtu; |
| 233 | struct inet6_cork cork; | 233 | struct inet6_cork cork; |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 484604d184be..e15828fd71f1 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
| 22 | #include <linux/spinlock.h> | ||
| 23 | 22 | ||
| 24 | struct kref { | 23 | struct kref { |
| 25 | atomic_t refcount; | 24 | atomic_t refcount; |
| @@ -99,38 +98,6 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref) | |||
| 99 | return kref_sub(kref, 1, release); | 98 | return kref_sub(kref, 1, release); |
| 100 | } | 99 | } |
| 101 | 100 | ||
| 102 | /** | ||
| 103 | * kref_put_spinlock_irqsave - decrement refcount for object. | ||
| 104 | * @kref: object. | ||
| 105 | * @release: pointer to the function that will clean up the object when the | ||
| 106 | * last reference to the object is released. | ||
| 107 | * This pointer is required, and it is not acceptable to pass kfree | ||
| 108 | * in as this function. | ||
| 109 | * @lock: lock to take in release case | ||
| 110 | * | ||
| 111 | * Behaves identical to kref_put with one exception. If the reference count | ||
| 112 | * drops to zero, the lock will be taken atomically wrt dropping the reference | ||
| 113 | * count. The release function has to call spin_unlock() without _irqrestore. | ||
| 114 | */ | ||
| 115 | static inline int kref_put_spinlock_irqsave(struct kref *kref, | ||
| 116 | void (*release)(struct kref *kref), | ||
| 117 | spinlock_t *lock) | ||
| 118 | { | ||
| 119 | unsigned long flags; | ||
| 120 | |||
| 121 | WARN_ON(release == NULL); | ||
| 122 | if (atomic_add_unless(&kref->refcount, -1, 1)) | ||
| 123 | return 0; | ||
| 124 | spin_lock_irqsave(lock, flags); | ||
| 125 | if (atomic_dec_and_test(&kref->refcount)) { | ||
| 126 | release(kref); | ||
| 127 | local_irq_restore(flags); | ||
| 128 | return 1; | ||
| 129 | } | ||
| 130 | spin_unlock_irqrestore(lock, flags); | ||
| 131 | return 0; | ||
| 132 | } | ||
| 133 | |||
| 134 | static inline int kref_put_mutex(struct kref *kref, | 101 | static inline int kref_put_mutex(struct kref *kref, |
| 135 | void (*release)(struct kref *kref), | 102 | void (*release)(struct kref *kref), |
| 136 | struct mutex *lock) | 103 | struct mutex *lock) |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 5706a2108f0a..c923350ca20a 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -460,6 +460,17 @@ static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i) | |||
| 460 | (vcpup = kvm_get_vcpu(kvm, idx)) != NULL; \ | 460 | (vcpup = kvm_get_vcpu(kvm, idx)) != NULL; \ |
| 461 | idx++) | 461 | idx++) |
| 462 | 462 | ||
| 463 | static inline struct kvm_vcpu *kvm_get_vcpu_by_id(struct kvm *kvm, int id) | ||
| 464 | { | ||
| 465 | struct kvm_vcpu *vcpu; | ||
| 466 | int i; | ||
| 467 | |||
| 468 | kvm_for_each_vcpu(i, vcpu, kvm) | ||
| 469 | if (vcpu->vcpu_id == id) | ||
| 470 | return vcpu; | ||
| 471 | return NULL; | ||
| 472 | } | ||
| 473 | |||
| 463 | #define kvm_for_each_memslot(memslot, slots) \ | 474 | #define kvm_for_each_memslot(memslot, slots) \ |
| 464 | for (memslot = &slots->memslots[0]; \ | 475 | for (memslot = &slots->memslots[0]; \ |
| 465 | memslot < slots->memslots + KVM_MEM_SLOTS_NUM && memslot->npages;\ | 476 | memslot < slots->memslots + KVM_MEM_SLOTS_NUM && memslot->npages;\ |
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 69c9057e1ab8..c6916aec43b6 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h | |||
| @@ -58,7 +58,6 @@ enum { | |||
| 58 | struct nvm_id_group { | 58 | struct nvm_id_group { |
| 59 | u8 mtype; | 59 | u8 mtype; |
| 60 | u8 fmtype; | 60 | u8 fmtype; |
| 61 | u16 res16; | ||
| 62 | u8 num_ch; | 61 | u8 num_ch; |
| 63 | u8 num_lun; | 62 | u8 num_lun; |
| 64 | u8 num_pln; | 63 | u8 num_pln; |
| @@ -74,9 +73,9 @@ struct nvm_id_group { | |||
| 74 | u32 tbet; | 73 | u32 tbet; |
| 75 | u32 tbem; | 74 | u32 tbem; |
| 76 | u32 mpos; | 75 | u32 mpos; |
| 76 | u32 mccap; | ||
| 77 | u16 cpar; | 77 | u16 cpar; |
| 78 | u8 res[913]; | 78 | }; |
| 79 | } __packed; | ||
| 80 | 79 | ||
| 81 | struct nvm_addr_format { | 80 | struct nvm_addr_format { |
| 82 | u8 ch_offset; | 81 | u8 ch_offset; |
| @@ -91,19 +90,15 @@ struct nvm_addr_format { | |||
| 91 | u8 pg_len; | 90 | u8 pg_len; |
| 92 | u8 sect_offset; | 91 | u8 sect_offset; |
| 93 | u8 sect_len; | 92 | u8 sect_len; |
| 94 | u8 res[4]; | ||
| 95 | }; | 93 | }; |
| 96 | 94 | ||
| 97 | struct nvm_id { | 95 | struct nvm_id { |
| 98 | u8 ver_id; | 96 | u8 ver_id; |
| 99 | u8 vmnt; | 97 | u8 vmnt; |
| 100 | u8 cgrps; | 98 | u8 cgrps; |
| 101 | u8 res[5]; | ||
| 102 | u32 cap; | 99 | u32 cap; |
| 103 | u32 dom; | 100 | u32 dom; |
| 104 | struct nvm_addr_format ppaf; | 101 | struct nvm_addr_format ppaf; |
| 105 | u8 ppat; | ||
| 106 | u8 resv[224]; | ||
| 107 | struct nvm_id_group groups[4]; | 102 | struct nvm_id_group groups[4]; |
| 108 | } __packed; | 103 | } __packed; |
| 109 | 104 | ||
| @@ -123,39 +118,28 @@ struct nvm_tgt_instance { | |||
| 123 | #define NVM_VERSION_MINOR 0 | 118 | #define NVM_VERSION_MINOR 0 |
| 124 | #define NVM_VERSION_PATCH 0 | 119 | #define NVM_VERSION_PATCH 0 |
| 125 | 120 | ||
| 126 | #define NVM_SEC_BITS (8) | ||
| 127 | #define NVM_PL_BITS (6) | ||
| 128 | #define NVM_PG_BITS (16) | ||
| 129 | #define NVM_BLK_BITS (16) | 121 | #define NVM_BLK_BITS (16) |
| 130 | #define NVM_LUN_BITS (10) | 122 | #define NVM_PG_BITS (16) |
| 123 | #define NVM_SEC_BITS (8) | ||
| 124 | #define NVM_PL_BITS (8) | ||
| 125 | #define NVM_LUN_BITS (8) | ||
| 131 | #define NVM_CH_BITS (8) | 126 | #define NVM_CH_BITS (8) |
| 132 | 127 | ||
| 133 | struct ppa_addr { | 128 | struct ppa_addr { |
| 129 | /* Generic structure for all addresses */ | ||
| 134 | union { | 130 | union { |
| 135 | /* Channel-based PPA format in nand 4x2x2x2x8x10 */ | ||
| 136 | struct { | ||
| 137 | u64 ch : 4; | ||
| 138 | u64 sec : 2; /* 4 sectors per page */ | ||
| 139 | u64 pl : 2; /* 4 planes per LUN */ | ||
| 140 | u64 lun : 2; /* 4 LUNs per channel */ | ||
| 141 | u64 pg : 8; /* 256 pages per block */ | ||
| 142 | u64 blk : 10;/* 1024 blocks per plane */ | ||
| 143 | u64 resved : 36; | ||
| 144 | } chnl; | ||
| 145 | |||
| 146 | /* Generic structure for all addresses */ | ||
| 147 | struct { | 131 | struct { |
| 132 | u64 blk : NVM_BLK_BITS; | ||
| 133 | u64 pg : NVM_PG_BITS; | ||
| 148 | u64 sec : NVM_SEC_BITS; | 134 | u64 sec : NVM_SEC_BITS; |
| 149 | u64 pl : NVM_PL_BITS; | 135 | u64 pl : NVM_PL_BITS; |
| 150 | u64 pg : NVM_PG_BITS; | ||
| 151 | u64 blk : NVM_BLK_BITS; | ||
| 152 | u64 lun : NVM_LUN_BITS; | 136 | u64 lun : NVM_LUN_BITS; |
| 153 | u64 ch : NVM_CH_BITS; | 137 | u64 ch : NVM_CH_BITS; |
| 154 | } g; | 138 | } g; |
| 155 | 139 | ||
| 156 | u64 ppa; | 140 | u64 ppa; |
| 157 | }; | 141 | }; |
| 158 | } __packed; | 142 | }; |
| 159 | 143 | ||
| 160 | struct nvm_rq { | 144 | struct nvm_rq { |
| 161 | struct nvm_tgt_instance *ins; | 145 | struct nvm_tgt_instance *ins; |
| @@ -191,11 +175,11 @@ static inline void *nvm_rq_to_pdu(struct nvm_rq *rqdata) | |||
| 191 | struct nvm_block; | 175 | struct nvm_block; |
| 192 | 176 | ||
| 193 | typedef int (nvm_l2p_update_fn)(u64, u32, __le64 *, void *); | 177 | typedef int (nvm_l2p_update_fn)(u64, u32, __le64 *, void *); |
| 194 | typedef int (nvm_bb_update_fn)(u32, void *, unsigned int, void *); | 178 | typedef int (nvm_bb_update_fn)(struct ppa_addr, int, u8 *, void *); |
| 195 | typedef int (nvm_id_fn)(struct request_queue *, struct nvm_id *); | 179 | typedef int (nvm_id_fn)(struct request_queue *, struct nvm_id *); |
| 196 | typedef int (nvm_get_l2p_tbl_fn)(struct request_queue *, u64, u32, | 180 | typedef int (nvm_get_l2p_tbl_fn)(struct request_queue *, u64, u32, |
| 197 | nvm_l2p_update_fn *, void *); | 181 | nvm_l2p_update_fn *, void *); |
| 198 | typedef int (nvm_op_bb_tbl_fn)(struct request_queue *, int, unsigned int, | 182 | typedef int (nvm_op_bb_tbl_fn)(struct nvm_dev *, struct ppa_addr, int, |
| 199 | nvm_bb_update_fn *, void *); | 183 | nvm_bb_update_fn *, void *); |
| 200 | typedef int (nvm_op_set_bb_fn)(struct request_queue *, struct nvm_rq *, int); | 184 | typedef int (nvm_op_set_bb_fn)(struct request_queue *, struct nvm_rq *, int); |
| 201 | typedef int (nvm_submit_io_fn)(struct request_queue *, struct nvm_rq *); | 185 | typedef int (nvm_submit_io_fn)(struct request_queue *, struct nvm_rq *); |
| @@ -210,7 +194,7 @@ struct nvm_dev_ops { | |||
| 210 | nvm_id_fn *identity; | 194 | nvm_id_fn *identity; |
| 211 | nvm_get_l2p_tbl_fn *get_l2p_tbl; | 195 | nvm_get_l2p_tbl_fn *get_l2p_tbl; |
| 212 | nvm_op_bb_tbl_fn *get_bb_tbl; | 196 | nvm_op_bb_tbl_fn *get_bb_tbl; |
| 213 | nvm_op_set_bb_fn *set_bb; | 197 | nvm_op_set_bb_fn *set_bb_tbl; |
| 214 | 198 | ||
| 215 | nvm_submit_io_fn *submit_io; | 199 | nvm_submit_io_fn *submit_io; |
| 216 | nvm_erase_blk_fn *erase_block; | 200 | nvm_erase_blk_fn *erase_block; |
| @@ -220,7 +204,7 @@ struct nvm_dev_ops { | |||
| 220 | nvm_dev_dma_alloc_fn *dev_dma_alloc; | 204 | nvm_dev_dma_alloc_fn *dev_dma_alloc; |
| 221 | nvm_dev_dma_free_fn *dev_dma_free; | 205 | nvm_dev_dma_free_fn *dev_dma_free; |
| 222 | 206 | ||
| 223 | uint8_t max_phys_sect; | 207 | unsigned int max_phys_sect; |
| 224 | }; | 208 | }; |
| 225 | 209 | ||
| 226 | struct nvm_lun { | 210 | struct nvm_lun { |
| @@ -229,7 +213,9 @@ struct nvm_lun { | |||
| 229 | int lun_id; | 213 | int lun_id; |
| 230 | int chnl_id; | 214 | int chnl_id; |
| 231 | 215 | ||
| 216 | unsigned int nr_inuse_blocks; /* Number of used blocks */ | ||
| 232 | unsigned int nr_free_blocks; /* Number of unused blocks */ | 217 | unsigned int nr_free_blocks; /* Number of unused blocks */ |
| 218 | unsigned int nr_bad_blocks; /* Number of bad blocks */ | ||
| 233 | struct nvm_block *blocks; | 219 | struct nvm_block *blocks; |
| 234 | 220 | ||
| 235 | spinlock_t lock; | 221 | spinlock_t lock; |
| @@ -263,8 +249,7 @@ struct nvm_dev { | |||
| 263 | int blks_per_lun; | 249 | int blks_per_lun; |
| 264 | int sec_size; | 250 | int sec_size; |
| 265 | int oob_size; | 251 | int oob_size; |
| 266 | int addr_mode; | 252 | struct nvm_addr_format ppaf; |
| 267 | struct nvm_addr_format addr_format; | ||
| 268 | 253 | ||
| 269 | /* Calculated/Cached values. These do not reflect the actual usable | 254 | /* Calculated/Cached values. These do not reflect the actual usable |
| 270 | * blocks at run-time. | 255 | * blocks at run-time. |
| @@ -290,118 +275,45 @@ struct nvm_dev { | |||
| 290 | char name[DISK_NAME_LEN]; | 275 | char name[DISK_NAME_LEN]; |
| 291 | }; | 276 | }; |
| 292 | 277 | ||
| 293 | /* fallback conversion */ | 278 | static inline struct ppa_addr generic_to_dev_addr(struct nvm_dev *dev, |
| 294 | static struct ppa_addr __generic_to_linear_addr(struct nvm_dev *dev, | 279 | struct ppa_addr r) |
| 295 | struct ppa_addr r) | ||
| 296 | { | ||
| 297 | struct ppa_addr l; | ||
| 298 | |||
| 299 | l.ppa = r.g.sec + | ||
| 300 | r.g.pg * dev->sec_per_pg + | ||
| 301 | r.g.blk * (dev->pgs_per_blk * | ||
| 302 | dev->sec_per_pg) + | ||
| 303 | r.g.lun * (dev->blks_per_lun * | ||
| 304 | dev->pgs_per_blk * | ||
| 305 | dev->sec_per_pg) + | ||
| 306 | r.g.ch * (dev->blks_per_lun * | ||
| 307 | dev->pgs_per_blk * | ||
| 308 | dev->luns_per_chnl * | ||
| 309 | dev->sec_per_pg); | ||
| 310 | |||
| 311 | return l; | ||
| 312 | } | ||
| 313 | |||
| 314 | /* fallback conversion */ | ||
| 315 | static struct ppa_addr __linear_to_generic_addr(struct nvm_dev *dev, | ||
| 316 | struct ppa_addr r) | ||
| 317 | { | 280 | { |
| 318 | struct ppa_addr l; | 281 | struct ppa_addr l; |
| 319 | int secs, pgs, blks, luns; | ||
| 320 | sector_t ppa = r.ppa; | ||
| 321 | 282 | ||
| 322 | l.ppa = 0; | 283 | l.ppa = ((u64)r.g.blk) << dev->ppaf.blk_offset; |
| 323 | 284 | l.ppa |= ((u64)r.g.pg) << dev->ppaf.pg_offset; | |
| 324 | div_u64_rem(ppa, dev->sec_per_pg, &secs); | 285 | l.ppa |= ((u64)r.g.sec) << dev->ppaf.sect_offset; |
| 325 | l.g.sec = secs; | 286 | l.ppa |= ((u64)r.g.pl) << dev->ppaf.pln_offset; |
| 326 | 287 | l.ppa |= ((u64)r.g.lun) << dev->ppaf.lun_offset; | |
| 327 | sector_div(ppa, dev->sec_per_pg); | 288 | l.ppa |= ((u64)r.g.ch) << dev->ppaf.ch_offset; |
| 328 | div_u64_rem(ppa, dev->sec_per_blk, &pgs); | ||
| 329 | l.g.pg = pgs; | ||
| 330 | |||
| 331 | sector_div(ppa, dev->pgs_per_blk); | ||
| 332 | div_u64_rem(ppa, dev->blks_per_lun, &blks); | ||
| 333 | l.g.blk = blks; | ||
| 334 | |||
| 335 | sector_div(ppa, dev->blks_per_lun); | ||
| 336 | div_u64_rem(ppa, dev->luns_per_chnl, &luns); | ||
| 337 | l.g.lun = luns; | ||
| 338 | |||
| 339 | sector_div(ppa, dev->luns_per_chnl); | ||
| 340 | l.g.ch = ppa; | ||
| 341 | 289 | ||
| 342 | return l; | 290 | return l; |
| 343 | } | 291 | } |
| 344 | 292 | ||
| 345 | static struct ppa_addr __generic_to_chnl_addr(struct ppa_addr r) | 293 | static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev, |
| 294 | struct ppa_addr r) | ||
| 346 | { | 295 | { |
| 347 | struct ppa_addr l; | 296 | struct ppa_addr l; |
| 348 | 297 | ||
| 349 | l.ppa = 0; | 298 | /* |
| 350 | 299 | * (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc. | |
| 351 | l.chnl.sec = r.g.sec; | 300 | */ |
| 352 | l.chnl.pl = r.g.pl; | 301 | l.g.blk = (r.ppa >> dev->ppaf.blk_offset) & |
| 353 | l.chnl.pg = r.g.pg; | 302 | (((1 << dev->ppaf.blk_len) - 1)); |
| 354 | l.chnl.blk = r.g.blk; | 303 | l.g.pg |= (r.ppa >> dev->ppaf.pg_offset) & |
| 355 | l.chnl.lun = r.g.lun; | 304 | (((1 << dev->ppaf.pg_len) - 1)); |
| 356 | l.chnl.ch = r.g.ch; | 305 | l.g.sec |= (r.ppa >> dev->ppaf.sect_offset) & |
| 357 | 306 | (((1 << dev->ppaf.sect_len) - 1)); | |
| 358 | return l; | 307 | l.g.pl |= (r.ppa >> dev->ppaf.pln_offset) & |
| 359 | } | 308 | (((1 << dev->ppaf.pln_len) - 1)); |
| 360 | 309 | l.g.lun |= (r.ppa >> dev->ppaf.lun_offset) & | |
| 361 | static struct ppa_addr __chnl_to_generic_addr(struct ppa_addr r) | 310 | (((1 << dev->ppaf.lun_len) - 1)); |
| 362 | { | 311 | l.g.ch |= (r.ppa >> dev->ppaf.ch_offset) & |
| 363 | struct ppa_addr l; | 312 | (((1 << dev->ppaf.ch_len) - 1)); |
| 364 | |||
| 365 | l.ppa = 0; | ||
| 366 | |||
| 367 | l.g.sec = r.chnl.sec; | ||
| 368 | l.g.pl = r.chnl.pl; | ||
| 369 | l.g.pg = r.chnl.pg; | ||
| 370 | l.g.blk = r.chnl.blk; | ||
| 371 | l.g.lun = r.chnl.lun; | ||
| 372 | l.g.ch = r.chnl.ch; | ||
| 373 | 313 | ||
| 374 | return l; | 314 | return l; |
| 375 | } | 315 | } |
| 376 | 316 | ||
| 377 | static inline struct ppa_addr addr_to_generic_mode(struct nvm_dev *dev, | ||
| 378 | struct ppa_addr gppa) | ||
| 379 | { | ||
| 380 | switch (dev->addr_mode) { | ||
| 381 | case NVM_ADDRMODE_LINEAR: | ||
| 382 | return __linear_to_generic_addr(dev, gppa); | ||
| 383 | case NVM_ADDRMODE_CHANNEL: | ||
| 384 | return __chnl_to_generic_addr(gppa); | ||
| 385 | default: | ||
| 386 | BUG(); | ||
| 387 | } | ||
| 388 | return gppa; | ||
| 389 | } | ||
| 390 | |||
| 391 | static inline struct ppa_addr generic_to_addr_mode(struct nvm_dev *dev, | ||
| 392 | struct ppa_addr gppa) | ||
| 393 | { | ||
| 394 | switch (dev->addr_mode) { | ||
| 395 | case NVM_ADDRMODE_LINEAR: | ||
| 396 | return __generic_to_linear_addr(dev, gppa); | ||
| 397 | case NVM_ADDRMODE_CHANNEL: | ||
| 398 | return __generic_to_chnl_addr(gppa); | ||
| 399 | default: | ||
| 400 | BUG(); | ||
| 401 | } | ||
| 402 | return gppa; | ||
| 403 | } | ||
| 404 | |||
| 405 | static inline int ppa_empty(struct ppa_addr ppa_addr) | 317 | static inline int ppa_empty(struct ppa_addr ppa_addr) |
| 406 | { | 318 | { |
| 407 | return (ppa_addr.ppa == ADDR_EMPTY); | 319 | return (ppa_addr.ppa == ADDR_EMPTY); |
| @@ -468,7 +380,7 @@ typedef int (nvmm_end_io_fn)(struct nvm_rq *, int); | |||
| 468 | typedef int (nvmm_erase_blk_fn)(struct nvm_dev *, struct nvm_block *, | 380 | typedef int (nvmm_erase_blk_fn)(struct nvm_dev *, struct nvm_block *, |
| 469 | unsigned long); | 381 | unsigned long); |
| 470 | typedef struct nvm_lun *(nvmm_get_lun_fn)(struct nvm_dev *, int); | 382 | typedef struct nvm_lun *(nvmm_get_lun_fn)(struct nvm_dev *, int); |
| 471 | typedef void (nvmm_free_blocks_print_fn)(struct nvm_dev *); | 383 | typedef void (nvmm_lun_info_print_fn)(struct nvm_dev *); |
| 472 | 384 | ||
| 473 | struct nvmm_type { | 385 | struct nvmm_type { |
| 474 | const char *name; | 386 | const char *name; |
| @@ -492,7 +404,7 @@ struct nvmm_type { | |||
| 492 | nvmm_get_lun_fn *get_lun; | 404 | nvmm_get_lun_fn *get_lun; |
| 493 | 405 | ||
| 494 | /* Statistics */ | 406 | /* Statistics */ |
| 495 | nvmm_free_blocks_print_fn *free_blocks_print; | 407 | nvmm_lun_info_print_fn *lun_info_print; |
| 496 | struct list_head list; | 408 | struct list_head list; |
| 497 | }; | 409 | }; |
| 498 | 410 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index 70ac5e28e6b7..0b4ac7da583a 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -34,8 +34,12 @@ struct inode; | |||
| 34 | struct file; | 34 | struct file; |
| 35 | struct net; | 35 | struct net; |
| 36 | 36 | ||
| 37 | #define SOCK_ASYNC_NOSPACE 0 | 37 | /* Historically, SOCKWQ_ASYNC_NOSPACE & SOCKWQ_ASYNC_WAITDATA were located |
| 38 | #define SOCK_ASYNC_WAITDATA 1 | 38 | * in sock->flags, but moved into sk->sk_wq->flags to be RCU protected. |
| 39 | * Eventually all flags will be in sk->sk_wq_flags. | ||
| 40 | */ | ||
| 41 | #define SOCKWQ_ASYNC_NOSPACE 0 | ||
| 42 | #define SOCKWQ_ASYNC_WAITDATA 1 | ||
| 39 | #define SOCK_NOSPACE 2 | 43 | #define SOCK_NOSPACE 2 |
| 40 | #define SOCK_PASSCRED 3 | 44 | #define SOCK_PASSCRED 3 |
| 41 | #define SOCK_PASSSEC 4 | 45 | #define SOCK_PASSSEC 4 |
| @@ -89,6 +93,7 @@ struct socket_wq { | |||
| 89 | /* Note: wait MUST be first field of socket_wq */ | 93 | /* Note: wait MUST be first field of socket_wq */ |
| 90 | wait_queue_head_t wait; | 94 | wait_queue_head_t wait; |
| 91 | struct fasync_struct *fasync_list; | 95 | struct fasync_struct *fasync_list; |
| 96 | unsigned long flags; /* %SOCKWQ_ASYNC_NOSPACE, etc */ | ||
| 92 | struct rcu_head rcu; | 97 | struct rcu_head rcu; |
| 93 | } ____cacheline_aligned_in_smp; | 98 | } ____cacheline_aligned_in_smp; |
| 94 | 99 | ||
| @@ -96,7 +101,7 @@ struct socket_wq { | |||
| 96 | * struct socket - general BSD socket | 101 | * struct socket - general BSD socket |
| 97 | * @state: socket state (%SS_CONNECTED, etc) | 102 | * @state: socket state (%SS_CONNECTED, etc) |
| 98 | * @type: socket type (%SOCK_STREAM, etc) | 103 | * @type: socket type (%SOCK_STREAM, etc) |
| 99 | * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc) | 104 | * @flags: socket flags (%SOCK_NOSPACE, etc) |
| 100 | * @ops: protocol specific socket operations | 105 | * @ops: protocol specific socket operations |
| 101 | * @file: File back pointer for gc | 106 | * @file: File back pointer for gc |
| 102 | * @sk: internal networking protocol agnostic socket representation | 107 | * @sk: internal networking protocol agnostic socket representation |
| @@ -202,7 +207,7 @@ enum { | |||
| 202 | SOCK_WAKE_URG, | 207 | SOCK_WAKE_URG, |
| 203 | }; | 208 | }; |
| 204 | 209 | ||
| 205 | int sock_wake_async(struct socket *sk, int how, int band); | 210 | int sock_wake_async(struct socket_wq *sk_wq, int how, int band); |
| 206 | int sock_register(const struct net_proto_family *fam); | 211 | int sock_register(const struct net_proto_family *fam); |
| 207 | void sock_unregister(int family); | 212 | void sock_unregister(int family); |
| 208 | int __sock_create(struct net *net, int family, int type, int proto, | 213 | int __sock_create(struct net *net, int family, int type, int proto, |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 67bfac1abfc1..3b5d134e945a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -1398,7 +1398,8 @@ enum netdev_priv_flags { | |||
| 1398 | * @dma: DMA channel | 1398 | * @dma: DMA channel |
| 1399 | * @mtu: Interface MTU value | 1399 | * @mtu: Interface MTU value |
| 1400 | * @type: Interface hardware type | 1400 | * @type: Interface hardware type |
| 1401 | * @hard_header_len: Hardware header length | 1401 | * @hard_header_len: Hardware header length, which means that this is the |
| 1402 | * minimum size of a packet. | ||
| 1402 | * | 1403 | * |
| 1403 | * @needed_headroom: Extra headroom the hardware may need, but not in all | 1404 | * @needed_headroom: Extra headroom the hardware may need, but not in all |
| 1404 | * cases can this be guaranteed | 1405 | * cases can this be guaranteed |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 570d630f98ae..11bbae44f4cb 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -251,6 +251,7 @@ struct nfs4_layoutget { | |||
| 251 | struct nfs4_layoutget_res res; | 251 | struct nfs4_layoutget_res res; |
| 252 | struct rpc_cred *cred; | 252 | struct rpc_cred *cred; |
| 253 | gfp_t gfp_flags; | 253 | gfp_t gfp_flags; |
| 254 | long timeout; | ||
| 254 | }; | 255 | }; |
| 255 | 256 | ||
| 256 | struct nfs4_getdeviceinfo_args { | 257 | struct nfs4_getdeviceinfo_args { |
diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h index 36112cdd665a..b90d8ec57c1f 100644 --- a/include/linux/of_dma.h +++ b/include/linux/of_dma.h | |||
| @@ -80,7 +80,7 @@ static inline int of_dma_router_register(struct device_node *np, | |||
| 80 | static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np, | 80 | static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np, |
| 81 | const char *name) | 81 | const char *name) |
| 82 | { | 82 | { |
| 83 | return NULL; | 83 | return ERR_PTR(-ENODEV); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | static inline struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, | 86 | static inline struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index e828e7b4afec..6ae25aae88fd 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -412,9 +412,18 @@ struct pci_host_bridge { | |||
| 412 | void (*release_fn)(struct pci_host_bridge *); | 412 | void (*release_fn)(struct pci_host_bridge *); |
| 413 | void *release_data; | 413 | void *release_data; |
| 414 | unsigned int ignore_reset_delay:1; /* for entire hierarchy */ | 414 | unsigned int ignore_reset_delay:1; /* for entire hierarchy */ |
| 415 | /* Resource alignment requirements */ | ||
| 416 | resource_size_t (*align_resource)(struct pci_dev *dev, | ||
| 417 | const struct resource *res, | ||
| 418 | resource_size_t start, | ||
| 419 | resource_size_t size, | ||
| 420 | resource_size_t align); | ||
| 415 | }; | 421 | }; |
| 416 | 422 | ||
| 417 | #define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev) | 423 | #define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev) |
| 424 | |||
| 425 | struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); | ||
| 426 | |||
| 418 | void pci_set_host_bridge_release(struct pci_host_bridge *bridge, | 427 | void pci_set_host_bridge_release(struct pci_host_bridge *bridge, |
| 419 | void (*release_fn)(struct pci_host_bridge *), | 428 | void (*release_fn)(struct pci_host_bridge *), |
| 420 | void *release_data); | 429 | void *release_data); |
diff --git a/include/linux/scpi_protocol.h b/include/linux/scpi_protocol.h index 80af3cd35ae4..72ce932c69b2 100644 --- a/include/linux/scpi_protocol.h +++ b/include/linux/scpi_protocol.h | |||
| @@ -71,7 +71,7 @@ struct scpi_ops { | |||
| 71 | int (*sensor_get_value)(u16, u32 *); | 71 | int (*sensor_get_value)(u16, u32 *); |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | #if IS_ENABLED(CONFIG_ARM_SCPI_PROTOCOL) | 74 | #if IS_REACHABLE(CONFIG_ARM_SCPI_PROTOCOL) |
| 75 | struct scpi_ops *get_scpi_ops(void); | 75 | struct scpi_ops *get_scpi_ops(void); |
| 76 | #else | 76 | #else |
| 77 | static inline struct scpi_ops *get_scpi_ops(void) { return NULL; } | 77 | static inline struct scpi_ops *get_scpi_ops(void) { return NULL; } |
diff --git a/include/linux/signal.h b/include/linux/signal.h index ab1e0392b5ac..92557bbce7e7 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -239,7 +239,6 @@ extern int sigprocmask(int, sigset_t *, sigset_t *); | |||
| 239 | extern void set_current_blocked(sigset_t *); | 239 | extern void set_current_blocked(sigset_t *); |
| 240 | extern void __set_current_blocked(const sigset_t *); | 240 | extern void __set_current_blocked(const sigset_t *); |
| 241 | extern int show_unhandled_signals; | 241 | extern int show_unhandled_signals; |
| 242 | extern int sigsuspend(sigset_t *); | ||
| 243 | 242 | ||
| 244 | struct sigaction { | 243 | struct sigaction { |
| 245 | #ifndef __ARCH_HAS_IRIX_SIGACTION | 244 | #ifndef __ARCH_HAS_IRIX_SIGACTION |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 7c82e3b307a3..2037a861e367 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -158,6 +158,24 @@ size_t ksize(const void *); | |||
| 158 | #endif | 158 | #endif |
| 159 | 159 | ||
| 160 | /* | 160 | /* |
| 161 | * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment. | ||
| 162 | * Intended for arches that get misalignment faults even for 64 bit integer | ||
| 163 | * aligned buffers. | ||
| 164 | */ | ||
| 165 | #ifndef ARCH_SLAB_MINALIGN | ||
| 166 | #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) | ||
| 167 | #endif | ||
| 168 | |||
| 169 | /* | ||
| 170 | * kmalloc and friends return ARCH_KMALLOC_MINALIGN aligned | ||
| 171 | * pointers. kmem_cache_alloc and friends return ARCH_SLAB_MINALIGN | ||
| 172 | * aligned pointers. | ||
| 173 | */ | ||
| 174 | #define __assume_kmalloc_alignment __assume_aligned(ARCH_KMALLOC_MINALIGN) | ||
| 175 | #define __assume_slab_alignment __assume_aligned(ARCH_SLAB_MINALIGN) | ||
| 176 | #define __assume_page_alignment __assume_aligned(PAGE_SIZE) | ||
| 177 | |||
| 178 | /* | ||
| 161 | * Kmalloc array related definitions | 179 | * Kmalloc array related definitions |
| 162 | */ | 180 | */ |
| 163 | 181 | ||
| @@ -286,8 +304,8 @@ static __always_inline int kmalloc_index(size_t size) | |||
| 286 | } | 304 | } |
| 287 | #endif /* !CONFIG_SLOB */ | 305 | #endif /* !CONFIG_SLOB */ |
| 288 | 306 | ||
| 289 | void *__kmalloc(size_t size, gfp_t flags); | 307 | void *__kmalloc(size_t size, gfp_t flags) __assume_kmalloc_alignment; |
| 290 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t flags); | 308 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t flags) __assume_slab_alignment; |
| 291 | void kmem_cache_free(struct kmem_cache *, void *); | 309 | void kmem_cache_free(struct kmem_cache *, void *); |
| 292 | 310 | ||
| 293 | /* | 311 | /* |
| @@ -298,11 +316,11 @@ void kmem_cache_free(struct kmem_cache *, void *); | |||
| 298 | * Note that interrupts must be enabled when calling these functions. | 316 | * Note that interrupts must be enabled when calling these functions. |
| 299 | */ | 317 | */ |
| 300 | void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **); | 318 | void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **); |
| 301 | bool kmem_cache_alloc_bulk(struct kmem_cache *, gfp_t, size_t, void **); | 319 | int kmem_cache_alloc_bulk(struct kmem_cache *, gfp_t, size_t, void **); |
| 302 | 320 | ||
| 303 | #ifdef CONFIG_NUMA | 321 | #ifdef CONFIG_NUMA |
| 304 | void *__kmalloc_node(size_t size, gfp_t flags, int node); | 322 | void *__kmalloc_node(size_t size, gfp_t flags, int node) __assume_kmalloc_alignment; |
| 305 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); | 323 | void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node) __assume_slab_alignment; |
| 306 | #else | 324 | #else |
| 307 | static __always_inline void *__kmalloc_node(size_t size, gfp_t flags, int node) | 325 | static __always_inline void *__kmalloc_node(size_t size, gfp_t flags, int node) |
| 308 | { | 326 | { |
| @@ -316,12 +334,12 @@ static __always_inline void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t f | |||
| 316 | #endif | 334 | #endif |
| 317 | 335 | ||
| 318 | #ifdef CONFIG_TRACING | 336 | #ifdef CONFIG_TRACING |
| 319 | extern void *kmem_cache_alloc_trace(struct kmem_cache *, gfp_t, size_t); | 337 | extern void *kmem_cache_alloc_trace(struct kmem_cache *, gfp_t, size_t) __assume_slab_alignment; |
| 320 | 338 | ||
| 321 | #ifdef CONFIG_NUMA | 339 | #ifdef CONFIG_NUMA |
| 322 | extern void *kmem_cache_alloc_node_trace(struct kmem_cache *s, | 340 | extern void *kmem_cache_alloc_node_trace(struct kmem_cache *s, |
| 323 | gfp_t gfpflags, | 341 | gfp_t gfpflags, |
| 324 | int node, size_t size); | 342 | int node, size_t size) __assume_slab_alignment; |
| 325 | #else | 343 | #else |
| 326 | static __always_inline void * | 344 | static __always_inline void * |
| 327 | kmem_cache_alloc_node_trace(struct kmem_cache *s, | 345 | kmem_cache_alloc_node_trace(struct kmem_cache *s, |
| @@ -354,10 +372,10 @@ kmem_cache_alloc_node_trace(struct kmem_cache *s, | |||
| 354 | } | 372 | } |
| 355 | #endif /* CONFIG_TRACING */ | 373 | #endif /* CONFIG_TRACING */ |
| 356 | 374 | ||
| 357 | extern void *kmalloc_order(size_t size, gfp_t flags, unsigned int order); | 375 | extern void *kmalloc_order(size_t size, gfp_t flags, unsigned int order) __assume_page_alignment; |
| 358 | 376 | ||
| 359 | #ifdef CONFIG_TRACING | 377 | #ifdef CONFIG_TRACING |
| 360 | extern void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order); | 378 | extern void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order) __assume_page_alignment; |
| 361 | #else | 379 | #else |
| 362 | static __always_inline void * | 380 | static __always_inline void * |
| 363 | kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order) | 381 | kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order) |
| @@ -482,15 +500,6 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
| 482 | return __kmalloc_node(size, flags, node); | 500 | return __kmalloc_node(size, flags, node); |
| 483 | } | 501 | } |
| 484 | 502 | ||
| 485 | /* | ||
| 486 | * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment. | ||
| 487 | * Intended for arches that get misalignment faults even for 64 bit integer | ||
| 488 | * aligned buffers. | ||
| 489 | */ | ||
| 490 | #ifndef ARCH_SLAB_MINALIGN | ||
| 491 | #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) | ||
| 492 | #endif | ||
| 493 | |||
| 494 | struct memcg_cache_array { | 503 | struct memcg_cache_array { |
| 495 | struct rcu_head rcu; | 504 | struct rcu_head rcu; |
| 496 | struct kmem_cache *entries[0]; | 505 | struct kmem_cache *entries[0]; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a156b82dd14c..c2b66a277e98 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -524,7 +524,7 @@ asmlinkage long sys_chown(const char __user *filename, | |||
| 524 | asmlinkage long sys_lchown(const char __user *filename, | 524 | asmlinkage long sys_lchown(const char __user *filename, |
| 525 | uid_t user, gid_t group); | 525 | uid_t user, gid_t group); |
| 526 | asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group); | 526 | asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group); |
| 527 | #ifdef CONFIG_UID16 | 527 | #ifdef CONFIG_HAVE_UID16 |
| 528 | asmlinkage long sys_chown16(const char __user *filename, | 528 | asmlinkage long sys_chown16(const char __user *filename, |
| 529 | old_uid_t user, old_gid_t group); | 529 | old_uid_t user, old_gid_t group); |
| 530 | asmlinkage long sys_lchown16(const char __user *filename, | 530 | asmlinkage long sys_lchown16(const char __user *filename, |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 4014a59828fc..613c29bd6baf 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -438,7 +438,8 @@ static inline void thermal_zone_device_unregister( | |||
| 438 | static inline int thermal_zone_bind_cooling_device( | 438 | static inline int thermal_zone_bind_cooling_device( |
| 439 | struct thermal_zone_device *tz, int trip, | 439 | struct thermal_zone_device *tz, int trip, |
| 440 | struct thermal_cooling_device *cdev, | 440 | struct thermal_cooling_device *cdev, |
| 441 | unsigned long upper, unsigned long lower) | 441 | unsigned long upper, unsigned long lower, |
| 442 | unsigned int weight) | ||
| 442 | { return -ENODEV; } | 443 | { return -ENODEV; } |
| 443 | static inline int thermal_zone_unbind_cooling_device( | 444 | static inline int thermal_zone_unbind_cooling_device( |
| 444 | struct thermal_zone_device *tz, int trip, | 445 | struct thermal_zone_device *tz, int trip, |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 5b04b0a5375b..5e31f1b99037 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -607,7 +607,7 @@ extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops); | |||
| 607 | 607 | ||
| 608 | /* tty_audit.c */ | 608 | /* tty_audit.c */ |
| 609 | #ifdef CONFIG_AUDIT | 609 | #ifdef CONFIG_AUDIT |
| 610 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, | 610 | extern void tty_audit_add_data(struct tty_struct *tty, const void *data, |
| 611 | size_t size, unsigned icanon); | 611 | size_t size, unsigned icanon); |
| 612 | extern void tty_audit_exit(void); | 612 | extern void tty_audit_exit(void); |
| 613 | extern void tty_audit_fork(struct signal_struct *sig); | 613 | extern void tty_audit_fork(struct signal_struct *sig); |
| @@ -615,8 +615,8 @@ extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); | |||
| 615 | extern void tty_audit_push(struct tty_struct *tty); | 615 | extern void tty_audit_push(struct tty_struct *tty); |
| 616 | extern int tty_audit_push_current(void); | 616 | extern int tty_audit_push_current(void); |
| 617 | #else | 617 | #else |
| 618 | static inline void tty_audit_add_data(struct tty_struct *tty, | 618 | static inline void tty_audit_add_data(struct tty_struct *tty, const void *data, |
| 619 | unsigned char *data, size_t size, unsigned icanon) | 619 | size_t size, unsigned icanon) |
| 620 | { | 620 | { |
| 621 | } | 621 | } |
| 622 | static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) | 622 | static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) |
diff --git a/include/linux/types.h b/include/linux/types.h index 70d8500bddf1..70dd3dfde631 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
| @@ -35,7 +35,7 @@ typedef __kernel_gid16_t gid16_t; | |||
| 35 | 35 | ||
| 36 | typedef unsigned long uintptr_t; | 36 | typedef unsigned long uintptr_t; |
| 37 | 37 | ||
| 38 | #ifdef CONFIG_UID16 | 38 | #ifdef CONFIG_HAVE_UID16 |
| 39 | /* This is defined by include/asm-{arch}/posix_types.h */ | 39 | /* This is defined by include/asm-{arch}/posix_types.h */ |
| 40 | typedef __kernel_old_uid_t old_uid_t; | 40 | typedef __kernel_old_uid_t old_uid_t; |
| 41 | typedef __kernel_old_gid_t old_gid_t; | 41 | typedef __kernel_old_gid_t old_gid_t; |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index b36d837c701e..2a91a0561a47 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
| @@ -62,6 +62,7 @@ struct unix_sock { | |||
| 62 | #define UNIX_GC_CANDIDATE 0 | 62 | #define UNIX_GC_CANDIDATE 0 |
| 63 | #define UNIX_GC_MAYBE_CYCLE 1 | 63 | #define UNIX_GC_MAYBE_CYCLE 1 |
| 64 | struct socket_wq peer_wq; | 64 | struct socket_wq peer_wq; |
| 65 | wait_queue_t peer_wake; | ||
| 65 | }; | 66 | }; |
| 66 | 67 | ||
| 67 | static inline struct unix_sock *unix_sk(const struct sock *sk) | 68 | static inline struct unix_sock *unix_sk(const struct sock *sk) |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 2bfb2ad2fab1..877f682989b8 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
| @@ -133,27 +133,18 @@ void rt6_clean_tohost(struct net *net, struct in6_addr *gateway); | |||
| 133 | /* | 133 | /* |
| 134 | * Store a destination cache entry in a socket | 134 | * Store a destination cache entry in a socket |
| 135 | */ | 135 | */ |
| 136 | static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst, | 136 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, |
| 137 | const struct in6_addr *daddr, | 137 | const struct in6_addr *daddr, |
| 138 | const struct in6_addr *saddr) | 138 | const struct in6_addr *saddr) |
| 139 | { | 139 | { |
| 140 | struct ipv6_pinfo *np = inet6_sk(sk); | 140 | struct ipv6_pinfo *np = inet6_sk(sk); |
| 141 | struct rt6_info *rt = (struct rt6_info *) dst; | ||
| 142 | 141 | ||
| 142 | np->dst_cookie = rt6_get_cookie((struct rt6_info *)dst); | ||
| 143 | sk_setup_caps(sk, dst); | 143 | sk_setup_caps(sk, dst); |
| 144 | np->daddr_cache = daddr; | 144 | np->daddr_cache = daddr; |
| 145 | #ifdef CONFIG_IPV6_SUBTREES | 145 | #ifdef CONFIG_IPV6_SUBTREES |
| 146 | np->saddr_cache = saddr; | 146 | np->saddr_cache = saddr; |
| 147 | #endif | 147 | #endif |
| 148 | np->dst_cookie = rt6_get_cookie(rt); | ||
| 149 | } | ||
| 150 | |||
| 151 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, | ||
| 152 | struct in6_addr *daddr, struct in6_addr *saddr) | ||
| 153 | { | ||
| 154 | spin_lock(&sk->sk_dst_lock); | ||
| 155 | __ip6_dst_store(sk, dst, daddr, saddr); | ||
| 156 | spin_unlock(&sk->sk_dst_lock); | ||
| 157 | } | 148 | } |
| 158 | 149 | ||
| 159 | static inline bool ipv6_unicast_destination(const struct sk_buff *skb) | 150 | static inline bool ipv6_unicast_destination(const struct sk_buff *skb) |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index e1a10b0ac0b0..9a5c9f013784 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -205,6 +205,7 @@ extern rwlock_t ip6_ra_lock; | |||
| 205 | */ | 205 | */ |
| 206 | 206 | ||
| 207 | struct ipv6_txoptions { | 207 | struct ipv6_txoptions { |
| 208 | atomic_t refcnt; | ||
| 208 | /* Length of this structure */ | 209 | /* Length of this structure */ |
| 209 | int tot_len; | 210 | int tot_len; |
| 210 | 211 | ||
| @@ -217,7 +218,7 @@ struct ipv6_txoptions { | |||
| 217 | struct ipv6_opt_hdr *dst0opt; | 218 | struct ipv6_opt_hdr *dst0opt; |
| 218 | struct ipv6_rt_hdr *srcrt; /* Routing Header */ | 219 | struct ipv6_rt_hdr *srcrt; /* Routing Header */ |
| 219 | struct ipv6_opt_hdr *dst1opt; | 220 | struct ipv6_opt_hdr *dst1opt; |
| 220 | 221 | struct rcu_head rcu; | |
| 221 | /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */ | 222 | /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */ |
| 222 | }; | 223 | }; |
| 223 | 224 | ||
| @@ -252,6 +253,24 @@ struct ipv6_fl_socklist { | |||
| 252 | struct rcu_head rcu; | 253 | struct rcu_head rcu; |
| 253 | }; | 254 | }; |
| 254 | 255 | ||
| 256 | static inline struct ipv6_txoptions *txopt_get(const struct ipv6_pinfo *np) | ||
| 257 | { | ||
| 258 | struct ipv6_txoptions *opt; | ||
| 259 | |||
| 260 | rcu_read_lock(); | ||
| 261 | opt = rcu_dereference(np->opt); | ||
| 262 | if (opt && !atomic_inc_not_zero(&opt->refcnt)) | ||
| 263 | opt = NULL; | ||
| 264 | rcu_read_unlock(); | ||
| 265 | return opt; | ||
| 266 | } | ||
| 267 | |||
| 268 | static inline void txopt_put(struct ipv6_txoptions *opt) | ||
| 269 | { | ||
| 270 | if (opt && atomic_dec_and_test(&opt->refcnt)) | ||
| 271 | kfree_rcu(opt, rcu); | ||
| 272 | } | ||
| 273 | |||
| 255 | struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); | 274 | struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); |
| 256 | struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space, | 275 | struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space, |
| 257 | struct ip6_flowlabel *fl, | 276 | struct ip6_flowlabel *fl, |
| @@ -490,6 +509,7 @@ struct ip6_create_arg { | |||
| 490 | u32 user; | 509 | u32 user; |
| 491 | const struct in6_addr *src; | 510 | const struct in6_addr *src; |
| 492 | const struct in6_addr *dst; | 511 | const struct in6_addr *dst; |
| 512 | int iif; | ||
| 493 | u8 ecn; | 513 | u8 ecn; |
| 494 | }; | 514 | }; |
| 495 | 515 | ||
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 82045fca388b..760bc4d5a2cf 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -2003,8 +2003,10 @@ enum ieee80211_hw_flags { | |||
| 2003 | * it shouldn't be set. | 2003 | * it shouldn't be set. |
| 2004 | * | 2004 | * |
| 2005 | * @max_tx_aggregation_subframes: maximum number of subframes in an | 2005 | * @max_tx_aggregation_subframes: maximum number of subframes in an |
| 2006 | * aggregate an HT driver will transmit, used by the peer as a | 2006 | * aggregate an HT driver will transmit. Though ADDBA will advertise |
| 2007 | * hint to size its reorder buffer. | 2007 | * a constant value of 64 as some older APs can crash if the window |
| 2008 | * size is smaller (an example is LinkSys WRT120N with FW v1.0.07 | ||
| 2009 | * build 002 Jun 18 2012). | ||
| 2008 | * | 2010 | * |
| 2009 | * @offchannel_tx_hw_queue: HW queue ID to use for offchannel TX | 2011 | * @offchannel_tx_hw_queue: HW queue ID to use for offchannel TX |
| 2010 | * (if %IEEE80211_HW_QUEUE_CONTROL is set) | 2012 | * (if %IEEE80211_HW_QUEUE_CONTROL is set) |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index bf3937431030..2d8edaad29cb 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
| @@ -181,8 +181,7 @@ void ndisc_cleanup(void); | |||
| 181 | int ndisc_rcv(struct sk_buff *skb); | 181 | int ndisc_rcv(struct sk_buff *skb); |
| 182 | 182 | ||
| 183 | void ndisc_send_ns(struct net_device *dev, const struct in6_addr *solicit, | 183 | void ndisc_send_ns(struct net_device *dev, const struct in6_addr *solicit, |
| 184 | const struct in6_addr *daddr, const struct in6_addr *saddr, | 184 | const struct in6_addr *daddr, const struct in6_addr *saddr); |
| 185 | struct sk_buff *oskb); | ||
| 186 | 185 | ||
| 187 | void ndisc_send_rs(struct net_device *dev, | 186 | void ndisc_send_rs(struct net_device *dev, |
| 188 | const struct in6_addr *saddr, const struct in6_addr *daddr); | 187 | const struct in6_addr *saddr, const struct in6_addr *daddr); |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 4c79ce8c1f92..b2a8e6338576 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
| @@ -61,6 +61,9 @@ struct Qdisc { | |||
| 61 | */ | 61 | */ |
| 62 | #define TCQ_F_WARN_NONWC (1 << 16) | 62 | #define TCQ_F_WARN_NONWC (1 << 16) |
| 63 | #define TCQ_F_CPUSTATS 0x20 /* run using percpu statistics */ | 63 | #define TCQ_F_CPUSTATS 0x20 /* run using percpu statistics */ |
| 64 | #define TCQ_F_NOPARENT 0x40 /* root of its hierarchy : | ||
| 65 | * qdisc_tree_decrease_qlen() should stop. | ||
| 66 | */ | ||
| 64 | u32 limit; | 67 | u32 limit; |
| 65 | const struct Qdisc_ops *ops; | 68 | const struct Qdisc_ops *ops; |
| 66 | struct qdisc_size_table __rcu *stab; | 69 | struct qdisc_size_table __rcu *stab; |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 495c87e367b3..7bbb71081aeb 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -775,10 +775,10 @@ struct sctp_transport { | |||
| 775 | hb_sent:1, | 775 | hb_sent:1, |
| 776 | 776 | ||
| 777 | /* Is the Path MTU update pending on this tranport */ | 777 | /* Is the Path MTU update pending on this tranport */ |
| 778 | pmtu_pending:1; | 778 | pmtu_pending:1, |
| 779 | 779 | ||
| 780 | /* Has this transport moved the ctsn since we last sacked */ | 780 | /* Has this transport moved the ctsn since we last sacked */ |
| 781 | __u32 sack_generation; | 781 | sack_generation:1; |
| 782 | u32 dst_cookie; | 782 | u32 dst_cookie; |
| 783 | 783 | ||
| 784 | struct flowi fl; | 784 | struct flowi fl; |
| @@ -1482,19 +1482,19 @@ struct sctp_association { | |||
| 1482 | prsctp_capable:1, /* Can peer do PR-SCTP? */ | 1482 | prsctp_capable:1, /* Can peer do PR-SCTP? */ |
| 1483 | auth_capable:1; /* Is peer doing SCTP-AUTH? */ | 1483 | auth_capable:1; /* Is peer doing SCTP-AUTH? */ |
| 1484 | 1484 | ||
| 1485 | /* Ack State : This flag indicates if the next received | 1485 | /* sack_needed : This flag indicates if the next received |
| 1486 | * : packet is to be responded to with a | 1486 | * : packet is to be responded to with a |
| 1487 | * : SACK. This is initializedto 0. When a packet | 1487 | * : SACK. This is initialized to 0. When a packet |
| 1488 | * : is received it is incremented. If this value | 1488 | * : is received sack_cnt is incremented. If this value |
| 1489 | * : reaches 2 or more, a SACK is sent and the | 1489 | * : reaches 2 or more, a SACK is sent and the |
| 1490 | * : value is reset to 0. Note: This is used only | 1490 | * : value is reset to 0. Note: This is used only |
| 1491 | * : when no DATA chunks are received out of | 1491 | * : when no DATA chunks are received out of |
| 1492 | * : order. When DATA chunks are out of order, | 1492 | * : order. When DATA chunks are out of order, |
| 1493 | * : SACK's are not delayed (see Section 6). | 1493 | * : SACK's are not delayed (see Section 6). |
| 1494 | */ | 1494 | */ |
| 1495 | __u8 sack_needed; /* Do we need to sack the peer? */ | 1495 | __u8 sack_needed:1, /* Do we need to sack the peer? */ |
| 1496 | sack_generation:1; | ||
| 1496 | __u32 sack_cnt; | 1497 | __u32 sack_cnt; |
| 1497 | __u32 sack_generation; | ||
| 1498 | 1498 | ||
| 1499 | __u32 adaptation_ind; /* Adaptation Code point. */ | 1499 | __u32 adaptation_ind; /* Adaptation Code point. */ |
| 1500 | 1500 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 7f89e4ba18d1..52d27ee924f4 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -254,7 +254,6 @@ struct cg_proto; | |||
| 254 | * @sk_wq: sock wait queue and async head | 254 | * @sk_wq: sock wait queue and async head |
| 255 | * @sk_rx_dst: receive input route used by early demux | 255 | * @sk_rx_dst: receive input route used by early demux |
| 256 | * @sk_dst_cache: destination cache | 256 | * @sk_dst_cache: destination cache |
| 257 | * @sk_dst_lock: destination cache lock | ||
| 258 | * @sk_policy: flow policy | 257 | * @sk_policy: flow policy |
| 259 | * @sk_receive_queue: incoming packets | 258 | * @sk_receive_queue: incoming packets |
| 260 | * @sk_wmem_alloc: transmit queue bytes committed | 259 | * @sk_wmem_alloc: transmit queue bytes committed |
| @@ -384,14 +383,16 @@ struct sock { | |||
| 384 | int sk_rcvbuf; | 383 | int sk_rcvbuf; |
| 385 | 384 | ||
| 386 | struct sk_filter __rcu *sk_filter; | 385 | struct sk_filter __rcu *sk_filter; |
| 387 | struct socket_wq __rcu *sk_wq; | 386 | union { |
| 388 | 387 | struct socket_wq __rcu *sk_wq; | |
| 388 | struct socket_wq *sk_wq_raw; | ||
| 389 | }; | ||
| 389 | #ifdef CONFIG_XFRM | 390 | #ifdef CONFIG_XFRM |
| 390 | struct xfrm_policy *sk_policy[2]; | 391 | struct xfrm_policy *sk_policy[2]; |
| 391 | #endif | 392 | #endif |
| 392 | struct dst_entry *sk_rx_dst; | 393 | struct dst_entry *sk_rx_dst; |
| 393 | struct dst_entry __rcu *sk_dst_cache; | 394 | struct dst_entry __rcu *sk_dst_cache; |
| 394 | spinlock_t sk_dst_lock; | 395 | /* Note: 32bit hole on 64bit arches */ |
| 395 | atomic_t sk_wmem_alloc; | 396 | atomic_t sk_wmem_alloc; |
| 396 | atomic_t sk_omem_alloc; | 397 | atomic_t sk_omem_alloc; |
| 397 | int sk_sndbuf; | 398 | int sk_sndbuf; |
| @@ -2005,10 +2006,27 @@ static inline unsigned long sock_wspace(struct sock *sk) | |||
| 2005 | return amt; | 2006 | return amt; |
| 2006 | } | 2007 | } |
| 2007 | 2008 | ||
| 2008 | static inline void sk_wake_async(struct sock *sk, int how, int band) | 2009 | /* Note: |
| 2010 | * We use sk->sk_wq_raw, from contexts knowing this | ||
| 2011 | * pointer is not NULL and cannot disappear/change. | ||
| 2012 | */ | ||
| 2013 | static inline void sk_set_bit(int nr, struct sock *sk) | ||
| 2009 | { | 2014 | { |
| 2010 | if (sock_flag(sk, SOCK_FASYNC)) | 2015 | set_bit(nr, &sk->sk_wq_raw->flags); |
| 2011 | sock_wake_async(sk->sk_socket, how, band); | 2016 | } |
| 2017 | |||
| 2018 | static inline void sk_clear_bit(int nr, struct sock *sk) | ||
| 2019 | { | ||
| 2020 | clear_bit(nr, &sk->sk_wq_raw->flags); | ||
| 2021 | } | ||
| 2022 | |||
| 2023 | static inline void sk_wake_async(const struct sock *sk, int how, int band) | ||
| 2024 | { | ||
| 2025 | if (sock_flag(sk, SOCK_FASYNC)) { | ||
| 2026 | rcu_read_lock(); | ||
| 2027 | sock_wake_async(rcu_dereference(sk->sk_wq), how, band); | ||
| 2028 | rcu_read_unlock(); | ||
| 2029 | } | ||
| 2012 | } | 2030 | } |
| 2013 | 2031 | ||
| 2014 | /* Since sk_{r,w}mem_alloc sums skb->truesize, even a small frame might | 2032 | /* Since sk_{r,w}mem_alloc sums skb->truesize, even a small frame might |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index ed527121031d..fcfa3d7f5e7e 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
| @@ -668,6 +668,9 @@ struct Scsi_Host { | |||
| 668 | unsigned use_blk_mq:1; | 668 | unsigned use_blk_mq:1; |
| 669 | unsigned use_cmd_list:1; | 669 | unsigned use_cmd_list:1; |
| 670 | 670 | ||
| 671 | /* Host responded with short (<36 bytes) INQUIRY result */ | ||
| 672 | unsigned short_inquiry:1; | ||
| 673 | |||
| 671 | /* | 674 | /* |
| 672 | * Optional work queue to be utilized by the transport | 675 | * Optional work queue to be utilized by the transport |
| 673 | */ | 676 | */ |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 0bd71e2702e3..13c0b2ba1b6c 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
| @@ -10,6 +10,15 @@ struct scsi_transport_template; | |||
| 10 | struct sas_rphy; | 10 | struct sas_rphy; |
| 11 | struct request; | 11 | struct request; |
| 12 | 12 | ||
| 13 | #if !IS_ENABLED(CONFIG_SCSI_SAS_ATTRS) | ||
| 14 | static inline int is_sas_attached(struct scsi_device *sdev) | ||
| 15 | { | ||
| 16 | return 0; | ||
| 17 | } | ||
| 18 | #else | ||
| 19 | extern int is_sas_attached(struct scsi_device *sdev); | ||
| 20 | #endif | ||
| 21 | |||
| 13 | static inline int sas_protocol_ata(enum sas_protocol proto) | 22 | static inline int sas_protocol_ata(enum sas_protocol proto) |
| 14 | { | 23 | { |
| 15 | return ((proto & SAS_PROTOCOL_SATA) || | 24 | return ((proto & SAS_PROTOCOL_SATA) || |
| @@ -180,6 +189,7 @@ extern int sas_phy_add(struct sas_phy *); | |||
| 180 | extern void sas_phy_delete(struct sas_phy *); | 189 | extern void sas_phy_delete(struct sas_phy *); |
| 181 | extern int scsi_is_sas_phy(const struct device *); | 190 | extern int scsi_is_sas_phy(const struct device *); |
| 182 | 191 | ||
| 192 | u64 sas_get_address(struct scsi_device *); | ||
| 183 | unsigned int sas_tlr_supported(struct scsi_device *); | 193 | unsigned int sas_tlr_supported(struct scsi_device *); |
| 184 | unsigned int sas_is_tlr_enabled(struct scsi_device *); | 194 | unsigned int sas_is_tlr_enabled(struct scsi_device *); |
| 185 | void sas_disable_tlr(struct scsi_device *); | 195 | void sas_disable_tlr(struct scsi_device *); |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 7855cfe46b69..95a937eafb79 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
| @@ -398,6 +398,7 @@ int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm, | |||
| 398 | int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm, | 398 | int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm, |
| 399 | const struct snd_soc_dapm_route *route, int num); | 399 | const struct snd_soc_dapm_route *route, int num); |
| 400 | void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w); | 400 | void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w); |
| 401 | void snd_soc_dapm_reset_cache(struct snd_soc_dapm_context *dapm); | ||
| 401 | 402 | ||
| 402 | /* dapm events */ | 403 | /* dapm events */ |
| 403 | void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream, | 404 | void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream, |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 0a2c74008e53..aabf0aca0171 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -474,7 +474,7 @@ struct se_cmd { | |||
| 474 | struct completion cmd_wait_comp; | 474 | struct completion cmd_wait_comp; |
| 475 | const struct target_core_fabric_ops *se_tfo; | 475 | const struct target_core_fabric_ops *se_tfo; |
| 476 | sense_reason_t (*execute_cmd)(struct se_cmd *); | 476 | sense_reason_t (*execute_cmd)(struct se_cmd *); |
| 477 | sense_reason_t (*transport_complete_callback)(struct se_cmd *, bool); | 477 | sense_reason_t (*transport_complete_callback)(struct se_cmd *, bool, int *); |
| 478 | void *protocol_data; | 478 | void *protocol_data; |
| 479 | 479 | ||
| 480 | unsigned char *t_task_cdb; | 480 | unsigned char *t_task_cdb; |
diff --git a/include/uapi/linux/nfs.h b/include/uapi/linux/nfs.h index 654bae3f1a38..5e6296160361 100644 --- a/include/uapi/linux/nfs.h +++ b/include/uapi/linux/nfs.h | |||
| @@ -33,17 +33,6 @@ | |||
| 33 | 33 | ||
| 34 | #define NFS_PIPE_DIRNAME "nfs" | 34 | #define NFS_PIPE_DIRNAME "nfs" |
| 35 | 35 | ||
| 36 | /* NFS ioctls */ | ||
| 37 | /* Let's follow btrfs lead on CLONE to avoid messing userspace */ | ||
| 38 | #define NFS_IOC_CLONE _IOW(0x94, 9, int) | ||
| 39 | #define NFS_IOC_CLONE_RANGE _IOW(0x94, 13, int) | ||
| 40 | |||
| 41 | struct nfs_ioctl_clone_range_args { | ||
| 42 | __s64 src_fd; | ||
| 43 | __u64 src_off, count; | ||
| 44 | __u64 dst_off; | ||
| 45 | }; | ||
| 46 | |||
| 47 | /* | 36 | /* |
| 48 | * NFS stats. The good thing with these values is that NFSv3 errors are | 37 | * NFS stats. The good thing with these values is that NFSv3 errors are |
| 49 | * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which | 38 | * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which |
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 85dedca3dcfb..eeba75395f7d 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h | |||
| @@ -343,7 +343,6 @@ struct ipu_client_platformdata { | |||
| 343 | int di; | 343 | int di; |
| 344 | int dc; | 344 | int dc; |
| 345 | int dp; | 345 | int dp; |
| 346 | int dmfc; | ||
| 347 | int dma[2]; | 346 | int dma[2]; |
| 348 | }; | 347 | }; |
| 349 | 348 | ||
