cxgbe(4): Count and clear interrupts generated at the software's request.
An interrupt can be requested by setting the F_SWINT bit in PL_PF_CTL. MFC after: 1 week Sponsored by: Chelsio Communications
This commit is contained in:
parent
841613dcdc
commit
dd3b96ecec
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345660
@ -895,6 +895,8 @@ struct adapter {
|
||||
const char *last_op;
|
||||
const void *last_op_thr;
|
||||
int last_op_flags;
|
||||
|
||||
int swintr;
|
||||
};
|
||||
|
||||
#define ADAPTER_LOCK(sc) mtx_lock(&(sc)->sc_lock)
|
||||
|
@ -6031,6 +6031,9 @@ t4_sysctls(struct adapter *sc)
|
||||
CTLTYPE_STRING | CTLFLAG_RD, sc, INTR_CPUS,
|
||||
sysctl_cpus, "A", "preferred CPUs for interrupts");
|
||||
|
||||
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "swintr", CTLFLAG_RW,
|
||||
&sc->swintr, 0, "software triggered interrupts");
|
||||
|
||||
/*
|
||||
* dev.t4nex.X.misc. Marked CTLFLAG_SKIP to avoid information overload.
|
||||
*/
|
||||
|
@ -1394,11 +1394,18 @@ void
|
||||
t4_intr_err(void *arg)
|
||||
{
|
||||
struct adapter *sc = arg;
|
||||
uint32_t v;
|
||||
const bool verbose = (sc->debug_flags & DF_VERBOSE_SLOWINTR) != 0;
|
||||
|
||||
if (sc->flags & ADAP_ERR)
|
||||
return;
|
||||
|
||||
v = t4_read_reg(sc, MYPF_REG(A_PL_PF_INT_CAUSE));
|
||||
if (v & F_PFSW) {
|
||||
sc->swintr++;
|
||||
t4_write_reg(sc, MYPF_REG(A_PL_PF_INT_CAUSE), v);
|
||||
}
|
||||
|
||||
t4_slow_intr_handler(sc, verbose);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user