Date: Thu, 28 Mar 2019 21:22:28 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345660 - head/sys/dev/cxgbe Message-ID: <201903282122.x2SLMSfS006038@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Mar 28 21:22:28 2019 New Revision: 345660 URL: https://svnweb.freebsd.org/changeset/base/345660 Log: 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 Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Mar 28 21:00:54 2019 (r345659) +++ head/sys/dev/cxgbe/adapter.h Thu Mar 28 21:22:28 2019 (r345660) @@ -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) Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Mar 28 21:00:54 2019 (r345659) +++ head/sys/dev/cxgbe/t4_main.c Thu Mar 28 21:22:28 2019 (r345660) @@ -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. */ Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Mar 28 21:00:54 2019 (r345659) +++ head/sys/dev/cxgbe/t4_sge.c Thu Mar 28 21:22:28 2019 (r345660) @@ -1394,10 +1394,17 @@ 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903282122.x2SLMSfS006038>