All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti P Miettinen <amiettinen@nvidia.com>
To: davej@redhat.com, pavel@ucw.cz, rjw@sisk.pl, len.brown@intel.com,
	khilman@ti.com, j-pihet@ti.com, markgross@thegnar.org,
	cpufreq@vger.kernel.org, linux-pm@lists.linux-foundation.org
Subject: [PATCH 1/2] PM QoS: Add CPU frequency maximum as PM QoS param
Date: Thu, 19 Jan 2012 14:35:58 +0200	[thread overview]
Message-ID: <1326976559-4009-2-git-send-email-amiettinen@nvidia.com> (raw)
In-Reply-To: <1326976559-4009-1-git-send-email-amiettinen@nvidia.com>

Add maximum CPU frequency as PM QoS parameter.

Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
---
 include/linux/pm_qos.h |    2 ++
 kernel/power/qos.c     |   15 +++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 54a0d00..7b8d08b 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -15,6 +15,7 @@ enum {
 	PM_QOS_NETWORK_LATENCY,
 	PM_QOS_NETWORK_THROUGHPUT,
 	PM_QOS_CPU_FREQ_MIN,
+	PM_QOS_CPU_FREQ_MAX,
 
 	/* insert new class ID */
 
@@ -28,6 +29,7 @@ enum {
 #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE	0
 #define PM_QOS_DEV_LAT_DEFAULT_VALUE		0
 #define PM_QOS_CPU_FREQ_MIN_DEFAULT_VALUE	0
+#define PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE	LONG_MAX
 
 struct pm_qos_request {
 	struct plist_node node;
diff --git a/kernel/power/qos.c b/kernel/power/qos.c
index 07d761a..04b744b 100644
--- a/kernel/power/qos.c
+++ b/kernel/power/qos.c
@@ -115,12 +115,27 @@ static struct pm_qos_object cpu_freq_min_pm_qos = {
 };
 
 
+static BLOCKING_NOTIFIER_HEAD(cpu_freq_max_notifier);
+static struct pm_qos_constraints cpu_freq_max_constraints = {
+	.list = PLIST_HEAD_INIT(cpu_freq_max_constraints.list),
+	.target_value = PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE,
+	.default_value = PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE,
+	.type = PM_QOS_MIN,
+	.notifiers = &cpu_freq_max_notifier,
+};
+static struct pm_qos_object cpu_freq_max_pm_qos = {
+	.constraints = &cpu_freq_max_constraints,
+	.name = "cpu_freq_max",
+};
+
+
 static struct pm_qos_object *pm_qos_array[] = {
 	&null_pm_qos,
 	&cpu_dma_pm_qos,
 	&network_lat_pm_qos,
 	&network_throughput_pm_qos,
 	&cpu_freq_min_pm_qos,
+	&cpu_freq_max_pm_qos,
 };
 
 static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,
-- 
1.7.4.1


  reply	other threads:[~2012-01-19 12:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 12:35 [PATCH 0/2] RFC: CPU frequency max as PM QoS param Antti P Miettinen
2012-01-19 12:35 ` Antti P Miettinen [this message]
2012-01-19 12:35 ` [PATCH 2/2] cpufreq: Enforce PM QoS maximum frequency Antti P Miettinen
2012-02-16  1:06 ` [linux-pm] [PATCH 0/2] RFC: CPU frequency max as PM QoS param Kevin Hilman
2012-02-17  3:04   ` mark gross
2012-02-17  8:12     ` [linux-pm] " Valentin, Eduardo
2012-02-20 10:00       ` Antti P Miettinen
     [not found]         ` <CAGF5oy-64J3vMKvzY=NvdV-m8_wFo=NGZANF_cnVm-iq0s-wZQ@mail.gmail.com>
     [not found]           ` <20120221145632.GA2840@envy17>
     [not found]             ` <87linw5aod.fsf@ti.com>
     [not found]               ` <20120225174449.GA17141@envy17>
2012-02-27 10:17                 ` [linux-pm] " Pihet-XID, Jean
2012-02-27 11:00                   ` Antti P Miettinen
     [not found]                 ` <877gz8wcud.fsf@ti.com>
2012-02-27 15:04                   ` Antti Miettinen
2012-02-28  0:56                     ` [linux-pm] " mark gross
2012-02-28  9:37                       ` Antti P Miettinen
2012-03-04 22:46                         ` Rafael J. Wysocki
2012-03-06 12:23                           ` Antti P Miettinen
2012-03-06 14:37                             ` Dave Jones
2012-03-07  6:38                               ` Antti P Miettinen
2012-03-07 16:59                                 ` Dave Jones
2012-03-07 18:08                                   ` Antti P Miettinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1326976559-4009-2-git-send-email-amiettinen@nvidia.com \
    --to=amiettinen@nvidia.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=j-pihet@ti.com \
    --cc=khilman@ti.com \
    --cc=len.brown@intel.com \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=markgross@thegnar.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.