Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Mark as MPSAFE.



details:   https://anonhg.NetBSD.org/src/rev/de5d367ed92a
branches:  trunk
changeset: 374023:de5d367ed92a
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sat Mar 25 11:04:34 2023 +0000

description:
Mark as MPSAFE.

diffstat:

 sys/dev/pci/viomb.c   |  6 +++---
 sys/dev/pci/viornd.c  |  4 ++--
 sys/dev/pci/vioscsi.c |  8 +++++---
 3 files changed, 10 insertions(+), 8 deletions(-)

diffs (81 lines):

diff -r 30169de56d94 -r de5d367ed92a sys/dev/pci/viomb.c
--- a/sys/dev/pci/viomb.c       Sat Mar 25 11:00:35 2023 +0000
+++ b/sys/dev/pci/viomb.c       Sat Mar 25 11:04:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: viomb.c,v 1.16 2023/03/25 11:00:35 mlelstv Exp $       */
+/*     $NetBSD: viomb.c,v 1.17 2023/03/25 11:04:34 mlelstv Exp $       */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.16 2023/03/25 11:00:35 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viomb.c,v 1.17 2023/03/25 11:04:34 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -192,7 +192,7 @@ viomb_attach(device_t parent, device_t s
        }
 
        if (virtio_child_attach_finish(vsc, sc->sc_vq, __arraycount(sc->sc_vq),
-           viomb_config_change, 0) != 0)
+           viomb_config_change, VIRTIO_F_INTR_MPSAFE) != 0)
                goto err_out;
 
        if (kthread_create(PRI_IDLE, KTHREAD_MPSAFE, NULL,
diff -r 30169de56d94 -r de5d367ed92a sys/dev/pci/viornd.c
--- a/sys/dev/pci/viornd.c      Sat Mar 25 11:00:35 2023 +0000
+++ b/sys/dev/pci/viornd.c      Sat Mar 25 11:04:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: viornd.c,v 1.20 2023/03/23 03:55:11 yamaguchi Exp $ */
+/*     $NetBSD: viornd.c,v 1.21 2023/03/25 11:04:34 mlelstv Exp $ */
 /*     $OpenBSD: viornd.c,v 1.1 2014/01/21 21:14:58 sf Exp $   */
 
 /*
@@ -191,7 +191,7 @@ viornd_attach(device_t parent, device_t 
        sc->sc_vq.vq_done = viornd_vq_done;
 
        error = virtio_child_attach_finish(vsc, &sc->sc_vq, 1,
-           NULL, 0);
+           NULL, VIRTIO_F_INTR_MPSAFE);
        if (error) {
                virtio_free_vq(vsc, &sc->sc_vq);
                goto vio_failed;
diff -r 30169de56d94 -r de5d367ed92a sys/dev/pci/vioscsi.c
--- a/sys/dev/pci/vioscsi.c     Sat Mar 25 11:00:35 2023 +0000
+++ b/sys/dev/pci/vioscsi.c     Sat Mar 25 11:04:34 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vioscsi.c,v 1.35 2023/03/25 09:03:47 mlelstv Exp $     */
+/*     $NetBSD: vioscsi.c,v 1.36 2023/03/25 11:04:34 mlelstv Exp $     */
 /*     $OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.35 2023/03/25 09:03:47 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.36 2023/03/25 11:04:34 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -173,7 +173,8 @@ vioscsi_attach(device_t parent, device_t
            cmd_per_lun, qsize, seg_max, max_target, max_lun);
 
        if (virtio_child_attach_finish(vsc, sc->sc_vqs,
-           __arraycount(sc->sc_vqs), NULL, VIRTIO_F_INTR_MSIX) != 0)
+           __arraycount(sc->sc_vqs), NULL,
+           VIRTIO_F_INTR_MSIX | VIRTIO_F_INTR_MPSAFE) != 0)
                goto err;
 
        /*
@@ -186,6 +187,7 @@ vioscsi_attach(device_t parent, device_t
        adapt->adapt_max_periph = adapt->adapt_openings;
        adapt->adapt_request = vioscsi_scsipi_request;
        adapt->adapt_minphys = minphys;
+       adapt->adapt_flags = SCSIPI_ADAPT_MPSAFE;
 
        /*
         * Fill in the scsipi_channel.



Home | Main Index | Thread Index | Old Index