Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci tag arcmsr scsipi adapter and pci interrupt as M...



details:   https://anonhg.NetBSD.org/src/rev/07c0154b9ff6
branches:  trunk
changeset: 826047:07c0154b9ff6
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sat Aug 12 11:03:47 2017 +0000

description:
tag arcmsr scsipi adapter and pci interrupt as MPSAFE. I/O is now done
without taking kernel lock.

diffstat:

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

diffs (35 lines):

diff -r 6543a86133cf -r 07c0154b9ff6 sys/dev/pci/arcmsr.c
--- a/sys/dev/pci/arcmsr.c      Sat Aug 12 09:03:27 2017 +0000
+++ b/sys/dev/pci/arcmsr.c      Sat Aug 12 11:03:47 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arcmsr.c,v 1.36 2016/06/19 21:12:44 dholland Exp $ */
+/*     $NetBSD: arcmsr.c,v 1.37 2017/08/12 11:03:47 mlelstv Exp $ */
 /*     $OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */
 
 /*
@@ -21,7 +21,7 @@
 #include "bio.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.36 2016/06/19 21:12:44 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.37 2017/08/12 11:03:47 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -241,6 +241,7 @@
        adapt->adapt_max_periph = adapt->adapt_openings;
        adapt->adapt_minphys = arc_minphys;             
        adapt->adapt_request = arc_scsi_cmd;
+       adapt->adapt_flags = SCSIPI_ADAPT_MPSAFE;
 
        memset(chan, 0, sizeof(*chan));
        chan->chan_adapter = adapt;
@@ -625,6 +626,8 @@
                goto unmap;
        }
 
+       pci_intr_setattr(pa->pa_pc, &ih, PCI_INTR_MPSAFE, true);
+
        sc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_BIO,
            arc_intr, sc);
        if (sc->sc_ih == NULL) {



Home | Main Index | Thread Index | Old Index