Received: by 10.223.185.116 with SMTP id b49csp452462wrg; Fri, 23 Feb 2018 01:12:09 -0800 (PST) X-Google-Smtp-Source: AH8x224BrALgusGcgmioAk3fEavV6Ggl/lTGqe2zqIaFcoZqgtud+gmB6JwXIg7TZDwIDB9vlDW0 X-Received: by 10.101.64.139 with SMTP id t11mr906401pgp.304.1519377128939; Fri, 23 Feb 2018 01:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519377128; cv=none; d=google.com; s=arc-20160816; b=uaPTAn6fT6xCRFl0YShGJJH5scUm9MoEIAR3GXtUu6Ny7/0yTDuo2EZhAh9iAldnWY GUFIwOKOvH17i9IqAQ0oUTsisk7GJFqnj6kEmGAq7YGUnF7fggZADJ6rOe/HV1VuFYNf Ruu1IT3D9GBIdqT83XvpjVEBNeIlQTI1ToWwIpMRNXJ+mJCrFLlrwMI1JrmMtBVOvxxf MltBi9UrrECOxozqJP2Po4MuLVID9jug9LHUOdbVazhlI6oHdzUXiVmtL16HSeupEBRZ MpcpkTptgyKXEo7Wq0apm4+NR1wDlJW8Bb1UAQeNikznfpn4szdaKIxwbeanTulNiegA AS6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Sdob655f3ixVOR5BoACtq26mwbsJ06/q2CA+BohAbbk=; b=AnLsd3oicJN5HE6IEsLfr6XNEXqNN/d8CCT2egLKmFWRv9wTN2LSOOPUYyfnyL1hZ8 lZ7vFxRgjOQFqjYvIQhJoZZ+Ef7iGsNFqEuPoFSl1w45jswe2Fzgwu/YnGlwFYE85rhn BxAqTa6YCVIsFRykeMro/5i/Utqaq1Ko0V1PDQRVnKNVG7uHU8uSNB33PEYmCKlzb4SB hKqwfV6gMvI3wsok/iCSsm7rli16ef8GoFFAe9R1tBCwEFOANg5IoE8gkC3UthpdSlFO Hvr7Yg4s2rmW8lprHeAs7OIvGsNdlbKZ6MPjLLYT859IHzSpfgbWDqjgcCzb6l0bSDRv y3gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KpkV9GlZ; 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 i10-v6si1542278plr.670.2018.02.23.01.11.54; Fri, 23 Feb 2018 01:12:08 -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=KpkV9GlZ; 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 S1751440AbeBWJLF (ORCPT + 99 others); Fri, 23 Feb 2018 04:11:05 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40364 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbeBWJLC (ORCPT ); Fri, 23 Feb 2018 04:11:02 -0500 Received: by mail-wm0-f68.google.com with SMTP id t82so3221649wmt.5 for ; Fri, 23 Feb 2018 01:11:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Sdob655f3ixVOR5BoACtq26mwbsJ06/q2CA+BohAbbk=; b=KpkV9GlZStr9JunTPg7/+NYBZNIved9l9fgmaiCD2kfLzBtpDr12hp/3GdEcv+igaq KPCj2aYEkHgQ0rLa1ENKSxtBDdEDboQBqoL7HFIFokY6wVgKqv2FmQpQUu0oKWW/W8mr xmBjVbdEGdAFjXdsg3NK8/WfUzOuddbNTj8PU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Sdob655f3ixVOR5BoACtq26mwbsJ06/q2CA+BohAbbk=; b=ZHH1qluneAedF0bNIQ9To/AqzVD6TOeNyqZG0o1BuOlFy6xo3vOkMJntVPvNRgD08O u37PO2an/9KiTm1TjQbizvnSzJhwXSqkDZIhTS+Rxze0pXc+ockRQ0elDVrgK6T90skP Cg5RQL5p1uh0KqRg9Js8qKHERnK/nRa+vrKkfp7hS6bsp7CZkmOCF0Zgx0fKhQrPtJw9 K0pxwRnStF85Gj1mDUtPw2CrO0I2VQcLwgQ1CkToIP3/DbKZoQkHxL+89/Mr7me5dOFV ISgmaSe5oyTtZp0tU78lAIQdiHTxGBw/x7gRhQmgNnWB1qfftCc1QGL2wC1ccfQv4lBo hC/g== X-Gm-Message-State: APf1xPAHp1UuhFsIKCeuCZjAFQVG8VHhm/Z6uEX1+wJJSkTFJqKbaXmh jW2Jg+Twjz4W8wtjwtTt0lo/8XN2Al4= X-Received: by 10.28.19.15 with SMTP id 15mr1090832wmt.130.1519377061235; Fri, 23 Feb 2018 01:11:01 -0800 (PST) Received: from [192.168.1.75] (lft31-1-88-121-166-205.fbx.proxad.net. [88.121.166.205]) by smtp.googlemail.com with ESMTPSA id l11sm726638wrg.71.2018.02.23.01.10.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Feb 2018 01:11:00 -0800 (PST) Subject: Re: [PATCH V2 4/7] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice To: Viresh Kumar Cc: edubezval@gmail.com, kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, linux-kernel@vger.kernel.org, javi.merino@kernel.org, rui.zhang@intel.com, daniel.thompson@linaro.org, linux-pm@vger.kernel.org References: <1519226968-19821-1-git-send-email-daniel.lezcano@linaro.org> <1519226968-19821-5-git-send-email-daniel.lezcano@linaro.org> <20180223052416.GE26947@vireshk-i7> From: Daniel Lezcano Message-ID: <1dd1fe8a-d7e7-b4c7-9114-c9de41fc9284@linaro.org> Date: Fri, 23 Feb 2018 10:10:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180223052416.GE26947@vireshk-i7> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/02/2018 06:24, Viresh Kumar wrote: > On 21-02-18, 16:29, Daniel Lezcano wrote: >> The next changes will add new way to cool down a CPU. In order to >> sanitize and make the overall cpu cooling code consistent and robust >> we must prevent the cpu cooling devices to co-exists with the same >> purpose at the same time in the kernel. >> >> Make the CPU cooling device a choice in the Kconfig, so only one CPU >> cooling strategy can be chosen. > > Daniel T. already raised his concern (which I share too) about the > multi-platform builds, where we would want this to be runtime > selectable. I am fine with your approach of making that possible later > on, but I would really like that to be merged before the combo thing > comes in. So, I would suggest to merge stuff in this order: > > - this series > - runtime selectable strategy > - combo stuff > > I hope that would be fine ? Yes, for me it is ok. So meanwhile we can also check the cpufreq cooling device unregistering at suspend/resume/hotplug and hopefully that will simplify the addition of the combo cooling device. >> Signed-off-by: Daniel Lezcano >> --- >> drivers/thermal/Kconfig | 20 +++++++++++++++++--- >> drivers/thermal/cpu_cooling.c | 2 ++ >> include/linux/cpu_cooling.h | 6 +++--- >> 3 files changed, 22 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig >> index b6adc54..5aaae1b 100644 >> --- a/drivers/thermal/Kconfig >> +++ b/drivers/thermal/Kconfig >> @@ -142,17 +142,31 @@ config THERMAL_GOV_POWER_ALLOCATOR >> allocating and limiting power to devices. >> >> config CPU_THERMAL >> - bool "generic cpu cooling support" >> - depends on CPU_FREQ >> + bool "Generic cpu cooling support" >> depends on THERMAL_OF >> help >> + Enable the CPU cooling features. If the system has no active >> + cooling device available, this option allows to use the CPU >> + as a cooling device. >> + >> +choice >> + prompt "CPU cooling strategies" >> + depends on CPU_THERMAL >> + default CPU_FREQ_THERMAL >> + help >> + Select the CPU cooling strategy. >> + >> +config CPU_FREQ_THERMAL >> + bool "CPU frequency cooling strategy" >> + depends on CPU_FREQ >> + help >> This implements the generic cpu cooling mechanism through frequency >> reduction. An ACPI version of this already exists >> (drivers/acpi/processor_thermal.c). >> This will be useful for platforms using the generic thermal interface >> and not the ACPI interface. >> >> - If you want this support, you should say Y here. > > Should this line be moved to the CPU_THERMAL section above ? > Probably, I will double check it. [ ... ] >> -#endif /* CONFIG_CPU_THERMAL */ >> +#endif /* CONFIG_CPU_FREQ_THERMAL */ >> >> #endif /* __CPU_COOLING_H__ */ > > drivers/cpufreq/Kconfig: # if CPU_THERMAL is on and THERMAL=m, CPUFREQ_DT cannot be =y: > drivers/cpufreq/Kconfig: depends on !CPU_THERMAL || THERMAL > drivers/cpufreq/Kconfig: depends on !CPU_THERMAL || THERMAL > drivers/cpufreq/Kconfig.arm: # if CPU_THERMAL is on and THERMAL=m, ARM_BIT_LITTLE_CPUFREQ cannot be =y > drivers/cpufreq/Kconfig.arm: depends on !CPU_THERMAL || THERMAL > drivers/cpufreq/Kconfig.arm: depends on !CPU_THERMAL || THERMAL > > All of these need to use CPU_FREQ_THERMAL now> > include/trace/events/thermal.h:#ifdef CONFIG_CPU_THERMAL > include/trace/events/thermal.h:#endif /* CONFIG_CPU_THERMAL */ Ok. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog