diff options
author | 2020-03-03 10:30:58 +0000 | |
---|---|---|
committer | 2020-03-03 10:30:58 +0000 | |
commit | ce8986bc282227eac702dc233cf4b9160255a8c5 (patch) | |
tree | 26ea8d3e98c23836d193ed7367341e201f7ea091 | |
parent | Clean up attachment of PCI drm(4) devices and make the PCI aspects optional. (diff) | |
download | wireguard-openbsd-ce8986bc282227eac702dc233cf4b9160255a8c5.tar.xz wireguard-openbsd-ce8986bc282227eac702dc233cf4b9160255a8c5.zip |
Fix bogus bus_dmamem_mmap(9) implementation.
ok patrick@, jsg@
-rw-r--r-- | sys/arch/arm64/arm64/bus_dma.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/arm64/arm64/bus_dma.c b/sys/arch/arm64/arm64/bus_dma.c index fe1671adf97..5644a1daad4 100644 --- a/sys/arch/arm64/arm64/bus_dma.c +++ b/sys/arch/arm64/arm64/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.10 2018/01/11 15:49:34 visa Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.11 2020/03/03 10:30:58 kettenis Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -545,7 +545,6 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off, int prot, int flags) { int i; - paddr_t pa; for (i = 0; i < nsegs; i++) { #ifdef DIAGNOSTIC @@ -562,8 +561,7 @@ _dmamem_mmap(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, off_t off, continue; } - (void)pmap_extract (pmap_kernel(), segs[i].ds_addr, &pa); - return pa + off; + return (segs[i].ds_addr + off); } /* Page not found. */ |