cpufreq: distinguish drivers that do asynchronous notifications
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 29 Oct 2013 13:26:06 +0000 (18:56 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 Oct 2013 23:11:08 +0000 (00:11 +0100)
There are few special cases like exynos5440 which doesn't send POSTCHANGE
notification from their ->target() routine and call some kind of bottom halves
for doing this work, work/tasklet/etc.. From which they finally send POSTCHANGE
notification.

Its better if we distinguish them from other cpufreq drivers in some way so that
core can handle them specially. So this patch introduces another flag:
CPUFREQ_ASYNC_NOTIFICATION, which will be set by such drivers.

This also changes exynos5440-cpufreq.c and powernow-k8 in order to set this
flag.

Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/exynos5440-cpufreq.c
drivers/cpufreq/powernow-k8.c
include/linux/cpufreq.h

index 1bf9b060d52298cdd089b62bd5bd2064d1994681..76bef8b078cbfa7c2d1364375063c344ae00fcd0 100644 (file)
@@ -312,7 +312,7 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
 }
 
 static struct cpufreq_driver exynos_driver = {
-       .flags          = CPUFREQ_STICKY,
+       .flags          = CPUFREQ_STICKY | CPUFREQ_ASYNC_NOTIFICATION,
        .verify         = cpufreq_generic_frequency_table_verify,
        .target_index   = exynos_target,
        .get            = exynos_getspeed,
index 62a1ce47d3df27c1b7397473b06d99bdfafeda39..0023c7d40a51a21994620907e75520e5512c5d52 100644 (file)
@@ -1204,6 +1204,7 @@ out:
 }
 
 static struct cpufreq_driver cpufreq_amd64_driver = {
+       .flags          = CPUFREQ_ASYNC_NOTIFICATION,
        .verify         = cpufreq_generic_frequency_table_verify,
        .target_index   = powernowk8_target,
        .bios_limit     = acpi_processor_get_bios_limit,
index 93a8c34d6c7fc9e73a6bf1290cb114c6fd8f9c26..5bd6ab9b0c2750fca49409c9714d41f1ce7a2d9f 100644 (file)
@@ -237,6 +237,13 @@ struct cpufreq_driver {
  */
 #define CPUFREQ_HAVE_GOVERNOR_PER_POLICY (1 << 3)
 
+/*
+ * Driver will do POSTCHANGE notifications from outside of their ->target()
+ * routine and so must set cpufreq_driver->flags with this flag, so that core
+ * can handle them specially.
+ */
+#define CPUFREQ_ASYNC_NOTIFICATION  (1 << 4)
+
 int cpufreq_register_driver(struct cpufreq_driver *driver_data);
 int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
 
This page took 0.030085 seconds and 5 git commands to generate.