Alexandre Courbot
2025-Nov-05 08:03 UTC
[PATCH v2 0/3] firmware_loader: make RUST_FW_LOADER_ABSTRACTIONS select FW_LOADER
I have noticed that build fails when doing the following:
- Start with the x86 defconfig,
- Using nconfig, enable `CONFIG_RUST` and `CONFIG_DRM_NOVA`,
- Start building.
The problem is that `CONFIG_RUST_FW_LOADER_ABSTRACTIONS` remains
unselected, despite it being a dependency of `CONFIG_NOVA_CORE`. This
seems to happen because `CONFIG_DRM_NOVA` selects `CONFIG_NOVA_CORE`.
Fix this by making `CONFIG_RUST_FW_LOADER_ABSTRACTIONS` select
`CONFIG_FW_LOADER`, and by transition make all users of
`CONFIG_RUST_FW_LOADER_ABSTRACTIONS` (so far, nova-core and net/phy)
select it as well.
`CONFIG_FW_LOADER` is more often selected than depended on, so this
seems to make sense generally speaking.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
Changes in v2:
- Split into 3 patches.
- Link to v1:
https://lore.kernel.org/r/20251104-b4-select-rust-fw-v1-1-afea175dba22 at
nvidia.com
---
Alexandre Courbot (3):
firmware_loader: make RUST_FW_LOADER_ABSTRACTIONS select FW_LOADER
gpu: nova-core: select RUST_FW_LOADER_ABSTRACTIONS
net: phy: select RUST_FW_LOADER_ABSTRACTIONS
drivers/base/firmware_loader/Kconfig | 2 +-
drivers/gpu/nova-core/Kconfig | 2 +-
drivers/net/phy/Kconfig | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
base-commit: 6553a8f168fb7941ae73d39eccac64f3a2b9b399
change-id: 20251104-b4-select-rust-fw-aeb1e46bcee9
Best regards,
--
Alexandre Courbot <acourbot at nvidia.com>
Alexandre Courbot
2025-Nov-05 08:03 UTC
[PATCH v2 1/3] firmware_loader: make RUST_FW_LOADER_ABSTRACTIONS select FW_LOADER
The use of firmware_loader is an implementation detail of drivers rather
than a dependency. FW_LOADER is typically selected rather than depended
on; the Rust abstractions should do the same thing.
Fixes: de6582833db0 ("rust: add firmware abstractions")
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drivers/base/firmware_loader/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/firmware_loader/Kconfig
b/drivers/base/firmware_loader/Kconfig
index 752b9a9bea03..0e6c1343409e 100644
--- a/drivers/base/firmware_loader/Kconfig
+++ b/drivers/base/firmware_loader/Kconfig
@@ -38,7 +38,7 @@ config FW_LOADER_DEBUG
config RUST_FW_LOADER_ABSTRACTIONS
bool "Rust Firmware Loader abstractions"
depends on RUST
- depends on FW_LOADER=y
+ select FW_LOADER=y
help
This enables the Rust abstractions for the firmware loader API.
--
2.51.2
Alexandre Courbot
2025-Nov-05 08:03 UTC
[PATCH v2 2/3] gpu: nova-core: select RUST_FW_LOADER_ABSTRACTIONS
RUST_FW_LOADER_ABSTRACTIONS was depended on by NOVA_CORE, but NOVA_CORE
is selected by DRM_NOVA. This creates a situation where, if DRM_NOVA is
selected, NOVA_CORE gets enabled but not RUST_FW_LOADER_ABSTRACTIONS,
which results in a build error.
Since the firmware loader is an implementation detail of the driver, it
should be enabled along with it, so change the "depends on" to a
"select".
Fixes: 54e6baf123fd ("gpu: nova-core: add initial driver stub")
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drivers/gpu/nova-core/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig
index 20d3e6d0d796..527920f9c4d3 100644
--- a/drivers/gpu/nova-core/Kconfig
+++ b/drivers/gpu/nova-core/Kconfig
@@ -3,7 +3,7 @@ config NOVA_CORE
depends on 64BIT
depends on PCI
depends on RUST
- depends on RUST_FW_LOADER_ABSTRACTIONS
+ select RUST_FW_LOADER_ABSTRACTIONS
select AUXILIARY_BUS
default n
help
--
2.51.2
Alexandre Courbot
2025-Nov-05 08:03 UTC
[PATCH v2 3/3] net: phy: select RUST_FW_LOADER_ABSTRACTIONS
The use of firmware_loader is an implementations detail of the driver,
so it should be enabled along with it. The non-Rust option FW_LOADER is
typically selected rather than depended on, let's make the Rust
abstraction behave the same.
Fixes: fd3eaad826da ("net: phy: add Applied Micro QT2025 PHY driver")
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drivers/net/phy/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 98700d069191..d4987fc6b26c 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -132,7 +132,7 @@ config ADIN1100_PHY
config AMCC_QT2025_PHY
tristate "AMCC QT2025 PHY"
depends on RUST_PHYLIB_ABSTRACTIONS
- depends on RUST_FW_LOADER_ABSTRACTIONS
+ select RUST_FW_LOADER_ABSTRACTIONS
help
Adds support for the Applied Micro Circuits Corporation QT2025 PHY.
--
2.51.2