diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-10-24 07:17:20 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-10-24 07:17:20 -0400 |
| commit | 9babb091e0ec84f7503fde0a2d9a2a16a0f48e3c (patch) | |
| tree | 9b6f07288b9ca9d8444414cd7da291d7c4731da7 /include | |
| parent | 5cdda5117e125e0dbb020425cc55a4c143c6febc (diff) | |
| parent | bb176f67090ca54869fc1262c913aa69d2ede070 (diff) | |
Merge tag 'v4.14-rc6' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/buffer_head.h | 1 | ||||
| -rw-r--r-- | include/linux/filter.h | 2 | ||||
| -rw-r--r-- | include/linux/hyperv.h | 2 | ||||
| -rw-r--r-- | include/linux/input.h | 7 | ||||
| -rw-r--r-- | include/linux/irq.h | 2 | ||||
| -rw-r--r-- | include/linux/irqchip/arm-gic-v3.h | 2 | ||||
| -rw-r--r-- | include/linux/kernel.h | 90 | ||||
| -rw-r--r-- | include/linux/key.h | 47 | ||||
| -rw-r--r-- | include/linux/mbus.h | 4 | ||||
| -rw-r--r-- | include/linux/mm_types.h | 3 | ||||
| -rw-r--r-- | include/linux/mod_devicetable.h | 3 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 3 | ||||
| -rw-r--r-- | include/linux/of.h | 10 | ||||
| -rw-r--r-- | include/linux/rculist.h | 2 | ||||
| -rw-r--r-- | include/linux/rcupdate.h | 22 | ||||
| -rw-r--r-- | include/linux/sched/mm.h | 16 | ||||
| -rw-r--r-- | include/linux/sched/topology.h | 8 | ||||
| -rw-r--r-- | include/linux/srcu.h | 1 | ||||
| -rw-r--r-- | include/linux/thread_info.h | 2 | ||||
| -rw-r--r-- | include/net/inet_sock.h | 2 | ||||
| -rw-r--r-- | include/net/tcp.h | 5 | ||||
| -rw-r--r-- | include/sound/control.h | 3 | ||||
| -rw-r--r-- | include/sound/seq_virmidi.h | 1 | ||||
| -rw-r--r-- | include/uapi/linux/membarrier.h | 23 |
24 files changed, 197 insertions, 64 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index c8dae555eccf..446b24cac67d 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -232,6 +232,7 @@ int generic_write_end(struct file *, struct address_space *, | |||
| 232 | loff_t, unsigned, unsigned, | 232 | loff_t, unsigned, unsigned, |
| 233 | struct page *, void *); | 233 | struct page *, void *); |
| 234 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); | 234 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); |
| 235 | void clean_page_buffers(struct page *page); | ||
| 235 | int cont_write_begin(struct file *, struct address_space *, loff_t, | 236 | int cont_write_begin(struct file *, struct address_space *, loff_t, |
| 236 | unsigned, unsigned, struct page **, void **, | 237 | unsigned, unsigned, struct page **, void **, |
| 237 | get_block_t *, loff_t *); | 238 | get_block_t *, loff_t *); |
diff --git a/include/linux/filter.h b/include/linux/filter.h index d29e58fde364..818a0b26249e 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -728,7 +728,7 @@ void xdp_do_flush_map(void); | |||
| 728 | void bpf_warn_invalid_xdp_action(u32 act); | 728 | void bpf_warn_invalid_xdp_action(u32 act); |
| 729 | void bpf_warn_invalid_xdp_redirect(u32 ifindex); | 729 | void bpf_warn_invalid_xdp_redirect(u32 ifindex); |
| 730 | 730 | ||
| 731 | struct sock *do_sk_redirect_map(void); | 731 | struct sock *do_sk_redirect_map(struct sk_buff *skb); |
| 732 | 732 | ||
| 733 | #ifdef CONFIG_BPF_JIT | 733 | #ifdef CONFIG_BPF_JIT |
| 734 | extern int bpf_jit_enable; | 734 | extern int bpf_jit_enable; |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index c458d7b7ad19..6431087816ba 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
| @@ -1403,7 +1403,7 @@ extern bool vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, u8 *buf, | |||
| 1403 | const int *srv_version, int srv_vercnt, | 1403 | const int *srv_version, int srv_vercnt, |
| 1404 | int *nego_fw_version, int *nego_srv_version); | 1404 | int *nego_fw_version, int *nego_srv_version); |
| 1405 | 1405 | ||
| 1406 | void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid); | 1406 | void hv_process_channel_removal(u32 relid); |
| 1407 | 1407 | ||
| 1408 | void vmbus_setevent(struct vmbus_channel *channel); | 1408 | void vmbus_setevent(struct vmbus_channel *channel); |
| 1409 | /* | 1409 | /* |
diff --git a/include/linux/input.h b/include/linux/input.h index fb5e23c7ed98..7c7516eb7d76 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -234,6 +234,10 @@ struct input_dev { | |||
| 234 | #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" | 234 | #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match" |
| 235 | #endif | 235 | #endif |
| 236 | 236 | ||
| 237 | #if INPUT_PROP_MAX != INPUT_DEVICE_ID_PROP_MAX | ||
| 238 | #error "INPUT_PROP_MAX and INPUT_DEVICE_ID_PROP_MAX do not match" | ||
| 239 | #endif | ||
| 240 | |||
| 237 | #define INPUT_DEVICE_ID_MATCH_DEVICE \ | 241 | #define INPUT_DEVICE_ID_MATCH_DEVICE \ |
| 238 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) | 242 | (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) |
| 239 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ | 243 | #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \ |
| @@ -469,6 +473,9 @@ int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke); | |||
| 469 | int input_set_keycode(struct input_dev *dev, | 473 | int input_set_keycode(struct input_dev *dev, |
| 470 | const struct input_keymap_entry *ke); | 474 | const struct input_keymap_entry *ke); |
| 471 | 475 | ||
| 476 | bool input_match_device_id(const struct input_dev *dev, | ||
| 477 | const struct input_device_id *id); | ||
| 478 | |||
| 472 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period); | 479 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period); |
| 473 | 480 | ||
| 474 | extern struct class input_class; | 481 | extern struct class input_class; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index d4728bf6a537..5ad10948ea95 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -1009,7 +1009,7 @@ void irq_gc_mask_clr_bit(struct irq_data *d); | |||
| 1009 | void irq_gc_unmask_enable_reg(struct irq_data *d); | 1009 | void irq_gc_unmask_enable_reg(struct irq_data *d); |
| 1010 | void irq_gc_ack_set_bit(struct irq_data *d); | 1010 | void irq_gc_ack_set_bit(struct irq_data *d); |
| 1011 | void irq_gc_ack_clr_bit(struct irq_data *d); | 1011 | void irq_gc_ack_clr_bit(struct irq_data *d); |
| 1012 | void irq_gc_mask_disable_reg_and_ack(struct irq_data *d); | 1012 | void irq_gc_mask_disable_and_ack_set(struct irq_data *d); |
| 1013 | void irq_gc_eoi(struct irq_data *d); | 1013 | void irq_gc_eoi(struct irq_data *d); |
| 1014 | int irq_gc_set_wake(struct irq_data *d, unsigned int on); | 1014 | int irq_gc_set_wake(struct irq_data *d, unsigned int on); |
| 1015 | 1015 | ||
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index 1ea576c8126f..14b74f22d43c 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h | |||
| @@ -372,6 +372,8 @@ | |||
| 372 | #define GITS_BASER_ENTRY_SIZE_SHIFT (48) | 372 | #define GITS_BASER_ENTRY_SIZE_SHIFT (48) |
| 373 | #define GITS_BASER_ENTRY_SIZE(r) ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1) | 373 | #define GITS_BASER_ENTRY_SIZE(r) ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1) |
| 374 | #define GITS_BASER_ENTRY_SIZE_MASK GENMASK_ULL(52, 48) | 374 | #define GITS_BASER_ENTRY_SIZE_MASK GENMASK_ULL(52, 48) |
| 375 | #define GITS_BASER_PHYS_52_to_48(phys) \ | ||
| 376 | (((phys) & GENMASK_ULL(47, 16)) | (((phys) >> 48) & 0xf) << 12) | ||
| 375 | #define GITS_BASER_SHAREABILITY_SHIFT (10) | 377 | #define GITS_BASER_SHAREABILITY_SHIFT (10) |
| 376 | #define GITS_BASER_InnerShareable \ | 378 | #define GITS_BASER_InnerShareable \ |
| 377 | GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable) | 379 | GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 0ad4c3044cf9..91189bb0c818 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -44,6 +44,12 @@ | |||
| 44 | 44 | ||
| 45 | #define STACK_MAGIC 0xdeadbeef | 45 | #define STACK_MAGIC 0xdeadbeef |
| 46 | 46 | ||
| 47 | /** | ||
| 48 | * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value | ||
| 49 | * @x: value to repeat | ||
| 50 | * | ||
| 51 | * NOTE: @x is not checked for > 0xff; larger values produce odd results. | ||
| 52 | */ | ||
| 47 | #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) | 53 | #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) |
| 48 | 54 | ||
| 49 | /* @a is a power of 2 value */ | 55 | /* @a is a power of 2 value */ |
| @@ -57,6 +63,10 @@ | |||
| 57 | #define READ 0 | 63 | #define READ 0 |
| 58 | #define WRITE 1 | 64 | #define WRITE 1 |
| 59 | 65 | ||
| 66 | /** | ||
| 67 | * ARRAY_SIZE - get the number of elements in array @arr | ||
| 68 | * @arr: array to be sized | ||
| 69 | */ | ||
| 60 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 70 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
| 61 | 71 | ||
| 62 | #define u64_to_user_ptr(x) ( \ | 72 | #define u64_to_user_ptr(x) ( \ |
| @@ -76,7 +86,15 @@ | |||
| 76 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) | 86 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) |
| 77 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) | 87 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) |
| 78 | 88 | ||
| 89 | /** | ||
| 90 | * FIELD_SIZEOF - get the size of a struct's field | ||
| 91 | * @t: the target struct | ||
| 92 | * @f: the target struct's field | ||
| 93 | * Return: the size of @f in the struct definition without having a | ||
| 94 | * declared instance of @t. | ||
| 95 | */ | ||
| 79 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 96 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
| 97 | |||
| 80 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP | 98 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP |
| 81 | 99 | ||
| 82 | #define DIV_ROUND_DOWN_ULL(ll, d) \ | 100 | #define DIV_ROUND_DOWN_ULL(ll, d) \ |
| @@ -107,7 +125,7 @@ | |||
| 107 | /* | 125 | /* |
| 108 | * Divide positive or negative dividend by positive or negative divisor | 126 | * Divide positive or negative dividend by positive or negative divisor |
| 109 | * and round to closest integer. Result is undefined for negative | 127 | * and round to closest integer. Result is undefined for negative |
| 110 | * divisors if he dividend variable type is unsigned and for negative | 128 | * divisors if the dividend variable type is unsigned and for negative |
| 111 | * dividends if the divisor variable type is unsigned. | 129 | * dividends if the divisor variable type is unsigned. |
| 112 | */ | 130 | */ |
| 113 | #define DIV_ROUND_CLOSEST(x, divisor)( \ | 131 | #define DIV_ROUND_CLOSEST(x, divisor)( \ |
| @@ -247,13 +265,13 @@ extern int _cond_resched(void); | |||
| 247 | * @ep_ro: right open interval endpoint | 265 | * @ep_ro: right open interval endpoint |
| 248 | * | 266 | * |
| 249 | * Perform a "reciprocal multiplication" in order to "scale" a value into | 267 | * Perform a "reciprocal multiplication" in order to "scale" a value into |
| 250 | * range [0, ep_ro), where the upper interval endpoint is right-open. | 268 | * range [0, @ep_ro), where the upper interval endpoint is right-open. |
| 251 | * This is useful, e.g. for accessing a index of an array containing | 269 | * This is useful, e.g. for accessing a index of an array containing |
| 252 | * ep_ro elements, for example. Think of it as sort of modulus, only that | 270 | * @ep_ro elements, for example. Think of it as sort of modulus, only that |
| 253 | * the result isn't that of modulo. ;) Note that if initial input is a | 271 | * the result isn't that of modulo. ;) Note that if initial input is a |
| 254 | * small value, then result will return 0. | 272 | * small value, then result will return 0. |
| 255 | * | 273 | * |
| 256 | * Return: a result based on val in interval [0, ep_ro). | 274 | * Return: a result based on @val in interval [0, @ep_ro). |
| 257 | */ | 275 | */ |
| 258 | static inline u32 reciprocal_scale(u32 val, u32 ep_ro) | 276 | static inline u32 reciprocal_scale(u32 val, u32 ep_ro) |
| 259 | { | 277 | { |
| @@ -618,8 +636,8 @@ do { \ | |||
| 618 | * trace_printk - printf formatting in the ftrace buffer | 636 | * trace_printk - printf formatting in the ftrace buffer |
| 619 | * @fmt: the printf format for printing | 637 | * @fmt: the printf format for printing |
| 620 | * | 638 | * |
| 621 | * Note: __trace_printk is an internal function for trace_printk and | 639 | * Note: __trace_printk is an internal function for trace_printk() and |
| 622 | * the @ip is passed in via the trace_printk macro. | 640 | * the @ip is passed in via the trace_printk() macro. |
| 623 | * | 641 | * |
| 624 | * This function allows a kernel developer to debug fast path sections | 642 | * This function allows a kernel developer to debug fast path sections |
| 625 | * that printk is not appropriate for. By scattering in various | 643 | * that printk is not appropriate for. By scattering in various |
| @@ -629,7 +647,7 @@ do { \ | |||
| 629 | * This is intended as a debugging tool for the developer only. | 647 | * This is intended as a debugging tool for the developer only. |
| 630 | * Please refrain from leaving trace_printks scattered around in | 648 | * Please refrain from leaving trace_printks scattered around in |
| 631 | * your code. (Extra memory is used for special buffers that are | 649 | * your code. (Extra memory is used for special buffers that are |
| 632 | * allocated when trace_printk() is used) | 650 | * allocated when trace_printk() is used.) |
| 633 | * | 651 | * |
| 634 | * A little optization trick is done here. If there's only one | 652 | * A little optization trick is done here. If there's only one |
| 635 | * argument, there's no need to scan the string for printf formats. | 653 | * argument, there's no need to scan the string for printf formats. |
| @@ -681,7 +699,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...); | |||
| 681 | * the @ip is passed in via the trace_puts macro. | 699 | * the @ip is passed in via the trace_puts macro. |
| 682 | * | 700 | * |
| 683 | * This is similar to trace_printk() but is made for those really fast | 701 | * This is similar to trace_printk() but is made for those really fast |
| 684 | * paths that a developer wants the least amount of "Heisenbug" affects, | 702 | * paths that a developer wants the least amount of "Heisenbug" effects, |
| 685 | * where the processing of the print format is still too much. | 703 | * where the processing of the print format is still too much. |
| 686 | * | 704 | * |
| 687 | * This function allows a kernel developer to debug fast path sections | 705 | * This function allows a kernel developer to debug fast path sections |
| @@ -692,7 +710,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...); | |||
| 692 | * This is intended as a debugging tool for the developer only. | 710 | * This is intended as a debugging tool for the developer only. |
| 693 | * Please refrain from leaving trace_puts scattered around in | 711 | * Please refrain from leaving trace_puts scattered around in |
| 694 | * your code. (Extra memory is used for special buffers that are | 712 | * your code. (Extra memory is used for special buffers that are |
| 695 | * allocated when trace_puts() is used) | 713 | * allocated when trace_puts() is used.) |
| 696 | * | 714 | * |
| 697 | * Returns: 0 if nothing was written, positive # if string was. | 715 | * Returns: 0 if nothing was written, positive # if string was. |
| 698 | * (1 when __trace_bputs is used, strlen(str) when __trace_puts is used) | 716 | * (1 when __trace_bputs is used, strlen(str) when __trace_puts is used) |
| @@ -771,6 +789,12 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 771 | t2 min2 = (y); \ | 789 | t2 min2 = (y); \ |
| 772 | (void) (&min1 == &min2); \ | 790 | (void) (&min1 == &min2); \ |
| 773 | min1 < min2 ? min1 : min2; }) | 791 | min1 < min2 ? min1 : min2; }) |
| 792 | |||
| 793 | /** | ||
| 794 | * min - return minimum of two values of the same or compatible types | ||
| 795 | * @x: first value | ||
| 796 | * @y: second value | ||
| 797 | */ | ||
| 774 | #define min(x, y) \ | 798 | #define min(x, y) \ |
| 775 | __min(typeof(x), typeof(y), \ | 799 | __min(typeof(x), typeof(y), \ |
| 776 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ | 800 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ |
| @@ -781,12 +805,31 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 781 | t2 max2 = (y); \ | 805 | t2 max2 = (y); \ |
| 782 | (void) (&max1 == &max2); \ | 806 | (void) (&max1 == &max2); \ |
| 783 | max1 > max2 ? max1 : max2; }) | 807 | max1 > max2 ? max1 : max2; }) |
| 808 | |||
| 809 | /** | ||
| 810 | * max - return maximum of two values of the same or compatible types | ||
| 811 | * @x: first value | ||
| 812 | * @y: second value | ||
| 813 | */ | ||
| 784 | #define max(x, y) \ | 814 | #define max(x, y) \ |
| 785 | __max(typeof(x), typeof(y), \ | 815 | __max(typeof(x), typeof(y), \ |
| 786 | __UNIQUE_ID(max1_), __UNIQUE_ID(max2_), \ | 816 | __UNIQUE_ID(max1_), __UNIQUE_ID(max2_), \ |
| 787 | x, y) | 817 | x, y) |
| 788 | 818 | ||
| 819 | /** | ||
| 820 | * min3 - return minimum of three values | ||
| 821 | * @x: first value | ||
| 822 | * @y: second value | ||
| 823 | * @z: third value | ||
| 824 | */ | ||
| 789 | #define min3(x, y, z) min((typeof(x))min(x, y), z) | 825 | #define min3(x, y, z) min((typeof(x))min(x, y), z) |
| 826 | |||
| 827 | /** | ||
| 828 | * max3 - return maximum of three values | ||
| 829 | * @x: first value | ||
| 830 | * @y: second value | ||
| 831 | * @z: third value | ||
| 832 | */ | ||
| 790 | #define max3(x, y, z) max((typeof(x))max(x, y), z) | 833 | #define max3(x, y, z) max((typeof(x))max(x, y), z) |
| 791 | 834 | ||
| 792 | /** | 835 | /** |
| @@ -805,8 +848,8 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 805 | * @lo: lowest allowable value | 848 | * @lo: lowest allowable value |
| 806 | * @hi: highest allowable value | 849 | * @hi: highest allowable value |
| 807 | * | 850 | * |
| 808 | * This macro does strict typechecking of lo/hi to make sure they are of the | 851 | * This macro does strict typechecking of @lo/@hi to make sure they are of the |
| 809 | * same type as val. See the unnecessary pointer comparisons. | 852 | * same type as @val. See the unnecessary pointer comparisons. |
| 810 | */ | 853 | */ |
| 811 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi) | 854 | #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi) |
| 812 | 855 | ||
| @@ -816,11 +859,24 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 816 | * | 859 | * |
| 817 | * Or not use min/max/clamp at all, of course. | 860 | * Or not use min/max/clamp at all, of course. |
| 818 | */ | 861 | */ |
| 862 | |||
| 863 | /** | ||
| 864 | * min_t - return minimum of two values, using the specified type | ||
| 865 | * @type: data type to use | ||
| 866 | * @x: first value | ||
| 867 | * @y: second value | ||
| 868 | */ | ||
| 819 | #define min_t(type, x, y) \ | 869 | #define min_t(type, x, y) \ |
| 820 | __min(type, type, \ | 870 | __min(type, type, \ |
| 821 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ | 871 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ |
| 822 | x, y) | 872 | x, y) |
| 823 | 873 | ||
| 874 | /** | ||
| 875 | * max_t - return maximum of two values, using the specified type | ||
| 876 | * @type: data type to use | ||
| 877 | * @x: first value | ||
| 878 | * @y: second value | ||
| 879 | */ | ||
| 824 | #define max_t(type, x, y) \ | 880 | #define max_t(type, x, y) \ |
| 825 | __max(type, type, \ | 881 | __max(type, type, \ |
| 826 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ | 882 | __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ |
| @@ -834,7 +890,7 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 834 | * @hi: maximum allowable value | 890 | * @hi: maximum allowable value |
| 835 | * | 891 | * |
| 836 | * This macro does no typechecking and uses temporary variables of type | 892 | * This macro does no typechecking and uses temporary variables of type |
| 837 | * 'type' to make all the comparisons. | 893 | * @type to make all the comparisons. |
| 838 | */ | 894 | */ |
| 839 | #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) | 895 | #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) |
| 840 | 896 | ||
| @@ -845,15 +901,17 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 845 | * @hi: maximum allowable value | 901 | * @hi: maximum allowable value |
| 846 | * | 902 | * |
| 847 | * This macro does no typechecking and uses temporary variables of whatever | 903 | * This macro does no typechecking and uses temporary variables of whatever |
| 848 | * type the input argument 'val' is. This is useful when val is an unsigned | 904 | * type the input argument @val is. This is useful when @val is an unsigned |
| 849 | * type and min and max are literals that will otherwise be assigned a signed | 905 | * type and @lo and @hi are literals that will otherwise be assigned a signed |
| 850 | * integer type. | 906 | * integer type. |
| 851 | */ | 907 | */ |
| 852 | #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) | 908 | #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi) |
| 853 | 909 | ||
| 854 | 910 | ||
| 855 | /* | 911 | /** |
| 856 | * swap - swap value of @a and @b | 912 | * swap - swap values of @a and @b |
| 913 | * @a: first value | ||
| 914 | * @b: second value | ||
| 857 | */ | 915 | */ |
| 858 | #define swap(a, b) \ | 916 | #define swap(a, b) \ |
| 859 | do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) | 917 | do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) |
diff --git a/include/linux/key.h b/include/linux/key.h index e315e16b6ff8..8a15cabe928d 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
| @@ -138,6 +138,11 @@ struct key_restriction { | |||
| 138 | struct key_type *keytype; | 138 | struct key_type *keytype; |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | enum key_state { | ||
| 142 | KEY_IS_UNINSTANTIATED, | ||
| 143 | KEY_IS_POSITIVE, /* Positively instantiated */ | ||
| 144 | }; | ||
| 145 | |||
| 141 | /*****************************************************************************/ | 146 | /*****************************************************************************/ |
| 142 | /* | 147 | /* |
| 143 | * authentication token / access credential / keyring | 148 | * authentication token / access credential / keyring |
| @@ -169,6 +174,7 @@ struct key { | |||
| 169 | * - may not match RCU dereferenced payload | 174 | * - may not match RCU dereferenced payload |
| 170 | * - payload should contain own length | 175 | * - payload should contain own length |
| 171 | */ | 176 | */ |
| 177 | short state; /* Key state (+) or rejection error (-) */ | ||
| 172 | 178 | ||
| 173 | #ifdef KEY_DEBUGGING | 179 | #ifdef KEY_DEBUGGING |
| 174 | unsigned magic; | 180 | unsigned magic; |
| @@ -176,18 +182,16 @@ struct key { | |||
| 176 | #endif | 182 | #endif |
| 177 | 183 | ||
| 178 | unsigned long flags; /* status flags (change with bitops) */ | 184 | unsigned long flags; /* status flags (change with bitops) */ |
| 179 | #define KEY_FLAG_INSTANTIATED 0 /* set if key has been instantiated */ | 185 | #define KEY_FLAG_DEAD 0 /* set if key type has been deleted */ |
| 180 | #define KEY_FLAG_DEAD 1 /* set if key type has been deleted */ | 186 | #define KEY_FLAG_REVOKED 1 /* set if key had been revoked */ |
| 181 | #define KEY_FLAG_REVOKED 2 /* set if key had been revoked */ | 187 | #define KEY_FLAG_IN_QUOTA 2 /* set if key consumes quota */ |
| 182 | #define KEY_FLAG_IN_QUOTA 3 /* set if key consumes quota */ | 188 | #define KEY_FLAG_USER_CONSTRUCT 3 /* set if key is being constructed in userspace */ |
| 183 | #define KEY_FLAG_USER_CONSTRUCT 4 /* set if key is being constructed in userspace */ | 189 | #define KEY_FLAG_ROOT_CAN_CLEAR 4 /* set if key can be cleared by root without permission */ |
| 184 | #define KEY_FLAG_NEGATIVE 5 /* set if key is negative */ | 190 | #define KEY_FLAG_INVALIDATED 5 /* set if key has been invalidated */ |
| 185 | #define KEY_FLAG_ROOT_CAN_CLEAR 6 /* set if key can be cleared by root without permission */ | 191 | #define KEY_FLAG_BUILTIN 6 /* set if key is built in to the kernel */ |
| 186 | #define KEY_FLAG_INVALIDATED 7 /* set if key has been invalidated */ | 192 | #define KEY_FLAG_ROOT_CAN_INVAL 7 /* set if key can be invalidated by root without permission */ |
| 187 | #define KEY_FLAG_BUILTIN 8 /* set if key is built in to the kernel */ | 193 | #define KEY_FLAG_KEEP 8 /* set if key should not be removed */ |
| 188 | #define KEY_FLAG_ROOT_CAN_INVAL 9 /* set if key can be invalidated by root without permission */ | 194 | #define KEY_FLAG_UID_KEYRING 9 /* set if key is a user or user session keyring */ |
| 189 | #define KEY_FLAG_KEEP 10 /* set if key should not be removed */ | ||
| 190 | #define KEY_FLAG_UID_KEYRING 11 /* set if key is a user or user session keyring */ | ||
| 191 | 195 | ||
| 192 | /* the key type and key description string | 196 | /* the key type and key description string |
| 193 | * - the desc is used to match a key against search criteria | 197 | * - the desc is used to match a key against search criteria |
| @@ -213,7 +217,6 @@ struct key { | |||
| 213 | struct list_head name_link; | 217 | struct list_head name_link; |
| 214 | struct assoc_array keys; | 218 | struct assoc_array keys; |
| 215 | }; | 219 | }; |
| 216 | int reject_error; | ||
| 217 | }; | 220 | }; |
| 218 | 221 | ||
| 219 | /* This is set on a keyring to restrict the addition of a link to a key | 222 | /* This is set on a keyring to restrict the addition of a link to a key |
| @@ -353,17 +356,27 @@ extern void key_set_timeout(struct key *, unsigned); | |||
| 353 | #define KEY_NEED_SETATTR 0x20 /* Require permission to change attributes */ | 356 | #define KEY_NEED_SETATTR 0x20 /* Require permission to change attributes */ |
| 354 | #define KEY_NEED_ALL 0x3f /* All the above permissions */ | 357 | #define KEY_NEED_ALL 0x3f /* All the above permissions */ |
| 355 | 358 | ||
| 359 | static inline short key_read_state(const struct key *key) | ||
| 360 | { | ||
| 361 | /* Barrier versus mark_key_instantiated(). */ | ||
| 362 | return smp_load_acquire(&key->state); | ||
| 363 | } | ||
| 364 | |||
| 356 | /** | 365 | /** |
| 357 | * key_is_instantiated - Determine if a key has been positively instantiated | 366 | * key_is_positive - Determine if a key has been positively instantiated |
| 358 | * @key: The key to check. | 367 | * @key: The key to check. |
| 359 | * | 368 | * |
| 360 | * Return true if the specified key has been positively instantiated, false | 369 | * Return true if the specified key has been positively instantiated, false |
| 361 | * otherwise. | 370 | * otherwise. |
| 362 | */ | 371 | */ |
| 363 | static inline bool key_is_instantiated(const struct key *key) | 372 | static inline bool key_is_positive(const struct key *key) |
| 373 | { | ||
| 374 | return key_read_state(key) == KEY_IS_POSITIVE; | ||
| 375 | } | ||
| 376 | |||
| 377 | static inline bool key_is_negative(const struct key *key) | ||
| 364 | { | 378 | { |
| 365 | return test_bit(KEY_FLAG_INSTANTIATED, &key->flags) && | 379 | return key_read_state(key) < 0; |
| 366 | !test_bit(KEY_FLAG_NEGATIVE, &key->flags); | ||
| 367 | } | 380 | } |
| 368 | 381 | ||
| 369 | #define dereference_key_rcu(KEY) \ | 382 | #define dereference_key_rcu(KEY) \ |
diff --git a/include/linux/mbus.h b/include/linux/mbus.h index 0d3f14fd2621..4773145246ed 100644 --- a/include/linux/mbus.h +++ b/include/linux/mbus.h | |||
| @@ -31,8 +31,8 @@ struct mbus_dram_target_info | |||
| 31 | struct mbus_dram_window { | 31 | struct mbus_dram_window { |
| 32 | u8 cs_index; | 32 | u8 cs_index; |
| 33 | u8 mbus_attr; | 33 | u8 mbus_attr; |
| 34 | u32 base; | 34 | u64 base; |
| 35 | u32 size; | 35 | u64 size; |
| 36 | } cs[4]; | 36 | } cs[4]; |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 46f4ecf5479a..1861ea8dba77 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -445,6 +445,9 @@ struct mm_struct { | |||
| 445 | unsigned long flags; /* Must use atomic bitops to access the bits */ | 445 | unsigned long flags; /* Must use atomic bitops to access the bits */ |
| 446 | 446 | ||
| 447 | struct core_state *core_state; /* coredumping support */ | 447 | struct core_state *core_state; /* coredumping support */ |
| 448 | #ifdef CONFIG_MEMBARRIER | ||
| 449 | atomic_t membarrier_state; | ||
| 450 | #endif | ||
| 448 | #ifdef CONFIG_AIO | 451 | #ifdef CONFIG_AIO |
| 449 | spinlock_t ioctx_lock; | 452 | spinlock_t ioctx_lock; |
| 450 | struct kioctx_table __rcu *ioctx_table; | 453 | struct kioctx_table __rcu *ioctx_table; |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 694cebb50f72..2657f9f51536 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -293,6 +293,7 @@ struct pcmcia_device_id { | |||
| 293 | #define INPUT_DEVICE_ID_SND_MAX 0x07 | 293 | #define INPUT_DEVICE_ID_SND_MAX 0x07 |
| 294 | #define INPUT_DEVICE_ID_FF_MAX 0x7f | 294 | #define INPUT_DEVICE_ID_FF_MAX 0x7f |
| 295 | #define INPUT_DEVICE_ID_SW_MAX 0x0f | 295 | #define INPUT_DEVICE_ID_SW_MAX 0x0f |
| 296 | #define INPUT_DEVICE_ID_PROP_MAX 0x1f | ||
| 296 | 297 | ||
| 297 | #define INPUT_DEVICE_ID_MATCH_BUS 1 | 298 | #define INPUT_DEVICE_ID_MATCH_BUS 1 |
| 298 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 | 299 | #define INPUT_DEVICE_ID_MATCH_VENDOR 2 |
| @@ -308,6 +309,7 @@ struct pcmcia_device_id { | |||
| 308 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 | 309 | #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400 |
| 309 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 | 310 | #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800 |
| 310 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 | 311 | #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000 |
| 312 | #define INPUT_DEVICE_ID_MATCH_PROPBIT 0x2000 | ||
| 311 | 313 | ||
| 312 | struct input_device_id { | 314 | struct input_device_id { |
| 313 | 315 | ||
| @@ -327,6 +329,7 @@ struct input_device_id { | |||
| 327 | kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; | 329 | kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1]; |
| 328 | kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; | 330 | kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1]; |
| 329 | kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; | 331 | kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1]; |
| 332 | kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1]; | ||
| 330 | 333 | ||
| 331 | kernel_ulong_t driver_info; | 334 | kernel_ulong_t driver_info; |
| 332 | }; | 335 | }; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f535779d9dc1..2eaac7d75af4 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -3694,6 +3694,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, | |||
| 3694 | unsigned char name_assign_type, | 3694 | unsigned char name_assign_type, |
| 3695 | void (*setup)(struct net_device *), | 3695 | void (*setup)(struct net_device *), |
| 3696 | unsigned int txqs, unsigned int rxqs); | 3696 | unsigned int txqs, unsigned int rxqs); |
| 3697 | int dev_get_valid_name(struct net *net, struct net_device *dev, | ||
| 3698 | const char *name); | ||
| 3699 | |||
| 3697 | #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \ | 3700 | #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \ |
| 3698 | alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1) | 3701 | alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1) |
| 3699 | 3702 | ||
diff --git a/include/linux/of.h b/include/linux/of.h index cfc34117fc92..b240ed69dc96 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -734,6 +734,16 @@ static inline struct device_node *of_get_cpu_node(int cpu, | |||
| 734 | return NULL; | 734 | return NULL; |
| 735 | } | 735 | } |
| 736 | 736 | ||
| 737 | static inline int of_n_addr_cells(struct device_node *np) | ||
| 738 | { | ||
| 739 | return 0; | ||
| 740 | |||
| 741 | } | ||
| 742 | static inline int of_n_size_cells(struct device_node *np) | ||
| 743 | { | ||
| 744 | return 0; | ||
| 745 | } | ||
| 746 | |||
| 737 | static inline int of_property_read_u64(const struct device_node *np, | 747 | static inline int of_property_read_u64(const struct device_node *np, |
| 738 | const char *propname, u64 *out_value) | 748 | const char *propname, u64 *out_value) |
| 739 | { | 749 | { |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index b1fd8bf85fdc..2bea1d5e9930 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -276,7 +276,7 @@ static inline void list_splice_tail_init_rcu(struct list_head *list, | |||
| 276 | #define list_entry_rcu(ptr, type, member) \ | 276 | #define list_entry_rcu(ptr, type, member) \ |
| 277 | container_of(lockless_dereference(ptr), type, member) | 277 | container_of(lockless_dereference(ptr), type, member) |
| 278 | 278 | ||
| 279 | /** | 279 | /* |
| 280 | * Where are list_empty_rcu() and list_first_entry_rcu()? | 280 | * Where are list_empty_rcu() and list_first_entry_rcu()? |
| 281 | * | 281 | * |
| 282 | * Implementing those functions following their counterparts list_empty() and | 282 | * Implementing those functions following their counterparts list_empty() and |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index de50d8a4cf41..1a9f70d44af9 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -523,7 +523,7 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
| 523 | * Return the value of the specified RCU-protected pointer, but omit | 523 | * Return the value of the specified RCU-protected pointer, but omit |
| 524 | * both the smp_read_barrier_depends() and the READ_ONCE(). This | 524 | * both the smp_read_barrier_depends() and the READ_ONCE(). This |
| 525 | * is useful in cases where update-side locks prevent the value of the | 525 | * is useful in cases where update-side locks prevent the value of the |
| 526 | * pointer from changing. Please note that this primitive does -not- | 526 | * pointer from changing. Please note that this primitive does *not* |
| 527 | * prevent the compiler from repeating this reference or combining it | 527 | * prevent the compiler from repeating this reference or combining it |
| 528 | * with other references, so it should not be used without protection | 528 | * with other references, so it should not be used without protection |
| 529 | * of appropriate locks. | 529 | * of appropriate locks. |
| @@ -568,7 +568,7 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
| 568 | * is handed off from RCU to some other synchronization mechanism, for | 568 | * is handed off from RCU to some other synchronization mechanism, for |
| 569 | * example, reference counting or locking. In C11, it would map to | 569 | * example, reference counting or locking. In C11, it would map to |
| 570 | * kill_dependency(). It could be used as follows: | 570 | * kill_dependency(). It could be used as follows: |
| 571 | * | 571 | * `` |
| 572 | * rcu_read_lock(); | 572 | * rcu_read_lock(); |
| 573 | * p = rcu_dereference(gp); | 573 | * p = rcu_dereference(gp); |
| 574 | * long_lived = is_long_lived(p); | 574 | * long_lived = is_long_lived(p); |
| @@ -579,6 +579,7 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
| 579 | * p = rcu_pointer_handoff(p); | 579 | * p = rcu_pointer_handoff(p); |
| 580 | * } | 580 | * } |
| 581 | * rcu_read_unlock(); | 581 | * rcu_read_unlock(); |
| 582 | *`` | ||
| 582 | */ | 583 | */ |
| 583 | #define rcu_pointer_handoff(p) (p) | 584 | #define rcu_pointer_handoff(p) (p) |
| 584 | 585 | ||
| @@ -778,18 +779,21 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 778 | 779 | ||
| 779 | /** | 780 | /** |
| 780 | * RCU_INIT_POINTER() - initialize an RCU protected pointer | 781 | * RCU_INIT_POINTER() - initialize an RCU protected pointer |
| 782 | * @p: The pointer to be initialized. | ||
| 783 | * @v: The value to initialized the pointer to. | ||
| 781 | * | 784 | * |
| 782 | * Initialize an RCU-protected pointer in special cases where readers | 785 | * Initialize an RCU-protected pointer in special cases where readers |
| 783 | * do not need ordering constraints on the CPU or the compiler. These | 786 | * do not need ordering constraints on the CPU or the compiler. These |
| 784 | * special cases are: | 787 | * special cases are: |
| 785 | * | 788 | * |
| 786 | * 1. This use of RCU_INIT_POINTER() is NULLing out the pointer -or- | 789 | * 1. This use of RCU_INIT_POINTER() is NULLing out the pointer *or* |
| 787 | * 2. The caller has taken whatever steps are required to prevent | 790 | * 2. The caller has taken whatever steps are required to prevent |
| 788 | * RCU readers from concurrently accessing this pointer -or- | 791 | * RCU readers from concurrently accessing this pointer *or* |
| 789 | * 3. The referenced data structure has already been exposed to | 792 | * 3. The referenced data structure has already been exposed to |
| 790 | * readers either at compile time or via rcu_assign_pointer() -and- | 793 | * readers either at compile time or via rcu_assign_pointer() *and* |
| 791 | * a. You have not made -any- reader-visible changes to | 794 | * |
| 792 | * this structure since then -or- | 795 | * a. You have not made *any* reader-visible changes to |
| 796 | * this structure since then *or* | ||
| 793 | * b. It is OK for readers accessing this structure from its | 797 | * b. It is OK for readers accessing this structure from its |
| 794 | * new location to see the old state of the structure. (For | 798 | * new location to see the old state of the structure. (For |
| 795 | * example, the changes were to statistical counters or to | 799 | * example, the changes were to statistical counters or to |
| @@ -805,7 +809,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 805 | * by a single external-to-structure RCU-protected pointer, then you may | 809 | * by a single external-to-structure RCU-protected pointer, then you may |
| 806 | * use RCU_INIT_POINTER() to initialize the internal RCU-protected | 810 | * use RCU_INIT_POINTER() to initialize the internal RCU-protected |
| 807 | * pointers, but you must use rcu_assign_pointer() to initialize the | 811 | * pointers, but you must use rcu_assign_pointer() to initialize the |
| 808 | * external-to-structure pointer -after- you have completely initialized | 812 | * external-to-structure pointer *after* you have completely initialized |
| 809 | * the reader-accessible portions of the linked structure. | 813 | * the reader-accessible portions of the linked structure. |
| 810 | * | 814 | * |
| 811 | * Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no | 815 | * Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no |
| @@ -819,6 +823,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 819 | 823 | ||
| 820 | /** | 824 | /** |
| 821 | * RCU_POINTER_INITIALIZER() - statically initialize an RCU protected pointer | 825 | * RCU_POINTER_INITIALIZER() - statically initialize an RCU protected pointer |
| 826 | * @p: The pointer to be initialized. | ||
| 827 | * @v: The value to initialized the pointer to. | ||
| 822 | * | 828 | * |
| 823 | * GCC-style initialization for an RCU-protected pointer in a structure field. | 829 | * GCC-style initialization for an RCU-protected pointer in a structure field. |
| 824 | */ | 830 | */ |
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h index ae53e413fb13..ab9bf7b73954 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h | |||
| @@ -211,4 +211,20 @@ static inline void memalloc_noreclaim_restore(unsigned int flags) | |||
| 211 | current->flags = (current->flags & ~PF_MEMALLOC) | flags; | 211 | current->flags = (current->flags & ~PF_MEMALLOC) | flags; |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | #ifdef CONFIG_MEMBARRIER | ||
| 215 | enum { | ||
| 216 | MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY = (1U << 0), | ||
| 217 | MEMBARRIER_STATE_SWITCH_MM = (1U << 1), | ||
| 218 | }; | ||
| 219 | |||
| 220 | static inline void membarrier_execve(struct task_struct *t) | ||
| 221 | { | ||
| 222 | atomic_set(&t->mm->membarrier_state, 0); | ||
| 223 | } | ||
| 224 | #else | ||
| 225 | static inline void membarrier_execve(struct task_struct *t) | ||
| 226 | { | ||
| 227 | } | ||
| 228 | #endif | ||
| 229 | |||
| 214 | #endif /* _LINUX_SCHED_MM_H */ | 230 | #endif /* _LINUX_SCHED_MM_H */ |
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h index d7b6dab956ec..7d065abc7a47 100644 --- a/include/linux/sched/topology.h +++ b/include/linux/sched/topology.h | |||
| @@ -71,14 +71,6 @@ struct sched_domain_shared { | |||
| 71 | atomic_t ref; | 71 | atomic_t ref; |
| 72 | atomic_t nr_busy_cpus; | 72 | atomic_t nr_busy_cpus; |
| 73 | int has_idle_cores; | 73 | int has_idle_cores; |
| 74 | |||
| 75 | /* | ||
| 76 | * Some variables from the most recent sd_lb_stats for this domain, | ||
| 77 | * used by wake_affine(). | ||
| 78 | */ | ||
| 79 | unsigned long nr_running; | ||
| 80 | unsigned long load; | ||
| 81 | unsigned long capacity; | ||
| 82 | }; | 74 | }; |
| 83 | 75 | ||
| 84 | struct sched_domain { | 76 | struct sched_domain { |
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 39af9bc0f653..62be8966e837 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
| @@ -78,6 +78,7 @@ void synchronize_srcu(struct srcu_struct *sp); | |||
| 78 | 78 | ||
| 79 | /** | 79 | /** |
| 80 | * srcu_read_lock_held - might we be in SRCU read-side critical section? | 80 | * srcu_read_lock_held - might we be in SRCU read-side critical section? |
| 81 | * @sp: The srcu_struct structure to check | ||
| 81 | * | 82 | * |
| 82 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU | 83 | * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU |
| 83 | * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC, | 84 | * read-side critical section. In absence of CONFIG_DEBUG_LOCK_ALLOC, |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 905d769d8ddc..5f7eeab990fe 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
| @@ -42,7 +42,7 @@ enum { | |||
| 42 | #define THREAD_ALIGN THREAD_SIZE | 42 | #define THREAD_ALIGN THREAD_SIZE |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | #ifdef CONFIG_DEBUG_STACK_USAGE | 45 | #if IS_ENABLED(CONFIG_DEBUG_STACK_USAGE) || IS_ENABLED(CONFIG_DEBUG_KMEMLEAK) |
| 46 | # define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | \ | 46 | # define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | \ |
| 47 | __GFP_ZERO) | 47 | __GFP_ZERO) |
| 48 | #else | 48 | #else |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index aa95053dfc78..425752f768d2 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
| @@ -96,7 +96,7 @@ struct inet_request_sock { | |||
| 96 | kmemcheck_bitfield_end(flags); | 96 | kmemcheck_bitfield_end(flags); |
| 97 | u32 ir_mark; | 97 | u32 ir_mark; |
| 98 | union { | 98 | union { |
| 99 | struct ip_options_rcu *opt; | 99 | struct ip_options_rcu __rcu *ireq_opt; |
| 100 | #if IS_ENABLED(CONFIG_IPV6) | 100 | #if IS_ENABLED(CONFIG_IPV6) |
| 101 | struct { | 101 | struct { |
| 102 | struct ipv6_txoptions *ipv6_opt; | 102 | struct ipv6_txoptions *ipv6_opt; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 89974c5286d8..b1ef98ebce53 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -840,6 +840,11 @@ struct tcp_skb_cb { | |||
| 840 | struct inet6_skb_parm h6; | 840 | struct inet6_skb_parm h6; |
| 841 | #endif | 841 | #endif |
| 842 | } header; /* For incoming skbs */ | 842 | } header; /* For incoming skbs */ |
| 843 | struct { | ||
| 844 | __u32 key; | ||
| 845 | __u32 flags; | ||
| 846 | struct bpf_map *map; | ||
| 847 | } bpf; | ||
| 843 | }; | 848 | }; |
| 844 | }; | 849 | }; |
| 845 | 850 | ||
diff --git a/include/sound/control.h b/include/sound/control.h index bd7246de58e7..a1f1152bc687 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
| @@ -248,6 +248,9 @@ int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl, | |||
| 248 | void *private_data); | 248 | void *private_data); |
| 249 | void snd_ctl_sync_vmaster(struct snd_kcontrol *kctl, bool hook_only); | 249 | void snd_ctl_sync_vmaster(struct snd_kcontrol *kctl, bool hook_only); |
| 250 | #define snd_ctl_sync_vmaster_hook(kctl) snd_ctl_sync_vmaster(kctl, true) | 250 | #define snd_ctl_sync_vmaster_hook(kctl) snd_ctl_sync_vmaster(kctl, true) |
| 251 | int snd_ctl_apply_vmaster_slaves(struct snd_kcontrol *kctl, | ||
| 252 | int (*func)(struct snd_kcontrol *, void *), | ||
| 253 | void *arg); | ||
| 251 | 254 | ||
| 252 | /* | 255 | /* |
| 253 | * Helper functions for jack-detection controls | 256 | * Helper functions for jack-detection controls |
diff --git a/include/sound/seq_virmidi.h b/include/sound/seq_virmidi.h index a03acd0d398a..695257ae64ac 100644 --- a/include/sound/seq_virmidi.h +++ b/include/sound/seq_virmidi.h | |||
| @@ -60,6 +60,7 @@ struct snd_virmidi_dev { | |||
| 60 | int port; /* created/attached port */ | 60 | int port; /* created/attached port */ |
| 61 | unsigned int flags; /* SNDRV_VIRMIDI_* */ | 61 | unsigned int flags; /* SNDRV_VIRMIDI_* */ |
| 62 | rwlock_t filelist_lock; | 62 | rwlock_t filelist_lock; |
| 63 | struct rw_semaphore filelist_sem; | ||
| 63 | struct list_head filelist; | 64 | struct list_head filelist; |
| 64 | }; | 65 | }; |
| 65 | 66 | ||
diff --git a/include/uapi/linux/membarrier.h b/include/uapi/linux/membarrier.h index 6d47b3249d8a..4e01ad7ffe98 100644 --- a/include/uapi/linux/membarrier.h +++ b/include/uapi/linux/membarrier.h | |||
| @@ -52,21 +52,30 @@ | |||
| 52 | * (non-running threads are de facto in such a | 52 | * (non-running threads are de facto in such a |
| 53 | * state). This only covers threads from the | 53 | * state). This only covers threads from the |
| 54 | * same processes as the caller thread. This | 54 | * same processes as the caller thread. This |
| 55 | * command returns 0. The "expedited" commands | 55 | * command returns 0 on success. The |
| 56 | * complete faster than the non-expedited ones, | 56 | * "expedited" commands complete faster than |
| 57 | * they never block, but have the downside of | 57 | * the non-expedited ones, they never block, |
| 58 | * causing extra overhead. | 58 | * but have the downside of causing extra |
| 59 | * overhead. A process needs to register its | ||
| 60 | * intent to use the private expedited command | ||
| 61 | * prior to using it, otherwise this command | ||
| 62 | * returns -EPERM. | ||
| 63 | * @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: | ||
| 64 | * Register the process intent to use | ||
| 65 | * MEMBARRIER_CMD_PRIVATE_EXPEDITED. Always | ||
| 66 | * returns 0. | ||
| 59 | * | 67 | * |
| 60 | * Command to be passed to the membarrier system call. The commands need to | 68 | * Command to be passed to the membarrier system call. The commands need to |
| 61 | * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to | 69 | * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to |
| 62 | * the value 0. | 70 | * the value 0. |
| 63 | */ | 71 | */ |
| 64 | enum membarrier_cmd { | 72 | enum membarrier_cmd { |
| 65 | MEMBARRIER_CMD_QUERY = 0, | 73 | MEMBARRIER_CMD_QUERY = 0, |
| 66 | MEMBARRIER_CMD_SHARED = (1 << 0), | 74 | MEMBARRIER_CMD_SHARED = (1 << 0), |
| 67 | /* reserved for MEMBARRIER_CMD_SHARED_EXPEDITED (1 << 1) */ | 75 | /* reserved for MEMBARRIER_CMD_SHARED_EXPEDITED (1 << 1) */ |
| 68 | /* reserved for MEMBARRIER_CMD_PRIVATE (1 << 2) */ | 76 | /* reserved for MEMBARRIER_CMD_PRIVATE (1 << 2) */ |
| 69 | MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3), | 77 | MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3), |
| 78 | MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = (1 << 4), | ||
| 70 | }; | 79 | }; |
| 71 | 80 | ||
| 72 | #endif /* _UAPI_LINUX_MEMBARRIER_H */ | 81 | #endif /* _UAPI_LINUX_MEMBARRIER_H */ |
