Message ID | 1386893438-23573-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Paul Mundt |
Headers | show |
Hi > Min_low_pfn and max_low_pfn were used in pfn_valid macro if defined > CONFIG_FLATMEM. When the functions that use the pfn_valid is used in driver > module, max_low_pfn and min_low_pfn is to undefined, and fail to build. > > ---- > ERROR: "min_low_pfn" [drivers/block/aoe/aoe.ko] undefined! > ERROR: "max_low_pfn" [drivers/block/aoe/aoe.ko] undefined! > make[2]: *** [__modpost] Error 1 > make[1]: *** [modules] Error 2 > ---- (snip) > +#ifdef CONFIG_FLATMEM > +/* need in pfn_valid macro */ > +EXPORT_SYMBOL(min_low_pfn); > +EXPORT_SYMBOL(max_low_pfn); > +#endif I'm not sure detail of min/max_low_pfn, but these exist under ${LINUX}/mm/[no]bootmem.c ? EXPORT_SYMBOL() on arch/sh/kernel/sh_ksyms_32.c seems strange for me. Best regards --- Kuninori Morimoto -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, (2013/12/13 10:12), Kuninori Morimoto wrote: > > Hi > >> Min_low_pfn and max_low_pfn were used in pfn_valid macro if defined >> CONFIG_FLATMEM. When the functions that use the pfn_valid is used in driver >> module, max_low_pfn and min_low_pfn is to undefined, and fail to build. >> >> ---- >> ERROR: "min_low_pfn" [drivers/block/aoe/aoe.ko] undefined! >> ERROR: "max_low_pfn" [drivers/block/aoe/aoe.ko] undefined! >> make[2]: *** [__modpost] Error 1 >> make[1]: *** [modules] Error 2 >> ---- > (snip) >> +#ifdef CONFIG_FLATMEM >> +/* need in pfn_valid macro */ >> +EXPORT_SYMBOL(min_low_pfn); >> +EXPORT_SYMBOL(max_low_pfn); >> +#endif > > I'm not sure detail of min/max_low_pfn, > but these exist under ${LINUX}/mm/[no]bootmem.c ? > Yes, I know. > EXPORT_SYMBOL() on arch/sh/kernel/sh_ksyms_32.c > seems strange for me. Handling of these depends on CPUs. And in SH32, it may be referred to from modules. Therefore, I have feeling that it is not amusing that sh_ksyms_32.c defines these using EXPORT_SYMBOL. Would you explain the reason that you thought to be strange? > > Best regards > --- > Kuninori Morimoto Best regards, Nobuhiro -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi > > EXPORT_SYMBOL() on arch/sh/kernel/sh_ksyms_32.c > > seems strange for me. > > Handling of these depends on CPUs. > And in SH32, it may be referred to from modules. > Therefore, I have feeling that it is not amusing that sh_ksyms_32.c defines these using EXPORT_SYMBOL. > > Would you explain the reason that you thought to be strange? I think EXPORT_SYMBOL() should be called from ${LINUX}/mm/[no]bootmem.c, not sh_ksyms_32.c Best regards --- Kuninori Morimoto -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, (2013/12/13 12:17), Kuninori Morimoto wrote: > > Hi > > >>> EXPORT_SYMBOL() on arch/sh/kernel/sh_ksyms_32.c >>> seems strange for me. >> >> Handling of these depends on CPUs. >> And in SH32, it may be referred to from modules. >> Therefore, I have feeling that it is not amusing that sh_ksyms_32.c defines these using EXPORT_SYMBOL. >> >> Would you explain the reason that you thought to be strange? > > I think EXPORT_SYMBOL() should be called > from ${LINUX}/mm/[no]bootmem.c, not sh_ksyms_32.c The usage of max_low_pfn and min_low_pfn depend on the architecture as I have described above. You do not need to set as EXPORT_SYMBOL these all architectures. Best regards, Nobuhiro -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 13 Dec 2013 09:10:38 +0900 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> wrote: > Min_low_pfn and max_low_pfn were used in pfn_valid macro if defined > CONFIG_FLATMEM. When the functions that use the pfn_valid is used in driver > module, max_low_pfn and min_low_pfn is to undefined, and fail to build. > > ---- > ERROR: "min_low_pfn" [drivers/block/aoe/aoe.ko] undefined! > ERROR: "max_low_pfn" [drivers/block/aoe/aoe.ko] undefined! This could be a sign that the aoe driver is doing something which it shouldn't be doing. z:/usr/src/25> grep pfn drivers/block/aoe/*.[ch] z:/usr/src/25> Confused. Can you please work out precisely where in AOE this reference is occurring? -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2013/12/13 Andrew Morton <akpm@linux-foundation.org>: > On Fri, 13 Dec 2013 09:10:38 +0900 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> wrote: > >> Min_low_pfn and max_low_pfn were used in pfn_valid macro if defined >> CONFIG_FLATMEM. When the functions that use the pfn_valid is used in driver >> module, max_low_pfn and min_low_pfn is to undefined, and fail to build. >> >> ---- >> ERROR: "min_low_pfn" [drivers/block/aoe/aoe.ko] undefined! >> ERROR: "max_low_pfn" [drivers/block/aoe/aoe.ko] undefined! > > This could be a sign that the aoe driver is doing something which it > shouldn't be doing. > > z:/usr/src/25> grep pfn drivers/block/aoe/*.[ch] > z:/usr/src/25> > > Confused. Can you please work out precisely where in AOE this > reference is occurring? min_low_pfn and max_low_pfn are referred from pfn_valid() in ./arch/sh/include/asm/page.h.
diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c index 2a0a596..a7d3b1b 100644 --- a/arch/sh/kernel/sh_ksyms_32.c +++ b/arch/sh/kernel/sh_ksyms_32.c @@ -20,6 +20,11 @@ EXPORT_SYMBOL(csum_partial_copy_generic); EXPORT_SYMBOL(copy_page); EXPORT_SYMBOL(__clear_user); EXPORT_SYMBOL(empty_zero_page); +#ifdef CONFIG_FLATMEM +/* need in pfn_valid macro */ +EXPORT_SYMBOL(min_low_pfn); +EXPORT_SYMBOL(max_low_pfn); +#endif #define DECLARE_EXPORT(name) \ extern void name(void);EXPORT_SYMBOL(name)
Min_low_pfn and max_low_pfn were used in pfn_valid macro if defined CONFIG_FLATMEM. When the functions that use the pfn_valid is used in driver module, max_low_pfn and min_low_pfn is to undefined, and fail to build. ---- ERROR: "min_low_pfn" [drivers/block/aoe/aoe.ko] undefined! ERROR: "max_low_pfn" [drivers/block/aoe/aoe.ko] undefined! make[2]: *** [__modpost] Error 1 make[1]: *** [modules] Error 2 ---- This patch fix this problem. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> --- arch/sh/kernel/sh_ksyms_32.c | 5 +++++ 1 file changed, 5 insertions(+)