Skip to content

Commit 27d9839

Browse files
arndbmstsirkin
authored andcommitted
virtio: always enter drivers/virtio/
When neither VIRTIO_PCI_LIB nor VIRTIO are enabled, but the alibaba vdpa driver is, the kernel runs into a link error because the legacy virtio module never gets built: x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_features': eni_vdpa.c:(.text+0x23f): undefined reference to `vp_legacy_set_features' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_state': eni_vdpa.c:(.text+0x2fe): undefined reference to `vp_legacy_get_queue_enable' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_address': eni_vdpa.c:(.text+0x376): undefined reference to `vp_legacy_set_queue_address' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_set_vq_ready': eni_vdpa.c:(.text+0x3b4): undefined reference to `vp_legacy_set_queue_address' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_free_irq': eni_vdpa.c:(.text+0x460): undefined reference to `vp_legacy_queue_vector' x86_64-linux-ld: eni_vdpa.c:(.text+0x4b7): undefined reference to `vp_legacy_config_vector' x86_64-linux-ld: drivers/vdpa/alibaba/eni_vdpa.o: in function `eni_vdpa_reset': When VIRTIO_PCI_LIB was added, it was correctly added to drivers/Makefile as well, but for the legacy module, this is missing. Solve this by always entering drivers/virtio during the build and letting its Makefile take care of the individual options, rather than having a separate line for each sub-option. Fixes: 64b9f64 ("vdpa: introduce virtio pci driver") Fixes: e85087b ("eni_vdpa: add vDPA driver for Alibaba ENI") Fixes: d89c816 ("virtio-pci: introduce legacy device module") Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent dc1db00 commit 27d9839

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ obj-$(CONFIG_DMADEVICES) += dma/
4141
# SOC specific infrastructure drivers.
4242
obj-y += soc/
4343

44-
obj-$(CONFIG_VIRTIO) += virtio/
45-
obj-$(CONFIG_VIRTIO_PCI_LIB) += virtio/
44+
obj-y += virtio/
4645
obj-$(CONFIG_VDPA) += vdpa/
4746
obj-$(CONFIG_XEN) += xen/
4847

0 commit comments

Comments
 (0)