Source-Changes-HG archive

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

[src/trunk]: src/sys/dev revert previous, unintended, commit



details:   https://anonhg.NetBSD.org/src/rev/a84f4490b078
branches:  trunk
changeset: 320560:a84f4490b078
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Thu Jul 12 13:05:39 2018 +0000

description:
revert previous, unintended, commit

diffstat:

 sys/dev/pci/ld_virtio.c     |  33 ++++-----------------------------
 sys/dev/virtio/files.virtio |   7 +------
 2 files changed, 5 insertions(+), 35 deletions(-)

diffs (98 lines):

diff -r 6dd02d0f3378 -r a84f4490b078 sys/dev/pci/ld_virtio.c
--- a/sys/dev/pci/ld_virtio.c   Thu Jul 12 12:48:50 2018 +0000
+++ b/sys/dev/pci/ld_virtio.c   Thu Jul 12 13:05:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_virtio.c,v 1.24 2018/07/12 12:48:50 jakllsch Exp $  */
+/*     $NetBSD: ld_virtio.c,v 1.25 2018/07/12 13:05:39 jakllsch Exp $  */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.24 2018/07/12 12:48:50 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.25 2018/07/12 13:05:39 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -38,7 +38,6 @@
 #include <sys/disk.h>
 #include <sys/mutex.h>
 #include <sys/module.h>
-#include <sys/sysctl.h>
 
 #include <dev/ldvar.h>
 #include <dev/pci/virtioreg.h>
@@ -145,25 +144,6 @@
        uint8_t                 sc_sync_status;
 };
 
-int ld_virtio_notify_threshold = 0;
-
-static void
-setup_sysctl(void)
-{
-       static bool done;
-
-       if (done)
-               return;
-
-       done = true;
-
-       sysctl_createv(NULL, 0, NULL, NULL,
-           CTLFLAG_READWRITE, CTLTYPE_INT, "ld_virtio_notify_threshold",
-           SYSCTL_DESCR(""),
-           NULL, 0, &ld_virtio_notify_threshold, 0,
-           CTL_HW, CTL_CREATE, CTL_EOL);
-}
-
 static int     ld_virtio_match(device_t, cfdata_t, void *);
 static void    ld_virtio_attach(device_t, device_t, void *);
 static int     ld_virtio_detach(device_t, int);
@@ -296,7 +276,7 @@
        sc->sc_virtio = vsc;
 
        virtio_child_attach_start(vsc, self, IPL_BIO, &sc->sc_vq,
-           NULL, virtio_vq_intr, VIRTIO_F_PCI_INTR_MPSAFE|VIRTIO_F_PCI_INTR_MSIX,
+           NULL, virtio_vq_intr, 0,
            (VIRTIO_BLK_F_SIZE_MAX | VIRTIO_BLK_F_SEG_MAX |
             VIRTIO_BLK_F_GEOMETRY | VIRTIO_BLK_F_RO | VIRTIO_BLK_F_BLK_SIZE |
             VIRTIO_BLK_F_FLUSH | VIRTIO_BLK_F_CONFIG_WCE),
@@ -389,8 +369,6 @@
        ld->sc_flags = LDF_ENABLED | LDF_MPSAFE;
        ldattach(ld, BUFQ_DISK_DEFAULT_STRAT);
 
-       setup_sysctl();
-
        return;
 
 err:
@@ -463,10 +441,7 @@
                         offsetof(struct virtio_blk_req, vr_status),
                         sizeof(uint8_t),
                         false);
-       const bool notify = !dk_strategy_pending(&sc->sc_ld.sc_dksc) ||
-           sc->sc_ld.sc_queuecnt + 1 >= sc->sc_ld.sc_maxqueuecnt ||
-           sc->sc_ld.sc_queuecnt + 1 >= (sc->sc_ld.sc_maxqueuecnt * ld_virtio_notify_threshold / 1000);
-       virtio_enqueue_commit(vsc, vq, slot, notify);
+       virtio_enqueue_commit(vsc, vq, slot, true);
 
        return 0;
 }
diff -r 6dd02d0f3378 -r a84f4490b078 sys/dev/virtio/files.virtio
--- a/sys/dev/virtio/files.virtio       Thu Jul 12 12:48:50 2018 +0000
+++ b/sys/dev/virtio/files.virtio       Thu Jul 12 13:05:39 2018 +0000
@@ -1,11 +1,6 @@
-#      $NetBSD: files.virtio,v 1.3 2018/07/12 12:48:50 jakllsch Exp $
+#      $NetBSD: files.virtio,v 1.4 2018/07/12 13:05:39 jakllsch Exp $
 
 # XXX the contents of the following included file should be moved here
 include "dev/pci/files.virtio"
 
 file   dev/virtio/virtio_mmio.c        virtio_mmio
-
-device viocon
-attach viocon at virtio
-file   dev/virtio/viocon.c             viocon  needs-flag
-



Home | Main Index | Thread Index | Old Index