From patchwork Mon Apr 17 06:01:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 97491 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1212527qgf; Sun, 16 Apr 2017 23:02:59 -0700 (PDT) X-Received: by 10.98.55.197 with SMTP id e188mr10218051pfa.116.1492408979562; Sun, 16 Apr 2017 23:02:59 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y67si10036543pfj.22.2017.04.16.23.02.59; Sun, 16 Apr 2017 23:02:59 -0700 (PDT) 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; 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 S932837AbdDQGCr (ORCPT + 14 others); Mon, 17 Apr 2017 02:02:47 -0400 Received: from mail-pg0-f47.google.com ([74.125.83.47]:35540 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932645AbdDQGCl (ORCPT ); Mon, 17 Apr 2017 02:02:41 -0400 Received: by mail-pg0-f47.google.com with SMTP id 72so59107839pge.2 for ; Sun, 16 Apr 2017 23:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+modO125UAiQwTwbeiROj7l7z9sjR9Q30Up5OnH4Xx0=; b=TC5j90td25Z8vIAlgCFaMilIXqfB2eT5bcmkyK4BmvIf3s/5AItOkci6Bw+eioDfkf SsiQIBzMYeRxv9szIW41upacW6O4JRaVpcZu9QMkOp9OmZM5IZj66dAJn7VtUoe342L0 AjWvqD6SKqvT/yOaxhyFm2QX/GknXY98uTgQY= 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; bh=+modO125UAiQwTwbeiROj7l7z9sjR9Q30Up5OnH4Xx0=; b=ZMakr6as2xD63DBZORViz+N9GJM1HZAlJaxcGBmMXVbLtkfy/CTW6K8KH53pvc+S+p rt0tM7urJ4hO620Ldr1S/S/dcIHW6RKgWlExhBnEWtGnH/2mE3hnXFjNk55iOJ7usxBw R95OQKQRaYuXDsrInrkZDv6OJTm+SPeHQtHpfin9KAQi2NYupIcMU7tcntEVbdHu5zgA TnD+G/St4ZJflTzAOPErWnGSI+HdOAzaWvTf5aSGKd52sVV1L4hPen5tKlybsi9avGZe oGQ7+8C/kmobDFtpPAjAVY1ZfWK8r2yp+Uq4GzLBUxE5nFhT7DFP8NUeSlSSlpjFpbLn ol8Q== X-Gm-Message-State: AN3rC/5QBPrL9oX9dr76ero92u593B1K0pBCQPNBHzhovXLeo+Dt+K5N HCOhNSaqzFPEJ+Os X-Received: by 10.84.129.4 with SMTP id 4mr11081951plb.37.1492408961131; Sun, 16 Apr 2017 23:02:41 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id j125sm741846pgc.53.2017.04.16.23.02.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Apr 2017 23:02:40 -0700 (PDT) From: Viresh Kumar To: Javi Merino , Zhang Rui , Eduardo Valentin Cc: linaro-kernel@lists.linaro.org, Amit Daniel Kachhap , Rafael Wysocki , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Viresh Kumar Subject: [PATCH V2 00/17] thermal: cpu_cooling: improve interaction with cpufreq core Date: Mon, 17 Apr 2017 11:31:45 +0530 Message-Id: X-Mailer: git-send-email 2.12.0.432.g71c3a4f4ba37 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guys, The cpu_cooling driver is designed to use CPU frequency scaling to avoid high thermal states for a platform. But it wasn't glued really well with cpufreq core. This series tries to improve interactions between cpufreq core and cpu_cooling driver and does some fixes/cleanups to the cpu_cooling driver. I have tested it on ARM 32 (exynos) and 64 bit (hikey) boards and have pushed them for 0-day build bot and kernel CI testing as well. We should know if something is broken with these. @Javi: It would be good if you can give them a test, specially because of your work on the "power" specific bits in the driver. Pushed here as well: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git thermal/cooling V1->V2: - Name cpufreq cooling dev as cpufreq_cdev everywhere (Eduardo). -- viresh Viresh Kumar (17): thermal: cpu_cooling: Avoid accessing potentially freed structures thermal: cpu_cooling: rearrange globals thermal: cpu_cooling: Name cpufreq cooling devices as cpufreq_cdev thermal: cpu_cooling: replace cool_dev with cdev thermal: cpu_cooling: remove cpufreq_cooling_get_level() thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state() thermal: cpu_cooling: use cpufreq_policy to register cooling device cpufreq: create cpufreq_table_count_valid_entries() thermal: cpu_cooling: store cpufreq policy thermal: cpu_cooling: OPPs are registered for all CPUs thermal: cpu_cooling: get rid of 'allowed_cpus' thermal: cpu_cooling: merge frequency and power tables thermal: cpu_cooling: create structure for idle time stats thermal: cpu_cooling: get_level() can't fail thermal: cpu_cooling: don't store cpu_dev in cpufreq_cdev thermal: cpu_cooling: 'freq' can't be zero in cpufreq_state2power() thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device drivers/cpufreq/arm_big_little.c | 2 +- drivers/cpufreq/cpufreq-dt.c | 2 +- drivers/cpufreq/cpufreq_stats.c | 13 +- drivers/cpufreq/dbx500-cpufreq.c | 2 +- drivers/cpufreq/mt8173-cpufreq.c | 4 +- drivers/cpufreq/qoriq-cpufreq.c | 3 +- drivers/thermal/cpu_cooling.c | 579 ++++++++------------- drivers/thermal/imx_thermal.c | 22 +- drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 22 +- include/linux/cpu_cooling.h | 32 +- include/linux/cpufreq.h | 14 + 11 files changed, 297 insertions(+), 398 deletions(-) -- 2.12.0.432.g71c3a4f4ba37