public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] SN2 build fix CONFIG_VIRTUAL_MEM_MAP and CONFIG_DISCONTIGMEM
@ 2004-09-08 21:45 tony.luck
  2004-09-08 22:53 ` Paul Jackson
  0 siblings, 1 reply; 5+ messages in thread
From: tony.luck @ 2004-09-08 21:45 UTC (permalink / raw)
  To: Jesse Barnes, Paul Jackson
  Cc: Linus Torvalds, ianw, William Irwin, linux-kernel

>>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.

Signed-off-by: Tony Luck <tony.luck@intel.com>

===== include/asm-ia64/page.h 1.28 vs edited =====
--- 1.28/include/asm-ia64/page.h	2004-09-05 20:48:22 +00:00
+++ edited/include/asm-ia64/page.h	2004-09-08 20:39:23 +00:00
@@ -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)

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: [PATCH] SN2 build fix CONFIG_VIRTUAL_MEM_MAP and CONFIG_DISCONTIGMEM
@ 2004-09-08 16:56 Luck, Tony
  0 siblings, 0 replies; 5+ messages in thread
From: Luck, Tony @ 2004-09-08 16:56 UTC (permalink / raw)
  To: Jesse Barnes, Paul Jackson
  Cc: Linus Torvalds, ianw, William Irwin, linux-kernel

>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.

-Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] SN2 build fix CONFIG_VIRTUAL_MEM_MAP and CONFIG_DISCONTIGMEM
@ 2004-09-05 21:18 Paul Jackson
  2004-09-08  4:30 ` Jesse Barnes
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Jackson @ 2004-09-05 21:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Tony Luck, ianw, William Irwin, Paul Jackson, linux-kernel

The change on 2004-09-03 by ianw@gelato.unsw.edu.au appears to have
a typo, which causes builds of configurations which define both
CONFIG_VIRTUAL_MEM_MAP and CONFIG_DISCONTIGMEM to emit some 890
warnings for redefines of each of pfn_valid, page_to_pfn,
pfn_to_page.  This shows up compiling sn2_defconfig, the SN2
config of arch ia64.  I believe that this is a simply typo,
an extra "#else" line.  Removing this exta line enables sn2_defconfig
to build as before.  Builds of other arch's untested.  No effort
made to boot this.

Signed-off-by: Paul Jackson <pj@sgi.com>

--- 2.6.9-rc1-pre/include/asm-ia64/page.h	2004-09-05 13:39:15.000000000 -0700
+++ 2.6.9-rc1-post/include/asm-ia64/page.h	2004-09-05 13:48:22.000000000 -0700
@@ -90,7 +90,6 @@ extern struct page *vmem_map;
 #  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 won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-08 22:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-08 21:45 [PATCH] SN2 build fix CONFIG_VIRTUAL_MEM_MAP and CONFIG_DISCONTIGMEM tony.luck
2004-09-08 22:53 ` Paul Jackson
  -- strict thread matches above, loose matches on Subject: below --
2004-09-08 16:56 Luck, Tony
2004-09-05 21:18 Paul Jackson
2004-09-08  4:30 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox