Andrew Morton wrote: > KAMEZAWA Hiroyuki wrote: > >>Hi, >> >>This is a compile fix for >>X86_PC && EXPERIMENTAL && CONFIG_SPARSEMEM=y && !CONFIG_NEED_MULTIPLE_NODES >> >>BTW, on x86, it looks I can select CONFIG_NUMA=y but will not set >>CONFIG_NEED_MULTIPLE_NODES. It this expected ? >> > > > This patch is difficult for me to handle, because I don't know which > patches it fixes - probably it fixes two separate ones and needs to become > two patches. Usually it's obvious which patches are being fixed. > Sometimes reporters will tell me which patch is being fixed (extra nice!). > In this case, it's unobvious. > Sorry for too short infromation.... I attach my .config. and error messages are here. And as you wrote, it should be 2 patches.... -- CC drivers/base/memory.o In file included from include/linux/gfp.h:4, from include/linux/slab.h:15, from include/linux/percpu.h:4, from include/asm/local.h:4, from include/linux/module.h:24, from drivers/base/memory.c:14: include/linux/mmzone.h:610:1: warning: "pfn_to_nid" redefined include/linux/mmzone.h:458:1: warning: this is the location of the previous definition drivers/base/memory.c:28: error: static declaration of 'memory_sysdev_class' follows non-static declaration include/linux/memory.h:88: error: previous declaration of 'memory_sysdev_class' was here make[2]: *** [drivers/base/memory.o] Error 1 make[1]: *** [drivers/base] Error 2 make: *** [drivers] Error 2 -- The former is because pfn_to_nid define in in SPARSEME even if NEED_MULTIPLE_NODES is not defined. Thanks, -- Kame > Please always include the text of the error messages when fixing compile > errors. > > Please send me the .config. > > >>-- >>Index: linux-2.6.15-rc1-mm1/include/linux/mmzone.h >>=================================================================== >>--- linux-2.6.15-rc1-mm1.orig/include/linux/mmzone.h >>+++ linux-2.6.15-rc1-mm1/include/linux/mmzone.h >>@@ -596,12 +596,13 @@ static inline int pfn_valid(unsigned lon >> return 0; >> return valid_section(__nr_to_section(pfn_to_section_nr(pfn))); >> } >>- >>+#ifdef CONFIG_NEED_MULTIPLE_NODES >> #define pfn_to_nid(pfn) \ >> ({ \ >> unsigned long __pfn = (pfn); \ >> page_to_nid(pfn_to_page(pfn)); \ >> }) >>+#endif >> >> #define early_pfn_valid(pfn) pfn_valid(pfn) >> void sparse_init(void); >>Index: linux-2.6.15-rc1-mm1/drivers/base/memory.c >>=================================================================== >>--- linux-2.6.15-rc1-mm1.orig/drivers/base/memory.c >>+++ linux-2.6.15-rc1-mm1/drivers/base/memory.c >>@@ -25,7 +25,7 @@ >> >> #define MEMORY_CLASS_NAME "memory" >> >>-static struct sysdev_class memory_sysdev_class = { >>+struct sysdev_class memory_sysdev_class = { >> set_kset_name(MEMORY_CLASS_NAME), >> }; >> EXPORT_SYMBOL(memory_sysdev_class); > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > >