Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp166438ybl; Tue, 7 Jan 2020 04:11:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwFrAL9GM3CDcgn4bjQBYLAGOY0y/QOLNoRplSyeIOgurdQXADd6y/JrKfP4S40o9ua+9PD X-Received: by 2002:a05:6830:20cf:: with SMTP id z15mr121585737otq.277.1578399086929; Tue, 07 Jan 2020 04:11:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578399086; cv=none; d=google.com; s=arc-20160816; b=C4/r4jP+dc42AGnwg1UYP3wQxSFC5mBtVJmtgZEgQRoEbTj5nqLJnggEfm6Zma7ACe nC3DVyIvKRsljVBCSXw750BgKovGEZqOchNqgVvmIBmcvJvXH0sX0OOidcVlgEXq0u+E cayVlI6WfIG7sHctYQ5rY/omZBjmOFUmcYFOd4hjK8ew1cu0R2d5fliLSXCp0hxp3ssI eXXi2QKbTaarQccs5+5l/Sanh2QwNxITnjEn8atWl5J//TOtNEWEvFZyNv4AcQ6ajbrw 9AgIcaRGd7z1DkaeluETa6FR2peS+RrCbkD/9vRgvNLxq7YbxXqbw2ZGW1z3GuIUq17A VXqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=qJud/CDl2kyg7TYS6VtWU1bT9qMNZvWIPdeZu5bukxo=; b=d+lNuZejUxC5NNMFHmF9LdZ4A89UY8XGZpNB0hpVLu/9hsZBxs5LP+/evQWgeFqrDI dY6CL29vQWfUn9iE70SlrspH1gCKcVHcZ9Xn/6I99w3WharMBYt1UYk5zd60vEpwYJrU f/SlsisM71PtyFUlOtYSE1R8EqRs+qVN3zw5/2gGNdAc+Ofnrfwo++ybnGhaz1VJQKEJ aDg3xo0COueoaB/Eq7YkYzpnyGEoOvFvRLtth6fHLRcyALMzydAOaLElf4ISnZGRmilo +Cl4A2D2kH99UTB92qZnZq/+rIBDldExoK2gvcVjI5Y5rjx/4deP1IOf1ItmV0+KDUjr 8pzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w29si43119764oth.313.2020.01.07.04.11.14; Tue, 07 Jan 2020 04:11:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727965AbgAGMJb (ORCPT + 99 others); Tue, 7 Jan 2020 07:09:31 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:54203 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbgAGMJb (ORCPT ); Tue, 7 Jan 2020 07:09:31 -0500 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ionfq-00078D-RH; Tue, 07 Jan 2020 13:09:26 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1ionfq-0001sM-8J; Tue, 07 Jan 2020 13:09:26 +0100 Date: Tue, 7 Jan 2020 13:09:26 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Krzysztof Kozlowski Cc: linux-pwm@vger.kernel.org, Arnd Bergmann , Richard Weinberger , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Thierry Reding , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, kernel@pengutronix.de, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, 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 Message-ID: <20200107120926.cgrxk6b4rchf6i42@pengutronix.de> References: <20191230172113.17222-1-krzk@kernel.org> <20191230172113.17222-2-krzk@kernel.org> <20200107072645.ko247bwhh3ibdu73@pengutronix.de> <20200107082539.GA31827@pi3> <20200107104234.wq74fska3szrg4ii@pengutronix.de> <20200107110359.GA32423@pi3> <20200107113354.ggq6zarewq5ip354@pengutronix.de> <20200107115429.GA32632@pi3> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200107115429.GA32632@pi3> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/ |