This patchset fixes a compilation failure if CONFIG_VMAPPLE is enabled in a Rust build, which happens because hw/vmapple/Kconfig didn't have the "pick the Rust PL011 if Rust is enabled" logic in it. Rather than just adding that to yet another PL011-using board model, this patchset refactors how we handle devices which have both a Rust and C implementation in Kconfig: * CONFIG_PL011 is "do we have/want a PL011 of some kind" * CONFIG_PL011_C is the C impl * CONFIG_X_PL011_RUST is the rust impl * selecting CONFIG_PL011 pulls in one impl or the other depending on whether the build has Rust enabled or not
For the PL011, this lets us drop a lot of duplicate logic in Kconfig files for boards; for HPET this simplifies places in code that have ifdefs for "do we have an HPET?". NB: I think this should be OK but haven't been able to do complete testing because currently in head-of-git "make check-functional" doesn't pass for arm with Rust enabled due to a different issue. thanks -- PMM Peter Maydell (2): rust: Kconfig: Factor out whether PL011 is Rust or C rust: Kconfig: Factor out whether HPET is Rust or C configs/devices/i386-softmmu/default.mak | 1 - hw/i386/fw_cfg.c | 2 +- hw/i386/pc.c | 2 +- hw/arm/Kconfig | 30 ++++++++---------------- hw/char/Kconfig | 6 +++++ hw/char/meson.build | 2 +- hw/timer/Kconfig | 8 ++++++- hw/timer/meson.build | 2 +- rust/hw/timer/Kconfig | 1 - tests/qtest/meson.build | 3 +-- 10 files changed, 28 insertions(+), 29 deletions(-) -- 2.43.0