Source-Changes-HG archive

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

[src/trunk]: src/sys localify



details:   https://anonhg.NetBSD.org/src/rev/f447a9d0a016
branches:  trunk
changeset: 461483:f447a9d0a016
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Nov 27 19:21:36 2019 +0000

description:
localify

diffstat:

 sys/arch/x86/pci/if_vmx.c |  410 ++++++++++++++++++++++-----------------------
 sys/dev/pci/mfii.c        |  284 +++++++++++++++----------------
 2 files changed, 341 insertions(+), 353 deletions(-)

diffs (truncated from 1906 to 300 lines):

diff -r 4cd9504c9e3f -r f447a9d0a016 sys/arch/x86/pci/if_vmx.c
--- a/sys/arch/x86/pci/if_vmx.c Wed Nov 27 19:07:31 2019 +0000
+++ b/sys/arch/x86/pci/if_vmx.c Wed Nov 27 19:21:36 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vmx.c,v 1.51 2019/10/10 08:55:08 knakahara Exp $    */
+/*     $NetBSD: if_vmx.c,v 1.52 2019/11/27 19:21:36 maxv Exp $ */
 /*     $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $        */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.51 2019/10/10 08:55:08 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.52 2019/11/27 19:21:36 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -340,118 +340,117 @@
 
 #define vtophys(va) 0          /* XXX ok? */
 
-int vmxnet3_match(device_t, cfdata_t, void *);
-void vmxnet3_attach(device_t, device_t, void *);
-int vmxnet3_detach(device_t, int);
-
-int vmxnet3_alloc_pci_resources(struct vmxnet3_softc *);
-void vmxnet3_free_pci_resources(struct vmxnet3_softc *);
-int vmxnet3_check_version(struct vmxnet3_softc *);
-void vmxnet3_check_multiqueue(struct vmxnet3_softc *);
-
-int vmxnet3_alloc_msix_interrupts(struct vmxnet3_softc *);
-int vmxnet3_alloc_msi_interrupts(struct vmxnet3_softc *);
-int vmxnet3_alloc_legacy_interrupts(struct vmxnet3_softc *);
-int vmxnet3_alloc_interrupts(struct vmxnet3_softc *);
-void vmxnet3_free_interrupts(struct vmxnet3_softc *);
-
-int vmxnet3_setup_msix_interrupts(struct vmxnet3_softc *);
-int vmxnet3_setup_msi_interrupt(struct vmxnet3_softc *);
-int vmxnet3_setup_legacy_interrupt(struct vmxnet3_softc *);
-void vmxnet3_set_interrupt_idx(struct vmxnet3_softc *);
-int vmxnet3_setup_interrupts(struct vmxnet3_softc *);
-int vmxnet3_setup_sysctl(struct vmxnet3_softc *);
-
-int vmxnet3_setup_stats(struct vmxnet3_softc *);
-void vmxnet3_teardown_stats(struct vmxnet3_softc *);
-
-int vmxnet3_init_rxq(struct vmxnet3_softc *, int);
-int vmxnet3_init_txq(struct vmxnet3_softc *, int);
-int vmxnet3_alloc_rxtx_queues(struct vmxnet3_softc *);
-void vmxnet3_destroy_rxq(struct vmxnet3_rxqueue *);
-void vmxnet3_destroy_txq(struct vmxnet3_txqueue *);
-void vmxnet3_free_rxtx_queues(struct vmxnet3_softc *);
-
-int vmxnet3_alloc_shared_data(struct vmxnet3_softc *);
-void vmxnet3_free_shared_data(struct vmxnet3_softc *);
-int vmxnet3_alloc_txq_data(struct vmxnet3_softc *);
-void vmxnet3_free_txq_data(struct vmxnet3_softc *);
-int vmxnet3_alloc_rxq_data(struct vmxnet3_softc *);
-void vmxnet3_free_rxq_data(struct vmxnet3_softc *);
-int vmxnet3_alloc_queue_data(struct vmxnet3_softc *);
-void vmxnet3_free_queue_data(struct vmxnet3_softc *);
-int vmxnet3_alloc_mcast_table(struct vmxnet3_softc *);
-void vmxnet3_free_mcast_table(struct vmxnet3_softc *);
-void vmxnet3_init_shared_data(struct vmxnet3_softc *);
-void vmxnet3_reinit_rss_shared_data(struct vmxnet3_softc *);
-void vmxnet3_reinit_shared_data(struct vmxnet3_softc *);
-int vmxnet3_alloc_data(struct vmxnet3_softc *);
-void vmxnet3_free_data(struct vmxnet3_softc *);
-int vmxnet3_setup_interface(struct vmxnet3_softc *);
-
-void vmxnet3_evintr(struct vmxnet3_softc *);
-bool vmxnet3_txq_eof(struct vmxnet3_txqueue *, u_int);
-int vmxnet3_newbuf(struct vmxnet3_softc *, struct vmxnet3_rxqueue *,
+static int vmxnet3_match(device_t, cfdata_t, void *);
+static void vmxnet3_attach(device_t, device_t, void *);
+static int vmxnet3_detach(device_t, int);
+
+static int vmxnet3_alloc_pci_resources(struct vmxnet3_softc *);
+static void vmxnet3_free_pci_resources(struct vmxnet3_softc *);
+static int vmxnet3_check_version(struct vmxnet3_softc *);
+static void vmxnet3_check_multiqueue(struct vmxnet3_softc *);
+
+static int vmxnet3_alloc_msix_interrupts(struct vmxnet3_softc *);
+static int vmxnet3_alloc_msi_interrupts(struct vmxnet3_softc *);
+static int vmxnet3_alloc_legacy_interrupts(struct vmxnet3_softc *);
+static int vmxnet3_alloc_interrupts(struct vmxnet3_softc *);
+static void vmxnet3_free_interrupts(struct vmxnet3_softc *);
+
+static int vmxnet3_setup_msix_interrupts(struct vmxnet3_softc *);
+static int vmxnet3_setup_msi_interrupt(struct vmxnet3_softc *);
+static int vmxnet3_setup_legacy_interrupt(struct vmxnet3_softc *);
+static void vmxnet3_set_interrupt_idx(struct vmxnet3_softc *);
+static int vmxnet3_setup_interrupts(struct vmxnet3_softc *);
+static int vmxnet3_setup_sysctl(struct vmxnet3_softc *);
+
+static int vmxnet3_setup_stats(struct vmxnet3_softc *);
+static void vmxnet3_teardown_stats(struct vmxnet3_softc *);
+
+static int vmxnet3_init_rxq(struct vmxnet3_softc *, int);
+static int vmxnet3_init_txq(struct vmxnet3_softc *, int);
+static int vmxnet3_alloc_rxtx_queues(struct vmxnet3_softc *);
+static void vmxnet3_destroy_rxq(struct vmxnet3_rxqueue *);
+static void vmxnet3_destroy_txq(struct vmxnet3_txqueue *);
+static void vmxnet3_free_rxtx_queues(struct vmxnet3_softc *);
+
+static int vmxnet3_alloc_shared_data(struct vmxnet3_softc *);
+static void vmxnet3_free_shared_data(struct vmxnet3_softc *);
+static int vmxnet3_alloc_txq_data(struct vmxnet3_softc *);
+static void vmxnet3_free_txq_data(struct vmxnet3_softc *);
+static int vmxnet3_alloc_rxq_data(struct vmxnet3_softc *);
+static void vmxnet3_free_rxq_data(struct vmxnet3_softc *);
+static int vmxnet3_alloc_queue_data(struct vmxnet3_softc *);
+static void vmxnet3_free_queue_data(struct vmxnet3_softc *);
+static int vmxnet3_alloc_mcast_table(struct vmxnet3_softc *);
+static void vmxnet3_free_mcast_table(struct vmxnet3_softc *);
+static void vmxnet3_init_shared_data(struct vmxnet3_softc *);
+static void vmxnet3_reinit_rss_shared_data(struct vmxnet3_softc *);
+static void vmxnet3_reinit_shared_data(struct vmxnet3_softc *);
+static int vmxnet3_alloc_data(struct vmxnet3_softc *);
+static void vmxnet3_free_data(struct vmxnet3_softc *);
+static int vmxnet3_setup_interface(struct vmxnet3_softc *);
+
+static void vmxnet3_evintr(struct vmxnet3_softc *);
+static bool vmxnet3_txq_eof(struct vmxnet3_txqueue *, u_int);
+static int vmxnet3_newbuf(struct vmxnet3_softc *, struct vmxnet3_rxqueue *,
     struct vmxnet3_rxring *);
-void vmxnet3_rxq_eof_discard(struct vmxnet3_rxqueue *,
+static void vmxnet3_rxq_eof_discard(struct vmxnet3_rxqueue *,
     struct vmxnet3_rxring *, int);
-void vmxnet3_rxq_discard_chain(struct vmxnet3_rxqueue *);
-void vmxnet3_rx_csum(struct vmxnet3_rxcompdesc *, struct mbuf *);
-void vmxnet3_rxq_input(struct vmxnet3_rxqueue *,
+static void vmxnet3_rxq_discard_chain(struct vmxnet3_rxqueue *);
+static void vmxnet3_rx_csum(struct vmxnet3_rxcompdesc *, struct mbuf *);
+static void vmxnet3_rxq_input(struct vmxnet3_rxqueue *,
     struct vmxnet3_rxcompdesc *, struct mbuf *);
-bool vmxnet3_rxq_eof(struct vmxnet3_rxqueue *, u_int);
-int vmxnet3_legacy_intr(void *);
-int vmxnet3_txrxq_intr(void *);
-void vmxnet3_handle_queue(void *);
-void vmxnet3_handle_queue_work(struct work *, void *);
-int vmxnet3_event_intr(void *);
-
-void vmxnet3_txstop(struct vmxnet3_softc *, struct vmxnet3_txqueue *);
-void vmxnet3_rxstop(struct vmxnet3_softc *, struct vmxnet3_rxqueue *);
-void vmxnet3_stop_locked(struct vmxnet3_softc *);
-void vmxnet3_stop_rendezvous(struct vmxnet3_softc *);
-void vmxnet3_stop(struct ifnet *, int);
-
-void vmxnet3_txinit(struct vmxnet3_softc *, struct vmxnet3_txqueue *);
-int vmxnet3_rxinit(struct vmxnet3_softc *, struct vmxnet3_rxqueue *);
-int vmxnet3_reinit_queues(struct vmxnet3_softc *);
-int vmxnet3_enable_device(struct vmxnet3_softc *);
-void vmxnet3_reinit_rxfilters(struct vmxnet3_softc *);
-int vmxnet3_reinit(struct vmxnet3_softc *);
-
-void vmxnet3_rx_csum(struct vmxnet3_rxcompdesc *, struct mbuf *);
-int vmxnet3_init_locked(struct vmxnet3_softc *);
-int vmxnet3_init(struct ifnet *);
-
-int vmxnet3_txq_offload_ctx(struct vmxnet3_txqueue *, struct mbuf *, int *, int *);
-int vmxnet3_txq_load_mbuf(struct vmxnet3_txqueue *, struct mbuf **, bus_dmamap_t);
-void vmxnet3_txq_unload_mbuf(struct vmxnet3_txqueue *, bus_dmamap_t);
-int vmxnet3_txq_encap(struct vmxnet3_txqueue *, struct mbuf **);
-void vmxnet3_start_locked(struct ifnet *);
-void vmxnet3_start(struct ifnet *);
-void vmxnet3_transmit_locked(struct ifnet *, struct vmxnet3_txqueue *);
-int vmxnet3_transmit(struct ifnet *, struct mbuf *);
-void vmxnet3_deferred_transmit(void *);
-
-void vmxnet3_set_rxfilter(struct vmxnet3_softc *);
-int vmxnet3_ioctl(struct ifnet *, u_long, void *);
-int vmxnet3_ifflags_cb(struct ethercom *);
-
-int vmxnet3_watchdog(struct vmxnet3_txqueue *);
-void vmxnet3_refresh_host_stats(struct vmxnet3_softc *);
-void vmxnet3_tick(void *);
-void vmxnet3_link_status(struct vmxnet3_softc *);
-void vmxnet3_media_status(struct ifnet *, struct ifmediareq *);
-int vmxnet3_media_change(struct ifnet *);
-void vmxnet3_set_lladdr(struct vmxnet3_softc *);
-void vmxnet3_get_lladdr(struct vmxnet3_softc *);
-
-void vmxnet3_enable_all_intrs(struct vmxnet3_softc *);
-void vmxnet3_disable_all_intrs(struct vmxnet3_softc *);
-
-int vmxnet3_dma_malloc(struct vmxnet3_softc *, bus_size_t, bus_size_t,
+static bool vmxnet3_rxq_eof(struct vmxnet3_rxqueue *, u_int);
+static int vmxnet3_legacy_intr(void *);
+static int vmxnet3_txrxq_intr(void *);
+static void vmxnet3_handle_queue(void *);
+static void vmxnet3_handle_queue_work(struct work *, void *);
+static int vmxnet3_event_intr(void *);
+
+static void vmxnet3_txstop(struct vmxnet3_softc *, struct vmxnet3_txqueue *);
+static void vmxnet3_rxstop(struct vmxnet3_softc *, struct vmxnet3_rxqueue *);
+static void vmxnet3_stop_locked(struct vmxnet3_softc *);
+static void vmxnet3_stop_rendezvous(struct vmxnet3_softc *);
+static void vmxnet3_stop(struct ifnet *, int);
+
+static void vmxnet3_txinit(struct vmxnet3_softc *, struct vmxnet3_txqueue *);
+static int vmxnet3_rxinit(struct vmxnet3_softc *, struct vmxnet3_rxqueue *);
+static int vmxnet3_reinit_queues(struct vmxnet3_softc *);
+static int vmxnet3_enable_device(struct vmxnet3_softc *);
+static void vmxnet3_reinit_rxfilters(struct vmxnet3_softc *);
+static int vmxnet3_reinit(struct vmxnet3_softc *);
+
+static int vmxnet3_init_locked(struct vmxnet3_softc *);
+static int vmxnet3_init(struct ifnet *);
+
+static int vmxnet3_txq_offload_ctx(struct vmxnet3_txqueue *, struct mbuf *, int *, int *);
+static int vmxnet3_txq_load_mbuf(struct vmxnet3_txqueue *, struct mbuf **, bus_dmamap_t);
+static void vmxnet3_txq_unload_mbuf(struct vmxnet3_txqueue *, bus_dmamap_t);
+static int vmxnet3_txq_encap(struct vmxnet3_txqueue *, struct mbuf **);
+static void vmxnet3_start_locked(struct ifnet *);
+static void vmxnet3_start(struct ifnet *);
+static void vmxnet3_transmit_locked(struct ifnet *, struct vmxnet3_txqueue *);
+static int vmxnet3_transmit(struct ifnet *, struct mbuf *);
+static void vmxnet3_deferred_transmit(void *);
+
+static void vmxnet3_set_rxfilter(struct vmxnet3_softc *);
+static int vmxnet3_ioctl(struct ifnet *, u_long, void *);
+static int vmxnet3_ifflags_cb(struct ethercom *);
+
+static int vmxnet3_watchdog(struct vmxnet3_txqueue *);
+static void vmxnet3_refresh_host_stats(struct vmxnet3_softc *);
+static void vmxnet3_tick(void *);
+static void vmxnet3_link_status(struct vmxnet3_softc *);
+static void vmxnet3_media_status(struct ifnet *, struct ifmediareq *);
+static int vmxnet3_media_change(struct ifnet *);
+static void vmxnet3_set_lladdr(struct vmxnet3_softc *);
+static void vmxnet3_get_lladdr(struct vmxnet3_softc *);
+
+static void vmxnet3_enable_all_intrs(struct vmxnet3_softc *);
+static void vmxnet3_disable_all_intrs(struct vmxnet3_softc *);
+
+static int vmxnet3_dma_malloc(struct vmxnet3_softc *, bus_size_t, bus_size_t,
     struct vmxnet3_dma_alloc *);
-void vmxnet3_dma_free(struct vmxnet3_softc *, struct vmxnet3_dma_alloc *);
+static void vmxnet3_dma_free(struct vmxnet3_softc *, struct vmxnet3_dma_alloc *);
 
 CFATTACH_DECL3_NEW(vmx, sizeof(struct vmxnet3_softc),
     vmxnet3_match, vmxnet3_attach, vmxnet3_detach, NULL, NULL, NULL, 0);
@@ -568,7 +567,7 @@
        }
 }
 
-int
+static int
 vmxnet3_match(device_t parent, cfdata_t match, void *aux)
 {
        struct pci_attach_args *pa = (struct pci_attach_args *)aux;
@@ -580,7 +579,7 @@
        return 0;
 }
 
-void
+static void
 vmxnet3_attach(device_t parent, device_t self, void *aux)
 {
        struct vmxnet3_softc *sc = device_private(self);
@@ -655,7 +654,7 @@
        sc->vmx_flags |= VMXNET3_FLAG_ATTACHED;
 }
 
-int
+static int
 vmxnet3_detach(device_t self, int flags)
 {
        struct vmxnet3_softc *sc;
@@ -691,7 +690,7 @@
        return (0);
 }
 
-int
+static int
 vmxnet3_alloc_pci_resources(struct vmxnet3_softc *sc)
 {
        struct pci_attach_args *pa = sc->vmx_pa;
@@ -718,7 +717,7 @@
        return (0);
 }
 
-void
+static void
 vmxnet3_free_pci_resources(struct vmxnet3_softc *sc)
 {
 
@@ -733,7 +732,7 @@
        }
 }
 
-int
+static int
 vmxnet3_check_version(struct vmxnet3_softc *sc)
 {
        u_int ver;
@@ -757,7 +756,7 @@
        return (0);



Home | Main Index | Thread Index | Old Index