From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752062AbbIKIXJ (ORCPT ); Fri, 11 Sep 2015 04:23:09 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:51812 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbbIKIXH (ORCPT ); Fri, 11 Sep 2015 04:23:07 -0400 From: Arnd Bergmann To: Viresh Kumar Cc: "Rafael J. Wysocki" , Pi-Cheng Chen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: cpufreq: mediatek: allow modular build Date: Fri, 11 Sep 2015 10:22:39 +0200 Message-ID: <2329563.MhTbBXHVz1@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150911081753.GK9650@linux> References: <1768766.yu1lxjsjLL@wuerfel> <20150911081753.GK9650@linux> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:qy26Y4nbgb4jLI5D9UYs/Pc0FX6qk2BWL/Sh4WzCvMPRFSN532s AF8ExmsinO4Gd4Ndlaw+oYtY6N7Adw7XaJ0lPOSzTtmEc+v9P1tyLabDwcdL0x4ouiDPETa vfWE7hwyRb/fb5nhxiZ/PCoRkJ0O8s+7wzenDjV8LF028WN2KnTu26dofFNGLjMX0VufZ2N F1q3lEJMRfXqyB3vdsL6Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZC9+6g007Ns=:jSNnjI06kfGXTP4fC5fWOV 5uMP4V0Dlj2/wme+ImUg62ZznJWM8EamOSDfyMQQ7S/pgBjGVeW1b7SKqJwu7b/dt7j0wANmt QdprVNkjkTdgJ0daagArzNQPjrnwN27i+XD47PGydm4LAImWpqQ3nVFnPUeeyz0ZxkIgIRYUf wJEbGUJazLGfPimAlPV2pyS42A0zOUf/ILqpXiLImC1DutlFmkUy6DvXZ8cQ+sisrWhSA+BPy tSNoab1+qtb9YYkiMl+UDHr3d8KzQ51WKaTB6tbkWaSaC7WPNrnOo7gmCgra2LBz5FLRpsbQI z4lwlXxZBOB2UEQ3k3MWw33nEXa47q2BaSwtU4qrDzg1BCGO9zaDK8xq7bq1+ZQvNBbRLAUcV cD8zffYh0/BGekn6nD2vrKmVp5zWHSIqEiUDxzGtr/Xh+uW7A+w0S1SG4zVOi5OhuZmi3mGkC 8+JFubQf+1OqyBmjAzjarUGSz7u+M7IceVOjLa9TkrZtwCUWIPFdpYCNGHE7Mq4o7oH3n2e0h vtlhB9VnU2j7Hgxtye1JEHBXM6sfpPSQgh1+0O1bKLEkCLrDHAeDToEkDTBBHKE0WTIwLSqye FVXSpFw0ZMUODGIM4obzqmxKXiHAPigIC0v3C3sspUjgnjA3ccVD2aqL++2Dr35nTO8rf6fJZ iWRVS21PcwwAzre4DrVu9Ca2NdT7Pa9qeeFslGZnQ85s29v1Y1r7ZUfYDxGHlT2YSzXJ8+pmX bzBZg41zXpC+LQS2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 11 September 2015 13:47:53 Viresh Kumar wrote: > On 11-09-15, 10:15, Arnd Bergmann wrote: > > The newly merged cpufreq-mt8173 driver breaks the ARM allmodconfig > > build because of a dependency on the cpu-cooling infrastructure that > > may be built as a loadable module: > > > > drivers/built-in.o: In function `mtk_cpufreq_ready': > > binder.c:(.text+0x324c8c): undefined reference to `of_cpufreq_cooling_register' > > drivers/built-in.o: In function `mtk_cpufreq_exit': > > binder.c:(.text+0x324ea0): undefined reference to `cpufreq_cooling_unregister' > > > > This works around the issue by allowing this driver to be built > > as a module as well, and adding a dependency on THERMAL that prevents > > it from being built-in when the cpu-cooling driver is a module. > > > > This is not perfect because there is still a case where THERMAL=m > > and CPU_COOLING=n that should allow us to have this driver built-in > > as well, but I decided to follow existing practice in other drivers > > here, and that case seems irrelevant in practice. > > > > Signed-off-by: Arnd Bergmann > > --- > > I have not checked if someone else has already sent a patch for this, > > just ignore mine if the issue has been fixed already. > > 5269e7067cd6 ("cpufreq: Add ARM_MT8173_CPUFREQ dependency on THERMAL") > > in Rafael's tree. Its a bit different, so have a look. That fix looks correct to me too, thanks for the quick reply! In my approach, I decided to allow the driver to be a module, as that seems nicer for multi_v7_defconfig, but I now see that there are several other drivers that can only be built-in, so if we decided to make that the general strategy we should change them all. Arnd