summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2019-03-07 07:58:27 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2019-03-07 07:58:27 +0000
commitdcb8781dbf7b2b3e0e746244bf855815831f771a (patch)
treeb28d69c38897bc50aceae7247e77e340cc02f9a2
parent1c4aa68eaa711a3546e28077a3aa44189b03febe (diff)
When accessing the child address cells make sure to use the size for
those instead of the size of the parent address cells. ok kettenis@
-rw-r--r--sys/arch/arm64/dev/simplebus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm64/dev/simplebus.c b/sys/arch/arm64/dev/simplebus.c
index c2b19a1fb7e..652279f6b80 100644
--- a/sys/arch/arm64/dev/simplebus.c
+++ b/sys/arch/arm64/dev/simplebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: simplebus.c,v 1.9 2019/01/03 23:04:51 dlg Exp $ */
+/* $OpenBSD: simplebus.c,v 1.10 2019/03/07 07:58:26 patrick Exp $ */
/*
* Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
*
@@ -350,7 +350,7 @@ simplebus_dmamap_load_buffer(bus_dma_tag_t t, bus_dmamap_t map, void *buf,
/* All good, extract to address and translate. */
rto = range[0];
- if (sc->sc_pacells == 2)
+ if (sc->sc_acells == 2)
rto = (rto << 32) + range[1];
map->dm_segs[seg].ds_addr -= rfrom;