diff options
| author | Dave Airlie <airlied@redhat.com> | 2016-09-27 22:08:49 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2016-09-27 22:08:49 -0400 |
| commit | ca09fb9f60b5f3ab2d57e761aaeea89a5147d784 (patch) | |
| tree | 908e42ecf32d2601f4c5c340c6c4626841baa661 /include/linux | |
| parent | 9f4ef05bcdcfdf911b056b471dd3c6a4f331b644 (diff) | |
| parent | 08895a8b6b06ed2323cd97a36ee40a116b3db8ed (diff) | |
Merge tag 'v4.8-rc8' into drm-next
Linux 4.8-rc8
There was a lot of fallout in the imx/amdgpu/i915 drivers, so backmerge
it now to avoid troubles.
* tag 'v4.8-rc8': (1442 commits)
Linux 4.8-rc8
fault_in_multipages_readable() throws set-but-unused error
mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing
radix tree: fix sibling entry handling in radix_tree_descend()
radix tree test suite: Test radix_tree_replace_slot() for multiorder entries
fix memory leaks in tracing_buffers_splice_read()
tracing: Move mutex to protect against resetting of seq data
MIPS: Fix delay slot emulation count in debugfs
MIPS: SMP: Fix possibility of deadlock when bringing CPUs online
mm: delete unnecessary and unsafe init_tlb_ubc()
huge tmpfs: fix Committed_AS leak
shmem: fix tmpfs to handle the huge= option properly
blk-mq: skip unmapped queues in blk_mq_alloc_request_hctx
MIPS: Fix pre-r6 emulation FPU initialisation
arm64: kgdb: handle read-only text / modules
arm64: Call numa_store_cpu_info() earlier.
locking/hung_task: Fix typo in CONFIG_DETECT_HUNG_TASK help text
nvme-rdma: only clear queue flags after successful connect
i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended
perf/core: Limit matching exclusive events to one PMU
...
Diffstat (limited to 'include/linux')
36 files changed, 421 insertions, 162 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 4d8452c2384b..c5eaf2f80a4c 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -1056,7 +1056,7 @@ static inline struct fwnode_handle *acpi_get_next_subnode(struct device *dev, | |||
| 1056 | return NULL; | 1056 | return NULL; |
| 1057 | } | 1057 | } |
| 1058 | 1058 | ||
| 1059 | #define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, validate, data, fn) \ | 1059 | #define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, valid, data, fn) \ |
| 1060 | static const void * __acpi_table_##name[] \ | 1060 | static const void * __acpi_table_##name[] \ |
| 1061 | __attribute__((unused)) \ | 1061 | __attribute__((unused)) \ |
| 1062 | = { (void *) table_id, \ | 1062 | = { (void *) table_id, \ |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 59ffaa68b11b..23ddf4b46a9b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -71,7 +71,8 @@ static inline bool bio_has_data(struct bio *bio) | |||
| 71 | { | 71 | { |
| 72 | if (bio && | 72 | if (bio && |
| 73 | bio->bi_iter.bi_size && | 73 | bio->bi_iter.bi_size && |
| 74 | bio_op(bio) != REQ_OP_DISCARD) | 74 | bio_op(bio) != REQ_OP_DISCARD && |
| 75 | bio_op(bio) != REQ_OP_SECURE_ERASE) | ||
| 75 | return true; | 76 | return true; |
| 76 | 77 | ||
| 77 | return false; | 78 | return false; |
| @@ -79,7 +80,9 @@ static inline bool bio_has_data(struct bio *bio) | |||
| 79 | 80 | ||
| 80 | static inline bool bio_no_advance_iter(struct bio *bio) | 81 | static inline bool bio_no_advance_iter(struct bio *bio) |
| 81 | { | 82 | { |
| 82 | return bio_op(bio) == REQ_OP_DISCARD || bio_op(bio) == REQ_OP_WRITE_SAME; | 83 | return bio_op(bio) == REQ_OP_DISCARD || |
| 84 | bio_op(bio) == REQ_OP_SECURE_ERASE || | ||
| 85 | bio_op(bio) == REQ_OP_WRITE_SAME; | ||
| 83 | } | 86 | } |
| 84 | 87 | ||
| 85 | static inline bool bio_is_rw(struct bio *bio) | 88 | static inline bool bio_is_rw(struct bio *bio) |
| @@ -199,6 +202,9 @@ static inline unsigned bio_segments(struct bio *bio) | |||
| 199 | if (bio_op(bio) == REQ_OP_DISCARD) | 202 | if (bio_op(bio) == REQ_OP_DISCARD) |
| 200 | return 1; | 203 | return 1; |
| 201 | 204 | ||
| 205 | if (bio_op(bio) == REQ_OP_SECURE_ERASE) | ||
| 206 | return 1; | ||
| 207 | |||
| 202 | if (bio_op(bio) == REQ_OP_WRITE_SAME) | 208 | if (bio_op(bio) == REQ_OP_WRITE_SAME) |
| 203 | return 1; | 209 | return 1; |
| 204 | 210 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2c210b6a7bcf..e79055c8b577 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -882,7 +882,7 @@ static inline unsigned int blk_rq_cur_sectors(const struct request *rq) | |||
| 882 | static inline unsigned int blk_queue_get_max_sectors(struct request_queue *q, | 882 | static inline unsigned int blk_queue_get_max_sectors(struct request_queue *q, |
| 883 | int op) | 883 | int op) |
| 884 | { | 884 | { |
| 885 | if (unlikely(op == REQ_OP_DISCARD)) | 885 | if (unlikely(op == REQ_OP_DISCARD || op == REQ_OP_SECURE_ERASE)) |
| 886 | return min(q->limits.max_discard_sectors, UINT_MAX >> 9); | 886 | return min(q->limits.max_discard_sectors, UINT_MAX >> 9); |
| 887 | 887 | ||
| 888 | if (unlikely(op == REQ_OP_WRITE_SAME)) | 888 | if (unlikely(op == REQ_OP_WRITE_SAME)) |
| @@ -913,7 +913,9 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq, | |||
| 913 | if (unlikely(rq->cmd_type != REQ_TYPE_FS)) | 913 | if (unlikely(rq->cmd_type != REQ_TYPE_FS)) |
| 914 | return q->limits.max_hw_sectors; | 914 | return q->limits.max_hw_sectors; |
| 915 | 915 | ||
| 916 | if (!q->limits.chunk_sectors || (req_op(rq) == REQ_OP_DISCARD)) | 916 | if (!q->limits.chunk_sectors || |
| 917 | req_op(rq) == REQ_OP_DISCARD || | ||
| 918 | req_op(rq) == REQ_OP_SECURE_ERASE) | ||
| 917 | return blk_queue_get_max_sectors(q, req_op(rq)); | 919 | return blk_queue_get_max_sectors(q, req_op(rq)); |
| 918 | 920 | ||
| 919 | return min(blk_max_size_offset(q, offset), | 921 | return min(blk_max_size_offset(q, offset), |
diff --git a/include/linux/cec-funcs.h b/include/linux/cec-funcs.h index 82c3d3b7269d..138bbf721e70 100644 --- a/include/linux/cec-funcs.h +++ b/include/linux/cec-funcs.h | |||
| @@ -162,10 +162,11 @@ static inline void cec_msg_standby(struct cec_msg *msg) | |||
| 162 | 162 | ||
| 163 | 163 | ||
| 164 | /* One Touch Record Feature */ | 164 | /* One Touch Record Feature */ |
| 165 | static inline void cec_msg_record_off(struct cec_msg *msg) | 165 | static inline void cec_msg_record_off(struct cec_msg *msg, bool reply) |
| 166 | { | 166 | { |
| 167 | msg->len = 2; | 167 | msg->len = 2; |
| 168 | msg->msg[1] = CEC_MSG_RECORD_OFF; | 168 | msg->msg[1] = CEC_MSG_RECORD_OFF; |
| 169 | msg->reply = reply ? CEC_MSG_RECORD_STATUS : 0; | ||
| 169 | } | 170 | } |
| 170 | 171 | ||
| 171 | struct cec_op_arib_data { | 172 | struct cec_op_arib_data { |
| @@ -227,7 +228,7 @@ static inline void cec_set_digital_service_id(__u8 *msg, | |||
| 227 | if (digital->service_id_method == CEC_OP_SERVICE_ID_METHOD_BY_CHANNEL) { | 228 | if (digital->service_id_method == CEC_OP_SERVICE_ID_METHOD_BY_CHANNEL) { |
| 228 | *msg++ = (digital->channel.channel_number_fmt << 2) | | 229 | *msg++ = (digital->channel.channel_number_fmt << 2) | |
| 229 | (digital->channel.major >> 8); | 230 | (digital->channel.major >> 8); |
| 230 | *msg++ = digital->channel.major && 0xff; | 231 | *msg++ = digital->channel.major & 0xff; |
| 231 | *msg++ = digital->channel.minor >> 8; | 232 | *msg++ = digital->channel.minor >> 8; |
| 232 | *msg++ = digital->channel.minor & 0xff; | 233 | *msg++ = digital->channel.minor & 0xff; |
| 233 | *msg++ = 0; | 234 | *msg++ = 0; |
| @@ -323,6 +324,7 @@ static inline void cec_msg_record_on_phys_addr(struct cec_msg *msg, | |||
| 323 | } | 324 | } |
| 324 | 325 | ||
| 325 | static inline void cec_msg_record_on(struct cec_msg *msg, | 326 | static inline void cec_msg_record_on(struct cec_msg *msg, |
| 327 | bool reply, | ||
| 326 | const struct cec_op_record_src *rec_src) | 328 | const struct cec_op_record_src *rec_src) |
| 327 | { | 329 | { |
| 328 | switch (rec_src->type) { | 330 | switch (rec_src->type) { |
| @@ -346,6 +348,7 @@ static inline void cec_msg_record_on(struct cec_msg *msg, | |||
| 346 | rec_src->ext_phys_addr.phys_addr); | 348 | rec_src->ext_phys_addr.phys_addr); |
| 347 | break; | 349 | break; |
| 348 | } | 350 | } |
| 351 | msg->reply = reply ? CEC_MSG_RECORD_STATUS : 0; | ||
| 349 | } | 352 | } |
| 350 | 353 | ||
| 351 | static inline void cec_ops_record_on(const struct cec_msg *msg, | 354 | static inline void cec_ops_record_on(const struct cec_msg *msg, |
| @@ -1141,6 +1144,75 @@ static inline void cec_msg_give_device_vendor_id(struct cec_msg *msg, | |||
| 1141 | msg->reply = reply ? CEC_MSG_DEVICE_VENDOR_ID : 0; | 1144 | msg->reply = reply ? CEC_MSG_DEVICE_VENDOR_ID : 0; |
| 1142 | } | 1145 | } |
| 1143 | 1146 | ||
| 1147 | static inline void cec_msg_vendor_command(struct cec_msg *msg, | ||
| 1148 | __u8 size, const __u8 *vendor_cmd) | ||
| 1149 | { | ||
| 1150 | if (size > 14) | ||
| 1151 | size = 14; | ||
| 1152 | msg->len = 2 + size; | ||
| 1153 | msg->msg[1] = CEC_MSG_VENDOR_COMMAND; | ||
| 1154 | memcpy(msg->msg + 2, vendor_cmd, size); | ||
| 1155 | } | ||
| 1156 | |||
| 1157 | static inline void cec_ops_vendor_command(const struct cec_msg *msg, | ||
| 1158 | __u8 *size, | ||
| 1159 | const __u8 **vendor_cmd) | ||
| 1160 | { | ||
| 1161 | *size = msg->len - 2; | ||
| 1162 | |||
| 1163 | if (*size > 14) | ||
| 1164 | *size = 14; | ||
| 1165 | *vendor_cmd = msg->msg + 2; | ||
| 1166 | } | ||
| 1167 | |||
| 1168 | static inline void cec_msg_vendor_command_with_id(struct cec_msg *msg, | ||
| 1169 | __u32 vendor_id, __u8 size, | ||
| 1170 | const __u8 *vendor_cmd) | ||
| 1171 | { | ||
| 1172 | if (size > 11) | ||
| 1173 | size = 11; | ||
| 1174 | msg->len = 5 + size; | ||
| 1175 | msg->msg[1] = CEC_MSG_VENDOR_COMMAND_WITH_ID; | ||
| 1176 | msg->msg[2] = vendor_id >> 16; | ||
| 1177 | msg->msg[3] = (vendor_id >> 8) & 0xff; | ||
| 1178 | msg->msg[4] = vendor_id & 0xff; | ||
| 1179 | memcpy(msg->msg + 5, vendor_cmd, size); | ||
| 1180 | } | ||
| 1181 | |||
| 1182 | static inline void cec_ops_vendor_command_with_id(const struct cec_msg *msg, | ||
| 1183 | __u32 *vendor_id, __u8 *size, | ||
| 1184 | const __u8 **vendor_cmd) | ||
| 1185 | { | ||
| 1186 | *size = msg->len - 5; | ||
| 1187 | |||
| 1188 | if (*size > 11) | ||
| 1189 | *size = 11; | ||
| 1190 | *vendor_id = (msg->msg[2] << 16) | (msg->msg[3] << 8) | msg->msg[4]; | ||
| 1191 | *vendor_cmd = msg->msg + 5; | ||
| 1192 | } | ||
| 1193 | |||
| 1194 | static inline void cec_msg_vendor_remote_button_down(struct cec_msg *msg, | ||
| 1195 | __u8 size, | ||
| 1196 | const __u8 *rc_code) | ||
| 1197 | { | ||
| 1198 | if (size > 14) | ||
| 1199 | size = 14; | ||
| 1200 | msg->len = 2 + size; | ||
| 1201 | msg->msg[1] = CEC_MSG_VENDOR_REMOTE_BUTTON_DOWN; | ||
| 1202 | memcpy(msg->msg + 2, rc_code, size); | ||
| 1203 | } | ||
| 1204 | |||
| 1205 | static inline void cec_ops_vendor_remote_button_down(const struct cec_msg *msg, | ||
| 1206 | __u8 *size, | ||
| 1207 | const __u8 **rc_code) | ||
| 1208 | { | ||
| 1209 | *size = msg->len - 2; | ||
| 1210 | |||
| 1211 | if (*size > 14) | ||
| 1212 | *size = 14; | ||
| 1213 | *rc_code = msg->msg + 2; | ||
| 1214 | } | ||
| 1215 | |||
| 1144 | static inline void cec_msg_vendor_remote_button_up(struct cec_msg *msg) | 1216 | static inline void cec_msg_vendor_remote_button_up(struct cec_msg *msg) |
| 1145 | { | 1217 | { |
| 1146 | msg->len = 2; | 1218 | msg->len = 2; |
| @@ -1277,7 +1349,7 @@ static inline void cec_msg_user_control_pressed(struct cec_msg *msg, | |||
| 1277 | msg->len += 4; | 1349 | msg->len += 4; |
| 1278 | msg->msg[3] = (ui_cmd->channel_identifier.channel_number_fmt << 2) | | 1350 | msg->msg[3] = (ui_cmd->channel_identifier.channel_number_fmt << 2) | |
| 1279 | (ui_cmd->channel_identifier.major >> 8); | 1351 | (ui_cmd->channel_identifier.major >> 8); |
| 1280 | msg->msg[4] = ui_cmd->channel_identifier.major && 0xff; | 1352 | msg->msg[4] = ui_cmd->channel_identifier.major & 0xff; |
| 1281 | msg->msg[5] = ui_cmd->channel_identifier.minor >> 8; | 1353 | msg->msg[5] = ui_cmd->channel_identifier.minor >> 8; |
| 1282 | msg->msg[6] = ui_cmd->channel_identifier.minor & 0xff; | 1354 | msg->msg[6] = ui_cmd->channel_identifier.minor & 0xff; |
| 1283 | break; | 1355 | break; |
diff --git a/include/linux/cec.h b/include/linux/cec.h index b3e22893a002..851968e803fa 100644 --- a/include/linux/cec.h +++ b/include/linux/cec.h | |||
| @@ -364,7 +364,7 @@ struct cec_caps { | |||
| 364 | * @num_log_addrs: how many logical addresses should be claimed. Set by the | 364 | * @num_log_addrs: how many logical addresses should be claimed. Set by the |
| 365 | * caller. | 365 | * caller. |
| 366 | * @vendor_id: the vendor ID of the device. Set by the caller. | 366 | * @vendor_id: the vendor ID of the device. Set by the caller. |
| 367 | * @flags: set to 0. | 367 | * @flags: flags. |
| 368 | * @osd_name: the OSD name of the device. Set by the caller. | 368 | * @osd_name: the OSD name of the device. Set by the caller. |
| 369 | * @primary_device_type: the primary device type for each logical address. | 369 | * @primary_device_type: the primary device type for each logical address. |
| 370 | * Set by the caller. | 370 | * Set by the caller. |
| @@ -389,6 +389,9 @@ struct cec_log_addrs { | |||
| 389 | __u8 features[CEC_MAX_LOG_ADDRS][12]; | 389 | __u8 features[CEC_MAX_LOG_ADDRS][12]; |
| 390 | }; | 390 | }; |
| 391 | 391 | ||
| 392 | /* Allow a fallback to unregistered */ | ||
| 393 | #define CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK (1 << 0) | ||
| 394 | |||
| 392 | /* Events */ | 395 | /* Events */ |
| 393 | 396 | ||
| 394 | /* Event that occurs when the adapter state changes */ | 397 | /* Event that occurs when the adapter state changes */ |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index e2949397c19b..573c5a18908f 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -158,7 +158,7 @@ | |||
| 158 | #define __compiler_offsetof(a, b) \ | 158 | #define __compiler_offsetof(a, b) \ |
| 159 | __builtin_offsetof(a, b) | 159 | __builtin_offsetof(a, b) |
| 160 | 160 | ||
| 161 | #if GCC_VERSION >= 40100 && GCC_VERSION < 40600 | 161 | #if GCC_VERSION >= 40100 |
| 162 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 162 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
| 163 | #endif | 163 | #endif |
| 164 | 164 | ||
| @@ -242,7 +242,11 @@ | |||
| 242 | */ | 242 | */ |
| 243 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | 243 | #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) |
| 244 | 244 | ||
| 245 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | 245 | /* |
| 246 | * sparse (__CHECKER__) pretends to be gcc, but can't do constant | ||
| 247 | * folding in __builtin_bswap*() (yet), so don't set these for it. | ||
| 248 | */ | ||
| 249 | #if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__) | ||
| 246 | #if GCC_VERSION >= 40400 | 250 | #if GCC_VERSION >= 40400 |
| 247 | #define __HAVE_BUILTIN_BSWAP32__ | 251 | #define __HAVE_BUILTIN_BSWAP32__ |
| 248 | #define __HAVE_BUILTIN_BSWAP64__ | 252 | #define __HAVE_BUILTIN_BSWAP64__ |
| @@ -250,7 +254,7 @@ | |||
| 250 | #if GCC_VERSION >= 40800 | 254 | #if GCC_VERSION >= 40800 |
| 251 | #define __HAVE_BUILTIN_BSWAP16__ | 255 | #define __HAVE_BUILTIN_BSWAP16__ |
| 252 | #endif | 256 | #endif |
| 253 | #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | 257 | #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP && !__CHECKER__ */ |
| 254 | 258 | ||
| 255 | #if GCC_VERSION >= 50000 | 259 | #if GCC_VERSION >= 50000 |
| 256 | #define KASAN_ABI_VERSION 4 | 260 | #define KASAN_ABI_VERSION 4 |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 1bb954842725..668569844d37 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -527,13 +527,14 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s | |||
| 527 | * object's lifetime is managed by something other than RCU. That | 527 | * object's lifetime is managed by something other than RCU. That |
| 528 | * "something other" might be reference counting or simple immortality. | 528 | * "something other" might be reference counting or simple immortality. |
| 529 | * | 529 | * |
| 530 | * The seemingly unused void * variable is to validate @p is indeed a pointer | 530 | * The seemingly unused variable ___typecheck_p validates that @p is |
| 531 | * type. All pointer types silently cast to void *. | 531 | * indeed a pointer type by using a pointer to typeof(*p) as the type. |
| 532 | * Taking a pointer to typeof(*p) again is needed in case p is void *. | ||
| 532 | */ | 533 | */ |
| 533 | #define lockless_dereference(p) \ | 534 | #define lockless_dereference(p) \ |
| 534 | ({ \ | 535 | ({ \ |
| 535 | typeof(p) _________p1 = READ_ONCE(p); \ | 536 | typeof(p) _________p1 = READ_ONCE(p); \ |
| 536 | __maybe_unused const void * const _________p2 = _________p1; \ | 537 | typeof(*(p)) *___typecheck_p __maybe_unused; \ |
| 537 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ | 538 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ |
| 538 | (_________p1); \ | 539 | (_________p1); \ |
| 539 | }) | 540 | }) |
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index 242bf530edfc..34bd80512a0c 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef __CPUHOTPLUG_H | 1 | #ifndef __CPUHOTPLUG_H |
| 2 | #define __CPUHOTPLUG_H | 2 | #define __CPUHOTPLUG_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum cpuhp_state { | 6 | enum cpuhp_state { |
| 5 | CPUHP_OFFLINE, | 7 | CPUHP_OFFLINE, |
| 6 | CPUHP_CREATE_THREADS, | 8 | CPUHP_CREATE_THREADS, |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 7f5a58225385..0148a3046b48 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -118,6 +118,15 @@ typedef struct { | |||
| 118 | u32 imagesize; | 118 | u32 imagesize; |
| 119 | } efi_capsule_header_t; | 119 | } efi_capsule_header_t; |
| 120 | 120 | ||
| 121 | struct efi_boot_memmap { | ||
| 122 | efi_memory_desc_t **map; | ||
| 123 | unsigned long *map_size; | ||
| 124 | unsigned long *desc_size; | ||
| 125 | u32 *desc_ver; | ||
| 126 | unsigned long *key_ptr; | ||
| 127 | unsigned long *buff_size; | ||
| 128 | }; | ||
| 129 | |||
| 121 | /* | 130 | /* |
| 122 | * EFI capsule flags | 131 | * EFI capsule flags |
| 123 | */ | 132 | */ |
| @@ -946,7 +955,7 @@ extern int efi_memattr_apply_permissions(struct mm_struct *mm, | |||
| 946 | /* Iterate through an efi_memory_map */ | 955 | /* Iterate through an efi_memory_map */ |
| 947 | #define for_each_efi_memory_desc_in_map(m, md) \ | 956 | #define for_each_efi_memory_desc_in_map(m, md) \ |
| 948 | for ((md) = (m)->map; \ | 957 | for ((md) = (m)->map; \ |
| 949 | ((void *)(md) + (m)->desc_size) <= (m)->map_end; \ | 958 | (md) && ((void *)(md) + (m)->desc_size) <= (m)->map_end; \ |
| 950 | (md) = (void *)(md) + (m)->desc_size) | 959 | (md) = (void *)(md) + (m)->desc_size) |
| 951 | 960 | ||
| 952 | /** | 961 | /** |
| @@ -1371,11 +1380,7 @@ char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, | |||
| 1371 | efi_loaded_image_t *image, int *cmd_line_len); | 1380 | efi_loaded_image_t *image, int *cmd_line_len); |
| 1372 | 1381 | ||
| 1373 | efi_status_t efi_get_memory_map(efi_system_table_t *sys_table_arg, | 1382 | efi_status_t efi_get_memory_map(efi_system_table_t *sys_table_arg, |
| 1374 | efi_memory_desc_t **map, | 1383 | struct efi_boot_memmap *map); |
| 1375 | unsigned long *map_size, | ||
| 1376 | unsigned long *desc_size, | ||
| 1377 | u32 *desc_ver, | ||
| 1378 | unsigned long *key_ptr); | ||
| 1379 | 1384 | ||
| 1380 | efi_status_t efi_low_alloc(efi_system_table_t *sys_table_arg, | 1385 | efi_status_t efi_low_alloc(efi_system_table_t *sys_table_arg, |
| 1381 | unsigned long size, unsigned long align, | 1386 | unsigned long size, unsigned long align, |
| @@ -1457,4 +1462,14 @@ extern void efi_call_virt_check_flags(unsigned long flags, const char *call); | |||
| 1457 | arch_efi_call_virt_teardown(); \ | 1462 | arch_efi_call_virt_teardown(); \ |
| 1458 | }) | 1463 | }) |
| 1459 | 1464 | ||
| 1465 | typedef efi_status_t (*efi_exit_boot_map_processing)( | ||
| 1466 | efi_system_table_t *sys_table_arg, | ||
| 1467 | struct efi_boot_memmap *map, | ||
| 1468 | void *priv); | ||
| 1469 | |||
| 1470 | efi_status_t efi_exit_boot_services(efi_system_table_t *sys_table, | ||
| 1471 | void *handle, | ||
| 1472 | struct efi_boot_memmap *map, | ||
| 1473 | void *priv, | ||
| 1474 | efi_exit_boot_map_processing priv_func); | ||
| 1460 | #endif /* _LINUX_EFI_H */ | 1475 | #endif /* _LINUX_EFI_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3523bf62f328..901e25d495cc 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -574,6 +574,7 @@ static inline void mapping_allow_writable(struct address_space *mapping) | |||
| 574 | 574 | ||
| 575 | struct posix_acl; | 575 | struct posix_acl; |
| 576 | #define ACL_NOT_CACHED ((void *)(-1)) | 576 | #define ACL_NOT_CACHED ((void *)(-1)) |
| 577 | #define ACL_DONT_CACHE ((void *)(-3)) | ||
| 577 | 578 | ||
| 578 | static inline struct posix_acl * | 579 | static inline struct posix_acl * |
| 579 | uncached_acl_sentinel(struct task_struct *task) | 580 | uncached_acl_sentinel(struct task_struct *task) |
diff --git a/include/linux/fscrypto.h b/include/linux/fscrypto.h index cfa6cde25f8e..76cff18bb032 100644 --- a/include/linux/fscrypto.h +++ b/include/linux/fscrypto.h | |||
| @@ -274,8 +274,7 @@ extern void fscrypt_restore_control_page(struct page *); | |||
| 274 | extern int fscrypt_zeroout_range(struct inode *, pgoff_t, sector_t, | 274 | extern int fscrypt_zeroout_range(struct inode *, pgoff_t, sector_t, |
| 275 | unsigned int); | 275 | unsigned int); |
| 276 | /* policy.c */ | 276 | /* policy.c */ |
| 277 | extern int fscrypt_process_policy(struct inode *, | 277 | extern int fscrypt_process_policy(struct file *, const struct fscrypt_policy *); |
| 278 | const struct fscrypt_policy *); | ||
| 279 | extern int fscrypt_get_policy(struct inode *, struct fscrypt_policy *); | 278 | extern int fscrypt_get_policy(struct inode *, struct fscrypt_policy *); |
| 280 | extern int fscrypt_has_permitted_context(struct inode *, struct inode *); | 279 | extern int fscrypt_has_permitted_context(struct inode *, struct inode *); |
| 281 | extern int fscrypt_inherit_context(struct inode *, struct inode *, | 280 | extern int fscrypt_inherit_context(struct inode *, struct inode *, |
| @@ -345,7 +344,7 @@ static inline int fscrypt_notsupp_zeroout_range(struct inode *i, pgoff_t p, | |||
| 345 | } | 344 | } |
| 346 | 345 | ||
| 347 | /* policy.c */ | 346 | /* policy.c */ |
| 348 | static inline int fscrypt_notsupp_process_policy(struct inode *i, | 347 | static inline int fscrypt_notsupp_process_policy(struct file *f, |
| 349 | const struct fscrypt_policy *p) | 348 | const struct fscrypt_policy *p) |
| 350 | { | 349 | { |
| 351 | return -EOPNOTSUPP; | 350 | return -EOPNOTSUPP; |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 58205f33af02..7268ed076be8 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -148,6 +148,7 @@ struct fsnotify_group { | |||
| 148 | #define FS_PRIO_1 1 /* fanotify content based access control */ | 148 | #define FS_PRIO_1 1 /* fanotify content based access control */ |
| 149 | #define FS_PRIO_2 2 /* fanotify pre-content access */ | 149 | #define FS_PRIO_2 2 /* fanotify pre-content access */ |
| 150 | unsigned int priority; | 150 | unsigned int priority; |
| 151 | bool shutdown; /* group is being shut down, don't queue more events */ | ||
| 151 | 152 | ||
| 152 | /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ | 153 | /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ |
| 153 | struct mutex mark_mutex; /* protect marks_list */ | 154 | struct mutex mark_mutex; /* protect marks_list */ |
| @@ -179,7 +180,6 @@ struct fsnotify_group { | |||
| 179 | spinlock_t access_lock; | 180 | spinlock_t access_lock; |
| 180 | struct list_head access_list; | 181 | struct list_head access_list; |
| 181 | wait_queue_head_t access_waitq; | 182 | wait_queue_head_t access_waitq; |
| 182 | atomic_t bypass_perm; | ||
| 183 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ | 183 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ |
| 184 | int f_flags; | 184 | int f_flags; |
| 185 | unsigned int max_marks; | 185 | unsigned int max_marks; |
| @@ -292,6 +292,8 @@ extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *op | |||
| 292 | extern void fsnotify_get_group(struct fsnotify_group *group); | 292 | extern void fsnotify_get_group(struct fsnotify_group *group); |
| 293 | /* drop reference on a group from fsnotify_alloc_group */ | 293 | /* drop reference on a group from fsnotify_alloc_group */ |
| 294 | extern void fsnotify_put_group(struct fsnotify_group *group); | 294 | extern void fsnotify_put_group(struct fsnotify_group *group); |
| 295 | /* group destruction begins, stop queuing new events */ | ||
| 296 | extern void fsnotify_group_stop_queueing(struct fsnotify_group *group); | ||
| 295 | /* destroy group */ | 297 | /* destroy group */ |
| 296 | extern void fsnotify_destroy_group(struct fsnotify_group *group); | 298 | extern void fsnotify_destroy_group(struct fsnotify_group *group); |
| 297 | /* fasync handler function */ | 299 | /* fasync handler function */ |
| @@ -304,8 +306,6 @@ extern int fsnotify_add_event(struct fsnotify_group *group, | |||
| 304 | struct fsnotify_event *event, | 306 | struct fsnotify_event *event, |
| 305 | int (*merge)(struct list_head *, | 307 | int (*merge)(struct list_head *, |
| 306 | struct fsnotify_event *)); | 308 | struct fsnotify_event *)); |
| 307 | /* Remove passed event from groups notification queue */ | ||
| 308 | extern void fsnotify_remove_event(struct fsnotify_group *group, struct fsnotify_event *event); | ||
| 309 | /* true if the group notification queue is empty */ | 309 | /* true if the group notification queue is empty */ |
| 310 | extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group); | 310 | extern bool fsnotify_notify_queue_is_empty(struct fsnotify_group *group); |
| 311 | /* return, but do not dequeue the first event on the notification queue */ | 311 | /* return, but do not dequeue the first event on the notification queue */ |
diff --git a/include/linux/host1x.h b/include/linux/host1x.h index d2ba7d334039..1ffbf2a8cb99 100644 --- a/include/linux/host1x.h +++ b/include/linux/host1x.h | |||
| @@ -304,6 +304,8 @@ struct tegra_mipi_device; | |||
| 304 | 304 | ||
| 305 | struct tegra_mipi_device *tegra_mipi_request(struct device *device); | 305 | struct tegra_mipi_device *tegra_mipi_request(struct device *device); |
| 306 | void tegra_mipi_free(struct tegra_mipi_device *device); | 306 | void tegra_mipi_free(struct tegra_mipi_device *device); |
| 307 | int tegra_mipi_enable(struct tegra_mipi_device *device); | ||
| 308 | int tegra_mipi_disable(struct tegra_mipi_device *device); | ||
| 307 | int tegra_mipi_calibrate(struct tegra_mipi_device *device); | 309 | int tegra_mipi_calibrate(struct tegra_mipi_device *device); |
| 308 | 310 | ||
| 309 | #endif | 311 | #endif |
diff --git a/include/linux/iio/sw_trigger.h b/include/linux/iio/sw_trigger.h index 5198f8ed08a4..c97eab67558f 100644 --- a/include/linux/iio/sw_trigger.h +++ b/include/linux/iio/sw_trigger.h | |||
| @@ -62,7 +62,7 @@ void iio_swt_group_init_type_name(struct iio_sw_trigger *t, | |||
| 62 | const char *name, | 62 | const char *name, |
| 63 | struct config_item_type *type) | 63 | struct config_item_type *type) |
| 64 | { | 64 | { |
| 65 | #ifdef CONFIG_CONFIGFS_FS | 65 | #if IS_ENABLED(CONFIG_CONFIGFS_FS) |
| 66 | config_group_init_type_name(&t->group, name, type); | 66 | config_group_init_type_name(&t->group, name, type); |
| 67 | #endif | 67 | #endif |
| 68 | } | 68 | } |
diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 3267df461012..3d70ece10313 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h | |||
| @@ -19,6 +19,11 @@ struct vm_fault; | |||
| 19 | #define IOMAP_UNWRITTEN 0x04 /* blocks allocated @blkno in unwritten state */ | 19 | #define IOMAP_UNWRITTEN 0x04 /* blocks allocated @blkno in unwritten state */ |
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | * Flags for iomap mappings: | ||
| 23 | */ | ||
| 24 | #define IOMAP_F_MERGED 0x01 /* contains multiple blocks/extents */ | ||
| 25 | |||
| 26 | /* | ||
| 22 | * Magic value for blkno: | 27 | * Magic value for blkno: |
| 23 | */ | 28 | */ |
| 24 | #define IOMAP_NULL_BLOCK -1LL /* blkno is not valid */ | 29 | #define IOMAP_NULL_BLOCK -1LL /* blkno is not valid */ |
| @@ -27,7 +32,8 @@ struct iomap { | |||
| 27 | sector_t blkno; /* 1st sector of mapping, 512b units */ | 32 | sector_t blkno; /* 1st sector of mapping, 512b units */ |
| 28 | loff_t offset; /* file offset of mapping, bytes */ | 33 | loff_t offset; /* file offset of mapping, bytes */ |
| 29 | u64 length; /* length of mapping, bytes */ | 34 | u64 length; /* length of mapping, bytes */ |
| 30 | int type; /* type of mapping */ | 35 | u16 type; /* type of mapping */ |
| 36 | u16 flags; /* flags for mapping */ | ||
| 31 | struct block_device *bdev; /* block device for I/O */ | 37 | struct block_device *bdev; /* block device for I/O */ |
| 32 | }; | 38 | }; |
| 33 | 39 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index b52424eaa0ed..0ac26c892fe2 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -945,6 +945,16 @@ static inline void irq_gc_lock(struct irq_chip_generic *gc) { } | |||
| 945 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } | 945 | static inline void irq_gc_unlock(struct irq_chip_generic *gc) { } |
| 946 | #endif | 946 | #endif |
| 947 | 947 | ||
| 948 | /* | ||
| 949 | * The irqsave variants are for usage in non interrupt code. Do not use | ||
| 950 | * them in irq_chip callbacks. Use irq_gc_lock() instead. | ||
| 951 | */ | ||
| 952 | #define irq_gc_lock_irqsave(gc, flags) \ | ||
| 953 | raw_spin_lock_irqsave(&(gc)->lock, flags) | ||
| 954 | |||
| 955 | #define irq_gc_unlock_irqrestore(gc, flags) \ | ||
| 956 | raw_spin_unlock_irqrestore(&(gc)->lock, flags) | ||
| 957 | |||
| 948 | static inline void irq_reg_writel(struct irq_chip_generic *gc, | 958 | static inline void irq_reg_writel(struct irq_chip_generic *gc, |
| 949 | u32 val, int reg_offset) | 959 | u32 val, int reg_offset) |
| 950 | { | 960 | { |
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index 56b0b7ec66aa..99ac022edc60 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h | |||
| @@ -337,6 +337,7 @@ | |||
| 337 | */ | 337 | */ |
| 338 | #define E_ITS_MOVI_UNMAPPED_INTERRUPT 0x010107 | 338 | #define E_ITS_MOVI_UNMAPPED_INTERRUPT 0x010107 |
| 339 | #define E_ITS_MOVI_UNMAPPED_COLLECTION 0x010109 | 339 | #define E_ITS_MOVI_UNMAPPED_COLLECTION 0x010109 |
| 340 | #define E_ITS_INT_UNMAPPED_INTERRUPT 0x010307 | ||
| 340 | #define E_ITS_CLEAR_UNMAPPED_INTERRUPT 0x010507 | 341 | #define E_ITS_CLEAR_UNMAPPED_INTERRUPT 0x010507 |
| 341 | #define E_ITS_MAPD_DEVICE_OOR 0x010801 | 342 | #define E_ITS_MAPD_DEVICE_OOR 0x010801 |
| 342 | #define E_ITS_MAPC_PROCNUM_OOR 0x010902 | 343 | #define E_ITS_MAPC_PROCNUM_OOR 0x010902 |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 4429d255c8ab..5e5b2969d931 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
| @@ -195,6 +195,7 @@ static inline bool vma_migratable(struct vm_area_struct *vma) | |||
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | extern int mpol_misplaced(struct page *, struct vm_area_struct *, unsigned long); | 197 | extern int mpol_misplaced(struct page *, struct vm_area_struct *, unsigned long); |
| 198 | extern void mpol_put_task_policy(struct task_struct *); | ||
| 198 | 199 | ||
| 199 | #else | 200 | #else |
| 200 | 201 | ||
| @@ -297,5 +298,8 @@ static inline int mpol_misplaced(struct page *page, struct vm_area_struct *vma, | |||
| 297 | return -1; /* no node preference */ | 298 | return -1; /* no node preference */ |
| 298 | } | 299 | } |
| 299 | 300 | ||
| 301 | static inline void mpol_put_task_policy(struct task_struct *task) | ||
| 302 | { | ||
| 303 | } | ||
| 300 | #endif /* CONFIG_NUMA */ | 304 | #endif /* CONFIG_NUMA */ |
| 301 | #endif | 305 | #endif |
diff --git a/include/linux/mfd/da8xx-cfgchip.h b/include/linux/mfd/da8xx-cfgchip.h new file mode 100644 index 000000000000..304985e288d2 --- /dev/null +++ b/include/linux/mfd/da8xx-cfgchip.h | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | /* | ||
| 2 | * TI DaVinci DA8xx CHIPCFGx registers for syscon consumers. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2016 David Lechner <david@lechnology.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __LINUX_MFD_DA8XX_CFGCHIP_H | ||
| 18 | #define __LINUX_MFD_DA8XX_CFGCHIP_H | ||
| 19 | |||
| 20 | #include <linux/bitops.h> | ||
| 21 | |||
| 22 | /* register offset (32-bit registers) */ | ||
| 23 | #define CFGCHIP(n) ((n) * 4) | ||
| 24 | |||
| 25 | /* CFGCHIP0 (PLL0/EDMA3_0) register bits */ | ||
| 26 | #define CFGCHIP0_PLL_MASTER_LOCK BIT(4) | ||
| 27 | #define CFGCHIP0_EDMA30TC1DBS(n) ((n) << 2) | ||
| 28 | #define CFGCHIP0_EDMA30TC1DBS_MASK CFGCHIP0_EDMA30TC1DBS(0x3) | ||
| 29 | #define CFGCHIP0_EDMA30TC1DBS_16 CFGCHIP0_EDMA30TC1DBS(0x0) | ||
| 30 | #define CFGCHIP0_EDMA30TC1DBS_32 CFGCHIP0_EDMA30TC1DBS(0x1) | ||
| 31 | #define CFGCHIP0_EDMA30TC1DBS_64 CFGCHIP0_EDMA30TC1DBS(0x2) | ||
| 32 | #define CFGCHIP0_EDMA30TC0DBS(n) ((n) << 0) | ||
| 33 | #define CFGCHIP0_EDMA30TC0DBS_MASK CFGCHIP0_EDMA30TC0DBS(0x3) | ||
| 34 | #define CFGCHIP0_EDMA30TC0DBS_16 CFGCHIP0_EDMA30TC0DBS(0x0) | ||
| 35 | #define CFGCHIP0_EDMA30TC0DBS_32 CFGCHIP0_EDMA30TC0DBS(0x1) | ||
| 36 | #define CFGCHIP0_EDMA30TC0DBS_64 CFGCHIP0_EDMA30TC0DBS(0x2) | ||
| 37 | |||
| 38 | /* CFGCHIP1 (eCAP/HPI/EDMA3_1/eHRPWM TBCLK/McASP0 AMUTEIN) register bits */ | ||
| 39 | #define CFGCHIP1_CAP2SRC(n) ((n) << 27) | ||
| 40 | #define CFGCHIP1_CAP2SRC_MASK CFGCHIP1_CAP2SRC(0x1f) | ||
| 41 | #define CFGCHIP1_CAP2SRC_ECAP_PIN CFGCHIP1_CAP2SRC(0x0) | ||
| 42 | #define CFGCHIP1_CAP2SRC_MCASP0_TX CFGCHIP1_CAP2SRC(0x1) | ||
| 43 | #define CFGCHIP1_CAP2SRC_MCASP0_RX CFGCHIP1_CAP2SRC(0x2) | ||
| 44 | #define CFGCHIP1_CAP2SRC_EMAC_C0_RX_THRESHOLD CFGCHIP1_CAP2SRC(0x7) | ||
| 45 | #define CFGCHIP1_CAP2SRC_EMAC_C0_RX CFGCHIP1_CAP2SRC(0x8) | ||
| 46 | #define CFGCHIP1_CAP2SRC_EMAC_C0_TX CFGCHIP1_CAP2SRC(0x9) | ||
| 47 | #define CFGCHIP1_CAP2SRC_EMAC_C0_MISC CFGCHIP1_CAP2SRC(0xa) | ||
| 48 | #define CFGCHIP1_CAP2SRC_EMAC_C1_RX_THRESHOLD CFGCHIP1_CAP2SRC(0xb) | ||
| 49 | #define CFGCHIP1_CAP2SRC_EMAC_C1_RX CFGCHIP1_CAP2SRC(0xc) | ||
| 50 | #define CFGCHIP1_CAP2SRC_EMAC_C1_TX CFGCHIP1_CAP2SRC(0xd) | ||
| 51 | #define CFGCHIP1_CAP2SRC_EMAC_C1_MISC CFGCHIP1_CAP2SRC(0xe) | ||
| 52 | #define CFGCHIP1_CAP2SRC_EMAC_C2_RX_THRESHOLD CFGCHIP1_CAP2SRC(0xf) | ||
| 53 | #define CFGCHIP1_CAP2SRC_EMAC_C2_RX CFGCHIP1_CAP2SRC(0x10) | ||
| 54 | #define CFGCHIP1_CAP2SRC_EMAC_C2_TX CFGCHIP1_CAP2SRC(0x11) | ||
| 55 | #define CFGCHIP1_CAP2SRC_EMAC_C2_MISC CFGCHIP1_CAP2SRC(0x12) | ||
| 56 | #define CFGCHIP1_CAP1SRC(n) ((n) << 22) | ||
| 57 | #define CFGCHIP1_CAP1SRC_MASK CFGCHIP1_CAP1SRC(0x1f) | ||
| 58 | #define CFGCHIP1_CAP1SRC_ECAP_PIN CFGCHIP1_CAP1SRC(0x0) | ||
| 59 | #define CFGCHIP1_CAP1SRC_MCASP0_TX CFGCHIP1_CAP1SRC(0x1) | ||
| 60 | #define CFGCHIP1_CAP1SRC_MCASP0_RX CFGCHIP1_CAP1SRC(0x2) | ||
| 61 | #define CFGCHIP1_CAP1SRC_EMAC_C0_RX_THRESHOLD CFGCHIP1_CAP1SRC(0x7) | ||
| 62 | #define CFGCHIP1_CAP1SRC_EMAC_C0_RX CFGCHIP1_CAP1SRC(0x8) | ||
| 63 | #define CFGCHIP1_CAP1SRC_EMAC_C0_TX CFGCHIP1_CAP1SRC(0x9) | ||
| 64 | #define CFGCHIP1_CAP1SRC_EMAC_C0_MISC CFGCHIP1_CAP1SRC(0xa) | ||
| 65 | #define CFGCHIP1_CAP1SRC_EMAC_C1_RX_THRESHOLD CFGCHIP1_CAP1SRC(0xb) | ||
| 66 | #define CFGCHIP1_CAP1SRC_EMAC_C1_RX CFGCHIP1_CAP1SRC(0xc) | ||
| 67 | #define CFGCHIP1_CAP1SRC_EMAC_C1_TX CFGCHIP1_CAP1SRC(0xd) | ||
| 68 | #define CFGCHIP1_CAP1SRC_EMAC_C1_MISC CFGCHIP1_CAP1SRC(0xe) | ||
| 69 | #define CFGCHIP1_CAP1SRC_EMAC_C2_RX_THRESHOLD CFGCHIP1_CAP1SRC(0xf) | ||
| 70 | #define CFGCHIP1_CAP1SRC_EMAC_C2_RX CFGCHIP1_CAP1SRC(0x10) | ||
| 71 | #define CFGCHIP1_CAP1SRC_EMAC_C2_TX CFGCHIP1_CAP1SRC(0x11) | ||
| 72 | #define CFGCHIP1_CAP1SRC_EMAC_C2_MISC CFGCHIP1_CAP1SRC(0x12) | ||
| 73 | #define CFGCHIP1_CAP0SRC(n) ((n) << 17) | ||
| 74 | #define CFGCHIP1_CAP0SRC_MASK CFGCHIP1_CAP0SRC(0x1f) | ||
| 75 | #define CFGCHIP1_CAP0SRC_ECAP_PIN CFGCHIP1_CAP0SRC(0x0) | ||
| 76 | #define CFGCHIP1_CAP0SRC_MCASP0_TX CFGCHIP1_CAP0SRC(0x1) | ||
| 77 | #define CFGCHIP1_CAP0SRC_MCASP0_RX CFGCHIP1_CAP0SRC(0x2) | ||
| 78 | #define CFGCHIP1_CAP0SRC_EMAC_C0_RX_THRESHOLD CFGCHIP1_CAP0SRC(0x7) | ||
| 79 | #define CFGCHIP1_CAP0SRC_EMAC_C0_RX CFGCHIP1_CAP0SRC(0x8) | ||
| 80 | #define CFGCHIP1_CAP0SRC_EMAC_C0_TX CFGCHIP1_CAP0SRC(0x9) | ||
| 81 | #define CFGCHIP1_CAP0SRC_EMAC_C0_MISC CFGCHIP1_CAP0SRC(0xa) | ||
| 82 | #define CFGCHIP1_CAP0SRC_EMAC_C1_RX_THRESHOLD CFGCHIP1_CAP0SRC(0xb) | ||
| 83 | #define CFGCHIP1_CAP0SRC_EMAC_C1_RX CFGCHIP1_CAP0SRC(0xc) | ||
| 84 | #define CFGCHIP1_CAP0SRC_EMAC_C1_TX CFGCHIP1_CAP0SRC(0xd) | ||
| 85 | #define CFGCHIP1_CAP0SRC_EMAC_C1_MISC CFGCHIP1_CAP0SRC(0xe) | ||
| 86 | #define CFGCHIP1_CAP0SRC_EMAC_C2_RX_THRESHOLD CFGCHIP1_CAP0SRC(0xf) | ||
| 87 | #define CFGCHIP1_CAP0SRC_EMAC_C2_RX CFGCHIP1_CAP0SRC(0x10) | ||
| 88 | #define CFGCHIP1_CAP0SRC_EMAC_C2_TX CFGCHIP1_CAP0SRC(0x11) | ||
| 89 | #define CFGCHIP1_CAP0SRC_EMAC_C2_MISC CFGCHIP1_CAP0SRC(0x12) | ||
| 90 | #define CFGCHIP1_HPIBYTEAD BIT(16) | ||
| 91 | #define CFGCHIP1_HPIENA BIT(15) | ||
| 92 | #define CFGCHIP0_EDMA31TC0DBS(n) ((n) << 13) | ||
| 93 | #define CFGCHIP0_EDMA31TC0DBS_MASK CFGCHIP0_EDMA31TC0DBS(0x3) | ||
| 94 | #define CFGCHIP0_EDMA31TC0DBS_16 CFGCHIP0_EDMA31TC0DBS(0x0) | ||
| 95 | #define CFGCHIP0_EDMA31TC0DBS_32 CFGCHIP0_EDMA31TC0DBS(0x1) | ||
| 96 | #define CFGCHIP0_EDMA31TC0DBS_64 CFGCHIP0_EDMA31TC0DBS(0x2) | ||
| 97 | #define CFGCHIP1_TBCLKSYNC BIT(12) | ||
| 98 | #define CFGCHIP1_AMUTESEL0(n) ((n) << 0) | ||
| 99 | #define CFGCHIP1_AMUTESEL0_MASK CFGCHIP1_AMUTESEL0(0xf) | ||
| 100 | #define CFGCHIP1_AMUTESEL0_LOW CFGCHIP1_AMUTESEL0(0x0) | ||
| 101 | #define CFGCHIP1_AMUTESEL0_BANK_0 CFGCHIP1_AMUTESEL0(0x1) | ||
| 102 | #define CFGCHIP1_AMUTESEL0_BANK_1 CFGCHIP1_AMUTESEL0(0x2) | ||
| 103 | #define CFGCHIP1_AMUTESEL0_BANK_2 CFGCHIP1_AMUTESEL0(0x3) | ||
| 104 | #define CFGCHIP1_AMUTESEL0_BANK_3 CFGCHIP1_AMUTESEL0(0x4) | ||
| 105 | #define CFGCHIP1_AMUTESEL0_BANK_4 CFGCHIP1_AMUTESEL0(0x5) | ||
| 106 | #define CFGCHIP1_AMUTESEL0_BANK_5 CFGCHIP1_AMUTESEL0(0x6) | ||
| 107 | #define CFGCHIP1_AMUTESEL0_BANK_6 CFGCHIP1_AMUTESEL0(0x7) | ||
| 108 | #define CFGCHIP1_AMUTESEL0_BANK_7 CFGCHIP1_AMUTESEL0(0x8) | ||
| 109 | |||
| 110 | /* CFGCHIP2 (USB PHY) register bits */ | ||
| 111 | #define CFGCHIP2_PHYCLKGD BIT(17) | ||
| 112 | #define CFGCHIP2_VBUSSENSE BIT(16) | ||
| 113 | #define CFGCHIP2_RESET BIT(15) | ||
| 114 | #define CFGCHIP2_OTGMODE(n) ((n) << 13) | ||
| 115 | #define CFGCHIP2_OTGMODE_MASK CFGCHIP2_OTGMODE(0x3) | ||
| 116 | #define CFGCHIP2_OTGMODE_NO_OVERRIDE CFGCHIP2_OTGMODE(0x0) | ||
| 117 | #define CFGCHIP2_OTGMODE_FORCE_HOST CFGCHIP2_OTGMODE(0x1) | ||
| 118 | #define CFGCHIP2_OTGMODE_FORCE_DEVICE CFGCHIP2_OTGMODE(0x2) | ||
| 119 | #define CFGCHIP2_OTGMODE_FORCE_HOST_VBUS_LOW CFGCHIP2_OTGMODE(0x3) | ||
| 120 | #define CFGCHIP2_USB1PHYCLKMUX BIT(12) | ||
| 121 | #define CFGCHIP2_USB2PHYCLKMUX BIT(11) | ||
| 122 | #define CFGCHIP2_PHYPWRDN BIT(10) | ||
| 123 | #define CFGCHIP2_OTGPWRDN BIT(9) | ||
| 124 | #define CFGCHIP2_DATPOL BIT(8) | ||
| 125 | #define CFGCHIP2_USB1SUSPENDM BIT(7) | ||
| 126 | #define CFGCHIP2_PHY_PLLON BIT(6) | ||
| 127 | #define CFGCHIP2_SESENDEN BIT(5) | ||
| 128 | #define CFGCHIP2_VBDTCTEN BIT(4) | ||
| 129 | #define CFGCHIP2_REFFREQ(n) ((n) << 0) | ||
| 130 | #define CFGCHIP2_REFFREQ_MASK CFGCHIP2_REFFREQ(0xf) | ||
| 131 | #define CFGCHIP2_REFFREQ_12MHZ CFGCHIP2_REFFREQ(0x1) | ||
| 132 | #define CFGCHIP2_REFFREQ_24MHZ CFGCHIP2_REFFREQ(0x2) | ||
| 133 | #define CFGCHIP2_REFFREQ_48MHZ CFGCHIP2_REFFREQ(0x3) | ||
| 134 | #define CFGCHIP2_REFFREQ_19_2MHZ CFGCHIP2_REFFREQ(0x4) | ||
| 135 | #define CFGCHIP2_REFFREQ_38_4MHZ CFGCHIP2_REFFREQ(0x5) | ||
| 136 | #define CFGCHIP2_REFFREQ_13MHZ CFGCHIP2_REFFREQ(0x6) | ||
| 137 | #define CFGCHIP2_REFFREQ_26MHZ CFGCHIP2_REFFREQ(0x7) | ||
| 138 | #define CFGCHIP2_REFFREQ_20MHZ CFGCHIP2_REFFREQ(0x8) | ||
| 139 | #define CFGCHIP2_REFFREQ_40MHZ CFGCHIP2_REFFREQ(0x9) | ||
| 140 | |||
| 141 | /* CFGCHIP3 (EMAC/uPP/PLL1/ASYNC3/PRU/DIV4.5/EMIFA) register bits */ | ||
| 142 | #define CFGCHIP3_RMII_SEL BIT(8) | ||
| 143 | #define CFGCHIP3_UPP_TX_CLKSRC BIT(6) | ||
| 144 | #define CFGCHIP3_PLL1_MASTER_LOCK BIT(5) | ||
| 145 | #define CFGCHIP3_ASYNC3_CLKSRC BIT(4) | ||
| 146 | #define CFGCHIP3_PRUEVTSEL BIT(3) | ||
| 147 | #define CFGCHIP3_DIV45PENA BIT(2) | ||
| 148 | #define CFGCHIP3_EMA_CLKSRC BIT(1) | ||
| 149 | |||
| 150 | /* CFGCHIP4 (McASP0 AMUNTEIN) register bits */ | ||
| 151 | #define CFGCHIP4_AMUTECLR0 BIT(0) | ||
| 152 | |||
| 153 | #endif /* __LINUX_MFD_DA8XX_CFGCHIP_H */ | ||
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index 2567a87872b0..7f55b8b41032 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
| @@ -138,16 +138,16 @@ | |||
| 138 | /* | 138 | /* |
| 139 | * time in us for processing a single channel, calculated as follows: | 139 | * time in us for processing a single channel, calculated as follows: |
| 140 | * | 140 | * |
| 141 | * num cycles = open delay + (sample delay + conv time) * averaging | 141 | * max num cycles = open delay + (sample delay + conv time) * averaging |
| 142 | * | 142 | * |
| 143 | * num cycles: 152 + (1 + 13) * 16 = 376 | 143 | * max num cycles: 262143 + (255 + 13) * 16 = 266431 |
| 144 | * | 144 | * |
| 145 | * clock frequency: 26MHz / 8 = 3.25MHz | 145 | * clock frequency: 26MHz / 8 = 3.25MHz |
| 146 | * clock period: 1 / 3.25MHz = 308ns | 146 | * clock period: 1 / 3.25MHz = 308ns |
| 147 | * | 147 | * |
| 148 | * processing time: 376 * 308ns = 116us | 148 | * max processing time: 266431 * 308ns = 83ms(approx) |
| 149 | */ | 149 | */ |
| 150 | #define IDLE_TIMEOUT 116 /* microsec */ | 150 | #define IDLE_TIMEOUT 83 /* milliseconds */ |
| 151 | 151 | ||
| 152 | #define TSCADC_CELLS 2 | 152 | #define TSCADC_CELLS 2 |
| 153 | 153 | ||
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 21bc4557b67a..d1f9a581aca8 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
| @@ -6710,9 +6710,10 @@ struct mlx5_ifc_pude_reg_bits { | |||
| 6710 | }; | 6710 | }; |
| 6711 | 6711 | ||
| 6712 | struct mlx5_ifc_ptys_reg_bits { | 6712 | struct mlx5_ifc_ptys_reg_bits { |
| 6713 | u8 an_disable_cap[0x1]; | 6713 | u8 reserved_at_0[0x1]; |
| 6714 | u8 an_disable_admin[0x1]; | 6714 | u8 an_disable_admin[0x1]; |
| 6715 | u8 reserved_at_2[0x6]; | 6715 | u8 an_disable_cap[0x1]; |
| 6716 | u8 reserved_at_3[0x5]; | ||
| 6716 | u8 local_port[0x8]; | 6717 | u8 local_port[0x8]; |
| 6717 | u8 reserved_at_10[0xd]; | 6718 | u8 reserved_at_10[0xd]; |
| 6718 | u8 proto_mask[0x3]; | 6719 | u8 proto_mask[0x3]; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 08ed53eeedd5..ef815b9cd426 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -2014,6 +2014,7 @@ extern void mm_drop_all_locks(struct mm_struct *mm); | |||
| 2014 | 2014 | ||
| 2015 | extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); | 2015 | extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); |
| 2016 | extern struct file *get_mm_exe_file(struct mm_struct *mm); | 2016 | extern struct file *get_mm_exe_file(struct mm_struct *mm); |
| 2017 | extern struct file *get_task_exe_file(struct task_struct *task); | ||
| 2017 | 2018 | ||
| 2018 | extern bool may_expand_vm(struct mm_struct *, vm_flags_t, unsigned long npages); | 2019 | extern bool may_expand_vm(struct mm_struct *, vm_flags_t, unsigned long npages); |
| 2019 | extern void vm_stat_account(struct mm_struct *, vm_flags_t, long npages); | 2020 | extern void vm_stat_account(struct mm_struct *, vm_flags_t, long npages); |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index d572b78b65e1..7f2ae99e5daf 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -828,9 +828,21 @@ unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long); | |||
| 828 | */ | 828 | */ |
| 829 | #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) | 829 | #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) |
| 830 | 830 | ||
| 831 | static inline int populated_zone(struct zone *zone) | 831 | /* |
| 832 | * Returns true if a zone has pages managed by the buddy allocator. | ||
| 833 | * All the reclaim decisions have to use this function rather than | ||
| 834 | * populated_zone(). If the whole zone is reserved then we can easily | ||
| 835 | * end up with populated_zone() && !managed_zone(). | ||
| 836 | */ | ||
| 837 | static inline bool managed_zone(struct zone *zone) | ||
| 838 | { | ||
| 839 | return zone->managed_pages; | ||
| 840 | } | ||
| 841 | |||
| 842 | /* Returns true if a zone has memory */ | ||
| 843 | static inline bool populated_zone(struct zone *zone) | ||
| 832 | { | 844 | { |
| 833 | return (!!zone->present_pages); | 845 | return zone->present_pages; |
| 834 | } | 846 | } |
| 835 | 847 | ||
| 836 | extern int movable_zone; | 848 | extern int movable_zone; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 076df5360ba5..e8d79d4ebcfe 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -3267,6 +3267,7 @@ static inline void napi_free_frags(struct napi_struct *napi) | |||
| 3267 | napi->skb = NULL; | 3267 | napi->skb = NULL; |
| 3268 | } | 3268 | } |
| 3269 | 3269 | ||
| 3270 | bool netdev_is_rx_handler_busy(struct net_device *dev); | ||
| 3270 | int netdev_rx_handler_register(struct net_device *dev, | 3271 | int netdev_rx_handler_register(struct net_device *dev, |
| 3271 | rx_handler_func_t *rx_handler, | 3272 | rx_handler_func_t *rx_handler, |
| 3272 | void *rx_handler_data); | 3273 | void *rx_handler_data); |
| @@ -3891,8 +3892,7 @@ void netdev_default_l2upper_neigh_destroy(struct net_device *dev, | |||
| 3891 | extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly; | 3892 | extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly; |
| 3892 | void netdev_rss_key_fill(void *buffer, size_t len); | 3893 | void netdev_rss_key_fill(void *buffer, size_t len); |
| 3893 | 3894 | ||
| 3894 | int dev_get_nest_level(struct net_device *dev, | 3895 | int dev_get_nest_level(struct net_device *dev); |
| 3895 | bool (*type_check)(const struct net_device *dev)); | ||
| 3896 | int skb_checksum_help(struct sk_buff *skb); | 3896 | int skb_checksum_help(struct sk_buff *skb); |
| 3897 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, | 3897 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, |
| 3898 | netdev_features_t features, bool tx_path); | 3898 | netdev_features_t features, bool tx_path); |
diff --git a/include/linux/netfilter/nfnetlink_acct.h b/include/linux/netfilter/nfnetlink_acct.h index 80ca889b164e..664da0048625 100644 --- a/include/linux/netfilter/nfnetlink_acct.h +++ b/include/linux/netfilter/nfnetlink_acct.h | |||
| @@ -15,6 +15,6 @@ struct nf_acct; | |||
| 15 | struct nf_acct *nfnl_acct_find_get(struct net *net, const char *filter_name); | 15 | struct nf_acct *nfnl_acct_find_get(struct net *net, const char *filter_name); |
| 16 | void nfnl_acct_put(struct nf_acct *acct); | 16 | void nfnl_acct_put(struct nf_acct *acct); |
| 17 | void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct); | 17 | void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct); |
| 18 | extern int nfnl_acct_overquota(const struct sk_buff *skb, | 18 | int nfnl_acct_overquota(struct net *net, const struct sk_buff *skb, |
| 19 | struct nf_acct *nfacct); | 19 | struct nf_acct *nfacct); |
| 20 | #endif /* _NFNL_ACCT_H */ | 20 | #endif /* _NFNL_ACCT_H */ |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index d8b37bab2887..7676557ce357 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -794,7 +794,7 @@ struct nvmf_connect_command { | |||
| 794 | }; | 794 | }; |
| 795 | 795 | ||
| 796 | struct nvmf_connect_data { | 796 | struct nvmf_connect_data { |
| 797 | uuid_le hostid; | 797 | uuid_be hostid; |
| 798 | __le16 cntlid; | 798 | __le16 cntlid; |
| 799 | char resv4[238]; | 799 | char resv4[238]; |
| 800 | char subsysnqn[NVMF_NQN_FIELD_LEN]; | 800 | char subsysnqn[NVMF_NQN_FIELD_LEN]; |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 66a1260b33de..01e84436cddf 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -571,56 +571,57 @@ static inline int fault_in_pages_readable(const char __user *uaddr, int size) | |||
| 571 | */ | 571 | */ |
| 572 | static inline int fault_in_multipages_writeable(char __user *uaddr, int size) | 572 | static inline int fault_in_multipages_writeable(char __user *uaddr, int size) |
| 573 | { | 573 | { |
| 574 | int ret = 0; | ||
| 575 | char __user *end = uaddr + size - 1; | 574 | char __user *end = uaddr + size - 1; |
| 576 | 575 | ||
| 577 | if (unlikely(size == 0)) | 576 | if (unlikely(size == 0)) |
| 578 | return ret; | 577 | return 0; |
| 579 | 578 | ||
| 579 | if (unlikely(uaddr > end)) | ||
| 580 | return -EFAULT; | ||
| 580 | /* | 581 | /* |
| 581 | * Writing zeroes into userspace here is OK, because we know that if | 582 | * Writing zeroes into userspace here is OK, because we know that if |
| 582 | * the zero gets there, we'll be overwriting it. | 583 | * the zero gets there, we'll be overwriting it. |
| 583 | */ | 584 | */ |
| 584 | while (uaddr <= end) { | 585 | do { |
| 585 | ret = __put_user(0, uaddr); | 586 | if (unlikely(__put_user(0, uaddr) != 0)) |
| 586 | if (ret != 0) | 587 | return -EFAULT; |
| 587 | return ret; | ||
| 588 | uaddr += PAGE_SIZE; | 588 | uaddr += PAGE_SIZE; |
| 589 | } | 589 | } while (uaddr <= end); |
| 590 | 590 | ||
| 591 | /* Check whether the range spilled into the next page. */ | 591 | /* Check whether the range spilled into the next page. */ |
| 592 | if (((unsigned long)uaddr & PAGE_MASK) == | 592 | if (((unsigned long)uaddr & PAGE_MASK) == |
| 593 | ((unsigned long)end & PAGE_MASK)) | 593 | ((unsigned long)end & PAGE_MASK)) |
| 594 | ret = __put_user(0, end); | 594 | return __put_user(0, end); |
| 595 | 595 | ||
| 596 | return ret; | 596 | return 0; |
| 597 | } | 597 | } |
| 598 | 598 | ||
| 599 | static inline int fault_in_multipages_readable(const char __user *uaddr, | 599 | static inline int fault_in_multipages_readable(const char __user *uaddr, |
| 600 | int size) | 600 | int size) |
| 601 | { | 601 | { |
| 602 | volatile char c; | 602 | volatile char c; |
| 603 | int ret = 0; | ||
| 604 | const char __user *end = uaddr + size - 1; | 603 | const char __user *end = uaddr + size - 1; |
| 605 | 604 | ||
| 606 | if (unlikely(size == 0)) | 605 | if (unlikely(size == 0)) |
| 607 | return ret; | 606 | return 0; |
| 608 | 607 | ||
| 609 | while (uaddr <= end) { | 608 | if (unlikely(uaddr > end)) |
| 610 | ret = __get_user(c, uaddr); | 609 | return -EFAULT; |
| 611 | if (ret != 0) | 610 | |
| 612 | return ret; | 611 | do { |
| 612 | if (unlikely(__get_user(c, uaddr) != 0)) | ||
| 613 | return -EFAULT; | ||
| 613 | uaddr += PAGE_SIZE; | 614 | uaddr += PAGE_SIZE; |
| 614 | } | 615 | } while (uaddr <= end); |
| 615 | 616 | ||
| 616 | /* Check whether the range spilled into the next page. */ | 617 | /* Check whether the range spilled into the next page. */ |
| 617 | if (((unsigned long)uaddr & PAGE_MASK) == | 618 | if (((unsigned long)uaddr & PAGE_MASK) == |
| 618 | ((unsigned long)end & PAGE_MASK)) { | 619 | ((unsigned long)end & PAGE_MASK)) { |
| 619 | ret = __get_user(c, end); | 620 | return __get_user(c, end); |
| 620 | (void)c; | ||
| 621 | } | 621 | } |
| 622 | 622 | ||
| 623 | return ret; | 623 | (void)c; |
| 624 | return 0; | ||
| 624 | } | 625 | } |
| 625 | 626 | ||
| 626 | int add_to_page_cache_locked(struct page *page, struct address_space *mapping, | 627 | int add_to_page_cache_locked(struct page *page, struct address_space *mapping, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 2599a980340f..0ab835965669 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -683,15 +683,6 @@ struct pci_driver { | |||
| 683 | #define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) | 683 | #define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) |
| 684 | 684 | ||
| 685 | /** | 685 | /** |
| 686 | * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table | ||
| 687 | * @_table: device table name | ||
| 688 | * | ||
| 689 | * This macro is deprecated and should not be used in new code. | ||
| 690 | */ | ||
| 691 | #define DEFINE_PCI_DEVICE_TABLE(_table) \ | ||
| 692 | const struct pci_device_id _table[] | ||
| 693 | |||
| 694 | /** | ||
| 695 | * PCI_DEVICE - macro used to describe a specific pci device | 686 | * PCI_DEVICE - macro used to describe a specific pci device |
| 696 | * @vend: the 16 bit PCI Vendor ID | 687 | * @vend: the 16 bit PCI Vendor ID |
| 697 | * @dev: the 16 bit PCI Device ID | 688 | * @dev: the 16 bit PCI Device ID |
| @@ -1251,10 +1242,12 @@ resource_size_t pcibios_iov_resource_alignment(struct pci_dev *dev, int resno); | |||
| 1251 | int pci_set_vga_state(struct pci_dev *pdev, bool decode, | 1242 | int pci_set_vga_state(struct pci_dev *pdev, bool decode, |
| 1252 | unsigned int command_bits, u32 flags); | 1243 | unsigned int command_bits, u32 flags); |
| 1253 | 1244 | ||
| 1254 | #define PCI_IRQ_NOLEGACY (1 << 0) /* don't use legacy interrupts */ | 1245 | #define PCI_IRQ_LEGACY (1 << 0) /* allow legacy interrupts */ |
| 1255 | #define PCI_IRQ_NOMSI (1 << 1) /* don't use MSI interrupts */ | 1246 | #define PCI_IRQ_MSI (1 << 1) /* allow MSI interrupts */ |
| 1256 | #define PCI_IRQ_NOMSIX (1 << 2) /* don't use MSI-X interrupts */ | 1247 | #define PCI_IRQ_MSIX (1 << 2) /* allow MSI-X interrupts */ |
| 1257 | #define PCI_IRQ_NOAFFINITY (1 << 3) /* don't auto-assign affinity */ | 1248 | #define PCI_IRQ_AFFINITY (1 << 3) /* auto-assign affinity */ |
| 1249 | #define PCI_IRQ_ALL_TYPES \ | ||
| 1250 | (PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX) | ||
| 1258 | 1251 | ||
| 1259 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 1252 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
| 1260 | 1253 | ||
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h index b1e3c57c7117..d6c4177df7cb 100644 --- a/include/linux/qed/qed_if.h +++ b/include/linux/qed/qed_if.h | |||
| @@ -70,8 +70,16 @@ struct qed_dbcx_pfc_params { | |||
| 70 | u8 max_tc; | 70 | u8 max_tc; |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | enum qed_dcbx_sf_ieee_type { | ||
| 74 | QED_DCBX_SF_IEEE_ETHTYPE, | ||
| 75 | QED_DCBX_SF_IEEE_TCP_PORT, | ||
| 76 | QED_DCBX_SF_IEEE_UDP_PORT, | ||
| 77 | QED_DCBX_SF_IEEE_TCP_UDP_PORT | ||
| 78 | }; | ||
| 79 | |||
| 73 | struct qed_app_entry { | 80 | struct qed_app_entry { |
| 74 | bool ethtype; | 81 | bool ethtype; |
| 82 | enum qed_dcbx_sf_ieee_type sf_ieee; | ||
| 75 | bool enabled; | 83 | bool enabled; |
| 76 | u8 prio; | 84 | u8 prio; |
| 77 | u16 proto_id; | 85 | u16 proto_id; |
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index de1f64318fc4..fcb4c3646173 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
| @@ -705,70 +705,6 @@ typedef struct sctp_auth_chunk { | |||
| 705 | sctp_authhdr_t auth_hdr; | 705 | sctp_authhdr_t auth_hdr; |
| 706 | } __packed sctp_auth_chunk_t; | 706 | } __packed sctp_auth_chunk_t; |
| 707 | 707 | ||
| 708 | struct sctp_info { | ||
| 709 | __u32 sctpi_tag; | ||
| 710 | __u32 sctpi_state; | ||
| 711 | __u32 sctpi_rwnd; | ||
| 712 | __u16 sctpi_unackdata; | ||
| 713 | __u16 sctpi_penddata; | ||
| 714 | __u16 sctpi_instrms; | ||
| 715 | __u16 sctpi_outstrms; | ||
| 716 | __u32 sctpi_fragmentation_point; | ||
| 717 | __u32 sctpi_inqueue; | ||
| 718 | __u32 sctpi_outqueue; | ||
| 719 | __u32 sctpi_overall_error; | ||
| 720 | __u32 sctpi_max_burst; | ||
| 721 | __u32 sctpi_maxseg; | ||
| 722 | __u32 sctpi_peer_rwnd; | ||
| 723 | __u32 sctpi_peer_tag; | ||
| 724 | __u8 sctpi_peer_capable; | ||
| 725 | __u8 sctpi_peer_sack; | ||
| 726 | __u16 __reserved1; | ||
| 727 | |||
| 728 | /* assoc status info */ | ||
| 729 | __u64 sctpi_isacks; | ||
| 730 | __u64 sctpi_osacks; | ||
| 731 | __u64 sctpi_opackets; | ||
| 732 | __u64 sctpi_ipackets; | ||
| 733 | __u64 sctpi_rtxchunks; | ||
| 734 | __u64 sctpi_outofseqtsns; | ||
| 735 | __u64 sctpi_idupchunks; | ||
| 736 | __u64 sctpi_gapcnt; | ||
| 737 | __u64 sctpi_ouodchunks; | ||
| 738 | __u64 sctpi_iuodchunks; | ||
| 739 | __u64 sctpi_oodchunks; | ||
| 740 | __u64 sctpi_iodchunks; | ||
| 741 | __u64 sctpi_octrlchunks; | ||
| 742 | __u64 sctpi_ictrlchunks; | ||
| 743 | |||
| 744 | /* primary transport info */ | ||
| 745 | struct sockaddr_storage sctpi_p_address; | ||
| 746 | __s32 sctpi_p_state; | ||
| 747 | __u32 sctpi_p_cwnd; | ||
| 748 | __u32 sctpi_p_srtt; | ||
| 749 | __u32 sctpi_p_rto; | ||
| 750 | __u32 sctpi_p_hbinterval; | ||
| 751 | __u32 sctpi_p_pathmaxrxt; | ||
| 752 | __u32 sctpi_p_sackdelay; | ||
| 753 | __u32 sctpi_p_sackfreq; | ||
| 754 | __u32 sctpi_p_ssthresh; | ||
| 755 | __u32 sctpi_p_partial_bytes_acked; | ||
| 756 | __u32 sctpi_p_flight_size; | ||
| 757 | __u16 sctpi_p_error; | ||
| 758 | __u16 __reserved2; | ||
| 759 | |||
| 760 | /* sctp sock info */ | ||
| 761 | __u32 sctpi_s_autoclose; | ||
| 762 | __u32 sctpi_s_adaptation_ind; | ||
| 763 | __u32 sctpi_s_pd_point; | ||
| 764 | __u8 sctpi_s_nodelay; | ||
| 765 | __u8 sctpi_s_disable_fragments; | ||
| 766 | __u8 sctpi_s_v4mapped; | ||
| 767 | __u8 sctpi_s_frag_interleave; | ||
| 768 | __u32 sctpi_s_type; | ||
| 769 | __u32 __reserved3; | ||
| 770 | }; | ||
| 771 | |||
| 772 | struct sctp_infox { | 708 | struct sctp_infox { |
| 773 | struct sctp_info *sctpinfo; | 709 | struct sctp_info *sctpinfo; |
| 774 | struct sctp_association *asoc; | 710 | struct sctp_association *asoc; |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 923266cd294a..48ec7651989b 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
| @@ -111,7 +111,6 @@ struct uart_8250_port { | |||
| 111 | * if no_console_suspend | 111 | * if no_console_suspend |
| 112 | */ | 112 | */ |
| 113 | unsigned char probe; | 113 | unsigned char probe; |
| 114 | struct mctrl_gpios *gpios; | ||
| 115 | #define UART_PROBE_RSA (1 << 0) | 114 | #define UART_PROBE_RSA (1 << 0) |
| 116 | 115 | ||
| 117 | /* | 116 | /* |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6f0b3e0adc73..0f665cb26b50 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -2847,6 +2847,18 @@ static inline int skb_linearize_cow(struct sk_buff *skb) | |||
| 2847 | __skb_linearize(skb) : 0; | 2847 | __skb_linearize(skb) : 0; |
| 2848 | } | 2848 | } |
| 2849 | 2849 | ||
| 2850 | static __always_inline void | ||
| 2851 | __skb_postpull_rcsum(struct sk_buff *skb, const void *start, unsigned int len, | ||
| 2852 | unsigned int off) | ||
| 2853 | { | ||
| 2854 | if (skb->ip_summed == CHECKSUM_COMPLETE) | ||
| 2855 | skb->csum = csum_block_sub(skb->csum, | ||
| 2856 | csum_partial(start, len, 0), off); | ||
| 2857 | else if (skb->ip_summed == CHECKSUM_PARTIAL && | ||
| 2858 | skb_checksum_start_offset(skb) < 0) | ||
| 2859 | skb->ip_summed = CHECKSUM_NONE; | ||
| 2860 | } | ||
| 2861 | |||
| 2850 | /** | 2862 | /** |
| 2851 | * skb_postpull_rcsum - update checksum for received skb after pull | 2863 | * skb_postpull_rcsum - update checksum for received skb after pull |
| 2852 | * @skb: buffer to update | 2864 | * @skb: buffer to update |
| @@ -2857,36 +2869,38 @@ static inline int skb_linearize_cow(struct sk_buff *skb) | |||
| 2857 | * update the CHECKSUM_COMPLETE checksum, or set ip_summed to | 2869 | * update the CHECKSUM_COMPLETE checksum, or set ip_summed to |
| 2858 | * CHECKSUM_NONE so that it can be recomputed from scratch. | 2870 | * CHECKSUM_NONE so that it can be recomputed from scratch. |
| 2859 | */ | 2871 | */ |
| 2860 | |||
| 2861 | static inline void skb_postpull_rcsum(struct sk_buff *skb, | 2872 | static inline void skb_postpull_rcsum(struct sk_buff *skb, |
| 2862 | const void *start, unsigned int len) | 2873 | const void *start, unsigned int len) |
| 2863 | { | 2874 | { |
| 2864 | if (skb->ip_summed == CHECKSUM_COMPLETE) | 2875 | __skb_postpull_rcsum(skb, start, len, 0); |
| 2865 | skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0)); | ||
| 2866 | else if (skb->ip_summed == CHECKSUM_PARTIAL && | ||
| 2867 | skb_checksum_start_offset(skb) < 0) | ||
| 2868 | skb->ip_summed = CHECKSUM_NONE; | ||
| 2869 | } | 2876 | } |
| 2870 | 2877 | ||
| 2871 | unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); | 2878 | static __always_inline void |
| 2879 | __skb_postpush_rcsum(struct sk_buff *skb, const void *start, unsigned int len, | ||
| 2880 | unsigned int off) | ||
| 2881 | { | ||
| 2882 | if (skb->ip_summed == CHECKSUM_COMPLETE) | ||
| 2883 | skb->csum = csum_block_add(skb->csum, | ||
| 2884 | csum_partial(start, len, 0), off); | ||
| 2885 | } | ||
| 2872 | 2886 | ||
| 2887 | /** | ||
| 2888 | * skb_postpush_rcsum - update checksum for received skb after push | ||
| 2889 | * @skb: buffer to update | ||
| 2890 | * @start: start of data after push | ||
| 2891 | * @len: length of data pushed | ||
| 2892 | * | ||
| 2893 | * After doing a push on a received packet, you need to call this to | ||
| 2894 | * update the CHECKSUM_COMPLETE checksum. | ||
| 2895 | */ | ||
| 2873 | static inline void skb_postpush_rcsum(struct sk_buff *skb, | 2896 | static inline void skb_postpush_rcsum(struct sk_buff *skb, |
| 2874 | const void *start, unsigned int len) | 2897 | const void *start, unsigned int len) |
| 2875 | { | 2898 | { |
| 2876 | /* For performing the reverse operation to skb_postpull_rcsum(), | 2899 | __skb_postpush_rcsum(skb, start, len, 0); |
| 2877 | * we can instead of ... | ||
| 2878 | * | ||
| 2879 | * skb->csum = csum_add(skb->csum, csum_partial(start, len, 0)); | ||
| 2880 | * | ||
| 2881 | * ... just use this equivalent version here to save a few | ||
| 2882 | * instructions. Feeding csum of 0 in csum_partial() and later | ||
| 2883 | * on adding skb->csum is equivalent to feed skb->csum in the | ||
| 2884 | * first place. | ||
| 2885 | */ | ||
| 2886 | if (skb->ip_summed == CHECKSUM_COMPLETE) | ||
| 2887 | skb->csum = csum_partial(start, len, skb->csum); | ||
| 2888 | } | 2900 | } |
| 2889 | 2901 | ||
| 2902 | unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); | ||
| 2903 | |||
| 2890 | /** | 2904 | /** |
| 2891 | * skb_push_rcsum - push skb and update receive checksum | 2905 | * skb_push_rcsum - push skb and update receive checksum |
| 2892 | * @skb: buffer to update | 2906 | * @skb: buffer to update |
diff --git a/include/linux/smc91x.h b/include/linux/smc91x.h index 76199b75d584..e302c447e057 100644 --- a/include/linux/smc91x.h +++ b/include/linux/smc91x.h | |||
| @@ -1,6 +1,16 @@ | |||
| 1 | #ifndef __SMC91X_H__ | 1 | #ifndef __SMC91X_H__ |
| 2 | #define __SMC91X_H__ | 2 | #define __SMC91X_H__ |
| 3 | 3 | ||
| 4 | /* | ||
| 5 | * These bits define which access sizes a platform can support, rather | ||
| 6 | * than the maximal access size. So, if your platform can do 16-bit | ||
| 7 | * and 32-bit accesses to the SMC91x device, but not 8-bit, set both | ||
| 8 | * SMC91X_USE_16BIT and SMC91X_USE_32BIT. | ||
| 9 | * | ||
| 10 | * The SMC91x driver requires at least one of SMC91X_USE_8BIT or | ||
| 11 | * SMC91X_USE_16BIT to be supported - just setting SMC91X_USE_32BIT is | ||
| 12 | * an invalid configuration. | ||
| 13 | */ | ||
| 4 | #define SMC91X_USE_8BIT (1 << 0) | 14 | #define SMC91X_USE_8BIT (1 << 0) |
| 5 | #define SMC91X_USE_16BIT (1 << 1) | 15 | #define SMC91X_USE_16BIT (1 << 1) |
| 6 | #define SMC91X_USE_32BIT (1 << 2) | 16 | #define SMC91X_USE_32BIT (1 << 2) |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 697e160c78d0..a4f7203a9017 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -42,6 +42,8 @@ extern int proc_dostring(struct ctl_table *, int, | |||
| 42 | void __user *, size_t *, loff_t *); | 42 | void __user *, size_t *, loff_t *); |
| 43 | extern int proc_dointvec(struct ctl_table *, int, | 43 | extern int proc_dointvec(struct ctl_table *, int, |
| 44 | void __user *, size_t *, loff_t *); | 44 | void __user *, size_t *, loff_t *); |
| 45 | extern int proc_douintvec(struct ctl_table *, int, | ||
| 46 | void __user *, size_t *, loff_t *); | ||
| 45 | extern int proc_dointvec_minmax(struct ctl_table *, int, | 47 | extern int proc_dointvec_minmax(struct ctl_table *, int, |
| 46 | void __user *, size_t *, loff_t *); | 48 | void __user *, size_t *, loff_t *); |
| 47 | extern int proc_dointvec_jiffies(struct ctl_table *, int, | 49 | extern int proc_dointvec_jiffies(struct ctl_table *, int, |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index cbd8990e2e77..2b5b10eed74f 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
| @@ -118,10 +118,11 @@ static inline int arch_within_stack_frames(const void * const stack, | |||
| 118 | extern void __check_object_size(const void *ptr, unsigned long n, | 118 | extern void __check_object_size(const void *ptr, unsigned long n, |
| 119 | bool to_user); | 119 | bool to_user); |
| 120 | 120 | ||
| 121 | static inline void check_object_size(const void *ptr, unsigned long n, | 121 | static __always_inline void check_object_size(const void *ptr, unsigned long n, |
| 122 | bool to_user) | 122 | bool to_user) |
| 123 | { | 123 | { |
| 124 | __check_object_size(ptr, n, to_user); | 124 | if (!__builtin_constant_p(n)) |
| 125 | __check_object_size(ptr, n, to_user); | ||
| 125 | } | 126 | } |
| 126 | #else | 127 | #else |
| 127 | static inline void check_object_size(const void *ptr, unsigned long n, | 128 | static inline void check_object_size(const void *ptr, unsigned long n, |
diff --git a/include/linux/uio.h b/include/linux/uio.h index 1b5d1cd796e2..75b4aaf31a9d 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
| @@ -76,7 +76,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, | |||
| 76 | struct iov_iter *i, unsigned long offset, size_t bytes); | 76 | struct iov_iter *i, unsigned long offset, size_t bytes); |
| 77 | void iov_iter_advance(struct iov_iter *i, size_t bytes); | 77 | void iov_iter_advance(struct iov_iter *i, size_t bytes); |
| 78 | int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); | 78 | int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); |
| 79 | int iov_iter_fault_in_multipages_readable(struct iov_iter *i, size_t bytes); | 79 | #define iov_iter_fault_in_multipages_readable iov_iter_fault_in_readable |
| 80 | size_t iov_iter_single_seg_count(const struct iov_iter *i); | 80 | size_t iov_iter_single_seg_count(const struct iov_iter *i); |
| 81 | size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, | 81 | size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes, |
| 82 | struct iov_iter *i); | 82 | struct iov_iter *i); |
