All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Rafael Wysocki <rjw@rjwysocki.net>, Sekhar Nori <nsekhar@ti.com>,
	Kevin Hilman <khilman@kernel.org>
Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Shawn Guo <shawn.guo@freescale.com>,
	Steven Miao <realmz6@gmail.com>
Subject: [PATCH 01/11] ARM: davinci: Sort frequency table
Date: Thu,  2 Jun 2016 19:49:01 +0530	[thread overview]
Message-ID: <08ad59656c493a72284c523560fb820deac95520.1464876460.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1464876460.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1464876460.git.viresh.kumar@linaro.org>

This is required for some of the changes in cpufreq core. There was only
one function dependent on the order of the table, that is fixed as well.

Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-davinci/da850.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 239886299968..f683c119cfed 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1004,13 +1004,14 @@ static const struct da850_opp da850_opp_96 = {
 		.frequency = freq * 1000, \
 	}
 
+/* Table sorted in ascending order of frequencies */
 static struct cpufreq_frequency_table da850_freq_table[] = {
-	OPP(456),
-	OPP(408),
-	OPP(372),
-	OPP(300),
-	OPP(200),
 	OPP(96),
+	OPP(200),
+	OPP(300),
+	OPP(372),
+	OPP(408),
+	OPP(456),
 	{
 		.driver_data		= 0,
 		.frequency	= CPUFREQ_TABLE_END,
@@ -1076,8 +1077,9 @@ int da850_register_cpufreq(char *async_clk)
 		clk_add_alias("async", da850_cpufreq_device.name,
 							async_clk, NULL);
 	for (i = 0; i < ARRAY_SIZE(da850_freq_table); i++) {
-		if (da850_freq_table[i].frequency <= da850_max_speed) {
-			cpufreq_info.freq_table = &da850_freq_table[i];
+		if (da850_freq_table[i].frequency > da850_max_speed) {
+			&da850_freq_table[i].driver_data = 0;
+			&da850_freq_table[i].frequency = CPUFREQ_TABLE_END;
 			break;
 		}
 	}
-- 
2.7.1.410.g6faf27b

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Rafael Wysocki <rjw@rjwysocki.net>, Sekhar Nori <nsekhar@ti.com>,
	Kevin Hilman <khilman@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Steven Miao <realmz6@gmail.com>,
	linux-kernel@vger.kernel.org, Kukjin Kim <kgene@kernel.org>,
	Shawn Guo <shawn.guo@freescale.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/11] ARM: davinci: Sort frequency table
Date: Thu,  2 Jun 2016 19:49:01 +0530	[thread overview]
Message-ID: <08ad59656c493a72284c523560fb820deac95520.1464876460.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1464876460.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1464876460.git.viresh.kumar@linaro.org>

This is required for some of the changes in cpufreq core. There was only
one function dependent on the order of the table, that is fixed as well.

Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-davinci/da850.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 239886299968..f683c119cfed 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1004,13 +1004,14 @@ static const struct da850_opp da850_opp_96 = {
 		.frequency = freq * 1000, \
 	}
 
+/* Table sorted in ascending order of frequencies */
 static struct cpufreq_frequency_table da850_freq_table[] = {
-	OPP(456),
-	OPP(408),
-	OPP(372),
-	OPP(300),
-	OPP(200),
 	OPP(96),
+	OPP(200),
+	OPP(300),
+	OPP(372),
+	OPP(408),
+	OPP(456),
 	{
 		.driver_data		= 0,
 		.frequency	= CPUFREQ_TABLE_END,
@@ -1076,8 +1077,9 @@ int da850_register_cpufreq(char *async_clk)
 		clk_add_alias("async", da850_cpufreq_device.name,
 							async_clk, NULL);
 	for (i = 0; i < ARRAY_SIZE(da850_freq_table); i++) {
-		if (da850_freq_table[i].frequency <= da850_max_speed) {
-			cpufreq_info.freq_table = &da850_freq_table[i];
+		if (da850_freq_table[i].frequency > da850_max_speed) {
+			&da850_freq_table[i].driver_data = 0;
+			&da850_freq_table[i].frequency = CPUFREQ_TABLE_END;
 			break;
 		}
 	}
-- 
2.7.1.410.g6faf27b

WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/11] ARM: davinci: Sort frequency table
Date: Thu,  2 Jun 2016 19:49:01 +0530	[thread overview]
Message-ID: <08ad59656c493a72284c523560fb820deac95520.1464876460.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1464876460.git.viresh.kumar@linaro.org>

This is required for some of the changes in cpufreq core. There was only
one function dependent on the order of the table, that is fixed as well.

Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 arch/arm/mach-davinci/da850.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 239886299968..f683c119cfed 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1004,13 +1004,14 @@ static const struct da850_opp da850_opp_96 = {
 		.frequency = freq * 1000, \
 	}
 
+/* Table sorted in ascending order of frequencies */
 static struct cpufreq_frequency_table da850_freq_table[] = {
-	OPP(456),
-	OPP(408),
-	OPP(372),
-	OPP(300),
-	OPP(200),
 	OPP(96),
+	OPP(200),
+	OPP(300),
+	OPP(372),
+	OPP(408),
+	OPP(456),
 	{
 		.driver_data		= 0,
 		.frequency	= CPUFREQ_TABLE_END,
@@ -1076,8 +1077,9 @@ int da850_register_cpufreq(char *async_clk)
 		clk_add_alias("async", da850_cpufreq_device.name,
 							async_clk, NULL);
 	for (i = 0; i < ARRAY_SIZE(da850_freq_table); i++) {
-		if (da850_freq_table[i].frequency <= da850_max_speed) {
-			cpufreq_info.freq_table = &da850_freq_table[i];
+		if (da850_freq_table[i].frequency > da850_max_speed) {
+			&da850_freq_table[i].driver_data = 0;
+			&da850_freq_table[i].frequency = CPUFREQ_TABLE_END;
 			break;
 		}
 	}
-- 
2.7.1.410.g6faf27b

  reply	other threads:[~2016-06-02 14:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 14:19 [PATCH 00/11] cpufreq: Keep policy->freq_table sorted Viresh Kumar
2016-06-02 14:19 ` Viresh Kumar [this message]
2016-06-02 14:19   ` [PATCH 01/11] ARM: davinci: Sort frequency table Viresh Kumar
2016-06-02 14:19   ` Viresh Kumar
2016-06-02 14:19 ` [PATCH 02/11] cpufreq: davinci: Reuse cpufreq_generic_frequency_table_verify() Viresh Kumar
2016-06-02 14:19 ` [PATCH 03/11] cpufreq: Use policy->freq_table in ->target_index() Viresh Kumar
2016-06-02 14:19   ` Viresh Kumar
2016-06-02 14:19 ` [PATCH 04/11] cpufreq: blackfin: Use 'index' only to index into policy->freq_table Viresh Kumar
2016-06-02 14:19 ` [PATCH 05/11] cpufreq: elanfreq: " Viresh Kumar
2016-06-02 14:19 ` [PATCH 06/11] cpufreq: exynos: " Viresh Kumar
2016-06-02 14:19   ` Viresh Kumar
2016-06-02 14:19 ` [PATCH 07/11] cpufreq: ia64: " Viresh Kumar
2016-06-02 14:19 ` [PATCH 08/11] cpufreq: imx: " Viresh Kumar
2016-06-02 14:19 ` [PATCH 09/11] cpufreq: maple: " Viresh Kumar
2016-06-02 14:19 ` [PATCH 10/11] cpufreq: Keep a single (sorted) freq_table Viresh Kumar
2016-06-02 14:19 ` [PATCH 11/11] cpufreq: drivers: Free frequency tables after being used Viresh Kumar
2016-06-02 15:08 ` [PATCH 00/11] cpufreq: Keep policy->freq_table sorted Rafael J. Wysocki
2016-06-02 15:42   ` Viresh Kumar
2016-06-02 20:35     ` Rafael J. Wysocki
2016-06-03  0:01       ` Viresh Kumar
2016-06-03  1:43         ` Rafael J. Wysocki
2016-06-03  3:11           ` Viresh Kumar

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=08ad59656c493a72284c523560fb820deac95520.1464876460.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=dbaryshkov@gmail.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=khilman@kernel.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=realmz6@gmail.com \
    --cc=rjw@rjwysocki.net \
    --cc=shawn.guo@freescale.com \
    /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.