From: Masahiro Yamada <masahi...@kernel.org>

commit ea29b20a828511de3348334e529a3d046a180416 upstream.

I read the commit log of the following two:

- bc083a64b6c0 ("init/Kconfig: make COMPILE_TEST depend on !UML")
- 334ef6ed06fa ("init/Kconfig: make COMPILE_TEST depend on !S390")

Both are talking about HAS_IOMEM dependency missing in many drivers.

So, 'depends on HAS_IOMEM' seems the direct, sensible solution to me.

This does not change the behavior of UML. UML still cannot enable
COMPILE_TEST because it does not provide HAS_IOMEM.

The current dependency for S390 is too strong. Under the condition of
CONFIG_PCI=y, S390 provides HAS_IOMEM, hence can enable COMPILE_TEST.

I also removed the meaningless 'default n'.

Link: https://lkml.kernel.org/r/20210224140809.1067582-1-masahi...@kernel.org
Signed-off-by: Masahiro Yamada <masahi...@kernel.org>
Cc: Heiko Carstens <h...@linux.ibm.com>
Cc: Guenter Roeck <li...@roeck-us.net>
Cc: Arnd Bergmann <a...@kernel.org>
Cc: Kees Cook <keesc...@chromium.org>
Cc: Daniel Borkmann <dan...@iogearbox.net>
Cc: Johannes Weiner <han...@cmpxchg.org>
Cc: KP Singh <kpsi...@google.com>
Cc: Nathan Chancellor <nat...@kernel.org>
Cc: Nick Terrell <terre...@fb.com>
Cc: Quentin Perret <qper...@google.com>
Cc: Valentin Schneider <valentin.schnei...@arm.com>
Cc: "Enrico Weigelt, metux IT consult" <l...@metux.net>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
Signed-off-by: Linus Torvalds <torva...@linux-foundation.org>
Cc: Guenter Roeck <li...@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 init/Kconfig |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/init/Kconfig
+++ b/init/Kconfig
@@ -65,8 +65,7 @@ config CROSS_COMPILE
 
 config COMPILE_TEST
        bool "Compile also drivers which will not load"
-       depends on !UML && !S390
-       default n
+       depends on HAS_IOMEM
        help
          Some drivers can be compiled on a different platform than they are
          intended to be run on. Despite they cannot be loaded there (or even


Reply via email to