]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/mm/dma-mapping.c
Merge branches 'arnd-randcfg-fixes', 'debug', 'io' (early part), 'l2x0', 'p2v', ...
[karo-tx-linux.git] / arch / arm / mm / dma-mapping.c
index c3ff82f92d9c812357f99ab7427a7788e718eb13..235eb775fc78284180779d3eed96ccb357f8127c 100644 (file)
@@ -123,8 +123,8 @@ static void __dma_free_buffer(struct page *page, size_t size)
 #endif
 
 #define CONSISTENT_OFFSET(x)   (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT)
-#define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT)
-#define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT)
+#define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PMD_SHIFT)
+#define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PMD_SHIFT)
 
 /*
  * These are the page tables (2MB each) covering uncached, DMA consistent allocations
@@ -183,7 +183,7 @@ static int __init consistent_init(void)
                }
 
                consistent_pte[i++] = pte;
-               base += (1 << PGDIR_SHIFT);
+               base += PMD_SIZE;
        } while (base < CONSISTENT_END);
 
        return ret;