Re: [PATCH] init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
From: Guenter Roeck
Date: Wed Feb 24 2021 - 11:24:50 EST
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