summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2010-09-29 21:53:11 +0000
committerneel <neel@FreeBSD.org>2010-09-29 21:53:11 +0000
commit11129fcf491c89baed716c5d05f041ae2fbd311b (patch)
tree8dd6d90fb3510e33b6be7fb425abe622a1356320 /sys/sparc64
parente63f3dc97af9bfe7754f93fcde7246db0f31e89b (diff)
downloadFreeBSD-src-11129fcf491c89baed716c5d05f041ae2fbd311b.zip
FreeBSD-src-11129fcf491c89baed716c5d05f041ae2fbd311b.tar.gz
Fix bogus error message from bus_dmamem_alloc() about incorrect alignment.
The check for alignment should be made against the physical address and not the virtual address that maps it. Sponsored by: NetApp Submitted by: Will McGovern (will at netapp dot com) Reviewed by: mjacob, jhb
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/bus_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sparc64/sparc64/bus_machdep.c b/sys/sparc64/sparc64/bus_machdep.c
index 5f5d2a4..0f0df07 100644
--- a/sys/sparc64/sparc64/bus_machdep.c
+++ b/sys/sparc64/sparc64/bus_machdep.c
@@ -652,7 +652,7 @@ nexus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags,
}
if (*vaddr == NULL)
return (ENOMEM);
- if ((uintptr_t)*vaddr % dmat->dt_alignment)
+ if (vtophys(*vaddr) % dmat->dt_alignment)
printf("%s: failed to align memory properly.\n", __func__);
return (0);
}
OpenPOWER on IntegriCloud