All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
@ 2021-02-24 14:08 Masahiro Yamada
  2021-02-24 15:58 ` Enrico Weigelt, metux IT consult
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2021-02-24 14:08 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: linux-kernel, Guenter Roeck, Arnd Bergmann, Kees Cook,
	Masahiro Yamada, Andrew Morton, Daniel Borkmann, Johannes Weiner,
	KP Singh, Nathan Chancellor, Nick Terrell, Quentin Perret,
	Valentin Schneider

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'.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 init/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index ba8bd5256980..2ff0b5a50736 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -113,8 +113,7 @@ config INIT_ENV_ARG_LIMIT
 
 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
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
  2021-02-24 14:08 [PATCH] init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM Masahiro Yamada
@ 2021-02-24 15:58 ` Enrico Weigelt, metux IT consult
  2021-02-24 16:23   ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2021-02-24 15:58 UTC (permalink / raw)
  To: Masahiro Yamada, Heiko Carstens
  Cc: linux-kernel, Guenter Roeck, Arnd Bergmann, Kees Cook,
	Andrew Morton, Daniel Borkmann, Johannes Weiner, KP Singh,
	Nathan Chancellor, Nick Terrell, Quentin Perret,
	Valentin Schneider

On 24.02.21 15:08, Masahiro Yamada wrote:
> 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.

I don't like idea of hidden indirect dependencies. If a driver needs
iomem, then it should depend on it. Yes, a lot of drivers might need
to be fixed, but IMHO we should do that, instead of covering 'em up.


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
  2021-02-24 15:58 ` Enrico Weigelt, metux IT consult
@ 2021-02-24 16:23   ` Guenter Roeck
  2021-03-18 19:38     ` Enrico Weigelt, metux IT consult
  0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2021-02-24 16:23 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult, Masahiro Yamada, Heiko Carstens
  Cc: linux-kernel, Arnd Bergmann, Kees Cook, Andrew Morton,
	Daniel Borkmann, Johannes Weiner, KP Singh, Nathan Chancellor,
	Nick Terrell, Quentin Perret, Valentin Schneider

On 2/24/21 7:58 AM, Enrico Weigelt, metux IT consult wrote:
> On 24.02.21 15:08, Masahiro Yamada wrote:
>> 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.
> 
> I don't like idea of hidden indirect dependencies. If a driver needs
> iomem, then it should depend on it. Yes, a lot of drivers might need
> to be fixed, but IMHO we should do that, instead of covering 'em up.
> 

Unfortunately that does not reflect reality, which was the reason
for the above two commits. Problem here is that the cost is not paid
by the driver authors, but by architectures which don't support HAS_IOMEM,
specifically s390. Driver authors tend to enable COMPILE_TEST but never
test on a system with HAS_IOMEM=n (and/or ignore test results provided by
build robots).

To a lesser degree, we see the same happen with 32-bit targets. Driver
authors often don't compile their drivers in 32-bit mode (just look
at 32-bit i386 builds in next-20210224 to see an example). Then it is
often up to others to track down and fix the problems. Fortunately,
there are still more than a few people who are still interested in
32-bit builds, and problems with those builds tend to get fixed quickly.
This is not the case with HAS_IOMEM related issues, where the burden
is on very few people.

With that in mind, the dependency introduced with this patch seems
to be a workable workaround.

Thanks,
Guenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
  2021-02-24 16:23   ` Guenter Roeck
@ 2021-03-18 19:38     ` Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2021-03-18 19:38 UTC (permalink / raw)
  To: Guenter Roeck, Masahiro Yamada, Heiko Carstens
  Cc: linux-kernel, Arnd Bergmann, Kees Cook, Andrew Morton,
	Daniel Borkmann, Johannes Weiner, KP Singh, Nathan Chancellor,
	Nick Terrell, Quentin Perret, Valentin Schneider

On 24.02.21 17:23, Guenter Roeck wrote:

> Unfortunately that does not reflect reality, which was the reason
> for the above two commits. Problem here is that the cost is not paid
> by the driver authors, but by architectures which don't support HAS_IOMEM,
> specifically s390. Driver authors tend to enable COMPILE_TEST but never
> test on a system with HAS_IOMEM=n (and/or ignore test results provided by
> build robots).

Still, I believe the bug should be fixed at the source.

Maybe these bots do so much traffic that nobody really cares about them.
Do they directly address the author and the corresponding maintainer ?
(if that ever happens to one of my drivers, please let me know)

> To a lesser degree, we see the same happen with 32-bit targets. Driver
> authors often don't compile their drivers in 32-bit mode (just look
> at 32-bit i386 builds in next-20210224 to see an example). Then it is
> often up to others to track down and fix the problems. Fortunately,
> there are still more than a few people who are still interested in
> 32-bit builds, and problems with those builds tend to get fixed quickly.
> This is not the case with HAS_IOMEM related issues, where the burden
> is on very few people.

Could we set up a separate build bot for those configurations, with a
different from: address and an a special warning text, so maintainers
quickly see they *should* pay attention.

IMHO, this is primarily a problem of handling the massive traffic
on lkml and sorting out whats relevant for oneself.



--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-18 19:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 14:08 [PATCH] init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM Masahiro Yamada
2021-02-24 15:58 ` Enrico Weigelt, metux IT consult
2021-02-24 16:23   ` Guenter Roeck
2021-03-18 19:38     ` Enrico Weigelt, metux IT consult

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.