Date: Wed, 6 Apr 2016 14:16:38 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297617 - head/sys/arm64/arm64 Message-ID: <201604061416.u36EGcQh061666@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Wed Apr 6 14:16:37 2016 New Revision: 297617 URL: https://svnweb.freebsd.org/changeset/base/297617 Log: Use PHYS_IN_DMAP to check if a physical address is within the DMAP region. Approved by: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Apr 6 14:12:00 2016 (r297616) +++ head/sys/arm64/arm64/pmap.c Wed Apr 6 14:16:37 2016 (r297617) @@ -3534,7 +3534,7 @@ pmap_map_io_transient(vm_page_t page[], needs_mapping = FALSE; for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); - if (__predict_false(paddr >= DMAP_MAX_PHYSADDR)) { + if (__predict_false(!PHYS_IN_DMAP(paddr))) { error = vmem_alloc(kernel_arena, PAGE_SIZE, M_BESTFIT | M_WAITOK, &vaddr[i]); KASSERT(error == 0, ("vmem_alloc failed: %d", error)); @@ -3552,7 +3552,7 @@ pmap_map_io_transient(vm_page_t page[], sched_pin(); for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); - if (paddr >= DMAP_MAX_PHYSADDR) { + if (!PHYS_IN_DMAP(paddr)) { panic( "pmap_map_io_transient: TODO: Map out of DMAP data"); } @@ -3572,7 +3572,7 @@ pmap_unmap_io_transient(vm_page_t page[] sched_unpin(); for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); - if (paddr >= DMAP_MAX_PHYSADDR) { + if (!PHYS_IN_DMAP(paddr)) { panic("ARM64TODO: pmap_unmap_io_transient: Unmap data"); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604061416.u36EGcQh061666>