Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Obsolete VIOIF_SOFTINT_INTR



details:   https://anonhg.NetBSD.org/src/rev/6a7179cc99bc
branches:  trunk
changeset: 933344:6a7179cc99bc
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Mon May 25 07:20:14 2020 +0000

description:
Obsolete VIOIF_SOFTINT_INTR

The kernel option is introduced to realize softint-based if_input.
Since the same scheme has been implemented in if_percpuq_enqueue(),
the option is no longer needed.

pointed out by ozaki-r@n.o.

diffstat:

 sys/arch/amd64/conf/ALL |   5 ++---
 sys/arch/i386/conf/ALL  |   5 ++---
 sys/dev/pci/if_vioif.c  |  30 ++----------------------------
 3 files changed, 6 insertions(+), 34 deletions(-)

diffs (133 lines):

diff -r 10547eb4d316 -r 6a7179cc99bc sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL   Mon May 25 05:17:05 2020 +0000
+++ b/sys/arch/amd64/conf/ALL   Mon May 25 07:20:14 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.150 2020/05/16 13:46:10 maya Exp $
+# $NetBSD: ALL,v 1.151 2020/05/25 07:20:14 yamaguchi Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "ALL-$Revision: 1.150 $"
+#ident         "ALL-$Revision: 1.151 $"
 
 maxusers       64              # estimated number of users
 
@@ -2160,7 +2160,6 @@
 options SNAPPER_DEBUG
 options SNDEBUG
 options SOCKBUF_DEBUG
-options SOFTINT_INTR
 options SONIC_DEBUG
 options SPARC_PCI_DEBUG
 options SPC_DEBUG
diff -r 10547eb4d316 -r 6a7179cc99bc sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL    Mon May 25 05:17:05 2020 +0000
+++ b/sys/arch/i386/conf/ALL    Mon May 25 07:20:14 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.492 2020/05/16 13:46:11 maya Exp $
+# $NetBSD: ALL,v 1.493 2020/05/25 07:20:15 yamaguchi Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "ALL-$Revision: 1.492 $"
+#ident         "ALL-$Revision: 1.493 $"
 
 maxusers       64              # estimated number of users
 
@@ -2276,7 +2276,6 @@
 options SNAPPER_DEBUG
 options SNDEBUG
 options SOCKBUF_DEBUG
-options SOFTINT_INTR
 options SONIC_DEBUG
 options SPARC_PCI_DEBUG
 options SPC_DEBUG
diff -r 10547eb4d316 -r 6a7179cc99bc sys/dev/pci/if_vioif.c
--- a/sys/dev/pci/if_vioif.c    Mon May 25 05:17:05 2020 +0000
+++ b/sys/dev/pci/if_vioif.c    Mon May 25 07:20:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vioif.c,v 1.52 2020/01/30 14:02:14 thorpej Exp $    */
+/*     $NetBSD: if_vioif.c,v 1.53 2020/05/25 07:20:15 yamaguchi Exp $  */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.52 2020/01/30 14:02:14 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.53 2020/05/25 07:20:15 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -63,10 +63,6 @@
 #define VIOIF_MULTIQ   1
 #endif
 
-#ifdef SOFTINT_INTR
-#define VIOIF_SOFTINT_INTR     1
-#endif
-
 /*
  * if_vioifreg.h:
  */
@@ -696,9 +692,6 @@
 #ifdef VIOIF_MPSAFE
        req_flags |= VIRTIO_F_PCI_INTR_MPSAFE;
 #endif
-#ifdef VIOIF_SOFTINT_INTR
-       req_flags |= VIRTIO_F_PCI_INTR_SOFTINT;
-#endif
        req_flags |= VIRTIO_F_PCI_INTR_MSIX;
 
        req_features =
@@ -1466,10 +1459,6 @@
        struct vioif_rxqueue *rxq = vq->vq_done_ctx;
        int r = 0;
 
-#ifdef VIOIF_SOFTINT_INTR
-       KASSERT(!cpu_intr_p());
-#endif
-
        mutex_enter(rxq->rxq_lock);
 
        if (rxq->rxq_stopping)
@@ -1477,11 +1466,7 @@
 
        r = vioif_rx_deq_locked(rxq);
        if (r)
-#ifdef VIOIF_SOFTINT_INTR
-               vioif_populate_rx_mbufs_locked(rxq);
-#else
                softint_schedule(rxq->rxq_softint);
-#endif
 
 out:
        mutex_exit(rxq->rxq_lock);
@@ -2011,18 +1996,7 @@
 {
        struct vioif_softc *sc = device_private(virtio_child(vsc));
 
-#ifdef VIOIF_SOFTINT_INTR
-       struct ifnet *ifp = &sc->sc_ethercom.ec_if;
-#endif
-
-#ifdef VIOIF_SOFTINT_INTR
-       KASSERT(!cpu_intr_p());
-       vioif_update_link_status(sc);
-       vioif_start(ifp);
-#else
        softint_schedule(sc->sc_ctl_softint);
-#endif
-
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index