Re: ERROR: "min_low_pfn" undefined!

From: Mike Rapoport
Date: Tue Jun 30 2020 - 07:15:38 EST


(addde Michal)

On Mon, Jun 29, 2020 at 07:13:30PM -0700, David Rientjes wrote:
> On Tue, 30 Jun 2020, kernel test robot wrote:
>
> > Hi Alexander,
> >
> > FYI, the error/warning still remains.
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 7c30b859a947535f2213277e827d7ac7dcff9c84
> > commit: f220df66f67684246ae1bf4a4e479efc7c2f325a intel_th: msu-sink: An example msu buffer "sink"
> > date: 11 months ago
> > config: microblaze-randconfig-c023-20200629 (attached as .config)
> > compiler: microblaze-linux-gcc (GCC) 9.3.0
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> >
> > All errors (new ones prefixed by >>):
> >
> > ERROR: "min_low_pfn" [drivers/rpmsg/virtio_rpmsg_bus.ko] undefined!
> > >> ERROR: "min_low_pfn" [drivers/hwtracing/intel_th/intel_th_msu_sink.ko] undefined!
> > ERROR: "min_low_pfn" [drivers/hwtracing/intel_th/intel_th_msu.ko] undefined!
> > ERROR: "min_low_pfn" [drivers/mmc/core/mmc_core.ko] undefined!
> > ERROR: "min_low_pfn" [drivers/md/dm-crypt.ko] undefined!
> > ERROR: "min_low_pfn" [drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko] undefined!
> > ERROR: "min_low_pfn" [crypto/tcrypt.ko] undefined!
> > ERROR: "min_low_pfn" [crypto/asymmetric_keys/asym_tpm.ko] undefined!
> >
>
> Looks like we have precedence for min_low_pfn failures and we can't blame
> this poor commit :)

This commit only added a new occurence of this error :)
It seems that the problem is caused by nommu defintion of pfn_valid() in
microblaze:

define pfn_valid(pfn) (((pfn) >= min_low_pfn) && \
((pfn) <= (min_low_pfn + max_mapnr)))

but I could not reproduce the error with nommu_defconfig.

> I wonder why we don't simply do EXPORT_SYMBOL() in mm/memblock.c,
> non-microblaze architectures do this themselves because it doesn't get
> generically exported:

> arch/ia64/kernel/ia64_ksyms.c:EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */
> arch/sh/kernel/sh_ksyms_32.c:EXPORT_SYMBOL(min_low_pfn);

I think we can do better than that. The below patch is build-tested
only.