summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/5level-fixup.h21
-rw-r--r--include/asm-generic/futex.h21
-rw-r--r--include/asm-generic/getorder.h50
-rw-r--r--include/drm/drm_client.h2
-rw-r--r--include/drm/drm_mode_config.h7
-rw-r--r--include/kvm/arm_pmu.h2
-rw-r--r--include/kvm/arm_vgic.h1
-rw-r--r--include/linux/blk-cgroup.h1
-rw-r--r--include/linux/ccp.h2
-rw-r--r--include/linux/ceph/buffer.h3
-rw-r--r--include/linux/clk.h1
-rw-r--r--include/linux/compiler.h8
-rw-r--r--include/linux/connector.h1
-rw-r--r--include/linux/cred.h8
-rw-r--r--include/linux/device.h6
-rw-r--r--include/linux/dim.h56
-rw-r--r--include/linux/dma-contiguous.h5
-rw-r--r--include/linux/dma-mapping.h4
-rw-r--r--include/linux/dma-noncoherent.h13
-rw-r--r--include/linux/elevator.h1
-rw-r--r--include/linux/filter.h13
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/gfp.h12
-rw-r--r--include/linux/gpio.h24
-rw-r--r--include/linux/gpio/consumer.h64
-rw-r--r--include/linux/hmm.h54
-rw-r--r--include/linux/if_pppox.h3
-rw-r--r--include/linux/if_rmnet.h4
-rw-r--r--include/linux/input/elan-i2c-ids.h2
-rw-r--r--include/linux/intel-iommu.h3
-rw-r--r--include/linux/iova.h6
-rw-r--r--include/linux/key.h8
-rw-r--r--include/linux/kvm_host.h6
-rw-r--r--include/linux/logic_pio.h1
-rw-r--r--include/linux/memcontrol.h19
-rw-r--r--include/linux/mempolicy.h2
-rw-r--r--include/linux/mlx5/device.h4
-rw-r--r--include/linux/mlx5/fs.h1
-rw-r--r--include/linux/mlx5/mlx5_ifc.h11
-rw-r--r--include/linux/mm_types.h11
-rw-r--r--include/linux/mmzone.h5
-rw-r--r--include/linux/mod_devicetable.h1
-rw-r--r--include/linux/netfilter/nf_conntrack_h323_asn1.h3
-rw-r--r--include/linux/netfilter/nf_conntrack_h323_types.h5
-rw-r--r--include/linux/of.h2
-rw-r--r--include/linux/page-flags-layout.h18
-rw-r--r--include/linux/page-flags.h4
-rw-r--r--include/linux/pci.h2
-rw-r--r--include/linux/phy.h1
-rw-r--r--include/linux/sched.h10
-rw-r--r--include/linux/sched/numa_balancing.h4
-rw-r--r--include/linux/signal.h15
-rw-r--r--include/linux/skbuff.h8
-rw-r--r--include/linux/skmsg.h8
-rw-r--r--include/linux/socket.h3
-rw-r--r--include/linux/sunrpc/sched.h1
-rw-r--r--include/linux/timekeeper_internal.h5
-rw-r--r--include/linux/trace_events.h1
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/usb/hcd.h3
-rw-r--r--include/linux/wait.h13
-rw-r--r--include/math-emu/op-common.h5
-rw-r--r--include/misc/charlcd.h39
-rw-r--r--include/net/act_api.h4
-rw-r--r--include/net/addrconf.h2
-rw-r--r--include/net/bluetooth/hci_core.h1
-rw-r--r--include/net/cfg80211.h17
-rw-r--r--include/net/flow_offload.h30
-rw-r--r--include/net/inet_frag.h2
-rw-r--r--include/net/net_namespace.h3
-rw-r--r--include/net/netfilter/nf_conntrack_expect.h12
-rw-r--r--include/net/netfilter/nf_conntrack_synproxy.h1
-rw-r--r--include/net/netfilter/nf_tables.h14
-rw-r--r--include/net/netfilter/nf_tables_offload.h2
-rw-r--r--include/net/netlink.h5
-rw-r--r--include/net/nexthop.h6
-rw-r--r--include/net/pkt_cls.h7
-rw-r--r--include/net/psample.h1
-rw-r--r--include/net/route.h2
-rw-r--r--include/net/sch_generic.h8
-rw-r--r--include/net/sock.h10
-rw-r--r--include/net/tc_act/tc_police.h4
-rw-r--r--include/net/tc_act/tc_sample.h2
-rw-r--r--include/net/tcp.h8
-rw-r--r--include/net/tls.h13
-rw-r--r--include/rdma/ib_verbs.h4
-rw-r--r--include/rdma/rdmavt_qp.h9
-rw-r--r--include/rdma/restrack.h3
-rw-r--r--include/scsi/libfc.h52
-rw-r--r--include/scsi/libfcoe.h3
-rw-r--r--include/soc/arc/mcip.h11
-rw-r--r--include/soc/fsl/qe/qe.h2
-rw-r--r--include/sound/hdmi-codec.h17
-rw-r--r--include/sound/pcm.h5
-rw-r--r--include/sound/soc-acpi-intel-match.h2
-rw-r--r--include/sound/soc-component.h387
-rw-r--r--include/sound/soc-dai.h28
-rw-r--r--include/sound/soc-dapm.h14
-rw-r--r--include/sound/soc-dpcm.h9
-rw-r--r--include/sound/soc.h348
-rw-r--r--include/sound/sof/control.h2
-rw-r--r--include/sound/sof/dai-intel.h14
-rw-r--r--include/sound/sof/dai.h7
-rw-r--r--include/sound/sof/header.h2
-rw-r--r--include/sound/sof/info.h2
-rw-r--r--include/sound/sof/pm.h2
-rw-r--r--include/sound/sof/stream.h2
-rw-r--r--include/sound/sof/topology.h2
-rw-r--r--include/sound/sof/trace.h2
-rw-r--r--include/sound/sof/xtensa.h2
-rw-r--r--include/trace/events/dma_fence.h2
-rw-r--r--include/trace/events/napi.h4
-rw-r--r--include/trace/events/qdisc.h4
-rw-r--r--include/trace/events/rxrpc.h65
-rw-r--r--include/trace/events/tegra_apb_dma.h4
-rw-r--r--include/uapi/linux/bpf.h4
-rw-r--r--include/uapi/linux/bpfilter.h2
-rw-r--r--include/uapi/linux/ipmi_bmc.h2
-rw-r--r--include/uapi/linux/isst_if.h2
-rw-r--r--include/uapi/linux/jffs2.h5
-rw-r--r--include/uapi/linux/kfd_ioctl.h20
-rw-r--r--include/uapi/linux/kvm.h4
-rw-r--r--include/uapi/linux/netfilter/nf_synproxy.h2
-rw-r--r--include/uapi/linux/netfilter/xt_connlabel.h6
-rw-r--r--include/uapi/linux/netfilter/xt_nfacct.h5
-rw-r--r--include/uapi/linux/nl80211.h2
-rw-r--r--include/uapi/linux/psp-sev.h2
-rw-r--r--include/uapi/linux/rds.h2
-rw-r--r--include/uapi/linux/rxrpc.h2
-rw-r--r--include/uapi/linux/serial_core.h3
-rw-r--r--include/uapi/linux/socket.h19
-rw-r--r--include/uapi/linux/usb/g_uvc.h2
-rw-r--r--include/uapi/linux/vbox_vmmdev_types.h2
-rw-r--r--include/uapi/linux/vboxguest.h2
-rw-r--r--include/uapi/linux/videodev2.h8
-rw-r--r--include/uapi/linux/virtio_iommu.h32
-rw-r--r--include/uapi/linux/virtio_pmem.h2
-rw-r--r--include/uapi/linux/vmcore.h2
-rw-r--r--include/uapi/linux/wmi.h2
-rw-r--r--include/uapi/misc/fastrpc.h2
-rw-r--r--include/uapi/rdma/rvt-abi.h2
-rw-r--r--include/uapi/rdma/siw-abi.h5
-rw-r--r--include/uapi/scsi/scsi_bsg_ufs.h2
-rw-r--r--include/uapi/sound/skl-tplg-interface.h2
-rw-r--r--include/uapi/sound/sof/abi.h2
-rw-r--r--include/uapi/sound/sof/tokens.h9
-rw-r--r--include/xen/xen-ops.h3
147 files changed, 1082 insertions, 868 deletions
diff --git a/include/asm-generic/5level-fixup.h b/include/asm-generic/5level-fixup.h
index bb6cb347018c..f6947da70d71 100644
--- a/include/asm-generic/5level-fixup.h
+++ b/include/asm-generic/5level-fixup.h
@@ -19,9 +19,24 @@
19 19
20#define p4d_alloc(mm, pgd, address) (pgd) 20#define p4d_alloc(mm, pgd, address) (pgd)
21#define p4d_offset(pgd, start) (pgd) 21#define p4d_offset(pgd, start) (pgd)
22#define p4d_none(p4d) 0 22
23#define p4d_bad(p4d) 0 23#ifndef __ASSEMBLY__
24#define p4d_present(p4d) 1 24static inline int p4d_none(p4d_t p4d)
25{
26 return 0;
27}
28
29static inline int p4d_bad(p4d_t p4d)
30{
31 return 0;
32}
33
34static inline int p4d_present(p4d_t p4d)
35{
36 return 1;
37}
38#endif
39
25#define p4d_ERROR(p4d) do { } while (0) 40#define p4d_ERROR(p4d) do { } while (0)
26#define p4d_clear(p4d) pgd_clear(p4d) 41#define p4d_clear(p4d) pgd_clear(p4d)
27#define p4d_val(p4d) pgd_val(p4d) 42#define p4d_val(p4d) pgd_val(p4d)
diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h
index 8666fe7f35d7..02970b11f71f 100644
--- a/include/asm-generic/futex.h
+++ b/include/asm-generic/futex.h
@@ -118,26 +118,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
118static inline int 118static inline int
119arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr) 119arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr)
120{ 120{
121 int oldval = 0, ret; 121 return -ENOSYS;
122
123 pagefault_disable();
124
125 switch (op) {
126 case FUTEX_OP_SET:
127 case FUTEX_OP_ADD:
128 case FUTEX_OP_OR:
129 case FUTEX_OP_ANDN:
130 case FUTEX_OP_XOR:
131 default:
132 ret = -ENOSYS;
133 }
134
135 pagefault_enable();
136
137 if (!ret)
138 *oval = oldval;
139
140 return ret;
141} 122}
142 123
143static inline int 124static inline int
diff --git a/include/asm-generic/getorder.h b/include/asm-generic/getorder.h
index c64bea7a52be..e9f20b813a69 100644
--- a/include/asm-generic/getorder.h
+++ b/include/asm-generic/getorder.h
@@ -7,24 +7,6 @@
7#include <linux/compiler.h> 7#include <linux/compiler.h>
8#include <linux/log2.h> 8#include <linux/log2.h>
9 9
10/*
11 * Runtime evaluation of get_order()
12 */
13static inline __attribute_const__
14int __get_order(unsigned long size)
15{
16 int order;
17
18 size--;
19 size >>= PAGE_SHIFT;
20#if BITS_PER_LONG == 32
21 order = fls(size);
22#else
23 order = fls64(size);
24#endif
25 return order;
26}
27
28/** 10/**
29 * get_order - Determine the allocation order of a memory size 11 * get_order - Determine the allocation order of a memory size
30 * @size: The size for which to get the order 12 * @size: The size for which to get the order
@@ -43,19 +25,27 @@ int __get_order(unsigned long size)
43 * to hold an object of the specified size. 25 * to hold an object of the specified size.
44 * 26 *
45 * The result is undefined if the size is 0. 27 * The result is undefined if the size is 0.
46 *
47 * This function may be used to initialise variables with compile time
48 * evaluations of constants.
49 */ 28 */
50#define get_order(n) \ 29static inline __attribute_const__ int get_order(unsigned long size)
51( \ 30{
52 __builtin_constant_p(n) ? ( \ 31 if (__builtin_constant_p(size)) {
53 ((n) == 0UL) ? BITS_PER_LONG - PAGE_SHIFT : \ 32 if (!size)
54 (((n) < (1UL << PAGE_SHIFT)) ? 0 : \ 33 return BITS_PER_LONG - PAGE_SHIFT;
55 ilog2((n) - 1) - PAGE_SHIFT + 1) \ 34
56 ) : \ 35 if (size < (1UL << PAGE_SHIFT))
57 __get_order(n) \ 36 return 0;
58) 37
38 return ilog2((size) - 1) - PAGE_SHIFT + 1;
39 }
40
41 size--;
42 size >>= PAGE_SHIFT;
43#if BITS_PER_LONG == 32
44 return fls(size);
45#else
46 return fls64(size);
47#endif
48}
59 49
60#endif /* __ASSEMBLY__ */ 50#endif /* __ASSEMBLY__ */
61 51
diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
index 72d51d1e9dd9..5cf2c5dd8b1e 100644
--- a/include/drm/drm_client.h
+++ b/include/drm/drm_client.h
@@ -149,6 +149,8 @@ struct drm_client_buffer {
149struct drm_client_buffer * 149struct drm_client_buffer *
150drm_client_framebuffer_create(struct drm_client_dev *client, u32 width, u32 height, u32 format); 150drm_client_framebuffer_create(struct drm_client_dev *client, u32 width, u32 height, u32 format);
151void drm_client_framebuffer_delete(struct drm_client_buffer *buffer); 151void drm_client_framebuffer_delete(struct drm_client_buffer *buffer);
152void *drm_client_buffer_vmap(struct drm_client_buffer *buffer);
153void drm_client_buffer_vunmap(struct drm_client_buffer *buffer);
152 154
153int drm_client_modeset_create(struct drm_client_dev *client); 155int drm_client_modeset_create(struct drm_client_dev *client);
154void drm_client_modeset_free(struct drm_client_dev *client); 156void drm_client_modeset_free(struct drm_client_dev *client);
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index 759d462d028b..f57eea0481e0 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -853,6 +853,13 @@ struct drm_mode_config {
853 uint32_t preferred_depth, prefer_shadow; 853 uint32_t preferred_depth, prefer_shadow;
854 854
855 /** 855 /**
856 * @prefer_shadow_fbdev:
857 *
858 * Hint to framebuffer emulation to prefer shadow-fb rendering.
859 */
860 bool prefer_shadow_fbdev;
861
862 /**
856 * @quirk_addfb_prefer_xbgr_30bpp: 863 * @quirk_addfb_prefer_xbgr_30bpp:
857 * 864 *
858 * Special hack for legacy ADDFB to keep nouveau userspace happy. Should 865 * Special hack for legacy ADDFB to keep nouveau userspace happy. Should
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index 16c769a7f979..6db030439e29 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -34,6 +34,7 @@ struct kvm_pmu {
34u64 kvm_pmu_get_counter_value(struct kvm_vcpu *vcpu, u64 select_idx); 34u64 kvm_pmu_get_counter_value(struct kvm_vcpu *vcpu, u64 select_idx);
35void kvm_pmu_set_counter_value(struct kvm_vcpu *vcpu, u64 select_idx, u64 val); 35void kvm_pmu_set_counter_value(struct kvm_vcpu *vcpu, u64 select_idx, u64 val);
36u64 kvm_pmu_valid_counter_mask(struct kvm_vcpu *vcpu); 36u64 kvm_pmu_valid_counter_mask(struct kvm_vcpu *vcpu);
37void kvm_pmu_vcpu_init(struct kvm_vcpu *vcpu);
37void kvm_pmu_vcpu_reset(struct kvm_vcpu *vcpu); 38void kvm_pmu_vcpu_reset(struct kvm_vcpu *vcpu);
38void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu); 39void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu);
39void kvm_pmu_disable_counter_mask(struct kvm_vcpu *vcpu, u64 val); 40void kvm_pmu_disable_counter_mask(struct kvm_vcpu *vcpu, u64 val);
@@ -71,6 +72,7 @@ static inline u64 kvm_pmu_valid_counter_mask(struct kvm_vcpu *vcpu)
71{ 72{
72 return 0; 73 return 0;
73} 74}
75static inline void kvm_pmu_vcpu_init(struct kvm_vcpu *vcpu) {}
74static inline void kvm_pmu_vcpu_reset(struct kvm_vcpu *vcpu) {} 76static inline void kvm_pmu_vcpu_reset(struct kvm_vcpu *vcpu) {}
75static inline void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu) {} 77static inline void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu) {}
76static inline void kvm_pmu_disable_counter_mask(struct kvm_vcpu *vcpu, u64 val) {} 78static inline void kvm_pmu_disable_counter_mask(struct kvm_vcpu *vcpu, u64 val) {}
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index 46bbc949c20a..7a30524a80ee 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -350,6 +350,7 @@ int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu);
350 350
351void kvm_vgic_load(struct kvm_vcpu *vcpu); 351void kvm_vgic_load(struct kvm_vcpu *vcpu);
352void kvm_vgic_put(struct kvm_vcpu *vcpu); 352void kvm_vgic_put(struct kvm_vcpu *vcpu);
353void kvm_vgic_vmcr_sync(struct kvm_vcpu *vcpu);
353 354
354#define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) 355#define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel))
355#define vgic_initialized(k) ((k)->arch.vgic.initialized) 356#define vgic_initialized(k) ((k)->arch.vgic.initialized)
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index 689a58231288..12811091fd50 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -181,6 +181,7 @@ struct blkcg_policy {
181 181
182extern struct blkcg blkcg_root; 182extern struct blkcg blkcg_root;
183extern struct cgroup_subsys_state * const blkcg_root_css; 183extern struct cgroup_subsys_state * const blkcg_root_css;
184extern bool blkcg_debug_stats;
184 185
185struct blkcg_gq *blkg_lookup_slowpath(struct blkcg *blkcg, 186struct blkcg_gq *blkg_lookup_slowpath(struct blkcg *blkcg,
186 struct request_queue *q, bool update_hint); 187 struct request_queue *q, bool update_hint);
diff --git a/include/linux/ccp.h b/include/linux/ccp.h
index 55cb455cfcb0..a5dfbaf2470d 100644
--- a/include/linux/ccp.h
+++ b/include/linux/ccp.h
@@ -170,6 +170,8 @@ struct ccp_aes_engine {
170 enum ccp_aes_mode mode; 170 enum ccp_aes_mode mode;
171 enum ccp_aes_action action; 171 enum ccp_aes_action action;
172 172
173 u32 authsize;
174
173 struct scatterlist *key; 175 struct scatterlist *key;
174 u32 key_len; /* In bytes */ 176 u32 key_len; /* In bytes */
175 177
diff --git a/include/linux/ceph/buffer.h b/include/linux/ceph/buffer.h
index 5e58bb29b1a3..11cdc7c60480 100644
--- a/include/linux/ceph/buffer.h
+++ b/include/linux/ceph/buffer.h
@@ -30,7 +30,8 @@ static inline struct ceph_buffer *ceph_buffer_get(struct ceph_buffer *b)
30 30
31static inline void ceph_buffer_put(struct ceph_buffer *b) 31static inline void ceph_buffer_put(struct ceph_buffer *b)
32{ 32{
33 kref_put(&b->kref, ceph_buffer_release); 33 if (b)
34 kref_put(&b->kref, ceph_buffer_release);
34} 35}
35 36
36extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end); 37extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end);
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 3c096c7a51dc..853a8f181394 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -359,6 +359,7 @@ int __must_check devm_clk_bulk_get(struct device *dev, int num_clks,
359/** 359/**
360 * devm_clk_bulk_get_optional - managed get multiple optional consumer clocks 360 * devm_clk_bulk_get_optional - managed get multiple optional consumer clocks
361 * @dev: device for clock "consumer" 361 * @dev: device for clock "consumer"
362 * @num_clks: the number of clk_bulk_data
362 * @clks: pointer to the clk_bulk_data table of consumer 363 * @clks: pointer to the clk_bulk_data table of consumer
363 * 364 *
364 * Behaves the same as devm_clk_bulk_get() except where there is no clock 365 * Behaves the same as devm_clk_bulk_get() except where there is no clock
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index f0fd5636fddb..5e88e7e33abe 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -24,7 +24,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
24 long ______r; \ 24 long ______r; \
25 static struct ftrace_likely_data \ 25 static struct ftrace_likely_data \
26 __aligned(4) \ 26 __aligned(4) \
27 __section("_ftrace_annotated_branch") \ 27 __section(_ftrace_annotated_branch) \
28 ______f = { \ 28 ______f = { \
29 .data.func = __func__, \ 29 .data.func = __func__, \
30 .data.file = __FILE__, \ 30 .data.file = __FILE__, \
@@ -60,7 +60,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
60#define __trace_if_value(cond) ({ \ 60#define __trace_if_value(cond) ({ \
61 static struct ftrace_branch_data \ 61 static struct ftrace_branch_data \
62 __aligned(4) \ 62 __aligned(4) \
63 __section("_ftrace_branch") \ 63 __section(_ftrace_branch) \
64 __if_trace = { \ 64 __if_trace = { \
65 .func = __func__, \ 65 .func = __func__, \
66 .file = __FILE__, \ 66 .file = __FILE__, \
@@ -118,7 +118,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
118 ".popsection\n\t" 118 ".popsection\n\t"
119 119
120/* Annotate a C jump table to allow objtool to follow the code flow */ 120/* Annotate a C jump table to allow objtool to follow the code flow */
121#define __annotate_jump_table __section(".rodata..c_jump_table") 121#define __annotate_jump_table __section(.rodata..c_jump_table)
122 122
123#else 123#else
124#define annotate_reachable() 124#define annotate_reachable()
@@ -298,7 +298,7 @@ unsigned long read_word_at_a_time(const void *addr)
298 * visible to the compiler. 298 * visible to the compiler.
299 */ 299 */
300#define __ADDRESSABLE(sym) \ 300#define __ADDRESSABLE(sym) \
301 static void * __section(".discard.addressable") __used \ 301 static void * __section(.discard.addressable) __used \
302 __PASTE(__addressable_##sym, __LINE__) = (void *)&sym; 302 __PASTE(__addressable_##sym, __LINE__) = (void *)&sym;
303 303
304/** 304/**
diff --git a/include/linux/connector.h b/include/linux/connector.h
index 6b6c7396a584..cb732643471b 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -50,7 +50,6 @@ struct cn_dev {
50 50
51 u32 seq, groups; 51 u32 seq, groups;
52 struct sock *nls; 52 struct sock *nls;
53 void (*input) (struct sk_buff *skb);
54 53
55 struct cn_queue_dev *cbdev; 54 struct cn_queue_dev *cbdev;
56}; 55};
diff --git a/include/linux/cred.h b/include/linux/cred.h
index 7eb43a038330..f7a30e0099be 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -145,7 +145,11 @@ struct cred {
145 struct user_struct *user; /* real user ID subscription */ 145 struct user_struct *user; /* real user ID subscription */
146 struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */ 146 struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */
147 struct group_info *group_info; /* supplementary groups for euid/fsgid */ 147 struct group_info *group_info; /* supplementary groups for euid/fsgid */
148 struct rcu_head rcu; /* RCU deletion hook */ 148 /* RCU deletion */
149 union {
150 int non_rcu; /* Can we skip RCU deletion? */
151 struct rcu_head rcu; /* RCU deletion hook */
152 };
149} __randomize_layout; 153} __randomize_layout;
150 154
151extern void __put_cred(struct cred *); 155extern void __put_cred(struct cred *);
@@ -246,6 +250,7 @@ static inline const struct cred *get_cred(const struct cred *cred)
246 if (!cred) 250 if (!cred)
247 return cred; 251 return cred;
248 validate_creds(cred); 252 validate_creds(cred);
253 nonconst_cred->non_rcu = 0;
249 return get_new_cred(nonconst_cred); 254 return get_new_cred(nonconst_cred);
250} 255}
251 256
@@ -257,6 +262,7 @@ static inline const struct cred *get_cred_rcu(const struct cred *cred)
257 if (!atomic_inc_not_zero(&nonconst_cred->usage)) 262 if (!atomic_inc_not_zero(&nonconst_cred->usage))
258 return NULL; 263 return NULL;
259 validate_creds(cred); 264 validate_creds(cred);
265 nonconst_cred->non_rcu = 0;
260 return cred; 266 return cred;
261} 267}
262 268
diff --git a/include/linux/device.h b/include/linux/device.h
index c330b75c6c57..6717adee33f0 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -915,6 +915,8 @@ struct dev_links_info {
915 * This identifies the device type and carries type-specific 915 * This identifies the device type and carries type-specific
916 * information. 916 * information.
917 * @mutex: Mutex to synchronize calls to its driver. 917 * @mutex: Mutex to synchronize calls to its driver.
918 * @lockdep_mutex: An optional debug lock that a subsystem can use as a
919 * peer lock to gain localized lockdep coverage of the device_lock.
918 * @bus: Type of bus device is on. 920 * @bus: Type of bus device is on.
919 * @driver: Which driver has allocated this 921 * @driver: Which driver has allocated this
920 * @platform_data: Platform data specific to the device. 922 * @platform_data: Platform data specific to the device.
@@ -998,6 +1000,9 @@ struct device {
998 core doesn't touch it */ 1000 core doesn't touch it */
999 void *driver_data; /* Driver data, set and get with 1001 void *driver_data; /* Driver data, set and get with
1000 dev_set_drvdata/dev_get_drvdata */ 1002 dev_set_drvdata/dev_get_drvdata */
1003#ifdef CONFIG_PROVE_LOCKING
1004 struct mutex lockdep_mutex;
1005#endif
1001 struct mutex mutex; /* mutex to synchronize calls to 1006 struct mutex mutex; /* mutex to synchronize calls to
1002 * its driver. 1007 * its driver.
1003 */ 1008 */
@@ -1383,6 +1388,7 @@ extern int (*platform_notify_remove)(struct device *dev);
1383 */ 1388 */
1384extern struct device *get_device(struct device *dev); 1389extern struct device *get_device(struct device *dev);
1385extern void put_device(struct device *dev); 1390extern void put_device(struct device *dev);
1391extern bool kill_device(struct device *dev);
1386 1392
1387#ifdef CONFIG_DEVTMPFS 1393#ifdef CONFIG_DEVTMPFS
1388extern int devtmpfs_create_node(struct device *dev); 1394extern int devtmpfs_create_node(struct device *dev);
diff --git a/include/linux/dim.h b/include/linux/dim.h
index d3a0fbfff2bb..9fa4b3f88c39 100644
--- a/include/linux/dim.h
+++ b/include/linux/dim.h
@@ -272,62 +272,6 @@ dim_update_sample_with_comps(u16 event_ctr, u64 packets, u64 bytes, u64 comps,
272 272
273/* Net DIM */ 273/* Net DIM */
274 274
275/*
276 * Net DIM profiles:
277 * There are different set of profiles for each CQ period mode.
278 * There are different set of profiles for RX/TX CQs.
279 * Each profile size must be of NET_DIM_PARAMS_NUM_PROFILES
280 */
281#define NET_DIM_PARAMS_NUM_PROFILES 5
282#define NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE 256
283#define NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE 128
284#define NET_DIM_DEF_PROFILE_CQE 1
285#define NET_DIM_DEF_PROFILE_EQE 1
286
287#define NET_DIM_RX_EQE_PROFILES { \
288 {1, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
289 {8, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
290 {64, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
291 {128, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
292 {256, NET_DIM_DEFAULT_RX_CQ_MODERATION_PKTS_FROM_EQE}, \
293}
294
295#define NET_DIM_RX_CQE_PROFILES { \
296 {2, 256}, \
297 {8, 128}, \
298 {16, 64}, \
299 {32, 64}, \
300 {64, 64} \
301}
302
303#define NET_DIM_TX_EQE_PROFILES { \
304 {1, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
305 {8, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
306 {32, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
307 {64, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE}, \
308 {128, NET_DIM_DEFAULT_TX_CQ_MODERATION_PKTS_FROM_EQE} \
309}
310
311#define NET_DIM_TX_CQE_PROFILES { \
312 {5, 128}, \
313 {8, 64}, \
314 {16, 32}, \
315 {32, 32}, \
316 {64, 32} \
317}
318
319static const struct dim_cq_moder
320rx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
321 NET_DIM_RX_EQE_PROFILES,
322 NET_DIM_RX_CQE_PROFILES,
323};
324
325static const struct dim_cq_moder
326tx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
327 NET_DIM_TX_EQE_PROFILES,
328 NET_DIM_TX_CQE_PROFILES,
329};
330
331/** 275/**
332 * net_dim_get_rx_moderation - provide a CQ moderation object for the given RX profile 276 * net_dim_get_rx_moderation - provide a CQ moderation object for the given RX profile
333 * @cq_period_mode: CQ period mode 277 * @cq_period_mode: CQ period mode
diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h
index c05d4e661489..03f8e98e3bcc 100644
--- a/include/linux/dma-contiguous.h
+++ b/include/linux/dma-contiguous.h
@@ -160,10 +160,7 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages,
160static inline struct page *dma_alloc_contiguous(struct device *dev, size_t size, 160static inline struct page *dma_alloc_contiguous(struct device *dev, size_t size,
161 gfp_t gfp) 161 gfp_t gfp)
162{ 162{
163 int node = dev ? dev_to_node(dev) : NUMA_NO_NODE; 163 return NULL;
164 size_t align = get_order(PAGE_ALIGN(size));
165
166 return alloc_pages_node(node, gfp, align);
167} 164}
168 165
169static inline void dma_free_contiguous(struct device *dev, struct page *page, 166static inline void dma_free_contiguous(struct device *dev, struct page *page,
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index e11b115dd0e4..f7d1eea32c78 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -689,8 +689,8 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask)
689 */ 689 */
690static inline bool dma_addressing_limited(struct device *dev) 690static inline bool dma_addressing_limited(struct device *dev)
691{ 691{
692 return min_not_zero(*dev->dma_mask, dev->bus_dma_mask) < 692 return min_not_zero(dma_get_mask(dev), dev->bus_dma_mask) <
693 dma_get_required_mask(dev); 693 dma_get_required_mask(dev);
694} 694}
695 695
696#ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS 696#ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS
diff --git a/include/linux/dma-noncoherent.h b/include/linux/dma-noncoherent.h
index 3813211a9aad..0bff3d7fac92 100644
--- a/include/linux/dma-noncoherent.h
+++ b/include/linux/dma-noncoherent.h
@@ -42,13 +42,18 @@ void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,
42 dma_addr_t dma_addr, unsigned long attrs); 42 dma_addr_t dma_addr, unsigned long attrs);
43long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr, 43long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr,
44 dma_addr_t dma_addr); 44 dma_addr_t dma_addr);
45
46#ifdef CONFIG_ARCH_HAS_DMA_MMAP_PGPROT
47pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot, 45pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot,
48 unsigned long attrs); 46 unsigned long attrs);
47
48#ifdef CONFIG_MMU
49pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs);
49#else 50#else
50# define arch_dma_mmap_pgprot(dev, prot, attrs) pgprot_noncached(prot) 51static inline pgprot_t dma_pgprot(struct device *dev, pgprot_t prot,
51#endif 52 unsigned long attrs)
53{
54 return prot; /* no protection bits supported without page tables */
55}
56#endif /* CONFIG_MMU */
52 57
53#ifdef CONFIG_DMA_NONCOHERENT_CACHE_SYNC 58#ifdef CONFIG_DMA_NONCOHERENT_CACHE_SYNC
54void arch_dma_cache_sync(struct device *dev, void *vaddr, size_t size, 59void arch_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 17cd0078377c..1dd014c9c87b 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -45,7 +45,6 @@ struct elevator_mq_ops {
45 struct request *(*dispatch_request)(struct blk_mq_hw_ctx *); 45 struct request *(*dispatch_request)(struct blk_mq_hw_ctx *);
46 bool (*has_work)(struct blk_mq_hw_ctx *); 46 bool (*has_work)(struct blk_mq_hw_ctx *);
47 void (*completed_request)(struct request *, u64); 47 void (*completed_request)(struct request *, u64);
48 void (*started_request)(struct request *);
49 void (*requeue_request)(struct request *); 48 void (*requeue_request)(struct request *);
50 struct request *(*former_request)(struct request_queue *, struct request *); 49 struct request *(*former_request)(struct request_queue *, struct request *);
51 struct request *(*next_request)(struct request_queue *, struct request *); 50 struct request *(*next_request)(struct request_queue *, struct request *);
diff --git a/include/linux/filter.h b/include/linux/filter.h
index ff65d22cf336..92c6e31fb008 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -24,6 +24,7 @@
24 24
25#include <net/sch_generic.h> 25#include <net/sch_generic.h>
26 26
27#include <asm/byteorder.h>
27#include <uapi/linux/filter.h> 28#include <uapi/linux/filter.h>
28#include <uapi/linux/bpf.h> 29#include <uapi/linux/bpf.h>
29 30
@@ -747,6 +748,18 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default)
747 return size <= size_default && (size & (size - 1)) == 0; 748 return size <= size_default && (size & (size - 1)) == 0;
748} 749}
749 750
751static inline u8
752bpf_ctx_narrow_load_shift(u32 off, u32 size, u32 size_default)
753{
754 u8 load_off = off & (size_default - 1);
755
756#ifdef __LITTLE_ENDIAN
757 return load_off * 8;
758#else
759 return (size_default - (load_off + size)) * 8;
760#endif
761}
762
750#define bpf_ctx_wide_access_ok(off, size, type, field) \ 763#define bpf_ctx_wide_access_ok(off, size, type, field) \
751 (size == sizeof(__u64) && \ 764 (size == sizeof(__u64) && \
752 off >= offsetof(type, field) && \ 765 off >= offsetof(type, field) && \
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 56b8e358af5c..997a530ff4e9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2598,6 +2598,12 @@ extern struct block_device *blkdev_get_by_path(const char *path, fmode_t mode,
2598 void *holder); 2598 void *holder);
2599extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, 2599extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode,
2600 void *holder); 2600 void *holder);
2601extern struct block_device *bd_start_claiming(struct block_device *bdev,
2602 void *holder);
2603extern void bd_finish_claiming(struct block_device *bdev,
2604 struct block_device *whole, void *holder);
2605extern void bd_abort_claiming(struct block_device *bdev,
2606 struct block_device *whole, void *holder);
2601extern void blkdev_put(struct block_device *bdev, fmode_t mode); 2607extern void blkdev_put(struct block_device *bdev, fmode_t mode);
2602extern int __blkdev_reread_part(struct block_device *bdev); 2608extern int __blkdev_reread_part(struct block_device *bdev);
2603extern int blkdev_reread_part(struct block_device *bdev); 2609extern int blkdev_reread_part(struct block_device *bdev);
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index fb07b503dc45..f33881688f42 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -510,22 +510,18 @@ alloc_pages(gfp_t gfp_mask, unsigned int order)
510} 510}
511extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, 511extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order,
512 struct vm_area_struct *vma, unsigned long addr, 512 struct vm_area_struct *vma, unsigned long addr,
513 int node, bool hugepage); 513 int node);
514#define alloc_hugepage_vma(gfp_mask, vma, addr, order) \
515 alloc_pages_vma(gfp_mask, order, vma, addr, numa_node_id(), true)
516#else 514#else
517#define alloc_pages(gfp_mask, order) \ 515#define alloc_pages(gfp_mask, order) \
518 alloc_pages_node(numa_node_id(), gfp_mask, order) 516 alloc_pages_node(numa_node_id(), gfp_mask, order)
519#define alloc_pages_vma(gfp_mask, order, vma, addr, node, false)\ 517#define alloc_pages_vma(gfp_mask, order, vma, addr, node)\
520 alloc_pages(gfp_mask, order)
521#define alloc_hugepage_vma(gfp_mask, vma, addr, order) \
522 alloc_pages(gfp_mask, order) 518 alloc_pages(gfp_mask, order)
523#endif 519#endif
524#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) 520#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
525#define alloc_page_vma(gfp_mask, vma, addr) \ 521#define alloc_page_vma(gfp_mask, vma, addr) \
526 alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id(), false) 522 alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id())
527#define alloc_page_vma_node(gfp_mask, vma, addr, node) \ 523#define alloc_page_vma_node(gfp_mask, vma, addr, node) \
528 alloc_pages_vma(gfp_mask, 0, vma, addr, node, false) 524 alloc_pages_vma(gfp_mask, 0, vma, addr, node)
529 525
530extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); 526extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
531extern unsigned long get_zeroed_page(gfp_t gfp_mask); 527extern unsigned long get_zeroed_page(gfp_t gfp_mask);
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 40915b461f18..f757a58191a6 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -241,30 +241,6 @@ static inline int irq_to_gpio(unsigned irq)
241 return -EINVAL; 241 return -EINVAL;
242} 242}
243 243
244static inline int
245gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
246 unsigned int gpio_offset, unsigned int pin_offset,
247 unsigned int npins)
248{
249 WARN_ON(1);
250 return -EINVAL;
251}
252
253static inline int
254gpiochip_add_pingroup_range(struct gpio_chip *chip,
255 struct pinctrl_dev *pctldev,
256 unsigned int gpio_offset, const char *pin_group)
257{
258 WARN_ON(1);
259 return -EINVAL;
260}
261
262static inline void
263gpiochip_remove_pin_ranges(struct gpio_chip *chip)
264{
265 WARN_ON(1);
266}
267
268static inline int devm_gpio_request(struct device *dev, unsigned gpio, 244static inline int devm_gpio_request(struct device *dev, unsigned gpio,
269 const char *label) 245 const char *label)
270{ 246{
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 9ddcf50a3c59..a7f08fb0f865 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -247,7 +247,7 @@ static inline void gpiod_put(struct gpio_desc *desc)
247 might_sleep(); 247 might_sleep();
248 248
249 /* GPIO can never have been requested */ 249 /* GPIO can never have been requested */
250 WARN_ON(1); 250 WARN_ON(desc);
251} 251}
252 252
253static inline void devm_gpiod_unhinge(struct device *dev, 253static inline void devm_gpiod_unhinge(struct device *dev,
@@ -256,7 +256,7 @@ static inline void devm_gpiod_unhinge(struct device *dev,
256 might_sleep(); 256 might_sleep();
257 257
258 /* GPIO can never have been requested */ 258 /* GPIO can never have been requested */
259 WARN_ON(1); 259 WARN_ON(desc);
260} 260}
261 261
262static inline void gpiod_put_array(struct gpio_descs *descs) 262static inline void gpiod_put_array(struct gpio_descs *descs)
@@ -264,7 +264,7 @@ static inline void gpiod_put_array(struct gpio_descs *descs)
264 might_sleep(); 264 might_sleep();
265 265
266 /* GPIO can never have been requested */ 266 /* GPIO can never have been requested */
267 WARN_ON(1); 267 WARN_ON(descs);
268} 268}
269 269
270static inline struct gpio_desc *__must_check 270static inline struct gpio_desc *__must_check
@@ -317,7 +317,7 @@ static inline void devm_gpiod_put(struct device *dev, struct gpio_desc *desc)
317 might_sleep(); 317 might_sleep();
318 318
319 /* GPIO can never have been requested */ 319 /* GPIO can never have been requested */
320 WARN_ON(1); 320 WARN_ON(desc);
321} 321}
322 322
323static inline void devm_gpiod_put_array(struct device *dev, 323static inline void devm_gpiod_put_array(struct device *dev,
@@ -326,32 +326,32 @@ static inline void devm_gpiod_put_array(struct device *dev,
326 might_sleep(); 326 might_sleep();
327 327
328 /* GPIO can never have been requested */ 328 /* GPIO can never have been requested */
329 WARN_ON(1); 329 WARN_ON(descs);
330} 330}
331 331
332 332
333static inline int gpiod_get_direction(const struct gpio_desc *desc) 333static inline int gpiod_get_direction(const struct gpio_desc *desc)
334{ 334{
335 /* GPIO can never have been requested */ 335 /* GPIO can never have been requested */
336 WARN_ON(1); 336 WARN_ON(desc);
337 return -ENOSYS; 337 return -ENOSYS;
338} 338}
339static inline int gpiod_direction_input(struct gpio_desc *desc) 339static inline int gpiod_direction_input(struct gpio_desc *desc)
340{ 340{
341 /* GPIO can never have been requested */ 341 /* GPIO can never have been requested */
342 WARN_ON(1); 342 WARN_ON(desc);
343 return -ENOSYS; 343 return -ENOSYS;
344} 344}
345static inline int gpiod_direction_output(struct gpio_desc *desc, int value) 345static inline int gpiod_direction_output(struct gpio_desc *desc, int value)
346{ 346{
347 /* GPIO can never have been requested */ 347 /* GPIO can never have been requested */
348 WARN_ON(1); 348 WARN_ON(desc);
349 return -ENOSYS; 349 return -ENOSYS;
350} 350}
351static inline int gpiod_direction_output_raw(struct gpio_desc *desc, int value) 351static inline int gpiod_direction_output_raw(struct gpio_desc *desc, int value)
352{ 352{
353 /* GPIO can never have been requested */ 353 /* GPIO can never have been requested */
354 WARN_ON(1); 354 WARN_ON(desc);
355 return -ENOSYS; 355 return -ENOSYS;
356} 356}
357 357
@@ -359,7 +359,7 @@ static inline int gpiod_direction_output_raw(struct gpio_desc *desc, int value)
359static inline int gpiod_get_value(const struct gpio_desc *desc) 359static inline int gpiod_get_value(const struct gpio_desc *desc)
360{ 360{
361 /* GPIO can never have been requested */ 361 /* GPIO can never have been requested */
362 WARN_ON(1); 362 WARN_ON(desc);
363 return 0; 363 return 0;
364} 364}
365static inline int gpiod_get_array_value(unsigned int array_size, 365static inline int gpiod_get_array_value(unsigned int array_size,
@@ -368,13 +368,13 @@ static inline int gpiod_get_array_value(unsigned int array_size,
368 unsigned long *value_bitmap) 368 unsigned long *value_bitmap)
369{ 369{
370 /* GPIO can never have been requested */ 370 /* GPIO can never have been requested */
371 WARN_ON(1); 371 WARN_ON(desc_array);
372 return 0; 372 return 0;
373} 373}
374static inline void gpiod_set_value(struct gpio_desc *desc, int value) 374static inline void gpiod_set_value(struct gpio_desc *desc, int value)
375{ 375{
376 /* GPIO can never have been requested */ 376 /* GPIO can never have been requested */
377 WARN_ON(1); 377 WARN_ON(desc);
378} 378}
379static inline int gpiod_set_array_value(unsigned int array_size, 379static inline int gpiod_set_array_value(unsigned int array_size,
380 struct gpio_desc **desc_array, 380 struct gpio_desc **desc_array,
@@ -382,13 +382,13 @@ static inline int gpiod_set_array_value(unsigned int array_size,
382 unsigned long *value_bitmap) 382 unsigned long *value_bitmap)
383{ 383{
384 /* GPIO can never have been requested */ 384 /* GPIO can never have been requested */
385 WARN_ON(1); 385 WARN_ON(desc_array);
386 return 0; 386 return 0;
387} 387}
388static inline int gpiod_get_raw_value(const struct gpio_desc *desc) 388static inline int gpiod_get_raw_value(const struct gpio_desc *desc)
389{ 389{
390 /* GPIO can never have been requested */ 390 /* GPIO can never have been requested */
391 WARN_ON(1); 391 WARN_ON(desc);
392 return 0; 392 return 0;
393} 393}
394static inline int gpiod_get_raw_array_value(unsigned int array_size, 394static inline int gpiod_get_raw_array_value(unsigned int array_size,
@@ -397,13 +397,13 @@ static inline int gpiod_get_raw_array_value(unsigned int array_size,
397 unsigned long *value_bitmap) 397 unsigned long *value_bitmap)
398{ 398{
399 /* GPIO can never have been requested */ 399 /* GPIO can never have been requested */
400 WARN_ON(1); 400 WARN_ON(desc_array);
401 return 0; 401 return 0;
402} 402}
403static inline void gpiod_set_raw_value(struct gpio_desc *desc, int value) 403static inline void gpiod_set_raw_value(struct gpio_desc *desc, int value)
404{ 404{
405 /* GPIO can never have been requested */ 405 /* GPIO can never have been requested */
406 WARN_ON(1); 406 WARN_ON(desc);
407} 407}
408static inline int gpiod_set_raw_array_value(unsigned int array_size, 408static inline int gpiod_set_raw_array_value(unsigned int array_size,
409 struct gpio_desc **desc_array, 409 struct gpio_desc **desc_array,
@@ -411,14 +411,14 @@ static inline int gpiod_set_raw_array_value(unsigned int array_size,
411 unsigned long *value_bitmap) 411 unsigned long *value_bitmap)
412{ 412{
413 /* GPIO can never have been requested */ 413 /* GPIO can never have been requested */
414 WARN_ON(1); 414 WARN_ON(desc_array);
415 return 0; 415 return 0;
416} 416}
417 417
418static inline int gpiod_get_value_cansleep(const struct gpio_desc *desc) 418static inline int gpiod_get_value_cansleep(const struct gpio_desc *desc)
419{ 419{
420 /* GPIO can never have been requested */ 420 /* GPIO can never have been requested */
421 WARN_ON(1); 421 WARN_ON(desc);
422 return 0; 422 return 0;
423} 423}
424static inline int gpiod_get_array_value_cansleep(unsigned int array_size, 424static inline int gpiod_get_array_value_cansleep(unsigned int array_size,
@@ -427,13 +427,13 @@ static inline int gpiod_get_array_value_cansleep(unsigned int array_size,
427 unsigned long *value_bitmap) 427 unsigned long *value_bitmap)
428{ 428{
429 /* GPIO can never have been requested */ 429 /* GPIO can never have been requested */
430 WARN_ON(1); 430 WARN_ON(desc_array);
431 return 0; 431 return 0;
432} 432}
433static inline void gpiod_set_value_cansleep(struct gpio_desc *desc, int value) 433static inline void gpiod_set_value_cansleep(struct gpio_desc *desc, int value)
434{ 434{
435 /* GPIO can never have been requested */ 435 /* GPIO can never have been requested */
436 WARN_ON(1); 436 WARN_ON(desc);
437} 437}
438static inline int gpiod_set_array_value_cansleep(unsigned int array_size, 438static inline int gpiod_set_array_value_cansleep(unsigned int array_size,
439 struct gpio_desc **desc_array, 439 struct gpio_desc **desc_array,
@@ -441,13 +441,13 @@ static inline int gpiod_set_array_value_cansleep(unsigned int array_size,
441 unsigned long *value_bitmap) 441 unsigned long *value_bitmap)
442{ 442{
443 /* GPIO can never have been requested */ 443 /* GPIO can never have been requested */
444 WARN_ON(1); 444 WARN_ON(desc_array);
445 return 0; 445 return 0;
446} 446}
447static inline int gpiod_get_raw_value_cansleep(const struct gpio_desc *desc) 447static inline int gpiod_get_raw_value_cansleep(const struct gpio_desc *desc)
448{ 448{
449 /* GPIO can never have been requested */ 449 /* GPIO can never have been requested */
450 WARN_ON(1); 450 WARN_ON(desc);
451 return 0; 451 return 0;
452} 452}
453static inline int gpiod_get_raw_array_value_cansleep(unsigned int array_size, 453static inline int gpiod_get_raw_array_value_cansleep(unsigned int array_size,
@@ -456,14 +456,14 @@ static inline int gpiod_get_raw_array_value_cansleep(unsigned int array_size,
456 unsigned long *value_bitmap) 456 unsigned long *value_bitmap)
457{ 457{
458 /* GPIO can never have been requested */ 458 /* GPIO can never have been requested */
459 WARN_ON(1); 459 WARN_ON(desc_array);
460 return 0; 460 return 0;
461} 461}
462static inline void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, 462static inline void gpiod_set_raw_value_cansleep(struct gpio_desc *desc,
463 int value) 463 int value)
464{ 464{
465 /* GPIO can never have been requested */ 465 /* GPIO can never have been requested */
466 WARN_ON(1); 466 WARN_ON(desc);
467} 467}
468static inline int gpiod_set_raw_array_value_cansleep(unsigned int array_size, 468static inline int gpiod_set_raw_array_value_cansleep(unsigned int array_size,
469 struct gpio_desc **desc_array, 469 struct gpio_desc **desc_array,
@@ -471,41 +471,41 @@ static inline int gpiod_set_raw_array_value_cansleep(unsigned int array_size,
471 unsigned long *value_bitmap) 471 unsigned long *value_bitmap)
472{ 472{
473 /* GPIO can never have been requested */ 473 /* GPIO can never have been requested */
474 WARN_ON(1); 474 WARN_ON(desc_array);
475 return 0; 475 return 0;
476} 476}
477 477
478static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce) 478static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce)
479{ 479{
480 /* GPIO can never have been requested */ 480 /* GPIO can never have been requested */
481 WARN_ON(1); 481 WARN_ON(desc);
482 return -ENOSYS; 482 return -ENOSYS;
483} 483}
484 484
485static inline int gpiod_set_transitory(struct gpio_desc *desc, bool transitory) 485static inline int gpiod_set_transitory(struct gpio_desc *desc, bool transitory)
486{ 486{
487 /* GPIO can never have been requested */ 487 /* GPIO can never have been requested */
488 WARN_ON(1); 488 WARN_ON(desc);
489 return -ENOSYS; 489 return -ENOSYS;
490} 490}
491 491
492static inline int gpiod_is_active_low(const struct gpio_desc *desc) 492static inline int gpiod_is_active_low(const struct gpio_desc *desc)
493{ 493{
494 /* GPIO can never have been requested */ 494 /* GPIO can never have been requested */
495 WARN_ON(1); 495 WARN_ON(desc);
496 return 0; 496 return 0;
497} 497}
498static inline int gpiod_cansleep(const struct gpio_desc *desc) 498static inline int gpiod_cansleep(const struct gpio_desc *desc)
499{ 499{
500 /* GPIO can never have been requested */ 500 /* GPIO can never have been requested */
501 WARN_ON(1); 501 WARN_ON(desc);
502 return 0; 502 return 0;
503} 503}
504 504
505static inline int gpiod_to_irq(const struct gpio_desc *desc) 505static inline int gpiod_to_irq(const struct gpio_desc *desc)
506{ 506{
507 /* GPIO can never have been requested */ 507 /* GPIO can never have been requested */
508 WARN_ON(1); 508 WARN_ON(desc);
509 return -EINVAL; 509 return -EINVAL;
510} 510}
511 511
@@ -513,7 +513,7 @@ static inline int gpiod_set_consumer_name(struct gpio_desc *desc,
513 const char *name) 513 const char *name)
514{ 514{
515 /* GPIO can never have been requested */ 515 /* GPIO can never have been requested */
516 WARN_ON(1); 516 WARN_ON(desc);
517 return -EINVAL; 517 return -EINVAL;
518} 518}
519 519
@@ -525,7 +525,7 @@ static inline struct gpio_desc *gpio_to_desc(unsigned gpio)
525static inline int desc_to_gpio(const struct gpio_desc *desc) 525static inline int desc_to_gpio(const struct gpio_desc *desc)
526{ 526{
527 /* GPIO can never have been requested */ 527 /* GPIO can never have been requested */
528 WARN_ON(1); 528 WARN_ON(desc);
529 return -EINVAL; 529 return -EINVAL;
530} 530}
531 531
diff --git a/include/linux/hmm.h b/include/linux/hmm.h
index b8a08b2a10ca..7ef56dc18050 100644
--- a/include/linux/hmm.h
+++ b/include/linux/hmm.h
@@ -484,60 +484,6 @@ long hmm_range_dma_unmap(struct hmm_range *range,
484 */ 484 */
485#define HMM_RANGE_DEFAULT_TIMEOUT 1000 485#define HMM_RANGE_DEFAULT_TIMEOUT 1000
486 486
487/* This is a temporary helper to avoid merge conflict between trees. */
488static inline bool hmm_vma_range_done(struct hmm_range *range)
489{
490 bool ret = hmm_range_valid(range);
491
492 hmm_range_unregister(range);
493 return ret;
494}
495
496/* This is a temporary helper to avoid merge conflict between trees. */
497static inline int hmm_vma_fault(struct hmm_mirror *mirror,
498 struct hmm_range *range, bool block)
499{
500 long ret;
501
502 /*
503 * With the old API the driver must set each individual entries with
504 * the requested flags (valid, write, ...). So here we set the mask to
505 * keep intact the entries provided by the driver and zero out the
506 * default_flags.
507 */
508 range->default_flags = 0;
509 range->pfn_flags_mask = -1UL;
510
511 ret = hmm_range_register(range, mirror,
512 range->start, range->end,
513 PAGE_SHIFT);
514 if (ret)
515 return (int)ret;
516
517 if (!hmm_range_wait_until_valid(range, HMM_RANGE_DEFAULT_TIMEOUT)) {
518 /*
519 * The mmap_sem was taken by driver we release it here and
520 * returns -EAGAIN which correspond to mmap_sem have been
521 * drop in the old API.
522 */
523 up_read(&range->vma->vm_mm->mmap_sem);
524 return -EAGAIN;
525 }
526
527 ret = hmm_range_fault(range, block);
528 if (ret <= 0) {
529 if (ret == -EBUSY || !ret) {
530 /* Same as above, drop mmap_sem to match old API. */
531 up_read(&range->vma->vm_mm->mmap_sem);
532 ret = -EBUSY;
533 } else if (ret == -EAGAIN)
534 ret = -EBUSY;
535 hmm_range_unregister(range);
536 return ret;
537 }
538 return 0;
539}
540
541/* Below are for HMM internal use only! Not to be used by device driver! */ 487/* Below are for HMM internal use only! Not to be used by device driver! */
542static inline void hmm_mm_init(struct mm_struct *mm) 488static inline void hmm_mm_init(struct mm_struct *mm)
543{ 489{
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 8b728750a625..69e813bcb947 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -80,6 +80,9 @@ extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp);
80extern void unregister_pppox_proto(int proto_num); 80extern void unregister_pppox_proto(int proto_num);
81extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */ 81extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
82extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 82extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
83extern int pppox_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
84
85#define PPPOEIOCSFWD32 _IOW(0xB1 ,0, compat_size_t)
83 86
84/* PPPoX socket states */ 87/* PPPoX socket states */
85enum { 88enum {
diff --git a/include/linux/if_rmnet.h b/include/linux/if_rmnet.h
index b4f5403383fc..9661416a9bb4 100644
--- a/include/linux/if_rmnet.h
+++ b/include/linux/if_rmnet.h
@@ -41,11 +41,11 @@ struct rmnet_map_ul_csum_header {
41 __be16 csum_start_offset; 41 __be16 csum_start_offset;
42#if defined(__LITTLE_ENDIAN_BITFIELD) 42#if defined(__LITTLE_ENDIAN_BITFIELD)
43 u16 csum_insert_offset:14; 43 u16 csum_insert_offset:14;
44 u16 udp_ip4_ind:1; 44 u16 udp_ind:1;
45 u16 csum_enabled:1; 45 u16 csum_enabled:1;
46#elif defined (__BIG_ENDIAN_BITFIELD) 46#elif defined (__BIG_ENDIAN_BITFIELD)
47 u16 csum_enabled:1; 47 u16 csum_enabled:1;
48 u16 udp_ip4_ind:1; 48 u16 udp_ind:1;
49 u16 csum_insert_offset:14; 49 u16 csum_insert_offset:14;
50#else 50#else
51#error "Please fix <asm/byteorder.h>" 51#error "Please fix <asm/byteorder.h>"
diff --git a/include/linux/input/elan-i2c-ids.h b/include/linux/input/elan-i2c-ids.h
index ceabb01a6a7d..1ecb6b45812c 100644
--- a/include/linux/input/elan-i2c-ids.h
+++ b/include/linux/input/elan-i2c-ids.h
@@ -48,7 +48,7 @@ static const struct acpi_device_id elan_acpi_id[] = {
48 { "ELAN0618", 0 }, 48 { "ELAN0618", 0 },
49 { "ELAN0619", 0 }, 49 { "ELAN0619", 0 },
50 { "ELAN061A", 0 }, 50 { "ELAN061A", 0 },
51 { "ELAN061B", 0 }, 51/* { "ELAN061B", 0 }, not working on the Lenovo Legion Y7000 */
52 { "ELAN061C", 0 }, 52 { "ELAN061C", 0 },
53 { "ELAN061D", 0 }, 53 { "ELAN061D", 0 },
54 { "ELAN061E", 0 }, 54 { "ELAN061E", 0 },
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index f2ae8a006ff8..4fc6454f7ebb 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -346,7 +346,6 @@ enum {
346#define QI_PC_PASID_SEL (QI_PC_TYPE | QI_PC_GRAN(1)) 346#define QI_PC_PASID_SEL (QI_PC_TYPE | QI_PC_GRAN(1))
347 347
348#define QI_EIOTLB_ADDR(addr) ((u64)(addr) & VTD_PAGE_MASK) 348#define QI_EIOTLB_ADDR(addr) ((u64)(addr) & VTD_PAGE_MASK)
349#define QI_EIOTLB_GL(gl) (((u64)gl) << 7)
350#define QI_EIOTLB_IH(ih) (((u64)ih) << 6) 349#define QI_EIOTLB_IH(ih) (((u64)ih) << 6)
351#define QI_EIOTLB_AM(am) (((u64)am)) 350#define QI_EIOTLB_AM(am) (((u64)am))
352#define QI_EIOTLB_PASID(pasid) (((u64)pasid) << 32) 351#define QI_EIOTLB_PASID(pasid) (((u64)pasid) << 32)
@@ -378,8 +377,6 @@ enum {
378#define QI_RESP_INVALID 0x1 377#define QI_RESP_INVALID 0x1
379#define QI_RESP_FAILURE 0xf 378#define QI_RESP_FAILURE 0xf
380 379
381#define QI_GRAN_ALL_ALL 0
382#define QI_GRAN_NONG_ALL 1
383#define QI_GRAN_NONG_PASID 2 380#define QI_GRAN_NONG_PASID 2
384#define QI_GRAN_PSI_PASID 3 381#define QI_GRAN_PSI_PASID 3
385 382
diff --git a/include/linux/iova.h b/include/linux/iova.h
index 781b96ac706f..a0637abffee8 100644
--- a/include/linux/iova.h
+++ b/include/linux/iova.h
@@ -155,6 +155,7 @@ struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo,
155void copy_reserved_iova(struct iova_domain *from, struct iova_domain *to); 155void copy_reserved_iova(struct iova_domain *from, struct iova_domain *to);
156void init_iova_domain(struct iova_domain *iovad, unsigned long granule, 156void init_iova_domain(struct iova_domain *iovad, unsigned long granule,
157 unsigned long start_pfn); 157 unsigned long start_pfn);
158bool has_iova_flush_queue(struct iova_domain *iovad);
158int init_iova_flush_queue(struct iova_domain *iovad, 159int init_iova_flush_queue(struct iova_domain *iovad,
159 iova_flush_cb flush_cb, iova_entry_dtor entry_dtor); 160 iova_flush_cb flush_cb, iova_entry_dtor entry_dtor);
160struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn); 161struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn);
@@ -235,6 +236,11 @@ static inline void init_iova_domain(struct iova_domain *iovad,
235{ 236{
236} 237}
237 238
239static inline bool has_iova_flush_queue(struct iova_domain *iovad)
240{
241 return false;
242}
243
238static inline int init_iova_flush_queue(struct iova_domain *iovad, 244static inline int init_iova_flush_queue(struct iova_domain *iovad,
239 iova_flush_cb flush_cb, 245 iova_flush_cb flush_cb,
240 iova_entry_dtor entry_dtor) 246 iova_entry_dtor entry_dtor)
diff --git a/include/linux/key.h b/include/linux/key.h
index 91f391cd272e..50028338a4cc 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -94,11 +94,11 @@ struct keyring_index_key {
94 union { 94 union {
95 struct { 95 struct {
96#ifdef __LITTLE_ENDIAN /* Put desc_len at the LSB of x */ 96#ifdef __LITTLE_ENDIAN /* Put desc_len at the LSB of x */
97 u8 desc_len; 97 u16 desc_len;
98 char desc[sizeof(long) - 1]; /* First few chars of description */ 98 char desc[sizeof(long) - 2]; /* First few chars of description */
99#else 99#else
100 char desc[sizeof(long) - 1]; /* First few chars of description */ 100 char desc[sizeof(long) - 2]; /* First few chars of description */
101 u8 desc_len; 101 u16 desc_len;
102#endif 102#endif
103 }; 103 };
104 unsigned long x; 104 unsigned long x;
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 5c5b5867024c..fcb46b3374c6 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -861,8 +861,9 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu);
861void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu); 861void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu);
862void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); 862void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu);
863 863
864bool kvm_arch_has_vcpu_debugfs(void); 864#ifdef __KVM_HAVE_ARCH_VCPU_DEBUGFS
865int kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu); 865void kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu);
866#endif
866 867
867int kvm_arch_hardware_enable(void); 868int kvm_arch_hardware_enable(void);
868void kvm_arch_hardware_disable(void); 869void kvm_arch_hardware_disable(void);
@@ -872,6 +873,7 @@ int kvm_arch_check_processor_compat(void);
872int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu); 873int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
873bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu); 874bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu);
874int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu); 875int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu);
876bool kvm_arch_dy_runnable(struct kvm_vcpu *vcpu);
875 877
876#ifndef __KVM_HAVE_ARCH_VM_ALLOC 878#ifndef __KVM_HAVE_ARCH_VM_ALLOC
877/* 879/*
diff --git a/include/linux/logic_pio.h b/include/linux/logic_pio.h
index cbd9d8495690..88e1e6304a71 100644
--- a/include/linux/logic_pio.h
+++ b/include/linux/logic_pio.h
@@ -117,6 +117,7 @@ struct logic_pio_hwaddr *find_io_range_by_fwnode(struct fwnode_handle *fwnode);
117unsigned long logic_pio_trans_hwaddr(struct fwnode_handle *fwnode, 117unsigned long logic_pio_trans_hwaddr(struct fwnode_handle *fwnode,
118 resource_size_t hw_addr, resource_size_t size); 118 resource_size_t hw_addr, resource_size_t size);
119int logic_pio_register_range(struct logic_pio_hwaddr *newrange); 119int logic_pio_register_range(struct logic_pio_hwaddr *newrange);
120void logic_pio_unregister_range(struct logic_pio_hwaddr *range);
120resource_size_t logic_pio_to_hwaddr(unsigned long pio); 121resource_size_t logic_pio_to_hwaddr(unsigned long pio);
121unsigned long logic_pio_trans_cpuaddr(resource_size_t hw_addr); 122unsigned long logic_pio_trans_cpuaddr(resource_size_t hw_addr);
122 123
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 44c41462be33..2cd4359cb38c 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -668,6 +668,7 @@ static inline unsigned long lruvec_page_state_local(struct lruvec *lruvec,
668 668
669void __mod_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx, 669void __mod_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
670 int val); 670 int val);
671void __mod_lruvec_slab_state(void *p, enum node_stat_item idx, int val);
671 672
672static inline void mod_lruvec_state(struct lruvec *lruvec, 673static inline void mod_lruvec_state(struct lruvec *lruvec,
673 enum node_stat_item idx, int val) 674 enum node_stat_item idx, int val)
@@ -1072,6 +1073,14 @@ static inline void mod_lruvec_page_state(struct page *page,
1072 mod_node_page_state(page_pgdat(page), idx, val); 1073 mod_node_page_state(page_pgdat(page), idx, val);
1073} 1074}
1074 1075
1076static inline void __mod_lruvec_slab_state(void *p, enum node_stat_item idx,
1077 int val)
1078{
1079 struct page *page = virt_to_head_page(p);
1080
1081 __mod_node_page_state(page_pgdat(page), idx, val);
1082}
1083
1075static inline 1084static inline
1076unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, 1085unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,
1077 gfp_t gfp_mask, 1086 gfp_t gfp_mask,
@@ -1159,6 +1168,16 @@ static inline void __dec_lruvec_page_state(struct page *page,
1159 __mod_lruvec_page_state(page, idx, -1); 1168 __mod_lruvec_page_state(page, idx, -1);
1160} 1169}
1161 1170
1171static inline void __inc_lruvec_slab_state(void *p, enum node_stat_item idx)
1172{
1173 __mod_lruvec_slab_state(p, idx, 1);
1174}
1175
1176static inline void __dec_lruvec_slab_state(void *p, enum node_stat_item idx)
1177{
1178 __mod_lruvec_slab_state(p, idx, -1);
1179}
1180
1162/* idx can be of type enum memcg_stat_item or node_stat_item */ 1181/* idx can be of type enum memcg_stat_item or node_stat_item */
1163static inline void inc_memcg_state(struct mem_cgroup *memcg, 1182static inline void inc_memcg_state(struct mem_cgroup *memcg,
1164 int idx) 1183 int idx)
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 5228c62af416..bac395f1d00a 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -139,6 +139,8 @@ struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp,
139struct mempolicy *get_task_policy(struct task_struct *p); 139struct mempolicy *get_task_policy(struct task_struct *p);
140struct mempolicy *__get_vma_policy(struct vm_area_struct *vma, 140struct mempolicy *__get_vma_policy(struct vm_area_struct *vma,
141 unsigned long addr); 141 unsigned long addr);
142struct mempolicy *get_vma_policy(struct vm_area_struct *vma,
143 unsigned long addr);
142bool vma_policy_mof(struct vm_area_struct *vma); 144bool vma_policy_mof(struct vm_area_struct *vma);
143 145
144extern void numa_default_policy(void); 146extern void numa_default_policy(void);
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index ce9839c8bc1a..c2f056b5766d 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -446,11 +446,11 @@ enum {
446}; 446};
447 447
448enum { 448enum {
449 MLX5_OPC_MOD_TLS_TIS_STATIC_PARAMS = 0x20, 449 MLX5_OPC_MOD_TLS_TIS_STATIC_PARAMS = 0x1,
450}; 450};
451 451
452enum { 452enum {
453 MLX5_OPC_MOD_TLS_TIS_PROGRESS_PARAMS = 0x20, 453 MLX5_OPC_MOD_TLS_TIS_PROGRESS_PARAMS = 0x1,
454}; 454};
455 455
456enum { 456enum {
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index 04a569568eac..f049af3f3cd8 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -220,6 +220,7 @@ int mlx5_modify_rule_destination(struct mlx5_flow_handle *handler,
220 220
221struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging); 221struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging);
222void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter); 222void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter);
223u64 mlx5_fc_query_lastuse(struct mlx5_fc *counter);
223void mlx5_fc_query_cached(struct mlx5_fc *counter, 224void mlx5_fc_query_cached(struct mlx5_fc *counter,
224 u64 *bytes, u64 *packets, u64 *lastuse); 225 u64 *bytes, u64 *packets, u64 *lastuse);
225int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter, 226int mlx5_fc_query(struct mlx5_core_dev *dev, struct mlx5_fc *counter,
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index b3d5752657d9..b8b570c30b5e 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -5975,10 +5975,12 @@ struct mlx5_ifc_modify_cq_in_bits {
5975 5975
5976 struct mlx5_ifc_cqc_bits cq_context; 5976 struct mlx5_ifc_cqc_bits cq_context;
5977 5977
5978 u8 reserved_at_280[0x40]; 5978 u8 reserved_at_280[0x60];
5979 5979
5980 u8 cq_umem_valid[0x1]; 5980 u8 cq_umem_valid[0x1];
5981 u8 reserved_at_2c1[0x5bf]; 5981 u8 reserved_at_2e1[0x1f];
5982
5983 u8 reserved_at_300[0x580];
5982 5984
5983 u8 pas[0][0x40]; 5985 u8 pas[0][0x40];
5984}; 5986};
@@ -10052,9 +10054,8 @@ struct mlx5_ifc_tls_static_params_bits {
10052}; 10054};
10053 10055
10054struct mlx5_ifc_tls_progress_params_bits { 10056struct mlx5_ifc_tls_progress_params_bits {
10055 u8 valid[0x1]; 10057 u8 reserved_at_0[0x8];
10056 u8 reserved_at_1[0x7]; 10058 u8 tisn[0x18];
10057 u8 pd[0x18];
10058 10059
10059 u8 next_record_tcp_sn[0x20]; 10060 u8 next_record_tcp_sn[0x20];
10060 10061
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 3a37a89eb7a7..6a7a1083b6fb 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -159,7 +159,16 @@ struct page {
159 /** @pgmap: Points to the hosting device page map. */ 159 /** @pgmap: Points to the hosting device page map. */
160 struct dev_pagemap *pgmap; 160 struct dev_pagemap *pgmap;
161 void *zone_device_data; 161 void *zone_device_data;
162 unsigned long _zd_pad_1; /* uses mapping */ 162 /*
163 * ZONE_DEVICE private pages are counted as being
164 * mapped so the next 3 words hold the mapping, index,
165 * and private fields from the source anonymous or
166 * page cache page while the page is migrated to device
167 * private memory.
168 * ZONE_DEVICE MEMORY_DEVICE_FS_DAX pages also
169 * use the mapping, index, and private fields when
170 * pmem backed DAX files are mapped.
171 */
163 }; 172 };
164 173
165 /** @rcu_head: You can use this to free a page by RCU. */ 174 /** @rcu_head: You can use this to free a page by RCU. */
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index d77d717c620c..3f38c30d2f13 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -215,8 +215,9 @@ enum node_stat_item {
215 NR_INACTIVE_FILE, /* " " " " " */ 215 NR_INACTIVE_FILE, /* " " " " " */
216 NR_ACTIVE_FILE, /* " " " " " */ 216 NR_ACTIVE_FILE, /* " " " " " */
217 NR_UNEVICTABLE, /* " " " " " */ 217 NR_UNEVICTABLE, /* " " " " " */
218 NR_SLAB_RECLAIMABLE, 218 NR_SLAB_RECLAIMABLE, /* Please do not reorder this item */
219 NR_SLAB_UNRECLAIMABLE, 219 NR_SLAB_UNRECLAIMABLE, /* and this one without looking at
220 * memcg_flush_percpu_vmstats() first. */
220 NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */ 221 NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */
221 NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */ 222 NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */
222 WORKINGSET_NODES, 223 WORKINGSET_NODES,
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index b2c1648f7e5d..5714fd35a83c 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -814,6 +814,7 @@ struct tee_client_device_id {
814/** 814/**
815 * struct wmi_device_id - WMI device identifier 815 * struct wmi_device_id - WMI device identifier
816 * @guid_string: 36 char string of the form fa50ff2b-f2e8-45de-83fa-65417f2f49ba 816 * @guid_string: 36 char string of the form fa50ff2b-f2e8-45de-83fa-65417f2f49ba
817 * @context: pointer to driver specific data
817 */ 818 */
818struct wmi_device_id { 819struct wmi_device_id {
819 const char guid_string[UUID_STRING_LEN+1]; 820 const char guid_string[UUID_STRING_LEN+1];
diff --git a/include/linux/netfilter/nf_conntrack_h323_asn1.h b/include/linux/netfilter/nf_conntrack_h323_asn1.h
index 91d6275292a5..19df78341fb3 100644
--- a/include/linux/netfilter/nf_conntrack_h323_asn1.h
+++ b/include/linux/netfilter/nf_conntrack_h323_asn1.h
@@ -1,7 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */ 1/* SPDX-License-Identifier: GPL-2.0-only */
2/**************************************************************************** 2/****************************************************************************
3 * ip_conntrack_h323_asn1.h - BER and PER decoding library for H.323 3 * BER and PER decoding library for H.323 conntrack/NAT module.
4 * conntrack/NAT module.
5 * 4 *
6 * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net> 5 * Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net>
7 * 6 *
diff --git a/include/linux/netfilter/nf_conntrack_h323_types.h b/include/linux/netfilter/nf_conntrack_h323_types.h
index 7a6871ac8784..74c6f9241944 100644
--- a/include/linux/netfilter/nf_conntrack_h323_types.h
+++ b/include/linux/netfilter/nf_conntrack_h323_types.h
@@ -4,6 +4,9 @@
4 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> 4 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net>
5 */ 5 */
6 6
7#ifndef _NF_CONNTRACK_H323_TYPES_H
8#define _NF_CONNTRACK_H323_TYPES_H
9
7typedef struct TransportAddress_ipAddress { /* SEQUENCE */ 10typedef struct TransportAddress_ipAddress { /* SEQUENCE */
8 int options; /* No use */ 11 int options; /* No use */
9 unsigned int ip; 12 unsigned int ip;
@@ -931,3 +934,5 @@ typedef struct RasMessage { /* CHOICE */
931 InfoRequestResponse infoRequestResponse; 934 InfoRequestResponse infoRequestResponse;
932 }; 935 };
933} RasMessage; 936} RasMessage;
937
938#endif /* _NF_CONNTRACK_H323_TYPES_H */
diff --git a/include/linux/of.h b/include/linux/of.h
index 0cf857012f11..844f89e1b039 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -1164,7 +1164,7 @@ static inline int of_property_read_string_index(const struct device_node *np,
1164} 1164}
1165 1165
1166/** 1166/**
1167 * of_property_read_bool - Findfrom a property 1167 * of_property_read_bool - Find a property
1168 * @np: device node from which the property value is to be read. 1168 * @np: device node from which the property value is to be read.
1169 * @propname: name of the property to be searched. 1169 * @propname: name of the property to be searched.
1170 * 1170 *
diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h
index 1dda31825ec4..71283739ffd2 100644
--- a/include/linux/page-flags-layout.h
+++ b/include/linux/page-flags-layout.h
@@ -32,6 +32,7 @@
32 32
33#endif /* CONFIG_SPARSEMEM */ 33#endif /* CONFIG_SPARSEMEM */
34 34
35#ifndef BUILD_VDSO32_64
35/* 36/*
36 * page->flags layout: 37 * page->flags layout:
37 * 38 *
@@ -76,20 +77,22 @@
76#define LAST_CPUPID_SHIFT 0 77#define LAST_CPUPID_SHIFT 0
77#endif 78#endif
78 79
79#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_CPUPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS 80#ifdef CONFIG_KASAN_SW_TAGS
81#define KASAN_TAG_WIDTH 8
82#else
83#define KASAN_TAG_WIDTH 0
84#endif
85
86#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT+LAST_CPUPID_SHIFT+KASAN_TAG_WIDTH \
87 <= BITS_PER_LONG - NR_PAGEFLAGS
80#define LAST_CPUPID_WIDTH LAST_CPUPID_SHIFT 88#define LAST_CPUPID_WIDTH LAST_CPUPID_SHIFT
81#else 89#else
82#define LAST_CPUPID_WIDTH 0 90#define LAST_CPUPID_WIDTH 0
83#endif 91#endif
84 92
85#ifdef CONFIG_KASAN_SW_TAGS
86#define KASAN_TAG_WIDTH 8
87#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH+LAST_CPUPID_WIDTH+KASAN_TAG_WIDTH \ 93#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH+LAST_CPUPID_WIDTH+KASAN_TAG_WIDTH \
88 > BITS_PER_LONG - NR_PAGEFLAGS 94 > BITS_PER_LONG - NR_PAGEFLAGS
89#error "KASAN: not enough bits in page flags for tag" 95#error "Not enough bits in page flags"
90#endif
91#else
92#define KASAN_TAG_WIDTH 0
93#endif 96#endif
94 97
95/* 98/*
@@ -104,4 +107,5 @@
104#define LAST_CPUPID_NOT_IN_PAGE_FLAGS 107#define LAST_CPUPID_NOT_IN_PAGE_FLAGS
105#endif 108#endif
106 109
110#endif
107#endif /* _LINUX_PAGE_FLAGS_LAYOUT */ 111#endif /* _LINUX_PAGE_FLAGS_LAYOUT */
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index b848517da64c..f91cb8898ff0 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -152,6 +152,8 @@ enum pageflags {
152 PG_savepinned = PG_dirty, 152 PG_savepinned = PG_dirty,
153 /* Has a grant mapping of another (foreign) domain's page. */ 153 /* Has a grant mapping of another (foreign) domain's page. */
154 PG_foreign = PG_owner_priv_1, 154 PG_foreign = PG_owner_priv_1,
155 /* Remapped by swiotlb-xen. */
156 PG_xen_remapped = PG_owner_priv_1,
155 157
156 /* SLOB */ 158 /* SLOB */
157 PG_slob_free = PG_private, 159 PG_slob_free = PG_private,
@@ -329,6 +331,8 @@ PAGEFLAG(Pinned, pinned, PF_NO_COMPOUND)
329 TESTSCFLAG(Pinned, pinned, PF_NO_COMPOUND) 331 TESTSCFLAG(Pinned, pinned, PF_NO_COMPOUND)
330PAGEFLAG(SavePinned, savepinned, PF_NO_COMPOUND); 332PAGEFLAG(SavePinned, savepinned, PF_NO_COMPOUND);
331PAGEFLAG(Foreign, foreign, PF_NO_COMPOUND); 333PAGEFLAG(Foreign, foreign, PF_NO_COMPOUND);
334PAGEFLAG(XenRemapped, xen_remapped, PF_NO_COMPOUND)
335 TESTCLEARFLAG(XenRemapped, xen_remapped, PF_NO_COMPOUND)
332 336
333PAGEFLAG(Reserved, reserved, PF_NO_COMPOUND) 337PAGEFLAG(Reserved, reserved, PF_NO_COMPOUND)
334 __CLEARPAGEFLAG(Reserved, reserved, PF_NO_COMPOUND) 338 __CLEARPAGEFLAG(Reserved, reserved, PF_NO_COMPOUND)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9e700d9f9f28..82e4cd1b7ac3 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1567,8 +1567,10 @@ extern bool pcie_ports_native;
1567 1567
1568#ifdef CONFIG_PCIEASPM 1568#ifdef CONFIG_PCIEASPM
1569bool pcie_aspm_support_enabled(void); 1569bool pcie_aspm_support_enabled(void);
1570bool pcie_aspm_enabled(struct pci_dev *pdev);
1570#else 1571#else
1571static inline bool pcie_aspm_support_enabled(void) { return false; } 1572static inline bool pcie_aspm_support_enabled(void) { return false; }
1573static inline bool pcie_aspm_enabled(struct pci_dev *pdev) { return false; }
1572#endif 1574#endif
1573 1575
1574#ifdef CONFIG_PCIEAER 1576#ifdef CONFIG_PCIEAER
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 462b90b73f93..2fb9c8ffaf10 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1107,6 +1107,7 @@ int genphy_c45_an_disable_aneg(struct phy_device *phydev);
1107int genphy_c45_read_mdix(struct phy_device *phydev); 1107int genphy_c45_read_mdix(struct phy_device *phydev);
1108int genphy_c45_pma_read_abilities(struct phy_device *phydev); 1108int genphy_c45_pma_read_abilities(struct phy_device *phydev);
1109int genphy_c45_read_status(struct phy_device *phydev); 1109int genphy_c45_read_status(struct phy_device *phydev);
1110int genphy_c45_config_aneg(struct phy_device *phydev);
1110 1111
1111/* The gen10g_* functions are the old Clause 45 stub */ 1112/* The gen10g_* functions are the old Clause 45 stub */
1112int gen10g_config_aneg(struct phy_device *phydev); 1113int gen10g_config_aneg(struct phy_device *phydev);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8dc1811487f5..9f51932bd543 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1092,7 +1092,15 @@ struct task_struct {
1092 u64 last_sum_exec_runtime; 1092 u64 last_sum_exec_runtime;
1093 struct callback_head numa_work; 1093 struct callback_head numa_work;
1094 1094
1095 struct numa_group *numa_group; 1095 /*
1096 * This pointer is only modified for current in syscall and
1097 * pagefault context (and for tasks being destroyed), so it can be read
1098 * from any of the following contexts:
1099 * - RCU read-side critical section
1100 * - current->numa_group from everywhere
1101 * - task's runqueue locked, task not running
1102 */
1103 struct numa_group __rcu *numa_group;
1096 1104
1097 /* 1105 /*
1098 * numa_faults is an array split into four regions: 1106 * numa_faults is an array split into four regions:
diff --git a/include/linux/sched/numa_balancing.h b/include/linux/sched/numa_balancing.h
index e7dd04a84ba8..3988762efe15 100644
--- a/include/linux/sched/numa_balancing.h
+++ b/include/linux/sched/numa_balancing.h
@@ -19,7 +19,7 @@
19extern void task_numa_fault(int last_node, int node, int pages, int flags); 19extern void task_numa_fault(int last_node, int node, int pages, int flags);
20extern pid_t task_numa_group_id(struct task_struct *p); 20extern pid_t task_numa_group_id(struct task_struct *p);
21extern void set_numabalancing_state(bool enabled); 21extern void set_numabalancing_state(bool enabled);
22extern void task_numa_free(struct task_struct *p); 22extern void task_numa_free(struct task_struct *p, bool final);
23extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page, 23extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page,
24 int src_nid, int dst_cpu); 24 int src_nid, int dst_cpu);
25#else 25#else
@@ -34,7 +34,7 @@ static inline pid_t task_numa_group_id(struct task_struct *p)
34static inline void set_numabalancing_state(bool enabled) 34static inline void set_numabalancing_state(bool enabled)
35{ 35{
36} 36}
37static inline void task_numa_free(struct task_struct *p) 37static inline void task_numa_free(struct task_struct *p, bool final)
38{ 38{
39} 39}
40static inline bool should_numa_migrate_memory(struct task_struct *p, 40static inline bool should_numa_migrate_memory(struct task_struct *p,
diff --git a/include/linux/signal.h b/include/linux/signal.h
index b5d99482d3fe..1a5f88316b08 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -282,6 +282,9 @@ extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping);
282extern void exit_signals(struct task_struct *tsk); 282extern void exit_signals(struct task_struct *tsk);
283extern void kernel_sigaction(int, __sighandler_t); 283extern void kernel_sigaction(int, __sighandler_t);
284 284
285#define SIG_KTHREAD ((__force __sighandler_t)2)
286#define SIG_KTHREAD_KERNEL ((__force __sighandler_t)3)
287
285static inline void allow_signal(int sig) 288static inline void allow_signal(int sig)
286{ 289{
287 /* 290 /*
@@ -289,7 +292,17 @@ static inline void allow_signal(int sig)
289 * know it'll be handled, so that they don't get converted to 292 * know it'll be handled, so that they don't get converted to
290 * SIGKILL or just silently dropped. 293 * SIGKILL or just silently dropped.
291 */ 294 */
292 kernel_sigaction(sig, (__force __sighandler_t)2); 295 kernel_sigaction(sig, SIG_KTHREAD);
296}
297
298static inline void allow_kernel_signal(int sig)
299{
300 /*
301 * Kernel threads handle their own signals. Let the signal code
302 * know signals sent by the kernel will be handled, so that they
303 * don't get silently dropped.
304 */
305 kernel_sigaction(sig, SIG_KTHREAD_KERNEL);
293} 306}
294 307
295static inline void disallow_signal(int sig) 308static inline void disallow_signal(int sig)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index d8af86d995d6..ba5583522d24 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1374,6 +1374,14 @@ static inline void skb_copy_hash(struct sk_buff *to, const struct sk_buff *from)
1374 to->l4_hash = from->l4_hash; 1374 to->l4_hash = from->l4_hash;
1375}; 1375};
1376 1376
1377static inline void skb_copy_decrypted(struct sk_buff *to,
1378 const struct sk_buff *from)
1379{
1380#ifdef CONFIG_TLS_DEVICE
1381 to->decrypted = from->decrypted;
1382#endif
1383}
1384
1377#ifdef NET_SKBUFF_DATA_USES_OFFSET 1385#ifdef NET_SKBUFF_DATA_USES_OFFSET
1378static inline unsigned char *skb_end_pointer(const struct sk_buff *skb) 1386static inline unsigned char *skb_end_pointer(const struct sk_buff *skb)
1379{ 1387{
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index 50ced8aba9db..e4b3fb4bb77c 100644
--- a/include/linux/skmsg.h
+++ b/include/linux/skmsg.h
@@ -354,7 +354,13 @@ static inline void sk_psock_restore_proto(struct sock *sk,
354 sk->sk_write_space = psock->saved_write_space; 354 sk->sk_write_space = psock->saved_write_space;
355 355
356 if (psock->sk_proto) { 356 if (psock->sk_proto) {
357 sk->sk_prot = psock->sk_proto; 357 struct inet_connection_sock *icsk = inet_csk(sk);
358 bool has_ulp = !!icsk->icsk_ulp_data;
359
360 if (has_ulp)
361 tcp_update_ulp(sk, psock->sk_proto);
362 else
363 sk->sk_prot = psock->sk_proto;
358 psock->sk_proto = NULL; 364 psock->sk_proto = NULL;
359 } 365 }
360} 366}
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 97523818cb14..fc0bed59fc84 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -292,6 +292,9 @@ struct ucred {
292#define MSG_BATCH 0x40000 /* sendmmsg(): more messages coming */ 292#define MSG_BATCH 0x40000 /* sendmmsg(): more messages coming */
293#define MSG_EOF MSG_FIN 293#define MSG_EOF MSG_FIN
294#define MSG_NO_SHARED_FRAGS 0x80000 /* sendpage() internal : page frags are not shared */ 294#define MSG_NO_SHARED_FRAGS 0x80000 /* sendpage() internal : page frags are not shared */
295#define MSG_SENDPAGE_DECRYPTED 0x100000 /* sendpage() internal : page may carry
296 * plain text and require encryption
297 */
295 298
296#define MSG_ZEROCOPY 0x4000000 /* Use user data in kernel path */ 299#define MSG_ZEROCOPY 0x4000000 /* Use user data in kernel path */
297#define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */ 300#define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index baa3ecdb882f..27536b961552 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -98,7 +98,6 @@ typedef void (*rpc_action)(struct rpc_task *);
98 98
99struct rpc_call_ops { 99struct rpc_call_ops {
100 void (*rpc_call_prepare)(struct rpc_task *, void *); 100 void (*rpc_call_prepare)(struct rpc_task *, void *);
101 void (*rpc_call_prepare_transmit)(struct rpc_task *, void *);
102 void (*rpc_call_done)(struct rpc_task *, void *); 101 void (*rpc_call_done)(struct rpc_task *, void *);
103 void (*rpc_count_stats)(struct rpc_task *, void *); 102 void (*rpc_count_stats)(struct rpc_task *, void *);
104 void (*rpc_release)(void *); 103 void (*rpc_release)(void *);
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h
index 7acb953298a7..84ff2844df2a 100644
--- a/include/linux/timekeeper_internal.h
+++ b/include/linux/timekeeper_internal.h
@@ -57,6 +57,7 @@ struct tk_read_base {
57 * @cs_was_changed_seq: The sequence number of clocksource change events 57 * @cs_was_changed_seq: The sequence number of clocksource change events
58 * @next_leap_ktime: CLOCK_MONOTONIC time value of a pending leap-second 58 * @next_leap_ktime: CLOCK_MONOTONIC time value of a pending leap-second
59 * @raw_sec: CLOCK_MONOTONIC_RAW time in seconds 59 * @raw_sec: CLOCK_MONOTONIC_RAW time in seconds
60 * @monotonic_to_boot: CLOCK_MONOTONIC to CLOCK_BOOTTIME offset
60 * @cycle_interval: Number of clock cycles in one NTP interval 61 * @cycle_interval: Number of clock cycles in one NTP interval
61 * @xtime_interval: Number of clock shifted nano seconds in one NTP 62 * @xtime_interval: Number of clock shifted nano seconds in one NTP
62 * interval. 63 * interval.
@@ -84,6 +85,9 @@ struct tk_read_base {
84 * 85 *
85 * wall_to_monotonic is no longer the boot time, getboottime must be 86 * wall_to_monotonic is no longer the boot time, getboottime must be
86 * used instead. 87 * used instead.
88 *
89 * @monotonic_to_boottime is a timespec64 representation of @offs_boot to
90 * accelerate the VDSO update for CLOCK_BOOTTIME.
87 */ 91 */
88struct timekeeper { 92struct timekeeper {
89 struct tk_read_base tkr_mono; 93 struct tk_read_base tkr_mono;
@@ -99,6 +103,7 @@ struct timekeeper {
99 u8 cs_was_changed_seq; 103 u8 cs_was_changed_seq;
100 ktime_t next_leap_ktime; 104 ktime_t next_leap_ktime;
101 u64 raw_sec; 105 u64 raw_sec;
106 struct timespec64 monotonic_to_boot;
102 107
103 /* The following members are for timekeeping internal use */ 108 /* The following members are for timekeeping internal use */
104 u64 cycle_interval; 109 u64 cycle_interval;
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 5150436783e8..30a8cdcfd4a4 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -548,6 +548,7 @@ extern int trace_event_get_offsets(struct trace_event_call *call);
548 548
549#define is_signed_type(type) (((type)(-1)) < (type)1) 549#define is_signed_type(type) (((type)(-1)) < (type)1)
550 550
551int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set);
551int trace_set_clr_event(const char *system, const char *event, int set); 552int trace_set_clr_event(const char *system, const char *event, int set);
552 553
553/* 554/*
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 83d35d993e8c..e87826e23d59 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1457,7 +1457,7 @@ typedef void (*usb_complete_t)(struct urb *);
1457 * field rather than determining a dma address themselves. 1457 * field rather than determining a dma address themselves.
1458 * 1458 *
1459 * Note that transfer_buffer must still be set if the controller 1459 * Note that transfer_buffer must still be set if the controller
1460 * does not support DMA (as indicated by bus.uses_dma) and when talking 1460 * does not support DMA (as indicated by hcd_uses_dma()) and when talking
1461 * to root hub. If you have to trasfer between highmem zone and the device 1461 * to root hub. If you have to trasfer between highmem zone and the device
1462 * on such controller, create a bounce buffer or bail out with an error. 1462 * on such controller, create a bounce buffer or bail out with an error.
1463 * If transfer_buffer cannot be set (is in highmem) and the controller is DMA 1463 * If transfer_buffer cannot be set (is in highmem) and the controller is DMA
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index bab27ccc8ff5..a20e7815d814 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -422,6 +422,9 @@ static inline bool hcd_periodic_completion_in_progress(struct usb_hcd *hcd,
422 return hcd->high_prio_bh.completing_ep == ep; 422 return hcd->high_prio_bh.completing_ep == ep;
423} 423}
424 424
425#define hcd_uses_dma(hcd) \
426 (IS_ENABLED(CONFIG_HAS_DMA) && (hcd)->self.uses_dma)
427
425extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); 428extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb);
426extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, 429extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb,
427 int status); 430 int status);
diff --git a/include/linux/wait.h b/include/linux/wait.h
index b6f77cf60dd7..30c515520fb2 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -127,6 +127,19 @@ static inline int waitqueue_active(struct wait_queue_head *wq_head)
127} 127}
128 128
129/** 129/**
130 * wq_has_single_sleeper - check if there is only one sleeper
131 * @wq_head: wait queue head
132 *
133 * Returns true of wq_head has only one sleeper on the list.
134 *
135 * Please refer to the comment for waitqueue_active.
136 */
137static inline bool wq_has_single_sleeper(struct wait_queue_head *wq_head)
138{
139 return list_is_singular(&wq_head->head);
140}
141
142/**
130 * wq_has_sleeper - check if there are any waiting processes 143 * wq_has_sleeper - check if there are any waiting processes
131 * @wq_head: wait queue head 144 * @wq_head: wait queue head
132 * 145 *
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h
index f37d12877754..adcc6a97db61 100644
--- a/include/math-emu/op-common.h
+++ b/include/math-emu/op-common.h
@@ -308,6 +308,7 @@ do { \
308 \ 308 \
309 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \ 309 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \
310 R##_e = X##_e; \ 310 R##_e = X##_e; \
311 /* Fall through */ \
311 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NORMAL): \ 312 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NORMAL): \
312 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_INF): \ 313 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_INF): \
313 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_ZERO): \ 314 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_ZERO): \
@@ -318,6 +319,7 @@ do { \
318 \ 319 \
319 case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NORMAL): \ 320 case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NORMAL): \
320 R##_e = Y##_e; \ 321 R##_e = Y##_e; \
322 /* Fall through */ \
321 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NAN): \ 323 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NAN): \
322 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NAN): \ 324 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NAN): \
323 case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NAN): \ 325 case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NAN): \
@@ -415,6 +417,7 @@ do { \
415 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_INF): \ 417 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_INF): \
416 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_ZERO): \ 418 case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_ZERO): \
417 R##_s = X##_s; \ 419 R##_s = X##_s; \
420 /* Fall through */ \
418 \ 421 \
419 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \ 422 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \
420 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NORMAL): \ 423 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NORMAL): \
@@ -428,6 +431,7 @@ do { \
428 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NAN): \ 431 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NAN): \
429 case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NAN): \ 432 case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NAN): \
430 R##_s = Y##_s; \ 433 R##_s = Y##_s; \
434 /* Fall through */ \
431 \ 435 \
432 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_INF): \ 436 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_INF): \
433 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \ 437 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \
@@ -493,6 +497,7 @@ do { \
493 \ 497 \
494 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \ 498 case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \
495 FP_SET_EXCEPTION(FP_EX_DIVZERO); \ 499 FP_SET_EXCEPTION(FP_EX_DIVZERO); \
500 /* Fall through */ \
496 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_ZERO): \ 501 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_ZERO): \
497 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NORMAL): \ 502 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NORMAL): \
498 R##_c = FP_CLS_INF; \ 503 R##_c = FP_CLS_INF; \
diff --git a/include/misc/charlcd.h b/include/misc/charlcd.h
deleted file mode 100644
index 8cf6c18b0adb..000000000000
--- a/include/misc/charlcd.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Character LCD driver for Linux
4 *
5 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
6 * Copyright (C) 2016-2017 Glider bvba
7 */
8
9struct charlcd {
10 const struct charlcd_ops *ops;
11 const unsigned char *char_conv; /* Optional */
12
13 int ifwidth; /* 4-bit or 8-bit (default) */
14 int height;
15 int width;
16 int bwidth; /* Default set by charlcd_alloc() */
17 int hwidth; /* Default set by charlcd_alloc() */
18
19 void *drvdata; /* Set by charlcd_alloc() */
20};
21
22struct charlcd_ops {
23 /* Required */
24 void (*write_cmd)(struct charlcd *lcd, int cmd);
25 void (*write_data)(struct charlcd *lcd, int data);
26
27 /* Optional */
28 void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */
29 void (*clear_fast)(struct charlcd *lcd);
30 void (*backlight)(struct charlcd *lcd, int on);
31};
32
33struct charlcd *charlcd_alloc(unsigned int drvdata_size);
34void charlcd_free(struct charlcd *lcd);
35
36int charlcd_register(struct charlcd *lcd);
37int charlcd_unregister(struct charlcd *lcd);
38
39void charlcd_poke(struct charlcd *lcd);
diff --git a/include/net/act_api.h b/include/net/act_api.h
index c61a1bf4e3de..3a1a72990fce 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -15,6 +15,7 @@
15struct tcf_idrinfo { 15struct tcf_idrinfo {
16 struct mutex lock; 16 struct mutex lock;
17 struct idr action_idr; 17 struct idr action_idr;
18 struct net *net;
18}; 19};
19 20
20struct tc_action_ops; 21struct tc_action_ops;
@@ -108,7 +109,7 @@ struct tc_action_net {
108}; 109};
109 110
110static inline 111static inline
111int tc_action_net_init(struct tc_action_net *tn, 112int tc_action_net_init(struct net *net, struct tc_action_net *tn,
112 const struct tc_action_ops *ops) 113 const struct tc_action_ops *ops)
113{ 114{
114 int err = 0; 115 int err = 0;
@@ -117,6 +118,7 @@ int tc_action_net_init(struct tc_action_net *tn,
117 if (!tn->idrinfo) 118 if (!tn->idrinfo)
118 return -ENOMEM; 119 return -ENOMEM;
119 tn->ops = ops; 120 tn->ops = ops;
121 tn->idrinfo->net = net;
120 mutex_init(&tn->idrinfo->lock); 122 mutex_init(&tn->idrinfo->lock);
121 idr_init(&tn->idrinfo->action_idr); 123 idr_init(&tn->idrinfo->action_idr);
122 return err; 124 return err;
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index becdad576859..3f62b347b04a 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -206,7 +206,7 @@ static inline int ipv6_mc_may_pull(struct sk_buff *skb,
206 unsigned int len) 206 unsigned int len)
207{ 207{
208 if (skb_transport_offset(skb) + ipv6_transport_len(skb) < len) 208 if (skb_transport_offset(skb) + ipv6_transport_len(skb) < len)
209 return -EINVAL; 209 return 0;
210 210
211 return pskb_may_pull(skb, len); 211 return pskb_may_pull(skb, len);
212} 212}
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index ded574b32c20..ffc95b382eb5 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -278,6 +278,7 @@ struct hci_dev {
278 __u16 conn_info_min_age; 278 __u16 conn_info_min_age;
279 __u16 conn_info_max_age; 279 __u16 conn_info_max_age;
280 __u16 auth_payload_timeout; 280 __u16 auth_payload_timeout;
281 __u8 min_enc_key_size;
281 __u8 ssp_debug_mode; 282 __u8 ssp_debug_mode;
282 __u8 hw_error_code; 283 __u8 hw_error_code;
283 __u32 clock; 284 __u32 clock;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 88c27153a4bc..26e2ad2c7027 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4170,7 +4170,7 @@ struct sta_opmode_info {
4170 u8 rx_nss; 4170 u8 rx_nss;
4171}; 4171};
4172 4172
4173#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA)) 4173#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)(long)(-ENODATA))
4174 4174
4175/** 4175/**
4176 * struct wiphy_vendor_command - vendor command definition 4176 * struct wiphy_vendor_command - vendor command definition
@@ -7320,6 +7320,21 @@ void cfg80211_pmsr_complete(struct wireless_dev *wdev,
7320 struct cfg80211_pmsr_request *req, 7320 struct cfg80211_pmsr_request *req,
7321 gfp_t gfp); 7321 gfp_t gfp);
7322 7322
7323/**
7324 * cfg80211_iftype_allowed - check whether the interface can be allowed
7325 * @wiphy: the wiphy
7326 * @iftype: interface type
7327 * @is_4addr: use_4addr flag, must be '0' when check_swif is '1'
7328 * @check_swif: check iftype against software interfaces
7329 *
7330 * Check whether the interface is allowed to operate; additionally, this API
7331 * can be used to check iftype against the software interfaces when
7332 * check_swif is '1'.
7333 */
7334bool cfg80211_iftype_allowed(struct wiphy *wiphy, enum nl80211_iftype iftype,
7335 bool is_4addr, u8 check_swif);
7336
7337
7323/* Logging, debugging and troubleshooting/diagnostic helpers. */ 7338/* Logging, debugging and troubleshooting/diagnostic helpers. */
7324 7339
7325/* wiphy_printk helpers, similar to dev_printk */ 7340/* wiphy_printk helpers, similar to dev_printk */
diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index db337299e81e..b16d21636d69 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -2,8 +2,8 @@
2#define _NET_FLOW_OFFLOAD_H 2#define _NET_FLOW_OFFLOAD_H
3 3
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <linux/list.h>
5#include <net/flow_dissector.h> 6#include <net/flow_dissector.h>
6#include <net/sch_generic.h>
7 7
8struct flow_match { 8struct flow_match {
9 struct flow_dissector *dissector; 9 struct flow_dissector *dissector;
@@ -249,6 +249,10 @@ enum flow_block_binder_type {
249 FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS, 249 FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS,
250}; 250};
251 251
252struct flow_block {
253 struct list_head cb_list;
254};
255
252struct netlink_ext_ack; 256struct netlink_ext_ack;
253 257
254struct flow_block_offload { 258struct flow_block_offload {
@@ -256,29 +260,33 @@ struct flow_block_offload {
256 enum flow_block_binder_type binder_type; 260 enum flow_block_binder_type binder_type;
257 bool block_shared; 261 bool block_shared;
258 struct net *net; 262 struct net *net;
263 struct flow_block *block;
259 struct list_head cb_list; 264 struct list_head cb_list;
260 struct list_head *driver_block_list; 265 struct list_head *driver_block_list;
261 struct netlink_ext_ack *extack; 266 struct netlink_ext_ack *extack;
262}; 267};
263 268
269enum tc_setup_type;
270typedef int flow_setup_cb_t(enum tc_setup_type type, void *type_data,
271 void *cb_priv);
272
264struct flow_block_cb { 273struct flow_block_cb {
265 struct list_head driver_list; 274 struct list_head driver_list;
266 struct list_head list; 275 struct list_head list;
267 struct net *net; 276 flow_setup_cb_t *cb;
268 tc_setup_cb_t *cb;
269 void *cb_ident; 277 void *cb_ident;
270 void *cb_priv; 278 void *cb_priv;
271 void (*release)(void *cb_priv); 279 void (*release)(void *cb_priv);
272 unsigned int refcnt; 280 unsigned int refcnt;
273}; 281};
274 282
275struct flow_block_cb *flow_block_cb_alloc(struct net *net, tc_setup_cb_t *cb, 283struct flow_block_cb *flow_block_cb_alloc(flow_setup_cb_t *cb,
276 void *cb_ident, void *cb_priv, 284 void *cb_ident, void *cb_priv,
277 void (*release)(void *cb_priv)); 285 void (*release)(void *cb_priv));
278void flow_block_cb_free(struct flow_block_cb *block_cb); 286void flow_block_cb_free(struct flow_block_cb *block_cb);
279 287
280struct flow_block_cb *flow_block_cb_lookup(struct flow_block_offload *offload, 288struct flow_block_cb *flow_block_cb_lookup(struct flow_block *block,
281 tc_setup_cb_t *cb, void *cb_ident); 289 flow_setup_cb_t *cb, void *cb_ident);
282 290
283void *flow_block_cb_priv(struct flow_block_cb *block_cb); 291void *flow_block_cb_priv(struct flow_block_cb *block_cb);
284void flow_block_cb_incref(struct flow_block_cb *block_cb); 292void flow_block_cb_incref(struct flow_block_cb *block_cb);
@@ -296,11 +304,12 @@ static inline void flow_block_cb_remove(struct flow_block_cb *block_cb,
296 list_move(&block_cb->list, &offload->cb_list); 304 list_move(&block_cb->list, &offload->cb_list);
297} 305}
298 306
299bool flow_block_cb_is_busy(tc_setup_cb_t *cb, void *cb_ident, 307bool flow_block_cb_is_busy(flow_setup_cb_t *cb, void *cb_ident,
300 struct list_head *driver_block_list); 308 struct list_head *driver_block_list);
301 309
302int flow_block_cb_setup_simple(struct flow_block_offload *f, 310int flow_block_cb_setup_simple(struct flow_block_offload *f,
303 struct list_head *driver_list, tc_setup_cb_t *cb, 311 struct list_head *driver_list,
312 flow_setup_cb_t *cb,
304 void *cb_ident, void *cb_priv, bool ingress_only); 313 void *cb_ident, void *cb_priv, bool ingress_only);
305 314
306enum flow_cls_command { 315enum flow_cls_command {
@@ -333,4 +342,9 @@ flow_cls_offload_flow_rule(struct flow_cls_offload *flow_cmd)
333 return flow_cmd->rule; 342 return flow_cmd->rule;
334} 343}
335 344
345static inline void flow_block_init(struct flow_block *flow_block)
346{
347 INIT_LIST_HEAD(&flow_block->cb_list);
348}
349
336#endif /* _NET_FLOW_OFFLOAD_H */ 350#endif /* _NET_FLOW_OFFLOAD_H */
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 010f26b31c89..bac79e817776 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -171,7 +171,7 @@ int inet_frag_queue_insert(struct inet_frag_queue *q, struct sk_buff *skb,
171void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb, 171void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb,
172 struct sk_buff *parent); 172 struct sk_buff *parent);
173void inet_frag_reasm_finish(struct inet_frag_queue *q, struct sk_buff *head, 173void inet_frag_reasm_finish(struct inet_frag_queue *q, struct sk_buff *head,
174 void *reasm_data); 174 void *reasm_data, bool try_coalesce);
175struct sk_buff *inet_frag_pull_head(struct inet_frag_queue *q); 175struct sk_buff *inet_frag_pull_head(struct inet_frag_queue *q);
176 176
177#endif 177#endif
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 4a9da951a794..ab40d7afdc54 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -52,7 +52,7 @@ struct bpf_prog;
52#define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS) 52#define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS)
53 53
54struct net { 54struct net {
55 refcount_t passive; /* To decided when the network 55 refcount_t passive; /* To decide when the network
56 * namespace should be freed. 56 * namespace should be freed.
57 */ 57 */
58 refcount_t count; /* To decided when the network 58 refcount_t count; /* To decided when the network
@@ -61,7 +61,6 @@ struct net {
61 spinlock_t rules_mod_lock; 61 spinlock_t rules_mod_lock;
62 62
63 u32 hash_mix; 63 u32 hash_mix;
64 atomic64_t cookie_gen;
65 64
66 struct list_head list; /* list of network namespaces */ 65 struct list_head list; /* list of network namespaces */
67 struct list_head exit_list; /* To linked to call pernet exit 66 struct list_head exit_list; /* To linked to call pernet exit
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h
index 93ce6b0daaba..573429be4d59 100644
--- a/include/net/netfilter/nf_conntrack_expect.h
+++ b/include/net/netfilter/nf_conntrack_expect.h
@@ -76,6 +76,11 @@ struct nf_conntrack_expect_policy {
76#define NF_CT_EXPECT_CLASS_DEFAULT 0 76#define NF_CT_EXPECT_CLASS_DEFAULT 0
77#define NF_CT_EXPECT_MAX_CNT 255 77#define NF_CT_EXPECT_MAX_CNT 255
78 78
79/* Allow to reuse expectations with the same tuples from different master
80 * conntracks.
81 */
82#define NF_CT_EXP_F_SKIP_MASTER 0x1
83
79int nf_conntrack_expect_pernet_init(struct net *net); 84int nf_conntrack_expect_pernet_init(struct net *net);
80void nf_conntrack_expect_pernet_fini(struct net *net); 85void nf_conntrack_expect_pernet_fini(struct net *net);
81 86
@@ -122,10 +127,11 @@ void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t,
122 u_int8_t, const __be16 *, const __be16 *); 127 u_int8_t, const __be16 *, const __be16 *);
123void nf_ct_expect_put(struct nf_conntrack_expect *exp); 128void nf_ct_expect_put(struct nf_conntrack_expect *exp);
124int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, 129int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
125 u32 portid, int report); 130 u32 portid, int report, unsigned int flags);
126static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect) 131static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect,
132 unsigned int flags)
127{ 133{
128 return nf_ct_expect_related_report(expect, 0, 0); 134 return nf_ct_expect_related_report(expect, 0, 0, flags);
129} 135}
130 136
131#endif /*_NF_CONNTRACK_EXPECT_H*/ 137#endif /*_NF_CONNTRACK_EXPECT_H*/
diff --git a/include/net/netfilter/nf_conntrack_synproxy.h b/include/net/netfilter/nf_conntrack_synproxy.h
index 8f00125b06f4..44513b93bd55 100644
--- a/include/net/netfilter/nf_conntrack_synproxy.h
+++ b/include/net/netfilter/nf_conntrack_synproxy.h
@@ -68,6 +68,7 @@ struct synproxy_options {
68 u8 options; 68 u8 options;
69 u8 wscale; 69 u8 wscale;
70 u16 mss; 70 u16 mss;
71 u16 mss_encode;
71 u32 tsval; 72 u32 tsval;
72 u32 tsecr; 73 u32 tsecr;
73}; 74};
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 35dfdd9f69b3..475d6f28ca67 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -11,6 +11,7 @@
11#include <linux/rhashtable.h> 11#include <linux/rhashtable.h>
12#include <net/netfilter/nf_flow_table.h> 12#include <net/netfilter/nf_flow_table.h>
13#include <net/netlink.h> 13#include <net/netlink.h>
14#include <net/flow_offload.h>
14 15
15struct module; 16struct module;
16 17
@@ -420,8 +421,7 @@ struct nft_set {
420 unsigned char *udata; 421 unsigned char *udata;
421 /* runtime data below here */ 422 /* runtime data below here */
422 const struct nft_set_ops *ops ____cacheline_aligned; 423 const struct nft_set_ops *ops ____cacheline_aligned;
423 u16 flags:13, 424 u16 flags:14,
424 bound:1,
425 genmask:2; 425 genmask:2;
426 u8 klen; 426 u8 klen;
427 u8 dlen; 427 u8 dlen;
@@ -951,7 +951,7 @@ struct nft_stats {
951 * @stats: per-cpu chain stats 951 * @stats: per-cpu chain stats
952 * @chain: the chain 952 * @chain: the chain
953 * @dev_name: device name that this base chain is attached to (if any) 953 * @dev_name: device name that this base chain is attached to (if any)
954 * @cb_list: list of flow block callbacks (for hardware offload) 954 * @flow_block: flow block (for hardware offload)
955 */ 955 */
956struct nft_base_chain { 956struct nft_base_chain {
957 struct nf_hook_ops ops; 957 struct nf_hook_ops ops;
@@ -961,7 +961,7 @@ struct nft_base_chain {
961 struct nft_stats __percpu *stats; 961 struct nft_stats __percpu *stats;
962 struct nft_chain chain; 962 struct nft_chain chain;
963 char dev_name[IFNAMSIZ]; 963 char dev_name[IFNAMSIZ];
964 struct list_head cb_list; 964 struct flow_block flow_block;
965}; 965};
966 966
967static inline struct nft_base_chain *nft_base_chain(const struct nft_chain *chain) 967static inline struct nft_base_chain *nft_base_chain(const struct nft_chain *chain)
@@ -1347,12 +1347,15 @@ struct nft_trans_rule {
1347struct nft_trans_set { 1347struct nft_trans_set {
1348 struct nft_set *set; 1348 struct nft_set *set;
1349 u32 set_id; 1349 u32 set_id;
1350 bool bound;
1350}; 1351};
1351 1352
1352#define nft_trans_set(trans) \ 1353#define nft_trans_set(trans) \
1353 (((struct nft_trans_set *)trans->data)->set) 1354 (((struct nft_trans_set *)trans->data)->set)
1354#define nft_trans_set_id(trans) \ 1355#define nft_trans_set_id(trans) \
1355 (((struct nft_trans_set *)trans->data)->set_id) 1356 (((struct nft_trans_set *)trans->data)->set_id)
1357#define nft_trans_set_bound(trans) \
1358 (((struct nft_trans_set *)trans->data)->bound)
1356 1359
1357struct nft_trans_chain { 1360struct nft_trans_chain {
1358 bool update; 1361 bool update;
@@ -1383,12 +1386,15 @@ struct nft_trans_table {
1383struct nft_trans_elem { 1386struct nft_trans_elem {
1384 struct nft_set *set; 1387 struct nft_set *set;
1385 struct nft_set_elem elem; 1388 struct nft_set_elem elem;
1389 bool bound;
1386}; 1390};
1387 1391
1388#define nft_trans_elem_set(trans) \ 1392#define nft_trans_elem_set(trans) \
1389 (((struct nft_trans_elem *)trans->data)->set) 1393 (((struct nft_trans_elem *)trans->data)->set)
1390#define nft_trans_elem(trans) \ 1394#define nft_trans_elem(trans) \
1391 (((struct nft_trans_elem *)trans->data)->elem) 1395 (((struct nft_trans_elem *)trans->data)->elem)
1396#define nft_trans_elem_set_bound(trans) \
1397 (((struct nft_trans_elem *)trans->data)->bound)
1392 1398
1393struct nft_trans_obj { 1399struct nft_trans_obj {
1394 struct nft_object *obj; 1400 struct nft_object *obj;
diff --git a/include/net/netfilter/nf_tables_offload.h b/include/net/netfilter/nf_tables_offload.h
index 3196663a10e3..c8b9dec376f5 100644
--- a/include/net/netfilter/nf_tables_offload.h
+++ b/include/net/netfilter/nf_tables_offload.h
@@ -73,4 +73,6 @@ int nft_flow_rule_offload_commit(struct net *net);
73 (__reg)->key = __key; \ 73 (__reg)->key = __key; \
74 memset(&(__reg)->mask, 0xff, (__reg)->len); 74 memset(&(__reg)->mask, 0xff, (__reg)->len);
75 75
76int nft_chain_offload_priority(struct nft_base_chain *basechain);
77
76#endif 78#endif
diff --git a/include/net/netlink.h b/include/net/netlink.h
index e4650e5b64a1..b140c8f1be22 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -684,9 +684,8 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen,
684 const struct nla_policy *policy, 684 const struct nla_policy *policy,
685 struct netlink_ext_ack *extack) 685 struct netlink_ext_ack *extack)
686{ 686{
687 return __nla_parse(tb, maxtype, nlmsg_attrdata(nlh, hdrlen), 687 return __nlmsg_parse(nlh, hdrlen, tb, maxtype, policy,
688 nlmsg_attrlen(nlh, hdrlen), policy, 688 NL_VALIDATE_STRICT, extack);
689 NL_VALIDATE_STRICT, extack);
690} 689}
691 690
692/** 691/**
diff --git a/include/net/nexthop.h b/include/net/nexthop.h
index 25f1f9a8419b..95f766c31c90 100644
--- a/include/net/nexthop.h
+++ b/include/net/nexthop.h
@@ -141,12 +141,6 @@ static inline unsigned int nexthop_num_path(const struct nexthop *nh)
141 141
142 nh_grp = rcu_dereference_rtnl(nh->nh_grp); 142 nh_grp = rcu_dereference_rtnl(nh->nh_grp);
143 rc = nh_grp->num_nh; 143 rc = nh_grp->num_nh;
144 } else {
145 const struct nh_info *nhi;
146
147 nhi = rcu_dereference_rtnl(nh->nh_info);
148 if (nhi->reject_nh)
149 rc = 0;
150 } 144 }
151 145
152 return rc; 146 return rc;
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 841faadceb6e..98be18ef1ed3 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -6,7 +6,6 @@
6#include <linux/workqueue.h> 6#include <linux/workqueue.h>
7#include <net/sch_generic.h> 7#include <net/sch_generic.h>
8#include <net/act_api.h> 8#include <net/act_api.h>
9#include <net/flow_offload.h>
10#include <net/net_namespace.h> 9#include <net/net_namespace.h>
11 10
12/* TC action not accessible from user space */ 11/* TC action not accessible from user space */
@@ -126,14 +125,14 @@ static inline struct Qdisc *tcf_block_q(struct tcf_block *block)
126} 125}
127 126
128static inline 127static inline
129int tc_setup_cb_block_register(struct tcf_block *block, tc_setup_cb_t *cb, 128int tc_setup_cb_block_register(struct tcf_block *block, flow_setup_cb_t *cb,
130 void *cb_priv) 129 void *cb_priv)
131{ 130{
132 return 0; 131 return 0;
133} 132}
134 133
135static inline 134static inline
136void tc_setup_cb_block_unregister(struct tcf_block *block, tc_setup_cb_t *cb, 135void tc_setup_cb_block_unregister(struct tcf_block *block, flow_setup_cb_t *cb,
137 void *cb_priv) 136 void *cb_priv)
138{ 137{
139} 138}
@@ -647,7 +646,7 @@ tc_cls_common_offload_init(struct flow_cls_common_offload *cls_common,
647{ 646{
648 cls_common->chain_index = tp->chain->index; 647 cls_common->chain_index = tp->chain->index;
649 cls_common->protocol = tp->protocol; 648 cls_common->protocol = tp->protocol;
650 cls_common->prio = tp->prio; 649 cls_common->prio = tp->prio >> 16;
651 if (tc_skip_sw(flags) || flags & TCA_CLS_FLAGS_VERBOSE) 650 if (tc_skip_sw(flags) || flags & TCA_CLS_FLAGS_VERBOSE)
652 cls_common->extack = extack; 651 cls_common->extack = extack;
653} 652}
diff --git a/include/net/psample.h b/include/net/psample.h
index 37a4df2325b2..6b578ce69cd8 100644
--- a/include/net/psample.h
+++ b/include/net/psample.h
@@ -11,6 +11,7 @@ struct psample_group {
11 u32 group_num; 11 u32 group_num;
12 u32 refcount; 12 u32 refcount;
13 u32 seq; 13 u32 seq;
14 struct rcu_head rcu;
14}; 15};
15 16
16struct psample_group *psample_group_get(struct net *net, u32 group_num); 17struct psample_group *psample_group_get(struct net *net, u32 group_num);
diff --git a/include/net/route.h b/include/net/route.h
index 630a0493f1f3..dfce19c9fa96 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -233,7 +233,7 @@ void rt_del_uncached_list(struct rtable *rt);
233 233
234int fib_dump_info_fnhe(struct sk_buff *skb, struct netlink_callback *cb, 234int fib_dump_info_fnhe(struct sk_buff *skb, struct netlink_callback *cb,
235 u32 table_id, struct fib_info *fi, 235 u32 table_id, struct fib_info *fi,
236 int *fa_index, int fa_start); 236 int *fa_index, int fa_start, unsigned int flags);
237 237
238static inline void ip_rt_put(struct rtable *rt) 238static inline void ip_rt_put(struct rtable *rt)
239{ 239{
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 855167bbc372..6b6b01234dd9 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -15,6 +15,7 @@
15#include <linux/mutex.h> 15#include <linux/mutex.h>
16#include <net/gen_stats.h> 16#include <net/gen_stats.h>
17#include <net/rtnetlink.h> 17#include <net/rtnetlink.h>
18#include <net/flow_offload.h>
18 19
19struct Qdisc_ops; 20struct Qdisc_ops;
20struct qdisc_walker; 21struct qdisc_walker;
@@ -22,9 +23,6 @@ struct tcf_walker;
22struct module; 23struct module;
23struct bpf_flow_keys; 24struct bpf_flow_keys;
24 25
25typedef int tc_setup_cb_t(enum tc_setup_type type,
26 void *type_data, void *cb_priv);
27
28typedef int tc_indr_block_bind_cb_t(struct net_device *dev, void *cb_priv, 26typedef int tc_indr_block_bind_cb_t(struct net_device *dev, void *cb_priv,
29 enum tc_setup_type type, void *type_data); 27 enum tc_setup_type type, void *type_data);
30 28
@@ -313,7 +311,7 @@ struct tcf_proto_ops {
313 void (*walk)(struct tcf_proto *tp, 311 void (*walk)(struct tcf_proto *tp,
314 struct tcf_walker *arg, bool rtnl_held); 312 struct tcf_walker *arg, bool rtnl_held);
315 int (*reoffload)(struct tcf_proto *tp, bool add, 313 int (*reoffload)(struct tcf_proto *tp, bool add,
316 tc_setup_cb_t *cb, void *cb_priv, 314 flow_setup_cb_t *cb, void *cb_priv,
317 struct netlink_ext_ack *extack); 315 struct netlink_ext_ack *extack);
318 void (*bind_class)(void *, u32, unsigned long); 316 void (*bind_class)(void *, u32, unsigned long);
319 void * (*tmplt_create)(struct net *net, 317 void * (*tmplt_create)(struct net *net,
@@ -401,7 +399,7 @@ struct tcf_block {
401 refcount_t refcnt; 399 refcount_t refcnt;
402 struct net *net; 400 struct net *net;
403 struct Qdisc *q; 401 struct Qdisc *q;
404 struct list_head cb_list; 402 struct flow_block flow_block;
405 struct list_head owner_list; 403 struct list_head owner_list;
406 bool keep_dst; 404 bool keep_dst;
407 unsigned int offloadcnt; /* Number of oddloaded filters */ 405 unsigned int offloadcnt; /* Number of oddloaded filters */
diff --git a/include/net/sock.h b/include/net/sock.h
index 228db3998e46..2c53f1a1d905 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2482,6 +2482,7 @@ static inline bool sk_fullsock(const struct sock *sk)
2482 2482
2483/* Checks if this SKB belongs to an HW offloaded socket 2483/* Checks if this SKB belongs to an HW offloaded socket
2484 * and whether any SW fallbacks are required based on dev. 2484 * and whether any SW fallbacks are required based on dev.
2485 * Check decrypted mark in case skb_orphan() cleared socket.
2485 */ 2486 */
2486static inline struct sk_buff *sk_validate_xmit_skb(struct sk_buff *skb, 2487static inline struct sk_buff *sk_validate_xmit_skb(struct sk_buff *skb,
2487 struct net_device *dev) 2488 struct net_device *dev)
@@ -2489,8 +2490,15 @@ static inline struct sk_buff *sk_validate_xmit_skb(struct sk_buff *skb,
2489#ifdef CONFIG_SOCK_VALIDATE_XMIT 2490#ifdef CONFIG_SOCK_VALIDATE_XMIT
2490 struct sock *sk = skb->sk; 2491 struct sock *sk = skb->sk;
2491 2492
2492 if (sk && sk_fullsock(sk) && sk->sk_validate_xmit_skb) 2493 if (sk && sk_fullsock(sk) && sk->sk_validate_xmit_skb) {
2493 skb = sk->sk_validate_xmit_skb(sk, dev, skb); 2494 skb = sk->sk_validate_xmit_skb(sk, dev, skb);
2495#ifdef CONFIG_TLS_DEVICE
2496 } else if (unlikely(skb->decrypted)) {
2497 pr_warn_ratelimited("unencrypted skb with no associated socket - dropping\n");
2498 kfree_skb(skb);
2499 skb = NULL;
2500#endif
2501 }
2494#endif 2502#endif
2495 2503
2496 return skb; 2504 return skb;
diff --git a/include/net/tc_act/tc_police.h b/include/net/tc_act/tc_police.h
index 8b9ef3664262..cfdc7cb82cad 100644
--- a/include/net/tc_act/tc_police.h
+++ b/include/net/tc_act/tc_police.h
@@ -54,7 +54,7 @@ static inline u64 tcf_police_rate_bytes_ps(const struct tc_action *act)
54 struct tcf_police *police = to_police(act); 54 struct tcf_police *police = to_police(act);
55 struct tcf_police_params *params; 55 struct tcf_police_params *params;
56 56
57 params = rcu_dereference_bh(police->params); 57 params = rcu_dereference_bh_rtnl(police->params);
58 return params->rate.rate_bytes_ps; 58 return params->rate.rate_bytes_ps;
59} 59}
60 60
@@ -63,7 +63,7 @@ static inline s64 tcf_police_tcfp_burst(const struct tc_action *act)
63 struct tcf_police *police = to_police(act); 63 struct tcf_police *police = to_police(act);
64 struct tcf_police_params *params; 64 struct tcf_police_params *params;
65 65
66 params = rcu_dereference_bh(police->params); 66 params = rcu_dereference_bh_rtnl(police->params);
67 return params->tcfp_burst; 67 return params->tcfp_burst;
68} 68}
69 69
diff --git a/include/net/tc_act/tc_sample.h b/include/net/tc_act/tc_sample.h
index 0a559d4b6f0f..b4fce0fae645 100644
--- a/include/net/tc_act/tc_sample.h
+++ b/include/net/tc_act/tc_sample.h
@@ -44,7 +44,7 @@ static inline int tcf_sample_trunc_size(const struct tc_action *a)
44static inline struct psample_group * 44static inline struct psample_group *
45tcf_sample_psample_group(const struct tc_action *a) 45tcf_sample_psample_group(const struct tc_action *a)
46{ 46{
47 return rcu_dereference(to_sample(a)->psample_group); 47 return rcu_dereference_rtnl(to_sample(a)->psample_group);
48} 48}
49 49
50#endif /* __NET_TC_SAMPLE_H */ 50#endif /* __NET_TC_SAMPLE_H */
diff --git a/include/net/tcp.h b/include/net/tcp.h
index f42d300f0cfa..81e8ade1e6e4 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1709,6 +1709,11 @@ static inline struct sk_buff *tcp_rtx_queue_head(const struct sock *sk)
1709 return skb_rb_first(&sk->tcp_rtx_queue); 1709 return skb_rb_first(&sk->tcp_rtx_queue);
1710} 1710}
1711 1711
1712static inline struct sk_buff *tcp_rtx_queue_tail(const struct sock *sk)
1713{
1714 return skb_rb_last(&sk->tcp_rtx_queue);
1715}
1716
1712static inline struct sk_buff *tcp_write_queue_head(const struct sock *sk) 1717static inline struct sk_buff *tcp_write_queue_head(const struct sock *sk)
1713{ 1718{
1714 return skb_peek(&sk->sk_write_queue); 1719 return skb_peek(&sk->sk_write_queue);
@@ -2103,6 +2108,8 @@ struct tcp_ulp_ops {
2103 2108
2104 /* initialize ulp */ 2109 /* initialize ulp */
2105 int (*init)(struct sock *sk); 2110 int (*init)(struct sock *sk);
2111 /* update ulp */
2112 void (*update)(struct sock *sk, struct proto *p);
2106 /* cleanup ulp */ 2113 /* cleanup ulp */
2107 void (*release)(struct sock *sk); 2114 void (*release)(struct sock *sk);
2108 2115
@@ -2114,6 +2121,7 @@ void tcp_unregister_ulp(struct tcp_ulp_ops *type);
2114int tcp_set_ulp(struct sock *sk, const char *name); 2121int tcp_set_ulp(struct sock *sk, const char *name);
2115void tcp_get_available_ulp(char *buf, size_t len); 2122void tcp_get_available_ulp(char *buf, size_t len);
2116void tcp_cleanup_ulp(struct sock *sk); 2123void tcp_cleanup_ulp(struct sock *sk);
2124void tcp_update_ulp(struct sock *sk, struct proto *p);
2117 2125
2118#define MODULE_ALIAS_TCP_ULP(name) \ 2126#define MODULE_ALIAS_TCP_ULP(name) \
2119 __MODULE_INFO(alias, alias_userspace, name); \ 2127 __MODULE_INFO(alias, alias_userspace, name); \
diff --git a/include/net/tls.h b/include/net/tls.h
index 584609174fe0..41b2d41bb1b8 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -107,9 +107,7 @@ struct tls_device {
107enum { 107enum {
108 TLS_BASE, 108 TLS_BASE,
109 TLS_SW, 109 TLS_SW,
110#ifdef CONFIG_TLS_DEVICE
111 TLS_HW, 110 TLS_HW,
112#endif
113 TLS_HW_RECORD, 111 TLS_HW_RECORD,
114 TLS_NUM_CONFIG, 112 TLS_NUM_CONFIG,
115}; 113};
@@ -162,6 +160,7 @@ struct tls_sw_context_tx {
162 int async_capable; 160 int async_capable;
163 161
164#define BIT_TX_SCHEDULED 0 162#define BIT_TX_SCHEDULED 0
163#define BIT_TX_CLOSING 1
165 unsigned long tx_bitmask; 164 unsigned long tx_bitmask;
166}; 165};
167 166
@@ -272,6 +271,8 @@ struct tls_context {
272 unsigned long flags; 271 unsigned long flags;
273 272
274 /* cache cold stuff */ 273 /* cache cold stuff */
274 struct proto *sk_proto;
275
275 void (*sk_destruct)(struct sock *sk); 276 void (*sk_destruct)(struct sock *sk);
276 void (*sk_proto_close)(struct sock *sk, long timeout); 277 void (*sk_proto_close)(struct sock *sk, long timeout);
277 278
@@ -355,13 +356,17 @@ int tls_sk_attach(struct sock *sk, int optname, char __user *optval,
355 unsigned int optlen); 356 unsigned int optlen);
356 357
357int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx); 358int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx);
359void tls_sw_strparser_arm(struct sock *sk, struct tls_context *ctx);
360void tls_sw_strparser_done(struct tls_context *tls_ctx);
358int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size); 361int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
359int tls_sw_sendpage(struct sock *sk, struct page *page, 362int tls_sw_sendpage(struct sock *sk, struct page *page,
360 int offset, size_t size, int flags); 363 int offset, size_t size, int flags);
361void tls_sw_close(struct sock *sk, long timeout); 364void tls_sw_cancel_work_tx(struct tls_context *tls_ctx);
362void tls_sw_free_resources_tx(struct sock *sk); 365void tls_sw_release_resources_tx(struct sock *sk);
366void tls_sw_free_ctx_tx(struct tls_context *tls_ctx);
363void tls_sw_free_resources_rx(struct sock *sk); 367void tls_sw_free_resources_rx(struct sock *sk);
364void tls_sw_release_resources_rx(struct sock *sk); 368void tls_sw_release_resources_rx(struct sock *sk);
369void tls_sw_free_ctx_rx(struct tls_context *tls_ctx);
365int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, 370int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
366 int nonblock, int flags, int *addr_len); 371 int nonblock, int flags, int *addr_len);
367bool tls_sw_stream_read(const struct sock *sk); 372bool tls_sw_stream_read(const struct sock *sk);
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index c5f8a9f17063..4f225175cb91 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2647,7 +2647,9 @@ struct ib_client {
2647 const union ib_gid *gid, 2647 const union ib_gid *gid,
2648 const struct sockaddr *addr, 2648 const struct sockaddr *addr,
2649 void *client_data); 2649 void *client_data);
2650 struct list_head list; 2650
2651 refcount_t uses;
2652 struct completion uses_zero;
2651 u32 client_id; 2653 u32 client_id;
2652 2654
2653 /* kverbs are not required by the client */ 2655 /* kverbs are not required by the client */
diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h
index 0eeea520a853..e06c77d76463 100644
--- a/include/rdma/rdmavt_qp.h
+++ b/include/rdma/rdmavt_qp.h
@@ -608,7 +608,7 @@ static inline void rvt_qp_wqe_reserve(
608/** 608/**
609 * rvt_qp_wqe_unreserve - clean reserved operation 609 * rvt_qp_wqe_unreserve - clean reserved operation
610 * @qp - the rvt qp 610 * @qp - the rvt qp
611 * @wqe - the send wqe 611 * @flags - send wqe flags
612 * 612 *
613 * This decrements the reserve use count. 613 * This decrements the reserve use count.
614 * 614 *
@@ -620,11 +620,9 @@ static inline void rvt_qp_wqe_reserve(
620 * the compiler does not juggle the order of the s_last 620 * the compiler does not juggle the order of the s_last
621 * ring index and the decrementing of s_reserved_used. 621 * ring index and the decrementing of s_reserved_used.
622 */ 622 */
623static inline void rvt_qp_wqe_unreserve( 623static inline void rvt_qp_wqe_unreserve(struct rvt_qp *qp, int flags)
624 struct rvt_qp *qp,
625 struct rvt_swqe *wqe)
626{ 624{
627 if (unlikely(wqe->wr.send_flags & RVT_SEND_RESERVE_USED)) { 625 if (unlikely(flags & RVT_SEND_RESERVE_USED)) {
628 atomic_dec(&qp->s_reserved_used); 626 atomic_dec(&qp->s_reserved_used);
629 /* insure no compiler re-order up to s_last change */ 627 /* insure no compiler re-order up to s_last change */
630 smp_mb__after_atomic(); 628 smp_mb__after_atomic();
@@ -853,6 +851,7 @@ rvt_qp_complete_swqe(struct rvt_qp *qp,
853 u32 byte_len, last; 851 u32 byte_len, last;
854 int flags = wqe->wr.send_flags; 852 int flags = wqe->wr.send_flags;
855 853
854 rvt_qp_wqe_unreserve(qp, flags);
856 rvt_put_qp_swqe(qp, wqe); 855 rvt_put_qp_swqe(qp, wqe);
857 856
858 need_completion = 857 need_completion =
diff --git a/include/rdma/restrack.h b/include/rdma/restrack.h
index b0fc6b26bdf5..83df1ec6664e 100644
--- a/include/rdma/restrack.h
+++ b/include/rdma/restrack.h
@@ -105,8 +105,7 @@ struct rdma_restrack_entry {
105}; 105};
106 106
107int rdma_restrack_count(struct ib_device *dev, 107int rdma_restrack_count(struct ib_device *dev,
108 enum rdma_restrack_type type, 108 enum rdma_restrack_type type);
109 struct pid_namespace *ns);
110 109
111void rdma_restrack_kadd(struct rdma_restrack_entry *res); 110void rdma_restrack_kadd(struct rdma_restrack_entry *res);
112void rdma_restrack_uadd(struct rdma_restrack_entry *res); 111void rdma_restrack_uadd(struct rdma_restrack_entry *res);
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 2d64b53f947c..9b87e1a1c646 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -115,7 +115,7 @@ struct fc_disc_port {
115 struct fc_lport *lp; 115 struct fc_lport *lp;
116 struct list_head peers; 116 struct list_head peers;
117 struct work_struct rport_work; 117 struct work_struct rport_work;
118 u32 port_id; 118 u32 port_id;
119}; 119};
120 120
121/** 121/**
@@ -155,14 +155,14 @@ struct fc_rport_operations {
155 */ 155 */
156struct fc_rport_libfc_priv { 156struct fc_rport_libfc_priv {
157 struct fc_lport *local_port; 157 struct fc_lport *local_port;
158 enum fc_rport_state rp_state; 158 enum fc_rport_state rp_state;
159 u16 flags; 159 u16 flags;
160 #define FC_RP_FLAGS_REC_SUPPORTED (1 << 0) 160 #define FC_RP_FLAGS_REC_SUPPORTED (1 << 0)
161 #define FC_RP_FLAGS_RETRY (1 << 1) 161 #define FC_RP_FLAGS_RETRY (1 << 1)
162 #define FC_RP_STARTED (1 << 2) 162 #define FC_RP_STARTED (1 << 2)
163 #define FC_RP_FLAGS_CONF_REQ (1 << 3) 163 #define FC_RP_FLAGS_CONF_REQ (1 << 3)
164 unsigned int e_d_tov; 164 unsigned int e_d_tov;
165 unsigned int r_a_tov; 165 unsigned int r_a_tov;
166}; 166};
167 167
168/** 168/**
@@ -191,24 +191,24 @@ struct fc_rport_priv {
191 struct fc_lport *local_port; 191 struct fc_lport *local_port;
192 struct fc_rport *rport; 192 struct fc_rport *rport;
193 struct kref kref; 193 struct kref kref;
194 enum fc_rport_state rp_state; 194 enum fc_rport_state rp_state;
195 struct fc_rport_identifiers ids; 195 struct fc_rport_identifiers ids;
196 u16 flags; 196 u16 flags;
197 u16 max_seq; 197 u16 max_seq;
198 u16 disc_id; 198 u16 disc_id;
199 u16 maxframe_size; 199 u16 maxframe_size;
200 unsigned int retries; 200 unsigned int retries;
201 unsigned int major_retries; 201 unsigned int major_retries;
202 unsigned int e_d_tov; 202 unsigned int e_d_tov;
203 unsigned int r_a_tov; 203 unsigned int r_a_tov;
204 struct mutex rp_mutex; 204 struct mutex rp_mutex;
205 struct delayed_work retry_work; 205 struct delayed_work retry_work;
206 enum fc_rport_event event; 206 enum fc_rport_event event;
207 struct fc_rport_operations *ops; 207 struct fc_rport_operations *ops;
208 struct list_head peers; 208 struct list_head peers;
209 struct work_struct event_work; 209 struct work_struct event_work;
210 u32 supported_classes; 210 u32 supported_classes;
211 u16 prli_count; 211 u16 prli_count;
212 struct rcu_head rcu; 212 struct rcu_head rcu;
213 u16 sp_features; 213 u16 sp_features;
214 u8 spp_type; 214 u8 spp_type;
@@ -618,12 +618,12 @@ struct libfc_function_template {
618 * @disc_callback: Callback routine called when discovery completes 618 * @disc_callback: Callback routine called when discovery completes
619 */ 619 */
620struct fc_disc { 620struct fc_disc {
621 unsigned char retry_count; 621 unsigned char retry_count;
622 unsigned char pending; 622 unsigned char pending;
623 unsigned char requested; 623 unsigned char requested;
624 unsigned short seq_count; 624 unsigned short seq_count;
625 unsigned char buf_len; 625 unsigned char buf_len;
626 u16 disc_id; 626 u16 disc_id;
627 627
628 struct list_head rports; 628 struct list_head rports;
629 void *priv; 629 void *priv;
@@ -697,7 +697,7 @@ struct fc_lport {
697 struct fc_rport_priv *ms_rdata; 697 struct fc_rport_priv *ms_rdata;
698 struct fc_rport_priv *ptp_rdata; 698 struct fc_rport_priv *ptp_rdata;
699 void *scsi_priv; 699 void *scsi_priv;
700 struct fc_disc disc; 700 struct fc_disc disc;
701 701
702 /* Virtual port information */ 702 /* Virtual port information */
703 struct list_head vports; 703 struct list_head vports;
@@ -715,7 +715,7 @@ struct fc_lport {
715 u8 retry_count; 715 u8 retry_count;
716 716
717 /* Fabric information */ 717 /* Fabric information */
718 u32 port_id; 718 u32 port_id;
719 u64 wwpn; 719 u64 wwpn;
720 u64 wwnn; 720 u64 wwnn;
721 unsigned int service_params; 721 unsigned int service_params;
@@ -743,11 +743,11 @@ struct fc_lport {
743 struct fc_ns_fts fcts; 743 struct fc_ns_fts fcts;
744 744
745 /* Miscellaneous */ 745 /* Miscellaneous */
746 struct mutex lp_mutex; 746 struct mutex lp_mutex;
747 struct list_head list; 747 struct list_head list;
748 struct delayed_work retry_work; 748 struct delayed_work retry_work;
749 void *prov[FC_FC4_PROV_SIZE]; 749 void *prov[FC_FC4_PROV_SIZE];
750 struct list_head lport_list; 750 struct list_head lport_list;
751}; 751};
752 752
753/** 753/**
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index c50fb297e265..2568cb0627ec 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -31,7 +31,7 @@
31 * FIP tunable parameters. 31 * FIP tunable parameters.
32 */ 32 */
33#define FCOE_CTLR_START_DELAY 2000 /* mS after first adv. to choose FCF */ 33#define FCOE_CTLR_START_DELAY 2000 /* mS after first adv. to choose FCF */
34#define FCOE_CTRL_SOL_TOV 2000 /* min. solicitation interval (mS) */ 34#define FCOE_CTLR_SOL_TOV 2000 /* min. solicitation interval (mS) */
35#define FCOE_CTLR_FCF_LIMIT 20 /* max. number of FCF entries */ 35#define FCOE_CTLR_FCF_LIMIT 20 /* max. number of FCF entries */
36#define FCOE_CTLR_VN2VN_LOGIN_LIMIT 3 /* max. VN2VN rport login retries */ 36#define FCOE_CTLR_VN2VN_LOGIN_LIMIT 3 /* max. VN2VN rport login retries */
37 37
@@ -229,6 +229,7 @@ struct fcoe_fcf {
229 * @vn_mac: VN_Node assigned MAC address for data 229 * @vn_mac: VN_Node assigned MAC address for data
230 */ 230 */
231struct fcoe_rport { 231struct fcoe_rport {
232 struct fc_rport_priv rdata;
232 unsigned long time; 233 unsigned long time;
233 u16 fcoe_len; 234 u16 fcoe_len;
234 u16 flags; 235 u16 flags;
diff --git a/include/soc/arc/mcip.h b/include/soc/arc/mcip.h
index 50f49e043668..d1a93c73f006 100644
--- a/include/soc/arc/mcip.h
+++ b/include/soc/arc/mcip.h
@@ -46,7 +46,9 @@ struct mcip_cmd {
46#define CMD_IDU_ENABLE 0x71 46#define CMD_IDU_ENABLE 0x71
47#define CMD_IDU_DISABLE 0x72 47#define CMD_IDU_DISABLE 0x72
48#define CMD_IDU_SET_MODE 0x74 48#define CMD_IDU_SET_MODE 0x74
49#define CMD_IDU_READ_MODE 0x75
49#define CMD_IDU_SET_DEST 0x76 50#define CMD_IDU_SET_DEST 0x76
51#define CMD_IDU_ACK_CIRQ 0x79
50#define CMD_IDU_SET_MASK 0x7C 52#define CMD_IDU_SET_MASK 0x7C
51 53
52#define IDU_M_TRIG_LEVEL 0x0 54#define IDU_M_TRIG_LEVEL 0x0
@@ -119,4 +121,13 @@ static inline void __mcip_cmd_data(unsigned int cmd, unsigned int param,
119 __mcip_cmd(cmd, param); 121 __mcip_cmd(cmd, param);
120} 122}
121 123
124/*
125 * Read MCIP register
126 */
127static inline unsigned int __mcip_cmd_read(unsigned int cmd, unsigned int param)
128{
129 __mcip_cmd(cmd, param);
130 return read_aux_reg(ARC_REG_MCIP_READBACK);
131}
132
122#endif 133#endif
diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h
index 3f9d6b6a5691..c1036d16ed03 100644
--- a/include/soc/fsl/qe/qe.h
+++ b/include/soc/fsl/qe/qe.h
@@ -259,7 +259,7 @@ static inline int qe_alive_during_sleep(void)
259 259
260/* Structure that defines QE firmware binary files. 260/* Structure that defines QE firmware binary files.
261 * 261 *
262 * See Documentation/powerpc/qe_firmware.txt for a description of these 262 * See Documentation/powerpc/qe_firmware.rst for a description of these
263 * fields. 263 * fields.
264 */ 264 */
265struct qe_firmware { 265struct qe_firmware {
diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h
index 7fea496f1f34..83b17682e01c 100644
--- a/include/sound/hdmi-codec.h
+++ b/include/sound/hdmi-codec.h
@@ -47,6 +47,9 @@ struct hdmi_codec_params {
47 int channels; 47 int channels;
48}; 48};
49 49
50typedef void (*hdmi_codec_plugged_cb)(struct device *dev,
51 bool plugged);
52
50struct hdmi_codec_pdata; 53struct hdmi_codec_pdata;
51struct hdmi_codec_ops { 54struct hdmi_codec_ops {
52 /* 55 /*
@@ -88,6 +91,14 @@ struct hdmi_codec_ops {
88 */ 91 */
89 int (*get_dai_id)(struct snd_soc_component *comment, 92 int (*get_dai_id)(struct snd_soc_component *comment,
90 struct device_node *endpoint); 93 struct device_node *endpoint);
94
95 /*
96 * Hook callback function to handle connector plug event.
97 * Optional
98 */
99 int (*hook_plugged_cb)(struct device *dev, void *data,
100 hdmi_codec_plugged_cb fn,
101 struct device *codec_dev);
91}; 102};
92 103
93/* HDMI codec initalization data */ 104/* HDMI codec initalization data */
@@ -99,6 +110,12 @@ struct hdmi_codec_pdata {
99 void *data; 110 void *data;
100}; 111};
101 112
113struct snd_soc_component;
114struct snd_soc_jack;
115
116int hdmi_codec_set_jack_detect(struct snd_soc_component *component,
117 struct snd_soc_jack *jack);
118
102#define HDMI_CODEC_DRV_NAME "hdmi-audio-codec" 119#define HDMI_CODEC_DRV_NAME "hdmi-audio-codec"
103 120
104#endif /* __HDMI_CODEC_H__ */ 121#endif /* __HDMI_CODEC_H__ */
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 1e9bb1c91770..bbe6eb1ff5d2 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -117,6 +117,8 @@ struct snd_pcm_ops {
117#define SNDRV_PCM_RATE_96000 (1<<10) /* 96000Hz */ 117#define SNDRV_PCM_RATE_96000 (1<<10) /* 96000Hz */
118#define SNDRV_PCM_RATE_176400 (1<<11) /* 176400Hz */ 118#define SNDRV_PCM_RATE_176400 (1<<11) /* 176400Hz */
119#define SNDRV_PCM_RATE_192000 (1<<12) /* 192000Hz */ 119#define SNDRV_PCM_RATE_192000 (1<<12) /* 192000Hz */
120#define SNDRV_PCM_RATE_352800 (1<<13) /* 352800Hz */
121#define SNDRV_PCM_RATE_384000 (1<<14) /* 384000Hz */
120 122
121#define SNDRV_PCM_RATE_CONTINUOUS (1<<30) /* continuous range */ 123#define SNDRV_PCM_RATE_CONTINUOUS (1<<30) /* continuous range */
122#define SNDRV_PCM_RATE_KNOT (1<<31) /* supports more non-continuos rates */ 124#define SNDRV_PCM_RATE_KNOT (1<<31) /* supports more non-continuos rates */
@@ -129,6 +131,9 @@ struct snd_pcm_ops {
129 SNDRV_PCM_RATE_88200|SNDRV_PCM_RATE_96000) 131 SNDRV_PCM_RATE_88200|SNDRV_PCM_RATE_96000)
130#define SNDRV_PCM_RATE_8000_192000 (SNDRV_PCM_RATE_8000_96000|SNDRV_PCM_RATE_176400|\ 132#define SNDRV_PCM_RATE_8000_192000 (SNDRV_PCM_RATE_8000_96000|SNDRV_PCM_RATE_176400|\
131 SNDRV_PCM_RATE_192000) 133 SNDRV_PCM_RATE_192000)
134#define SNDRV_PCM_RATE_8000_384000 (SNDRV_PCM_RATE_8000_192000|\
135 SNDRV_PCM_RATE_352800|\
136 SNDRV_PCM_RATE_384000)
132#define _SNDRV_PCM_FMTBIT(fmt) (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt) 137#define _SNDRV_PCM_FMTBIT(fmt) (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt)
133#define SNDRV_PCM_FMTBIT_S8 _SNDRV_PCM_FMTBIT(S8) 138#define SNDRV_PCM_FMTBIT_S8 _SNDRV_PCM_FMTBIT(S8)
134#define SNDRV_PCM_FMTBIT_U8 _SNDRV_PCM_FMTBIT(U8) 139#define SNDRV_PCM_FMTBIT_U8 _SNDRV_PCM_FMTBIT(U8)
diff --git a/include/sound/soc-acpi-intel-match.h b/include/sound/soc-acpi-intel-match.h
index bb5e1e4ce8bf..6c9929abd90b 100644
--- a/include/sound/soc-acpi-intel-match.h
+++ b/include/sound/soc-acpi-intel-match.h
@@ -25,6 +25,8 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[];
25extern struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[]; 25extern struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[];
26extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[]; 26extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[];
27extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[]; 27extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[];
28extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[];
29extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ehl_machines[];
28 30
29/* 31/*
30 * generic table used for HDA codec-based platforms, possibly with 32 * generic table used for HDA codec-based platforms, possibly with
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
new file mode 100644
index 000000000000..5d80b2eef525
--- /dev/null
+++ b/include/sound/soc-component.h
@@ -0,0 +1,387 @@
1/* SPDX-License-Identifier: GPL-2.0
2 *
3 * soc-component.h
4 *
5 * Copyright (c) 2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef __SOC_COMPONENT_H
12#define __SOC_COMPONENT_H
13
14#include <sound/soc.h>
15
16/*
17 * Component probe and remove ordering levels for components with runtime
18 * dependencies.
19 */
20#define SND_SOC_COMP_ORDER_FIRST -2
21#define SND_SOC_COMP_ORDER_EARLY -1
22#define SND_SOC_COMP_ORDER_NORMAL 0
23#define SND_SOC_COMP_ORDER_LATE 1
24#define SND_SOC_COMP_ORDER_LAST 2
25
26#define for_each_comp_order(order) \
27 for (order = SND_SOC_COMP_ORDER_FIRST; \
28 order <= SND_SOC_COMP_ORDER_LAST; \
29 order++)
30
31/* component interface */
32struct snd_soc_component_driver {
33 const char *name;
34
35 /* Default control and setup, added after probe() is run */
36 const struct snd_kcontrol_new *controls;
37 unsigned int num_controls;
38 const struct snd_soc_dapm_widget *dapm_widgets;
39 unsigned int num_dapm_widgets;
40 const struct snd_soc_dapm_route *dapm_routes;
41 unsigned int num_dapm_routes;
42
43 int (*probe)(struct snd_soc_component *component);
44 void (*remove)(struct snd_soc_component *component);
45 int (*suspend)(struct snd_soc_component *component);
46 int (*resume)(struct snd_soc_component *component);
47
48 unsigned int (*read)(struct snd_soc_component *component,
49 unsigned int reg);
50 int (*write)(struct snd_soc_component *component,
51 unsigned int reg, unsigned int val);
52
53 /* pcm creation and destruction */
54 int (*pcm_new)(struct snd_soc_pcm_runtime *rtd);
55 void (*pcm_free)(struct snd_pcm *pcm);
56
57 /* component wide operations */
58 int (*set_sysclk)(struct snd_soc_component *component,
59 int clk_id, int source, unsigned int freq, int dir);
60 int (*set_pll)(struct snd_soc_component *component, int pll_id,
61 int source, unsigned int freq_in, unsigned int freq_out);
62 int (*set_jack)(struct snd_soc_component *component,
63 struct snd_soc_jack *jack, void *data);
64
65 /* DT */
66 int (*of_xlate_dai_name)(struct snd_soc_component *component,
67 struct of_phandle_args *args,
68 const char **dai_name);
69 int (*of_xlate_dai_id)(struct snd_soc_component *comment,
70 struct device_node *endpoint);
71 void (*seq_notifier)(struct snd_soc_component *component,
72 enum snd_soc_dapm_type type, int subseq);
73 int (*stream_event)(struct snd_soc_component *component, int event);
74 int (*set_bias_level)(struct snd_soc_component *component,
75 enum snd_soc_bias_level level);
76
77 const struct snd_pcm_ops *ops;
78 const struct snd_compr_ops *compr_ops;
79
80 /* probe ordering - for components with runtime dependencies */
81 int probe_order;
82 int remove_order;
83
84 /*
85 * signal if the module handling the component should not be removed
86 * if a pcm is open. Setting this would prevent the module
87 * refcount being incremented in probe() but allow it be incremented
88 * when a pcm is opened and decremented when it is closed.
89 */
90 unsigned int module_get_upon_open:1;
91
92 /* bits */
93 unsigned int idle_bias_on:1;
94 unsigned int suspend_bias_off:1;
95 unsigned int use_pmdown_time:1; /* care pmdown_time at stop */
96 unsigned int endianness:1;
97 unsigned int non_legacy_dai_naming:1;
98
99 /* this component uses topology and ignore machine driver FEs */
100 const char *ignore_machine;
101 const char *topology_name_prefix;
102 int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
103 struct snd_pcm_hw_params *params);
104 bool use_dai_pcm_id; /* use DAI link PCM ID as PCM device number */
105 int be_pcm_base; /* base device ID for all BE PCMs */
106};
107
108struct snd_soc_component {
109 const char *name;
110 int id;
111 const char *name_prefix;
112 struct device *dev;
113 struct snd_soc_card *card;
114
115 unsigned int active;
116
117 unsigned int suspended:1; /* is in suspend PM state */
118
119 struct list_head list;
120 struct list_head card_aux_list; /* for auxiliary bound components */
121 struct list_head card_list;
122
123 const struct snd_soc_component_driver *driver;
124
125 struct list_head dai_list;
126 int num_dai;
127
128 struct regmap *regmap;
129 int val_bytes;
130
131 struct mutex io_mutex;
132
133 /* attached dynamic objects */
134 struct list_head dobj_list;
135
136 /*
137 * DO NOT use any of the fields below in drivers, they are temporary and
138 * are going to be removed again soon. If you use them in driver code
139 * the driver will be marked as BROKEN when these fields are removed.
140 */
141
142 /* Don't use these, use snd_soc_component_get_dapm() */
143 struct snd_soc_dapm_context dapm;
144
145 /* machine specific init */
146 int (*init)(struct snd_soc_component *component);
147
148#ifdef CONFIG_DEBUG_FS
149 struct dentry *debugfs_root;
150 const char *debugfs_prefix;
151#endif
152};
153
154#define for_each_component_dais(component, dai)\
155 list_for_each_entry(dai, &(component)->dai_list, list)
156#define for_each_component_dais_safe(component, dai, _dai)\
157 list_for_each_entry_safe(dai, _dai, &(component)->dai_list, list)
158
159/**
160 * snd_soc_dapm_to_component() - Casts a DAPM context to the component it is
161 * embedded in
162 * @dapm: The DAPM context to cast to the component
163 *
164 * This function must only be used on DAPM contexts that are known to be part of
165 * a component (e.g. in a component driver). Otherwise the behavior is
166 * undefined.
167 */
168static inline struct snd_soc_component *snd_soc_dapm_to_component(
169 struct snd_soc_dapm_context *dapm)
170{
171 return container_of(dapm, struct snd_soc_component, dapm);
172}
173
174/**
175 * snd_soc_component_get_dapm() - Returns the DAPM context associated with a
176 * component
177 * @component: The component for which to get the DAPM context
178 */
179static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
180 struct snd_soc_component *component)
181{
182 return &component->dapm;
183}
184
185/**
186 * snd_soc_component_init_bias_level() - Initialize COMPONENT DAPM bias level
187 * @component: The COMPONENT for which to initialize the DAPM bias level
188 * @level: The DAPM level to initialize to
189 *
190 * Initializes the COMPONENT DAPM bias level. See snd_soc_dapm_init_bias_level()
191 */
192static inline void
193snd_soc_component_init_bias_level(struct snd_soc_component *component,
194 enum snd_soc_bias_level level)
195{
196 snd_soc_dapm_init_bias_level(
197 snd_soc_component_get_dapm(component), level);
198}
199
200/**
201 * snd_soc_component_get_bias_level() - Get current COMPONENT DAPM bias level
202 * @component: The COMPONENT for which to get the DAPM bias level
203 *
204 * Returns: The current DAPM bias level of the COMPONENT.
205 */
206static inline enum snd_soc_bias_level
207snd_soc_component_get_bias_level(struct snd_soc_component *component)
208{
209 return snd_soc_dapm_get_bias_level(
210 snd_soc_component_get_dapm(component));
211}
212
213/**
214 * snd_soc_component_force_bias_level() - Set the COMPONENT DAPM bias level
215 * @component: The COMPONENT for which to set the level
216 * @level: The level to set to
217 *
218 * Forces the COMPONENT bias level to a specific state. See
219 * snd_soc_dapm_force_bias_level().
220 */
221static inline int
222snd_soc_component_force_bias_level(struct snd_soc_component *component,
223 enum snd_soc_bias_level level)
224{
225 return snd_soc_dapm_force_bias_level(
226 snd_soc_component_get_dapm(component),
227 level);
228}
229
230/**
231 * snd_soc_dapm_kcontrol_component() - Returns the component associated to a
232 * kcontrol
233 * @kcontrol: The kcontrol
234 *
235 * This function must only be used on DAPM contexts that are known to be part of
236 * a COMPONENT (e.g. in a COMPONENT driver). Otherwise the behavior is undefined
237 */
238static inline struct snd_soc_component *snd_soc_dapm_kcontrol_component(
239 struct snd_kcontrol *kcontrol)
240{
241 return snd_soc_dapm_to_component(snd_soc_dapm_kcontrol_dapm(kcontrol));
242}
243
244/**
245 * snd_soc_component_cache_sync() - Sync the register cache with the hardware
246 * @component: COMPONENT to sync
247 *
248 * Note: This function will call regcache_sync()
249 */
250static inline int snd_soc_component_cache_sync(
251 struct snd_soc_component *component)
252{
253 return regcache_sync(component->regmap);
254}
255
256/* component IO */
257int snd_soc_component_read(struct snd_soc_component *component,
258 unsigned int reg, unsigned int *val);
259unsigned int snd_soc_component_read32(struct snd_soc_component *component,
260 unsigned int reg);
261int snd_soc_component_write(struct snd_soc_component *component,
262 unsigned int reg, unsigned int val);
263int snd_soc_component_update_bits(struct snd_soc_component *component,
264 unsigned int reg, unsigned int mask,
265 unsigned int val);
266int snd_soc_component_update_bits_async(struct snd_soc_component *component,
267 unsigned int reg, unsigned int mask,
268 unsigned int val);
269void snd_soc_component_async_complete(struct snd_soc_component *component);
270int snd_soc_component_test_bits(struct snd_soc_component *component,
271 unsigned int reg, unsigned int mask,
272 unsigned int value);
273
274/* component wide operations */
275int snd_soc_component_set_sysclk(struct snd_soc_component *component,
276 int clk_id, int source,
277 unsigned int freq, int dir);
278int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
279 int source, unsigned int freq_in,
280 unsigned int freq_out);
281int snd_soc_component_set_jack(struct snd_soc_component *component,
282 struct snd_soc_jack *jack, void *data);
283
284void snd_soc_component_seq_notifier(struct snd_soc_component *component,
285 enum snd_soc_dapm_type type, int subseq);
286int snd_soc_component_stream_event(struct snd_soc_component *component,
287 int event);
288int snd_soc_component_set_bias_level(struct snd_soc_component *component,
289 enum snd_soc_bias_level level);
290
291#ifdef CONFIG_REGMAP
292void snd_soc_component_init_regmap(struct snd_soc_component *component,
293 struct regmap *regmap);
294void snd_soc_component_exit_regmap(struct snd_soc_component *component);
295#endif
296
297#define snd_soc_component_module_get_when_probe(component)\
298 snd_soc_component_module_get(component, 0)
299#define snd_soc_component_module_get_when_open(component) \
300 snd_soc_component_module_get(component, 1)
301int snd_soc_component_module_get(struct snd_soc_component *component,
302 int upon_open);
303#define snd_soc_component_module_put_when_remove(component) \
304 snd_soc_component_module_put(component, 0)
305#define snd_soc_component_module_put_when_close(component) \
306 snd_soc_component_module_put(component, 1)
307void snd_soc_component_module_put(struct snd_soc_component *component,
308 int upon_open);
309
310static inline void snd_soc_component_set_drvdata(struct snd_soc_component *c,
311 void *data)
312{
313 dev_set_drvdata(c->dev, data);
314}
315
316static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c)
317{
318 return dev_get_drvdata(c->dev);
319}
320
321static inline bool snd_soc_component_is_active(
322 struct snd_soc_component *component)
323{
324 return component->active != 0;
325}
326
327/* component pin */
328int snd_soc_component_enable_pin(struct snd_soc_component *component,
329 const char *pin);
330int snd_soc_component_enable_pin_unlocked(struct snd_soc_component *component,
331 const char *pin);
332int snd_soc_component_disable_pin(struct snd_soc_component *component,
333 const char *pin);
334int snd_soc_component_disable_pin_unlocked(struct snd_soc_component *component,
335 const char *pin);
336int snd_soc_component_nc_pin(struct snd_soc_component *component,
337 const char *pin);
338int snd_soc_component_nc_pin_unlocked(struct snd_soc_component *component,
339 const char *pin);
340int snd_soc_component_get_pin_status(struct snd_soc_component *component,
341 const char *pin);
342int snd_soc_component_force_enable_pin(struct snd_soc_component *component,
343 const char *pin);
344int snd_soc_component_force_enable_pin_unlocked(
345 struct snd_soc_component *component,
346 const char *pin);
347
348/* component driver ops */
349int snd_soc_component_open(struct snd_soc_component *component,
350 struct snd_pcm_substream *substream);
351int snd_soc_component_close(struct snd_soc_component *component,
352 struct snd_pcm_substream *substream);
353int snd_soc_component_prepare(struct snd_soc_component *component,
354 struct snd_pcm_substream *substream);
355int snd_soc_component_hw_params(struct snd_soc_component *component,
356 struct snd_pcm_substream *substream,
357 struct snd_pcm_hw_params *params);
358int snd_soc_component_hw_free(struct snd_soc_component *component,
359 struct snd_pcm_substream *substream);
360int snd_soc_component_trigger(struct snd_soc_component *component,
361 struct snd_pcm_substream *substream,
362 int cmd);
363void snd_soc_component_suspend(struct snd_soc_component *component);
364void snd_soc_component_resume(struct snd_soc_component *component);
365int snd_soc_component_is_suspended(struct snd_soc_component *component);
366int snd_soc_component_probe(struct snd_soc_component *component);
367void snd_soc_component_remove(struct snd_soc_component *component);
368int snd_soc_component_of_xlate_dai_id(struct snd_soc_component *component,
369 struct device_node *ep);
370int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component,
371 struct of_phandle_args *args,
372 const char **dai_name);
373
374int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
375int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream,
376 unsigned int cmd, void *arg);
377int snd_soc_pcm_component_copy_user(struct snd_pcm_substream *substream,
378 int channel, unsigned long pos,
379 void __user *buf, unsigned long bytes);
380struct page *snd_soc_pcm_component_page(struct snd_pcm_substream *substream,
381 unsigned long offset);
382int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream,
383 struct vm_area_struct *vma);
384int snd_soc_pcm_component_new(struct snd_pcm *pcm);
385void snd_soc_pcm_component_free(struct snd_pcm *pcm);
386
387#endif /* __SOC_COMPONENT_H */
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index f5d70041108f..939c73db6a03 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -145,6 +145,31 @@ int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai,
145 145
146int snd_soc_dai_is_dummy(struct snd_soc_dai *dai); 146int snd_soc_dai_is_dummy(struct snd_soc_dai *dai);
147 147
148int snd_soc_dai_hw_params(struct snd_soc_dai *dai,
149 struct snd_pcm_substream *substream,
150 struct snd_pcm_hw_params *params);
151void snd_soc_dai_hw_free(struct snd_soc_dai *dai,
152 struct snd_pcm_substream *substream);
153int snd_soc_dai_startup(struct snd_soc_dai *dai,
154 struct snd_pcm_substream *substream);
155void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
156 struct snd_pcm_substream *substream);
157int snd_soc_dai_prepare(struct snd_soc_dai *dai,
158 struct snd_pcm_substream *substream);
159int snd_soc_dai_trigger(struct snd_soc_dai *dai,
160 struct snd_pcm_substream *substream, int cmd);
161int snd_soc_dai_bespoke_trigger(struct snd_soc_dai *dai,
162 struct snd_pcm_substream *substream, int cmd);
163snd_pcm_sframes_t snd_soc_dai_delay(struct snd_soc_dai *dai,
164 struct snd_pcm_substream *substream);
165void snd_soc_dai_suspend(struct snd_soc_dai *dai);
166void snd_soc_dai_resume(struct snd_soc_dai *dai);
167int snd_soc_dai_probe(struct snd_soc_dai *dai);
168int snd_soc_dai_remove(struct snd_soc_dai *dai);
169int snd_soc_dai_compress_new(struct snd_soc_dai *dai,
170 struct snd_soc_pcm_runtime *rtd, int num);
171bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int stream);
172
148struct snd_soc_dai_ops { 173struct snd_soc_dai_ops {
149 /* 174 /*
150 * DAI clocking configuration, all optional. 175 * DAI clocking configuration, all optional.
@@ -268,8 +293,6 @@ struct snd_soc_dai_driver {
268 /* Optional Callback used at pcm creation*/ 293 /* Optional Callback used at pcm creation*/
269 int (*pcm_new)(struct snd_soc_pcm_runtime *rtd, 294 int (*pcm_new)(struct snd_soc_pcm_runtime *rtd,
270 struct snd_soc_dai *dai); 295 struct snd_soc_dai *dai);
271 /* DAI is also used for the control bus */
272 bool bus_control;
273 296
274 /* ops */ 297 /* ops */
275 const struct snd_soc_dai_ops *ops; 298 const struct snd_soc_dai_ops *ops;
@@ -281,6 +304,7 @@ struct snd_soc_dai_driver {
281 unsigned int symmetric_rates:1; 304 unsigned int symmetric_rates:1;
282 unsigned int symmetric_channels:1; 305 unsigned int symmetric_channels:1;
283 unsigned int symmetric_samplebits:1; 306 unsigned int symmetric_samplebits:1;
307 unsigned int bus_control:1; /* DAI is also used for the control bus */
284 308
285 /* probe ordering - for components with runtime dependencies */ 309 /* probe ordering - for components with runtime dependencies */
286 int probe_order; 310 int probe_order;
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index c00a0b8ade08..6e8a31225383 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -353,6 +353,8 @@ struct device;
353#define SND_SOC_DAPM_WILL_PMD 0x80 /* called at start of sequence */ 353#define SND_SOC_DAPM_WILL_PMD 0x80 /* called at start of sequence */
354#define SND_SOC_DAPM_PRE_POST_PMD \ 354#define SND_SOC_DAPM_PRE_POST_PMD \
355 (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD) 355 (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD)
356#define SND_SOC_DAPM_PRE_POST_PMU \
357 (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU)
356 358
357/* convenience event type detection */ 359/* convenience event type detection */
358#define SND_SOC_DAPM_EVENT_ON(e) \ 360#define SND_SOC_DAPM_EVENT_ON(e) \
@@ -402,6 +404,9 @@ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
402struct snd_soc_dapm_widget *snd_soc_dapm_new_control( 404struct snd_soc_dapm_widget *snd_soc_dapm_new_control(
403 struct snd_soc_dapm_context *dapm, 405 struct snd_soc_dapm_context *dapm,
404 const struct snd_soc_dapm_widget *widget); 406 const struct snd_soc_dapm_widget *widget);
407struct snd_soc_dapm_widget *snd_soc_dapm_new_control_unlocked(
408 struct snd_soc_dapm_context *dapm,
409 const struct snd_soc_dapm_widget *widget);
405int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, 410int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
406 struct snd_soc_dai *dai); 411 struct snd_soc_dai *dai);
407int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card); 412int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card);
@@ -414,6 +419,9 @@ int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
414/* dapm path setup */ 419/* dapm path setup */
415int snd_soc_dapm_new_widgets(struct snd_soc_card *card); 420int snd_soc_dapm_new_widgets(struct snd_soc_card *card);
416void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm); 421void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm);
422void snd_soc_dapm_init(struct snd_soc_dapm_context *dapm,
423 struct snd_soc_card *card,
424 struct snd_soc_component *component);
417int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm, 425int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
418 const struct snd_soc_dapm_route *route, int num); 426 const struct snd_soc_dapm_route *route, int num);
419int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm, 427int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm,
@@ -659,8 +667,6 @@ struct snd_soc_dapm_context {
659 unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */ 667 unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
660 /* Go to BIAS_OFF in suspend if the DAPM context is idle */ 668 /* Go to BIAS_OFF in suspend if the DAPM context is idle */
661 unsigned int suspend_bias_off:1; 669 unsigned int suspend_bias_off:1;
662 void (*seq_notifier)(struct snd_soc_dapm_context *,
663 enum snd_soc_dapm_type, int);
664 670
665 struct device *dev; /* from parent - for debug */ 671 struct device *dev; /* from parent - for debug */
666 struct snd_soc_component *component; /* parent component */ 672 struct snd_soc_component *component; /* parent component */
@@ -670,10 +676,6 @@ struct snd_soc_dapm_context {
670 enum snd_soc_bias_level target_bias_level; 676 enum snd_soc_bias_level target_bias_level;
671 struct list_head list; 677 struct list_head list;
672 678
673 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
674 int (*set_bias_level)(struct snd_soc_dapm_context *dapm,
675 enum snd_soc_bias_level level);
676
677 struct snd_soc_dapm_wcache path_sink_cache; 679 struct snd_soc_dapm_wcache path_sink_cache;
678 struct snd_soc_dapm_wcache path_source_cache; 680 struct snd_soc_dapm_wcache path_source_cache;
679 681
diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h
index 4be3a2b7c106..e55aeb00ce2d 100644
--- a/include/sound/soc-dpcm.h
+++ b/include/sound/soc-dpcm.h
@@ -142,9 +142,16 @@ void snd_soc_dpcm_be_set_state(struct snd_soc_pcm_runtime *be, int stream,
142 142
143/* internal use only */ 143/* internal use only */
144int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute); 144int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute);
145void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd);
146int soc_dpcm_runtime_update(struct snd_soc_card *); 145int soc_dpcm_runtime_update(struct snd_soc_card *);
147 146
147#ifdef CONFIG_DEBUG_FS
148void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd);
149#else
150static inline void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd)
151{
152}
153#endif
154
148int dpcm_path_get(struct snd_soc_pcm_runtime *fe, 155int dpcm_path_get(struct snd_soc_pcm_runtime *fe,
149 int stream, struct snd_soc_dapm_widget_list **list_); 156 int stream, struct snd_soc_dapm_widget_list **list_);
150int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, 157int dpcm_process_paths(struct snd_soc_pcm_runtime *fe,
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 4e8071269639..f264c6509f00 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -363,21 +363,6 @@
363 const struct soc_enum name = SOC_ENUM_SINGLE_VIRT(ARRAY_SIZE(xtexts), xtexts) 363 const struct soc_enum name = SOC_ENUM_SINGLE_VIRT(ARRAY_SIZE(xtexts), xtexts)
364 364
365/* 365/*
366 * Component probe and remove ordering levels for components with runtime
367 * dependencies.
368 */
369#define SND_SOC_COMP_ORDER_FIRST -2
370#define SND_SOC_COMP_ORDER_EARLY -1
371#define SND_SOC_COMP_ORDER_NORMAL 0
372#define SND_SOC_COMP_ORDER_LATE 1
373#define SND_SOC_COMP_ORDER_LAST 2
374
375#define for_each_comp_order(order) \
376 for (order = SND_SOC_COMP_ORDER_FIRST; \
377 order <= SND_SOC_COMP_ORDER_LAST; \
378 order++)
379
380/*
381 * Bias levels 366 * Bias levels
382 * 367 *
383 * @ON: Bias is fully on for audio playback and capture operations. 368 * @ON: Bias is fully on for audio playback and capture operations.
@@ -505,10 +490,6 @@ int snd_soc_params_to_bclk(struct snd_pcm_hw_params *parms);
505int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, 490int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
506 const struct snd_pcm_hardware *hw); 491 const struct snd_pcm_hardware *hw);
507 492
508int soc_dai_hw_params(struct snd_pcm_substream *substream,
509 struct snd_pcm_hw_params *params,
510 struct snd_soc_dai *dai);
511
512/* Jack reporting */ 493/* Jack reporting */
513int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type, 494int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
514 struct snd_soc_jack *jack, struct snd_soc_jack_pin *pins, 495 struct snd_soc_jack *jack, struct snd_soc_jack_pin *pins,
@@ -751,132 +732,6 @@ struct snd_soc_compr_ops {
751 int (*trigger)(struct snd_compr_stream *); 732 int (*trigger)(struct snd_compr_stream *);
752}; 733};
753 734
754/* component interface */
755struct snd_soc_component_driver {
756 const char *name;
757
758 /* Default control and setup, added after probe() is run */
759 const struct snd_kcontrol_new *controls;
760 unsigned int num_controls;
761 const struct snd_soc_dapm_widget *dapm_widgets;
762 unsigned int num_dapm_widgets;
763 const struct snd_soc_dapm_route *dapm_routes;
764 unsigned int num_dapm_routes;
765
766 int (*probe)(struct snd_soc_component *);
767 void (*remove)(struct snd_soc_component *);
768 int (*suspend)(struct snd_soc_component *);
769 int (*resume)(struct snd_soc_component *);
770
771 unsigned int (*read)(struct snd_soc_component *, unsigned int);
772 int (*write)(struct snd_soc_component *, unsigned int, unsigned int);
773
774 /* pcm creation and destruction */
775 int (*pcm_new)(struct snd_soc_pcm_runtime *);
776 void (*pcm_free)(struct snd_pcm *);
777
778 /* component wide operations */
779 int (*set_sysclk)(struct snd_soc_component *component,
780 int clk_id, int source, unsigned int freq, int dir);
781 int (*set_pll)(struct snd_soc_component *component, int pll_id,
782 int source, unsigned int freq_in, unsigned int freq_out);
783 int (*set_jack)(struct snd_soc_component *component,
784 struct snd_soc_jack *jack, void *data);
785
786 /* DT */
787 int (*of_xlate_dai_name)(struct snd_soc_component *component,
788 struct of_phandle_args *args,
789 const char **dai_name);
790 int (*of_xlate_dai_id)(struct snd_soc_component *comment,
791 struct device_node *endpoint);
792 void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
793 int subseq);
794 int (*stream_event)(struct snd_soc_component *, int event);
795 int (*set_bias_level)(struct snd_soc_component *component,
796 enum snd_soc_bias_level level);
797
798 const struct snd_pcm_ops *ops;
799 const struct snd_compr_ops *compr_ops;
800
801 /* probe ordering - for components with runtime dependencies */
802 int probe_order;
803 int remove_order;
804
805 /*
806 * signal if the module handling the component should not be removed
807 * if a pcm is open. Setting this would prevent the module
808 * refcount being incremented in probe() but allow it be incremented
809 * when a pcm is opened and decremented when it is closed.
810 */
811 unsigned int module_get_upon_open:1;
812
813 /* bits */
814 unsigned int idle_bias_on:1;
815 unsigned int suspend_bias_off:1;
816 unsigned int use_pmdown_time:1; /* care pmdown_time at stop */
817 unsigned int endianness:1;
818 unsigned int non_legacy_dai_naming:1;
819
820 /* this component uses topology and ignore machine driver FEs */
821 const char *ignore_machine;
822 const char *topology_name_prefix;
823 int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
824 struct snd_pcm_hw_params *params);
825 bool use_dai_pcm_id; /* use the DAI link PCM ID as PCM device number */
826 int be_pcm_base; /* base device ID for all BE PCMs */
827};
828
829struct snd_soc_component {
830 const char *name;
831 int id;
832 const char *name_prefix;
833 struct device *dev;
834 struct snd_soc_card *card;
835
836 unsigned int active;
837
838 unsigned int suspended:1; /* is in suspend PM state */
839
840 struct list_head list;
841 struct list_head card_aux_list; /* for auxiliary bound components */
842 struct list_head card_list;
843
844 const struct snd_soc_component_driver *driver;
845
846 struct list_head dai_list;
847 int num_dai;
848
849 struct regmap *regmap;
850 int val_bytes;
851
852 struct mutex io_mutex;
853
854 /* attached dynamic objects */
855 struct list_head dobj_list;
856
857 /*
858 * DO NOT use any of the fields below in drivers, they are temporary and
859 * are going to be removed again soon. If you use them in driver code the
860 * driver will be marked as BROKEN when these fields are removed.
861 */
862
863 /* Don't use these, use snd_soc_component_get_dapm() */
864 struct snd_soc_dapm_context dapm;
865
866 /* machine specific init */
867 int (*init)(struct snd_soc_component *component);
868
869#ifdef CONFIG_DEBUG_FS
870 struct dentry *debugfs_root;
871 const char *debugfs_prefix;
872#endif
873};
874
875#define for_each_component_dais(component, dai)\
876 list_for_each_entry(dai, &(component)->dai_list, list)
877#define for_each_component_dais_safe(component, dai, _dai)\
878 list_for_each_entry_safe(dai, _dai, &(component)->dai_list, list)
879
880struct snd_soc_rtdcom_list { 735struct snd_soc_rtdcom_list {
881 struct snd_soc_component *component; 736 struct snd_soc_component *component;
882 struct list_head list; /* rtd::component_list */ 737 struct list_head list; /* rtd::component_list */
@@ -1086,6 +941,7 @@ struct snd_soc_dai_link {
1086#define COMP_CPU(_dai) { .dai_name = _dai, } 941#define COMP_CPU(_dai) { .dai_name = _dai, }
1087#define COMP_CODEC(_name, _dai) { .name = _name, .dai_name = _dai, } 942#define COMP_CODEC(_name, _dai) { .name = _name, .dai_name = _dai, }
1088#define COMP_PLATFORM(_name) { .name = _name } 943#define COMP_PLATFORM(_name) { .name = _name }
944#define COMP_AUX(_name) { .name = _name }
1089#define COMP_DUMMY() { .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", } 945#define COMP_DUMMY() { .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }
1090 946
1091extern struct snd_soc_dai_link_component null_dailink_component[0]; 947extern struct snd_soc_dai_link_component null_dailink_component[0];
@@ -1107,14 +963,11 @@ struct snd_soc_codec_conf {
1107}; 963};
1108 964
1109struct snd_soc_aux_dev { 965struct snd_soc_aux_dev {
1110 const char *name; /* Codec name */
1111
1112 /* 966 /*
1113 * specify multi-codec either by device name, or by 967 * specify multi-codec either by device name, or by
1114 * DT/OF node, but not both. 968 * DT/OF node, but not both.
1115 */ 969 */
1116 const char *codec_name; 970 struct snd_soc_dai_link_component dlc;
1117 struct device_node *codec_of_node;
1118 971
1119 /* codec/machine specific init - e.g. add machine controls */ 972 /* codec/machine specific init - e.g. add machine controls */
1120 int (*init)(struct snd_soc_component *component); 973 int (*init)(struct snd_soc_component *component);
@@ -1135,6 +988,10 @@ struct snd_soc_card {
1135 struct mutex mutex; 988 struct mutex mutex;
1136 struct mutex dapm_mutex; 989 struct mutex dapm_mutex;
1137 990
991 /* Mutex for PCM operations */
992 struct mutex pcm_mutex;
993 enum snd_soc_pcm_subclass pcm_subclass;
994
1138 spinlock_t dpcm_lock; 995 spinlock_t dpcm_lock;
1139 996
1140 bool instantiated; 997 bool instantiated;
@@ -1203,8 +1060,6 @@ struct snd_soc_card {
1203 int num_of_dapm_routes; 1060 int num_of_dapm_routes;
1204 bool fully_routed; 1061 bool fully_routed;
1205 1062
1206 struct work_struct deferred_resume_work;
1207
1208 /* lists of probed devices belonging to this card */ 1063 /* lists of probed devices belonging to this card */
1209 struct list_head component_dev_list; 1064 struct list_head component_dev_list;
1210 struct list_head list; 1065 struct list_head list;
@@ -1224,7 +1079,9 @@ struct snd_soc_card {
1224 1079
1225#ifdef CONFIG_DEBUG_FS 1080#ifdef CONFIG_DEBUG_FS
1226 struct dentry *debugfs_card_root; 1081 struct dentry *debugfs_card_root;
1227 struct dentry *debugfs_pop_time; 1082#endif
1083#ifdef CONFIG_PM_SLEEP
1084 struct work_struct deferred_resume_work;
1228#endif 1085#endif
1229 u32 pop_time; 1086 u32 pop_time;
1230 1087
@@ -1234,6 +1091,10 @@ struct snd_soc_card {
1234 for ((i) = 0; \ 1091 for ((i) = 0; \
1235 ((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \ 1092 ((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \
1236 (i)++) 1093 (i)++)
1094#define for_each_card_pre_auxs(card, i, aux) \
1095 for ((i) = 0; \
1096 ((i) < (card)->num_aux_devs) && ((aux) = &(card)->aux_dev[i]); \
1097 (i)++)
1237 1098
1238#define for_each_card_links(card, link) \ 1099#define for_each_card_links(card, link) \
1239 list_for_each_entry(link, &(card)->dai_link_list, list) 1100 list_for_each_entry(link, &(card)->dai_link_list, list)
@@ -1245,6 +1106,12 @@ struct snd_soc_card {
1245#define for_each_card_rtds_safe(card, rtd, _rtd) \ 1106#define for_each_card_rtds_safe(card, rtd, _rtd) \
1246 list_for_each_entry_safe(rtd, _rtd, &(card)->rtd_list, list) 1107 list_for_each_entry_safe(rtd, _rtd, &(card)->rtd_list, list)
1247 1108
1109#define for_each_card_auxs(card, component) \
1110 list_for_each_entry(component, &card->aux_comp_list, card_aux_list)
1111#define for_each_card_auxs_safe(card, component, _comp) \
1112 list_for_each_entry_safe(component, _comp, \
1113 &card->aux_comp_list, card_aux_list)
1114
1248#define for_each_card_components(card, component) \ 1115#define for_each_card_components(card, component) \
1249 list_for_each_entry(component, &(card)->component_dev_list, card_list) 1116 list_for_each_entry(component, &(card)->component_dev_list, card_list)
1250 1117
@@ -1253,8 +1120,6 @@ struct snd_soc_pcm_runtime {
1253 struct device *dev; 1120 struct device *dev;
1254 struct snd_soc_card *card; 1121 struct snd_soc_card *card;
1255 struct snd_soc_dai_link *dai_link; 1122 struct snd_soc_dai_link *dai_link;
1256 struct mutex pcm_mutex;
1257 enum snd_soc_pcm_subclass pcm_subclass;
1258 struct snd_pcm_ops ops; 1123 struct snd_pcm_ops ops;
1259 1124
1260 unsigned int params_select; /* currently selected param for dai link */ 1125 unsigned int params_select; /* currently selected param for dai link */
@@ -1342,134 +1207,6 @@ struct soc_enum {
1342 struct snd_soc_dobj dobj; 1207 struct snd_soc_dobj dobj;
1343}; 1208};
1344 1209
1345/**
1346 * snd_soc_dapm_to_component() - Casts a DAPM context to the component it is
1347 * embedded in
1348 * @dapm: The DAPM context to cast to the component
1349 *
1350 * This function must only be used on DAPM contexts that are known to be part of
1351 * a component (e.g. in a component driver). Otherwise the behavior is
1352 * undefined.
1353 */
1354static inline struct snd_soc_component *snd_soc_dapm_to_component(
1355 struct snd_soc_dapm_context *dapm)
1356{
1357 return container_of(dapm, struct snd_soc_component, dapm);
1358}
1359
1360/**
1361 * snd_soc_component_get_dapm() - Returns the DAPM context associated with a
1362 * component
1363 * @component: The component for which to get the DAPM context
1364 */
1365static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
1366 struct snd_soc_component *component)
1367{
1368 return &component->dapm;
1369}
1370
1371/**
1372 * snd_soc_component_init_bias_level() - Initialize COMPONENT DAPM bias level
1373 * @component: The COMPONENT for which to initialize the DAPM bias level
1374 * @level: The DAPM level to initialize to
1375 *
1376 * Initializes the COMPONENT DAPM bias level. See snd_soc_dapm_init_bias_level().
1377 */
1378static inline void
1379snd_soc_component_init_bias_level(struct snd_soc_component *component,
1380 enum snd_soc_bias_level level)
1381{
1382 snd_soc_dapm_init_bias_level(
1383 snd_soc_component_get_dapm(component), level);
1384}
1385
1386/**
1387 * snd_soc_component_get_bias_level() - Get current COMPONENT DAPM bias level
1388 * @component: The COMPONENT for which to get the DAPM bias level
1389 *
1390 * Returns: The current DAPM bias level of the COMPONENT.
1391 */
1392static inline enum snd_soc_bias_level
1393snd_soc_component_get_bias_level(struct snd_soc_component *component)
1394{
1395 return snd_soc_dapm_get_bias_level(
1396 snd_soc_component_get_dapm(component));
1397}
1398
1399/**
1400 * snd_soc_component_force_bias_level() - Set the COMPONENT DAPM bias level
1401 * @component: The COMPONENT for which to set the level
1402 * @level: The level to set to
1403 *
1404 * Forces the COMPONENT bias level to a specific state. See
1405 * snd_soc_dapm_force_bias_level().
1406 */
1407static inline int
1408snd_soc_component_force_bias_level(struct snd_soc_component *component,
1409 enum snd_soc_bias_level level)
1410{
1411 return snd_soc_dapm_force_bias_level(
1412 snd_soc_component_get_dapm(component),
1413 level);
1414}
1415
1416/**
1417 * snd_soc_dapm_kcontrol_component() - Returns the component associated to a kcontrol
1418 * @kcontrol: The kcontrol
1419 *
1420 * This function must only be used on DAPM contexts that are known to be part of
1421 * a COMPONENT (e.g. in a COMPONENT driver). Otherwise the behavior is undefined.
1422 */
1423static inline struct snd_soc_component *snd_soc_dapm_kcontrol_component(
1424 struct snd_kcontrol *kcontrol)
1425{
1426 return snd_soc_dapm_to_component(snd_soc_dapm_kcontrol_dapm(kcontrol));
1427}
1428
1429/**
1430 * snd_soc_component_cache_sync() - Sync the register cache with the hardware
1431 * @component: COMPONENT to sync
1432 *
1433 * Note: This function will call regcache_sync()
1434 */
1435static inline int snd_soc_component_cache_sync(
1436 struct snd_soc_component *component)
1437{
1438 return regcache_sync(component->regmap);
1439}
1440
1441/* component IO */
1442int snd_soc_component_read(struct snd_soc_component *component,
1443 unsigned int reg, unsigned int *val);
1444unsigned int snd_soc_component_read32(struct snd_soc_component *component,
1445 unsigned int reg);
1446int snd_soc_component_write(struct snd_soc_component *component,
1447 unsigned int reg, unsigned int val);
1448int snd_soc_component_update_bits(struct snd_soc_component *component,
1449 unsigned int reg, unsigned int mask, unsigned int val);
1450int snd_soc_component_update_bits_async(struct snd_soc_component *component,
1451 unsigned int reg, unsigned int mask, unsigned int val);
1452void snd_soc_component_async_complete(struct snd_soc_component *component);
1453int snd_soc_component_test_bits(struct snd_soc_component *component,
1454 unsigned int reg, unsigned int mask, unsigned int value);
1455
1456/* component wide operations */
1457int snd_soc_component_set_sysclk(struct snd_soc_component *component,
1458 int clk_id, int source, unsigned int freq, int dir);
1459int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
1460 int source, unsigned int freq_in,
1461 unsigned int freq_out);
1462int snd_soc_component_set_jack(struct snd_soc_component *component,
1463 struct snd_soc_jack *jack, void *data);
1464
1465#ifdef CONFIG_REGMAP
1466
1467void snd_soc_component_init_regmap(struct snd_soc_component *component,
1468 struct regmap *regmap);
1469void snd_soc_component_exit_regmap(struct snd_soc_component *component);
1470
1471#endif
1472
1473/* device driver data */ 1210/* device driver data */
1474 1211
1475static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, 1212static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
@@ -1483,27 +1220,6 @@ static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
1483 return card->drvdata; 1220 return card->drvdata;
1484} 1221}
1485 1222
1486static inline void snd_soc_component_set_drvdata(struct snd_soc_component *c,
1487 void *data)
1488{
1489 dev_set_drvdata(c->dev, data);
1490}
1491
1492static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c)
1493{
1494 return dev_get_drvdata(c->dev);
1495}
1496
1497static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
1498{
1499 INIT_LIST_HEAD(&card->widgets);
1500 INIT_LIST_HEAD(&card->paths);
1501 INIT_LIST_HEAD(&card->dapm_list);
1502 INIT_LIST_HEAD(&card->aux_comp_list);
1503 INIT_LIST_HEAD(&card->component_dev_list);
1504 INIT_LIST_HEAD(&card->list);
1505}
1506
1507static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc) 1223static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
1508{ 1224{
1509 if (mc->reg == mc->rreg && mc->shift == mc->rshift) 1225 if (mc->reg == mc->rreg && mc->shift == mc->rshift)
@@ -1540,12 +1256,6 @@ static inline unsigned int snd_soc_enum_item_to_val(struct soc_enum *e,
1540 return e->values[item]; 1256 return e->values[item];
1541} 1257}
1542 1258
1543static inline bool snd_soc_component_is_active(
1544 struct snd_soc_component *component)
1545{
1546 return component->active != 0;
1547}
1548
1549/** 1259/**
1550 * snd_soc_kcontrol_component() - Returns the component that registered the 1260 * snd_soc_kcontrol_component() - Returns the component that registered the
1551 * control 1261 * control
@@ -1681,24 +1391,6 @@ static inline void snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm)
1681 mutex_unlock(&dapm->card->dapm_mutex); 1391 mutex_unlock(&dapm->card->dapm_mutex);
1682} 1392}
1683 1393
1684int snd_soc_component_enable_pin(struct snd_soc_component *component, 1394#include <sound/soc-component.h>
1685 const char *pin);
1686int snd_soc_component_enable_pin_unlocked(struct snd_soc_component *component,
1687 const char *pin);
1688int snd_soc_component_disable_pin(struct snd_soc_component *component,
1689 const char *pin);
1690int snd_soc_component_disable_pin_unlocked(struct snd_soc_component *component,
1691 const char *pin);
1692int snd_soc_component_nc_pin(struct snd_soc_component *component,
1693 const char *pin);
1694int snd_soc_component_nc_pin_unlocked(struct snd_soc_component *component,
1695 const char *pin);
1696int snd_soc_component_get_pin_status(struct snd_soc_component *component,
1697 const char *pin);
1698int snd_soc_component_force_enable_pin(struct snd_soc_component *component,
1699 const char *pin);
1700int snd_soc_component_force_enable_pin_unlocked(
1701 struct snd_soc_component *component,
1702 const char *pin);
1703 1395
1704#endif 1396#endif
diff --git a/include/sound/sof/control.h b/include/sound/sof/control.h
index bded69e696d4..6080ea0facd7 100644
--- a/include/sound/sof/control.h
+++ b/include/sound/sof/control.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
diff --git a/include/sound/sof/dai-intel.h b/include/sound/sof/dai-intel.h
index 4bb8ee138ba7..5f1ef5565be6 100644
--- a/include/sound/sof/dai-intel.h
+++ b/include/sound/sof/dai-intel.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
@@ -76,6 +76,9 @@ struct sof_ipc_dai_ssp_params {
76 uint16_t tdm_per_slot_padding_flag; 76 uint16_t tdm_per_slot_padding_flag;
77 uint32_t clks_control; 77 uint32_t clks_control;
78 uint32_t quirks; 78 uint32_t quirks;
79 uint32_t bclk_delay; /* guaranteed time (ms) for which BCLK
80 * will be driven, before sending data
81 */
79} __packed; 82} __packed;
80 83
81/* HDA Configuration Request - SOF_IPC_DAI_HDA_CONFIG */ 84/* HDA Configuration Request - SOF_IPC_DAI_HDA_CONFIG */
@@ -176,4 +179,13 @@ struct sof_ipc_dai_dmic_params {
176 struct sof_ipc_dai_dmic_pdm_ctrl pdm[0]; 179 struct sof_ipc_dai_dmic_pdm_ctrl pdm[0];
177} __packed; 180} __packed;
178 181
182/* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */
183struct sof_ipc_dai_alh_params {
184 struct sof_ipc_hdr hdr;
185 uint32_t stream_id;
186
187 /* reserved for future use */
188 uint32_t reserved[15];
189} __packed;
190
179#endif 191#endif
diff --git a/include/sound/sof/dai.h b/include/sound/sof/dai.h
index 3d174e20aa53..0f1235022146 100644
--- a/include/sound/sof/dai.h
+++ b/include/sound/sof/dai.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
@@ -49,7 +49,9 @@ enum sof_ipc_dai_type {
49 SOF_DAI_INTEL_SSP, /**< Intel SSP */ 49 SOF_DAI_INTEL_SSP, /**< Intel SSP */
50 SOF_DAI_INTEL_DMIC, /**< Intel DMIC */ 50 SOF_DAI_INTEL_DMIC, /**< Intel DMIC */
51 SOF_DAI_INTEL_HDA, /**< Intel HD/A */ 51 SOF_DAI_INTEL_HDA, /**< Intel HD/A */
52 SOF_DAI_INTEL_SOUNDWIRE, /**< Intel SoundWire */ 52 SOF_DAI_INTEL_ALH, /**< Intel ALH */
53 SOF_DAI_IMX_SAI, /**< i.MX SAI */
54 SOF_DAI_IMX_ESAI, /**< i.MX ESAI */
53}; 55};
54 56
55/* general purpose DAI configuration */ 57/* general purpose DAI configuration */
@@ -70,6 +72,7 @@ struct sof_ipc_dai_config {
70 struct sof_ipc_dai_ssp_params ssp; 72 struct sof_ipc_dai_ssp_params ssp;
71 struct sof_ipc_dai_dmic_params dmic; 73 struct sof_ipc_dai_dmic_params dmic;
72 struct sof_ipc_dai_hda_params hda; 74 struct sof_ipc_dai_hda_params hda;
75 struct sof_ipc_dai_alh_params alh;
73 }; 76 };
74} __packed; 77} __packed;
75 78
diff --git a/include/sound/sof/header.h b/include/sound/sof/header.h
index 12867bbd4372..10f00c08dbb7 100644
--- a/include/sound/sof/header.h
+++ b/include/sound/sof/header.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
diff --git a/include/sound/sof/info.h b/include/sound/sof/info.h
index 16528d2b4a50..a9156b4a062c 100644
--- a/include/sound/sof/info.h
+++ b/include/sound/sof/info.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
diff --git a/include/sound/sof/pm.h b/include/sound/sof/pm.h
index 8ae3ad45bdf7..003879401d63 100644
--- a/include/sound/sof/pm.h
+++ b/include/sound/sof/pm.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
diff --git a/include/sound/sof/stream.h b/include/sound/sof/stream.h
index 643f175cb479..0b71b381b952 100644
--- a/include/sound/sof/stream.h
+++ b/include/sound/sof/stream.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
diff --git a/include/sound/sof/topology.h b/include/sound/sof/topology.h
index 41dcabf89899..c47b36240920 100644
--- a/include/sound/sof/topology.h
+++ b/include/sound/sof/topology.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
diff --git a/include/sound/sof/trace.h b/include/sound/sof/trace.h
index 9257d5473d97..fda6e8f6ead4 100644
--- a/include/sound/sof/trace.h
+++ b/include/sound/sof/trace.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
diff --git a/include/sound/sof/xtensa.h b/include/sound/sof/xtensa.h
index d25c764b10e8..dd53d36b34e1 100644
--- a/include/sound/sof/xtensa.h
+++ b/include/sound/sof/xtensa.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* 2/*
3 * This file is provided under a dual BSD/GPLv2 license. When using or 3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license. 4 * redistributing this file, you may do so under either license.
diff --git a/include/trace/events/dma_fence.h b/include/trace/events/dma_fence.h
index 2212adda8f77..64e92d56c6a8 100644
--- a/include/trace/events/dma_fence.h
+++ b/include/trace/events/dma_fence.h
@@ -2,7 +2,7 @@
2#undef TRACE_SYSTEM 2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM dma_fence 3#define TRACE_SYSTEM dma_fence
4 4
5#if !defined(_TRACE_FENCE_H) || defined(TRACE_HEADER_MULTI_READ) 5#if !defined(_TRACE_DMA_FENCE_H) || defined(TRACE_HEADER_MULTI_READ)
6#define _TRACE_DMA_FENCE_H 6#define _TRACE_DMA_FENCE_H
7 7
8#include <linux/tracepoint.h> 8#include <linux/tracepoint.h>
diff --git a/include/trace/events/napi.h b/include/trace/events/napi.h
index f3a12566bed0..6678cf8b235b 100644
--- a/include/trace/events/napi.h
+++ b/include/trace/events/napi.h
@@ -3,7 +3,7 @@
3#define TRACE_SYSTEM napi 3#define TRACE_SYSTEM napi
4 4
5#if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ) 5#if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
6#define _TRACE_NAPI_H_ 6#define _TRACE_NAPI_H
7 7
8#include <linux/netdevice.h> 8#include <linux/netdevice.h>
9#include <linux/tracepoint.h> 9#include <linux/tracepoint.h>
@@ -38,7 +38,7 @@ TRACE_EVENT(napi_poll,
38 38
39#undef NO_DEV 39#undef NO_DEV
40 40
41#endif /* _TRACE_NAPI_H_ */ 41#endif /* _TRACE_NAPI_H */
42 42
43/* This part must be outside protection */ 43/* This part must be outside protection */
44#include <trace/define_trace.h> 44#include <trace/define_trace.h>
diff --git a/include/trace/events/qdisc.h b/include/trace/events/qdisc.h
index 60d0d8bd336d..0d1a9ebf55ba 100644
--- a/include/trace/events/qdisc.h
+++ b/include/trace/events/qdisc.h
@@ -2,7 +2,7 @@
2#define TRACE_SYSTEM qdisc 2#define TRACE_SYSTEM qdisc
3 3
4#if !defined(_TRACE_QDISC_H) || defined(TRACE_HEADER_MULTI_READ) 4#if !defined(_TRACE_QDISC_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_QDISC_H_ 5#define _TRACE_QDISC_H
6 6
7#include <linux/skbuff.h> 7#include <linux/skbuff.h>
8#include <linux/netdevice.h> 8#include <linux/netdevice.h>
@@ -44,7 +44,7 @@ TRACE_EVENT(qdisc_dequeue,
44 __entry->txq_state, __entry->packets, __entry->skbaddr ) 44 __entry->txq_state, __entry->packets, __entry->skbaddr )
45); 45);
46 46
47#endif /* _TRACE_QDISC_H_ */ 47#endif /* _TRACE_QDISC_H */
48 48
49/* This part must be outside protection */ 49/* This part must be outside protection */
50#include <trace/define_trace.h> 50#include <trace/define_trace.h>
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index cc1d060cbf13..a13a62db3565 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -23,20 +23,17 @@
23#define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY 23#define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY
24 24
25enum rxrpc_skb_trace { 25enum rxrpc_skb_trace {
26 rxrpc_skb_rx_cleaned, 26 rxrpc_skb_cleaned,
27 rxrpc_skb_rx_freed, 27 rxrpc_skb_freed,
28 rxrpc_skb_rx_got, 28 rxrpc_skb_got,
29 rxrpc_skb_rx_lost, 29 rxrpc_skb_lost,
30 rxrpc_skb_rx_purged, 30 rxrpc_skb_new,
31 rxrpc_skb_rx_received, 31 rxrpc_skb_purged,
32 rxrpc_skb_rx_rotated, 32 rxrpc_skb_received,
33 rxrpc_skb_rx_seen, 33 rxrpc_skb_rotated,
34 rxrpc_skb_tx_cleaned, 34 rxrpc_skb_seen,
35 rxrpc_skb_tx_freed, 35 rxrpc_skb_unshared,
36 rxrpc_skb_tx_got, 36 rxrpc_skb_unshared_nomem,
37 rxrpc_skb_tx_new,
38 rxrpc_skb_tx_rotated,
39 rxrpc_skb_tx_seen,
40}; 37};
41 38
42enum rxrpc_local_trace { 39enum rxrpc_local_trace {
@@ -228,20 +225,17 @@ enum rxrpc_tx_point {
228 * Declare tracing information enums and their string mappings for display. 225 * Declare tracing information enums and their string mappings for display.
229 */ 226 */
230#define rxrpc_skb_traces \ 227#define rxrpc_skb_traces \
231 EM(rxrpc_skb_rx_cleaned, "Rx CLN") \ 228 EM(rxrpc_skb_cleaned, "CLN") \
232 EM(rxrpc_skb_rx_freed, "Rx FRE") \ 229 EM(rxrpc_skb_freed, "FRE") \
233 EM(rxrpc_skb_rx_got, "Rx GOT") \ 230 EM(rxrpc_skb_got, "GOT") \
234 EM(rxrpc_skb_rx_lost, "Rx *L*") \ 231 EM(rxrpc_skb_lost, "*L*") \
235 EM(rxrpc_skb_rx_purged, "Rx PUR") \ 232 EM(rxrpc_skb_new, "NEW") \
236 EM(rxrpc_skb_rx_received, "Rx RCV") \ 233 EM(rxrpc_skb_purged, "PUR") \
237 EM(rxrpc_skb_rx_rotated, "Rx ROT") \ 234 EM(rxrpc_skb_received, "RCV") \
238 EM(rxrpc_skb_rx_seen, "Rx SEE") \ 235 EM(rxrpc_skb_rotated, "ROT") \
239 EM(rxrpc_skb_tx_cleaned, "Tx CLN") \ 236 EM(rxrpc_skb_seen, "SEE") \
240 EM(rxrpc_skb_tx_freed, "Tx FRE") \ 237 EM(rxrpc_skb_unshared, "UNS") \
241 EM(rxrpc_skb_tx_got, "Tx GOT") \ 238 E_(rxrpc_skb_unshared_nomem, "US0")
242 EM(rxrpc_skb_tx_new, "Tx NEW") \
243 EM(rxrpc_skb_tx_rotated, "Tx ROT") \
244 E_(rxrpc_skb_tx_seen, "Tx SEE")
245 239
246#define rxrpc_local_traces \ 240#define rxrpc_local_traces \
247 EM(rxrpc_local_got, "GOT") \ 241 EM(rxrpc_local_got, "GOT") \
@@ -498,10 +492,10 @@ rxrpc_tx_points;
498#define E_(a, b) { a, b } 492#define E_(a, b) { a, b }
499 493
500TRACE_EVENT(rxrpc_local, 494TRACE_EVENT(rxrpc_local,
501 TP_PROTO(struct rxrpc_local *local, enum rxrpc_local_trace op, 495 TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op,
502 int usage, const void *where), 496 int usage, const void *where),
503 497
504 TP_ARGS(local, op, usage, where), 498 TP_ARGS(local_debug_id, op, usage, where),
505 499
506 TP_STRUCT__entry( 500 TP_STRUCT__entry(
507 __field(unsigned int, local ) 501 __field(unsigned int, local )
@@ -511,7 +505,7 @@ TRACE_EVENT(rxrpc_local,
511 ), 505 ),
512 506
513 TP_fast_assign( 507 TP_fast_assign(
514 __entry->local = local->debug_id; 508 __entry->local = local_debug_id;
515 __entry->op = op; 509 __entry->op = op;
516 __entry->usage = usage; 510 __entry->usage = usage;
517 __entry->where = where; 511 __entry->where = where;
@@ -643,13 +637,14 @@ TRACE_EVENT(rxrpc_call,
643 637
644TRACE_EVENT(rxrpc_skb, 638TRACE_EVENT(rxrpc_skb,
645 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, 639 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
646 int usage, int mod_count, const void *where), 640 int usage, int mod_count, u8 flags, const void *where),
647 641
648 TP_ARGS(skb, op, usage, mod_count, where), 642 TP_ARGS(skb, op, usage, mod_count, flags, where),
649 643
650 TP_STRUCT__entry( 644 TP_STRUCT__entry(
651 __field(struct sk_buff *, skb ) 645 __field(struct sk_buff *, skb )
652 __field(enum rxrpc_skb_trace, op ) 646 __field(enum rxrpc_skb_trace, op )
647 __field(u8, flags )
653 __field(int, usage ) 648 __field(int, usage )
654 __field(int, mod_count ) 649 __field(int, mod_count )
655 __field(const void *, where ) 650 __field(const void *, where )
@@ -657,14 +652,16 @@ TRACE_EVENT(rxrpc_skb,
657 652
658 TP_fast_assign( 653 TP_fast_assign(
659 __entry->skb = skb; 654 __entry->skb = skb;
655 __entry->flags = flags;
660 __entry->op = op; 656 __entry->op = op;
661 __entry->usage = usage; 657 __entry->usage = usage;
662 __entry->mod_count = mod_count; 658 __entry->mod_count = mod_count;
663 __entry->where = where; 659 __entry->where = where;
664 ), 660 ),
665 661
666 TP_printk("s=%p %s u=%d m=%d p=%pSR", 662 TP_printk("s=%p %cx %s u=%d m=%d p=%pSR",
667 __entry->skb, 663 __entry->skb,
664 __entry->flags & RXRPC_SKB_TX_BUFFER ? 'T' : 'R',
668 __print_symbolic(__entry->op, rxrpc_skb_traces), 665 __print_symbolic(__entry->op, rxrpc_skb_traces),
669 __entry->usage, 666 __entry->usage,
670 __entry->mod_count, 667 __entry->mod_count,
diff --git a/include/trace/events/tegra_apb_dma.h b/include/trace/events/tegra_apb_dma.h
index 0818f6286110..971cd02d2daf 100644
--- a/include/trace/events/tegra_apb_dma.h
+++ b/include/trace/events/tegra_apb_dma.h
@@ -1,5 +1,5 @@
1#if !defined(_TRACE_TEGRA_APB_DMA_H) || defined(TRACE_HEADER_MULTI_READ) 1#if !defined(_TRACE_TEGRA_APB_DMA_H) || defined(TRACE_HEADER_MULTI_READ)
2#define _TRACE_TEGRA_APM_DMA_H 2#define _TRACE_TEGRA_APB_DMA_H
3 3
4#include <linux/tracepoint.h> 4#include <linux/tracepoint.h>
5#include <linux/dmaengine.h> 5#include <linux/dmaengine.h>
@@ -55,7 +55,7 @@ TRACE_EVENT(tegra_dma_isr,
55 TP_printk("%s: irq %d\n", __get_str(chan), __entry->irq) 55 TP_printk("%s: irq %d\n", __get_str(chan), __entry->irq)
56); 56);
57 57
58#endif /* _TRACE_TEGRADMA_H */ 58#endif /* _TRACE_TEGRA_APB_DMA_H */
59 59
60/* This part must be outside protection */ 60/* This part must be outside protection */
61#include <trace/define_trace.h> 61#include <trace/define_trace.h>
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index fa1c753dcdbc..a5aa7d3ac6a1 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1466,8 +1466,8 @@ union bpf_attr {
1466 * If no cookie has been set yet, generate a new cookie. Once 1466 * If no cookie has been set yet, generate a new cookie. Once
1467 * generated, the socket cookie remains stable for the life of the 1467 * generated, the socket cookie remains stable for the life of the
1468 * socket. This helper can be useful for monitoring per socket 1468 * socket. This helper can be useful for monitoring per socket
1469 * networking traffic statistics as it provides a unique socket 1469 * networking traffic statistics as it provides a global socket
1470 * identifier per namespace. 1470 * identifier that can be assumed unique.
1471 * Return 1471 * Return
1472 * A 8-byte long non-decreasing number on success, or 0 if the 1472 * A 8-byte long non-decreasing number on success, or 0 if the
1473 * socket field is missing inside *skb*. 1473 * socket field is missing inside *skb*.
diff --git a/include/uapi/linux/bpfilter.h b/include/uapi/linux/bpfilter.h
index 2ec3cc99ea4c..cbc1f5813f50 100644
--- a/include/uapi/linux/bpfilter.h
+++ b/include/uapi/linux/bpfilter.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _UAPI_LINUX_BPFILTER_H 2#ifndef _UAPI_LINUX_BPFILTER_H
3#define _UAPI_LINUX_BPFILTER_H 3#define _UAPI_LINUX_BPFILTER_H
4 4
diff --git a/include/uapi/linux/ipmi_bmc.h b/include/uapi/linux/ipmi_bmc.h
index 1670f0944227..782a03eb1086 100644
--- a/include/uapi/linux/ipmi_bmc.h
+++ b/include/uapi/linux/ipmi_bmc.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* 2/*
3 * Copyright (c) 2015-2018, Intel Corporation. 3 * Copyright (c) 2015-2018, Intel Corporation.
4 */ 4 */
diff --git a/include/uapi/linux/isst_if.h b/include/uapi/linux/isst_if.h
index d10b832c58c5..0a52b7b093d3 100644
--- a/include/uapi/linux/isst_if.h
+++ b/include/uapi/linux/isst_if.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* 2/*
3 * Intel Speed Select Interface: OS to hardware Interface 3 * Intel Speed Select Interface: OS to hardware Interface
4 * Copyright (c) 2019, Intel Corporation. 4 * Copyright (c) 2019, Intel Corporation.
diff --git a/include/uapi/linux/jffs2.h b/include/uapi/linux/jffs2.h
index a18b719f49d4..784ba0b9690a 100644
--- a/include/uapi/linux/jffs2.h
+++ b/include/uapi/linux/jffs2.h
@@ -77,11 +77,6 @@
77 77
78#define JFFS2_ACL_VERSION 0x0001 78#define JFFS2_ACL_VERSION 0x0001
79 79
80// Maybe later...
81//#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
82//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4)
83
84
85#define JFFS2_INO_FLAG_PREREAD 1 /* Do read_inode() for this one at 80#define JFFS2_INO_FLAG_PREREAD 1 /* Do read_inode() for this one at
86 mount time, don't wait for it to 81 mount time, don't wait for it to
87 happen later */ 82 happen later */
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index 070d1bc7e725..20917c59f39c 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -410,21 +410,6 @@ struct kfd_ioctl_unmap_memory_from_gpu_args {
410 __u32 n_success; /* to/from KFD */ 410 __u32 n_success; /* to/from KFD */
411}; 411};
412 412
413/* Allocate GWS for specific queue
414 *
415 * @gpu_id: device identifier
416 * @queue_id: queue's id that GWS is allocated for
417 * @num_gws: how many GWS to allocate
418 * @first_gws: index of the first GWS allocated.
419 * only support contiguous GWS allocation
420 */
421struct kfd_ioctl_alloc_queue_gws_args {
422 __u32 gpu_id; /* to KFD */
423 __u32 queue_id; /* to KFD */
424 __u32 num_gws; /* to KFD */
425 __u32 first_gws; /* from KFD */
426};
427
428struct kfd_ioctl_get_dmabuf_info_args { 413struct kfd_ioctl_get_dmabuf_info_args {
429 __u64 size; /* from KFD */ 414 __u64 size; /* from KFD */
430 __u64 metadata_ptr; /* to KFD */ 415 __u64 metadata_ptr; /* to KFD */
@@ -544,10 +529,7 @@ enum kfd_mmio_remap {
544#define AMDKFD_IOC_IMPORT_DMABUF \ 529#define AMDKFD_IOC_IMPORT_DMABUF \
545 AMDKFD_IOWR(0x1D, struct kfd_ioctl_import_dmabuf_args) 530 AMDKFD_IOWR(0x1D, struct kfd_ioctl_import_dmabuf_args)
546 531
547#define AMDKFD_IOC_ALLOC_QUEUE_GWS \
548 AMDKFD_IOWR(0x1E, struct kfd_ioctl_alloc_queue_gws_args)
549
550#define AMDKFD_COMMAND_START 0x01 532#define AMDKFD_COMMAND_START 0x01
551#define AMDKFD_COMMAND_END 0x1F 533#define AMDKFD_COMMAND_END 0x1E
552 534
553#endif 535#endif
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index a7c19540ce21..5e3f12d5359e 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -116,7 +116,7 @@ struct kvm_irq_level {
116 * ACPI gsi notion of irq. 116 * ACPI gsi notion of irq.
117 * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47.. 117 * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47..
118 * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23.. 118 * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23..
119 * For ARM: See Documentation/virtual/kvm/api.txt 119 * For ARM: See Documentation/virt/kvm/api.txt
120 */ 120 */
121 union { 121 union {
122 __u32 irq; 122 __u32 irq;
@@ -1086,7 +1086,7 @@ struct kvm_xen_hvm_config {
1086 * 1086 *
1087 * KVM_IRQFD_FLAG_RESAMPLE indicates resamplefd is valid and specifies 1087 * KVM_IRQFD_FLAG_RESAMPLE indicates resamplefd is valid and specifies
1088 * the irqfd to operate in resampling mode for level triggered interrupt 1088 * the irqfd to operate in resampling mode for level triggered interrupt
1089 * emulation. See Documentation/virtual/kvm/api.txt. 1089 * emulation. See Documentation/virt/kvm/api.txt.
1090 */ 1090 */
1091#define KVM_IRQFD_FLAG_RESAMPLE (1 << 1) 1091#define KVM_IRQFD_FLAG_RESAMPLE (1 << 1)
1092 1092
diff --git a/include/uapi/linux/netfilter/nf_synproxy.h b/include/uapi/linux/netfilter/nf_synproxy.h
index 6f3791c8946f..00d787f0260e 100644
--- a/include/uapi/linux/netfilter/nf_synproxy.h
+++ b/include/uapi/linux/netfilter/nf_synproxy.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _NF_SYNPROXY_H 2#ifndef _NF_SYNPROXY_H
3#define _NF_SYNPROXY_H 3#define _NF_SYNPROXY_H
4 4
diff --git a/include/uapi/linux/netfilter/xt_connlabel.h b/include/uapi/linux/netfilter/xt_connlabel.h
index 2312f0ec07b2..323f0dfc2a4e 100644
--- a/include/uapi/linux/netfilter/xt_connlabel.h
+++ b/include/uapi/linux/netfilter/xt_connlabel.h
@@ -1,4 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
3#ifndef _UAPI_XT_CONNLABEL_H
4#define _UAPI_XT_CONNLABEL_H
5
2#include <linux/types.h> 6#include <linux/types.h>
3 7
4#define XT_CONNLABEL_MAXBIT 127 8#define XT_CONNLABEL_MAXBIT 127
@@ -11,3 +15,5 @@ struct xt_connlabel_mtinfo {
11 __u16 bit; 15 __u16 bit;
12 __u16 options; 16 __u16 options;
13}; 17};
18
19#endif /* _UAPI_XT_CONNLABEL_H */
diff --git a/include/uapi/linux/netfilter/xt_nfacct.h b/include/uapi/linux/netfilter/xt_nfacct.h
index 5c8a4d760ee3..b5123ab8d54a 100644
--- a/include/uapi/linux/netfilter/xt_nfacct.h
+++ b/include/uapi/linux/netfilter/xt_nfacct.h
@@ -11,4 +11,9 @@ struct xt_nfacct_match_info {
11 struct nf_acct *nfacct; 11 struct nf_acct *nfacct;
12}; 12};
13 13
14struct xt_nfacct_match_info_v1 {
15 char name[NFACCT_NAME_MAX];
16 struct nf_acct *nfacct __attribute__((aligned(8)));
17};
18
14#endif /* _XT_NFACCT_MATCH_H */ 19#endif /* _XT_NFACCT_MATCH_H */
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 75758ec26c8b..beb9a9d0c00a 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2863,7 +2863,7 @@ enum nl80211_attrs {
2863#define NL80211_HT_CAPABILITY_LEN 26 2863#define NL80211_HT_CAPABILITY_LEN 26
2864#define NL80211_VHT_CAPABILITY_LEN 12 2864#define NL80211_VHT_CAPABILITY_LEN 12
2865#define NL80211_HE_MIN_CAPABILITY_LEN 16 2865#define NL80211_HE_MIN_CAPABILITY_LEN 16
2866#define NL80211_HE_MAX_CAPABILITY_LEN 51 2866#define NL80211_HE_MAX_CAPABILITY_LEN 54
2867#define NL80211_MAX_NR_CIPHER_SUITES 5 2867#define NL80211_MAX_NR_CIPHER_SUITES 5
2868#define NL80211_MAX_NR_AKM_SUITES 2 2868#define NL80211_MAX_NR_AKM_SUITES 2
2869 2869
diff --git a/include/uapi/linux/psp-sev.h b/include/uapi/linux/psp-sev.h
index 8654b2442f6a..592a0c1b77c9 100644
--- a/include/uapi/linux/psp-sev.h
+++ b/include/uapi/linux/psp-sev.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-only */ 1/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
2/* 2/*
3 * Userspace interface for AMD Secure Encrypted Virtualization (SEV) 3 * Userspace interface for AMD Secure Encrypted Virtualization (SEV)
4 * platform management commands. 4 * platform management commands.
diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h
index fd6b5f66e2c5..cba368e55863 100644
--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -250,6 +250,7 @@ struct rds_info_rdma_connection {
250 __u32 rdma_mr_max; 250 __u32 rdma_mr_max;
251 __u32 rdma_mr_size; 251 __u32 rdma_mr_size;
252 __u8 tos; 252 __u8 tos;
253 __u8 sl;
253 __u32 cache_allocs; 254 __u32 cache_allocs;
254}; 255};
255 256
@@ -265,6 +266,7 @@ struct rds6_info_rdma_connection {
265 __u32 rdma_mr_max; 266 __u32 rdma_mr_max;
266 __u32 rdma_mr_size; 267 __u32 rdma_mr_size;
267 __u8 tos; 268 __u8 tos;
269 __u8 sl;
268 __u32 cache_allocs; 270 __u32 cache_allocs;
269}; 271};
270 272
diff --git a/include/uapi/linux/rxrpc.h b/include/uapi/linux/rxrpc.h
index 782069dcf607..4accfa7e266d 100644
--- a/include/uapi/linux/rxrpc.h
+++ b/include/uapi/linux/rxrpc.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 1/* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
2/* Types and definitions for AF_RXRPC. 2/* Types and definitions for AF_RXRPC.
3 * 3 *
4 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. 4 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
index 5642c05e0da0..3cc3af1c2ee1 100644
--- a/include/uapi/linux/serial_core.h
+++ b/include/uapi/linux/serial_core.h
@@ -150,9 +150,6 @@
150 150
151#define PORT_PNX8XXX 70 151#define PORT_PNX8XXX 70
152 152
153/* Hilscher netx */
154#define PORT_NETX 71
155
156/* SUN4V Hypervisor Console */ 153/* SUN4V Hypervisor Console */
157#define PORT_SUNHV 72 154#define PORT_SUNHV 72
158 155
diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
index 8eb96021709c..c3409c8ec0dd 100644
--- a/include/uapi/linux/socket.h
+++ b/include/uapi/linux/socket.h
@@ -6,17 +6,24 @@
6 * Desired design of maximum size and alignment (see RFC2553) 6 * Desired design of maximum size and alignment (see RFC2553)
7 */ 7 */
8#define _K_SS_MAXSIZE 128 /* Implementation specific max size */ 8#define _K_SS_MAXSIZE 128 /* Implementation specific max size */
9#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
10 /* Implementation specific desired alignment */
11 9
12typedef unsigned short __kernel_sa_family_t; 10typedef unsigned short __kernel_sa_family_t;
13 11
12/*
13 * The definition uses anonymous union and struct in order to control the
14 * default alignment.
15 */
14struct __kernel_sockaddr_storage { 16struct __kernel_sockaddr_storage {
15 __kernel_sa_family_t ss_family; /* address family */ 17 union {
16 /* Following field(s) are implementation specific */ 18 struct {
17 char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; 19 __kernel_sa_family_t ss_family; /* address family */
20 /* Following field(s) are implementation specific */
21 char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
18 /* space to achieve desired size, */ 22 /* space to achieve desired size, */
19 /* _SS_MAXSIZE value minus size of ss_family */ 23 /* _SS_MAXSIZE value minus size of ss_family */
20} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ 24 };
25 void *__align; /* implementation specific desired alignment */
26 };
27};
21 28
22#endif /* _UAPI_LINUX_SOCKET_H */ 29#endif /* _UAPI_LINUX_SOCKET_H */
diff --git a/include/uapi/linux/usb/g_uvc.h b/include/uapi/linux/usb/g_uvc.h
index 3c9ee3020cbb..652f169a019e 100644
--- a/include/uapi/linux/usb/g_uvc.h
+++ b/include/uapi/linux/usb/g_uvc.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0+ */ 1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2/* 2/*
3 * g_uvc.h -- USB Video Class Gadget driver API 3 * g_uvc.h -- USB Video Class Gadget driver API
4 * 4 *
diff --git a/include/uapi/linux/vbox_vmmdev_types.h b/include/uapi/linux/vbox_vmmdev_types.h
index 26f39816af14..c27289fd619a 100644
--- a/include/uapi/linux/vbox_vmmdev_types.h
+++ b/include/uapi/linux/vbox_vmmdev_types.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: (GPL-2.0 OR CDDL-1.0) */ 1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */
2/* 2/*
3 * Virtual Device for Guest <-> VMM/Host communication, type definitions 3 * Virtual Device for Guest <-> VMM/Host communication, type definitions
4 * which are also used for the vboxguest ioctl interface / by vboxsf 4 * which are also used for the vboxguest ioctl interface / by vboxsf
diff --git a/include/uapi/linux/vboxguest.h b/include/uapi/linux/vboxguest.h
index 612f0c7d3558..9cec58a6a5ea 100644
--- a/include/uapi/linux/vboxguest.h
+++ b/include/uapi/linux/vboxguest.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: (GPL-2.0 OR CDDL-1.0) */ 1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */
2/* 2/*
3 * VBoxGuest - VirtualBox Guest Additions Driver Interface. 3 * VBoxGuest - VirtualBox Guest Additions Driver Interface.
4 * 4 *
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 9d9705ceda76..2427bc4d8eba 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -518,7 +518,13 @@ struct v4l2_pix_format {
518#define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */ 518#define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */
519#define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */ 519#define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */
520#define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */ 520#define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */
521#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('B', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */ 521
522/*
523 * Originally this had 'BA12' as fourcc, but this clashed with the older
524 * V4L2_PIX_FMT_SGRBG12 which inexplicably used that same fourcc.
525 * So use 'GA12' instead for V4L2_PIX_FMT_BGRA444.
526 */
527#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */
522#define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */ 528#define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */
523#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ 529#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
524#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ 530#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */
diff --git a/include/uapi/linux/virtio_iommu.h b/include/uapi/linux/virtio_iommu.h
index ba1b460c9944..237e36a280cb 100644
--- a/include/uapi/linux/virtio_iommu.h
+++ b/include/uapi/linux/virtio_iommu.h
@@ -1,8 +1,8 @@
1/* SPDX-License-Identifier: BSD-3-Clause */ 1/* SPDX-License-Identifier: BSD-3-Clause */
2/* 2/*
3 * Virtio-iommu definition v0.9 3 * Virtio-iommu definition v0.12
4 * 4 *
5 * Copyright (C) 2018 Arm Ltd. 5 * Copyright (C) 2019 Arm Ltd.
6 */ 6 */
7#ifndef _UAPI_LINUX_VIRTIO_IOMMU_H 7#ifndef _UAPI_LINUX_VIRTIO_IOMMU_H
8#define _UAPI_LINUX_VIRTIO_IOMMU_H 8#define _UAPI_LINUX_VIRTIO_IOMMU_H
@@ -11,26 +11,31 @@
11 11
12/* Feature bits */ 12/* Feature bits */
13#define VIRTIO_IOMMU_F_INPUT_RANGE 0 13#define VIRTIO_IOMMU_F_INPUT_RANGE 0
14#define VIRTIO_IOMMU_F_DOMAIN_BITS 1 14#define VIRTIO_IOMMU_F_DOMAIN_RANGE 1
15#define VIRTIO_IOMMU_F_MAP_UNMAP 2 15#define VIRTIO_IOMMU_F_MAP_UNMAP 2
16#define VIRTIO_IOMMU_F_BYPASS 3 16#define VIRTIO_IOMMU_F_BYPASS 3
17#define VIRTIO_IOMMU_F_PROBE 4 17#define VIRTIO_IOMMU_F_PROBE 4
18#define VIRTIO_IOMMU_F_MMIO 5
18 19
19struct virtio_iommu_range { 20struct virtio_iommu_range_64 {
20 __u64 start; 21 __le64 start;
21 __u64 end; 22 __le64 end;
23};
24
25struct virtio_iommu_range_32 {
26 __le32 start;
27 __le32 end;
22}; 28};
23 29
24struct virtio_iommu_config { 30struct virtio_iommu_config {
25 /* Supported page sizes */ 31 /* Supported page sizes */
26 __u64 page_size_mask; 32 __le64 page_size_mask;
27 /* Supported IOVA range */ 33 /* Supported IOVA range */
28 struct virtio_iommu_range input_range; 34 struct virtio_iommu_range_64 input_range;
29 /* Max domain ID size */ 35 /* Max domain ID size */
30 __u8 domain_bits; 36 struct virtio_iommu_range_32 domain_range;
31 __u8 padding[3];
32 /* Probe buffer size */ 37 /* Probe buffer size */
33 __u32 probe_size; 38 __le32 probe_size;
34}; 39};
35 40
36/* Request types */ 41/* Request types */
@@ -49,6 +54,7 @@ struct virtio_iommu_config {
49#define VIRTIO_IOMMU_S_RANGE 0x05 54#define VIRTIO_IOMMU_S_RANGE 0x05
50#define VIRTIO_IOMMU_S_NOENT 0x06 55#define VIRTIO_IOMMU_S_NOENT 0x06
51#define VIRTIO_IOMMU_S_FAULT 0x07 56#define VIRTIO_IOMMU_S_FAULT 0x07
57#define VIRTIO_IOMMU_S_NOMEM 0x08
52 58
53struct virtio_iommu_req_head { 59struct virtio_iommu_req_head {
54 __u8 type; 60 __u8 type;
@@ -78,12 +84,10 @@ struct virtio_iommu_req_detach {
78 84
79#define VIRTIO_IOMMU_MAP_F_READ (1 << 0) 85#define VIRTIO_IOMMU_MAP_F_READ (1 << 0)
80#define VIRTIO_IOMMU_MAP_F_WRITE (1 << 1) 86#define VIRTIO_IOMMU_MAP_F_WRITE (1 << 1)
81#define VIRTIO_IOMMU_MAP_F_EXEC (1 << 2) 87#define VIRTIO_IOMMU_MAP_F_MMIO (1 << 2)
82#define VIRTIO_IOMMU_MAP_F_MMIO (1 << 3)
83 88
84#define VIRTIO_IOMMU_MAP_F_MASK (VIRTIO_IOMMU_MAP_F_READ | \ 89#define VIRTIO_IOMMU_MAP_F_MASK (VIRTIO_IOMMU_MAP_F_READ | \
85 VIRTIO_IOMMU_MAP_F_WRITE | \ 90 VIRTIO_IOMMU_MAP_F_WRITE | \
86 VIRTIO_IOMMU_MAP_F_EXEC | \
87 VIRTIO_IOMMU_MAP_F_MMIO) 91 VIRTIO_IOMMU_MAP_F_MMIO)
88 92
89struct virtio_iommu_req_map { 93struct virtio_iommu_req_map {
diff --git a/include/uapi/linux/virtio_pmem.h b/include/uapi/linux/virtio_pmem.h
index 9a63ed6d062f..b022787ffb94 100644
--- a/include/uapi/linux/virtio_pmem.h
+++ b/include/uapi/linux/virtio_pmem.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause */
2/* 2/*
3 * Definitions for virtio-pmem devices. 3 * Definitions for virtio-pmem devices.
4 * 4 *
diff --git a/include/uapi/linux/vmcore.h b/include/uapi/linux/vmcore.h
index 022619668e0e..3e9da91866ff 100644
--- a/include/uapi/linux/vmcore.h
+++ b/include/uapi/linux/vmcore.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _UAPI_VMCORE_H 2#ifndef _UAPI_VMCORE_H
3#define _UAPI_VMCORE_H 3#define _UAPI_VMCORE_H
4 4
diff --git a/include/uapi/linux/wmi.h b/include/uapi/linux/wmi.h
index c36f2d7675a4..7085c5dca9fa 100644
--- a/include/uapi/linux/wmi.h
+++ b/include/uapi/linux/wmi.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-only */ 1/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
2/* 2/*
3 * User API methods for ACPI-WMI mapping driver 3 * User API methods for ACPI-WMI mapping driver
4 * 4 *
diff --git a/include/uapi/misc/fastrpc.h b/include/uapi/misc/fastrpc.h
index 6d701af9fc42..fb792e882cef 100644
--- a/include/uapi/misc/fastrpc.h
+++ b/include/uapi/misc/fastrpc.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 2
3#ifndef __QCOM_FASTRPC_H__ 3#ifndef __QCOM_FASTRPC_H__
4#define __QCOM_FASTRPC_H__ 4#define __QCOM_FASTRPC_H__
diff --git a/include/uapi/rdma/rvt-abi.h b/include/uapi/rdma/rvt-abi.h
index 7328293c715c..7c05a02d2be5 100644
--- a/include/uapi/rdma/rvt-abi.h
+++ b/include/uapi/rdma/rvt-abi.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2 2
3/* 3/*
4 * This file contains defines, structures, etc. that are used 4 * This file contains defines, structures, etc. that are used
diff --git a/include/uapi/rdma/siw-abi.h b/include/uapi/rdma/siw-abi.h
index 3dd8071ace7b..af735f55b291 100644
--- a/include/uapi/rdma/siw-abi.h
+++ b/include/uapi/rdma/siw-abi.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ 1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) or BSD-3-Clause */
2 2
3/* Authors: Bernard Metzler <bmt@zurich.ibm.com> */ 3/* Authors: Bernard Metzler <bmt@zurich.ibm.com> */
4/* Copyright (c) 2008-2019, IBM Corporation */ 4/* Copyright (c) 2008-2019, IBM Corporation */
@@ -180,6 +180,7 @@ struct siw_cqe {
180 * to control CQ arming. 180 * to control CQ arming.
181 */ 181 */
182struct siw_cq_ctrl { 182struct siw_cq_ctrl {
183 __aligned_u64 notify; 183 __u32 flags;
184 __u32 pad;
184}; 185};
185#endif 186#endif
diff --git a/include/uapi/scsi/scsi_bsg_ufs.h b/include/uapi/scsi/scsi_bsg_ufs.h
index 17c7abd0803a..9988db6ad244 100644
--- a/include/uapi/scsi/scsi_bsg_ufs.h
+++ b/include/uapi/scsi/scsi_bsg_ufs.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* 2/*
3 * UFS Transport SGIO v4 BSG Message Support 3 * UFS Transport SGIO v4 BSG Message Support
4 * 4 *
diff --git a/include/uapi/sound/skl-tplg-interface.h b/include/uapi/sound/skl-tplg-interface.h
index f39352cef382..9eee32f5e407 100644
--- a/include/uapi/sound/skl-tplg-interface.h
+++ b/include/uapi/sound/skl-tplg-interface.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* 2/*
3 * skl-tplg-interface.h - Intel DSP FW private data interface 3 * skl-tplg-interface.h - Intel DSP FW private data interface
4 * 4 *
diff --git a/include/uapi/sound/sof/abi.h b/include/uapi/sound/sof/abi.h
index 4a9c24434f42..a0fe0d4c4b66 100644
--- a/include/uapi/sound/sof/abi.h
+++ b/include/uapi/sound/sof/abi.h
@@ -26,7 +26,7 @@
26 26
27/* SOF ABI version major, minor and patch numbers */ 27/* SOF ABI version major, minor and patch numbers */
28#define SOF_ABI_MAJOR 3 28#define SOF_ABI_MAJOR 3
29#define SOF_ABI_MINOR 8 29#define SOF_ABI_MINOR 10
30#define SOF_ABI_PATCH 0 30#define SOF_ABI_PATCH 0
31 31
32/* SOF ABI version number. Format within 32bit word is MMmmmppp */ 32/* SOF ABI version number. Format within 32bit word is MMmmmppp */
diff --git a/include/uapi/sound/sof/tokens.h b/include/uapi/sound/sof/tokens.h
index dc1b27daaac6..8f996857fb24 100644
--- a/include/uapi/sound/sof/tokens.h
+++ b/include/uapi/sound/sof/tokens.h
@@ -75,6 +75,7 @@
75#define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 503 75#define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 503
76#define SOF_TKN_INTEL_SSP_QUIRKS 504 76#define SOF_TKN_INTEL_SSP_QUIRKS 504
77#define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT 505 77#define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT 505
78#define SOF_TKN_INTEL_SSP_BCLK_DELAY 506
78 79
79/* DMIC */ 80/* DMIC */
80#define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600 81#define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600
@@ -105,4 +106,12 @@
105/* for backward compatibility */ 106/* for backward compatibility */
106#define SOF_TKN_EFFECT_TYPE SOF_TKN_PROCESS_TYPE 107#define SOF_TKN_EFFECT_TYPE SOF_TKN_PROCESS_TYPE
107 108
109/* SAI */
110#define SOF_TKN_IMX_SAI_FIRST_TOKEN 1000
111/* TODO: Add SAI tokens */
112
113/* ESAI */
114#define SOF_TKN_IMX_ESAI_FIRST_TOKEN 1100
115/* TODO: Add ESAI tokens */
116
108#endif 117#endif
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index 4969817124a8..98b30c1613b2 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -109,6 +109,9 @@ static inline int xen_xlate_unmap_gfn_range(struct vm_area_struct *vma,
109} 109}
110#endif 110#endif
111 111
112int xen_remap_vma_range(struct vm_area_struct *vma, unsigned long addr,
113 unsigned long len);
114
112/* 115/*
113 * xen_remap_domain_gfn_array() - map an array of foreign frames by gfn 116 * xen_remap_domain_gfn_array() - map an array of foreign frames by gfn
114 * @vma: VMA to map the pages into 117 * @vma: VMA to map the pages into