All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Sudeep Holla <sudeep.holla@arm.com>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Igor Skalkin <igor.skalkin@opensynergy.com>,
	Peter Hilber <peter.hilber@opensynergy.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] firmware: arm_scmi: fix VIRTIO dependency
Date: Mon, 20 Sep 2021 12:02:51 +0200	[thread overview]
Message-ID: <20210920100301.1466486-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

Building with CONFIG_VIRTIO=m but CONFIG_ARM_SCMI_PROTOCOL=y leads to
a link error for the scmi virtio transport:

arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_send_message':
virtio.c:(.text+0x200): undefined reference to `virtqueue_add_sgs'
arm-linux-gnueabi-ld: virtio.c:(.text+0x280): undefined reference to `virtqueue_kick'
arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/virtio.o: in function `scmi_vio_feed_vq_rx':
virtio.c:(.text+0x390): undefined reference to `virtqueue_add_inbuf'
arm-linux-gnueabi-ld: virtio.c:(.text+0x3dc): undefined reference to `virtqueue_kick'
arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_scmi_exit':
virtio.c:(.text+0x538): undefined reference to `unregister_virtio_driver'
arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_chan_available':

Prevent this configuration by making the Kconfig dependency a bit
stricter.

Fixes: 46abe13b5e3d ("firmware: arm_scmi: Add virtio transport")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/firmware/arm_scmi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig
index 7f4d2435503b..3d7081e84853 100644
--- a/drivers/firmware/arm_scmi/Kconfig
+++ b/drivers/firmware/arm_scmi/Kconfig
@@ -68,7 +68,7 @@ config ARM_SCMI_TRANSPORT_SMC
 
 config ARM_SCMI_TRANSPORT_VIRTIO
 	bool "SCMI transport based on VirtIO"
-	depends on VIRTIO
+	depends on VIRTIO=y || VIRTIO=ARM_SCMI_PROTOCOL
 	select ARM_SCMI_HAVE_TRANSPORT
 	select ARM_SCMI_HAVE_MSG
 	help
-- 
2.29.2


WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: Sudeep Holla <sudeep.holla@arm.com>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Igor Skalkin <igor.skalkin@opensynergy.com>,
	Peter Hilber <peter.hilber@opensynergy.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] firmware: arm_scmi: fix VIRTIO dependency
Date: Mon, 20 Sep 2021 12:02:51 +0200	[thread overview]
Message-ID: <20210920100301.1466486-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

Building with CONFIG_VIRTIO=m but CONFIG_ARM_SCMI_PROTOCOL=y leads to
a link error for the scmi virtio transport:

arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_send_message':
virtio.c:(.text+0x200): undefined reference to `virtqueue_add_sgs'
arm-linux-gnueabi-ld: virtio.c:(.text+0x280): undefined reference to `virtqueue_kick'
arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/virtio.o: in function `scmi_vio_feed_vq_rx':
virtio.c:(.text+0x390): undefined reference to `virtqueue_add_inbuf'
arm-linux-gnueabi-ld: virtio.c:(.text+0x3dc): undefined reference to `virtqueue_kick'
arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_scmi_exit':
virtio.c:(.text+0x538): undefined reference to `unregister_virtio_driver'
arm-linux-gnueabi-ld: drivers/firmware/arm_scmi/virtio.o: in function `virtio_chan_available':

Prevent this configuration by making the Kconfig dependency a bit
stricter.

Fixes: 46abe13b5e3d ("firmware: arm_scmi: Add virtio transport")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/firmware/arm_scmi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig
index 7f4d2435503b..3d7081e84853 100644
--- a/drivers/firmware/arm_scmi/Kconfig
+++ b/drivers/firmware/arm_scmi/Kconfig
@@ -68,7 +68,7 @@ config ARM_SCMI_TRANSPORT_SMC
 
 config ARM_SCMI_TRANSPORT_VIRTIO
 	bool "SCMI transport based on VirtIO"
-	depends on VIRTIO
+	depends on VIRTIO=y || VIRTIO=ARM_SCMI_PROTOCOL
 	select ARM_SCMI_HAVE_TRANSPORT
 	select ARM_SCMI_HAVE_MSG
 	help
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-09-20 10:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 10:02 Arnd Bergmann [this message]
2021-09-20 10:02 ` [PATCH 1/2] firmware: arm_scmi: fix VIRTIO dependency Arnd Bergmann
2021-09-20 10:02 ` [PATCH 2/2] firmware: arm_scmi: remove __exit annotation Arnd Bergmann
2021-09-20 10:02   ` Arnd Bergmann
2021-09-20 11:06   ` Sudeep Holla
2021-09-20 11:06     ` Sudeep Holla
2021-09-20 10:48 ` [PATCH 1/2] firmware: arm_scmi: fix VIRTIO dependency Sudeep Holla
2021-09-20 10:48   ` Sudeep Holla

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=20210920100301.1466486-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=cristian.marussi@arm.com \
    --cc=igor.skalkin@opensynergy.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.