9 #include <linux/export.h>
10 #include <asm/debug.h>
17 static struct dentry *debugfs_root;
18 #define QDIO_DEBUGFS_NAME_LEN 10
35 DBF_HEX(&init_data->
int_parm,
sizeof(
long));
38 DBF_EVENT(
"irq:%8lx", (
unsigned long)irq_ptr);
41 snprintf(text, 20,
"qdio_%s", dev_name(&init_data->
cdev->dev));
48 static int qstat_show(
struct seq_file *
m,
void *
v)
59 seq_printf(m,
"nr_used: %d ftc: %d last_move: %d\n",
63 seq_printf(m,
"polling: %d ack start: %d ack count: %d\n",
64 q->
u.
in.polling, q->
u.
in.ack_start,
69 &q->
u.
in.queue_irq_state));
72 seq_printf(m,
"|0 |8 |16 |24 |32 |40 |48 |56 63|\n");
110 seq_printf(m,
"|64 |72 |80 |88 |96 |104 |112 | 127|\n");
113 if (!q->
irq_ptr->perf_stat_enabled) {
119 "16.. 32.. 64.. 127\n");
122 seq_printf(m,
"\nError NOP Total\n%-10u %-10u %-10u\n\n",
131 filp->
f_path.dentry->d_inode->i_private);
136 .open = qstat_seq_open,
142 static char *qperf_names[] = {
143 "Assumed adapter interrupts",
146 "Inbound tasklet runs",
147 "Inbound tasklet resched",
148 "Inbound tasklet resched2",
149 "Outbound tasklet runs",
155 "Inbound stop_polling",
156 "Inbound queue full",
159 "Outbound queue full",
160 "Outbound fast_requeue",
161 "Outbound target_full",
163 "QEBSM eqbs partial",
165 "QEBSM sqbs partial",
166 "Discarded interrupts"
169 static int qperf_show(
struct seq_file *m,
void *v)
181 stat = (
unsigned int *)&irq_ptr->
perf_stat;
185 qperf_names[i], *(stat + i));
189 static ssize_t qperf_seq_write(
struct file *
file,
const char __user *ubuf,
190 size_t count, loff_t *off)
215 irq_ptr->perf_stat_enabled = 1;
224 filp->f_path.dentry->d_inode->i_private);
229 .open = qperf_seq_open,
231 .write = qperf_seq_write,
243 q->
irq_ptr->debugfs_dev, q, &debugfs_fops);
266 setup_debugfs_entry(q, cdev);
268 setup_debugfs_entry(q, cdev);