[PATCH] ppc32: fix dma_map_page() to use page_to_bus()
Eugene Surovegin
ebs at ebshome.net
Tue Jul 26 16:52:12 EST 2005
Matt,
the following trivial patch changes dma_map_page() to use
page_to_bus() instead of open-coding it (incorrectly in some cases).
Signed-off-by: Eugene Surovegin <ebs at ebshome.net>
diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h
--- a/include/asm-ppc/dma-mapping.h
+++ b/include/asm-ppc/dma-mapping.h
@@ -117,7 +117,7 @@ dma_map_page(struct device *dev, struct
__dma_sync_page(page, offset, size, direction);
- return (page - mem_map) * PAGE_SIZE + PCI_DRAM_OFFSET + offset;
+ return page_to_bus(page) + offset;
}
/* We do nothing. */
More information about the Linuxppc-dev
mailing list