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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 B95C6C18E5A for ; Tue, 10 Mar 2020 09:07:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7378420674 for ; Tue, 10 Mar 2020 09:07:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iB5n4vb/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7378420674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1875E6B0005; Tue, 10 Mar 2020 05:07:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 139256B0006; Tue, 10 Mar 2020 05:07:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 027316B0007; Tue, 10 Mar 2020 05:07:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id DF55F6B0005 for ; Tue, 10 Mar 2020 05:07:34 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AE65D180AD815 for ; Tue, 10 Mar 2020 09:07:34 +0000 (UTC) X-FDA: 76578874428.22.mark60_25007d130251a X-HE-Tag: mark60_25007d130251a X-Filterd-Recvd-Size: 8639 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Mar 2020 09:07:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583831253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c3k393cpZpdrRAgRetuLt8LDUKrPY+6Ws/dguzrSRMQ=; b=iB5n4vb/Fd1aq+PGYJZlmKfeOrVDJfXUTmFqdBtE4fDRakzr4E6uwdm40Cblb3s67yk0DY RwfVIyk+hjttru4h7lWCMBUShc69pN/LbqvWXk1ypgidrUpwWP7/ycyNCQy6u0fUV6Qz2x dDuWYHW+USRlivz2KacxkH84YzE11XI= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-472-d-Y1macZPZqpSK_WRUYbzw-1; Tue, 10 Mar 2020 05:07:28 -0400 X-MC-Unique: d-Y1macZPZqpSK_WRUYbzw-1 Received: by mail-qt1-f200.google.com with SMTP id c13so8689451qtq.23 for ; Tue, 10 Mar 2020 02:07:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gkwmqPp6GsyO5VaaBvrjPTvpV8Abv750jl9TPtb76uY=; b=rBtA8t+/UScq44VEQISE5bqTfwARP/b7n3LJSnvSZ8JG7AuHDrRSwL8P9LNyKCI+RV OJSDtNvi/6dSqQ7MWWgG1s5EEWZRpM1XQOWvKb09+hq8hDTQenzz/+XFV5f4/fDylWDP 5OrKX8qLAQnl7oI+9/7uzqlMRFjIEJp+8lN5TSfP4ogsasTHwbG+2naaKUzQrm5oduKE t69tkRt77VaheZKL+BVypSaDvox4cVKCbeNPnujrvEmsxS/95Yshx8pDmpj39dWf+SYu hYui+vtyy5H9w/l9b1DBKmNn30ievU22U2Hc/3gUoderf1F9olsIzoXZgultnbDx8ocU Td7w== X-Gm-Message-State: ANhLgQ35kzdkVjvRY//yLFTvhFZ+GsSy0CIYeL/+Zw1jEQcB1Jp0iUT5 S9wv+30z2HJk5x1Ap1bEksVkUvRcHoyIy/IHiAM39YcqoWdzP0gmICdNNB2q8Dr+bilBHluoSyg 8QIEB5uBa0SA= X-Received: by 2002:a37:6388:: with SMTP id x130mr7445039qkb.429.1583831248048; Tue, 10 Mar 2020 02:07:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsR04+ef3fg0lvE+116n1XFW0wqgii1lPEefQ1ofWZyChJLPn5FCzZUYKuzd6JxdXzrskDOXg== X-Received: by 2002:a37:6388:: with SMTP id x130mr7445011qkb.429.1583831247688; Tue, 10 Mar 2020 02:07:27 -0700 (PDT) Received: from redhat.com (bzq-79-178-2-19.red.bezeqint.net. [79.178.2.19]) by smtp.gmail.com with ESMTPSA id l8sm832017qth.3.2020.03.10.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 02:07:26 -0700 (PDT) Date: Tue, 10 Mar 2020 05:07:21 -0400 From: "Michael S. Tsirkin" To: Anup Patel Cc: Alexander Duyck , Anup Patel , kbuild test robot , Linux Memory Management List , Palmer Dabbelt , Christian Borntraeger , Atish Patra , Alistair Francis , linux-riscv , Andrew Morton Subject: Re: [linux-next:master 7003/7050] include/linux/virtio_config.h:113: undefined reference to `page_reporting_unregister' Message-ID: <20200310050630-mutt-send-email-mst@kernel.org> References: <202003091047.yO0wlUGy%lkp@intel.com> <20200310015958-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 Tue, Mar 10, 2020 at 02:13:19PM +0530, Anup Patel wrote: > On Tue, Mar 10, 2020 at 11:38 AM Michael S. Tsirkin wrot= e: > > > > 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 wrot= e: > > > > > > > > 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/mast= er/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=3D7.5.0 make.cross ARCH=3Driscv > > > > > > > > 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 `bal= loon_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 `ballo= on_page_alloc' > > > > drivers/virtio/virtio_balloon.o: In function `fill_balloon': > > > > >> drivers/virtio/virtio_balloon.c:233: undefined reference to `bal= loon_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_re= move': > > > > 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_pr= obe': > > > > > > It looks like somehow the config has CONFIG_VIRTIO_BALLOON enabled, > > > but didn't select CONFIG_MEMORY_BALLOON nor CONFIG_PAGE_REPORTING Tha= t > > > 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 thi= s 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/k= config-language.rst#L143 > > > > > > I agree. And when we change virtio we likely won't remember to fix up R= ISC-V. > > So please don't poke at it from arches. >=20 > I will fix RISC-V Kconfig. >=20 > Is it fine to use "imply" inplace of "select" ? >=20 > Regards, > Anup IIUC imply has exactly the same limitations as select, so this won't do any good. > > 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 > > > >