[lkml]   [2014]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] cpufreq: set value of CPUFREQ_BOOST_FREQ to 0xABABABAB
Ideally, .driver_data field of struct cpufreq_frequency_table must not be used
by core at all. But during a recent change if its value is same as
CPUFREQ_BOOST_FREQ macro, then it is treated specially by core.

The value of this macro was set to ~2 earlier, i.e. 0xFFFFFFFD. In case some
driver is using this field for its own data and sets this field to -3, then with
two's complement that value will also become 0xFFFFFFFD.

To fix this issue, lets change value of this flag to a very uncommon value which
shouldn't be used by any driver unless they want to use BOOST feature.

Along with this update comments to make this more clear.

Signed-off-by: Viresh Kumar <>

Gautham/Vaidy: I hope this fixes the problem we discussed for your patchset.

include/linux/cpufreq.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index c48e595..9f25d9d 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -455,12 +455,18 @@ extern struct cpufreq_governor cpufreq_gov_conservative;

+/* Special Values of .frequency field */
+/* Special Values of .driver_data field */

struct cpufreq_frequency_table {
- unsigned int driver_data; /* driver specific data, not used by core */
+ /*
+ * driver specific data, not used by core unless it is set to
+ */
+ unsigned int driver_data;
unsigned int frequency; /* kHz - doesn't need to be in ascending
* order */

 \ /
  Last update: 2014-03-24 08:41    [W:0.105 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site