Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp632915imu; Wed, 23 Jan 2019 02:56:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN7ldGQqmlaftwrWAxEHDIBjrauuKTimVqsgdu5DSB4T8+NKtaXTUqn7LVHRzMRuzKrFTYwC X-Received: by 2002:a63:7f4f:: with SMTP id p15mr1558924pgn.296.1548240988831; Wed, 23 Jan 2019 02:56:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548240988; cv=none; d=google.com; s=arc-20160816; b=rIZB4pbchKe3fH5oEWIVsyxwv5gCFdVahJrUVsF16InKQEY9lVev5mOc8FbH5TwbF3 ZLFQaImRmiq8GWb4q5osVimUTy4BjmMAi9hmbsoRB3lVE2eFKQeMCWHpsoB7LducppSP wteSh0gX73hln7r0n9xAIIoHJeXm/M+IsE5kz/HXzfNV2KqeWsq6c1Yy6qfvs67Lz9DF OLLefmBZnbFmgHqXC7Wvf8pcjd9xdy8j+QWVe2ooi1DgHGm4rTQVhZ4Q89IQmyiqyG8K Pi+GIOKmtosnx9r31zffc3VJqyru2aC3o9+24+1CpfFkcmQVtZHsTB8sLlxp9+FxeFvr 4mPg== 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; bh=px02LkENgu1f5T4rR04KN0O9r8/RVGgCr626rw5O2Oo=; b=dpMHJOFpH6NwFBXmpRT0GEWz2ctFYV6JUW0Da9vM6SnAgEN7apwsxYiXCov5+cY19r yCilETQ04aHcD+wwE52KAeWCdLNniuNxByzb1hjNwQkX5j75uyiv3FLLnKdck8lFxtJG dk0b2JHanbcE6xI2Z0GxKdbngqbKtvYfoc4n/na6YXWIcNpUDa6NcW02fCAqdqf6z5qU 3/aeLPiTX7mlHFWDtH8VHkNCp9Urz4B6Zpi4rirrCPF/90mtvHWQ3dBSPq0H6N3gNM3q 1f74OCp4LetcmjXbpK4Wkd4hUDxpsqrMEhfubu8apcFeCg/rT+8r38y5gJmXRF2MrP2N E9Qw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i69si19271172pgd.71.2019.01.23.02.56.13; Wed, 23 Jan 2019 02:56:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbfAWKy2 (ORCPT + 99 others); Wed, 23 Jan 2019 05:54:28 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:43547 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfAWKy2 (ORCPT ); Wed, 23 Jan 2019 05:54:28 -0500 Received: by mail-oi1-f196.google.com with SMTP id u18so1398152oie.10; Wed, 23 Jan 2019 02:54:27 -0800 (PST) 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=px02LkENgu1f5T4rR04KN0O9r8/RVGgCr626rw5O2Oo=; b=fHfbT+S+JjEIJVN3G0z+UCuIyMl6RsOIZxMvGr4D1Lqbj5OFkvFk4XaB9oDHky6+gn W18XNUy8ZjmRWdCylF8g88T/I1pLhXWrC6P24oJn5XMjIm7HQ+PbFu31cDzFqUbfgBkT 7BNsj0+zvbg5iN2NwjhLbEqllM87oXj9uMKkywgnl2ibRyFf3/Cck9f6CdmX2PyyH9RB pZTeN50jejqbSsRvV45+U+UULcx+CMglZAJRHChG3++cMA5P+7uXErmI2On8Q4s4FAFD 7qIed8hpd+KeDEkbxFrVyPWXsu/UAnJL9vcpYK3TNbaryYmZOeg+cQwzURio+wowKvYT Fs3g== X-Gm-Message-State: AJcUukeh+PI5UURv3zXb1GUaa2XXqp1W7YM3U5YTOb4VlwNqwG4Xi7E6 Jh8hl6CkEKpwcOcQKuhya2ZGGmjcz0yPDRjodDc= X-Received: by 2002:a54:4d01:: with SMTP id v1mr1031225oix.246.1548240867005; Wed, 23 Jan 2019 02:54:27 -0800 (PST) MIME-Version: 1.0 References: <3f3e38e55c2de4b730fd7c6aa30c125f3a6a8704.1548084260.git.amit.kucheria@linaro.org> <20190123103451.ap5vws3kj2ch4uba@vireshk-i7> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 23 Jan 2019 11:54:15 +0100 Message-ID: Subject: Re: [PATCH v2 1/9] thermal: cpu_cooling: Require thermal core to be compiled in To: Amit Kucheria Cc: Viresh Kumar , 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 11:53 AM Amit Kucheria wrote: > > 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. You can make it part of this series, though.