Index: arm/arm/busdma_machdep.c =================================================================== --- arm/arm/busdma_machdep.c (revision 232297) +++ arm/arm/busdma_machdep.c (working copy) @@ -68,7 +68,7 @@ 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 @@ 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 @@ * 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)) Index: powerpc/powerpc/busdma_machdep.c =================================================================== --- powerpc/powerpc/busdma_machdep.c (revision 232297) +++ powerpc/powerpc/busdma_machdep.c (working copy) @@ -63,7 +63,7 @@ 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; @@ -219,7 +219,7 @@ */ 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, Index: powerpc/powerpc/iommu_if.m =================================================================== --- powerpc/powerpc/iommu_if.m (revision 232297) +++ powerpc/powerpc/iommu_if.m (working copy) @@ -41,7 +41,7 @@ bus_addr_t lowaddr; bus_addr_t highaddr; bus_size_t alignment; - bus_size_t boundary; + bus_addr_t boundary; void *cookie; }; Index: powerpc/ps3/ps3bus.c =================================================================== --- powerpc/ps3/ps3bus.c (revision 232297) +++ powerpc/ps3/ps3bus.c (working copy) @@ -64,7 +64,7 @@ int rid, struct resource *res); static bus_dma_tag_t ps3bus_get_dma_tag(device_t dev, device_t child); static int ps3_iommu_map(device_t dev, bus_dma_segment_t *segs, int *nsegs, bus_addr_t min, bus_addr_t max, bus_size_t alignment, - bus_size_t boundary, void *cookie); + bus_addr_t boundary, void *cookie); static int ps3_iommu_unmap(device_t dev, bus_dma_segment_t *segs, int nsegs, void *cookie); static int ps3_gettime(device_t dev, struct timespec *ts); @@ -697,7 +697,7 @@ static int ps3_iommu_map(device_t dev, bus_dma_segment_t *segs, int *nsegs, - bus_addr_t min, bus_addr_t max, bus_size_t alignment, bus_size_t boundary, + bus_addr_t min, bus_addr_t max, bus_size_t alignment, bus_addr_t boundary, void *cookie) { struct ps3bus_devinfo *dinfo = cookie; Index: sparc64/sparc64/bus_machdep.c =================================================================== --- sparc64/sparc64/bus_machdep.c (revision 232297) +++ sparc64/sparc64/bus_machdep.c (working copy) @@ -185,7 +185,7 @@ */ 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 highaddr, + 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, void *lockfuncarg, bus_dma_tag_t *dmat) Index: sparc64/include/bus_dma.h =================================================================== --- sparc64/include/bus_dma.h (revision 232297) +++ sparc64/include/bus_dma.h (working copy) @@ -103,7 +103,7 @@ void *dt_cookie; /* cookie used in the guts */ bus_dma_tag_t dt_parent; bus_size_t dt_alignment; - bus_size_t dt_boundary; + bus_addr_t dt_boundary; bus_addr_t dt_lowaddr; bus_addr_t dt_highaddr; bus_dma_filter_t *dt_filter; Index: kern/kern_malloc.c =================================================================== --- kern/kern_malloc.c (revision 232297) +++ kern/kern_malloc.c (working copy) @@ -418,7 +418,7 @@ void * contigmalloc(unsigned long size, struct malloc_type *type, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, - unsigned long boundary) + vm_paddr_t boundary) { void *ret; Index: ia64/ia64/busdma_machdep.c =================================================================== --- ia64/ia64/busdma_machdep.c (revision 232297) +++ ia64/ia64/busdma_machdep.c (working copy) @@ -53,7 +53,7 @@ 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; @@ -139,7 +139,7 @@ static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, bus_size_t len) { - bus_size_t bndy; + bus_addr_t bndy; int retval; retval = 0; @@ -199,7 +199,7 @@ */ 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 highaddr, + 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, void *lockfuncarg, bus_dma_tag_t *dmat) Index: mips/mips/busdma_machdep.c =================================================================== --- mips/mips/busdma_machdep.c (revision 232297) +++ mips/mips/busdma_machdep.c (working copy) @@ -67,7 +67,7 @@ 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; @@ -310,7 +310,7 @@ 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, @@ -356,13 +356,13 @@ * 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)) newtag->flags |= BUS_DMA_COULD_BOUNCE; Index: x86/x86/busdma_machdep.c =================================================================== --- x86/x86/busdma_machdep.c (revision 232297) +++ x86/x86/busdma_machdep.c (working copy) @@ -63,7 +63,7 @@ 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; @@ -218,7 +218,7 @@ */ 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, Index: sys/malloc.h =================================================================== --- sys/malloc.h (revision 232297) +++ sys/malloc.h (working copy) @@ -171,7 +171,7 @@ void contigfree(void *addr, unsigned long size, struct malloc_type *type); void *contigmalloc(unsigned long size, struct malloc_type *type, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, - unsigned long boundary) __malloc_like; + vm_paddr_t boundary) __malloc_like; void free(void *addr, struct malloc_type *type); void *malloc(unsigned long size, struct malloc_type *type, int flags) __malloc_like; void malloc_init(void *);