* [PATCH] ppc32: fix dma_map_page() to use page_to_bus()
@ 2005-07-26 6:52 Eugene Surovegin
0 siblings, 0 replies; only message in thread
From: Eugene Surovegin @ 2005-07-26 6:52 UTC (permalink / raw)
To: Matt Porter; +Cc: linuxppc-dev
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@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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-26 6:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-26 6:52 [PATCH] ppc32: fix dma_map_page() to use page_to_bus() Eugene Surovegin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).