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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 5026CC432BE for ; Mon, 16 Aug 2021 10:22:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D472861BA8 for ; Mon, 16 Aug 2021 10:22:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D472861BA8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 1A1826B0071; Mon, 16 Aug 2021 06:22:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 151886B0072; Mon, 16 Aug 2021 06:22:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03FB78D0001; Mon, 16 Aug 2021 06:22:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id DAB7F6B0071 for ; Mon, 16 Aug 2021 06:22:14 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 845CC2041E for ; Mon, 16 Aug 2021 10:22:14 +0000 (UTC) X-FDA: 78480553788.30.2E9414D Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf07.hostedemail.com (Postfix) with ESMTP id EBB2910055B2 for ; Mon, 16 Aug 2021 10:22:13 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EE0C96D; Mon, 16 Aug 2021 03:22:12 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 995483F40C; Mon, 16 Aug 2021 03:22:11 -0700 (PDT) Date: Mon, 16 Aug 2021 11:22:09 +0100 From: Cristian Marussi To: kernel test robot Cc: Igor Skalkin , kbuild-all@lists.01.org, Linux Memory Management List , Sudeep Holla , Peter Hilber , Arnd Bergmann Subject: Re: [linux-next:master 5053/7963] virtio.c:undefined reference to `virtio_check_driver_offered_feature' Message-ID: <20210816102209.GY6592@e120937-lin> References: <202108151230.lcHk2Pkk-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202108151230.lcHk2Pkk-lkp@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: EBB2910055B2 X-Stat-Signature: 3xuxgnwtmkkq4eyng455wdx6db86ecmq Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf07.hostedemail.com: domain of cristian.marussi@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=cristian.marussi@arm.com X-HE-Tag: 1629109333-941465 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, Aug 15, 2021 at 12:54:38PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 4b358aabb93a2c654cd1dcab1a25a589f6e2b153 > commit: 46abe13b5e3db187e52cd0de06c07bbce010726c [5053/7963] firmware: arm_scmi: Add virtio transport > config: ia64-randconfig-r032-20210815 (attached as .config) > compiler: ia64-linux-gcc (GCC) 11.2.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=46abe13b5e3db187e52cd0de06c07bbce010726c > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 46abe13b5e3db187e52cd0de06c07bbce010726c > # save the attached .config to linux build tree > mkdir build_dir > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > Hi, > ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_chan_available': > >> virtio.c:(.text+0x4b2): undefined reference to `virtio_check_driver_offered_feature' > ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `scmi_vio_probe': > virtio.c:(.text+0x622): undefined reference to `virtio_check_driver_offered_feature' > >> ia64-linux-ld: virtio.c:(.text+0x792): undefined reference to `virtqueue_get_vring_size' > ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `scmi_vio_feed_vq_rx.isra.0': > >> virtio.c:(.text+0xa12): undefined reference to `virtqueue_add_inbuf' > >> ia64-linux-ld: virtio.c:(.text+0xb22): undefined reference to `virtqueue_kick' > ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_send_message': > >> virtio.c:(.text+0x1132): undefined reference to `virtqueue_add_sgs' > ia64-linux-ld: virtio.c:(.text+0x1252): undefined reference to `virtqueue_kick' > ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `scmi_vio_complete_cb': > >> virtio.c:(.text+0x1bc2): undefined reference to `virtqueue_disable_cb' > >> ia64-linux-ld: virtio.c:(.text+0x1bd2): undefined reference to `virtqueue_get_buf' > >> ia64-linux-ld: virtio.c:(.text+0x1e92): undefined reference to `virtqueue_enable_cb' > ia64-linux-ld: virtio.c:(.text+0x2182): undefined reference to `virtqueue_enable_cb' > ia64-linux-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_scmi_init': > >> virtio.c:(.init.text+0x22): undefined reference to `register_virtio_driver' > `virtio_scmi_exit' referenced in section `.rodata' of drivers/firmware/arm_scmi/virtio.o: defined in discarded section `.exit.text' of drivers/firmware/arm_scmi/virtio.o This is due to the attached random config which sports: ARM_SCMI_PROTOCOL=y ARM_SCMI_TRANSPORT_VIRTIO=y while VIRTIO=m. It is really due to how Kconfig has been restructured previously by me in the scmi-virtio series in: e8419c24bace firmware: arm_scmi: Make SCMI transports configurable Since that commit, ARM_SCMI_TRANSPORT_* carry needed per-transport dependencies (like MAILBOX/VIRTIO), but ARM_SCMI_TRANSPORT_* are "bool" not "tristate", since they are meant to indicate if you want or not some specific transports supports to be built into the SCMI stack identified by ARM_SCMI_PROTOCOL: this latter, a tristate, is the only recognized entity at built time which includes (as a builtin or as a scmi-module.ko) all configured transports This intermediate ARM_SCMI_TRANSPORT_* bool cause the dependency on =m to be lost in ARM_SCMI_PROTOCOL (so you can have the SCMI stack with virtio transport as builtin (ARM_SCMI_PROTOCOL=y) while core VIRTIO=m...and everything breaks) I'm testing the snippet below, which seems to solve and support all the cases. A similar one would be needed for ARM_SCMI_TRANSPORT_MAILBOX to be sure. ARM_SCMI_TRANSPORT_SMC instead does not need, and should not use, this kind of fix being based on HAVE_ARM_SMCCC_DISCOVERY. Not sure if this is the proper way, but it's the only way I've found to make the above configs possible (or impossible) without drowning in circular dependencies. If nobody shout about this I'll post 2 patches along this lines to fix scmi virtio/mbox transport kconfig dependencies. Thanks, Cristian -----8< diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig index 7f4d2435503b..daa349615e91 100644 --- a/drivers/firmware/arm_scmi/Kconfig +++ b/drivers/firmware/arm_scmi/Kconfig @@ -4,6 +4,7 @@ menu "ARM System Control and Management Interface Protocol" config ARM_SCMI_PROTOCOL tristate "ARM System Control and Management Interface (SCMI) Message Protocol" depends on ARM || ARM64 || COMPILE_TEST + select VIRTIO if ARM_SCMI_TRANSPORT_VIRTIO help ARM System Control and Management Interface (SCMI) protocol is a set of operating system-independent software interfaces that are @@ -68,7 +69,6 @@ config ARM_SCMI_TRANSPORT_SMC config ARM_SCMI_TRANSPORT_VIRTIO bool "SCMI transport based on VirtIO" - depends on VIRTIO select ARM_SCMI_HAVE_TRANSPORT select ARM_SCMI_HAVE_MSG help