net: liquidio: fix mixed module-builtin object

With CONFIG_LIQUIDIO=m and CONFIG_LIQUIDIO_VF=y (or vice versa),
$(common-objs) are linked to a module and also to vmlinux even though
the expected CFLAGS are different between builtins and modules.

This is the same situation as fixed by commit 637a642f5c ("zstd:
Fixing mixed module-builtin objects").

Introduce the new module, liquidio-core, to provide the common functions
to liquidio and liquidio-vf.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Masahiro Yamada
2023-06-07 02:18:49 +09:00
committed by David S. Miller
parent 0824a987a5
commit f71be9d084
14 changed files with 89 additions and 3 deletions

View File

@@ -62,6 +62,9 @@ config CAVIUM_PTP
Precision Time Protocol or other purposes. Timestamps can be used in
BGX, TNS, GTI, and NIC blocks.
config LIQUIDIO_CORE
tristate
config LIQUIDIO
tristate "Cavium LiquidIO support"
depends on 64BIT && PCI
@@ -69,6 +72,7 @@ config LIQUIDIO
depends on PTP_1588_CLOCK_OPTIONAL
select FW_LOADER
select LIBCRC32C
select LIQUIDIO_CORE
select NET_DEVLINK
help
This driver supports Cavium LiquidIO Intelligent Server Adapters
@@ -92,6 +96,7 @@ config LIQUIDIO_VF
tristate "Cavium LiquidIO VF support"
depends on 64BIT && PCI_MSI
depends on PTP_1588_CLOCK_OPTIONAL
select LIQUIDIO_CORE
help
This driver supports Cavium LiquidIO Intelligent Server Adapter
based on CN23XX chips.