From: Cristian Marussi <cristian.marussi@arm.com>
To: kernel test robot <lkp@intel.com>
Cc: Igor Skalkin <igor.skalkin@opensynergy.com>,
kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Peter Hilber <peter.hilber@opensynergy.com>,
Arnd Bergmann <arnd@kernel.org>
Subject: Re: [linux-next:master 5053/7963] virtio.c:undefined reference to `virtio_check_driver_offered_feature'
Date: Mon, 16 Aug 2021 11:22:09 +0100 [thread overview]
Message-ID: <20210816102209.GY6592@e120937-lin> (raw)
In-Reply-To: <202108151230.lcHk2Pkk-lkp@intel.com>
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 <lkp@intel.com>
>
> 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
next prev parent reply other threads:[~2021-08-16 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-15 4:54 kernel test robot
2021-08-16 10:22 ` Cristian Marussi [this message]
2021-08-16 12:11 ` Arnd Bergmann
2021-08-16 13:05 ` Cristian Marussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210816102209.GY6592@e120937-lin \
--to=cristian.marussi@arm.com \
--cc=arnd@kernel.org \
--cc=igor.skalkin@opensynergy.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=peter.hilber@opensynergy.com \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox