diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-09-08 09:03:38 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2025-09-15 10:29:59 -0600 |
commit | 031cdd3bc3f369553933c1b0f4cb18000162c8ff (patch) | |
tree | 2d7e42d969daa4fef256b27c681c342e9daaf23a /drivers/pwm/pwm-cros-ec.c | |
parent | 93cf798e761036ea357cae1e1c477f2afaa4b5f1 (diff) |
kunit: Enable PCI on UML without triggering WARN()
Various KUnit tests require PCI infrastructure to work. All normal
platforms enable PCI by default, but UML does not. Enabling PCI from
.kunitconfig files is problematic as it would not be portable. So in
commit 6fc3a8636a7b ("kunit: tool: Enable virtio/PCI by default on UML")
PCI was enabled by way of CONFIG_UML_PCI_OVER_VIRTIO=y. However
CONFIG_UML_PCI_OVER_VIRTIO requires additional configuration of
CONFIG_UML_PCI_OVER_VIRTIO_DEVICE_ID or will otherwise trigger a WARN() in
virtio_pcidev_init(). However there is no one correct value for
UML_PCI_OVER_VIRTIO_DEVICE_ID which could be used by default.
This warning is confusing when debugging test failures.
On the other hand, the functionality of CONFIG_UML_PCI_OVER_VIRTIO is not
used at all, given that it is completely non-functional as indicated by
the WARN() in question. Instead it is only used as a way to enable
CONFIG_UML_PCI which itself is not directly configurable.
Instead of going through CONFIG_UML_PCI_OVER_VIRTIO, introduce a custom
configuration option which enables CONFIG_UML_PCI without triggering
warnings or building dead code.
Link: https://lore.kernel.org/r/20250908-kunit-uml-pci-v2-1-d8eba5f73c9d@linutronix.de
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'drivers/pwm/pwm-cros-ec.c')
0 files changed, 0 insertions, 0 deletions