summaryrefslogtreecommitdiffstats
path: root/sys/i386
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/i386
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/i386')
-rw-r--r--sys/i386/i386/busdma_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c
index e59add7..45ab8b3 100644
--- a/sys/i386/i386/busdma_machdep.c
+++ b/sys/i386/i386/busdma_machdep.c
@@ -540,7 +540,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (ENOMEM);
- } else if ((uintptr_t)*vaddr & (dmat->alignment - 1)) {
+ } else if (vtophys(*vaddr) & (dmat->alignment - 1)) {
printf("bus_dmamem_alloc failed to align memory properly.\n");
}
if (flags & BUS_DMA_NOCACHE)
OpenPOWER on IntegriCloud