Skip to contentSkip to conversation

SN2 build fix CONFIG_VIRTUAL_MEM_MAP and CONFIG_DISCONTIGMEM

PATCH [email protected] 2 participants 2 messages Sep 8, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines
Quoted 6 lines

Thanks Paul, this looks a little simpler than the patch I posted (I'd rather just make CONFIG_DISCONTIGMEM and CONFIG_VIRTUAL_MEMMAP mandatory on ia64, but that's for another patch). Linus, since this breakage is in your tree now, can you please apply this assuming Tony has no complaints so that people can build on ia64 again?

I have no complaints. I see that Linus has already applied Paul's patch to his BK tree.

I want to change my vote :-) The problem isn't a spurious extra "#else" (which Paul's patch removed) ... it is a missing "#endif"

Here's a patch that puts the #else back, adds the #endif, and fixes the whitespace to make this nested mess of pre-processor noise a bit more legible.

===== include/asm-ia64/page.h 1.28 vs edited =====

include/asm-ia64/page.h +7 -6
@@ -86,13 +86,14 @@
 #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))
+#  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))
+# else
+#  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))
 # endif
-#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))
 #endif /* CONFIG_DISCONTIGMEM */
 
 #define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)
#1 lore raw
Quoted 1 line · Tony

I want to change my vote :-)

Thanks, Tony.

Signature · 3 lines
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373