Re: [linux-next:master 7003/7050] include/linux/virtio_config.h:113: undefined reference to `page_reporting_unregister'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 09, 2020 at 07:19:51PM -0700, Alexander Duyck wrote:
> On Sun, Mar 8, 2020 at 7:54 PM kbuild test robot <lkp@xxxxxxxxx> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   b86a6a241b7c60ca7a6ca4fb3c0d2aedbbf2c1b6
> > commit: 120359931943d2b801ce51a1a045dcc0a5d1a55b [7003/7050] Merge branch 'akpm-current/current'
> > config: riscv-randconfig-a001-20200308 (attached as .config)
> > compiler: riscv64-linux-gcc (GCC) 7.5.0
> > reproduce:
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         git checkout 120359931943d2b801ce51a1a045dcc0a5d1a55b
> >         # save the attached .config to linux build tree
> >         GCC_VERSION=7.5.0 make.cross ARCH=riscv
> >
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> >
> > All errors (new ones prefixed by >>):
> >
> >    drivers/virtio/virtio_balloon.o: In function `leak_balloon':
> >    drivers/virtio/virtio_balloon.c:281: undefined reference to `balloon_page_dequeue'
> >    drivers/virtio/virtio_balloon.o: In function `__virtio_test_bit':
> > >> include/linux/virtio_config.h:113: undefined reference to `page_reporting_unregister'
> >    drivers/virtio/virtio_balloon.o: In function `virtio_cread32':
> >    include/linux/virtio_config.h:423: undefined reference to `balloon_page_alloc'
> >    drivers/virtio/virtio_balloon.o: In function `fill_balloon':
> > >> drivers/virtio/virtio_balloon.c:233: undefined reference to `balloon_page_enqueue'
> >    drivers/virtio/virtio_balloon.o: In function `__virtio_test_bit':
> > >> include/linux/virtio_config.h:113: undefined reference to `page_reporting_register'
> >    drivers/gpu/drm/virtio/virtgpu_drv.o: In function `virtio_gpu_remove':
> >    drivers/gpu/drm/virtio/virtgpu_drv.c:139: undefined reference to `drm_dev_unplug'
> >    drivers/gpu/drm/virtio/virtgpu_drv.c:140: undefined reference to `drm_atomic_helper_shutdown'
> >    drivers/gpu/drm/virtio/virtgpu_drv.c:141: undefined reference to `drm_dev_put'
> >    drivers/gpu/drm/virtio/virtgpu_drv.o: In function `virtio_gpu_probe':
> 
> It looks like somehow the config has CONFIG_VIRTIO_BALLOON enabled,
> but didn't select CONFIG_MEMORY_BALLOON nor CONFIG_PAGE_REPORTING That
> shouldn't be possible since in drivers/virtio/Kconfig we have the
> following:
> config VIRTIO_BALLOON
>         tristate "Virtio balloon driver"
>         depends on VIRTIO
>         select MEMORY_BALLOON
>         select PAGE_REPORTING
> 
> I think I traced the problem down. It looks like it is related to this patch:
>     RISC-V: Add kconfig option for QEMU virt machine
> 
>     We add kconfig option for QEMU virt machine and select all
>     required VIRTIO drivers using this kconfig option.
> 
>     Signed-off-by: Anup Patel <anup.patel@xxxxxxx>
>     Reviewed-by: Atish Patra <atish.patra@xxxxxxx>
>     Reviewed-by: Palmer Dabbelt <palmerdabbelt@xxxxxxxxxx>
>     Reviewed-by: Alistair Francis <alistair.francis@xxxxxxx>
>     Signed-off-by: Palmer Dabbelt <palmerdabbelt@xxxxxxxxxx>
> 
> 
> The problem is it is using select to enable things that have
> dependencies, and as a result it is enabling things without enabling
> the bits needed to support them. That isn't recommended and is
> actually called out to something to avoid in the kconfig-language
> documentation:
> https://elixir.bootlin.com/linux/latest/source/Documentation/kbuild/kconfig-language.rst#L143


I agree. And when we change virtio we likely won't remember to fix up RISC-V.
So please don't poke at it from arches.
The right way to do this IMHO is via ARCH_DEFCONFIG, and using
a defconfig per board.
And I think the same applies to s390 and virtio console.
Christian?

-- 
MST






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux