Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm Consider two tags equal if they share the s...



details:   https://anonhg.NetBSD.org/src/rev/1c3fc86c4897
branches:  trunk
changeset: 985806:1c3fc86c4897
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Sep 08 11:02:05 2021 +0000

description:
Consider two tags equal if they share the same cookie. For fdtbus,
we may have different tags to deal with mapping attributes and CPU vs bus
address translation, but otherwise represent the same bus space.

diffstat:

 sys/arch/arm/arm/bus_stubs.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 546bcada6fe1 -r 1c3fc86c4897 sys/arch/arm/arm/bus_stubs.c
--- a/sys/arch/arm/arm/bus_stubs.c      Wed Sep 08 09:09:47 2021 +0000
+++ b/sys/arch/arm/arm/bus_stubs.c      Wed Sep 08 11:02:05 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_stubs.c,v 1.1 2020/04/13 07:09:51 maxv Exp $       */
+/*     $NetBSD: bus_stubs.c,v 1.2 2021/09/08 11:02:05 jmcneill Exp $   */
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,13 +30,18 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_stubs.c,v 1.1 2020/04/13 07:09:51 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_stubs.c,v 1.2 2021/09/08 11:02:05 jmcneill Exp $");
 
 #include <sys/systm.h>
 #include <sys/asan.h>
+#include <sys/bus.h>
+#include <sys/bus_proto.h>
 
-#include <machine/bus_defs.h>
-#include <machine/bus_funcs.h>
+bool
+bus_space_is_equal(bus_space_tag_t t1, bus_space_tag_t t2)
+{
+       return t1->bs_cookie == t2->bs_cookie;
+}
 
 int
 bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,



Home | Main Index | Thread Index | Old Index