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/linux | |
| parent | a2746fb16e41b7c8f02aa4d2605ecce97abbebbd (diff) | |
| parent | 3f8d6f2a0797e8c650a47e5c1b5c2601a46f4293 (diff) | |
Merge branch 'jejb-scsi' into misc
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acpi.h | 4 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 5 | ||||
| -rw-r--r-- | include/linux/bpf.h | 5 | ||||
| -rw-r--r-- | include/linux/configfs.h | 10 | ||||
| -rw-r--r-- | include/linux/cpufreq.h | 1 | ||||
| -rw-r--r-- | include/linux/dns_resolver.h | 2 | ||||
| -rw-r--r-- | include/linux/enclosure.h | 4 | ||||
| -rw-r--r-- | include/linux/gfp.h | 2 | ||||
| -rw-r--r-- | include/linux/ipv6.h | 2 | ||||
| -rw-r--r-- | include/linux/kref.h | 33 | ||||
| -rw-r--r-- | include/linux/kvm_host.h | 11 | ||||
| -rw-r--r-- | include/linux/lightnvm.h | 176 | ||||
| -rw-r--r-- | include/linux/net.h | 13 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 3 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 1 | ||||
| -rw-r--r-- | include/linux/of_dma.h | 2 | ||||
| -rw-r--r-- | include/linux/pci.h | 9 | ||||
| -rw-r--r-- | include/linux/scpi_protocol.h | 2 | ||||
| -rw-r--r-- | include/linux/signal.h | 1 | ||||
| -rw-r--r-- | include/linux/slab.h | 45 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 2 | ||||
| -rw-r--r-- | include/linux/thermal.h | 3 | ||||
| -rw-r--r-- | include/linux/tty.h | 6 | ||||
| -rw-r--r-- | include/linux/types.h | 2 |
24 files changed, 139 insertions, 205 deletions
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; |
