[PATCH] Re: news about IDE PIO HIGHMEM bug (was: Re: 2.6.9-mm1)

From: Jeff Garzik
Date: Wed Oct 27 2004 - 11:50:23 EST


Martin J. Bligh wrote:
To repeat what I said in IRC ... ;-)

Actually, you could check this with the pfns being the same when >> MAX_ORDER-1.
We should be aligned on a MAX_ORDER boundary, I think.

However, pfn_to_page(page_to_pfn(page) + 1) might be safer. If rather slower.


Is this patch acceptable to everyone? Andrew?

It uses the publicly-exported pfn_to_page/page_to_pfn abstraction, which seems to be the only way to accomplish what we want to do in IDE/libata.

Jeff


===== include/linux/mm.h 1.193 vs edited =====
--- 1.193/include/linux/mm.h 2004-10-20 04:37:06 -04:00
+++ edited/include/linux/mm.h 2004-10-27 12:33:28 -04:00
@@ -41,6 +41,8 @@
#define MM_VM_SIZE(mm) TASK_SIZE
#endif

+#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + n)
+
/*
* Linux kernel virtual memory manager primitives.
* The idea being to have a "virtual" mm in the same way