Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping

Pull DMA-mapping fixes from Marek Szyprowski:
"A set of minor fixes for dma-mapping code (ARM and x86) required for
Contiguous Memory Allocator (CMA) patches merged in v3.5-rc1."

* 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
x86: dma-mapping: fix broken allocation when dma_mask has been provided
ARM: dma-mapping: fix debug messages in dmabounce code
ARM: mm: fix type of the arm_dma_limit global variable
ARM: dma-mapping: Add missing static storage class specifier

+14 -13
+8 -8
arch/arm/common/dmabounce.c
··· 366 366 struct safe_buffer *buf; 367 367 unsigned long off; 368 368 369 - dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n", 370 - __func__, addr, off, sz, dir); 369 + dev_dbg(dev, "%s(dma=%#x,sz=%zx,dir=%x)\n", 370 + __func__, addr, sz, dir); 371 371 372 372 buf = find_safe_buffer_dev(dev, addr, __func__); 373 373 if (!buf) ··· 377 377 378 378 BUG_ON(buf->direction != dir); 379 379 380 - dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n", 381 - __func__, buf->ptr, virt_to_dma(dev, buf->ptr), 380 + dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x off=%#lx) mapped to %p (dma=%#x)\n", 381 + __func__, buf->ptr, virt_to_dma(dev, buf->ptr), off, 382 382 buf->safe, buf->safe_dma_addr); 383 383 384 384 DO_STATS(dev->archdata.dmabounce->bounce_count++); ··· 406 406 struct safe_buffer *buf; 407 407 unsigned long off; 408 408 409 - dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n", 410 - __func__, addr, off, sz, dir); 409 + dev_dbg(dev, "%s(dma=%#x,sz=%zx,dir=%x)\n", 410 + __func__, addr, sz, dir); 411 411 412 412 buf = find_safe_buffer_dev(dev, addr, __func__); 413 413 if (!buf) ··· 417 417 418 418 BUG_ON(buf->direction != dir); 419 419 420 - dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n", 421 - __func__, buf->ptr, virt_to_dma(dev, buf->ptr), 420 + dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x off=%#lx) mapped to %p (dma=%#x)\n", 421 + __func__, buf->ptr, virt_to_dma(dev, buf->ptr), off, 422 422 buf->safe, buf->safe_dma_addr); 423 423 424 424 DO_STATS(dev->archdata.dmabounce->bounce_count++);
+2 -2
arch/arm/mm/dma-mapping.c
··· 228 228 229 229 #define DEFAULT_CONSISTENT_DMA_SIZE SZ_2M 230 230 231 - unsigned long consistent_base = CONSISTENT_END - DEFAULT_CONSISTENT_DMA_SIZE; 231 + static unsigned long consistent_base = CONSISTENT_END - DEFAULT_CONSISTENT_DMA_SIZE; 232 232 233 233 void __init init_consistent_dma_size(unsigned long size) 234 234 { ··· 321 321 .vm_list = LIST_HEAD_INIT(coherent_head.vm_list), 322 322 }; 323 323 324 - size_t coherent_pool_size = DEFAULT_CONSISTENT_DMA_SIZE / 8; 324 + static size_t coherent_pool_size = DEFAULT_CONSISTENT_DMA_SIZE / 8; 325 325 326 326 static int __init early_coherent_pool(char *p) 327 327 {
+1 -1
arch/arm/mm/init.c
··· 212 212 * allocations. This must be the smallest DMA mask in the system, 213 213 * so a successful GFP_DMA allocation will always satisfy this. 214 214 */ 215 - u32 arm_dma_limit; 215 + phys_addr_t arm_dma_limit; 216 216 217 217 static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole, 218 218 unsigned long dma_size)
+1 -1
arch/arm/mm/mm.h
··· 62 62 #endif 63 63 64 64 #ifdef CONFIG_ZONE_DMA 65 - extern u32 arm_dma_limit; 65 + extern phys_addr_t arm_dma_limit; 66 66 #else 67 67 #define arm_dma_limit ((u32)~0) 68 68 #endif
+2 -1
arch/x86/kernel/pci-dma.c
··· 100 100 struct dma_attrs *attrs) 101 101 { 102 102 unsigned long dma_mask; 103 - struct page *page = NULL; 103 + struct page *page; 104 104 unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; 105 105 dma_addr_t addr; 106 106 ··· 108 108 109 109 flag |= __GFP_ZERO; 110 110 again: 111 + page = NULL; 111 112 if (!(flag & GFP_ATOMIC)) 112 113 page = dma_alloc_from_contiguous(dev, count, get_order(size)); 113 114 if (!page)