* [PATCH] Use page_to_pfn in BIO code
@ 2002-06-04 9:47 Anton Blanchard
0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2002-06-04 9:47 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
Hi,
While porting the DISCONTIGMEM code to ppc64 (in order to do NUMA memory
allocation) I noticed the bio code uses page_to_phys. We should instead
be using the recently introduced page_to_pfn code.
This now limits the direct usage of mem_map (at least on ppc64) to
two spots - page_to_pfn/pfn_to_page which makes DISCONTIGMEM support
quite trivial.
Anton
diff -urN linux-2.5_ppc64/include/linux/bio.h linux-2.5_work/include/linux/bio.h
--- linux-2.5_ppc64/include/linux/bio.h Wed May 8 10:31:25 2002
+++ linux-2.5_work/include/linux/bio.h Tue Jun 4 16:20:41 2002
@@ -128,8 +130,8 @@
/*
* will die
*/
-#define bio_to_phys(bio) (page_to_phys(bio_page((bio))) + (unsigned long) bio_offset((bio)))
-#define bvec_to_phys(bv) (page_to_phys((bv)->bv_page) + (unsigned long) (bv)->bv_offset)
+#define bio_to_phys(bio) ((page_to_pfn(bio_page((bio))) << PAGE_SHIFT) + (unsigned long) bio_offset((bio)))
+#define bvec_to_phys(bv) ((page_to_pfn((bv)->bv_page) << PAGE_SHIFT) + (unsigned long) (bv)->bv_offset)
/*
* queues that have highmem support enabled may still need to revert to
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-04 9:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-04 9:47 [PATCH] Use page_to_pfn in BIO code Anton Blanchard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.