#define dev_fmt(fmt) …
#include <linux/atomic.h>
#include <linux/debugfs.h>
#include <linux/dev_printk.h>
#include <linux/dcache.h>
#include <linux/file.h>
#include <linux/kernel.h>
#include <linux/math64.h>
#include <linux/mutex.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/units.h>
#include "adf_accel_devices.h"
#include "adf_cfg_strings.h"
#include "adf_telemetry.h"
#include "adf_tl_debugfs.h"
#define TL_VALUE_MIN_PADDING …
#define TL_KEY_MIN_PADDING …
#define TL_RP_SRV_UNKNOWN …
static int tl_collect_values_u32(struct adf_telemetry *telemetry,
size_t counter_offset, u64 *arr)
{ … }
static int tl_collect_values_u64(struct adf_telemetry *telemetry,
size_t counter_offset, u64 *arr)
{ … }
#define avg_array(array, len) …
static int tl_calc_count(struct adf_telemetry *telemetry,
const struct adf_tl_dbg_counter *ctr,
struct adf_tl_dbg_aggr_values *vals)
{ … }
static int tl_cycles_to_ns(struct adf_telemetry *telemetry,
const struct adf_tl_dbg_counter *ctr,
struct adf_tl_dbg_aggr_values *vals)
{ … }
static int tl_lat_acc_avg(struct adf_telemetry *telemetry,
const struct adf_tl_dbg_counter *ctr,
struct adf_tl_dbg_aggr_values *vals)
{ … }
static int tl_bw_hw_units_to_mbps(struct adf_telemetry *telemetry,
const struct adf_tl_dbg_counter *ctr,
struct adf_tl_dbg_aggr_values *vals)
{ … }
static void tl_seq_printf_counter(struct adf_telemetry *telemetry,
struct seq_file *s, const char *name,
struct adf_tl_dbg_aggr_values *vals)
{ … }
static int tl_calc_and_print_counter(struct adf_telemetry *telemetry,
struct seq_file *s,
const struct adf_tl_dbg_counter *ctr,
const char *name)
{ … }
static int tl_print_sl_counter(struct adf_telemetry *telemetry,
const struct adf_tl_dbg_counter *ctr,
struct seq_file *s, u8 cnt_id)
{ … }
static int tl_calc_and_print_sl_counters(struct adf_accel_dev *accel_dev,
struct seq_file *s, u8 cnt_type, u8 cnt_id)
{ … }
static void tl_print_msg_cnt(struct seq_file *s, u32 msg_cnt)
{ … }
static int tl_print_dev_data(struct adf_accel_dev *accel_dev,
struct seq_file *s)
{ … }
static int tl_dev_data_show(struct seq_file *s, void *unused)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int tl_control_show(struct seq_file *s, void *unused)
{ … }
static ssize_t tl_control_write(struct file *file, const char __user *userbuf,
size_t count, loff_t *ppos)
{ … }
DEFINE_SHOW_STORE_ATTRIBUTE(…);
static int get_rp_index_from_file(const struct file *f, u8 *rp_id, u8 rp_num)
{ … }
static int adf_tl_dbg_change_rp_index(struct adf_accel_dev *accel_dev,
unsigned int new_rp_num,
unsigned int rp_regs_index)
{ … }
static void tl_print_rp_srv(struct adf_accel_dev *accel_dev, struct seq_file *s,
u8 rp_idx)
{ … }
static int tl_print_rp_data(struct adf_accel_dev *accel_dev, struct seq_file *s,
u8 rp_regs_index)
{ … }
static int tl_rp_data_show(struct seq_file *s, void *unused)
{ … }
static ssize_t tl_rp_data_write(struct file *file, const char __user *userbuf,
size_t count, loff_t *ppos)
{ … }
DEFINE_SHOW_STORE_ATTRIBUTE(…);
void adf_tl_dbgfs_add(struct adf_accel_dev *accel_dev)
{ … }
void adf_tl_dbgfs_rm(struct adf_accel_dev *accel_dev)
{ … }