summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-03-01 19:58:34 +0000
committerjhb <jhb@FreeBSD.org>2012-03-01 19:58:34 +0000
commit5013ab31bdd0c853bd73031dd2246844cd9f9cfe (patch)
treec681791d9aa316edfa305bde95f3cea4802aee56 /sys/arm
parentfbe3c228aa921805fe715fd6cd18c7f02d936815 (diff)
downloadFreeBSD-src-5013ab31bdd0c853bd73031dd2246844cd9f9cfe.zip
FreeBSD-src-5013ab31bdd0c853bd73031dd2246844cd9f9cfe.tar.gz
- Change contigmalloc() to use the vm_paddr_t type instead of an unsigned
long for specifying a boundary constraint. - Change bus_dma tags to use bus_addr_t instead of bus_size_t for boundary constraints. These allow boundary constraints to be fully expressed for cases where sizeof(bus_addr_t) != sizeof(bus_size_t). Specifically, it allows a driver to properly specify a 4GB boundary in a PAE kernel. Note that this cannot be safely MFC'd without a lot of compat shims due to KBI changes, so I do not intend to merge it. Reviewed by: scottl
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/arm/busdma_machdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c
index cf8dd51..dbb929a 100644
--- a/sys/arm/arm/busdma_machdep.c
+++ b/sys/arm/arm/busdma_machdep.c
@@ -68,7 +68,7 @@ struct bounce_zone;
struct bus_dma_tag {
bus_dma_tag_t parent;
bus_size_t alignment;
- bus_size_t boundary;
+ bus_addr_t boundary;
bus_addr_t lowaddr;
bus_addr_t highaddr;
bus_dma_filter_t *filter;
@@ -332,7 +332,7 @@ _busdma_free_dmamap(bus_dmamap_t map)
int
bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
- bus_size_t boundary, bus_addr_t lowaddr,
+ bus_addr_t boundary, bus_addr_t lowaddr,
bus_addr_t highaddr, bus_dma_filter_t *filter,
void *filterarg, bus_size_t maxsize, int nsegments,
bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
@@ -378,12 +378,12 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
* Take into account any restrictions imposed by our parent tag
*/
if (parent != NULL) {
- newtag->lowaddr = min(parent->lowaddr, newtag->lowaddr);
- newtag->highaddr = max(parent->highaddr, newtag->highaddr);
+ newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr);
+ newtag->highaddr = MAX(parent->highaddr, newtag->highaddr);
if (newtag->boundary == 0)
newtag->boundary = parent->boundary;
else if (parent->boundary != 0)
- newtag->boundary = min(parent->boundary,
+ newtag->boundary = MIN(parent->boundary,
newtag->boundary);
if ((newtag->filter != NULL) ||
((parent->flags & BUS_DMA_COULD_BOUNCE) != 0))
OpenPOWER on IntegriCloud