#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bitmap.h>
#include "debugfs.h"
#include "fault.h"
#include "trace.h"
#define HFI1_FAULT_DIR_TX …
#define HFI1_FAULT_DIR_RX …
#define HFI1_FAULT_DIR_TXRX …
static void *_fault_stats_seq_start(struct seq_file *s, loff_t *pos)
{ … }
static void *_fault_stats_seq_next(struct seq_file *s, void *v, loff_t *pos)
{ … }
static void _fault_stats_seq_stop(struct seq_file *s, void *v)
{ … }
static int _fault_stats_seq_show(struct seq_file *s, void *v)
{ … }
DEBUGFS_SEQ_FILE_OPS(…);
DEBUGFS_SEQ_FILE_OPEN(fault_stats);
DEBUGFS_FILE_OPS(…);
static int fault_opcodes_open(struct inode *inode, struct file *file)
{ … }
static ssize_t fault_opcodes_write(struct file *file, const char __user *buf,
size_t len, loff_t *pos)
{ … }
static ssize_t fault_opcodes_read(struct file *file, char __user *buf,
size_t len, loff_t *pos)
{ … }
static const struct file_operations __fault_opcodes_fops = …;
void hfi1_fault_exit_debugfs(struct hfi1_ibdev *ibd)
{ … }
int hfi1_fault_init_debugfs(struct hfi1_ibdev *ibd)
{ … }
bool hfi1_dbg_fault_suppress_err(struct hfi1_ibdev *ibd)
{ … }
static bool __hfi1_should_fault(struct hfi1_ibdev *ibd, u32 opcode,
u8 direction)
{ … }
bool hfi1_dbg_should_fault_tx(struct rvt_qp *qp, u32 opcode)
{ … }
bool hfi1_dbg_should_fault_rx(struct hfi1_packet *packet)
{ … }