#include <linux/seq_file.h>
#include <linux/debugfs.h>
#include <linux/string_helpers.h>
#include <linux/sort.h>
#include <linux/ctype.h>
#include "cxgb4.h"
#include "t4_regs.h"
#include "t4_values.h"
#include "t4fw_api.h"
#include "cxgb4_debugfs.h"
#include "clip_tbl.h"
#include "l2t.h"
#include "cudbg_if.h"
#include "cudbg_lib_common.h"
#include "cudbg_entity.h"
#include "cudbg_lib.h"
#include "cxgb4_tc_mqprio.h"
static void *seq_tab_get_idx(struct seq_tab *tb, loff_t pos)
{ … }
static void *seq_tab_start(struct seq_file *seq, loff_t *pos)
{ … }
static void *seq_tab_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static void seq_tab_stop(struct seq_file *seq, void *v)
{ … }
static int seq_tab_show(struct seq_file *seq, void *v)
{ … }
static const struct seq_operations seq_tab_ops = …;
struct seq_tab *seq_open_tab(struct file *f, unsigned int rows,
unsigned int width, unsigned int have_header,
int (*show)(struct seq_file *seq, void *v, int i))
{ … }
static int seq_tab_trim(struct seq_tab *p, unsigned int new_rows)
{ … }
static int cim_la_show(struct seq_file *seq, void *v, int idx)
{ … }
static int cim_la_show_3in1(struct seq_file *seq, void *v, int idx)
{ … }
static int cim_la_show_t6(struct seq_file *seq, void *v, int idx)
{ … }
static int cim_la_show_pc_t6(struct seq_file *seq, void *v, int idx)
{ … }
static int cim_la_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations cim_la_fops = …;
static int cim_pif_la_show(struct seq_file *seq, void *v, int idx)
{ … }
static int cim_pif_la_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations cim_pif_la_fops = …;
static int cim_ma_la_show(struct seq_file *seq, void *v, int idx)
{ … }
static int cim_ma_la_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations cim_ma_la_fops = …;
static int cim_qcfg_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int cimq_show(struct seq_file *seq, void *v, int idx)
{ … }
static int cim_ibq_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations cim_ibq_fops = …;
static int cim_obq_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations cim_obq_fops = …;
struct field_desc { … };
static void field_desc_show(struct seq_file *seq, u64 v,
const struct field_desc *p)
{ … }
static struct field_desc tp_la0[] = …;
static int tp_la_show(struct seq_file *seq, void *v, int idx)
{ … }
static int tp_la_show2(struct seq_file *seq, void *v, int idx)
{ … }
static int tp_la_show3(struct seq_file *seq, void *v, int idx)
{ … }
static int tp_la_open(struct inode *inode, struct file *file)
{ … }
static ssize_t tp_la_write(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations tp_la_fops = …;
static int ulprx_la_show(struct seq_file *seq, void *v, int idx)
{ … }
static int ulprx_la_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations ulprx_la_fops = …;
static int pm_stats_show(struct seq_file *seq, void *v)
{ … }
static int pm_stats_open(struct inode *inode, struct file *file)
{ … }
static ssize_t pm_stats_clear(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations pm_stats_debugfs_fops = …;
static int tx_rate_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int cctrl_tbl_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static char *unit_conv(char *buf, size_t len, unsigned int val,
unsigned int factor)
{ … }
static int clk_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static const char * const devlog_level_strings[] = …;
static const char * const devlog_facility_strings[] = …;
struct devlog_info { … };
static int devlog_show(struct seq_file *seq, void *v)
{ … }
static inline void *devlog_get_idx(struct devlog_info *dinfo, loff_t pos)
{ … }
static void *devlog_start(struct seq_file *seq, loff_t *pos)
{ … }
static void *devlog_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static void devlog_stop(struct seq_file *seq, void *v)
{ … }
static const struct seq_operations devlog_seq_ops = …;
static int devlog_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations devlog_fops = …;
static int mboxlog_show(struct seq_file *seq, void *v)
{ … }
static inline void *mboxlog_get_idx(struct seq_file *seq, loff_t pos)
{ … }
static void *mboxlog_start(struct seq_file *seq, loff_t *pos)
{ … }
static void *mboxlog_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static void mboxlog_stop(struct seq_file *seq, void *v)
{ … }
static const struct seq_operations mboxlog_seq_ops = …;
static int mboxlog_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations mboxlog_fops = …;
static int mbox_show(struct seq_file *seq, void *v)
{ … }
static int mbox_open(struct inode *inode, struct file *file)
{ … }
static ssize_t mbox_write(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations mbox_debugfs_fops = …;
static int mps_trc_show(struct seq_file *seq, void *v)
{ … }
static int mps_trc_open(struct inode *inode, struct file *file)
{ … }
static unsigned int xdigit2int(unsigned char c)
{ … }
#define TRC_PORT_NONE …
#define TRC_RSS_ENABLE …
#define TRC_RSS_DISABLE …
static ssize_t mps_trc_write(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations mps_trc_debugfs_fops = …;
static ssize_t flash_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos)
{ … }
static const struct file_operations flash_debugfs_fops = …;
static inline void tcamxy2valmask(u64 x, u64 y, u8 *addr, u64 *mask)
{ … }
static int mps_tcam_show(struct seq_file *seq, void *v)
{ … }
static inline void *mps_tcam_get_idx(struct seq_file *seq, loff_t pos)
{ … }
static void *mps_tcam_start(struct seq_file *seq, loff_t *pos)
{ … }
static void *mps_tcam_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static void mps_tcam_stop(struct seq_file *seq, void *v)
{ … }
static const struct seq_operations mps_tcam_seq_ops = …;
static int mps_tcam_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations mps_tcam_debugfs_fops = …;
static int sensors_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
#if IS_ENABLED(CONFIG_IPV6)
DEFINE_SHOW_ATTRIBUTE(…);
#endif
static int rss_show(struct seq_file *seq, void *v, int idx)
{ … }
static int rss_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations rss_debugfs_fops = …;
static const char *yesno(int x)
{ … }
static int rss_config_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int rss_key_show(struct seq_file *seq, void *v)
{ … }
static int rss_key_open(struct inode *inode, struct file *file)
{ … }
static ssize_t rss_key_write(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations rss_key_debugfs_fops = …;
struct rss_pf_conf { … };
static int rss_pf_config_show(struct seq_file *seq, void *v, int idx)
{ … }
static int rss_pf_config_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations rss_pf_config_debugfs_fops = …;
struct rss_vf_conf { … };
static int rss_vf_config_show(struct seq_file *seq, void *v, int idx)
{ … }
static int rss_vf_config_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations rss_vf_config_debugfs_fops = …;
#ifdef CONFIG_CHELSIO_T4_DCB
static int dcb_info_show(struct seq_file *seq, void *v)
{ … }
static inline void *dcb_info_get_idx(struct adapter *adap, loff_t pos)
{ … }
static void *dcb_info_start(struct seq_file *seq, loff_t *pos)
{ … }
static void dcb_info_stop(struct seq_file *seq, void *v)
{ … }
static void *dcb_info_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static const struct seq_operations dcb_info_seq_ops = …;
static int dcb_info_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations dcb_info_debugfs_fops = …;
#endif
static int resources_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static inline struct port_info *ethqset2pinfo(struct adapter *adap, int qset)
{ … }
static int sge_qinfo_uld_txq_entries(const struct adapter *adap, int uld)
{ … }
static int sge_qinfo_uld_rspq_entries(const struct adapter *adap, int uld,
bool ciq)
{ … }
static int sge_qinfo_uld_rxq_entries(const struct adapter *adap, int uld)
{ … }
static int sge_qinfo_uld_ciq_entries(const struct adapter *adap, int uld)
{ … }
static int sge_qinfo_show(struct seq_file *seq, void *v)
{ … }
static int sge_queue_entries(struct adapter *adap)
{ … }
static void *sge_queue_start(struct seq_file *seq, loff_t *pos)
{ … }
static void sge_queue_stop(struct seq_file *seq, void *v)
{ … }
static void *sge_queue_next(struct seq_file *seq, void *v, loff_t *pos)
{ … }
static const struct seq_operations sge_qinfo_seq_ops = …;
static int sge_qinfo_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations sge_qinfo_debugfs_fops = …;
int mem_open(struct inode *inode, struct file *file)
{ … }
static ssize_t mem_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos)
{ … }
static const struct file_operations mem_debugfs_fops = …;
static int tid_info_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static void add_debugfs_mem(struct adapter *adap, const char *name,
unsigned int idx, unsigned int size_mb)
{ … }
static ssize_t blocked_fl_read(struct file *filp, char __user *ubuf,
size_t count, loff_t *ppos)
{ … }
static ssize_t blocked_fl_write(struct file *filp, const char __user *ubuf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations blocked_fl_fops = …;
static void mem_region_show(struct seq_file *seq, const char *name,
unsigned int from, unsigned int to)
{ … }
static int meminfo_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int chcr_stats_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
#define PRINT_ADAP_STATS …
#define PRINT_CH_STATS …
#define PRINT_CH_STATS2 …
static void show_tcp_stats(struct seq_file *seq)
{ … }
static void show_ddp_stats(struct seq_file *seq)
{ … }
static void show_rdma_stats(struct seq_file *seq)
{ … }
static void show_tp_err_adapter_stats(struct seq_file *seq)
{ … }
static void show_cpl_stats(struct seq_file *seq)
{ … }
static void show_tp_err_channel_stats(struct seq_file *seq)
{ … }
static void show_fcoe_stats(struct seq_file *seq)
{ … }
#undef PRINT_CH_STATS2
#undef PRINT_CH_STATS
#undef PRINT_ADAP_STATS
static int tp_stats_show(struct seq_file *seq, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
void add_debugfs_files(struct adapter *adap,
struct t4_debugfs_entry *files,
unsigned int nfiles)
{ … }
int t4_setup_debugfs(struct adapter *adap)
{ … }