Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci xhci(4): Mark PCI interrupt handler MP-safe.



details:   https://anonhg.NetBSD.org/src/rev/475a07f87bde
branches:  trunk
changeset: 372148:475a07f87bde
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Oct 28 21:57:58 2022 +0000

description:
xhci(4): Mark PCI interrupt handler MP-safe.

xhci_intr has its own intr lock to coordinate with the MP-safe
softint it defers all its work to, other than reading and writing a
few registers to get and acknowledge the interrupt status.

diffstat:

 sys/dev/pci/xhci_pci.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 9680e7908678 -r 475a07f87bde sys/dev/pci/xhci_pci.c
--- a/sys/dev/pci/xhci_pci.c    Fri Oct 28 21:56:44 2022 +0000
+++ b/sys/dev/pci/xhci_pci.c    Fri Oct 28 21:57:58 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci_pci.c,v 1.31 2022/10/11 09:18:22 msaitoh Exp $    */
+/*     $NetBSD: xhci_pci.c,v 1.32 2022/10/28 21:57:58 riastradh Exp $  */
 /*     OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp   */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.31 2022/10/11 09:18:22 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.32 2022/10/28 21:57:58 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xhci_pci.h"
@@ -229,6 +229,7 @@
        }
        intrstr = pci_intr_string(pc, psc->sc_pihp[0], intrbuf,
            sizeof(intrbuf));
+       pci_intr_setattr(pa->pa_pc, &psc->sc_pihp[0], PCI_INTR_MPSAFE, true);
        psc->sc_ih = pci_intr_establish_xname(pc, psc->sc_pihp[0], IPL_USB,
            xhci_intr, sc, device_xname(sc->sc_dev));
        if (psc->sc_ih == NULL) {



Home | Main Index | Thread Index | Old Index