linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-pwm@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Richard Weinberger <richard@nod.at>,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-mediatek@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org, kernel@pengutronix.de,
	linux-amlogic@lists.infradead.org, linux-tegra@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-riscv@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] pwm: Enable compile testing for some of drivers
Date: Tue, 7 Jan 2020 13:09:26 +0100	[thread overview]
Message-ID: <20200107120926.cgrxk6b4rchf6i42@pengutronix.de> (raw)
In-Reply-To: <20200107115429.GA32632@pi3>

Hello Krzysztof,

On Tue, Jan 07, 2020 at 12:54:29PM +0100, Krzysztof Kozlowski wrote:
> On Tue, Jan 07, 2020 at 12:33:54PM +0100, Uwe Kleine-König wrote:
> > On Tue, Jan 07, 2020 at 12:03:59PM +0100, Krzysztof Kozlowski wrote:
> > > On Tue, Jan 07, 2020 at 11:42:34AM +0100, Uwe Kleine-König wrote:
> > > > > I guess other solution would be to add stubs for few clk functions...
> > > > > 
> > > > > > Also HAS_IOMEM is a typical requirement, but I tested with an ARCH=um
> > > > > > config (which does't have HAS_IOMEM) and they all compile fine.
> > > > > 
> > > > > Because of !HAS_IOMEM, since some time ARCH=um does not support
> > > > > COMPILE_TEST. Therefore HAS_IOMEM dependency is not needed for compile
> > > > > testing (and for regular build it is selected by ARCH).
> > > > 
> > > > Hehe, I didn't notice because for testing I just dropped the "depends on
> > > > ..." lines in Kconfig instead of adding "|| COMPILE_TEST" :-) Still they
> > > > compile fine on UML.
> > > > 
> > > > Ah, since bc083a64b6c0 ("init/Kconfig: make COMPILE_TEST depend on
> > > > !UML") == v4.8-rc1~52^2~83 COMPILE_TEST cannot be enabled on UML, but
> > > > later 1bcbfbfdeb00 ("um: add dummy ioremap and iounmap functions")
> > > > == v4.13-rc1~8^2~6 UM got a dummy implementation. So maybe we could
> > > > revert bc083a64b6c0 today? (And if not, a comment about why near the
> > > > "depends on !UML" in init/Kconfig would be great.)
> > > > 
> > > > Orthogonal to that, I wonder if depending on HAS_IOMEM is right even
> > > > though the compile testers won't notice it missing. Or should HAS_IOMEM
> > > > be dropped?
> > > 
> > > I think yes, it can be dropped, but this would require:
> > > 1. Fixing any dependencies on HAS_IOMEM, e.g.:
> > >     WARNING: unmet direct dependencies detected for MFD_SYSCON
> > >       Depends on [n]: HAS_IOMEM [=n]
> > >       Selected by [y]:
> > >       - PHY_DA8XX_USB [=y] && (ARCH_DAVINCI_DA8XX || COMPILE_TEST [=y])
> > 
> > I don't understand that warning. What did you modify to trigger that?
> > Probably related to the big "if HAS_IOMEM" in drivers/mfd/Kconfig?!
> 
> OK, that's actually from my other patch to illustrate the problem:
> https://lore.kernel.org/linux-arm-kernel/20200103164710.4829-2-krzk@kernel.org/
> 
> After reverting of bc083a64b6c0, every driver that selects MFD_SYSCON
> (or some other parts) has to depend on HAS_IOMEM.

OK, understood, thanks.

> > > 2. Checking if all of stubs are implemented (not only IOMEM but maybe
> > >    DMA as well). Also 1bcbfbfdeb00 brought only few stubs. Still we
> > >    need devm_ioremap_resource() and others.
> > 
> > A problem is that it's unclear (to me at least) what the presence of
> > HAS_IOMEM actually implies. I thought it's about ioremap + readl +
> > writel (including their respective variants). Does it really include dma
> > stuff, too?
> > 
> > > Quick test shows mentioned "unmet direct dependencies" and:
> > >     phy-pxa-usb.c:(.text+0x2f5): undefined reference to `devm_ioremap_resource'
> > >     dma-iommu.c:(.text+0x179): undefined reference to `dma_pgprot'
> > 
> > dma_pgprot seems to depend on HAS_DMA though, not HAS_IOMEM.
> > 
> > (Oh, HAS_DMA is defined using "depends on !NO_DMA" + "default y".
> > NO_DMA has three different definitions. Two of them (in
> > drivers/crypto/ccree/cc_hw_queue_defs.h and arch/arm/include/asm/dma.h)
> > unrelated.)
> 
> Yes, HAS_DMA is the second missing piece for UM.

So something like:

	# Usermode linux doesn't provide HAS_DMA and HAS_IOMEM.  To not have to
	# clutter most dependencies with these just exclude UML from compile
	# testing.

as comment for COMPILE_TEST's depend line should be fine, right?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |


  reply	other threads:[~2020-01-07 12:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30 17:21 [PATCH 1/2] pwm: Fix minor Kconfig whitespace issues Krzysztof Kozlowski
2019-12-30 17:21 ` [PATCH 2/2] pwm: Enable compile testing for some of drivers Krzysztof Kozlowski
2019-12-30 19:30   ` Florian Fainelli
2019-12-31 14:52   ` Martin Blumenstingl
2020-01-06  9:53   ` Claudiu.Beznea
2020-01-07  7:26   ` Uwe Kleine-König
2020-01-07  8:25     ` Krzysztof Kozlowski
2020-01-07 10:42       ` Uwe Kleine-König
2020-01-07 11:03         ` Krzysztof Kozlowski
2020-01-07 11:33           ` Uwe Kleine-König
2020-01-07 11:54             ` Krzysztof Kozlowski
2020-01-07 12:09               ` Uwe Kleine-König [this message]
2020-01-07 12:15                 ` Krzysztof Kozlowski
2020-01-08 13:00 ` [PATCH 1/2] pwm: Fix minor Kconfig whitespace issues Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200107120926.cgrxk6b4rchf6i42@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).