summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2011-01-12 21:08:49 +0000
committermdf <mdf@FreeBSD.org>2011-01-12 21:08:49 +0000
commit30a663c80840465ec1e8372404e0d87ef4c9d07d (patch)
tree472680f3cc1c7654e4a78fdc645e42a356eeab3c
parentf80acf51cb18584f26ecddd02b8ea7ae9bef619c (diff)
downloadFreeBSD-src-30a663c80840465ec1e8372404e0d87ef4c9d07d.zip
FreeBSD-src-30a663c80840465ec1e8372404e0d87ef4c9d07d.tar.gz
Fix a brain fart. Since this file is shared between i386 and amd64, a
bus_size_t may be 32 or 64 bits. Change the bounce_zone alignment field to explicitly be 32 bits, as I can't really imagine a DMA device that needs anything close to 2GB alignment of data.
-rw-r--r--sys/x86/x86/busdma_machdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/x86/x86/busdma_machdep.c b/sys/x86/x86/busdma_machdep.c
index 947765b..e98e982 100644
--- a/sys/x86/x86/busdma_machdep.c
+++ b/sys/x86/x86/busdma_machdep.c
@@ -100,7 +100,7 @@ struct bounce_zone {
int total_bounced;
int total_deferred;
int map_count;
- bus_size_t alignment;
+ uint32_t alignment;
bus_addr_t lowaddr;
char zoneid[8];
char lowaddrid[20];
@@ -1060,9 +1060,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat)
SYSCTL_ADD_STRING(busdma_sysctl_tree(bz),
SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO,
"lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, "");
- SYSCTL_ADD_UQUAD(busdma_sysctl_tree(bz),
+ SYSCTL_ADD_UINT(busdma_sysctl_tree(bz),
SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO,
- "alignment", CTLFLAG_RD, &bz->alignment, "");
+ "alignment", CTLFLAG_RD, &bz->alignment, 0, "");
return (0);
}
OpenPOWER on IntegriCloud