Source-Changes-HG archive

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

[src/trunk]: src/sys/dev rename "setup_interrupts" to "alloc_interrupts"



details:   https://anonhg.NetBSD.org/src/rev/4158083e2adc
branches:  trunk
changeset: 989968:4158083e2adc
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Fri Oct 22 02:57:23 2021 +0000

description:
rename "setup_interrupts" to "alloc_interrupts"
in virtio_mmio and virtio_acpi

This should fix build failure on evbarm.

diffstat:

 sys/dev/acpi/virtio_acpi.c      |  10 +++++-----
 sys/dev/fdt/virtio_mmio_fdt.c   |  10 +++++-----
 sys/dev/virtio/virtio_mmio.c    |  22 ++++++++++++++++------
 sys/dev/virtio/virtio_mmiovar.h |   4 ++--
 4 files changed, 28 insertions(+), 18 deletions(-)

diffs (174 lines):

diff -r 14c992d3343a -r 4158083e2adc sys/dev/acpi/virtio_acpi.c
--- a/sys/dev/acpi/virtio_acpi.c        Thu Oct 21 21:35:02 2021 +0000
+++ b/sys/dev/acpi/virtio_acpi.c        Fri Oct 22 02:57:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_acpi.c,v 1.9 2021/08/07 16:19:09 thorpej Exp $ */
+/* $NetBSD: virtio_acpi.c,v 1.10 2021/10/22 02:57:23 yamaguchi Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio_acpi.c,v 1.9 2021/08/07 16:19:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_acpi.c,v 1.10 2021/10/22 02:57:23 yamaguchi Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -56,7 +56,7 @@
 static int     virtio_acpi_rescan(device_t, const char *, const int *);
 static int     virtio_acpi_detach(device_t, int);
 
-static int     virtio_acpi_setup_interrupts(struct virtio_mmio_softc *);
+static int     virtio_acpi_alloc_interrupts(struct virtio_mmio_softc *);
 static void    virtio_acpi_free_interrupts(struct virtio_mmio_softc *);
 
 CFATTACH_DECL3_NEW(virtio_acpi, sizeof(struct virtio_acpi_softc),
@@ -127,7 +127,7 @@
        }
        msc->sc_iosize = mem->ar_length;
 
-       msc->sc_setup_interrupts = virtio_acpi_setup_interrupts;
+       msc->sc_alloc_interrupts = virtio_acpi_alloc_interrupts;
        msc->sc_free_interrupts = virtio_acpi_free_interrupts;
 
        virtio_mmio_common_attach(msc);
@@ -169,7 +169,7 @@
 }
 
 static int
-virtio_acpi_setup_interrupts(struct virtio_mmio_softc *msc)
+virtio_acpi_alloc_interrupts(struct virtio_mmio_softc *msc)
 {
        struct virtio_acpi_softc * const sc = (struct virtio_acpi_softc *)msc;
        struct virtio_softc * const vsc = &msc->sc_sc;
diff -r 14c992d3343a -r 4158083e2adc sys/dev/fdt/virtio_mmio_fdt.c
--- a/sys/dev/fdt/virtio_mmio_fdt.c     Thu Oct 21 21:35:02 2021 +0000
+++ b/sys/dev/fdt/virtio_mmio_fdt.c     Fri Oct 22 02:57:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_mmio_fdt.c,v 1.9 2021/08/07 16:19:10 thorpej Exp $ */
+/* $NetBSD: virtio_mmio_fdt.c,v 1.10 2021/10/22 02:57:23 yamaguchi Exp $ */
 
 /*
  * Copyright (c) 2018 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.9 2021/08/07 16:19:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.10 2021/10/22 02:57:23 yamaguchi Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -44,7 +44,7 @@
 static int     virtio_mmio_fdt_rescan(device_t, const char *, const int *);
 static int     virtio_mmio_fdt_detach(device_t, int);
 
-static int     virtio_mmio_fdt_setup_interrupts(struct virtio_mmio_softc *);
+static int     virtio_mmio_fdt_alloc_interrupts(struct virtio_mmio_softc *);
 static void    virtio_mmio_fdt_free_interrupts(struct virtio_mmio_softc *);
 
 struct virtio_mmio_fdt_softc {
@@ -101,7 +101,7 @@
        }
        msc->sc_iosize = size;
 
-       msc->sc_setup_interrupts = virtio_mmio_fdt_setup_interrupts;
+       msc->sc_alloc_interrupts = virtio_mmio_fdt_alloc_interrupts;
        msc->sc_free_interrupts = virtio_mmio_fdt_free_interrupts;
 
        virtio_mmio_common_attach(msc);
@@ -141,7 +141,7 @@
 }
 
 static int
-virtio_mmio_fdt_setup_interrupts(struct virtio_mmio_softc *msc)
+virtio_mmio_fdt_alloc_interrupts(struct virtio_mmio_softc *msc)
 {
        struct virtio_mmio_fdt_softc * const fsc = (void *)msc;
        struct virtio_softc * const vsc = &msc->sc_sc;
diff -r 14c992d3343a -r 4158083e2adc sys/dev/virtio/virtio_mmio.c
--- a/sys/dev/virtio/virtio_mmio.c      Thu Oct 21 21:35:02 2021 +0000
+++ b/sys/dev/virtio/virtio_mmio.c      Fri Oct 22 02:57:23 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: virtio_mmio.c,v 1.6 2021/02/05 21:25:36 reinoud Exp $  */
+/*     $NetBSD: virtio_mmio.c,v 1.7 2021/10/22 02:57:23 yamaguchi Exp $        */
 /*     $OpenBSD: virtio_mmio.c,v 1.2 2017/02/24 17:12:31 patrick Exp $ */
 
 /*
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio_mmio.c,v 1.6 2021/02/05 21:25:36 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_mmio.c,v 1.7 2021/10/22 02:57:23 yamaguchi Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -90,8 +90,9 @@
 static void    virtio_mmio_setup_queue(struct virtio_softc *, uint16_t, uint64_t);
 static void    virtio_mmio_set_status(struct virtio_softc *, int);
 static void    virtio_mmio_negotiate_features(struct virtio_softc *, uint64_t);
-static int     virtio_mmio_setup_interrupts(struct virtio_softc *);
+static int     virtio_mmio_alloc_interrupts(struct virtio_softc *);
 static void    virtio_mmio_free_interrupts(struct virtio_softc *);
+static int     virtio_mmio_setup_interrupts(struct virtio_softc *, int);
 
 static const struct virtio_ops virtio_mmio_ops = {
        .kick = virtio_mmio_kick,
@@ -99,8 +100,9 @@
        .setup_queue = virtio_mmio_setup_queue,
        .set_status = virtio_mmio_set_status,
        .neg_features = virtio_mmio_negotiate_features,
+       .alloc_interrupts = virtio_mmio_alloc_interrupts,
+       .free_interrupts = virtio_mmio_free_interrupts,
        .setup_interrupts = virtio_mmio_setup_interrupts,
-       .free_interrupts = virtio_mmio_free_interrupts,
 };
 
 static uint16_t
@@ -289,11 +291,11 @@
 }
 
 static int
-virtio_mmio_setup_interrupts(struct virtio_softc *vsc)
+virtio_mmio_alloc_interrupts(struct virtio_softc *vsc)
 {
        struct virtio_mmio_softc * const sc = (struct virtio_mmio_softc *)vsc;
 
-       return sc->sc_setup_interrupts(sc);
+       return sc->sc_alloc_interrupts(sc);
 }
 
 static void
@@ -303,3 +305,11 @@
 
        sc->sc_free_interrupts(sc);
 }
+
+static int
+virtio_mmio_setup_interrupts(struct virtio_softc *vsc __unused,
+    int reinit __unused)
+{
+
+       return 0;
+}
diff -r 14c992d3343a -r 4158083e2adc sys/dev/virtio/virtio_mmiovar.h
--- a/sys/dev/virtio/virtio_mmiovar.h   Thu Oct 21 21:35:02 2021 +0000
+++ b/sys/dev/virtio/virtio_mmiovar.h   Fri Oct 22 02:57:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_mmiovar.h,v 1.4 2021/02/05 21:25:36 reinoud Exp $ */
+/* $NetBSD: virtio_mmiovar.h,v 1.5 2021/10/22 02:57:23 yamaguchi Exp $ */
 /*
  * Copyright (c) 2018 Jonathan A. Kollasch
  * All rights reserved.
@@ -39,7 +39,7 @@
 
        void                    *sc_ih;
 
-       int                     (*sc_setup_interrupts)(struct virtio_mmio_softc *);
+       int                     (*sc_alloc_interrupts)(struct virtio_mmio_softc *);
        void                    (*sc_free_interrupts)(struct virtio_mmio_softc *);
 
 };



Home | Main Index | Thread Index | Old Index