[PATCH] Fix up non-NUMA breakage in mmzone.h
From: Dave Jones
Date: Fri Jul 01 2005 - 18:35:00 EST
On Fri, Jul 01, 2005 at 05:26:07PM -0400, Dave Jones wrote:
> I was wondering why the rawhide gcc (4.0.0 20050622 (Red Hat 4.0.0-13))
> blew up whilst trying to compile -rc3 and newer, with this informative
> error..
>
> include/asm/mmzone.h:154: error: syntax error before numeric constant
If CONFIG_NUMA isn't set, we use the define in <linux/mmzone.h>
for early_pfn_to_nid (which defines it to 0).
Because of this, the prototype needs to move inside the CONFIG_NUMA
too, or anal gcc's get really confused.
Signed-off-by: Dave Jones <davej@xxxxxxxxxx>
--- linux-2.6.12/include/asm-i386/mmzone.h~ 2005-07-01 18:30:14.000000000 -0400
+++ linux-2.6.12/include/asm-i386/mmzone.h 2005-07-01 18:30:30.000000000 -0400
@@ -37,6 +37,8 @@ static inline void get_memcfg_numa(void)
get_memcfg_numa_flat();
}
+extern int early_pfn_to_nid(unsigned long pfn);
+
#else /* !CONFIG_NUMA */
#define get_memcfg_numa get_memcfg_numa_flat
#define get_zholes_size(n) (0)
@@ -149,6 +151,4 @@ static inline int pfn_valid(int pfn)
#endif /* CONFIG_NEED_MULTIPLE_NODES */
-extern int early_pfn_to_nid(unsigned long pfn);
-
#endif /* _ASM_MMZONE_H_ */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/