Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5551338ybi; Tue, 4 Jun 2019 08:19:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyp2n/5umi0uFmJ/k4FvcdGG447XagluLNvp7xwiVjkTaieg2xz3AiYXR18tOKA9hbepFgR X-Received: by 2002:a17:90a:20e7:: with SMTP id f94mr29246418pjg.68.1559661548781; Tue, 04 Jun 2019 08:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559661548; cv=none; d=google.com; s=arc-20160816; b=dI2HpSQ0PwBULgSFcH1JzcamRMqiB7N53KudcDU11uXglGa5Yj7l0O5C8MCbCK/Tbs Lp1YJ7vMiXmGspq/7+Phg9/ftw2uZpMwlkcSQXdB85hmDyi0jBzLgjSE6G2is7yi1Loo xMK8ub6xvVWhOqDeLMgNbvuRP7Y17th2Qo7toxed9glvICVG1T7UQL+IpMOanFUwSqkV zMVQw+2838yoXDFmdSBTlnlD7uls3qbvM+EbdzWNhecc5oRfL4aRki9jS+fohMar9xM8 k22+sRy9nOruYUVngK3mtNvYGyrcknUbBbja80YZnmugPrv+y02PP21zQKa9LOATtRAO 5Zfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=dqsJKzxhe80xvf5e11Y99K/RlIOiTj57Fl1tDHoqcJY=; b=pyD5xN5pNH76FQgjBv3UkYAEvd95z807DLZQBs0KgJkBCYanVXJ9zDLUE6n5fgdvsj pOYFogbhBX4NaBA9QfcTgG6r3fTUQsLLUwYZflH1JcKWGUNF2VLR13IIYK/Wm5gkzODl m+JCT6ERD3VVmdVZjb8QtQ7mSpBiY+ddFFZiggVYqxh3c6VGpya9uG/liIIVzmkTE3VB rKAnAIb4canHikwnUJ3lN1VwqEOmwUm0rSNu1SomcHM1mlYCbYoARgs7yYT5P6lw4GvM bDI41rQ+2dSgOfk0S93dHZT7mAQF3Js20WlOAXH3OJS+XKEZH8u6dMz7y8tozmtySi6D 1HPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Z9EC/wHs"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si1199614plx.242.2019.06.04.08.18.50; Tue, 04 Jun 2019 08:19:08 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Z9EC/wHs"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728031AbfFDPPn (ORCPT + 99 others); Tue, 4 Jun 2019 11:15:43 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:43166 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727947AbfFDPPm (ORCPT ); Tue, 4 Jun 2019 11:15:42 -0400 Received: by mail-lf1-f68.google.com with SMTP id j29so2834560lfk.10; Tue, 04 Jun 2019 08:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dqsJKzxhe80xvf5e11Y99K/RlIOiTj57Fl1tDHoqcJY=; b=Z9EC/wHs4twCaHh7hj1ljtETiisVZ7buWrCY9QRqMW88GgnAa3wTunzZlleg7pNvsq DKwxcqr62xjN0sICdxWiwpTIrZMppBfgWYEhecXE8f/Oj7JWvZ06xTX6ncOI0vSr2yRX ydEx3617QoZpVPPrHuTZtBpb89HJMRoO1IadzjswrJu9HvpP/j6lw0izfsrfkyBjpltC mEU4DVLXMPhHeUtt4Ch3lOvz5z2uWz4OIeYJiC8WudrhkJUZ4ns8nwWhiUbpS/dTDD8m I65uOaiuqi/H+JcAnbkOaOyAxkHiZxhPBupvUPfHaNgZt8l54qNiuwKg3RDCG0oEOI8A En3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dqsJKzxhe80xvf5e11Y99K/RlIOiTj57Fl1tDHoqcJY=; b=WdAOIsCDAedXIoA9PjeoH8bxTXrQhBerWf+YIVa4fvbs17GM84+xSwLf6jXCqihkZj 3mrtqLXdUYSjuSsQiiaEYKNDYYQbofUj2pjspQv/VLu4jQftnzpAg1zyulbDJDeoLkb6 kUZO0sFhiE3+tn8lbMNRnANDnd62CrPw4oh5nYhcXCaGlSjc750guyPgyXSTv8RJbHMn hbYVTT/CFAa/bDdFcsmiMMj3NgzbD1H6QkHyIQNVEhGSTuI7cnQpaYFZ9AJ0FMmk9Lrw 0EzvcEmuFhprH5Rxe50hOQcsrzYuFHktIb3hfNexWdyNqn8jwjtON6sO3BxCfjrgEs9H VZQg== X-Gm-Message-State: APjAAAXtaQ1sRWC+0yDicnfOQrXaVGvFdXKjc1IDLGlKsF5fhWH3fjVG PmYLI05xgKUdjZfvAzR67IKj0iHi X-Received: by 2002:a19:5515:: with SMTP id n21mr10561863lfe.26.1559661339169; Tue, 04 Jun 2019 08:15:39 -0700 (PDT) Received: from [192.168.2.145] ([94.29.35.141]) by smtp.googlemail.com with ESMTPSA id l15sm3833814lji.5.2019.06.04.08.15.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2019 08:15:37 -0700 (PDT) Subject: Re: [PATCH v4 14/16] PM / devfreq: tegra: Enable COMPILE_TEST for the driver To: Thierry Reding Cc: Jonathan Hunter , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Tomeu Vizoso , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190501233815.32643-1-digetx@gmail.com> <20190501233815.32643-15-digetx@gmail.com> <20190604112026.GN16519@ulmo> <20190604141031.GB397@ulmo> <20190604141824.GC397@ulmo> <02a6651f-17f3-2e79-7780-57657596ba23@gmail.com> <20190604145004.GA3208@ulmo> From: Dmitry Osipenko Message-ID: Date: Tue, 4 Jun 2019 18:15:36 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190604145004.GA3208@ulmo> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 04.06.2019 17:50, Thierry Reding пишет: > On Tue, Jun 04, 2019 at 05:41:53PM +0300, Dmitry Osipenko wrote: >> 04.06.2019 17:18, Thierry Reding пишет: >>> On Tue, Jun 04, 2019 at 04:10:31PM +0200, Thierry Reding wrote: >>>> On Tue, Jun 04, 2019 at 04:53:17PM +0300, Dmitry Osipenko wrote: >>>>> 04.06.2019 14:20, Thierry Reding пишет: >>>>>> On Thu, May 02, 2019 at 02:38:13AM +0300, Dmitry Osipenko wrote: >>>>>>> The driver's compilation doesn't have any specific dependencies, hence >>>>>>> the COMPILE_TEST option can be supported in Kconfig. >>>>>>> >>>>>>> Reviewed-by: Chanwoo Choi >>>>>>> Signed-off-by: Dmitry Osipenko >>>>>>> --- >>>>>>> drivers/devfreq/Kconfig | 2 +- >>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>>> >>>>>>> diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig >>>>>>> index 56db9dc05edb..a6bba6e1e7d9 100644 >>>>>>> --- a/drivers/devfreq/Kconfig >>>>>>> +++ b/drivers/devfreq/Kconfig >>>>>>> @@ -93,7 +93,7 @@ config ARM_EXYNOS_BUS_DEVFREQ >>>>>>> >>>>>>> config ARM_TEGRA_DEVFREQ >>>>>>> tristate "NVIDIA Tegra30/114/124/210 DEVFREQ Driver" >>>>>>> - depends on ARCH_TEGRA >>>>>>> + depends on ARCH_TEGRA || COMPILE_TEST >>>>>>> select PM_OPP >>>>>>> help >>>>>>> This adds the DEVFREQ driver for the Tegra family of SoCs. >>>>>> >>>>>> You need to be careful with these. You're using I/O register accessors, >>>>>> which are not supported on the UM architecture, for example. >>>>>> >>>>>> This may end up getting flagged during build testing. >>>>> >>>>> We have similar cases in other drivers and it doesn't cause any known >>>>> problems because (I think) build-bots are aware of this detail. Hence >>>> >>>> I don't understand how the build-bots would be aware of this detail. >>>> Unless you explicitly state what the dependencies are, how would the >>>> build-bots know? Perhaps there's some logic built-in somewhere that I >>>> don't know about? >>> >>> So looks like COMPILE_TEST has a !UML dependency, so this might just >>> work. >>> >>> Acked-by: Thierry Reding >>> >> >> Thank you very much for the clarification! Certainly that would caused >> problems already since there are such cases all over the kernel, >> including Tegra drivers. > > In the cases that I'm aware of we used to explicitly list all the > dependencies that would've otherwise been pulled in by the ARCH_TEGRA > dependency to make sure there were no issues. > > Now that we've been discussing this I vaguely recall a discussion about > the only real issue nowadays being HAS_IOMEM and since that's only > missing on UML, that may have been the reason for why the !UML > dependency was added. > > Yes, looks like that was it: > > commit bc083a64b6c035135c0f80718f9e9192cc0867c6 > Author: Richard Weinberger > Date: Tue Aug 2 14:03:27 2016 -0700 > > init/Kconfig: make COMPILE_TEST depend on !UML > > 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/1466152995-28367-1-git-send-email-richard@nod.at > Signed-off-by: Richard Weinberger > Acked-by: Arnd Bergmann > Cc: Al Viro > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds That was a wise solution. Thank you very much again for the detailed comment! Very appreciate that! > Oh wow... almost three years now. Please don't pay much attention to the time, it never stops. Live in the moment :)