Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp631571imu; Wed, 23 Jan 2019 02:54:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN6qnlfMOyvzwCqNBuFmU0vV8bqvSDAF+q4hB87SLrs+MoaeyCwNeuc9vwHq6uop28VCXMRv X-Received: by 2002:a17:902:4827:: with SMTP id s36mr1694463pld.168.1548240875931; Wed, 23 Jan 2019 02:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548240875; cv=none; d=google.com; s=arc-20160816; b=nw+rvpfkcXzmM2wCRvwMrb/hkC0xTGnCkmY7JfUiv0Jww5ls/6h1L6yKj7WS0FoAj0 /r+C5wRLeFSsScSFgp+KeXkkt0Yi6pqEUIjipcLXdwIGASm6SrrRYpiKsGg6Jc6ntLmS C9/u57ypjC5Nd2Cc9qM1E1eS2vAiNyW0Es8Mq6fjEN8fuOv+YJC7aQ7gLB+M7PN7Scd5 7oa4E4PjW6TfqPe1M6RM1vRIXVNzNed3HtreQ4yLSFM0+rjkP0lLhvwaOb3Wha2bsAwo c/7aw9V5F6mx0qtMVTG3rx5VUs3IuqjGbv3PaeqGPlpv9hjGLrM6fmARaUtZp4rhEZmD DgBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UeQwqTaBnBEL+vSJ4Qs4kPJUoeipubfEWM+kHQ4IKmM=; b=oBLP9nLyyK5Ho3VuVBhg0epVw6lnV3TYKnAzSHz8PYEzxwtnad+llHnJuRKRjWwZvF gLx6uny3xX4SPkXK/ltZWdXUtwZfCKdaj0PZuuX+DpBmK5E0PnNOoyjaQ8C8hCtCnoUR MJp/d5lkGb2TG0j8auIqRWmu8tWtobfAWvLYXEj/GKyVblqZbs1AjFyWFHVI1RIIbprX 8f/HOXeFe9dOXNoL+KJuNHIhAz3z66kcaPobXvl9QS3kJrPkXIwq4Yaz5m+LeHFX0YpX D2AXjC409KhyNpMoN/oEQxBow+QOxCDnMlTx9MKd1hgvBk1Pf5PV7iB3BAap4JzcpBYr vcXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ERhu3ROP; 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 g6si18697355pgn.57.2019.01.23.02.54.13; Wed, 23 Jan 2019 02:54:35 -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=ERhu3ROP; 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 S1727455AbfAWKwy (ORCPT + 99 others); Wed, 23 Jan 2019 05:52:54 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:44886 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727399AbfAWKww (ORCPT ); Wed, 23 Jan 2019 05:52:52 -0500 Received: by mail-qt1-f194.google.com with SMTP id n32so1746689qte.11 for ; Wed, 23 Jan 2019 02:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UeQwqTaBnBEL+vSJ4Qs4kPJUoeipubfEWM+kHQ4IKmM=; b=ERhu3ROPT0izkWP9QUnp9ItKvTxSzUw8kiy/WpDiSb28rOWuCI+5D49pblUkWjM5nQ hkw2a1oY1rojec25aL2/e16PhZ9kVn7uNthFOzR8o66KZsY+q63ezRPGOHLAx8wQ6TT7 VcnZa59Kf09LF/bn4KBJFM9BNMlYm8qrPm8HM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UeQwqTaBnBEL+vSJ4Qs4kPJUoeipubfEWM+kHQ4IKmM=; b=G/Sd7C/sCT3D+nNkHWeUomftAvJ6xUM1U4oxOTElG8LHC0VO9WhAn5bFrVXEenZe4S EY9mq+791jKsu9DIeOOl/+h/yBvG3t28Ao2rjhJwS0hoNiCynptP2zAyk4VnJTpm/DIi Fa0ii2B7R42YT8vlGCyffgzfFV3y7Pac8HInQ0aUtwDqSts7tpF9D4f5TpYp4pQ45UAc 2iIjtfnIGJmey1x8qk81yxdeh5XScpa6yG5K5uM3KF4ZLPb6uWYsVYzo6gXK8zWaw+lU 65JKfxHlm/p14fPEEyFIxT+NARtK96wvMkSPmvgLNyIxQ+OD1F93vAoskRhnb6g98hvP Hvvg== X-Gm-Message-State: AJcUukcM/v9lEYMQMa4BHFd6HQ7bjBr7cIbAarL8ZKe18DsUXcEajoAm 4yoTpGXu6GO6PJK00W8lfst3aprmyTdfNtQ7lyMnAg== X-Received: by 2002:ac8:51c3:: with SMTP id d3mr1728856qtn.107.1548240771731; Wed, 23 Jan 2019 02:52:51 -0800 (PST) MIME-Version: 1.0 References: <3f3e38e55c2de4b730fd7c6aa30c125f3a6a8704.1548084260.git.amit.kucheria@linaro.org> <20190123103451.ap5vws3kj2ch4uba@vireshk-i7> In-Reply-To: <20190123103451.ap5vws3kj2ch4uba@vireshk-i7> From: Amit Kucheria Date: Wed, 23 Jan 2019 16:22:40 +0530 Message-ID: Subject: Re: [PATCH v2 1/9] thermal: cpu_cooling: Require thermal core to be compiled in To: Viresh Kumar Cc: Linux Kernel Mailing List , linux-arm-msm , Eduardo Valentin , Stephen Boyd , Doug Anderson , Matthias Kaehlcke , Zhang Rui , Daniel Lezcano , Linux PM list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 23, 2019 at 4:04 PM Viresh Kumar wrote: > > On 21-01-19, 21:10, Amit Kucheria wrote: > > The CPU cooling driver (cpu_cooling.c) allows the platform's cpufreq > > driver to register as a cooling device and cool down the platform by > > throttling the CPU frequency. In order to be able to auto-register a > > cpufreq driver as a cooling device from the cpufreq core, we need access > > to code inside cpu_cooling.c which, in turn, accesses code inside > > thermal core. > > > > CPU_FREQ is a bool while THERMAL is tristate. In some configurations > > (e.g. allmodconfig), CONFIG_THERMAL ends up as a module while > > CONFIG_CPU_FREQ is compiled in. This leads to following error: > > > > drivers/cpufreq/cpufreq.o: In function `cpufreq_offline': > > cpufreq.c:(.text+0x407c): undefined reference to `cpufreq_cooling_unregister' > > drivers/cpufreq/cpufreq.o: In function `cpufreq_online': > > cpufreq.c:(.text+0x70c0): undefined reference to `of_cpufreq_cooling_register' > > > > Given that platforms using CPU_THERMAL usually want it compiled-in so it > > is available early in boot, make CPU_THERMAL depend on THERMAL being > > compiled-in instead of allowing it to be a module. > > > > Suggested-by: Rafael J. Wysocki > > Signed-off-by: Amit Kucheria > > --- > > drivers/thermal/Kconfig | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig > > index 30323426902e..58bb7d72dc2b 100644 > > --- a/drivers/thermal/Kconfig > > +++ b/drivers/thermal/Kconfig > > @@ -152,6 +152,7 @@ config CPU_THERMAL > > bool "generic cpu cooling support" > > depends on CPU_FREQ > > depends on THERMAL_OF > > + depends on THERMAL=y > > help > > This implements the generic cpu cooling mechanism through frequency > > reduction. An ACPI version of this already exists > > Please remove all Kconfig crap, which gets fixed with this, as well in > this patch itself. Like: OK, I planned to if/when this series was accepted. Will send out a patch. > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm > index 10bc5c798d17..40f8cc323996 100644 > --- a/drivers/cpufreq/Kconfig.arm > +++ b/drivers/cpufreq/Kconfig.arm > @@ -40,8 +40,6 @@ config ARM_ARMADA_8K_CPUFREQ > config ARM_BIG_LITTLE_CPUFREQ > tristate "Generic ARM big LITTLE CPUfreq driver" > depends on ARM_CPU_TOPOLOGY && HAVE_CLK > - # if CPU_THERMAL is on and THERMAL=m, ARM_BIT_LITTLE_CPUFREQ cannot be =y > - depends on !CPU_THERMAL || THERMAL > select PM_OPP > help > This enables the Generic CPUfreq driver for ARM big.LITTLE platforms. > > -- > viresh