From patchwork Tue Apr 16 19:38:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 162354 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4616101jan; Tue, 16 Apr 2019 12:39:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLW+8IAxQLV202lNsKX4yZkEEoq+I/S7bnp5BrWT6JLo1OKiUbXmLGuWxRu2w24eYI46ze X-Received: by 2002:a17:902:7043:: with SMTP id h3mr85717557plt.228.1555443540040; Tue, 16 Apr 2019 12:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555443540; cv=none; d=google.com; s=arc-20160816; b=N9T9CN1r6KDpKZJw7M/d6Ek+iq6tOzLKuE2iiL8RCdPNt2sUL2Rcd4imrmMwWyeX76 dSJDOBliY9owMsUtv7qq4UJniz7s5GTBA42VdO+e2H3p8DG3dupkL1mdOAzueqnYvJ3x luw8vyeFOq74W0Rs+w+njTO3+MNX8t7jrfqudWN4wDZx5kNqttLpdRiS+hYFBLvAxlMj j7dYZJIJfL1LXt5QEaxbXJ+wojjSWp3+hGJI2NzbeaYwb0qBV2Eno+p+1RHxerZsYukY iRIFJxaubd2fUW0725A6aeKMqFy8UpdRMX8SZyAEwwxueZBq5toMcQgW3bo5YJj+mox/ jnAA== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=DHvwucClEuE6vcfN7CuEc8eFK+qMiBspP3oOBK+KZZE=; b=kzw08srF4KT205vam/k1IsfMrwS3IcF4hyhPuMXmJ+nVgG7/hWCoA+Vi2iyfcZX5uU fNeJfROn7OONVAUC3tdkjIJbfHrldHKJOg8N9lFCmWXesxi2fzANMDw2QBwXP9CMMPrf CYIY70H2qOgORtQC/NVJ+NCEkj1H1qHFkVyP6mZ+At6V8NqhkdG6prQjko608+fvGCq9 kFcRr/hDMx8f3Y6CXPCkMF3mlhOK3J6o/IswPoq9L5DuAXFp+Jlw6Pkl907S01z7h+Vw AZQvyu5WIPEN0JMlviF6M7R9I/Pa0R3VtBn88Pt7vaUAV72jILnwY0wm1UYSg8K5fgzF 7yPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="sL/wnHvm"; 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 t185si25826136pgd.485.2019.04.16.12.38.59; Tue, 16 Apr 2019 12:39:00 -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 header.s=google header.b="sL/wnHvm"; 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 S1730263AbfDPTiw (ORCPT + 30 others); Tue, 16 Apr 2019 15:38:52 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:36418 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729925AbfDPTiu (ORCPT ); Tue, 16 Apr 2019 15:38:50 -0400 Received: by mail-qt1-f195.google.com with SMTP id s15so24745951qtn.3 for ; Tue, 16 Apr 2019 12:38:49 -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:in-reply-to:references; bh=DHvwucClEuE6vcfN7CuEc8eFK+qMiBspP3oOBK+KZZE=; b=sL/wnHvmS8sJ5Cgb3Z/Ioo4m4Apbm4Eve1PwNIh0xYbgNh9Vq/AFdwbWhtBb2XDgcH U+XlSoQjehVMSTlhE4hbEZ7fsx9HJDnkExCEXL9rTkN9QiX16Y2FvKWTLyT4HumqseVu 3ejFYFn/9cM5kSutWvOF6wi2ClYNEOBzACNvN/CDnG329cP6gI53yhlzJRTjCSIQZuo7 6qA5W4s7vHgrSoYYlAMXt7iV6XhbeOTSAR2ztxVcDNpOh4+ysiRzXhm3XgUHRVQY6hRw t7RPjuVGg3NiDSZQXMlwDW5XqbAHI28D6/FSvuHTxGdAIBe5IgdW7a3r0lBMLh8AuB0O LhSQ== 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; bh=DHvwucClEuE6vcfN7CuEc8eFK+qMiBspP3oOBK+KZZE=; b=rgRlBDYREevXegaD5BqZaz+VbktMkH01IBSczsa3/F4G7T4wNIFuWFt54vAnRlKxt0 t55shLH/bEphhxwpsRhL2KhuKoL87LlXVRmjMTaDrh3fyah0ziek6IzZWRogImHFuQVr mgvsuhv1mXSqkK7jy2y4p+aVgOU0MNipiMb3Pj1VSKufTWtmjSr4I/eg/N9/qsT0vxpn OKKf59oduSeeC7QVHJcaBmU5gcaR5PqaadKSIF7aL43XvQAaBokb3I3JGPx30b1WvA0n Vi/4e39SKvNtA2gil2vT8INar1xa+p7ROgwtssDuJFYHub1zBMqcSDZL3NLZ946gmfRe 9n2g== X-Gm-Message-State: APjAAAWx2o8RlIcnJW80l6h6TW+JtK2+YoOm/IBZwwa1kjE2wzrN/D0h YFPs3Hnxfjy7S2Kx8A5NuWmmHg== X-Received: by 2002:aed:3f49:: with SMTP id q9mr69900551qtf.279.1555443528979; Tue, 16 Apr 2019 12:38:48 -0700 (PDT) Received: from Thara-Work-Ubuntu.fios-router.home (pool-71-255-245-97.washdc.fios.verizon.net. [71.255.245.97]) by smtp.googlemail.com with ESMTPSA id k41sm46150797qtc.89.2019.04.16.12.38.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Apr 2019 12:38:48 -0700 (PDT) From: Thara Gopinath To: mingo@redhat.com, peterz@infradead.org, rui.zhang@intel.com Cc: linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, viresh.kumar@linaro.org, javi.merino@kernel.org, edubezval@gmail.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, nicolas.dechesne@linaro.org, bjorn.andersson@linaro.org, dietmar.eggemann@arm.com Subject: [PATCH V3 3/3] thermal/cpu-cooling: Update thermal pressure in case of a maximum frequency capping Date: Tue, 16 Apr 2019 15:38:41 -0400 Message-Id: <1555443521-579-4-git-send-email-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1555443521-579-1-git-send-email-thara.gopinath@linaro.org> References: <1555443521-579-1-git-send-email-thara.gopinath@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable cpufreq cooling device to update the thermal pressure in event of a capped maximum frequency or removal of capped maximum frequency. Signed-off-by: Thara Gopinath --- drivers/thermal/cpu_cooling.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.1.4 diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 6fff161..d5cc3c3 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -177,6 +178,9 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, if (policy->max > clipped_freq) cpufreq_verify_within_limits(policy, 0, clipped_freq); + + sched_update_thermal_pressure(policy->cpus, + policy->max, policy->cpuinfo.max_freq); break; } mutex_unlock(&cooling_list_lock);