Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci We are not mapping registers prefetchable so no ...



details:   https://anonhg.NetBSD.org/src/rev/aaf6694a17eb
branches:  trunk
changeset: 987432:aaf6694a17eb
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Sep 26 15:01:55 2021 +0000

description:
We are not mapping registers prefetchable so no need for explicit bs
barriers.

diffstat:

 sys/dev/pci/if_mcx.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 22184aefd3fb -r aaf6694a17eb sys/dev/pci/if_mcx.c
--- a/sys/dev/pci/if_mcx.c      Sun Sep 26 14:57:19 2021 +0000
+++ b/sys/dev/pci/if_mcx.c      Sun Sep 26 15:01:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mcx.c,v 1.20 2021/09/25 15:16:36 jmcneill Exp $ */
+/*     $NetBSD: if_mcx.c,v 1.21 2021/09/26 15:01:55 jmcneill Exp $ */
 /*     $OpenBSD: if_mcx.c,v 1.101 2021/06/02 19:16:11 patrick Exp $ */
 
 /*
@@ -23,7 +23,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.20 2021/09/25 15:16:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.21 2021/09/26 15:01:55 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2764,7 +2764,12 @@
        /* Map the PCI memory space */
        memtype = pci_mapreg_type(sc->sc_pc, sc->sc_tag, MCX_HCA_BAR);
        if (pci_mapreg_map(pa, MCX_HCA_BAR, memtype,
-           0 /*BUS_SPACE_MAP_PREFETCHABLE*/, &sc->sc_memt, &sc->sc_memh,
+#ifdef __NetBSD__
+           0,
+#else
+           BUS_SPACE_MAP_PREFETCHABLE,
+#endif
+           &sc->sc_memt, &sc->sc_memh,
            NULL, &sc->sc_mems)) {
                aprint_error(": unable to map register memory\n");
                return;
@@ -8206,7 +8211,9 @@
 static inline void
 mcx_bar(struct mcx_softc *sc, bus_size_t r, bus_size_t l, int f)
 {
+#ifndef __NetBSD__
        bus_space_barrier(sc->sc_memt, sc->sc_memh, r, l, f);
+#endif
 }
 
 static uint64_t



Home | Main Index | Thread Index | Old Index