mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 12:53:04 -04:00
Merge tag 'asoc-v5.8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v5.8 This has been another very active release with a bunch of new drivers, lots of fixes everywhere and continued core improvements from Morimoto-san: - Lots of core cleanups and refactorings from Morimoto-san, factoring out common operations and making the card abstraction more solid. - Continued work on cleaning up and improving the Intel drivers, along with some new platform support for them. - Fixes to make the Marvell SSPA driver work upstream. - Support for AMD Renoir ACP, Dialog DA7212, Freescale EASRC and i.MX8M, Intel Elkhard Lake, Maxim MAX98390, Nuvoton NAU8812 and NAU8814 and Realtek RT1016.
This commit is contained in:
@@ -56,6 +56,7 @@ mandatory-y += topology.h
|
||||
mandatory-y += trace_clock.h
|
||||
mandatory-y += uaccess.h
|
||||
mandatory-y += unaligned.h
|
||||
mandatory-y += vermagic.h
|
||||
mandatory-y += vga.h
|
||||
mandatory-y += word-at-a-time.h
|
||||
mandatory-y += xor.h
|
||||
|
||||
7
include/asm-generic/vermagic.h
Normal file
7
include/asm-generic/vermagic.h
Normal file
@@ -0,0 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _ASM_GENERIC_VERMAGIC_H
|
||||
#define _ASM_GENERIC_VERMAGIC_H
|
||||
|
||||
#define MODULE_ARCH_VERMAGIC ""
|
||||
|
||||
#endif /* _ASM_GENERIC_VERMAGIC_H */
|
||||
@@ -48,7 +48,7 @@ struct videomode;
|
||||
* @MODE_HSYNC: hsync out of range
|
||||
* @MODE_VSYNC: vsync out of range
|
||||
* @MODE_H_ILLEGAL: mode has illegal horizontal timings
|
||||
* @MODE_V_ILLEGAL: mode has illegal horizontal timings
|
||||
* @MODE_V_ILLEGAL: mode has illegal vertical timings
|
||||
* @MODE_BAD_WIDTH: requires an unsupported linepitch
|
||||
* @MODE_NOMODE: no mode with a matching name
|
||||
* @MODE_NO_INTERLACE: interlaced mode not supported
|
||||
|
||||
@@ -65,6 +65,7 @@ struct amba_device {
|
||||
struct device dev;
|
||||
struct resource res;
|
||||
struct clk *pclk;
|
||||
struct device_dma_parameters dma_parms;
|
||||
unsigned int periphid;
|
||||
unsigned int cid;
|
||||
struct amba_cs_uci_id uci;
|
||||
|
||||
@@ -54,7 +54,6 @@ enum wb_reason {
|
||||
WB_REASON_SYNC,
|
||||
WB_REASON_PERIODIC,
|
||||
WB_REASON_LAPTOP_TIMER,
|
||||
WB_REASON_FREE_MORE_MEM,
|
||||
WB_REASON_FS_FREE_SPACE,
|
||||
/*
|
||||
* There is no bdi forker thread any more and works are done
|
||||
@@ -220,6 +219,7 @@ struct backing_dev_info {
|
||||
wait_queue_head_t wb_waitq;
|
||||
|
||||
struct device *dev;
|
||||
char dev_name[64];
|
||||
struct device *owner;
|
||||
|
||||
struct timer_list laptop_mode_wb_timer;
|
||||
|
||||
@@ -505,13 +505,6 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi)
|
||||
(1 << WB_async_congested));
|
||||
}
|
||||
|
||||
extern const char *bdi_unknown_name;
|
||||
|
||||
static inline const char *bdi_dev_name(struct backing_dev_info *bdi)
|
||||
{
|
||||
if (!bdi || !bdi->dev)
|
||||
return bdi_unknown_name;
|
||||
return dev_name(bdi->dev);
|
||||
}
|
||||
const char *bdi_dev_name(struct backing_dev_info *bdi);
|
||||
|
||||
#endif /* _LINUX_BACKING_DEV_H */
|
||||
|
||||
@@ -245,6 +245,7 @@
|
||||
#define BCM54810_EXP_BROADREACH_LRE_MISC_CTL_EN (1 << 0)
|
||||
#define BCM54810_SHD_CLK_CTL 0x3
|
||||
#define BCM54810_SHD_CLK_CTL_GTXCLK_EN (1 << 9)
|
||||
#define BCM54810_SHD_SCR3_TRDDAPD 0x0100
|
||||
|
||||
/* BCM54612E Registers */
|
||||
#define BCM54612E_EXP_SPARE0 (MII_BCM54XX_EXP_SEL_ETC + 0x34)
|
||||
|
||||
@@ -356,4 +356,10 @@ static inline void *offset_to_ptr(const int *off)
|
||||
/* &a[0] degrades to a pointer: a different type from an array */
|
||||
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
|
||||
|
||||
/*
|
||||
* This is needed in functions which generate the stack canary, see
|
||||
* arch/x86/kernel/smpboot.c::start_secondary() for an example.
|
||||
*/
|
||||
#define prevent_tail_call_optimization() mb()
|
||||
|
||||
#endif /* __LINUX_COMPILER_H */
|
||||
|
||||
@@ -521,6 +521,15 @@ struct cper_sec_pcie {
|
||||
u8 aer_info[96];
|
||||
};
|
||||
|
||||
/* Firmware Error Record Reference, UEFI v2.7 sec N.2.10 */
|
||||
struct cper_sec_fw_err_rec_ref {
|
||||
u8 record_type;
|
||||
u8 revision;
|
||||
u8 reserved[6];
|
||||
u64 record_identifier;
|
||||
guid_t record_identifier_guid;
|
||||
};
|
||||
|
||||
/* Reset to default packing */
|
||||
#pragma pack()
|
||||
|
||||
|
||||
@@ -103,8 +103,8 @@ void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent,
|
||||
u8 *value);
|
||||
void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent,
|
||||
u16 *value);
|
||||
struct dentry *debugfs_create_u32(const char *name, umode_t mode,
|
||||
struct dentry *parent, u32 *value);
|
||||
void debugfs_create_u32(const char *name, umode_t mode, struct dentry *parent,
|
||||
u32 *value);
|
||||
void debugfs_create_u64(const char *name, umode_t mode, struct dentry *parent,
|
||||
u64 *value);
|
||||
struct dentry *debugfs_create_ulong(const char *name, umode_t mode,
|
||||
@@ -250,12 +250,8 @@ static inline void debugfs_create_u8(const char *name, umode_t mode,
|
||||
static inline void debugfs_create_u16(const char *name, umode_t mode,
|
||||
struct dentry *parent, u16 *value) { }
|
||||
|
||||
static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode,
|
||||
struct dentry *parent,
|
||||
u32 *value)
|
||||
{
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
static inline void debugfs_create_u32(const char *name, umode_t mode,
|
||||
struct dentry *parent, u32 *value) { }
|
||||
|
||||
static inline void debugfs_create_u64(const char *name, umode_t mode,
|
||||
struct dentry *parent, u64 *value) { }
|
||||
|
||||
@@ -329,13 +329,12 @@ struct dma_buf {
|
||||
|
||||
/**
|
||||
* struct dma_buf_attach_ops - importer operations for an attachment
|
||||
* @move_notify: [optional] notification that the DMA-buf is moving
|
||||
*
|
||||
* Attachment operations implemented by the importer.
|
||||
*/
|
||||
struct dma_buf_attach_ops {
|
||||
/**
|
||||
* @move_notify
|
||||
* @move_notify: [optional] notification that the DMA-buf is moving
|
||||
*
|
||||
* If this callback is provided the framework can avoid pinning the
|
||||
* backing store while mappings exists.
|
||||
|
||||
@@ -83,9 +83,9 @@ enum dma_transfer_direction {
|
||||
/**
|
||||
* Interleaved Transfer Request
|
||||
* ----------------------------
|
||||
* A chunk is collection of contiguous bytes to be transfered.
|
||||
* A chunk is collection of contiguous bytes to be transferred.
|
||||
* The gap(in bytes) between two chunks is called inter-chunk-gap(ICG).
|
||||
* ICGs may or maynot change between chunks.
|
||||
* ICGs may or may not change between chunks.
|
||||
* A FRAME is the smallest series of contiguous {chunk,icg} pairs,
|
||||
* that when repeated an integral number of times, specifies the transfer.
|
||||
* A transfer template is specification of a Frame, the number of times
|
||||
@@ -341,13 +341,11 @@ struct dma_chan {
|
||||
* @chan: driver channel device
|
||||
* @device: sysfs device
|
||||
* @dev_id: parent dma_device dev_id
|
||||
* @idr_ref: reference count to gate release of dma_device dev_id
|
||||
*/
|
||||
struct dma_chan_dev {
|
||||
struct dma_chan *chan;
|
||||
struct device device;
|
||||
int dev_id;
|
||||
atomic_t *idr_ref;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -835,6 +833,8 @@ struct dma_device {
|
||||
int dev_id;
|
||||
struct device *dev;
|
||||
struct module *owner;
|
||||
struct ida chan_ida;
|
||||
struct mutex chan_mutex; /* to protect chan_ida */
|
||||
|
||||
u32 src_addr_widths;
|
||||
u32 dst_addr_widths;
|
||||
@@ -1069,7 +1069,7 @@ static inline int dmaengine_terminate_all(struct dma_chan *chan)
|
||||
* dmaengine_synchronize() needs to be called before it is safe to free
|
||||
* any memory that is accessed by previously submitted descriptors or before
|
||||
* freeing any resources accessed from within the completion callback of any
|
||||
* perviously submitted descriptors.
|
||||
* previously submitted descriptors.
|
||||
*
|
||||
* This function can be called from atomic context as well as from within a
|
||||
* complete callback of a descriptor submitted on the same channel.
|
||||
@@ -1091,7 +1091,7 @@ static inline int dmaengine_terminate_async(struct dma_chan *chan)
|
||||
*
|
||||
* Synchronizes to the DMA channel termination to the current context. When this
|
||||
* function returns it is guaranteed that all transfers for previously issued
|
||||
* descriptors have stopped and and it is safe to free the memory assoicated
|
||||
* descriptors have stopped and it is safe to free the memory associated
|
||||
* with them. Furthermore it is guaranteed that all complete callback functions
|
||||
* for a previously submitted descriptor have finished running and it is safe to
|
||||
* free resources accessed from within the complete callbacks.
|
||||
|
||||
@@ -1245,4 +1245,6 @@ struct linux_efi_memreserve {
|
||||
|
||||
void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size);
|
||||
|
||||
char *efi_systab_show_arch(char *str);
|
||||
|
||||
#endif /* _LINUX_EFI_H */
|
||||
|
||||
@@ -983,7 +983,7 @@ struct file_handle {
|
||||
__u32 handle_bytes;
|
||||
int handle_type;
|
||||
/* file identifier */
|
||||
unsigned char f_handle[0];
|
||||
unsigned char f_handle[];
|
||||
};
|
||||
|
||||
static inline struct file *get_file(struct file *f)
|
||||
|
||||
@@ -210,6 +210,29 @@ struct ftrace_ops {
|
||||
#endif
|
||||
};
|
||||
|
||||
extern struct ftrace_ops __rcu *ftrace_ops_list;
|
||||
extern struct ftrace_ops ftrace_list_end;
|
||||
|
||||
/*
|
||||
* Traverse the ftrace_global_list, invoking all entries. The reason that we
|
||||
* can use rcu_dereference_raw_check() is that elements removed from this list
|
||||
* are simply leaked, so there is no need to interact with a grace-period
|
||||
* mechanism. The rcu_dereference_raw_check() calls are needed to handle
|
||||
* concurrent insertions into the ftrace_global_list.
|
||||
*
|
||||
* Silly Alpha and silly pointer-speculation compiler optimizations!
|
||||
*/
|
||||
#define do_for_each_ftrace_op(op, list) \
|
||||
op = rcu_dereference_raw_check(list); \
|
||||
do
|
||||
|
||||
/*
|
||||
* Optimized for just a single item in the list (as that is the normal case).
|
||||
*/
|
||||
#define while_for_each_ftrace_op(op) \
|
||||
while (likely(op = rcu_dereference_raw_check((op)->next)) && \
|
||||
unlikely((op) != &ftrace_list_end))
|
||||
|
||||
/*
|
||||
* Type of the current tracing.
|
||||
*/
|
||||
|
||||
@@ -17,9 +17,12 @@ enum host1x_class {
|
||||
HOST1X_CLASS_GR3D = 0x60,
|
||||
};
|
||||
|
||||
struct host1x;
|
||||
struct host1x_client;
|
||||
struct iommu_group;
|
||||
|
||||
u64 host1x_get_dma_mask(struct host1x *host1x);
|
||||
|
||||
/**
|
||||
* struct host1x_client_ops - host1x client operations
|
||||
* @init: host1x client initialization code
|
||||
|
||||
@@ -29,7 +29,7 @@ struct i2c_mux_core {
|
||||
|
||||
int num_adapters;
|
||||
int max_adapters;
|
||||
struct i2c_adapter *adapter[0];
|
||||
struct i2c_adapter *adapter[];
|
||||
};
|
||||
|
||||
struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* i2c.h - definitions for the Linux i2c bus interface
|
||||
* Copyright (C) 1995-2000 Simon G. Vogl
|
||||
* Copyright (C) 2013-2019 Wolfram Sang <wsa@the-dreams.de>
|
||||
* Copyright (C) 2013-2019 Wolfram Sang <wsa@kernel.org>
|
||||
*
|
||||
* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
|
||||
* Frodo Looijaard <frodol@dds.nl>
|
||||
|
||||
@@ -600,7 +600,7 @@ void iio_device_unregister(struct iio_dev *indio_dev);
|
||||
* 0 on success, negative error number on failure.
|
||||
*/
|
||||
#define devm_iio_device_register(dev, indio_dev) \
|
||||
__devm_iio_device_register((dev), (indio_dev), THIS_MODULE);
|
||||
__devm_iio_device_register((dev), (indio_dev), THIS_MODULE)
|
||||
int __devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev,
|
||||
struct module *this_mod);
|
||||
void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev);
|
||||
|
||||
@@ -813,8 +813,11 @@ void kvm_flush_remote_tlbs(struct kvm *kvm);
|
||||
void kvm_reload_remote_mmus(struct kvm *kvm);
|
||||
|
||||
bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req,
|
||||
struct kvm_vcpu *except,
|
||||
unsigned long *vcpu_bitmap, cpumask_var_t tmp);
|
||||
bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req);
|
||||
bool kvm_make_all_cpus_request_except(struct kvm *kvm, unsigned int req,
|
||||
struct kvm_vcpu *except);
|
||||
bool kvm_make_cpus_request_mask(struct kvm *kvm, unsigned int req,
|
||||
unsigned long *vcpu_bitmap);
|
||||
|
||||
@@ -1048,7 +1051,7 @@ search_memslots(struct kvm_memslots *slots, gfn_t gfn)
|
||||
start = slot + 1;
|
||||
}
|
||||
|
||||
if (gfn >= memslots[start].base_gfn &&
|
||||
if (start < slots->used_slots && gfn >= memslots[start].base_gfn &&
|
||||
gfn < memslots[start].base_gfn + memslots[start].npages) {
|
||||
atomic_set(&slots->lru_slot, start);
|
||||
return &memslots[start];
|
||||
|
||||
@@ -55,7 +55,7 @@ LSM_HOOK(void, LSM_RET_VOID, bprm_committing_creds, struct linux_binprm *bprm)
|
||||
LSM_HOOK(void, LSM_RET_VOID, bprm_committed_creds, struct linux_binprm *bprm)
|
||||
LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc,
|
||||
struct fs_context *src_sc)
|
||||
LSM_HOOK(int, 0, fs_context_parse_param, struct fs_context *fc,
|
||||
LSM_HOOK(int, -ENOPARAM, fs_context_parse_param, struct fs_context *fc,
|
||||
struct fs_parameter *param)
|
||||
LSM_HOOK(int, 0, sb_alloc_security, struct super_block *sb)
|
||||
LSM_HOOK(void, LSM_RET_VOID, sb_free_security, struct super_block *sb)
|
||||
@@ -243,7 +243,7 @@ LSM_HOOK(int, -EINVAL, getprocattr, struct task_struct *p, char *name,
|
||||
char **value)
|
||||
LSM_HOOK(int, -EINVAL, setprocattr, const char *name, void *value, size_t size)
|
||||
LSM_HOOK(int, 0, ismaclabel, const char *name)
|
||||
LSM_HOOK(int, 0, secid_to_secctx, u32 secid, char **secdata,
|
||||
LSM_HOOK(int, -EOPNOTSUPP, secid_to_secctx, u32 secid, char **secdata,
|
||||
u32 *seclen)
|
||||
LSM_HOOK(int, 0, secctx_to_secid, const char *secdata, u32 seclen, u32 *secid)
|
||||
LSM_HOOK(void, LSM_RET_VOID, release_secctx, char *secdata, u32 seclen)
|
||||
|
||||
@@ -783,6 +783,8 @@ static inline void memcg_memory_event(struct mem_cgroup *memcg,
|
||||
atomic_long_inc(&memcg->memory_events[event]);
|
||||
cgroup_file_notify(&memcg->events_file);
|
||||
|
||||
if (!cgroup_subsys_on_dfl(memory_cgrp_subsys))
|
||||
break;
|
||||
if (cgrp_dfl_root.flags & CGRP_ROOT_MEMORY_LOCAL_EVENTS)
|
||||
break;
|
||||
} while ((memcg = parent_mem_cgroup(memcg)) &&
|
||||
|
||||
@@ -53,9 +53,9 @@ enum mhi_callback {
|
||||
* @MHI_CHAIN: Linked transfer
|
||||
*/
|
||||
enum mhi_flags {
|
||||
MHI_EOB,
|
||||
MHI_EOT,
|
||||
MHI_CHAIN,
|
||||
MHI_EOB = BIT(0),
|
||||
MHI_EOT = BIT(1),
|
||||
MHI_CHAIN = BIT(2),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -335,14 +335,15 @@ struct mhi_controller_config {
|
||||
* @syserr_worker: System error worker
|
||||
* @state_event: State change event
|
||||
* @status_cb: CB function to notify power states of the device (required)
|
||||
* @link_status: CB function to query link status of the device (required)
|
||||
* @wake_get: CB function to assert device wake (optional)
|
||||
* @wake_put: CB function to de-assert device wake (optional)
|
||||
* @wake_toggle: CB function to assert and de-assert device wake (optional)
|
||||
* @runtime_get: CB function to controller runtime resume (required)
|
||||
* @runtimet_put: CB function to decrement pm usage (required)
|
||||
* @runtime_put: CB function to decrement pm usage (required)
|
||||
* @map_single: CB function to create TRE buffer
|
||||
* @unmap_single: CB function to destroy TRE buffer
|
||||
* @read_reg: Read a MHI register via the physical link (required)
|
||||
* @write_reg: Write a MHI register via the physical link (required)
|
||||
* @buffer_len: Bounce buffer length
|
||||
* @bounce_buf: Use of bounce buffer
|
||||
* @fbc_download: MHI host needs to do complete image transfer (optional)
|
||||
@@ -417,7 +418,6 @@ struct mhi_controller {
|
||||
|
||||
void (*status_cb)(struct mhi_controller *mhi_cntrl,
|
||||
enum mhi_callback cb);
|
||||
int (*link_status)(struct mhi_controller *mhi_cntrl);
|
||||
void (*wake_get)(struct mhi_controller *mhi_cntrl, bool override);
|
||||
void (*wake_put)(struct mhi_controller *mhi_cntrl, bool override);
|
||||
void (*wake_toggle)(struct mhi_controller *mhi_cntrl);
|
||||
@@ -427,6 +427,10 @@ struct mhi_controller {
|
||||
struct mhi_buf_info *buf);
|
||||
void (*unmap_single)(struct mhi_controller *mhi_cntrl,
|
||||
struct mhi_buf_info *buf);
|
||||
int (*read_reg)(struct mhi_controller *mhi_cntrl, void __iomem *addr,
|
||||
u32 *out);
|
||||
void (*write_reg)(struct mhi_controller *mhi_cntrl, void __iomem *addr,
|
||||
u32 val);
|
||||
|
||||
size_t buffer_len;
|
||||
bool bounce_buf;
|
||||
|
||||
@@ -213,6 +213,12 @@ enum mlx5_port_status {
|
||||
MLX5_PORT_DOWN = 2,
|
||||
};
|
||||
|
||||
enum mlx5_cmdif_state {
|
||||
MLX5_CMDIF_STATE_UNINITIALIZED,
|
||||
MLX5_CMDIF_STATE_UP,
|
||||
MLX5_CMDIF_STATE_DOWN,
|
||||
};
|
||||
|
||||
struct mlx5_cmd_first {
|
||||
__be32 data[4];
|
||||
};
|
||||
@@ -258,6 +264,7 @@ struct mlx5_cmd_stats {
|
||||
struct mlx5_cmd {
|
||||
struct mlx5_nb nb;
|
||||
|
||||
enum mlx5_cmdif_state state;
|
||||
void *cmd_alloc_buf;
|
||||
dma_addr_t alloc_dma;
|
||||
int alloc_size;
|
||||
@@ -284,6 +291,7 @@ struct mlx5_cmd {
|
||||
struct semaphore sem;
|
||||
struct semaphore pages_sem;
|
||||
int mode;
|
||||
u16 allowed_opcode;
|
||||
struct mlx5_cmd_work_ent *ent_arr[MLX5_MAX_COMMANDS];
|
||||
struct dma_pool *pool;
|
||||
struct mlx5_cmd_debug dbg;
|
||||
@@ -743,6 +751,7 @@ struct mlx5_cmd_work_ent {
|
||||
struct delayed_work cb_timeout_work;
|
||||
void *context;
|
||||
int idx;
|
||||
struct completion handling;
|
||||
struct completion done;
|
||||
struct mlx5_cmd *cmd;
|
||||
struct work_struct work;
|
||||
@@ -874,10 +883,17 @@ mlx5_frag_buf_get_idx_last_contig_stride(struct mlx5_frag_buf_ctrl *fbc, u32 ix)
|
||||
return min_t(u32, last_frag_stride_idx - fbc->strides_offset, fbc->sz_m1);
|
||||
}
|
||||
|
||||
enum {
|
||||
CMD_ALLOWED_OPCODE_ALL,
|
||||
};
|
||||
|
||||
int mlx5_cmd_init(struct mlx5_core_dev *dev);
|
||||
void mlx5_cmd_cleanup(struct mlx5_core_dev *dev);
|
||||
void mlx5_cmd_set_state(struct mlx5_core_dev *dev,
|
||||
enum mlx5_cmdif_state cmdif_state);
|
||||
void mlx5_cmd_use_events(struct mlx5_core_dev *dev);
|
||||
void mlx5_cmd_use_polling(struct mlx5_core_dev *dev);
|
||||
void mlx5_cmd_allowed_opcode(struct mlx5_core_dev *dev, u16 opcode);
|
||||
|
||||
struct mlx5_async_ctx {
|
||||
struct mlx5_core_dev *dev;
|
||||
|
||||
@@ -1317,11 +1317,13 @@ struct nfs41_impl_id {
|
||||
struct nfstime4 date;
|
||||
};
|
||||
|
||||
#define MAX_BIND_CONN_TO_SESSION_RETRIES 3
|
||||
struct nfs41_bind_conn_to_session_args {
|
||||
struct nfs_client *client;
|
||||
struct nfs4_sessionid sessionid;
|
||||
u32 dir;
|
||||
bool use_conn_in_rdma_mode;
|
||||
int retries;
|
||||
};
|
||||
|
||||
struct nfs41_bind_conn_to_session_res {
|
||||
|
||||
@@ -185,6 +185,7 @@ int cros_ec_sensorhub_register_push_data(struct cros_ec_sensorhub *sensorhub,
|
||||
void cros_ec_sensorhub_unregister_push_data(struct cros_ec_sensorhub *sensorhub,
|
||||
u8 sensor_num);
|
||||
|
||||
int cros_ec_sensorhub_ring_allocate(struct cros_ec_sensorhub *sensorhub);
|
||||
int cros_ec_sensorhub_ring_add(struct cros_ec_sensorhub *sensorhub);
|
||||
void cros_ec_sensorhub_ring_remove(void *arg);
|
||||
int cros_ec_sensorhub_ring_fifo_enable(struct cros_ec_sensorhub *sensorhub,
|
||||
|
||||
@@ -25,6 +25,7 @@ struct platform_device {
|
||||
bool id_auto;
|
||||
struct device dev;
|
||||
u64 platform_dma_mask;
|
||||
struct device_dma_parameters dma_parms;
|
||||
u32 num_resources;
|
||||
struct resource *resource;
|
||||
|
||||
|
||||
@@ -220,10 +220,8 @@ struct pnp_card {
|
||||
#define global_to_pnp_card(n) list_entry(n, struct pnp_card, global_list)
|
||||
#define protocol_to_pnp_card(n) list_entry(n, struct pnp_card, protocol_list)
|
||||
#define to_pnp_card(n) container_of(n, struct pnp_card, dev)
|
||||
#define pnp_for_each_card(card) \
|
||||
for((card) = global_to_pnp_card(pnp_cards.next); \
|
||||
(card) != global_to_pnp_card(&pnp_cards); \
|
||||
(card) = global_to_pnp_card((card)->global_list.next))
|
||||
#define pnp_for_each_card(card) \
|
||||
list_for_each_entry(card, &pnp_cards, global_list)
|
||||
|
||||
struct pnp_card_link {
|
||||
struct pnp_card *card;
|
||||
@@ -276,14 +274,9 @@ struct pnp_dev {
|
||||
#define card_to_pnp_dev(n) list_entry(n, struct pnp_dev, card_list)
|
||||
#define protocol_to_pnp_dev(n) list_entry(n, struct pnp_dev, protocol_list)
|
||||
#define to_pnp_dev(n) container_of(n, struct pnp_dev, dev)
|
||||
#define pnp_for_each_dev(dev) \
|
||||
for((dev) = global_to_pnp_dev(pnp_global.next); \
|
||||
(dev) != global_to_pnp_dev(&pnp_global); \
|
||||
(dev) = global_to_pnp_dev((dev)->global_list.next))
|
||||
#define card_for_each_dev(card,dev) \
|
||||
for((dev) = card_to_pnp_dev((card)->devices.next); \
|
||||
(dev) != card_to_pnp_dev(&(card)->devices); \
|
||||
(dev) = card_to_pnp_dev((dev)->card_list.next))
|
||||
#define pnp_for_each_dev(dev) list_for_each_entry(dev, &pnp_global, global_list)
|
||||
#define card_for_each_dev(card, dev) \
|
||||
list_for_each_entry(dev, &(card)->devices, card_list)
|
||||
#define pnp_dev_name(dev) (dev)->name
|
||||
|
||||
static inline void *pnp_get_drvdata(struct pnp_dev *pdev)
|
||||
@@ -437,14 +430,10 @@ struct pnp_protocol {
|
||||
};
|
||||
|
||||
#define to_pnp_protocol(n) list_entry(n, struct pnp_protocol, protocol_list)
|
||||
#define protocol_for_each_card(protocol,card) \
|
||||
for((card) = protocol_to_pnp_card((protocol)->cards.next); \
|
||||
(card) != protocol_to_pnp_card(&(protocol)->cards); \
|
||||
(card) = protocol_to_pnp_card((card)->protocol_list.next))
|
||||
#define protocol_for_each_dev(protocol,dev) \
|
||||
for((dev) = protocol_to_pnp_dev((protocol)->devices.next); \
|
||||
(dev) != protocol_to_pnp_dev(&(protocol)->devices); \
|
||||
(dev) = protocol_to_pnp_dev((dev)->protocol_list.next))
|
||||
#define protocol_for_each_card(protocol, card) \
|
||||
list_for_each_entry(card, &(protocol)->cards, protocol_list)
|
||||
#define protocol_for_each_dev(protocol, dev) \
|
||||
list_for_each_entry(dev, &(protocol)->devices, protocol_list)
|
||||
|
||||
extern struct bus_type pnp_bus_type;
|
||||
|
||||
|
||||
@@ -105,10 +105,10 @@ struct ptp_system_timestamp {
|
||||
* parameter func: the desired function to use.
|
||||
* parameter chan: the function channel index to use.
|
||||
*
|
||||
* @do_work: Request driver to perform auxiliary (periodic) operations
|
||||
* Driver should return delay of the next auxiliary work scheduling
|
||||
* time (>=0) or negative value in case further scheduling
|
||||
* is not required.
|
||||
* @do_aux_work: Request driver to perform auxiliary (periodic) operations
|
||||
* Driver should return delay of the next auxiliary work
|
||||
* scheduling time (>=0) or negative value in case further
|
||||
* scheduling is not required.
|
||||
*
|
||||
* Drivers should embed their ptp_clock_info within a private
|
||||
* structure, obtaining a reference to it using container_of().
|
||||
|
||||
@@ -187,6 +187,7 @@ static inline void sk_msg_xfer(struct sk_msg *dst, struct sk_msg *src,
|
||||
dst->sg.data[which] = src->sg.data[which];
|
||||
dst->sg.data[which].length = size;
|
||||
dst->sg.size += size;
|
||||
src->sg.size -= size;
|
||||
src->sg.data[which].length -= size;
|
||||
src->sg.data[which].offset += size;
|
||||
}
|
||||
|
||||
@@ -177,6 +177,8 @@ struct plat_stmmacenet_data {
|
||||
struct stmmac_rxq_cfg rx_queues_cfg[MTL_MAX_RX_QUEUES];
|
||||
struct stmmac_txq_cfg tx_queues_cfg[MTL_MAX_TX_QUEUES];
|
||||
void (*fix_mac_speed)(void *priv, unsigned int speed);
|
||||
int (*serdes_powerup)(struct net_device *ndev, void *priv);
|
||||
void (*serdes_powerdown)(struct net_device *ndev, void *priv);
|
||||
int (*init)(struct platform_device *pdev, void *priv);
|
||||
void (*exit)(struct platform_device *pdev, void *priv);
|
||||
struct mac_device_info *(*setup)(void *priv);
|
||||
|
||||
@@ -71,7 +71,13 @@ struct rpc_clnt {
|
||||
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
|
||||
struct dentry *cl_debugfs; /* debugfs directory */
|
||||
#endif
|
||||
struct rpc_xprt_iter cl_xpi;
|
||||
/* cl_work is only needed after cl_xpi is no longer used,
|
||||
* and that are of similar size
|
||||
*/
|
||||
union {
|
||||
struct rpc_xprt_iter cl_xpi;
|
||||
struct work_struct cl_work;
|
||||
};
|
||||
const struct cred *cl_cred;
|
||||
};
|
||||
|
||||
@@ -236,4 +242,9 @@ static inline int rpc_reply_expected(struct rpc_task *task)
|
||||
(task->tk_msg.rpc_proc->p_decode != NULL);
|
||||
}
|
||||
|
||||
static inline void rpc_task_close_connection(struct rpc_task *task)
|
||||
{
|
||||
if (task->tk_xprt)
|
||||
xprt_force_disconnect(task->tk_xprt);
|
||||
}
|
||||
#endif /* _LINUX_SUNRPC_CLNT_H */
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
struct gss_ctx {
|
||||
struct gss_api_mech *mech_type;
|
||||
void *internal_ctx_id;
|
||||
unsigned int slack, align;
|
||||
};
|
||||
|
||||
#define GSS_C_NO_BUFFER ((struct xdr_netobj) 0)
|
||||
@@ -66,6 +67,7 @@ u32 gss_wrap(
|
||||
u32 gss_unwrap(
|
||||
struct gss_ctx *ctx_id,
|
||||
int offset,
|
||||
int len,
|
||||
struct xdr_buf *inbuf);
|
||||
u32 gss_delete_sec_context(
|
||||
struct gss_ctx **ctx_id);
|
||||
@@ -126,6 +128,7 @@ struct gss_api_ops {
|
||||
u32 (*gss_unwrap)(
|
||||
struct gss_ctx *ctx_id,
|
||||
int offset,
|
||||
int len,
|
||||
struct xdr_buf *buf);
|
||||
void (*gss_delete_sec_context)(
|
||||
void *internal_ctx_id);
|
||||
|
||||
@@ -83,7 +83,7 @@ struct gss_krb5_enctype {
|
||||
u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset,
|
||||
struct xdr_buf *buf,
|
||||
struct page **pages); /* v2 encryption function */
|
||||
u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset,
|
||||
u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, u32 len,
|
||||
struct xdr_buf *buf, u32 *headskip,
|
||||
u32 *tailskip); /* v2 decryption function */
|
||||
};
|
||||
@@ -255,7 +255,7 @@ gss_wrap_kerberos(struct gss_ctx *ctx_id, int offset,
|
||||
struct xdr_buf *outbuf, struct page **pages);
|
||||
|
||||
u32
|
||||
gss_unwrap_kerberos(struct gss_ctx *ctx_id, int offset,
|
||||
gss_unwrap_kerberos(struct gss_ctx *ctx_id, int offset, int len,
|
||||
struct xdr_buf *buf);
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset,
|
||||
struct page **pages);
|
||||
|
||||
u32
|
||||
gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset,
|
||||
gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset, u32 len,
|
||||
struct xdr_buf *buf, u32 *plainoffset,
|
||||
u32 *plainlen);
|
||||
|
||||
|
||||
@@ -170,6 +170,7 @@ extern bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma);
|
||||
extern void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma,
|
||||
struct svc_rdma_recv_ctxt *ctxt);
|
||||
extern void svc_rdma_flush_recv_queues(struct svcxprt_rdma *rdma);
|
||||
extern void svc_rdma_release_rqst(struct svc_rqst *rqstp);
|
||||
extern int svc_rdma_recvfrom(struct svc_rqst *);
|
||||
|
||||
/* svc_rdma_rw.c */
|
||||
|
||||
@@ -184,6 +184,7 @@ xdr_adjust_iovec(struct kvec *iov, __be32 *p)
|
||||
extern void xdr_shift_buf(struct xdr_buf *, size_t);
|
||||
extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *);
|
||||
extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, unsigned int, unsigned int);
|
||||
extern void xdr_buf_trim(struct xdr_buf *, unsigned int);
|
||||
extern int read_bytes_from_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int);
|
||||
extern int write_bytes_to_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int);
|
||||
|
||||
|
||||
@@ -78,47 +78,6 @@ struct tcp_sack_block {
|
||||
#define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */
|
||||
#define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/
|
||||
|
||||
#if IS_ENABLED(CONFIG_MPTCP)
|
||||
struct mptcp_options_received {
|
||||
u64 sndr_key;
|
||||
u64 rcvr_key;
|
||||
u64 data_ack;
|
||||
u64 data_seq;
|
||||
u32 subflow_seq;
|
||||
u16 data_len;
|
||||
u16 mp_capable : 1,
|
||||
mp_join : 1,
|
||||
dss : 1,
|
||||
add_addr : 1,
|
||||
rm_addr : 1,
|
||||
family : 4,
|
||||
echo : 1,
|
||||
backup : 1;
|
||||
u32 token;
|
||||
u32 nonce;
|
||||
u64 thmac;
|
||||
u8 hmac[20];
|
||||
u8 join_id;
|
||||
u8 use_map:1,
|
||||
dsn64:1,
|
||||
data_fin:1,
|
||||
use_ack:1,
|
||||
ack64:1,
|
||||
mpc_map:1,
|
||||
__unused:2;
|
||||
u8 addr_id;
|
||||
u8 rm_id;
|
||||
union {
|
||||
struct in_addr addr;
|
||||
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
|
||||
struct in6_addr addr6;
|
||||
#endif
|
||||
};
|
||||
u64 ahmac;
|
||||
u16 port;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct tcp_options_received {
|
||||
/* PAWS/RTTM data */
|
||||
int ts_recent_stamp;/* Time we stored ts_recent (for aging) */
|
||||
@@ -136,9 +95,6 @@ struct tcp_options_received {
|
||||
u8 num_sacks; /* Number of SACK blocks */
|
||||
u16 user_mss; /* mss requested by user in ioctl */
|
||||
u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
|
||||
#if IS_ENABLED(CONFIG_MPTCP)
|
||||
struct mptcp_options_received mptcp;
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
|
||||
@@ -148,13 +104,6 @@ static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
|
||||
#if IS_ENABLED(CONFIG_SMC)
|
||||
rx_opt->smc_ok = 0;
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_MPTCP)
|
||||
rx_opt->mptcp.mp_capable = 0;
|
||||
rx_opt->mptcp.mp_join = 0;
|
||||
rx_opt->mptcp.add_addr = 0;
|
||||
rx_opt->mptcp.rm_addr = 0;
|
||||
rx_opt->mptcp.dss = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This is the max number of SACKS that we'll generate and process. It's safe
|
||||
|
||||
@@ -156,8 +156,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
|
||||
* Note, the proto and args passed in includes "__data" as the first parameter.
|
||||
* The reason for this is to handle the "void" prototype. If a tracepoint
|
||||
* has a "void" prototype, then it is invalid to declare a function
|
||||
* as "(void *, void)". The DECLARE_TRACE_NOARGS() will pass in just
|
||||
* "void *data", where as the DECLARE_TRACE() will pass in "void *data, proto".
|
||||
* as "(void *, void)".
|
||||
*/
|
||||
#define __DO_TRACE(tp, proto, args, cond, rcuidle) \
|
||||
do { \
|
||||
@@ -373,25 +372,6 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
|
||||
# define __tracepoint_string
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The need for the DECLARE_TRACE_NOARGS() is to handle the prototype
|
||||
* (void). "void" is a special value in a function prototype and can
|
||||
* not be combined with other arguments. Since the DECLARE_TRACE()
|
||||
* macro adds a data element at the beginning of the prototype,
|
||||
* we need a way to differentiate "(void *data, proto)" from
|
||||
* "(void *data, void)". The second prototype is invalid.
|
||||
*
|
||||
* DECLARE_TRACE_NOARGS() passes "void" as the tracepoint prototype
|
||||
* and "void *__data" as the callback prototype.
|
||||
*
|
||||
* DECLARE_TRACE() passes "proto" as the tracepoint protoype and
|
||||
* "void *__data, proto" as the callback prototype.
|
||||
*/
|
||||
#define DECLARE_TRACE_NOARGS(name) \
|
||||
__DECLARE_TRACE(name, void, , \
|
||||
cpu_online(raw_smp_processor_id()), \
|
||||
void *__data, __data)
|
||||
|
||||
#define DECLARE_TRACE(name, proto, args) \
|
||||
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
|
||||
cpu_online(raw_smp_processor_id()), \
|
||||
|
||||
@@ -66,7 +66,7 @@ struct tty_buffer {
|
||||
int read;
|
||||
int flags;
|
||||
/* Data points here */
|
||||
unsigned long data[0];
|
||||
unsigned long data[];
|
||||
};
|
||||
|
||||
/* Values for .flags field of tty_buffer */
|
||||
|
||||
@@ -164,7 +164,7 @@ struct vdpa_config_ops {
|
||||
u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx);
|
||||
|
||||
/* Device ops */
|
||||
u16 (*get_vq_align)(struct vdpa_device *vdev);
|
||||
u32 (*get_vq_align)(struct vdpa_device *vdev);
|
||||
u64 (*get_features)(struct vdpa_device *vdev);
|
||||
int (*set_features)(struct vdpa_device *vdev, u64 features);
|
||||
void (*set_config_cb)(struct vdpa_device *vdev,
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _LINUX_VERMAGIC_H
|
||||
#define _LINUX_VERMAGIC_H
|
||||
|
||||
#include <generated/utsrelease.h>
|
||||
#include <asm/vermagic.h>
|
||||
|
||||
/* Simply sanity version stamp for modules. */
|
||||
#ifdef CONFIG_SMP
|
||||
@@ -24,9 +28,6 @@
|
||||
#else
|
||||
#define MODULE_VERMAGIC_MODVERSIONS ""
|
||||
#endif
|
||||
#ifndef MODULE_ARCH_VERMAGIC
|
||||
#define MODULE_ARCH_VERMAGIC ""
|
||||
#endif
|
||||
#ifdef RANDSTRUCT_PLUGIN
|
||||
#include <generated/randomize_layout_hash.h>
|
||||
#define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED
|
||||
@@ -41,3 +42,4 @@
|
||||
MODULE_ARCH_VERMAGIC \
|
||||
MODULE_RANDSTRUCT_PLUGIN
|
||||
|
||||
#endif /* _LINUX_VERMAGIC_H */
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/vringh.h>
|
||||
|
||||
/**
|
||||
* virtqueue - a queue to register buffers for sending or receiving.
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#define _LINUX_VIRTIO_NET_H
|
||||
|
||||
#include <linux/if_vlan.h>
|
||||
#include <uapi/linux/tcp.h>
|
||||
#include <uapi/linux/udp.h>
|
||||
#include <uapi/linux/virtio_net.h>
|
||||
|
||||
static inline int virtio_net_hdr_set_proto(struct sk_buff *skb,
|
||||
@@ -28,17 +30,25 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
|
||||
bool little_endian)
|
||||
{
|
||||
unsigned int gso_type = 0;
|
||||
unsigned int thlen = 0;
|
||||
unsigned int ip_proto;
|
||||
|
||||
if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
|
||||
switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
|
||||
case VIRTIO_NET_HDR_GSO_TCPV4:
|
||||
gso_type = SKB_GSO_TCPV4;
|
||||
ip_proto = IPPROTO_TCP;
|
||||
thlen = sizeof(struct tcphdr);
|
||||
break;
|
||||
case VIRTIO_NET_HDR_GSO_TCPV6:
|
||||
gso_type = SKB_GSO_TCPV6;
|
||||
ip_proto = IPPROTO_TCP;
|
||||
thlen = sizeof(struct tcphdr);
|
||||
break;
|
||||
case VIRTIO_NET_HDR_GSO_UDP:
|
||||
gso_type = SKB_GSO_UDP;
|
||||
ip_proto = IPPROTO_UDP;
|
||||
thlen = sizeof(struct udphdr);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -57,16 +67,22 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
|
||||
|
||||
if (!skb_partial_csum_set(skb, start, off))
|
||||
return -EINVAL;
|
||||
|
||||
if (skb_transport_offset(skb) + thlen > skb_headlen(skb))
|
||||
return -EINVAL;
|
||||
} else {
|
||||
/* gso packets without NEEDS_CSUM do not set transport_offset.
|
||||
* probe and drop if does not match one of the above types.
|
||||
*/
|
||||
if (gso_type && skb->network_header) {
|
||||
struct flow_keys_basic keys;
|
||||
|
||||
if (!skb->protocol)
|
||||
virtio_net_hdr_set_proto(skb, hdr);
|
||||
retry:
|
||||
skb_probe_transport_header(skb);
|
||||
if (!skb_transport_header_was_set(skb)) {
|
||||
if (!skb_flow_dissect_flow_keys_basic(NULL, skb, &keys,
|
||||
NULL, 0, 0, 0,
|
||||
0)) {
|
||||
/* UFO does not specify ipv4 or 6: try both */
|
||||
if (gso_type & SKB_GSO_UDP &&
|
||||
skb->protocol == htons(ETH_P_IP)) {
|
||||
@@ -75,6 +91,12 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (keys.control.thoff + thlen > skb_headlen(skb) ||
|
||||
keys.basic.ip_proto != ip_proto)
|
||||
return -EINVAL;
|
||||
|
||||
skb_set_transport_header(skb, keys.control.thoff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ struct virtio_vsock_pkt {
|
||||
u32 len;
|
||||
u32 off;
|
||||
bool reply;
|
||||
bool tap_delivered;
|
||||
};
|
||||
|
||||
struct virtio_vsock_pkt_info {
|
||||
|
||||
@@ -137,7 +137,7 @@ extern void vunmap(const void *addr);
|
||||
|
||||
extern int remap_vmalloc_range_partial(struct vm_area_struct *vma,
|
||||
unsigned long uaddr, void *kaddr,
|
||||
unsigned long size);
|
||||
unsigned long pgoff, unsigned long size);
|
||||
|
||||
extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
|
||||
unsigned long pgoff);
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
#include <linux/virtio_byteorder.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/slab.h>
|
||||
#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
|
||||
#include <linux/dma-direction.h>
|
||||
#include <linux/vhost_iotlb.h>
|
||||
#endif
|
||||
#include <asm/barrier.h>
|
||||
|
||||
/* virtio_ring with information needed for host access. */
|
||||
@@ -254,6 +256,8 @@ static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val)
|
||||
return __cpu_to_virtio64(vringh_is_little_endian(vrh), val);
|
||||
}
|
||||
|
||||
#if IS_REACHABLE(CONFIG_VHOST_IOTLB)
|
||||
|
||||
void vringh_set_iotlb(struct vringh *vrh, struct vhost_iotlb *iotlb);
|
||||
|
||||
int vringh_init_iotlb(struct vringh *vrh, u64 features,
|
||||
@@ -284,4 +288,6 @@ void vringh_notify_disable_iotlb(struct vringh *vrh);
|
||||
|
||||
int vringh_need_notify_iotlb(struct vringh *vrh);
|
||||
|
||||
#endif /* CONFIG_VHOST_IOTLB */
|
||||
|
||||
#endif /* _LINUX_VRINGH_H */
|
||||
|
||||
@@ -75,7 +75,8 @@ static inline void tcf_tm_dump(struct tcf_t *dtm, const struct tcf_t *stm)
|
||||
{
|
||||
dtm->install = jiffies_to_clock_t(jiffies - stm->install);
|
||||
dtm->lastuse = jiffies_to_clock_t(jiffies - stm->lastuse);
|
||||
dtm->firstuse = jiffies_to_clock_t(jiffies - stm->firstuse);
|
||||
dtm->firstuse = stm->firstuse ?
|
||||
jiffies_to_clock_t(jiffies - stm->firstuse) : 0;
|
||||
dtm->expires = jiffies_to_clock_t(stm->expires);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ bool rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *,
|
||||
void rxrpc_kernel_end_call(struct socket *, struct rxrpc_call *);
|
||||
void rxrpc_kernel_get_peer(struct socket *, struct rxrpc_call *,
|
||||
struct sockaddr_rxrpc *);
|
||||
u64 rxrpc_kernel_get_rtt(struct socket *, struct rxrpc_call *);
|
||||
u32 rxrpc_kernel_get_srtt(struct socket *, struct rxrpc_call *);
|
||||
int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
|
||||
rxrpc_user_attach_call_t, unsigned long, gfp_t,
|
||||
unsigned int);
|
||||
|
||||
@@ -166,15 +166,18 @@ enum flow_action_mangle_base {
|
||||
enum flow_action_hw_stats_bit {
|
||||
FLOW_ACTION_HW_STATS_IMMEDIATE_BIT,
|
||||
FLOW_ACTION_HW_STATS_DELAYED_BIT,
|
||||
FLOW_ACTION_HW_STATS_DISABLED_BIT,
|
||||
};
|
||||
|
||||
enum flow_action_hw_stats {
|
||||
FLOW_ACTION_HW_STATS_DISABLED = 0,
|
||||
FLOW_ACTION_HW_STATS_DONT_CARE = 0,
|
||||
FLOW_ACTION_HW_STATS_IMMEDIATE =
|
||||
BIT(FLOW_ACTION_HW_STATS_IMMEDIATE_BIT),
|
||||
FLOW_ACTION_HW_STATS_DELAYED = BIT(FLOW_ACTION_HW_STATS_DELAYED_BIT),
|
||||
FLOW_ACTION_HW_STATS_ANY = FLOW_ACTION_HW_STATS_IMMEDIATE |
|
||||
FLOW_ACTION_HW_STATS_DELAYED,
|
||||
FLOW_ACTION_HW_STATS_DISABLED =
|
||||
BIT(FLOW_ACTION_HW_STATS_DISABLED_BIT),
|
||||
};
|
||||
|
||||
typedef void (*action_destr)(void *priv);
|
||||
@@ -325,7 +328,11 @@ __flow_action_hw_stats_check(const struct flow_action *action,
|
||||
return true;
|
||||
if (!flow_action_mixed_hw_stats_check(action, extack))
|
||||
return false;
|
||||
|
||||
action_entry = flow_action_first_entry_get(action);
|
||||
if (action_entry->hw_stats == FLOW_ACTION_HW_STATS_DONT_CARE)
|
||||
return true;
|
||||
|
||||
if (!check_allow_bit &&
|
||||
action_entry->hw_stats != FLOW_ACTION_HW_STATS_ANY) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "Driver supports only default HW stats type \"any\"");
|
||||
|
||||
@@ -99,6 +99,20 @@ static inline int IP_ECN_set_ce(struct iphdr *iph)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int IP_ECN_set_ect1(struct iphdr *iph)
|
||||
{
|
||||
u32 check = (__force u32)iph->check;
|
||||
|
||||
if ((iph->tos & INET_ECN_MASK) != INET_ECN_ECT_0)
|
||||
return 0;
|
||||
|
||||
check += (__force u16)htons(0x100);
|
||||
|
||||
iph->check = (__force __sum16)(check + (check>=0xFFFF));
|
||||
iph->tos ^= INET_ECN_MASK;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline void IP_ECN_clear(struct iphdr *iph)
|
||||
{
|
||||
iph->tos &= ~INET_ECN_MASK;
|
||||
@@ -134,6 +148,22 @@ static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int IP6_ECN_set_ect1(struct sk_buff *skb, struct ipv6hdr *iph)
|
||||
{
|
||||
__be32 from, to;
|
||||
|
||||
if ((ipv6_get_dsfield(iph) & INET_ECN_MASK) != INET_ECN_ECT_0)
|
||||
return 0;
|
||||
|
||||
from = *(__be32 *)iph;
|
||||
to = from ^ htonl(INET_ECN_MASK << 20);
|
||||
*(__be32 *)iph = to;
|
||||
if (skb->ip_summed == CHECKSUM_COMPLETE)
|
||||
skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from),
|
||||
(__force __wsum)to);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner)
|
||||
{
|
||||
dscp &= ~INET_ECN_MASK;
|
||||
@@ -159,6 +189,25 @@ static inline int INET_ECN_set_ce(struct sk_buff *skb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int INET_ECN_set_ect1(struct sk_buff *skb)
|
||||
{
|
||||
switch (skb->protocol) {
|
||||
case cpu_to_be16(ETH_P_IP):
|
||||
if (skb_network_header(skb) + sizeof(struct iphdr) <=
|
||||
skb_tail_pointer(skb))
|
||||
return IP_ECN_set_ect1(ip_hdr(skb));
|
||||
break;
|
||||
|
||||
case cpu_to_be16(ETH_P_IPV6):
|
||||
if (skb_network_header(skb) + sizeof(struct ipv6hdr) <=
|
||||
skb_tail_pointer(skb))
|
||||
return IP6_ECN_set_ect1(skb, ipv6_hdr(skb));
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* RFC 6040 4.2
|
||||
* To decapsulate the inner header at the tunnel egress, a compliant
|
||||
@@ -208,8 +257,12 @@ static inline int INET_ECN_decapsulate(struct sk_buff *skb,
|
||||
int rc;
|
||||
|
||||
rc = __INET_ECN_decapsulate(outer, inner, &set_ce);
|
||||
if (!rc && set_ce)
|
||||
INET_ECN_set_ce(skb);
|
||||
if (!rc) {
|
||||
if (set_ce)
|
||||
INET_ECN_set_ce(skb);
|
||||
else if ((outer & INET_ECN_MASK) == INET_ECN_ECT_1)
|
||||
INET_ECN_set_ect1(skb);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -203,6 +203,7 @@ struct fib6_info {
|
||||
struct rt6_info {
|
||||
struct dst_entry dst;
|
||||
struct fib6_info __rcu *from;
|
||||
int sernum;
|
||||
|
||||
struct rt6key rt6i_dst;
|
||||
struct rt6key rt6i_src;
|
||||
@@ -291,6 +292,9 @@ static inline u32 rt6_get_cookie(const struct rt6_info *rt)
|
||||
struct fib6_info *from;
|
||||
u32 cookie = 0;
|
||||
|
||||
if (rt->sernum)
|
||||
return rt->sernum;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
from = rcu_dereference(rt->from);
|
||||
|
||||
@@ -257,7 +257,6 @@ struct fib_dump_filter {
|
||||
u32 table_id;
|
||||
/* filter_set is an optimization that an entry is set */
|
||||
bool filter_set;
|
||||
bool dump_all_families;
|
||||
bool dump_routes;
|
||||
bool dump_exceptions;
|
||||
unsigned char protocol;
|
||||
|
||||
@@ -6007,7 +6007,9 @@ enum rate_control_capabilities {
|
||||
struct rate_control_ops {
|
||||
unsigned long capa;
|
||||
const char *name;
|
||||
void *(*alloc)(struct ieee80211_hw *hw, struct dentry *debugfsdir);
|
||||
void *(*alloc)(struct ieee80211_hw *hw);
|
||||
void (*add_debugfs)(struct ieee80211_hw *hw, void *priv,
|
||||
struct dentry *debugfsdir);
|
||||
void (*free)(void *priv);
|
||||
|
||||
void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp);
|
||||
|
||||
@@ -68,11 +68,8 @@ static inline bool rsk_is_mptcp(const struct request_sock *req)
|
||||
return tcp_rsk(req)->is_mptcp;
|
||||
}
|
||||
|
||||
void mptcp_parse_option(const struct sk_buff *skb, const unsigned char *ptr,
|
||||
int opsize, struct tcp_options_received *opt_rx);
|
||||
bool mptcp_syn_options(struct sock *sk, const struct sk_buff *skb,
|
||||
unsigned int *size, struct mptcp_out_options *opts);
|
||||
void mptcp_rcv_synsent(struct sock *sk);
|
||||
bool mptcp_synack_options(const struct request_sock *req, unsigned int *size,
|
||||
struct mptcp_out_options *opts);
|
||||
bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
|
||||
|
||||
@@ -41,7 +41,7 @@ enum {
|
||||
ND_OPT_DNSSL = 31, /* RFC6106 */
|
||||
ND_OPT_6CO = 34, /* RFC6775 */
|
||||
ND_OPT_CAPTIVE_PORTAL = 37, /* RFC7710 */
|
||||
ND_OPT_PREF64 = 38, /* RFC-ietf-6man-ra-pref64-09 */
|
||||
ND_OPT_PREF64 = 38, /* RFC8781 */
|
||||
__ND_OPT_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -437,6 +437,13 @@ static inline int rt_genid_ipv4(const struct net *net)
|
||||
return atomic_read(&net->ipv4.rt_genid);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
static inline int rt_genid_ipv6(const struct net *net)
|
||||
{
|
||||
return atomic_read(&net->ipv6.fib6_sernum);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void rt_genid_bump_ipv4(struct net *net)
|
||||
{
|
||||
atomic_inc(&net->ipv4.rt_genid);
|
||||
|
||||
@@ -87,7 +87,7 @@ struct nf_conn {
|
||||
struct hlist_node nat_bysource;
|
||||
#endif
|
||||
/* all members below initialized via memset */
|
||||
u8 __nfct_init_offset[0];
|
||||
struct { } __nfct_init_offset;
|
||||
|
||||
/* If we were expected by an expectation, this will be it */
|
||||
struct nf_conn *master;
|
||||
|
||||
@@ -127,6 +127,7 @@ enum nf_flow_flags {
|
||||
NF_FLOW_HW_DYING,
|
||||
NF_FLOW_HW_DEAD,
|
||||
NF_FLOW_HW_REFRESH,
|
||||
NF_FLOW_HW_PENDING,
|
||||
};
|
||||
|
||||
enum flow_offload_type {
|
||||
|
||||
@@ -407,6 +407,7 @@ struct tcf_block {
|
||||
struct mutex lock;
|
||||
struct list_head chain_list;
|
||||
u32 index; /* block index for shared blocks */
|
||||
u32 classid; /* which class this block belongs to */
|
||||
refcount_t refcnt;
|
||||
struct net *net;
|
||||
struct Qdisc *q;
|
||||
|
||||
@@ -51,7 +51,7 @@ extern struct inet_hashinfo tcp_hashinfo;
|
||||
extern struct percpu_counter tcp_orphan_count;
|
||||
void tcp_time_wait(struct sock *sk, int state, int timeo);
|
||||
|
||||
#define MAX_TCP_HEADER (128 + MAX_HEADER)
|
||||
#define MAX_TCP_HEADER L1_CACHE_ALIGN(128 + MAX_HEADER)
|
||||
#define MAX_TCP_OPTION_SPACE 40
|
||||
#define TCP_MIN_SND_MSS 48
|
||||
#define TCP_MIN_GSO_SIZE (TCP_MIN_SND_MSS - MAX_TCP_OPTION_SPACE)
|
||||
@@ -1376,7 +1376,6 @@ static inline void tcp_sack_reset(struct tcp_options_received *rx_opt)
|
||||
rx_opt->num_sacks = 0;
|
||||
}
|
||||
|
||||
u32 tcp_default_init_rwnd(u32 mss);
|
||||
void tcp_cwnd_restart(struct sock *sk, s32 delta);
|
||||
|
||||
static inline void tcp_slow_start_after_idle_check(struct sock *sk)
|
||||
@@ -1421,6 +1420,19 @@ static inline int tcp_full_space(const struct sock *sk)
|
||||
return tcp_win_from_space(sk, READ_ONCE(sk->sk_rcvbuf));
|
||||
}
|
||||
|
||||
/* We provision sk_rcvbuf around 200% of sk_rcvlowat.
|
||||
* If 87.5 % (7/8) of the space has been consumed, we want to override
|
||||
* SO_RCVLOWAT constraint, since we are receiving skbs with too small
|
||||
* len/truesize ratio.
|
||||
*/
|
||||
static inline bool tcp_rmem_pressure(const struct sock *sk)
|
||||
{
|
||||
int rcvbuf = READ_ONCE(sk->sk_rcvbuf);
|
||||
int threshold = rcvbuf - (rcvbuf >> 3);
|
||||
|
||||
return atomic_read(&sk->sk_rmem_alloc) > threshold;
|
||||
}
|
||||
|
||||
extern void tcp_openreq_init_rwin(struct request_sock *req,
|
||||
const struct sock *sk_listener,
|
||||
const struct dst_entry *dst);
|
||||
|
||||
@@ -143,14 +143,12 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb
|
||||
__be16 df, __be16 src_port, __be16 dst_port,
|
||||
bool xnet, bool nocheck);
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
|
||||
struct sk_buff *skb,
|
||||
struct net_device *dev, struct in6_addr *saddr,
|
||||
struct in6_addr *daddr,
|
||||
__u8 prio, __u8 ttl, __be32 label,
|
||||
__be16 src_port, __be16 dst_port, bool nocheck);
|
||||
#endif
|
||||
|
||||
void udp_tunnel_sock_release(struct socket *sock);
|
||||
|
||||
|
||||
@@ -502,6 +502,7 @@ struct ocelot {
|
||||
unsigned int num_stats;
|
||||
|
||||
int shared_queue_sz;
|
||||
int num_mact_rows;
|
||||
|
||||
struct net_device *hw_bridge_dev;
|
||||
u16 bridge_mask;
|
||||
|
||||
@@ -168,7 +168,6 @@ int tegra_io_pad_power_disable(enum tegra_io_pad id);
|
||||
int tegra_io_rail_power_on(unsigned int id);
|
||||
int tegra_io_rail_power_off(unsigned int id);
|
||||
|
||||
enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
|
||||
void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
|
||||
void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
|
||||
|
||||
@@ -220,11 +219,6 @@ static inline int tegra_io_rail_power_off(unsigned int id)
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
|
||||
{
|
||||
return TEGRA_SUSPEND_NONE;
|
||||
}
|
||||
|
||||
static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
|
||||
{
|
||||
}
|
||||
@@ -235,4 +229,13 @@ static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
|
||||
|
||||
#endif /* CONFIG_SOC_TEGRA_PMC */
|
||||
|
||||
#if defined(CONFIG_SOC_TEGRA_PMC) && defined(CONFIG_PM_SLEEP)
|
||||
enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
|
||||
#else
|
||||
static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
|
||||
{
|
||||
return TEGRA_SUSPEND_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SOC_TEGRA_PMC_H__ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0
|
||||
/* SPDX-License-Identifier: GPL-2.0-only
|
||||
*
|
||||
* Copyright (C) 2013-15, Intel Corporation. All rights reserved.
|
||||
*/
|
||||
|
||||
69
include/sound/soc-card.h
Normal file
69
include/sound/soc-card.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* soc-card.h
|
||||
*
|
||||
* Copyright (C) 2019 Renesas Electronics Corp.
|
||||
* Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
*/
|
||||
#ifndef __SOC_CARD_H
|
||||
#define __SOC_CARD_H
|
||||
|
||||
enum snd_soc_card_subclass {
|
||||
SND_SOC_CARD_CLASS_INIT = 0,
|
||||
SND_SOC_CARD_CLASS_RUNTIME = 1,
|
||||
};
|
||||
|
||||
struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
|
||||
const char *name);
|
||||
int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
|
||||
struct snd_soc_jack *jack,
|
||||
struct snd_soc_jack_pin *pins, unsigned int num_pins);
|
||||
|
||||
int snd_soc_card_suspend_pre(struct snd_soc_card *card);
|
||||
int snd_soc_card_suspend_post(struct snd_soc_card *card);
|
||||
int snd_soc_card_resume_pre(struct snd_soc_card *card);
|
||||
int snd_soc_card_resume_post(struct snd_soc_card *card);
|
||||
|
||||
int snd_soc_card_probe(struct snd_soc_card *card);
|
||||
int snd_soc_card_late_probe(struct snd_soc_card *card);
|
||||
int snd_soc_card_remove(struct snd_soc_card *card);
|
||||
|
||||
int snd_soc_card_set_bias_level(struct snd_soc_card *card,
|
||||
struct snd_soc_dapm_context *dapm,
|
||||
enum snd_soc_bias_level level);
|
||||
int snd_soc_card_set_bias_level_post(struct snd_soc_card *card,
|
||||
struct snd_soc_dapm_context *dapm,
|
||||
enum snd_soc_bias_level level);
|
||||
|
||||
int snd_soc_card_add_dai_link(struct snd_soc_card *card,
|
||||
struct snd_soc_dai_link *dai_link);
|
||||
void snd_soc_card_remove_dai_link(struct snd_soc_card *card,
|
||||
struct snd_soc_dai_link *dai_link);
|
||||
|
||||
/* device driver data */
|
||||
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
|
||||
void *data)
|
||||
{
|
||||
card->drvdata = data;
|
||||
}
|
||||
|
||||
static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
|
||||
{
|
||||
return card->drvdata;
|
||||
}
|
||||
|
||||
static inline
|
||||
struct snd_soc_dai *snd_soc_card_get_codec_dai(struct snd_soc_card *card,
|
||||
const char *dai_name)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
|
||||
for_each_card_rtds(card, rtd) {
|
||||
if (!strcmp(asoc_rtd_to_codec(rtd, 0)->name, dai_name))
|
||||
return asoc_rtd_to_codec(rtd, 0);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* __SOC_CARD_H */
|
||||
@@ -25,6 +25,44 @@
|
||||
order++)
|
||||
|
||||
/* component interface */
|
||||
struct snd_compress_ops {
|
||||
int (*open)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream);
|
||||
int (*free)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream);
|
||||
int (*set_params)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream,
|
||||
struct snd_compr_params *params);
|
||||
int (*get_params)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream,
|
||||
struct snd_codec *params);
|
||||
int (*set_metadata)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream,
|
||||
struct snd_compr_metadata *metadata);
|
||||
int (*get_metadata)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream,
|
||||
struct snd_compr_metadata *metadata);
|
||||
int (*trigger)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream, int cmd);
|
||||
int (*pointer)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream,
|
||||
struct snd_compr_tstamp *tstamp);
|
||||
int (*copy)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream, char __user *buf,
|
||||
size_t count);
|
||||
int (*mmap)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream,
|
||||
struct vm_area_struct *vma);
|
||||
int (*ack)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream, size_t bytes);
|
||||
int (*get_caps)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream,
|
||||
struct snd_compr_caps *caps);
|
||||
int (*get_codec_caps)(struct snd_soc_component *component,
|
||||
struct snd_compr_stream *stream,
|
||||
struct snd_compr_codec_caps *codec);
|
||||
};
|
||||
|
||||
struct snd_soc_component_driver {
|
||||
const char *name;
|
||||
|
||||
@@ -108,7 +146,7 @@ struct snd_soc_component_driver {
|
||||
struct snd_pcm_substream *substream,
|
||||
struct vm_area_struct *vma);
|
||||
|
||||
const struct snd_compr_ops *compr_ops;
|
||||
const struct snd_compress_ops *compress_ops;
|
||||
|
||||
/* probe ordering - for components with runtime dependencies */
|
||||
int probe_order;
|
||||
@@ -351,10 +389,10 @@ static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c)
|
||||
return dev_get_drvdata(c->dev);
|
||||
}
|
||||
|
||||
static inline bool snd_soc_component_is_active(
|
||||
struct snd_soc_component *component)
|
||||
static inline unsigned int
|
||||
snd_soc_component_active(struct snd_soc_component *component)
|
||||
{
|
||||
return component->active != 0;
|
||||
return component->active;
|
||||
}
|
||||
|
||||
/* component pin */
|
||||
|
||||
@@ -154,21 +154,59 @@ int snd_soc_dai_startup(struct snd_soc_dai *dai,
|
||||
struct snd_pcm_substream *substream);
|
||||
void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
|
||||
struct snd_pcm_substream *substream);
|
||||
int snd_soc_dai_prepare(struct snd_soc_dai *dai,
|
||||
struct snd_pcm_substream *substream);
|
||||
int snd_soc_dai_trigger(struct snd_soc_dai *dai,
|
||||
struct snd_pcm_substream *substream, int cmd);
|
||||
int snd_soc_dai_bespoke_trigger(struct snd_soc_dai *dai,
|
||||
struct snd_pcm_substream *substream, int cmd);
|
||||
snd_pcm_sframes_t snd_soc_dai_delay(struct snd_soc_dai *dai,
|
||||
struct snd_pcm_substream *substream);
|
||||
void snd_soc_dai_suspend(struct snd_soc_dai *dai);
|
||||
void snd_soc_dai_resume(struct snd_soc_dai *dai);
|
||||
int snd_soc_dai_probe(struct snd_soc_dai *dai);
|
||||
int snd_soc_dai_remove(struct snd_soc_dai *dai);
|
||||
int snd_soc_dai_compress_new(struct snd_soc_dai *dai,
|
||||
struct snd_soc_pcm_runtime *rtd, int num);
|
||||
bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int stream);
|
||||
void snd_soc_dai_action(struct snd_soc_dai *dai,
|
||||
int stream, int action);
|
||||
static inline void snd_soc_dai_activate(struct snd_soc_dai *dai,
|
||||
int stream)
|
||||
{
|
||||
snd_soc_dai_action(dai, stream, 1);
|
||||
}
|
||||
static inline void snd_soc_dai_deactivate(struct snd_soc_dai *dai,
|
||||
int stream)
|
||||
{
|
||||
snd_soc_dai_action(dai, stream, -1);
|
||||
}
|
||||
int snd_soc_dai_active(struct snd_soc_dai *dai);
|
||||
|
||||
int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order);
|
||||
int snd_soc_pcm_dai_remove(struct snd_soc_pcm_runtime *rtd, int order);
|
||||
int snd_soc_pcm_dai_new(struct snd_soc_pcm_runtime *rtd);
|
||||
int snd_soc_pcm_dai_prepare(struct snd_pcm_substream *substream);
|
||||
int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd);
|
||||
int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream,
|
||||
int cmd);
|
||||
|
||||
int snd_soc_dai_compr_startup(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream);
|
||||
void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream);
|
||||
int snd_soc_dai_compr_trigger(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream, int cmd);
|
||||
int snd_soc_dai_compr_set_params(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream,
|
||||
struct snd_compr_params *params);
|
||||
int snd_soc_dai_compr_get_params(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream,
|
||||
struct snd_codec *params);
|
||||
int snd_soc_dai_compr_ack(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream,
|
||||
size_t bytes);
|
||||
int snd_soc_dai_compr_pointer(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream,
|
||||
struct snd_compr_tstamp *tstamp);
|
||||
int snd_soc_dai_compr_set_metadata(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream,
|
||||
struct snd_compr_metadata *metadata);
|
||||
int snd_soc_dai_compr_get_metadata(struct snd_soc_dai *dai,
|
||||
struct snd_compr_stream *cstream,
|
||||
struct snd_compr_metadata *metadata);
|
||||
|
||||
struct snd_soc_dai_ops {
|
||||
/*
|
||||
@@ -326,8 +364,6 @@ struct snd_soc_dai {
|
||||
/* DAI runtime info */
|
||||
unsigned int stream_active[SNDRV_PCM_STREAM_LAST + 1]; /* usage count */
|
||||
|
||||
unsigned int active;
|
||||
|
||||
struct snd_soc_dapm_widget *playback_widget;
|
||||
struct snd_soc_dapm_widget *capture_widget;
|
||||
|
||||
@@ -443,4 +479,10 @@ static inline void *snd_soc_dai_get_sdw_stream(struct snd_soc_dai *dai,
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
snd_soc_dai_stream_active(struct snd_soc_dai *dai, int stream)
|
||||
{
|
||||
return dai->stream_active[stream];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -689,7 +689,7 @@ struct snd_soc_dapm_context {
|
||||
/* A list of widgets associated with an object, typically a snd_kcontrol */
|
||||
struct snd_soc_dapm_widget_list {
|
||||
int num_widgets;
|
||||
struct snd_soc_dapm_widget *widgets[0];
|
||||
struct snd_soc_dapm_widget *widgets[];
|
||||
};
|
||||
|
||||
#define for_each_dapm_widgets(list, i, widget) \
|
||||
|
||||
27
include/sound/soc-link.h
Normal file
27
include/sound/soc-link.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* soc-link.h
|
||||
*
|
||||
* Copyright (C) 2019 Renesas Electronics Corp.
|
||||
* Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
*/
|
||||
#ifndef __SOC_LINK_H
|
||||
#define __SOC_LINK_H
|
||||
|
||||
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd);
|
||||
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|
||||
struct snd_pcm_hw_params *params);
|
||||
|
||||
int snd_soc_link_startup(struct snd_pcm_substream *substream);
|
||||
void snd_soc_link_shutdown(struct snd_pcm_substream *substream);
|
||||
int snd_soc_link_prepare(struct snd_pcm_substream *substream);
|
||||
int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params);
|
||||
void snd_soc_link_hw_free(struct snd_pcm_substream *substream);
|
||||
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd);
|
||||
|
||||
int snd_soc_link_compr_startup(struct snd_compr_stream *cstream);
|
||||
void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream);
|
||||
int snd_soc_link_compr_set_params(struct snd_compr_stream *cstream);
|
||||
|
||||
#endif /* __SOC_LINK_H */
|
||||
@@ -414,11 +414,6 @@ enum snd_soc_pcm_subclass {
|
||||
SND_SOC_PCM_CLASS_BE = 1,
|
||||
};
|
||||
|
||||
enum snd_soc_card_subclass {
|
||||
SND_SOC_CARD_CLASS_INIT = 0,
|
||||
SND_SOC_CARD_CLASS_RUNTIME = 1,
|
||||
};
|
||||
|
||||
int snd_soc_register_card(struct snd_soc_card *card);
|
||||
int snd_soc_unregister_card(struct snd_soc_card *card);
|
||||
int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
|
||||
@@ -468,8 +463,19 @@ struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card,
|
||||
struct snd_soc_dai_link *dai_link);
|
||||
|
||||
bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd);
|
||||
void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream);
|
||||
void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream);
|
||||
|
||||
void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
|
||||
int stream, int action);
|
||||
static inline void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd,
|
||||
int stream)
|
||||
{
|
||||
snd_soc_runtime_action(rtd, stream, 1);
|
||||
}
|
||||
static inline void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd,
|
||||
int stream)
|
||||
{
|
||||
snd_soc_runtime_action(rtd, stream, -1);
|
||||
}
|
||||
|
||||
int snd_soc_runtime_calc_hw(struct snd_soc_pcm_runtime *rtd,
|
||||
struct snd_pcm_hardware *hw, int stream);
|
||||
@@ -498,10 +504,6 @@ int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
|
||||
const struct snd_pcm_hardware *hw);
|
||||
|
||||
/* Jack reporting */
|
||||
int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
|
||||
struct snd_soc_jack *jack, struct snd_soc_jack_pin *pins,
|
||||
unsigned int num_pins);
|
||||
|
||||
void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask);
|
||||
int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
|
||||
struct snd_soc_jack_pin *pins);
|
||||
@@ -571,8 +573,6 @@ static inline int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops)
|
||||
struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
|
||||
void *data, const char *long_name,
|
||||
const char *prefix);
|
||||
struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
|
||||
const char *name);
|
||||
int snd_soc_add_component_controls(struct snd_soc_component *component,
|
||||
const struct snd_kcontrol_new *controls, unsigned int num_controls);
|
||||
int snd_soc_add_card_controls(struct snd_soc_card *soc_card,
|
||||
@@ -790,9 +790,6 @@ struct snd_soc_dai_link {
|
||||
const struct snd_soc_pcm_stream *params;
|
||||
unsigned int num_params;
|
||||
|
||||
struct snd_soc_dapm_widget *playback_widget;
|
||||
struct snd_soc_dapm_widget *capture_widget;
|
||||
|
||||
unsigned int dai_fmt; /* format to set on init */
|
||||
|
||||
enum snd_soc_dpcm_trigger trigger[2]; /* trigger type for DPCM */
|
||||
@@ -809,7 +806,7 @@ struct snd_soc_dai_link {
|
||||
const struct snd_soc_compr_ops *compr_ops;
|
||||
|
||||
/* Mark this pcm with non atomic ops */
|
||||
bool nonatomic;
|
||||
unsigned int nonatomic:1;
|
||||
|
||||
/* For unidirectional dai links */
|
||||
unsigned int playback_only:1;
|
||||
@@ -1005,9 +1002,6 @@ struct snd_soc_card {
|
||||
|
||||
spinlock_t dpcm_lock;
|
||||
|
||||
bool instantiated;
|
||||
bool topology_shortname_created;
|
||||
|
||||
int (*probe)(struct snd_soc_card *card);
|
||||
int (*late_probe)(struct snd_soc_card *card);
|
||||
int (*remove)(struct snd_soc_card *card);
|
||||
@@ -1068,8 +1062,6 @@ struct snd_soc_card {
|
||||
int num_of_dapm_widgets;
|
||||
const struct snd_soc_dapm_route *of_dapm_routes;
|
||||
int num_of_dapm_routes;
|
||||
bool fully_routed;
|
||||
bool disable_route_checks;
|
||||
|
||||
/* lists of probed devices belonging to this card */
|
||||
struct list_head component_dev_list;
|
||||
@@ -1096,6 +1088,13 @@ struct snd_soc_card {
|
||||
#endif
|
||||
u32 pop_time;
|
||||
|
||||
/* bit field */
|
||||
unsigned int instantiated:1;
|
||||
unsigned int topology_shortname_created:1;
|
||||
unsigned int fully_routed:1;
|
||||
unsigned int disable_route_checks:1;
|
||||
unsigned int probed:1;
|
||||
|
||||
void *drvdata;
|
||||
};
|
||||
#define for_each_card_prelinks(card, i, link) \
|
||||
@@ -1146,16 +1145,21 @@ struct snd_soc_pcm_runtime {
|
||||
/* runtime devices */
|
||||
struct snd_pcm *pcm;
|
||||
struct snd_compr *compr;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
struct snd_soc_dai *cpu_dai;
|
||||
|
||||
/*
|
||||
* dais = cpu_dai + codec_dai
|
||||
* see
|
||||
* soc_new_pcm_runtime()
|
||||
* asoc_rtd_to_cpu()
|
||||
* asoc_rtd_to_codec()
|
||||
*/
|
||||
struct snd_soc_dai **dais;
|
||||
|
||||
struct snd_soc_dai **codec_dais;
|
||||
unsigned int num_codecs;
|
||||
|
||||
struct snd_soc_dai **cpu_dais;
|
||||
unsigned int num_cpus;
|
||||
|
||||
struct snd_soc_dapm_widget *playback_widget;
|
||||
struct snd_soc_dapm_widget *capture_widget;
|
||||
|
||||
struct delayed_work delayed_work;
|
||||
void (*close_delayed_work_func)(struct snd_soc_pcm_runtime *rtd);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
@@ -1170,28 +1174,28 @@ struct snd_soc_pcm_runtime {
|
||||
unsigned int fe_compr:1; /* for Dynamic PCM */
|
||||
|
||||
int num_components;
|
||||
struct snd_soc_component *components[0]; /* CPU/Codec/Platform */
|
||||
struct snd_soc_component *components[]; /* CPU/Codec/Platform */
|
||||
};
|
||||
/* see soc_new_pcm_runtime() */
|
||||
#define asoc_rtd_to_cpu(rtd, n) (rtd)->dais[n]
|
||||
#define asoc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->num_cpus]
|
||||
|
||||
#define for_each_rtd_components(rtd, i, component) \
|
||||
for ((i) = 0; \
|
||||
for ((i) = 0, component = NULL; \
|
||||
((i) < rtd->num_components) && ((component) = rtd->components[i]);\
|
||||
(i)++)
|
||||
#define for_each_rtd_cpu_dais(rtd, i, dai) \
|
||||
for ((i) = 0; \
|
||||
((i) < rtd->num_cpus) && ((dai) = rtd->cpu_dais[i]); \
|
||||
((i) < rtd->num_cpus) && ((dai) = asoc_rtd_to_cpu(rtd, i)); \
|
||||
(i)++)
|
||||
#define for_each_rtd_cpu_dais_rollback(rtd, i, dai) \
|
||||
for (; (--(i) >= 0) && ((dai) = rtd->cpu_dais[i]);)
|
||||
for (; (--(i) >= 0) && ((dai) = asoc_rtd_to_cpu(rtd, i));)
|
||||
#define for_each_rtd_codec_dais(rtd, i, dai) \
|
||||
for ((i) = 0; \
|
||||
((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \
|
||||
((i) < rtd->num_codecs) && ((dai) = asoc_rtd_to_codec(rtd, i)); \
|
||||
(i)++)
|
||||
#define for_each_rtd_codec_dais_rollback(rtd, i, dai) \
|
||||
for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)
|
||||
for (; (--(i) >= 0) && ((dai) = asoc_rtd_to_codec(rtd, i));)
|
||||
#define for_each_rtd_dais(rtd, i, dai) \
|
||||
for ((i) = 0; \
|
||||
((i) < (rtd)->num_cpus + (rtd)->num_codecs) && \
|
||||
@@ -1252,29 +1256,16 @@ struct soc_enum {
|
||||
#endif
|
||||
};
|
||||
|
||||
/* device driver data */
|
||||
|
||||
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
|
||||
void *data)
|
||||
{
|
||||
card->drvdata = data;
|
||||
}
|
||||
|
||||
static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
|
||||
{
|
||||
return card->drvdata;
|
||||
}
|
||||
|
||||
static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
|
||||
{
|
||||
if (mc->reg == mc->rreg && mc->shift == mc->rshift)
|
||||
return 0;
|
||||
return false;
|
||||
/*
|
||||
* mc->reg == mc->rreg && mc->shift != mc->rshift, or
|
||||
* mc->reg != mc->rreg means that the control is
|
||||
* stereo (bits in one register or in two registers)
|
||||
*/
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline unsigned int snd_soc_enum_val_to_item(struct soc_enum *e,
|
||||
@@ -1377,20 +1368,6 @@ struct snd_soc_dai *snd_soc_find_dai(
|
||||
|
||||
#include <sound/soc-dai.h>
|
||||
|
||||
static inline
|
||||
struct snd_soc_dai *snd_soc_card_get_codec_dai(struct snd_soc_card *card,
|
||||
const char *dai_name)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
|
||||
list_for_each_entry(rtd, &card->rtd_list, list) {
|
||||
if (!strcmp(rtd->codec_dai->name, dai_name))
|
||||
return rtd->codec_dai;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline
|
||||
int snd_soc_fixup_dai_links_platform_name(struct snd_soc_card *card,
|
||||
const char *platform_name)
|
||||
@@ -1436,5 +1413,6 @@ static inline void snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm)
|
||||
}
|
||||
|
||||
#include <sound/soc-component.h>
|
||||
#include <sound/soc-card.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
@@ -27,6 +27,9 @@ struct snd_sof_pdata {
|
||||
|
||||
struct device *dev;
|
||||
|
||||
/* indicate how many first bytes shouldn't be loaded into DSP memory. */
|
||||
size_t fw_offset;
|
||||
|
||||
/*
|
||||
* notification callback used if the hardware initialization
|
||||
* can take time or is handled in a workqueue. This callback
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* Copyright 2019 NXP
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
@@ -49,6 +49,9 @@
|
||||
/* bclk idle */
|
||||
#define SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_IDLE_HIGH BIT(5)
|
||||
|
||||
/* DMIC max. four controllers for eight microphone channels */
|
||||
#define SOF_DAI_INTEL_DMIC_NUM_CTRL 4
|
||||
|
||||
/* SSP Configuration Request - SOF_IPC_DAI_SSP_CONFIG */
|
||||
struct sof_ipc_dai_ssp_params {
|
||||
struct sof_ipc_hdr hdr;
|
||||
@@ -85,15 +88,19 @@ struct sof_ipc_dai_ssp_params {
|
||||
struct sof_ipc_dai_hda_params {
|
||||
struct sof_ipc_hdr hdr;
|
||||
uint32_t link_dma_ch;
|
||||
uint32_t rate;
|
||||
uint32_t channels;
|
||||
} __packed;
|
||||
|
||||
/* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */
|
||||
struct sof_ipc_dai_alh_params {
|
||||
struct sof_ipc_hdr hdr;
|
||||
uint32_t stream_id;
|
||||
uint32_t rate;
|
||||
uint32_t channels;
|
||||
|
||||
/* reserved for future use */
|
||||
uint32_t reserved[15];
|
||||
uint32_t reserved[13];
|
||||
} __packed;
|
||||
|
||||
/* DMIC Configuration Request - SOF_IPC_DAI_DMIC_CONFIG */
|
||||
@@ -135,7 +142,7 @@ struct sof_ipc_dai_dmic_pdm_ctrl {
|
||||
* version number used in configuration data is checked vs. version used by
|
||||
* device driver src/drivers/dmic.c need to match. It is incremented from
|
||||
* initial value 1 if updates done for the to driver would alter the operation
|
||||
* of the microhone.
|
||||
* of the microphone.
|
||||
*
|
||||
* Note: The microphone clock (pdmclk_min, pdmclk_max, duty_min, duty_max)
|
||||
* parameters need to be set as defined in microphone data sheet. E.g. clock
|
||||
@@ -170,12 +177,13 @@ struct sof_ipc_dai_dmic_params {
|
||||
uint32_t fifo_fs; /**< FIFO sample rate in Hz (8000..96000) */
|
||||
uint32_t reserved_1; /**< Reserved */
|
||||
uint16_t fifo_bits; /**< FIFO word length (16 or 32) */
|
||||
uint16_t reserved_2; /**< Reserved */
|
||||
uint16_t fifo_bits_b; /**< Deprecated since firmware ABI 3.0.1 */
|
||||
|
||||
uint16_t duty_min; /**< Min. mic clock duty cycle in % (20..80) */
|
||||
uint16_t duty_max; /**< Max. mic clock duty cycle in % (min..80) */
|
||||
|
||||
uint32_t num_pdm_active; /**< Number of active pdm controllers */
|
||||
uint32_t num_pdm_active; /**< Number of active pdm controllers. */
|
||||
/**< Range is 1..SOF_DAI_INTEL_DMIC_NUM_CTRL */
|
||||
|
||||
uint32_t wake_up_time; /**< Time from clock start to data (us) */
|
||||
uint32_t min_clock_on_time; /**< Min. time that clk is kept on (us) */
|
||||
@@ -184,8 +192,8 @@ struct sof_ipc_dai_dmic_params {
|
||||
/* reserved for future use */
|
||||
uint32_t reserved[5];
|
||||
|
||||
/**< variable number of pdm controller config */
|
||||
struct sof_ipc_dai_dmic_pdm_ctrl pdm[0];
|
||||
/**< PDM controllers configuration */
|
||||
struct sof_ipc_dai_dmic_pdm_ctrl pdm[SOF_DAI_INTEL_DMIC_NUM_CTRL];
|
||||
} __packed;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
|
||||
95
include/sound/sof/ext_manifest.h
Normal file
95
include/sound/sof/ext_manifest.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
*
|
||||
* Copyright(c) 2020 Intel Corporation. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Extended manifest is a place to store metadata about firmware, known during
|
||||
* compilation time - for example firmware version or used compiler.
|
||||
* Given information are read on host side before firmware startup.
|
||||
* This part of output binary is not signed.
|
||||
*/
|
||||
|
||||
#ifndef __SOF_FIRMWARE_EXT_MANIFEST_H__
|
||||
#define __SOF_FIRMWARE_EXT_MANIFEST_H__
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
#include <sound/sof/info.h>
|
||||
|
||||
/* In ASCII `XMan` */
|
||||
#define SOF_EXT_MAN_MAGIC_NUMBER 0x6e614d58
|
||||
|
||||
/* Build u32 number in format MMmmmppp */
|
||||
#define SOF_EXT_MAN_BUILD_VERSION(MAJOR, MINOR, PATH) ((uint32_t)( \
|
||||
((MAJOR) << 24) | \
|
||||
((MINOR) << 12) | \
|
||||
(PATH)))
|
||||
|
||||
/* check extended manifest version consistency */
|
||||
#define SOF_EXT_MAN_VERSION_INCOMPATIBLE(host_ver, cli_ver) ( \
|
||||
((host_ver) & GENMASK(31, 24)) != \
|
||||
((cli_ver) & GENMASK(31, 24)))
|
||||
|
||||
/* used extended manifest header version */
|
||||
#define SOF_EXT_MAN_VERSION SOF_EXT_MAN_BUILD_VERSION(1, 0, 0)
|
||||
|
||||
/* extended manifest header, deleting any field breaks backward compatibility */
|
||||
struct sof_ext_man_header {
|
||||
uint32_t magic; /*< identification number, */
|
||||
/*< EXT_MAN_MAGIC_NUMBER */
|
||||
uint32_t full_size; /*< [bytes] full size of ext_man, */
|
||||
/*< (header + content + padding) */
|
||||
uint32_t header_size; /*< [bytes] makes header extensionable, */
|
||||
/*< after append new field to ext_man header */
|
||||
/*< then backward compatible won't be lost */
|
||||
uint32_t header_version; /*< value of EXT_MAN_VERSION */
|
||||
/*< not related with following content */
|
||||
|
||||
/* just after this header should be list of ext_man_elem_* elements */
|
||||
} __packed;
|
||||
|
||||
/* Now define extended manifest elements */
|
||||
|
||||
/* Extended manifest elements types */
|
||||
enum sof_ext_man_elem_type {
|
||||
SOF_EXT_MAN_ELEM_FW_VERSION = 0,
|
||||
SOF_EXT_MAN_ELEM_WINDOW = SOF_IPC_EXT_WINDOW,
|
||||
SOF_EXT_MAN_ELEM_CC_VERSION = SOF_IPC_EXT_CC_INFO,
|
||||
};
|
||||
|
||||
/* extended manifest element header */
|
||||
struct sof_ext_man_elem_header {
|
||||
uint32_t type; /*< SOF_EXT_MAN_ELEM_ */
|
||||
uint32_t size; /*< in bytes, including header size */
|
||||
|
||||
/* just after this header should be type dependent content */
|
||||
} __packed;
|
||||
|
||||
/* FW version */
|
||||
struct sof_ext_man_fw_version {
|
||||
struct sof_ext_man_elem_header hdr;
|
||||
/* use sof_ipc struct because of code re-use */
|
||||
struct sof_ipc_fw_version version;
|
||||
uint32_t flags;
|
||||
} __packed;
|
||||
|
||||
/* extended data memory windows for IPC, trace and debug */
|
||||
struct sof_ext_man_window {
|
||||
struct sof_ext_man_elem_header hdr;
|
||||
/* use sof_ipc struct because of code re-use */
|
||||
struct sof_ipc_window ipc_window;
|
||||
} __packed;
|
||||
|
||||
/* Used C compiler description */
|
||||
struct sof_ext_man_cc_version {
|
||||
struct sof_ext_man_elem_header hdr;
|
||||
/* use sof_ipc struct because of code re-use */
|
||||
struct sof_ipc_cc_version cc_version;
|
||||
} __packed;
|
||||
|
||||
#endif /* __SOF_FIRMWARE_EXT_MANIFEST_H__ */
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
@@ -31,6 +31,8 @@ enum sof_ipc_ext_data {
|
||||
SOF_IPC_EXT_UNUSED = 0,
|
||||
SOF_IPC_EXT_WINDOW = 1,
|
||||
SOF_IPC_EXT_CC_INFO = 2,
|
||||
SOF_IPC_EXT_PROBE_INFO = 3,
|
||||
SOF_IPC_EXT_USER_ABI_INFO = 4,
|
||||
};
|
||||
|
||||
/* FW version - SOF_IPC_GLB_VERSION */
|
||||
@@ -109,9 +111,27 @@ struct sof_ipc_cc_version {
|
||||
/* reserved for future use */
|
||||
uint32_t reserved[4];
|
||||
|
||||
char name[16]; /* null terminated compiler name */
|
||||
char optim[4]; /* null terminated compiler -O flag value */
|
||||
char desc[]; /* null terminated compiler description */
|
||||
uint8_t name[16]; /* null terminated compiler name */
|
||||
uint8_t optim[4]; /* null terminated compiler -O flag value */
|
||||
uint8_t desc[32]; /* null terminated compiler description */
|
||||
} __packed;
|
||||
|
||||
/* extended data: Probe setup */
|
||||
struct sof_ipc_probe_support {
|
||||
struct sof_ipc_ext_data_hdr ext_hdr;
|
||||
|
||||
uint32_t probe_points_max;
|
||||
uint32_t injection_dmas_max;
|
||||
|
||||
/* reserved for future use */
|
||||
uint32_t reserved[2];
|
||||
} __packed;
|
||||
|
||||
/* extended data: user abi version(s) */
|
||||
struct sof_ipc_user_abi_version {
|
||||
struct sof_ipc_ext_data_hdr ext_hdr;
|
||||
|
||||
uint32_t abi_dbg_version;
|
||||
} __packed;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
@@ -37,6 +37,8 @@ enum sof_comp_type {
|
||||
SOF_COMP_SELECTOR, /**< channel selector component */
|
||||
SOF_COMP_DEMUX,
|
||||
SOF_COMP_ASRC, /**< Asynchronous sample rate converter */
|
||||
SOF_COMP_DCBLOCK,
|
||||
SOF_COMP_SMART_AMP, /**< smart amplifier component */
|
||||
/* keep FILEREAD/FILEWRITE as the last ones */
|
||||
SOF_COMP_FILEREAD = 10000, /**< host test based file IO */
|
||||
SOF_COMP_FILEWRITE = 10001, /**< host test based file IO */
|
||||
@@ -75,11 +77,23 @@ struct sof_ipc_comp {
|
||||
#define SOF_MEM_CAPS_CACHE (1 << 6) /**< cacheable */
|
||||
#define SOF_MEM_CAPS_EXEC (1 << 7) /**< executable */
|
||||
|
||||
/*
|
||||
* overrun will cause ring buffer overwrite, instead of XRUN.
|
||||
*/
|
||||
#define SOF_BUF_OVERRUN_PERMITTED BIT(0)
|
||||
|
||||
/*
|
||||
* underrun will cause readback of 0s, instead of XRUN.
|
||||
*/
|
||||
#define SOF_BUF_UNDERRUN_PERMITTED BIT(1)
|
||||
|
||||
/* create new component buffer - SOF_IPC_TPLG_BUFFER_NEW */
|
||||
struct sof_ipc_buffer {
|
||||
struct sof_ipc_comp comp;
|
||||
uint32_t size; /**< buffer size in bytes */
|
||||
uint32_t caps; /**< SOF_MEM_CAPS_ */
|
||||
uint32_t flags; /**< SOF_BUF_ flags defined above */
|
||||
uint32_t reserved; /**< reserved for future use */
|
||||
} __packed;
|
||||
|
||||
/* generic component config data - must always be after struct sof_ipc_comp */
|
||||
@@ -206,6 +220,8 @@ enum sof_ipc_process_type {
|
||||
SOF_PROCESS_CHAN_SELECTOR, /**< Channel Selector */
|
||||
SOF_PROCESS_MUX,
|
||||
SOF_PROCESS_DEMUX,
|
||||
SOF_PROCESS_DCBLOCK,
|
||||
SOF_PROCESS_SMART_AMP, /**< Smart Amplifier */
|
||||
};
|
||||
|
||||
/* generic "effect", "codec" or proprietary processing component */
|
||||
@@ -218,7 +234,7 @@ struct sof_ipc_comp_process {
|
||||
/* reserved for future use */
|
||||
uint32_t reserved[7];
|
||||
|
||||
unsigned char data[0];
|
||||
uint8_t data[0];
|
||||
} __packed;
|
||||
|
||||
/* frees components, buffers and pipelines
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
@@ -72,7 +72,7 @@ struct sof_ipc_dma_trace_posn {
|
||||
struct sof_ipc_panic_info {
|
||||
struct sof_ipc_hdr hdr;
|
||||
uint32_t code; /* SOF_IPC_PANIC_ */
|
||||
char filename[SOF_TRACE_FILENAME_SIZE];
|
||||
uint8_t filename[SOF_TRACE_FILENAME_SIZE];
|
||||
uint32_t linenum;
|
||||
} __packed;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
|
||||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
|
||||
/*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*
|
||||
* @pid: Put 0 for global total, while positive pid for process total.
|
||||
*
|
||||
* @size: Virtual size of the allocation in bytes.
|
||||
* @size: Size of the allocation in bytes.
|
||||
*
|
||||
*/
|
||||
TRACE_EVENT(gpu_mem_total,
|
||||
|
||||
@@ -130,7 +130,7 @@ DEFINE_EVENT(iocg_inuse_update, iocost_inuse_reset,
|
||||
|
||||
TRACE_EVENT(iocost_ioc_vrate_adj,
|
||||
|
||||
TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 (*missed_ppm)[2],
|
||||
TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 *missed_ppm,
|
||||
u32 rq_wait_pct, int nr_lagging, int nr_shortages,
|
||||
int nr_surpluses),
|
||||
|
||||
@@ -155,8 +155,8 @@ TRACE_EVENT(iocost_ioc_vrate_adj,
|
||||
__entry->old_vrate = atomic64_read(&ioc->vtime_rate);;
|
||||
__entry->new_vrate = new_vrate;
|
||||
__entry->busy_level = ioc->busy_level;
|
||||
__entry->read_missed_ppm = (*missed_ppm)[READ];
|
||||
__entry->write_missed_ppm = (*missed_ppm)[WRITE];
|
||||
__entry->read_missed_ppm = missed_ppm[READ];
|
||||
__entry->write_missed_ppm = missed_ppm[WRITE];
|
||||
__entry->rq_wait_pct = rq_wait_pct;
|
||||
__entry->nr_lagging = nr_lagging;
|
||||
__entry->nr_shortages = nr_shortages;
|
||||
|
||||
@@ -692,11 +692,10 @@ TRACE_EVENT(xprtrdma_prepsend_failed,
|
||||
|
||||
TRACE_EVENT(xprtrdma_post_send,
|
||||
TP_PROTO(
|
||||
const struct rpcrdma_req *req,
|
||||
int status
|
||||
const struct rpcrdma_req *req
|
||||
),
|
||||
|
||||
TP_ARGS(req, status),
|
||||
TP_ARGS(req),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(const void *, req)
|
||||
@@ -705,7 +704,6 @@ TRACE_EVENT(xprtrdma_post_send,
|
||||
__field(unsigned int, client_id)
|
||||
__field(int, num_sge)
|
||||
__field(int, signaled)
|
||||
__field(int, status)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
@@ -718,15 +716,13 @@ TRACE_EVENT(xprtrdma_post_send,
|
||||
__entry->sc = req->rl_sendctx;
|
||||
__entry->num_sge = req->rl_wr.num_sge;
|
||||
__entry->signaled = req->rl_wr.send_flags & IB_SEND_SIGNALED;
|
||||
__entry->status = status;
|
||||
),
|
||||
|
||||
TP_printk("task:%u@%u req=%p sc=%p (%d SGE%s) %sstatus=%d",
|
||||
TP_printk("task:%u@%u req=%p sc=%p (%d SGE%s) %s",
|
||||
__entry->task_id, __entry->client_id,
|
||||
__entry->req, __entry->sc, __entry->num_sge,
|
||||
(__entry->num_sge == 1 ? "" : "s"),
|
||||
(__entry->signaled ? "signaled " : ""),
|
||||
__entry->status
|
||||
(__entry->signaled ? "signaled" : "")
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1695,17 +1691,15 @@ DECLARE_EVENT_CLASS(svcrdma_sendcomp_event,
|
||||
|
||||
TRACE_EVENT(svcrdma_post_send,
|
||||
TP_PROTO(
|
||||
const struct ib_send_wr *wr,
|
||||
int status
|
||||
const struct ib_send_wr *wr
|
||||
),
|
||||
|
||||
TP_ARGS(wr, status),
|
||||
TP_ARGS(wr),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(const void *, cqe)
|
||||
__field(unsigned int, num_sge)
|
||||
__field(u32, inv_rkey)
|
||||
__field(int, status)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
@@ -1713,12 +1707,11 @@ TRACE_EVENT(svcrdma_post_send,
|
||||
__entry->num_sge = wr->num_sge;
|
||||
__entry->inv_rkey = (wr->opcode == IB_WR_SEND_WITH_INV) ?
|
||||
wr->ex.invalidate_rkey : 0;
|
||||
__entry->status = status;
|
||||
),
|
||||
|
||||
TP_printk("cqe=%p num_sge=%u inv_rkey=0x%08x status=%d",
|
||||
TP_printk("cqe=%p num_sge=%u inv_rkey=0x%08x",
|
||||
__entry->cqe, __entry->num_sge,
|
||||
__entry->inv_rkey, __entry->status
|
||||
__entry->inv_rkey
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1783,26 +1776,23 @@ TRACE_EVENT(svcrdma_wc_receive,
|
||||
TRACE_EVENT(svcrdma_post_rw,
|
||||
TP_PROTO(
|
||||
const void *cqe,
|
||||
int sqecount,
|
||||
int status
|
||||
int sqecount
|
||||
),
|
||||
|
||||
TP_ARGS(cqe, sqecount, status),
|
||||
TP_ARGS(cqe, sqecount),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(const void *, cqe)
|
||||
__field(int, sqecount)
|
||||
__field(int, status)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->cqe = cqe;
|
||||
__entry->sqecount = sqecount;
|
||||
__entry->status = status;
|
||||
),
|
||||
|
||||
TP_printk("cqe=%p sqecount=%d status=%d",
|
||||
__entry->cqe, __entry->sqecount, __entry->status
|
||||
TP_printk("cqe=%p sqecount=%d",
|
||||
__entry->cqe, __entry->sqecount
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1870,6 +1860,34 @@ DECLARE_EVENT_CLASS(svcrdma_sendqueue_event,
|
||||
DEFINE_SQ_EVENT(full);
|
||||
DEFINE_SQ_EVENT(retry);
|
||||
|
||||
TRACE_EVENT(svcrdma_sq_post_err,
|
||||
TP_PROTO(
|
||||
const struct svcxprt_rdma *rdma,
|
||||
int status
|
||||
),
|
||||
|
||||
TP_ARGS(rdma, status),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, avail)
|
||||
__field(int, depth)
|
||||
__field(int, status)
|
||||
__string(addr, rdma->sc_xprt.xpt_remotebuf)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->avail = atomic_read(&rdma->sc_sq_avail);
|
||||
__entry->depth = rdma->sc_sq_depth;
|
||||
__entry->status = status;
|
||||
__assign_str(addr, rdma->sc_xprt.xpt_remotebuf);
|
||||
),
|
||||
|
||||
TP_printk("addr=%s sc_sq_avail=%d/%d status=%d",
|
||||
__get_str(addr), __entry->avail, __entry->depth,
|
||||
__entry->status
|
||||
)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_RPCRDMA_H */
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -1112,18 +1112,17 @@ TRACE_EVENT(rxrpc_rtt_tx,
|
||||
TRACE_EVENT(rxrpc_rtt_rx,
|
||||
TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
|
||||
rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
|
||||
s64 rtt, u8 nr, s64 avg),
|
||||
u32 rtt, u32 rto),
|
||||
|
||||
TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg),
|
||||
TP_ARGS(call, why, send_serial, resp_serial, rtt, rto),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, call )
|
||||
__field(enum rxrpc_rtt_rx_trace, why )
|
||||
__field(u8, nr )
|
||||
__field(rxrpc_serial_t, send_serial )
|
||||
__field(rxrpc_serial_t, resp_serial )
|
||||
__field(s64, rtt )
|
||||
__field(u64, avg )
|
||||
__field(u32, rtt )
|
||||
__field(u32, rto )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
@@ -1132,18 +1131,16 @@ TRACE_EVENT(rxrpc_rtt_rx,
|
||||
__entry->send_serial = send_serial;
|
||||
__entry->resp_serial = resp_serial;
|
||||
__entry->rtt = rtt;
|
||||
__entry->nr = nr;
|
||||
__entry->avg = avg;
|
||||
__entry->rto = rto;
|
||||
),
|
||||
|
||||
TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld",
|
||||
TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%u rto=%u",
|
||||
__entry->call,
|
||||
__print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
|
||||
__entry->send_serial,
|
||||
__entry->resp_serial,
|
||||
__entry->rtt,
|
||||
__entry->nr,
|
||||
__entry->avg)
|
||||
__entry->rto)
|
||||
);
|
||||
|
||||
TRACE_EVENT(rxrpc_timer,
|
||||
@@ -1544,6 +1541,41 @@ TRACE_EVENT(rxrpc_notify_socket,
|
||||
__entry->serial)
|
||||
);
|
||||
|
||||
TRACE_EVENT(rxrpc_rx_discard_ack,
|
||||
TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial,
|
||||
rxrpc_seq_t first_soft_ack, rxrpc_seq_t call_ackr_first,
|
||||
rxrpc_seq_t prev_pkt, rxrpc_seq_t call_ackr_prev),
|
||||
|
||||
TP_ARGS(debug_id, serial, first_soft_ack, call_ackr_first,
|
||||
prev_pkt, call_ackr_prev),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, debug_id )
|
||||
__field(rxrpc_serial_t, serial )
|
||||
__field(rxrpc_seq_t, first_soft_ack)
|
||||
__field(rxrpc_seq_t, call_ackr_first)
|
||||
__field(rxrpc_seq_t, prev_pkt)
|
||||
__field(rxrpc_seq_t, call_ackr_prev)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->debug_id = debug_id;
|
||||
__entry->serial = serial;
|
||||
__entry->first_soft_ack = first_soft_ack;
|
||||
__entry->call_ackr_first = call_ackr_first;
|
||||
__entry->prev_pkt = prev_pkt;
|
||||
__entry->call_ackr_prev = call_ackr_prev;
|
||||
),
|
||||
|
||||
TP_printk("c=%08x r=%08x %08x<%08x %08x<%08x",
|
||||
__entry->debug_id,
|
||||
__entry->serial,
|
||||
__entry->first_soft_ack,
|
||||
__entry->call_ackr_first,
|
||||
__entry->prev_pkt,
|
||||
__entry->call_ackr_prev)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_RXRPC_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
||||
@@ -33,7 +33,7 @@ TRACE_EVENT(wbt_stat,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
strlcpy(__entry->name, dev_name(bdi->dev),
|
||||
strlcpy(__entry->name, bdi_dev_name(bdi),
|
||||
ARRAY_SIZE(__entry->name));
|
||||
__entry->rmean = stat[0].mean;
|
||||
__entry->rmin = stat[0].min;
|
||||
@@ -68,7 +68,7 @@ TRACE_EVENT(wbt_lat,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
strlcpy(__entry->name, dev_name(bdi->dev),
|
||||
strlcpy(__entry->name, bdi_dev_name(bdi),
|
||||
ARRAY_SIZE(__entry->name));
|
||||
__entry->lat = div_u64(lat, 1000);
|
||||
),
|
||||
@@ -105,7 +105,7 @@ TRACE_EVENT(wbt_step,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
strlcpy(__entry->name, dev_name(bdi->dev),
|
||||
strlcpy(__entry->name, bdi_dev_name(bdi),
|
||||
ARRAY_SIZE(__entry->name));
|
||||
__entry->msg = msg;
|
||||
__entry->step = step;
|
||||
@@ -141,7 +141,7 @@ TRACE_EVENT(wbt_timer,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
strlcpy(__entry->name, dev_name(bdi->dev),
|
||||
strlcpy(__entry->name, bdi_dev_name(bdi),
|
||||
ARRAY_SIZE(__entry->name));
|
||||
__entry->status = status;
|
||||
__entry->step = step;
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
EM( WB_REASON_SYNC, "sync") \
|
||||
EM( WB_REASON_PERIODIC, "periodic") \
|
||||
EM( WB_REASON_LAPTOP_TIMER, "laptop_timer") \
|
||||
EM( WB_REASON_FREE_MORE_MEM, "free_more_memory") \
|
||||
EM( WB_REASON_FS_FREE_SPACE, "fs_free_space") \
|
||||
EMe(WB_REASON_FORKER_THREAD, "forker_thread")
|
||||
|
||||
|
||||
@@ -346,6 +346,10 @@ struct drm_amdgpu_gem_userptr {
|
||||
#define AMDGPU_TILING_DCC_PITCH_MAX_MASK 0x3FFF
|
||||
#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT 43
|
||||
#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK 0x1
|
||||
#define AMDGPU_TILING_DCC_INDEPENDENT_128B_SHIFT 44
|
||||
#define AMDGPU_TILING_DCC_INDEPENDENT_128B_MASK 0x1
|
||||
#define AMDGPU_TILING_SCANOUT_SHIFT 63
|
||||
#define AMDGPU_TILING_SCANOUT_MASK 0x1
|
||||
|
||||
/* Set/Get helpers for tiling flags. */
|
||||
#define AMDGPU_TILING_SET(field, value) \
|
||||
|
||||
@@ -73,7 +73,7 @@ struct bpf_insn {
|
||||
/* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */
|
||||
struct bpf_lpm_trie_key {
|
||||
__u32 prefixlen; /* up to 32 for AF_INET, 128 for AF_INET6 */
|
||||
__u8 data[]; /* Arbitrary size */
|
||||
__u8 data[0]; /* Arbitrary size */
|
||||
};
|
||||
|
||||
struct bpf_cgroup_storage_key {
|
||||
@@ -1642,7 +1642,7 @@ union bpf_attr {
|
||||
* ifindex, but doesn't require a map to do so.
|
||||
* Return
|
||||
* **XDP_REDIRECT** on success, or the value of the two lower bits
|
||||
* of the **flags* argument on error.
|
||||
* of the *flags* argument on error.
|
||||
*
|
||||
* int bpf_sk_redirect_map(struct sk_buff *skb, struct bpf_map *map, u32 key, u64 flags)
|
||||
* Description
|
||||
|
||||
@@ -45,13 +45,13 @@ struct dlm_lock_params {
|
||||
void __user *bastaddr;
|
||||
struct dlm_lksb __user *lksb;
|
||||
char lvb[DLM_USER_LVB_LEN];
|
||||
char name[];
|
||||
char name[0];
|
||||
};
|
||||
|
||||
struct dlm_lspace_params {
|
||||
__u32 flags;
|
||||
__u32 minor;
|
||||
char name[];
|
||||
char name[0];
|
||||
};
|
||||
|
||||
struct dlm_purge_params {
|
||||
|
||||
@@ -39,6 +39,12 @@ struct dma_buf_sync {
|
||||
|
||||
#define DMA_BUF_BASE 'b'
|
||||
#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
|
||||
|
||||
/* 32/64bitness of this uapi was botched in android, there's no difference
|
||||
* between them in actual uapi, they're just different numbers.
|
||||
*/
|
||||
#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
|
||||
#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32)
|
||||
#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@ struct fiemap {
|
||||
__u32 fm_mapped_extents;/* number of extents that were mapped (out) */
|
||||
__u32 fm_extent_count; /* size of fm_extents array (in) */
|
||||
__u32 fm_reserved;
|
||||
struct fiemap_extent fm_extents[]; /* array of mapped extents (out) */
|
||||
struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */
|
||||
};
|
||||
|
||||
#define FIEMAP_MAX_OFFSET (~0ULL)
|
||||
|
||||
@@ -119,8 +119,8 @@ enum hv_fcopy_op {
|
||||
|
||||
struct hv_fcopy_hdr {
|
||||
__u32 operation;
|
||||
uuid_le service_id0; /* currently unused */
|
||||
uuid_le service_id1; /* currently unused */
|
||||
__u8 service_id0[16]; /* currently unused */
|
||||
__u8 service_id1[16]; /* currently unused */
|
||||
} __attribute__((packed));
|
||||
|
||||
#define OVER_WRITE 0x1
|
||||
|
||||
@@ -60,7 +60,7 @@ struct arc_rfc1201 {
|
||||
__u8 proto; /* protocol ID field - varies */
|
||||
__u8 split_flag; /* for use with split packets */
|
||||
__be16 sequence; /* sequence number */
|
||||
__u8 payload[]; /* space remaining in packet (504 bytes)*/
|
||||
__u8 payload[0]; /* space remaining in packet (504 bytes)*/
|
||||
};
|
||||
#define RFC1201_HDR_SIZE 4
|
||||
|
||||
@@ -69,7 +69,7 @@ struct arc_rfc1201 {
|
||||
*/
|
||||
struct arc_rfc1051 {
|
||||
__u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */
|
||||
__u8 payload[]; /* 507 bytes */
|
||||
__u8 payload[0]; /* 507 bytes */
|
||||
};
|
||||
#define RFC1051_HDR_SIZE 1
|
||||
|
||||
@@ -80,7 +80,7 @@ struct arc_rfc1051 {
|
||||
struct arc_eth_encap {
|
||||
__u8 proto; /* Always ARC_P_ETHER */
|
||||
struct ethhdr eth; /* standard ethernet header (yuck!) */
|
||||
__u8 payload[]; /* 493 bytes */
|
||||
__u8 payload[0]; /* 493 bytes */
|
||||
};
|
||||
#define ETH_ENCAP_HDR_SIZE 14
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ struct mmc_ioc_cmd {
|
||||
*/
|
||||
struct mmc_ioc_multi_cmd {
|
||||
__u64 num_of_cmds;
|
||||
struct mmc_ioc_cmd cmds[];
|
||||
struct mmc_ioc_cmd cmds[0];
|
||||
};
|
||||
|
||||
#define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd)
|
||||
|
||||
@@ -29,12 +29,12 @@ struct net_dm_config_entry {
|
||||
|
||||
struct net_dm_config_msg {
|
||||
__u32 entries;
|
||||
struct net_dm_config_entry options[];
|
||||
struct net_dm_config_entry options[0];
|
||||
};
|
||||
|
||||
struct net_dm_alert_msg {
|
||||
__u32 entries;
|
||||
struct net_dm_drop_point points[];
|
||||
struct net_dm_drop_point points[0];
|
||||
};
|
||||
|
||||
struct net_dm_user_msg {
|
||||
|
||||
@@ -40,7 +40,7 @@ struct ebt_mac_wormhash_tuple {
|
||||
struct ebt_mac_wormhash {
|
||||
int table[257];
|
||||
int poolsize;
|
||||
struct ebt_mac_wormhash_tuple pool[];
|
||||
struct ebt_mac_wormhash_tuple pool[0];
|
||||
};
|
||||
|
||||
#define ebt_mac_wormhash_size(x) ((x) ? sizeof(struct ebt_mac_wormhash) \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user