History

Merge tag 'v5.0-rc7' into patchwork

Linux 5.0-rc7 * tag 'v5.0-rc7': (1667 commits) Linux 5.0-rc7 Input: elan_i2c - add ACPI ID for touchpad in Lenovo V330-15ISK Input: st-keyscan - fix potential zalloc NULL dereference Input: apanel - switch to using brightness_set_blocking() powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present() efi/arm: Revert "Defer persistent reservations until after paging_init()" arm64, mm, efi: Account for GICv3 LPI tables in static memblock reserve table sunrpc: fix 4 more call sites that were using stack memory with a scatterlist include/linux/module.h: copy __init/__exit attrs to init/cleanup_module Compiler Attributes: add support for __copy (gcc >= 9) lib/crc32.c: mark crc32_le_base/__crc32c_le_base aliases as __pure auxdisplay: ht16k33: fix potential user-after-free on module unload x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls i2c: bcm2835: Clear current buffer pointers and counts after a transfer i2c: cadence: Fix the hold bit setting drm: Use array_size() when creating lease dm thin: fix bug where bio that overwrites thin block ignores FUA Revert "exec: load_script: don't blindly truncate shebang string" Revert "gfs2: read journal in large chunks to locate the head" net: ethernet: freescale: set FEC ethtool regs version ...

Mauro Carvalho Chehab committed 7 years ago

Commit 5f09bc82 parents 6fd369d a3b22b91814 files · +19220 −9788Browse files

Showing the changes to include/linux (58 of 1814 files). Show all

Unified · Split

58 files
  1. include/linux/backing-dev-defs.h +1 −0
  2. include/linux/bcma/bcma_soc.h +1 −0
  3. include/linux/blk_types.h +1 −1
  4. include/linux/blktrace_api.h +7 −1
  5. include/linux/bpf_verifier.h +1 −0
  6. include/linux/bpfilter.h +12 −3
  7. include/linux/ceph/libceph.h +4 −2
  8. include/linux/ceph/osd_client.h +0 −1
  9. include/linux/compiler-clang.h +2 −3
  10. include/linux/compiler-gcc.h +1 −5
  11. include/linux/compiler-intel.h +1 −3
  12. include/linux/compiler.h +3 −1
  13. include/linux/compiler_attributes.h +14 −0
  14. include/linux/cpu.h +0 −2
  15. include/linux/dcache.h +4 −3
  16. include/linux/dma-mapping.h +0 −9
  17. include/linux/efi.h +0 −7
  18. include/linux/fb.h +1 −0
  19. include/linux/filter.h +18 −3
  20. include/linux/fs.h +5 −4
  21. include/linux/hid-debug.h +4 −5
  22. include/linux/hid.h +1 −2
  23. include/linux/hyperv.h +3 −2
  24. include/linux/ide.h +2 −0
  25. include/linux/if_arp.h +1 −0
  26. include/linux/interrupt.h +1 −0
  27. include/linux/irqchip/arm-gic-v3.h +1 −1
  28. include/linux/libnvdimm.h +1 −1
  29. include/linux/memblock.h +0 −3
  30. include/linux/memory_hotplug.h +10 −8
  31. include/linux/mfd/cros_ec_commands.h +94 −0
  32. include/linux/mfd/ingenic-tcu.h +1 −1
  33. include/linux/mfd/madera/core.h +7 −0
  34. include/linux/mfd/ti_am335x_tscadc.h +4 −0
  35. include/linux/mfd/tmio.h +1 −1
  36. include/linux/mmc/card.h +1 −0
  37. include/linux/mmzone.h +6 −0
  38. include/linux/module.h +3 −3
  39. include/linux/netdevice.h +8 −0
  40. include/linux/of.h +0 −1
  41. include/linux/pci-dma-compat.h +1 −1
  42. include/linux/perf_event.h +5 −0
  43. include/linux/phy.h +5 −16
  44. include/linux/phy/phy.h +1 −0
  45. include/linux/pm_opp.h +5 −0
  46. include/linux/pm_runtime.h +1 −1
  47. include/linux/qcom_scm.h +1 −0
  48. include/linux/qed/qed_chain.h +31 −0
  49. include/linux/reset.h +11 −4
  50. include/linux/sched.h +10 −1
  51. include/linux/sched/coredump.h +1 −0
  52. include/linux/sched/wake_q.h +5 −1
  53. include/linux/signal.h +1 −1
  54. include/linux/skbuff.h +1 −0
  55. include/linux/stmmac.h +1 −0
  56. include/linux/umh.h +2 −0
  57. include/linux/virtio_config.h +9 −4
  58. include/linux/xarray.h +170 −57
include/linux/backing-dev-defs.h+1−0
@@ -190,6 +190,7 @@ struct backing_dev_info { · 189 unmodified lines
190190 struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */
191191 struct rb_root cgwb_congested_tree; /* their congested states */
192192 struct mutex cgwb_release_mutex; /* protect shutdown of wb structs */
193+ struct rw_semaphore wb_switch_rwsem; /* no cgwb switch while syncing */
193194 #else
194195 struct bdi_writeback_congested *wb_congested;
195196 #endif
include/linux/bcma/bcma_soc.h+1−0
@@ -6,6 +6,7 @@ · 5 unmodified lines
66
77 struct bcma_soc {
88 struct bcma_bus bus;
9+ struct device *dev;
910 };
1011
1112 int __init bcma_host_soc_register(struct bcma_soc *soc);
include/linux/blk_types.h+1−1
@@ -287,7 +287,7 @@ enum req_opf { · 286 unmodified lines
287287 REQ_OP_DISCARD = 3,
288288 /* securely erase sectors */
289289 REQ_OP_SECURE_ERASE = 5,
290− /* seset a zone write pointer */
290+ /* reset a zone write pointer */
291291 REQ_OP_ZONE_RESET = 6,
292292 /* write the same sector many times */
293293 REQ_OP_WRITE_SAME = 7,
include/linux/blktrace_api.h+7−1
@@ -116,7 +116,13 @@ extern void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes); · 115 unmodified lines
116116
117117 static inline sector_t blk_rq_trace_sector(struct request *rq)
118118 {
119− return blk_rq_is_passthrough(rq) ? 0 : blk_rq_pos(rq);
119+ /*
120+ * Tracing should ignore starting sector for passthrough requests and
121+ * requests where starting sector didn't get set.
122+ */
123+ if (blk_rq_is_passthrough(rq) || blk_rq_pos(rq) == (sector_t)-1)
124+ return 0;
125+ return blk_rq_pos(rq);
120126 }
121127
122128 static inline unsigned int blk_rq_trace_nr_sectors(struct request *rq)
include/linux/bpf_verifier.h+1−0
@@ -172,6 +172,7 @@ struct bpf_verifier_state_list { · 171 unmodified lines
172172 #define BPF_ALU_SANITIZE_SRC 1U
173173 #define BPF_ALU_SANITIZE_DST 2U
174174 #define BPF_ALU_NEG_VALUE (1U << 2)
175+#define BPF_ALU_NON_POINTER (1U << 3)
175176 #define BPF_ALU_SANITIZE (BPF_ALU_SANITIZE_SRC | \
176177 BPF_ALU_SANITIZE_DST)
177178
include/linux/bpfilter.h+12−3
@@ -3,13 +3,22 @@ · 2 unmodified lines
33 #define _LINUX_BPFILTER_H
44
55 #include <uapi/linux/bpfilter.h>
6+#include <linux/umh.h>
67
78 struct sock;
89 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval,
910 unsigned int optlen);
1011 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
1112 int __user *optlen);
12−extern int (*bpfilter_process_sockopt)(struct sock *sk, int optname,
13− char __user *optval,
14− unsigned int optlen, bool is_set);
13+struct bpfilter_umh_ops {
14+ struct umh_info info;
15+ /* since ip_getsockopt() can run in parallel, serialize access to umh */
16+ struct mutex lock;
17+ int (*sockopt)(struct sock *sk, int optname,
18+ char __user *optval,
19+ unsigned int optlen, bool is_set);
20+ int (*start)(void);
21+ bool stop;
22+};
23+extern struct bpfilter_umh_ops bpfilter_ops;
1524 #endif
include/linux/ceph/libceph.h+4−2
@@ -35,6 +35,7 @@ · 34 unmodified lines
3535 #define CEPH_OPT_NOMSGAUTH (1<<4) /* don't require msg signing feat */
3636 #define CEPH_OPT_TCP_NODELAY (1<<5) /* TCP_NODELAY on TCP sockets */
3737 #define CEPH_OPT_NOMSGSIGN (1<<6) /* don't sign msgs */
38+#define CEPH_OPT_ABORT_ON_FULL (1<<7) /* abort w/ ENOSPC when full */
3839
3940 #define CEPH_OPT_DEFAULT (CEPH_OPT_TCP_NODELAY)
4041
@@ -53,7 +54,7 @@ struct ceph_options { · 12 unmodified lines
5354 unsigned long osd_request_timeout; /* jiffies */
5455
5556 /*
56− * any type that can't be simply compared or doesn't need need
57+ * any type that can't be simply compared or doesn't need
5758 * to be compared should go beyond this point,
5859 * ceph_compare_options() should be updated accordingly
5960 */
@@ -281,7 +282,8 @@ extern struct ceph_options *ceph_parse_options(char *options, · 221 unmodified lines
281282 const char *dev_name, const char *dev_name_end,
282283 int (*parse_extra_token)(char *c, void *private),
283284 void *private);
284−int ceph_print_client_options(struct seq_file *m, struct ceph_client *client);
285+int ceph_print_client_options(struct seq_file *m, struct ceph_client *client,
286+ bool show_all);
285287 extern void ceph_destroy_options(struct ceph_options *opt);
286288 extern int ceph_compare_options(struct ceph_options *new_opt,
287289 struct ceph_client *client);
include/linux/ceph/osd_client.h+0−1
@@ -354,7 +354,6 @@ struct ceph_osd_client { · 353 unmodified lines
354354 struct rb_root linger_map_checks;
355355 atomic_t num_requests;
356356 atomic_t num_homeless;
357− bool abort_on_full; /* abort w/ ENOSPC when full */
358357 int abort_err;
359358 struct delayed_work timeout_work;
360359 struct delayed_work osds_timeout_work;
include/linux/compiler-clang.h+2−3
@@ -3,9 +3,8 @@ · 2 unmodified lines
33 #error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
44 #endif
55
6−/* Some compiler specific definitions are overwritten here
7− * for Clang compiler
8− */
6+/* Compiler specific definitions for Clang compiler */
7+
98 #define uninitialized_var(x) x = *(&(x))
109
1110 /* same as gcc, this was present in clang-2.6 so we can assume it works
include/linux/compiler-gcc.h+1−5
@@ -58,17 +58,13 @@ · 57 unmodified lines
5858 (typeof(ptr)) (__ptr + (off)); \
5959 })
6060
61−/* Make the optimizer believe the variable can be manipulated arbitrarily. */
62−#define OPTIMIZER_HIDE_VAR(var) \
63− __asm__ ("" : "=r" (var) : "0" (var))
64−
6561 /*
6662 * A trick to suppress uninitialized variable warning without generating any
6763 * code
6864 */
6965 #define uninitialized_var(x) x = x
7066
71−#ifdef RETPOLINE
67+#ifdef CONFIG_RETPOLINE
7268 #define __noretpoline __attribute__((__indirect_branch__("keep")))
7369 #endif
7470
include/linux/compiler-intel.h+1−3
@@ -5,9 +5,7 @@ · 4 unmodified lines
55
66 #ifdef __ECC
77
8−/* Some compiler specific definitions are overwritten here
9− * for Intel ECC compiler
10− */
8+/* Compiler specific definitions for Intel ECC compiler */
119
1210 #include <asm/intrinsics.h>
1311
include/linux/compiler.h+3−1
@@ -161,7 +161,9 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, · 160 unmodified lines
161161 #endif
162162
163163 #ifndef OPTIMIZER_HIDE_VAR
164−#define OPTIMIZER_HIDE_VAR(var) barrier()
164+/* Make the optimizer believe the variable can be manipulated arbitrarily. */
165+#define OPTIMIZER_HIDE_VAR(var) \
166+ __asm__ ("" : "=r" (var) : "0" (var))
165167 #endif
166168
167169 /* Not-quite-unique ID. */
include/linux/compiler_attributes.h+14−0
@@ -34,6 +34,7 @@ · 33 unmodified lines
3434 #ifndef __has_attribute
3535 # define __has_attribute(x) __GCC4_has_attribute_##x
3636 # define __GCC4_has_attribute___assume_aligned__ (__GNUC_MINOR__ >= 9)
37+# define __GCC4_has_attribute___copy__ 0
3738 # define __GCC4_has_attribute___designated_init__ 0
3839 # define __GCC4_has_attribute___externally_visible__ 1
3940 # define __GCC4_has_attribute___noclone__ 1
@@ -100,6 +101,19 @@ · 60 unmodified lines
100101 */
101102 #define __attribute_const__ __attribute__((__const__))
102103
104+/*
105+ * Optional: only supported since gcc >= 9
106+ * Optional: not supported by clang
107+ * Optional: not supported by icc
108+ *
109+ * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-copy-function-attribute
110+ */
111+#if __has_attribute(__copy__)
112+# define __copy(symbol) __attribute__((__copy__(symbol)))
113+#else
114+# define __copy(symbol)
115+#endif
116+
103117 /*
104118 * Don't. Just don't. See commit 771c035372a0 ("deprecate the '__deprecated'
105119 * attribute warnings entirely and for good") for more information.
include/linux/cpu.h+0−2
@@ -180,12 +180,10 @@ enum cpuhp_smt_control { · 179 unmodified lines
180180 #if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT)
181181 extern enum cpuhp_smt_control cpu_smt_control;
182182 extern void cpu_smt_disable(bool force);
183−extern void cpu_smt_check_topology_early(void);
184183 extern void cpu_smt_check_topology(void);
185184 #else
186185 # define cpu_smt_control (CPU_SMT_ENABLED)
187186 static inline void cpu_smt_disable(bool force) { }
188−static inline void cpu_smt_check_topology_early(void) { }
189187 static inline void cpu_smt_check_topology(void) { }
190188 #endif
191189
include/linux/dcache.h+4−3
@@ -62,9 +62,10 @@ extern const struct qstr slash_name; · 61 unmodified lines
6262 struct dentry_stat_t {
6363 long nr_dentry;
6464 long nr_unused;
65− long age_limit; /* age in seconds */
66− long want_pages; /* pages requested by system */
67− long dummy[2];
65+ long age_limit; /* age in seconds */
66+ long want_pages; /* pages requested by system */
67+ long nr_negative; /* # of unused negative dentries */
68+ long dummy; /* Reserved for future use */
6869 };
6970 extern struct dentry_stat_t dentry_stat;
7071
include/linux/dma-mapping.h+0−9
@@ -717,15 +717,6 @@ static inline unsigned long dma_max_pfn(struct device *dev) · 716 unmodified lines
717717 }
718718 #endif
719719
720−/*
721− * Please always use dma_alloc_coherent instead as it already zeroes the memory!
722− */
723−static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
724− dma_addr_t *dma_handle, gfp_t flag)
725−{
726− return dma_alloc_coherent(dev, size, dma_handle, flag);
727−}
728−
729720 static inline int dma_get_cache_alignment(void)
730721 {
731722 #ifdef ARCH_DMA_MINALIGN
include/linux/efi.h+0−7
@@ -1198,8 +1198,6 @@ static inline bool efi_enabled(int feature) · 1197 unmodified lines
11981198 extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
11991199
12001200 extern bool efi_is_table_address(unsigned long phys_addr);
1201−
1202−extern int efi_apply_persistent_mem_reservations(void);
12031201 #else
12041202 static inline bool efi_enabled(int feature)
12051203 {
@@ -1218,11 +1216,6 @@ static inline bool efi_is_table_address(unsigned long phys_addr) · 12 unmodified lines
12181216 {
12191217 return false;
12201218 }
1221−
1222−static inline int efi_apply_persistent_mem_reservations(void)
1223−{
1224− return 0;
1225−}
12261219 #endif
12271220
12281221 extern int efi_status_to_err(efi_status_t status);
include/linux/fb.h+1−0
@@ -653,6 +653,7 @@ extern int fb_new_modelist(struct fb_info *info); · 652 unmodified lines
653653
654654 extern struct fb_info *registered_fb[FB_MAX];
655655 extern int num_registered_fb;
656+extern bool fb_center_logo;
656657 extern struct class *fb_class;
657658
658659 #define for_each_registered_fb(i) \
include/linux/filter.h+18−3
@@ -591,8 +591,8 @@ static inline u8 *bpf_skb_cb(struct sk_buff *skb) · 590 unmodified lines
591591 return qdisc_skb_cb(skb)->data;
592592 }
593593
594−static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog,
595− struct sk_buff *skb)
594+static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog,
595+ struct sk_buff *skb)
596596 {
597597 u8 *cb_data = bpf_skb_cb(skb);
598598 u8 cb_saved[BPF_SKB_CB_LEN];
@@ -611,15 +611,30 @@ static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, · 12 unmodified lines
611611 return res;
612612 }
613613
614+static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog,
615+ struct sk_buff *skb)
616+{
617+ u32 res;
618+
619+ preempt_disable();
620+ res = __bpf_prog_run_save_cb(prog, skb);
621+ preempt_enable();
622+ return res;
623+}
624+
614625 static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog,
615626 struct sk_buff *skb)
616627 {
617628 u8 *cb_data = bpf_skb_cb(skb);
629+ u32 res;
618630
619631 if (unlikely(prog->cb_access))
620632 memset(cb_data, 0, BPF_SKB_CB_LEN);
621633
622− return BPF_PROG_RUN(prog, skb);
634+ preempt_disable();
635+ res = BPF_PROG_RUN(prog, skb);
636+ preempt_enable();
637+ return res;
623638 }
624639
625640 static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,
include/linux/fs.h+5−4
@@ -1479,11 +1479,12 @@ struct super_block { · 1478 unmodified lines
14791479 struct user_namespace *s_user_ns;
14801480
14811481 /*
1482− * Keep the lru lists last in the structure so they always sit on their
1483− * own individual cachelines.
1482+ * The list_lru structure is essentially just a pointer to a table
1483+ * of per-node lru lists, each of which has its own spinlock.
1484+ * There is no need to put them into separate cachelines.
14841485 */
1485− struct list_lru s_dentry_lru ____cacheline_aligned_in_smp;
1486− struct list_lru s_inode_lru ____cacheline_aligned_in_smp;
1486+ struct list_lru s_dentry_lru;
1487+ struct list_lru s_inode_lru;
14871488 struct rcu_head rcu;
14881489 struct work_struct destroy_work;
14891490
include/linux/hid-debug.h+4−5
@@ -24,7 +24,10 @@ · 23 unmodified lines
2424
2525 #ifdef CONFIG_DEBUG_FS
2626
27+#include <linux/kfifo.h>
28+
2729 #define HID_DEBUG_BUFSIZE 512
30+#define HID_DEBUG_FIFOSIZE 512
2831
2932 void hid_dump_input(struct hid_device *, struct hid_usage *, __s32);
3033 void hid_dump_report(struct hid_device *, int , u8 *, int);
@@ -37,11 +40,8 @@ void hid_debug_init(void); · 6 unmodified lines
3740 void hid_debug_exit(void);
3841 void hid_debug_event(struct hid_device *, char *);
3942
40−
4143 struct hid_debug_list {
42− char *hid_debug_buf;
43− int head;
44− int tail;
44+ DECLARE_KFIFO_PTR(hid_debug_fifo, char);
4545 struct fasync_struct *fasync;
4646 struct hid_device *hdev;
4747 struct list_head node;
@@ -64,4 +64,3 @@ struct hid_debug_list { · 16 unmodified lines
6464 #endif
6565
6666 #endif
67−
include/linux/hid.h+1−2
@@ -430,7 +430,7 @@ struct hid_local { · 429 unmodified lines
430430 */
431431
432432 struct hid_collection {
433− struct hid_collection *parent;
433+ int parent_idx; /* device->collection */
434434 unsigned type;
435435 unsigned usage;
436436 unsigned level;
@@ -658,7 +658,6 @@ struct hid_parser { · 221 unmodified lines
658658 unsigned int *collection_stack;
659659 unsigned int collection_stack_ptr;
660660 unsigned int collection_stack_size;
661− struct hid_collection *active_collection;
662661 struct hid_device *device;
663662 unsigned int scan_flags;
664663 };
include/linux/hyperv.h+3−2
@@ -1159,8 +1159,9 @@ struct hv_ring_buffer_debug_info { · 1158 unmodified lines
11591159 u32 bytes_avail_towrite;
11601160 };
11611161
1162−void hv_ringbuffer_get_debuginfo(const struct hv_ring_buffer_info *ring_info,
1163− struct hv_ring_buffer_debug_info *debug_info);
1162+
1163+int hv_ringbuffer_get_debuginfo(const struct hv_ring_buffer_info *ring_info,
1164+ struct hv_ring_buffer_debug_info *debug_info);
11641165
11651166 /* Vmbus interface */
11661167 #define vmbus_driver_register(driver) \
include/linux/ide.h+2−0
@@ -615,6 +615,7 @@ struct ide_drive_s { · 614 unmodified lines
615615
616616 /* current sense rq and buffer */
617617 bool sense_rq_armed;
618+ bool sense_rq_active;
618619 struct request *sense_rq;
619620 struct request_sense sense_data;
620621
@@ -1219,6 +1220,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); · 598 unmodified lines
12191220 extern void ide_timer_expiry(struct timer_list *t);
12201221 extern irqreturn_t ide_intr(int irq, void *dev_id);
12211222 extern blk_status_t ide_queue_rq(struct blk_mq_hw_ctx *, const struct blk_mq_queue_data *);
1223+extern blk_status_t ide_issue_rq(ide_drive_t *, struct request *, bool);
12221224 extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq);
12231225
12241226 void ide_init_disk(struct gendisk *, ide_drive_t *);
include/linux/if_arp.h+1−0
@@ -54,6 +54,7 @@ static inline bool dev_is_mac_header_xmit(const struct net_device *dev) · 53 unmodified lines
5454 case ARPHRD_IPGRE:
5555 case ARPHRD_VOID:
5656 case ARPHRD_NONE:
57+ case ARPHRD_RAWIP:
5758 return false;
5859 default:
5960 return true;
include/linux/interrupt.h+1−0
@@ -260,6 +260,7 @@ struct irq_affinity { · 259 unmodified lines
260260 /**
261261 * struct irq_affinity_desc - Interrupt affinity descriptor
262262 * @mask: cpumask to hold the affinity assignment
263+ * @is_managed: 1 if the interrupt is managed internally
263264 */
264265 struct irq_affinity_desc {
265266 struct cpumask mask;
include/linux/irqchip/arm-gic-v3.h+1−1
@@ -319,7 +319,7 @@ · 318 unmodified lines
319319 #define GITS_TYPER_PLPIS (1UL << 0)
320320 #define GITS_TYPER_VLPIS (1UL << 1)
321321 #define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT 4
322−#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
322+#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
323323 #define GITS_TYPER_IDBITS_SHIFT 8
324324 #define GITS_TYPER_DEVBITS_SHIFT 13
325325 #define GITS_TYPER_DEVBITS(r) ((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
include/linux/libnvdimm.h+1−1
@@ -160,6 +160,7 @@ static inline struct nd_blk_region_desc *to_blk_region_desc( · 159 unmodified lines
160160 }
161161
162162 enum nvdimm_security_state {
163+ NVDIMM_SECURITY_ERROR = -1,
163164 NVDIMM_SECURITY_DISABLED,
164165 NVDIMM_SECURITY_UNLOCKED,
165166 NVDIMM_SECURITY_LOCKED,
@@ -234,7 +235,6 @@ static inline struct nvdimm *nvdimm_create(struct nvdimm_bus *nvdimm_bus, · 68 unmodified lines
234235 cmd_mask, num_flush, flush_wpq, NULL, NULL);
235236 }
236237
237−int nvdimm_security_setup_events(struct nvdimm *nvdimm);
238238 const struct nd_cmd_desc *nd_cmd_dimm_desc(int cmd);
239239 const struct nd_cmd_desc *nd_cmd_bus_desc(int cmd);
240240 u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd,
include/linux/memblock.h+0−3
@@ -29,9 +29,6 @@ extern unsigned long max_pfn; · 28 unmodified lines
2929 */
3030 extern unsigned long long max_possible_pfn;
3131
32−#define INIT_MEMBLOCK_REGIONS 128
33−#define INIT_PHYSMEM_REGIONS 4
34−
3532 /**
3633 * enum memblock_flags - definition of memory region attributes
3734 * @MEMBLOCK_NONE: no special request
include/linux/memory_hotplug.h+10−8
@@ -21,14 +21,16 @@ struct vmem_altmap; · 20 unmodified lines
2121 * walkers which rely on the fully initialized page->flags and others
2222 * should use this rather than pfn_valid && pfn_to_page
2323 */
24−#define pfn_to_online_page(pfn) \
25−({ \
26− struct page *___page = NULL; \
27− unsigned long ___nr = pfn_to_section_nr(pfn); \
28− \
29− if (___nr < NR_MEM_SECTIONS && online_section_nr(___nr))\
30− ___page = pfn_to_page(pfn); \
31− ___page; \
24+#define pfn_to_online_page(pfn) \
25+({ \
26+ struct page *___page = NULL; \
27+ unsigned long ___pfn = pfn; \
28+ unsigned long ___nr = pfn_to_section_nr(___pfn); \
29+ \
30+ if (___nr < NR_MEM_SECTIONS && online_section_nr(___nr) && \
31+ pfn_valid_within(___pfn)) \
32+ ___page = pfn_to_page(___pfn); \
33+ ___page; \
3234 })
3335
3436 /*
include/linux/mfd/cros_ec_commands.h+94−0
@@ -2790,6 +2790,100 @@ struct ec_response_battery_vendor_param { · 2789 unmodified lines
27902790 uint32_t value;
27912791 } __packed;
27922792
2793+/*****************************************************************************/
2794+/* Commands for I2S recording on audio codec. */
2795+
2796+#define EC_CMD_CODEC_I2S 0x00BC
2797+
2798+enum ec_codec_i2s_subcmd {
2799+ EC_CODEC_SET_SAMPLE_DEPTH = 0x0,
2800+ EC_CODEC_SET_GAIN = 0x1,
2801+ EC_CODEC_GET_GAIN = 0x2,
2802+ EC_CODEC_I2S_ENABLE = 0x3,
2803+ EC_CODEC_I2S_SET_CONFIG = 0x4,
2804+ EC_CODEC_I2S_SET_TDM_CONFIG = 0x5,
2805+ EC_CODEC_I2S_SET_BCLK = 0x6,
2806+};
2807+
2808+enum ec_sample_depth_value {
2809+ EC_CODEC_SAMPLE_DEPTH_16 = 0,
2810+ EC_CODEC_SAMPLE_DEPTH_24 = 1,
2811+};
2812+
2813+enum ec_i2s_config {
2814+ EC_DAI_FMT_I2S = 0,
2815+ EC_DAI_FMT_RIGHT_J = 1,
2816+ EC_DAI_FMT_LEFT_J = 2,
2817+ EC_DAI_FMT_PCM_A = 3,
2818+ EC_DAI_FMT_PCM_B = 4,
2819+ EC_DAI_FMT_PCM_TDM = 5,
2820+};
2821+
2822+struct ec_param_codec_i2s {
2823+ /*
2824+ * enum ec_codec_i2s_subcmd
2825+ */
2826+ uint8_t cmd;
2827+ union {
2828+ /*
2829+ * EC_CODEC_SET_SAMPLE_DEPTH
2830+ * Value should be one of ec_sample_depth_value.
2831+ */
2832+ uint8_t depth;
2833+
2834+ /*
2835+ * EC_CODEC_SET_GAIN
2836+ * Value should be 0~43 for both channels.
2837+ */
2838+ struct ec_param_codec_i2s_set_gain {
2839+ uint8_t left;
2840+ uint8_t right;
2841+ } __packed gain;
2842+
2843+ /*
2844+ * EC_CODEC_I2S_ENABLE
2845+ * 1 to enable, 0 to disable.
2846+ */
2847+ uint8_t i2s_enable;
2848+
2849+ /*
2850+ * EC_CODEC_I2S_SET_COFNIG
2851+ * Value should be one of ec_i2s_config.
2852+ */
2853+ uint8_t i2s_config;
2854+
2855+ /*
2856+ * EC_CODEC_I2S_SET_TDM_CONFIG
2857+ * Value should be one of ec_i2s_config.
2858+ */
2859+ struct ec_param_codec_i2s_tdm {
2860+ /*
2861+ * 0 to 496
2862+ */
2863+ int16_t ch0_delay;
2864+ /*
2865+ * -1 to 496
2866+ */
2867+ int16_t ch1_delay;
2868+ uint8_t adjacent_to_ch0;
2869+ uint8_t adjacent_to_ch1;
2870+ } __packed tdm_param;
2871+
2872+ /*
2873+ * EC_CODEC_I2S_SET_BCLK
2874+ */
2875+ uint32_t bclk;
2876+ };
2877+} __packed;
2878+
2879+/*
2880+ * For subcommand EC_CODEC_GET_GAIN.
2881+ */
2882+struct ec_response_codec_gain {
2883+ uint8_t left;
2884+ uint8_t right;
2885+} __packed;
2886+
27932887 /*****************************************************************************/
27942888 /* System commands */
27952889
include/linux/mfd/ingenic-tcu.h+1−1
@@ -41,7 +41,7 @@ · 40 unmodified lines
4141 #define TCU_TCSR_PRESCALE_LSB 3
4242 #define TCU_TCSR_PRESCALE_MASK 0x38
4343
44−#define TCU_TCSR_PWM_SD BIT(9) /* 0: Shutdown abruptly 1: gracefully */
44+#define TCU_TCSR_PWM_SD BIT(9) /* 0: Shutdown gracefully 1: abruptly */
4545 #define TCU_TCSR_PWM_INITL_HIGH BIT(8) /* Sets the initial output level */
4646 #define TCU_TCSR_PWM_EN BIT(7) /* PWM pin output enable */
4747
include/linux/mfd/madera/core.h+7−0
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 #include <linux/gpio/consumer.h>
1616 #include <linux/interrupt.h>
1717 #include <linux/mfd/madera/pdata.h>
18+#include <linux/mutex.h>
1819 #include <linux/notifier.h>
1920 #include <linux/regmap.h>
2021 #include <linux/regulator/consumer.h>
@@ -37,6 +38,8 @@ enum madera_type { · 16 unmodified lines
3738
3839 #define MADERA_MAX_MICBIAS 4
3940
41+#define MADERA_MAX_HP_OUTPUT 3
42+
4043 /* Notifier events */
4144 #define MADERA_NOTIFY_VOICE_TRIGGER 0x1
4245 #define MADERA_NOTIFY_HPDET 0x2
@@ -183,6 +186,10 @@ struct madera { · 140 unmodified lines
183186 unsigned int num_childbias[MADERA_MAX_MICBIAS];
184187
185188 struct snd_soc_dapm_context *dapm;
189+ struct mutex dapm_ptr_lock;
190+ unsigned int hp_ena;
191+ bool out_clamp[MADERA_MAX_HP_OUTPUT];
192+ bool out_shorted[MADERA_MAX_HP_OUTPUT];
186193
187194 struct blocking_notifier_head notifier;
188195 };
include/linux/mfd/ti_am335x_tscadc.h+4−0
@@ -78,6 +78,8 @@ · 77 unmodified lines
7878 #define STEPCONFIG_YNN BIT(8)
7979 #define STEPCONFIG_XNP BIT(9)
8080 #define STEPCONFIG_YPN BIT(10)
81+#define STEPCONFIG_RFP(val) ((val) << 12)
82+#define STEPCONFIG_RFP_VREFP (0x3 << 12)
8183 #define STEPCONFIG_INM_MASK (0xF << 15)
8284 #define STEPCONFIG_INM(val) ((val) << 15)
8385 #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8)
@@ -86,6 +88,8 @@ · 2 unmodified lines
8688 #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4)
8789 #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8)
8890 #define STEPCONFIG_FIFO1 BIT(26)
91+#define STEPCONFIG_RFM(val) ((val) << 23)
92+#define STEPCONFIG_RFM_VREFN (0x3 << 23)
8993
9094 /* Delay register */
9195 #define STEPDELAY_OPEN_MASK (0x3FFFF << 0)
include/linux/mfd/tmio.h+1−1
@@ -79,7 +79,7 @@ · 78 unmodified lines
7979 /* Some controllers have a CBSY bit */
8080 #define TMIO_MMC_HAVE_CBSY BIT(11)
8181
82−/* Some controllers that support HS400 use use 4 taps while others use 8. */
82+/* Some controllers that support HS400 use 4 taps while others use 8. */
8383 #define TMIO_MMC_HAVE_4TAP_HS400 BIT(13)
8484
8585 int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
include/linux/mmc/card.h+1−0
@@ -308,6 +308,7 @@ struct mmc_card { · 307 unmodified lines
308308 unsigned int nr_parts;
309309
310310 unsigned int bouncesz; /* Bounce buffer size */
311+ struct workqueue_struct *complete_wq; /* Private workqueue */
311312 };
312313
313314 static inline bool mmc_large_sector(struct mmc_card *card)
include/linux/mmzone.h+6−0
@@ -520,6 +520,12 @@ enum pgdat_flags { · 519 unmodified lines
520520 PGDAT_RECLAIM_LOCKED, /* prevents concurrent reclaim */
521521 };
522522
523+enum zone_flags {
524+ ZONE_BOOSTED_WATERMARK, /* zone recently boosted watermarks.
525+ * Cleared when kswapd is woken.
526+ */
527+};
528+
523529 static inline unsigned long zone_managed_pages(struct zone *zone)
524530 {
525531 return (unsigned long)atomic_long_read(&zone->managed_pages);
include/linux/module.h+3−3
@@ -129,13 +129,13 @@ extern void cleanup_module(void); · 128 unmodified lines
129129 #define module_init(initfn) \
130130 static inline initcall_t __maybe_unused __inittest(void) \
131131 { return initfn; } \
132− int init_module(void) __attribute__((alias(#initfn)));
132+ int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
133133
134134 /* This is only required if you want to be unloadable. */
135135 #define module_exit(exitfn) \
136136 static inline exitcall_t __maybe_unused __exittest(void) \
137137 { return exitfn; } \
138− void cleanup_module(void) __attribute__((alias(#exitfn)));
138+ void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
139139
140140 #endif
141141
@@ -828,7 +828,7 @@ static inline void module_bug_finalize(const Elf_Ehdr *hdr, · 686 unmodified lines
828828 static inline void module_bug_cleanup(struct module *mod) {}
829829 #endif /* CONFIG_GENERIC_BUG */
830830
831−#ifdef RETPOLINE
831+#ifdef CONFIG_RETPOLINE
832832 extern bool retpoline_module_ok(bool has_retpoline);
833833 #else
834834 static inline bool retpoline_module_ok(bool has_retpoline)
include/linux/netdevice.h+8−0
@@ -1483,6 +1483,7 @@ struct net_device_ops { · 1482 unmodified lines
14831483 * @IFF_NO_RX_HANDLER: device doesn't support the rx_handler hook
14841484 * @IFF_FAILOVER: device is a failover master device
14851485 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device
1486+ * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device
14861487 */
14871488 enum netdev_priv_flags {
14881489 IFF_802_1Q_VLAN = 1<<0,
@@ -1514,6 +1515,7 @@ enum netdev_priv_flags { · 25 unmodified lines
15141515 IFF_NO_RX_HANDLER = 1<<26,
15151516 IFF_FAILOVER = 1<<27,
15161517 IFF_FAILOVER_SLAVE = 1<<28,
1518+ IFF_L3MDEV_RX_HANDLER = 1<<29,
15171519 };
15181520
15191521 #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1544,6 +1546,7 @@ enum netdev_priv_flags { · 24 unmodified lines
15441546 #define IFF_NO_RX_HANDLER IFF_NO_RX_HANDLER
15451547 #define IFF_FAILOVER IFF_FAILOVER
15461548 #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
1549+#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
15471550
15481551 /**
15491552 * struct net_device - The DEVICE structure.
@@ -4549,6 +4552,11 @@ static inline bool netif_supports_nofcs(struct net_device *dev) · 2999 unmodified lines
45494552 return dev->priv_flags & IFF_SUPP_NOFCS;
45504553 }
45514554
4555+static inline bool netif_has_l3_rx_handler(const struct net_device *dev)
4556+{
4557+ return dev->priv_flags & IFF_L3MDEV_RX_HANDLER;
4558+}
4559+
45524560 static inline bool netif_is_l3_master(const struct net_device *dev)
45534561 {
45544562 return dev->priv_flags & IFF_L3MDEV_MASTER;
include/linux/of.h+0−1
@@ -50,7 +50,6 @@ struct of_irq_controller; · 49 unmodified lines
5050
5151 struct device_node {
5252 const char *name;
53− const char *type;
5453 phandle phandle;
5554 const char *full_name;
5655 struct fwnode_handle fwnode;
include/linux/pci-dma-compat.h+1−1
@@ -24,7 +24,7 @@ static inline void * · 23 unmodified lines
2424 pci_zalloc_consistent(struct pci_dev *hwdev, size_t size,
2525 dma_addr_t *dma_handle)
2626 {
27− return dma_zalloc_coherent(&hwdev->dev, size, dma_handle, GFP_ATOMIC);
27+ return dma_alloc_coherent(&hwdev->dev, size, dma_handle, GFP_ATOMIC);
2828 }
2929
3030 static inline void
include/linux/perf_event.h+5−0
@@ -447,6 +447,11 @@ struct pmu { · 446 unmodified lines
447447 * Filter events for PMU-specific reasons.
448448 */
449449 int (*filter_match) (struct perf_event *event); /* optional */
450+
451+ /*
452+ * Check period value for PERF_EVENT_IOC_PERIOD ioctl.
453+ */
454+ int (*check_period) (struct perf_event *event, u64 value); /* optional */
450455 };
451456
452457 enum perf_addr_filter_action_t {
include/linux/phy.h+5−16
@@ -48,6 +48,7 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_features) __ro_after_init; · 47 unmodified lines
4848 extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_fibre_features) __ro_after_init;
4949 extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_all_ports_features) __ro_after_init;
5050 extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_features) __ro_after_init;
51+extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_fec_features) __ro_after_init;
5152 extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_init;
5253
5354 #define PHY_BASIC_FEATURES ((unsigned long *)&phy_basic_features)
@@ -56,6 +57,7 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_ini · 2 unmodified lines
5657 #define PHY_GBIT_FIBRE_FEATURES ((unsigned long *)&phy_gbit_fibre_features)
5758 #define PHY_GBIT_ALL_PORTS_FEATURES ((unsigned long *)&phy_gbit_all_ports_features)
5859 #define PHY_10GBIT_FEATURES ((unsigned long *)&phy_10gbit_features)
60+#define PHY_10GBIT_FEC_FEATURES ((unsigned long *)&phy_10gbit_fec_features)
5961 #define PHY_10GBIT_FULL_FEATURES ((unsigned long *)&phy_10gbit_full_features)
6062
6163 extern const int phy_10_100_features_array[4];
@@ -467,8 +469,8 @@ struct phy_device { · 405 unmodified lines
467469 * only works for PHYs with IDs which match this field
468470 * name: The friendly name of this PHY type
469471 * phy_id_mask: Defines the important bits of the phy_id
470− * features: A list of features (speed, duplex, etc) supported
471− * by this PHY
472+ * features: A mandatory list of features (speed, duplex, etc)
473+ * supported by this PHY
472474 * flags: A bitfield defining certain other features this PHY
473475 * supports (like interrupts)
474476 *
@@ -672,26 +674,13 @@ phy_lookup_setting(int speed, int duplex, const unsigned long *mask, · 197 unmodified lines
672674 size_t phy_speeds(unsigned int *speeds, size_t size,
673675 unsigned long *mask);
674676
675−static inline bool __phy_is_started(struct phy_device *phydev)
676−{
677− WARN_ON(!mutex_is_locked(&phydev->lock));
678−
679− return phydev->state >= PHY_UP;
680−}
681−
682677 /**
683678 * phy_is_started - Convenience function to check whether PHY is started
684679 * @phydev: The phy_device struct
685680 */
686681 static inline bool phy_is_started(struct phy_device *phydev)
687682 {
688− bool started;
689−
690− mutex_lock(&phydev->lock);
691− started = __phy_is_started(phydev);
692− mutex_unlock(&phydev->lock);
693−
694− return started;
683+ return phydev->state >= PHY_UP;
695684 }
696685
697686 void phy_resolve_aneg_linkmode(struct phy_device *phydev);
include/linux/phy/phy.h+1−0
@@ -42,6 +42,7 @@ enum phy_mode { · 41 unmodified lines
4242 PHY_MODE_PCIE,
4343 PHY_MODE_ETHERNET,
4444 PHY_MODE_MIPI_DPHY,
45+ PHY_MODE_SATA
4546 };
4647
4748 /**
include/linux/pm_opp.h+5−0
@@ -108,6 +108,7 @@ void dev_pm_opp_put(struct dev_pm_opp *opp); · 107 unmodified lines
108108 int dev_pm_opp_add(struct device *dev, unsigned long freq,
109109 unsigned long u_volt);
110110 void dev_pm_opp_remove(struct device *dev, unsigned long freq);
111+void dev_pm_opp_remove_all_dynamic(struct device *dev);
111112
112113 int dev_pm_opp_enable(struct device *dev, unsigned long freq);
113114
@@ -217,6 +218,10 @@ static inline void dev_pm_opp_remove(struct device *dev, unsigned long freq) · 103 unmodified lines
217218 {
218219 }
219220
221+static inline void dev_pm_opp_remove_all_dynamic(struct device *dev)
222+{
223+}
224+
220225 static inline int dev_pm_opp_enable(struct device *dev, unsigned long freq)
221226 {
222227 return 0;
include/linux/pm_runtime.h+1−1
@@ -105,7 +105,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev) · 104 unmodified lines
105105
106106 static inline void pm_runtime_mark_last_busy(struct device *dev)
107107 {
108− WRITE_ONCE(dev->power.last_busy, ktime_to_ns(ktime_get()));
108+ WRITE_ONCE(dev->power.last_busy, ktime_get_mono_fast_ns());
109109 }
110110
111111 static inline bool pm_runtime_is_irq_safe(struct device *dev)
include/linux/qcom_scm.h+1−0
@@ -13,6 +13,7 @@ · 12 unmodified lines
1313 #ifndef __QCOM_SCM_H
1414 #define __QCOM_SCM_H
1515
16+#include <linux/err.h>
1617 #include <linux/types.h>
1718 #include <linux/cpumask.h>
1819
include/linux/qed/qed_chain.h+31−0
@@ -663,6 +663,37 @@ out: · 662 unmodified lines
663663 static inline void qed_chain_set_prod(struct qed_chain *p_chain,
664664 u32 prod_idx, void *p_prod_elem)
665665 {
666+ if (p_chain->mode == QED_CHAIN_MODE_PBL) {
667+ u32 cur_prod, page_mask, page_cnt, page_diff;
668+
669+ cur_prod = is_chain_u16(p_chain) ? p_chain->u.chain16.prod_idx :
670+ p_chain->u.chain32.prod_idx;
671+
672+ /* Assume that number of elements in a page is power of 2 */
673+ page_mask = ~p_chain->elem_per_page_mask;
674+
675+ /* Use "cur_prod - 1" and "prod_idx - 1" since producer index
676+ * reaches the first element of next page before the page index
677+ * is incremented. See qed_chain_produce().
678+ * Index wrap around is not a problem because the difference
679+ * between current and given producer indices is always
680+ * positive and lower than the chain's capacity.
681+ */
682+ page_diff = (((cur_prod - 1) & page_mask) -
683+ ((prod_idx - 1) & page_mask)) /
684+ p_chain->elem_per_page;
685+
686+ page_cnt = qed_chain_get_page_cnt(p_chain);
687+ if (is_chain_u16(p_chain))
688+ p_chain->pbl.c.u16.prod_page_idx =
689+ (p_chain->pbl.c.u16.prod_page_idx -
690+ page_diff + page_cnt) % page_cnt;
691+ else
692+ p_chain->pbl.c.u32.prod_page_idx =
693+ (p_chain->pbl.c.u32.prod_page_idx -
694+ page_diff + page_cnt) % page_cnt;
695+ }
696+
666697 if (is_chain_u16(p_chain))
667698 p_chain->u.chain16.prod_idx = (u16) prod_idx;
668699 else
include/linux/reset.h+11−4
@@ -32,6 +32,8 @@ struct reset_control *devm_reset_control_array_get(struct device *dev, · 31 unmodified lines
3232 struct reset_control *of_reset_control_array_get(struct device_node *np,
3333 bool shared, bool optional);
3434
35+int reset_control_get_count(struct device *dev);
36+
3537 #else
3638
3739 static inline int reset_control_reset(struct reset_control *rstc)
@@ -97,6 +99,11 @@ of_reset_control_array_get(struct device_node *np, bool shared, bool optional) · 59 unmodified lines
9799 return optional ? NULL : ERR_PTR(-ENOTSUPP);
98100 }
99101
102+static inline int reset_control_get_count(struct device *dev)
103+{
104+ return -ENOENT;
105+}
106+
100107 #endif /* CONFIG_RESET_CONTROLLER */
101108
102109 static inline int __must_check device_reset(struct device *dev)
@@ -138,7 +145,7 @@ __must_check reset_control_get_exclusive(struct device *dev, const char *id) · 35 unmodified lines
138145 *
139146 * Returns a struct reset_control or IS_ERR() condition containing errno.
140147 * This function is intended for use with reset-controls which are shared
141− * between hardware-blocks.
148+ * between hardware blocks.
142149 *
143150 * When a reset-control is shared, the behavior of reset_control_assert /
144151 * deassert is changed, the reset-core will keep track of a deassert_count
@@ -187,7 +194,7 @@ static inline struct reset_control *of_reset_control_get_exclusive( · 42 unmodified lines
187194 }
188195
189196 /**
190− * of_reset_control_get_shared - Lookup and obtain an shared reference
197+ * of_reset_control_get_shared - Lookup and obtain a shared reference
191198 * to a reset controller.
192199 * @node: device to be reset by the controller
193200 * @id: reset line name
@@ -229,7 +236,7 @@ static inline struct reset_control *of_reset_control_get_exclusive_by_index( · 35 unmodified lines
229236 }
230237
231238 /**
232− * of_reset_control_get_shared_by_index - Lookup and obtain an shared
239+ * of_reset_control_get_shared_by_index - Lookup and obtain a shared
233240 * reference to a reset controller
234241 * by index.
235242 * @node: device to be reset by the controller
@@ -322,7 +329,7 @@ devm_reset_control_get_exclusive_by_index(struct device *dev, int index) · 86 unmodified lines
322329
323330 /**
324331 * devm_reset_control_get_shared_by_index - resource managed
325− * reset_control_get_shared
332+ * reset_control_get_shared
326333 * @dev: device to be reset by the controller
327334 * @index: index of the reset controller
328335 *
include/linux/sched.h+10−1
@@ -995,7 +995,7 @@ struct task_struct { · 994 unmodified lines
995995 /* cg_list protected by css_set_lock and tsk->alloc_lock: */
996996 struct list_head cg_list;
997997 #endif
998−#ifdef CONFIG_RESCTRL
998+#ifdef CONFIG_X86_CPU_RESCTRL
999999 u32 closid;
10001000 u32 rmid;
10011001 #endif
@@ -1406,6 +1406,7 @@ extern struct pid *cad_pid; · 404 unmodified lines
14061406 #define PF_RANDOMIZE 0x00400000 /* Randomize virtual address space */
14071407 #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */
14081408 #define PF_MEMSTALL 0x01000000 /* Stalled due to lack of memory */
1409+#define PF_UMH 0x02000000 /* I'm an Usermodehelper process */
14091410 #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */
14101411 #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */
14111412 #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
@@ -1904,6 +1905,14 @@ static inline void rseq_execve(struct task_struct *t) · 492 unmodified lines
19041905
19051906 #endif
19061907
1908+void __exit_umh(struct task_struct *tsk);
1909+
1910+static inline void exit_umh(struct task_struct *tsk)
1911+{
1912+ if (unlikely(tsk->flags & PF_UMH))
1913+ __exit_umh(tsk);
1914+}
1915+
19071916 #ifdef CONFIG_DEBUG_RSEQ
19081917
19091918 void rseq_syscall(struct pt_regs *regs);
include/linux/sched/coredump.h+1−0
@@ -71,6 +71,7 @@ static inline int get_dumpable(struct mm_struct *mm) · 70 unmodified lines
7171 #define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */
7272 #define MMF_DISABLE_THP 24 /* disable THP for all VMAs */
7373 #define MMF_OOM_VICTIM 25 /* mm is the oom victim */
74+#define MMF_OOM_REAP_QUEUED 26 /* mm was queued for oom_reaper */
7475 #define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP)
7576
7677 #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\
include/linux/sched/wake_q.h+5−1
@@ -24,9 +24,13 @@ · 23 unmodified lines
2424 * called near the end of a function. Otherwise, the list can be
2525 * re-initialized for later re-use by wake_q_init().
2626 *
27− * Note that this can cause spurious wakeups. schedule() callers
27+ * NOTE that this can cause spurious wakeups. schedule() callers
2828 * must ensure the call is done inside a loop, confirming that the
2929 * wakeup condition has in fact occurred.
30+ *
31+ * NOTE that there is no guarantee the wakeup will happen any later than the
32+ * wake_q_add() location. Therefore task must be ready to be woken at the
33+ * location of the wake_q_add().
3034 */
3135
3236 #include <linux/sched.h>
include/linux/signal.h+1−1
@@ -392,7 +392,7 @@ extern bool unhandled_signal(struct task_struct *tsk, int sig); · 391 unmodified lines
392392 #endif
393393
394394 #define siginmask(sig, mask) \
395− ((sig) < SIGRTMIN && (rt_sigmask(sig) & (mask)))
395+ ((sig) > 0 && (sig) < SIGRTMIN && (rt_sigmask(sig) & (mask)))
396396
397397 #define SIG_KERNEL_ONLY_MASK (\
398398 rt_sigmask(SIGKILL) | rt_sigmask(SIGSTOP))
include/linux/skbuff.h+1−0
@@ -3218,6 +3218,7 @@ int pskb_trim_rcsum_slow(struct sk_buff *skb, unsigned int len); · 3217 unmodified lines
32183218 *
32193219 * This is exactly the same as pskb_trim except that it ensures the
32203220 * checksum of received packets are still valid after the operation.
3221+ * It can change skb pointers.
32213222 */
32223223
32233224 static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
include/linux/stmmac.h+1−0
@@ -184,6 +184,7 @@ struct plat_stmmacenet_data { · 183 unmodified lines
184184 struct clk *pclk;
185185 struct clk *clk_ptp_ref;
186186 unsigned int clk_ptp_rate;
187+ unsigned int clk_ref_rate;
187188 struct reset_control *stmmac_rst;
188189 struct stmmac_axi *axi;
189190 int has_gmac4;
include/linux/umh.h+2−0
@@ -47,6 +47,8 @@ struct umh_info { · 46 unmodified lines
4747 const char *cmdline;
4848 struct file *pipe_to_umh;
4949 struct file *pipe_from_umh;
50+ struct list_head list;
51+ void (*cleanup)(struct umh_info *info);
5052 pid_t pid;
5153 };
5254 int fork_usermode_blob(void *data, size_t len, struct umh_info *info);
include/linux/virtio_config.h+9−4
@@ -12,6 +12,11 @@ struct irq_affinity; · 11 unmodified lines
1212
1313 /**
1414 * virtio_config_ops - operations for configuring a virtio device
15+ * Note: Do not assume that a transport implements all of the operations
16+ * getting/setting a value as a simple read/write! Generally speaking,
17+ * any of @get/@set, @get_status/@set_status, or @get_features/
18+ * @finalize_features are NOT safe to be called from an atomic
19+ * context.
1520 * @get: read the value of a configuration field
1621 * vdev: the virtio_device
1722 * offset: the offset of the configuration field
@@ -22,7 +27,7 @@ struct irq_affinity; · 4 unmodified lines
2227 * offset: the offset of the configuration field
2328 * buf: the buffer to read the field value from.
2429 * len: the length of the buffer
25− * @generation: config generation counter
30+ * @generation: config generation counter (optional)
2631 * vdev: the virtio_device
2732 * Returns the config generation counter
2833 * @get_status: read the status byte
@@ -48,17 +53,17 @@ struct irq_affinity; · 19 unmodified lines
4853 * @del_vqs: free virtqueues found by find_vqs().
4954 * @get_features: get the array of feature bits for this device.
5055 * vdev: the virtio_device
51− * Returns the first 32 feature bits (all we currently need).
56+ * Returns the first 64 feature bits (all we currently need).
5257 * @finalize_features: confirm what device features we'll be using.
5358 * vdev: the virtio_device
5459 * This gives the final feature bits for the device: it can change
5560 * the dev->feature bits if it wants.
5661 * Returns 0 on success or error status
57− * @bus_name: return the bus name associated with the device
62+ * @bus_name: return the bus name associated with the device (optional)
5863 * vdev: the virtio_device
5964 * This returns a pointer to the bus name a la pci_name from which
6065 * the caller can then copy.
61− * @set_vq_affinity: set the affinity for a virtqueue.
66+ * @set_vq_affinity: set the affinity for a virtqueue (optional).
6267 * @get_vq_affinity: get the affinity for a virtqueue (optional).
6368 */
6469 typedef void vq_callback_t(struct virtqueue *);
include/linux/xarray.h+170−57
@@ -176,7 +176,8 @@ static inline bool xa_is_internal(const void *entry) · 175 unmodified lines
176176 */
177177 static inline bool xa_is_err(const void *entry)
178178 {
179− return unlikely(xa_is_internal(entry));
179+ return unlikely(xa_is_internal(entry) &&
180+ entry >= xa_mk_internal(-MAX_ERRNO));
180181 }
181182
182183 /**
@@ -286,7 +287,6 @@ struct xarray { · 103 unmodified lines
286287 */
287288 #define DEFINE_XARRAY_ALLOC(name) DEFINE_XARRAY_FLAGS(name, XA_FLAGS_ALLOC)
288289
289−void xa_init_flags(struct xarray *, gfp_t flags);
290290 void *xa_load(struct xarray *, unsigned long index);
291291 void *xa_store(struct xarray *, unsigned long index, void *entry, gfp_t);
292292 void *xa_erase(struct xarray *, unsigned long index);
@@ -303,6 +303,24 @@ unsigned int xa_extract(struct xarray *, void **dst, unsigned long start, · 10 unmodified lines
303303 unsigned long max, unsigned int n, xa_mark_t);
304304 void xa_destroy(struct xarray *);
305305
306+/**
307+ * xa_init_flags() - Initialise an empty XArray with flags.
308+ * @xa: XArray.
309+ * @flags: XA_FLAG values.
310+ *
311+ * If you need to initialise an XArray with special flags (eg you need
312+ * to take the lock from interrupt context), use this function instead
313+ * of xa_init().
314+ *
315+ * Context: Any context.
316+ */
317+static inline void xa_init_flags(struct xarray *xa, gfp_t flags)
318+{
319+ spin_lock_init(&xa->xa_lock);
320+ xa->xa_flags = flags;
321+ xa->xa_head = NULL;
322+}
323+
306324 /**
307325 * xa_init() - Initialise an empty XArray.
308326 * @xa: XArray.
@@ -342,20 +360,45 @@ static inline bool xa_marked(const struct xarray *xa, xa_mark_t mark) · 33 unmodified lines
342360 }
343361
344362 /**
345− * xa_for_each() - Iterate over a portion of an XArray.
363+ * xa_for_each_start() - Iterate over a portion of an XArray.
346364 * @xa: XArray.
365+ * @index: Index of @entry.
347366 * @entry: Entry retrieved from array.
367+ * @start: First index to retrieve from array.
368+ *
369+ * During the iteration, @entry will have the value of the entry stored
370+ * in @xa at @index. You may modify @index during the iteration if you
371+ * want to skip or reprocess indices. It is safe to modify the array
372+ * during the iteration. At the end of the iteration, @entry will be set
373+ * to NULL and @index will have a value less than or equal to max.
374+ *
375+ * xa_for_each_start() is O(n.log(n)) while xas_for_each() is O(n). You have
376+ * to handle your own locking with xas_for_each(), and if you have to unlock
377+ * after each iteration, it will also end up being O(n.log(n)).
378+ * xa_for_each_start() will spin if it hits a retry entry; if you intend to
379+ * see retry entries, you should use the xas_for_each() iterator instead.
380+ * The xas_for_each() iterator will expand into more inline code than
381+ * xa_for_each_start().
382+ *
383+ * Context: Any context. Takes and releases the RCU lock.
384+ */
385+#define xa_for_each_start(xa, index, entry, start) \
386+ for (index = start, \
387+ entry = xa_find(xa, &index, ULONG_MAX, XA_PRESENT); \
388+ entry; \
389+ entry = xa_find_after(xa, &index, ULONG_MAX, XA_PRESENT))
390+
391+/**
392+ * xa_for_each() - Iterate over present entries in an XArray.
393+ * @xa: XArray.
348394 * @index: Index of @entry.
349− * @max: Maximum index to retrieve from array.
350− * @filter: Selection criterion.
395+ * @entry: Entry retrieved from array.
351396 *
352− * Initialise @index to the lowest index you want to retrieve from the
353− * array. During the iteration, @entry will have the value of the entry
354− * stored in @xa at @index. The iteration will skip all entries in the
355− * array which do not match @filter. You may modify @index during the
356− * iteration if you want to skip or reprocess indices. It is safe to modify
357− * the array during the iteration. At the end of the iteration, @entry will
358− * be set to NULL and @index will have a value less than or equal to max.
397+ * During the iteration, @entry will have the value of the entry stored
398+ * in @xa at @index. You may modify @index during the iteration if you want
399+ * to skip or reprocess indices. It is safe to modify the array during the
400+ * iteration. At the end of the iteration, @entry will be set to NULL and
401+ * @index will have a value less than or equal to max.
359402 *
360403 * xa_for_each() is O(n.log(n)) while xas_for_each() is O(n). You have
361404 * to handle your own locking with xas_for_each(), and if you have to unlock
@@ -366,9 +409,36 @@ static inline bool xa_marked(const struct xarray *xa, xa_mark_t mark) · 4 unmodified lines
366409 *
367410 * Context: Any context. Takes and releases the RCU lock.
368411 */
369−#define xa_for_each(xa, entry, index, max, filter) \
370− for (entry = xa_find(xa, &index, max, filter); entry; \
371− entry = xa_find_after(xa, &index, max, filter))
412+#define xa_for_each(xa, index, entry) \
413+ xa_for_each_start(xa, index, entry, 0)
414+
415+/**
416+ * xa_for_each_marked() - Iterate over marked entries in an XArray.
417+ * @xa: XArray.
418+ * @index: Index of @entry.
419+ * @entry: Entry retrieved from array.
420+ * @filter: Selection criterion.
421+ *
422+ * During the iteration, @entry will have the value of the entry stored
423+ * in @xa at @index. The iteration will skip all entries in the array
424+ * which do not match @filter. You may modify @index during the iteration
425+ * if you want to skip or reprocess indices. It is safe to modify the array
426+ * during the iteration. At the end of the iteration, @entry will be set to
427+ * NULL and @index will have a value less than or equal to max.
428+ *
429+ * xa_for_each_marked() is O(n.log(n)) while xas_for_each_marked() is O(n).
430+ * You have to handle your own locking with xas_for_each(), and if you have
431+ * to unlock after each iteration, it will also end up being O(n.log(n)).
432+ * xa_for_each_marked() will spin if it hits a retry entry; if you intend to
433+ * see retry entries, you should use the xas_for_each_marked() iterator
434+ * instead. The xas_for_each_marked() iterator will expand into more inline
435+ * code than xa_for_each_marked().
436+ *
437+ * Context: Any context. Takes and releases the RCU lock.
438+ */
439+#define xa_for_each_marked(xa, index, entry, filter) \
440+ for (index = 0, entry = xa_find(xa, &index, ULONG_MAX, filter); \
441+ entry; entry = xa_find_after(xa, &index, ULONG_MAX, filter))
372442
373443 #define xa_trylock(xa) spin_trylock(&(xa)->xa_lock)
374444 #define xa_lock(xa) spin_lock(&(xa)->xa_lock)
@@ -393,39 +463,12 @@ void *__xa_erase(struct xarray *, unsigned long index); · 18 unmodified lines
393463 void *__xa_store(struct xarray *, unsigned long index, void *entry, gfp_t);
394464 void *__xa_cmpxchg(struct xarray *, unsigned long index, void *old,
395465 void *entry, gfp_t);
466+int __xa_insert(struct xarray *, unsigned long index, void *entry, gfp_t);
396467 int __xa_alloc(struct xarray *, u32 *id, u32 max, void *entry, gfp_t);
397468 int __xa_reserve(struct xarray *, unsigned long index, gfp_t);
398469 void __xa_set_mark(struct xarray *, unsigned long index, xa_mark_t);
399470 void __xa_clear_mark(struct xarray *, unsigned long index, xa_mark_t);
400471
401−/**
402− * __xa_insert() - Store this entry in the XArray unless another entry is
403− * already present.
404− * @xa: XArray.
405− * @index: Index into array.
406− * @entry: New entry.
407− * @gfp: Memory allocation flags.
408− *
409− * If you would rather see the existing entry in the array, use __xa_cmpxchg().
410− * This function is for users who don't care what the entry is, only that
411− * one is present.
412− *
413− * Context: Any context. Expects xa_lock to be held on entry. May
414− * release and reacquire xa_lock if the @gfp flags permit.
415− * Return: 0 if the store succeeded. -EEXIST if another entry was present.
416− * -ENOMEM if memory could not be allocated.
417− */
418−static inline int __xa_insert(struct xarray *xa, unsigned long index,
419− void *entry, gfp_t gfp)
420−{
421− void *curr = __xa_cmpxchg(xa, index, NULL, entry, gfp);
422− if (!curr)
423− return 0;
424− if (xa_is_err(curr))
425− return xa_err(curr);
426− return -EEXIST;
427−}
428−
429472 /**
430473 * xa_store_bh() - Store this entry in the XArray.
431474 * @xa: XArray.
@@ -453,7 +496,7 @@ static inline void *xa_store_bh(struct xarray *xa, unsigned long index, · 21 unmodified lines
453496 }
454497
455498 /**
456− * xa_store_irq() - Erase this entry from the XArray.
499+ * xa_store_irq() - Store this entry in the XArray.
457500 * @xa: XArray.
458501 * @index: Index into array.
459502 * @entry: New entry.
@@ -615,24 +658,83 @@ static inline void *xa_cmpxchg_irq(struct xarray *xa, unsigned long index, · 155 unmodified lines
615658 * @entry: New entry.
616659 * @gfp: Memory allocation flags.
617660 *
618− * If you would rather see the existing entry in the array, use xa_cmpxchg().
619− * This function is for users who don't care what the entry is, only that
620− * one is present.
661+ * Inserting a NULL entry will store a reserved entry (like xa_reserve())
662+ * if no entry is present. Inserting will fail if a reserved entry is
663+ * present, even though loading from this index will return NULL.
621664 *
622− * Context: Process context. Takes and releases the xa_lock.
623− * May sleep if the @gfp flags permit.
665+ * Context: Any context. Takes and releases the xa_lock. May sleep if
666+ * the @gfp flags permit.
624667 * Return: 0 if the store succeeded. -EEXIST if another entry was present.
625668 * -ENOMEM if memory could not be allocated.
626669 */
627670 static inline int xa_insert(struct xarray *xa, unsigned long index,
628671 void *entry, gfp_t gfp)
629672 {
630− void *curr = xa_cmpxchg(xa, index, NULL, entry, gfp);
631− if (!curr)
632− return 0;
633− if (xa_is_err(curr))
634− return xa_err(curr);
635− return -EEXIST;
673+ int err;
674+
675+ xa_lock(xa);
676+ err = __xa_insert(xa, index, entry, gfp);
677+ xa_unlock(xa);
678+
679+ return err;
680+}
681+
682+/**
683+ * xa_insert_bh() - Store this entry in the XArray unless another entry is
684+ * already present.
685+ * @xa: XArray.
686+ * @index: Index into array.
687+ * @entry: New entry.
688+ * @gfp: Memory allocation flags.
689+ *
690+ * Inserting a NULL entry will store a reserved entry (like xa_reserve())
691+ * if no entry is present. Inserting will fail if a reserved entry is
692+ * present, even though loading from this index will return NULL.
693+ *
694+ * Context: Any context. Takes and releases the xa_lock while
695+ * disabling softirqs. May sleep if the @gfp flags permit.
696+ * Return: 0 if the store succeeded. -EEXIST if another entry was present.
697+ * -ENOMEM if memory could not be allocated.
698+ */
699+static inline int xa_insert_bh(struct xarray *xa, unsigned long index,
700+ void *entry, gfp_t gfp)
701+{
702+ int err;
703+
704+ xa_lock_bh(xa);
705+ err = __xa_insert(xa, index, entry, gfp);
706+ xa_unlock_bh(xa);
707+
708+ return err;
709+}
710+
711+/**
712+ * xa_insert_irq() - Store this entry in the XArray unless another entry is
713+ * already present.
714+ * @xa: XArray.
715+ * @index: Index into array.
716+ * @entry: New entry.
717+ * @gfp: Memory allocation flags.
718+ *
719+ * Inserting a NULL entry will store a reserved entry (like xa_reserve())
720+ * if no entry is present. Inserting will fail if a reserved entry is
721+ * present, even though loading from this index will return NULL.
722+ *
723+ * Context: Process context. Takes and releases the xa_lock while
724+ * disabling interrupts. May sleep if the @gfp flags permit.
725+ * Return: 0 if the store succeeded. -EEXIST if another entry was present.
726+ * -ENOMEM if memory could not be allocated.
727+ */
728+static inline int xa_insert_irq(struct xarray *xa, unsigned long index,
729+ void *entry, gfp_t gfp)
730+{
731+ int err;
732+
733+ xa_lock_irq(xa);
734+ err = __xa_insert(xa, index, entry, gfp);
735+ xa_unlock_irq(xa);
736+
737+ return err;
636738 }
637739
638740 /**
@@ -970,8 +1072,8 @@ static inline bool xa_is_sibling(const void *entry) · 331 unmodified lines
9701072 (entry < xa_mk_sibling(XA_CHUNK_SIZE - 1));
9711073 }
9721074
973−#define XA_ZERO_ENTRY xa_mk_internal(256)
974−#define XA_RETRY_ENTRY xa_mk_internal(257)
1075+#define XA_RETRY_ENTRY xa_mk_internal(256)
1076+#define XA_ZERO_ENTRY xa_mk_internal(257)
9751077
9761078 /**
9771079 * xa_is_zero() - Is the entry a zero entry?
@@ -995,6 +1097,17 @@ static inline bool xa_is_retry(const void *entry) · 17 unmodified lines
9951097 return unlikely(entry == XA_RETRY_ENTRY);
9961098 }
9971099
1100+/**
1101+ * xa_is_advanced() - Is the entry only permitted for the advanced API?
1102+ * @entry: Entry to be stored in the XArray.
1103+ *
1104+ * Return: %true if the entry cannot be stored by the normal API.
1105+ */
1106+static inline bool xa_is_advanced(const void *entry)
1107+{
1108+ return xa_is_internal(entry) && (entry <= XA_RETRY_ENTRY);
1109+}
1110+
9981111 /**
9991112 * typedef xa_update_node_t - A callback function from the XArray.
10001113 * @node: The node which is being processed

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t