Message ID | alpine.LFD.2.00.1107062043180.14596@xanadu.home (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jul 08, 2011 at 01:14:41PM +0100, Russell King - ARM Linux wrote: > It looks like ISA_DMA_THRESHOLD has become unused by most of the kernel, > so yes, renaming it to "dma_zone_limit" would be more descriptive. We > should probably make dma_supported() be out-of-line anyway (which then > means that dma_zone_limit doesn't have to be exported to drivers) - and > I think the DMA bounce stuff needs cleaning up in dma_set_mask(). ... and I now have a patch which does this, pending testing. Once I've tested it I'll send it out.
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index 1d34c11..fcf15de 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h @@ -9,8 +9,10 @@ #ifndef CONFIG_ZONE_DMA #define MAX_DMA_ADDRESS 0xffffffffUL #else -extern unsigned long arm_dma_zone_size; -#define MAX_DMA_ADDRESS (PAGE_OFFSET + arm_dma_zone_size) +#define MAX_DMA_ADDRESS ({ \ + extern unsigned long arm_dma_zone_size; \ + arm_dma_zone_size ? \ + (PAGE_OFFSET + arm_dma_zone_size) : 0xffffffffUL; }) #endif #ifdef CONFIG_ISA_DMA_API