Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6367612imu; Mon, 21 Jan 2019 07:44:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN4BkiphRvh/KC+bdb9DkRqrm+MXR7GuERZcuY60bY8Gy+/blYwUGsrMnKp+Vln0gRZw+5A+ X-Received: by 2002:a62:f907:: with SMTP id o7mr29777222pfh.244.1548085464035; Mon, 21 Jan 2019 07:44:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548085464; cv=none; d=google.com; s=arc-20160816; b=je9+ZgudJhJVGBdSGpODEh2TJE0Qxy/WzBdeEesnQfMPg1F3UKKUxrk1HlQIdS3yv+ cWENDHiDX+NLriTvs/+MTr7ip73R0B/M2hVnaXXwe6o9mGiDpYxjwAUNtaUkuA/DtFJC HqkpcqeZAyLpA2lRhkQ6ZrP0ESbApL+6/R4sJ3T87QHD++2Q9qr5ARw8EMJ+ivGpHqIl Bt5UYlqmBHDKKf+UuYvb3coHaiYEGRF6WDswKWcUIUHaZ5uQyQ5pIKa0HaC+okHYEskY yf3tCtwtT0xq/lqnZh55GK261ClFG4jpKb1Sk8y6GngiLvFqMxUdtMI932QT9MZ8ts9J qi/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=mOHRY9GecvR+zxuWJYSMLBDQ2KcwLpDTRI+yrgkHn2w=; b=peptRli5gEPmveZ4sVtkP5Ni60UfIhXhPZZYvS141uLrKF2jPcGIIPkdIvMKSiQxWc wmhGh5OpzTLthtrQjPOIkFuqqtJ7qN3A375ELivrUttYegtf74KOvDYYdUhmQXYu+XDY qsASnEFPr0qbNo7WQM2vHGQrb1oEWVa7sDIFgAh1UJdgkBsrKeAIvbAYQCqy4gziFJf2 e2GiTJrHiHAQ6NBlxDtYyAsd5T/Ls+38owVaaLOBX3+mYcN6A5cQEkxSXGDumo/a1us/ lb3liEx05EK0FqW3GNZvlzTVHvuL/9Y96mffan1lF0FiT59ETasG6zqzYvRqKQrUlvWM 6y9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fR/Gwm5u"; 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 j13si12778596pgi.227.2019.01.21.07.44.08; Mon, 21 Jan 2019 07:44:23 -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="fR/Gwm5u"; 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 S1730070AbfAUPml (ORCPT + 99 others); Mon, 21 Jan 2019 10:42:41 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:38739 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729851AbfAUPmk (ORCPT ); Mon, 21 Jan 2019 10:42:40 -0500 Received: by mail-wm1-f68.google.com with SMTP id m22so11300996wml.3 for ; Mon, 21 Jan 2019 07:42:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=mOHRY9GecvR+zxuWJYSMLBDQ2KcwLpDTRI+yrgkHn2w=; b=fR/Gwm5uDyVf8kvr7f/Rw+Or8RDtRiDTXnbpdc5hGFstxhrTrpkL+utGhNw6JbRWJ5 92PsbST9aFJTObXUv5gw86T8+fuD1QF9SgnC1v7qnKqLqyQbUn9K2It1FwHfRSATE4GD /EbNTH+2oc1l8/DiC2tkH6PAlsWStqza59+A4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=mOHRY9GecvR+zxuWJYSMLBDQ2KcwLpDTRI+yrgkHn2w=; b=ZJHtyIqLBOUrEeFEDVR5CqzDySzKB/2X13Ui1O0HdnHle4iJnCNZGARbijt8E7qhoG 4JUA8IfrlmlyZuF9wa6SPOwKziotgsQaf8vAa1ZOmRBE9I3qrDsFskXWNdfri5EmXzQz da1fZHmrBzBr4JBs1JIidS81UFOBHWgk6xW7Vhb329o9oQDLnB4qisrqkMXJLWchnlTa 93vSd7Sh9CTE9r55TNN/VmqotxyBUo2y89s6M/QsTuXBIWzbHV1qfOf4Jf6crQglsMYi 9yKRqjllBH8Ky9VggBFW5b8u5HrJ/UcmEUD+wi1gvn0JrbGL2YBY3WCfys7u4mSnkEuV NSdA== X-Gm-Message-State: AJcUukf90QS6vKW+TKiSrGNBCmgC0X/CTcBOLX/G1DESQpZKCK+hMokG n9A4ipgwogPAhFFF1bbhKrQiBZkkJmk= X-Received: by 2002:a1c:c008:: with SMTP id q8mr22990286wmf.99.1548085357709; Mon, 21 Jan 2019 07:42:37 -0800 (PST) Received: from localhost ([49.248.61.1]) by smtp.gmail.com with ESMTPSA id n127sm57377257wmd.20.2019.01.21.07.42.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 07:42:37 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, viresh.kumar@linaro.org, edubezval@gmail.com, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, Zhang Rui , Daniel Lezcano , linux-pm@vger.kernel.org Subject: [PATCH v2 1/9] thermal: cpu_cooling: Require thermal core to be compiled in Date: Mon, 21 Jan 2019 21:10:26 +0530 Message-Id: <3f3e38e55c2de4b730fd7c6aa30c125f3a6a8704.1548084260.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.17.1