diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-02-05 14:07:12 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-02-05 14:07:12 +0000 |
commit | 7a4ba818c764b3512d7dd5fdd0bd0f7d334d55d9 (patch) | |
tree | 94352487f03034c13aa6ff2d9f047cba31d3cfd0 /sys/arch | |
parent | 6b1109471883a3bd25507e5b3bfc35bcb65ad589 (diff) |
_dmamem_alloc_range() stores physical addresses in the segments, so
upon free don't try to convert it from virtual to physical again.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm64/arm64/bus_dma.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arch/arm64/arm64/bus_dma.c b/sys/arch/arm64/arm64/bus_dma.c index 0dc9bae11c8..c4065b57e09 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.2 2017/01/19 03:09:18 patrick Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.3 2017/02/05 14:07:11 patrick Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -407,8 +407,6 @@ _dmamem_free(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs) bus_addr_t addr; struct pglist mlist; int curseg; - int success; - paddr_t pa; /* * Build a list of pages to free back to the VM system. @@ -418,8 +416,7 @@ _dmamem_free(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs) for (addr = segs[curseg].ds_addr; addr < (segs[curseg].ds_addr + segs[curseg].ds_len); addr += PAGE_SIZE) { - success = pmap_extract (pmap_kernel(), addr, &pa); - m = PHYS_TO_VM_PAGE(pa); + m = PHYS_TO_VM_PAGE(addr); TAILQ_INSERT_TAIL(&mlist, m, pageq); } } |