From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B763C10F25 for ; Tue, 10 Mar 2020 02:20:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3B9DD2146E for ; Tue, 10 Mar 2020 02:20:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UNlcB2rL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B9DD2146E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DB3826B009B; Mon, 9 Mar 2020 22:20:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D3DE56B009D; Mon, 9 Mar 2020 22:20:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C2BF66B009E; Mon, 9 Mar 2020 22:20:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0092.hostedemail.com [216.40.44.92]) by kanga.kvack.org (Postfix) with ESMTP id A5D586B009B for ; Mon, 9 Mar 2020 22:20:04 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6D609181AEF00 for ; Tue, 10 Mar 2020 02:20:04 +0000 (UTC) X-FDA: 76577847528.07.magic79_74ff64d432404 X-HE-Tag: magic79_74ff64d432404 X-Filterd-Recvd-Size: 6234 Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Mar 2020 02:20:03 +0000 (UTC) Received: by mail-il1-f194.google.com with SMTP id a6so10635704ilc.4 for ; Mon, 09 Mar 2020 19:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L6pCXyqDcdFgwMbY6i5R+BKWlatqyMzumWd/kP/8VIQ=; b=UNlcB2rLgG6pr5mr7Qkp5QgEXXpD9BF8/+1CpOOUiOkIrbAMfJy8nz+CaQEc3vBHZ0 ekiwRkHzNxtaySBL0Kku6lqnJ2vWFGyKBaawroWq9miobOATOBTs3R/vQ3qsUdQu2nPi MiOSO4d08txXpOviwvUEapqMTOgzqHEFJkTn9vgl6R3HbKOhMpmABvRblo6XMm7GtZL7 GNWRbnbznjeuWfGR3wONAPqe3eFcHMmUw5RkwEZttZ/UCPm39XCAmwvzEiKvsvTuFDqE a0YN+aivcAh11jBmKLpceitwspyh5/ZYml3/gl6xxE3DEGhpZUpmpYeWvnx/YhQzx9rh RUcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L6pCXyqDcdFgwMbY6i5R+BKWlatqyMzumWd/kP/8VIQ=; b=swNNImkWrmzejGCKvjGDs0OQ40/j/U/y2m4kvY2bVLgkaVkxxyyTk4JNY36+ihHL9r EoZi4J7x4K4B4suvbA4ghE9vsvbTaUd2c1steWE6HSdqge2vRL2hNQcOswb/jmGzs6no 0J87Vyp88uvCMwnrUbS84TiomgtyBy+wrDJrBMNc4KgPRGf/66Y5o+B89Q+mKhQfBeVC jzdX6TH2Cuay1ihXa0fxhb2Sa3HS1opBGoOmlAxj9nk+JdbYWcYuIq/rXBbvZv4LcUWN GJZhyv7UzBZSxMZpG8pw7xKlK+VhLQ0bBTY1OKVxBW+HCCGuY1wA34z9nry/fYemI5mv h/zQ== X-Gm-Message-State: ANhLgQ31a6FmAb1/Do3OcZL+NYizhufKOFQ0VA6GXz1leD7DXQWjPPGi llN4pq5XPLKCgdBn/1sQ7DqzK1VIg5M9T+nU+xs= X-Google-Smtp-Source: ADFU+vvIrTlf8Gh1C40sGbrVNezt1ZTTHbHdjDa7x7F5WsoEPaoIZFLWBKwq+XlT5L9+QUvgzv6uuKw/vRHavmi/Dk4= X-Received: by 2002:a92:8f91:: with SMTP id r17mr16485609ilk.97.1583806803111; Mon, 09 Mar 2020 19:20:03 -0700 (PDT) MIME-Version: 1.0 References: <202003091047.yO0wlUGy%lkp@intel.com> In-Reply-To: <202003091047.yO0wlUGy%lkp@intel.com> From: Alexander Duyck Date: Mon, 9 Mar 2020 19:19:51 -0700 Message-ID: Subject: Re: [linux-next:master 7003/7050] include/linux/virtio_config.h:113: undefined reference to `page_reporting_unregister' To: kbuild test robot , linux-riscv@lists.infradead.org, anup.patel@wdc.com, atish.patra@wdc.com, palmerdabbelt@google.com, alistair.francis@wdc.com Cc: Andrew Morton , Linux Memory Management List , "Michael S. Tsirkin" Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Mar 8, 2020 at 7:54 PM kbuild test robot 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 > > 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 Reviewed-by: Atish Patra Reviewed-by: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt 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