On Thu, Sep 02, 2004 at 11:42:43AM -0700, William Lee Irwin III wrote: > This usage is valid too, of course. In this case we either need to adjust > include/asm-ia64/page.h for virtual mem_map Thanks to all the explanations I think I'm starting to understand all these options; I'll try to document things a little more fully in our WiKi soon (http://www.gelato.unsw.edu.au/IA64wiki if you've never seen it). I applied the following trivial patch and things seem to work now. This way, pfn_to_page(0) returns 0xa0007fff... (the virtual mem map) which I belive to be correct. ===== include/asm-ia64/page.h 1.26 vs edited ===== --- 1.26/include/asm-ia64/page.h 2004-07-27 15:26:50 +10:00 +++ edited/include/asm-ia64/page.h 2004-09-03 12:04:37 +10:00 @@ -84,6 +84,13 @@ #endif #ifndef CONFIG_DISCONTIGMEM +# ifdef CONFIG_VIRTUAL_MEM_MAP +extern struct page *vmem_map; +# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) +# define page_to_pfn(page) ((unsigned long) (page - vmem_map)) +# define pfn_to_page(pfn) (vmem_map + (pfn)) +# endif +#else /* !CONFIG_VIRTUAL_MEM_MAP */ #define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) #define page_to_pfn(page) ((unsigned long) (page - mem_map)) #define pfn_to_page(pfn) (mem_map + (pfn)) -i - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:30 EST