ep93xx/ts72xx: Kernel 2.6.36 problems introduced with commit 5bc23d32d

Petr Štetiar ynezz at true.cz
Sun Oct 31 18:30:36 EDT 2010


Russell King - ARM Linux <linux at arm.linux.org.uk> [2010-10-31 20:52:10]:

> It's being a little too over-cautious.  In arch/arm/mm/dma-mapping.c
> __dma_alloc_remap, remove the + 1 from "bit = fls(size - 1) + 1;".

Hm, that was really fast :-) It works now, thank you!

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 4bc43e5..7012105 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -198,7 +198,7 @@ __dma_alloc_remap(struct page *page, size_t size, gfp_t
gfp, pgprot_t prot)
         * fragmentation of the DMA space, and also prevents allocations
         * smaller than a section from crossing a section boundary.
         */
-       bit = fls(size - 1) + 1;
+       bit = fls(size - 1);
        if (bit > SECTION_SHIFT)
                bit = SECTION_SHIFT;
        align = 1 << bit;

-- ynezz



More information about the linux-arm-kernel mailing list