Skip to content

Commit

Permalink
init/Kconfig: make COMPILE_TEST depend on !UML
Browse files Browse the repository at this point in the history
UML is a bit special since it does not have iomem nor dma.  That means a
lot of drivers will not build if they miss a dependency on HAS_IOMEM.
s390 used to have the same issues but since it gained PCI support UML is
the only stranger.

We are tired of patching dozens of new drivers after every merge window
just to un-break allmod/yesconfig UML builds.  One could argue that a
decent driver has to know on what it depends and therefore a missing
HAS_IOMEM dependency is a clear driver bug.  But the dependency not
obvious and not everyone does UML builds with COMPILE_TEST enabled when
developing a device driver.

A possible solution to make these builds succeed on UML would be
providing stub functions for ioremap() and friends which fail upon
runtime.  Another one is simply disabling COMPILE_TEST for UML.  Since
it is the least hassle and does not force use to fake iomem support
let's do the latter.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Richard Weinberger <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
richardweinberger authored and torvalds committed Aug 2, 2016
1 parent ca52953 commit bc083a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ config CROSS_COMPILE

config COMPILE_TEST
bool "Compile also drivers which will not load"
depends on !UML
default n
help
Some drivers can be compiled on a different platform than they are
Expand Down

0 comments on commit bc083a6

Please sign in to comment.