Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1861841imu; Thu, 17 Jan 2019 04:36:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN4xlxqmu7yPiSW2AnNddM7HVQklZpwnfphjZfoNa5P4S9cDJsJMftmEOw9feF2Wo6f440Kq X-Received: by 2002:a17:902:145:: with SMTP id 63mr14775595plb.256.1547728617332; Thu, 17 Jan 2019 04:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547728617; cv=none; d=google.com; s=arc-20160816; b=m5Da8v0TnnTntS3khUw1d4D22LVqZMBf+kkC71VEhC91dBjWvPuptTriW/zX3+Hw3T OEUUSXuQuHZFlUcM1BRygXRt9xC9p9lWlIRauTeel+OuD+4Px+jYbBpLEBc7yo5j063F aU1vqO8n7ir82TdjhfDwqaHJwGkQQZD+7DkN1yKa90PxusB8vL3aDCggDT8mgN2s/F4I hwpLRtu6yVrAoGKTBiDjmJxbkwEw3HMA9k9x9RLWmnD4qA4MXlXKei2zUk2OJX1m5bJE 4MZx44gjS1Gjh5lyIgqpHfYMM7aDLaS665Y6LpL16Jr1c9zjSQkYGpIm/yzh+jAFylSN mKIg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pV6w5zBcNIn0CdpE5qe/bD/3UXSmkBbu0VG7ZuQvYuY=; b=YqcIbi1A4rJkq6ruQiMC5lzCWGqA8ruMF7s/0hmNXttzL7CExBWgMSHyitkptGLZoS mpUhudi5A0GV61ilHI/bTJC91pWoa1pUWr6VRvDq95PwGyaFya6RENOIWuBr8uwzOokZ jfy2wyZPkOw4yNDAo5CHz9BBjijVXdStvMcoqUyUMxOk+oMVoVJCuHYm95TDzNSxDanv uScr5WdsvD5nbv2SF3rXE5SCz10iRvNxlW0Yngc6q14o0aRkO1oFfdkJW+yi2tssSJav Pe1y7hnlK/PP1zu733Ytgl7+xOnhRnlPLR1ZAWojog2tXB7A4eAlOB/iujwTQPUWXjXa iyvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fTr8ggFX; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si1664369pln.128.2019.01.17.04.36.41; Thu, 17 Jan 2019 04:36:57 -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; dkim=pass header.i=@linaro.org header.s=google header.b=fTr8ggFX; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729596AbfAQFtV (ORCPT + 99 others); Thu, 17 Jan 2019 00:49:21 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43898 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728499AbfAQFtU (ORCPT ); Thu, 17 Jan 2019 00:49:20 -0500 Received: by mail-pg1-f195.google.com with SMTP id v28so3917852pgk.10 for ; Wed, 16 Jan 2019 21:49:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=pV6w5zBcNIn0CdpE5qe/bD/3UXSmkBbu0VG7ZuQvYuY=; b=fTr8ggFXr8imKvwEeXvT3sJLlPZ855lkgIwHk5uMrrxvzmzvKA6WBHYOzHUhSqhXdO DCQzPxryyf+rD2m1m3CjBrkcjgcBcNLyyJS7LtwWWrfilhqU2dSPeWeyDu8XRVCMN1vO gRt0X6TVnVRcK7nGWceg/nsfIJzu4lTsPcug0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pV6w5zBcNIn0CdpE5qe/bD/3UXSmkBbu0VG7ZuQvYuY=; b=gKeH+AkmXsh0rPkg/TDig686ARgCTXHPYVFjd/v6caSIQRvC1e4PROc5K5FvfqaKFS 2cPs6DL6xD6WBy5NXJWSNftX6cU2QxcMCVrSjHhGPn7W5dZMFt5YQ+/B6S+aXpuZEXr2 SNAIQb5ohzE4UjRVfBCxyubOvL7n7tg3zTB2tPod+A+GNkZAcXPHWJyBt3XKq49CMitG qABKtBu1HPrSOjCj2fbzSuGZ/9IBIpxb6gPmlVynWocmIE1mtvLgEkOmyESswqQzHEeR +m1Fl1C1TFfTxUaPu0t+MefF4uac6Ci5NStfu3ZQ1JPhT72w6FInOp5Fwz954XVy5/2U a1Jw== X-Gm-Message-State: AJcUukeGscLXXFVKdv3gOiMoDF3p5a6d44COdy3Bz+7OMQ2ZwzN6YHkw /RCOKeN9EHgWhoH3/jfEvEi3ug== X-Received: by 2002:a63:e445:: with SMTP id i5mr12234356pgk.307.1547704159184; Wed, 16 Jan 2019 21:49:19 -0800 (PST) Received: from localhost ([122.172.102.63]) by smtp.gmail.com with ESMTPSA id a17sm643310pgm.26.2019.01.16.21.49.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 21:49:18 -0800 (PST) Date: Thu, 17 Jan 2019 11:19:16 +0530 From: Viresh Kumar To: Amit Kucheria Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, edubezval@gmail.com, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , Matthias Brugger , Sudeep Holla , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , "open list:CPU FREQUENCY DRIVERS" Subject: Re: [PATCH v1 00/10] cpufreq: Add flag to auto-register as cooling device Message-ID: <20190117054916.dqduckt7larn32av@vireshk-i7> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14-01-19, 22:04, Amit Kucheria wrote: > Add a flag to be used by cpufreq drivers to tell cpufreq core to > auto-register themselves as a thermal cooling device. > > There series converts over all the drivers except arm_big_little.c. > Tested on SDM845 with the qcom-cpufreq-hw driver. Only compile-tested the > others. > > Things needing fixing: > - Look at how to detect that we're not in IKS mode in arm_big_little's > .ready callback. is_bL_switching_enabled() lets you know if IKS is enabled or not. Set/clear flag conditionally before the cpufreq-driver is registered, based on the output of is_bL_switching_enabled(). > - The other pending issue is to fix allmodconfig that leaves us with > CPU_FREQ=y and THERMAL=m (CPU_THERMAL=y). That leads to undefined > references for functions defined in cpu_cooling.c Okay, that's a terrible thing and the solution looks to be rather difficult. For others who may not be aware of the issue here, currently the cpufreq drivers use helpers of cpu_cooling.c (CONFIG_CPU_THERMAL), which uses helpers of the thermal core (CONFIG_THERMAL). CONFIG_THERMAL is defined as tristate and CONFIG_CPU_THERMAL as bool in Kconfigs. The cpufreq drivers using the cpu_cooling.c file have this in their Kconfig entry: # if CPU_THERMAL is on and THERMAL=m, ARM_BIT_LITTLE_CPUFREQ cannot be =y # depends on !CPU_THERMAL || THERMAL This series now places the cpufreq core in place of the cpufreq driver and it messes up everything. It is not just about allmodconfig, but any configuration which makes the compilation fail. What are the solutions we have now ? 1. Have following for CONFIG_CPU_FREQ depends on !CPU_THERMAL || THERMAL The platforms which don't need CPU_THERMAL (like x86) should not enable CPU_THERMAL anymore if they want CONFIG_THERMAL=m. @amit: If this gets accepted, please update the Kconfig entries for all those drivers to not have above lines anymore. - Change CONFIG_THERMAL to bool instead of tristate ? - Anything else ? -- viresh