From: 黄涛 <huangtao@rock-chips.com>
Date: Wed, 22 Aug 2012 06:42:16 +0000 (+0800)
Subject: Revert "cpufreq: introduce hotplug governor"
X-Git-Tag: firefly_0821_release~8865
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4839f665f5d22d65c8f1542f5e75a4a531893d83;p=firefly-linux-kernel-4.4.55.git

Revert "cpufreq: introduce hotplug governor"

This reverts commit 1b02ab5fd585f88b65379b81874c75f66eec6492.
---

diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index da3cfb34825d..963a543bde4d 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -252,33 +252,6 @@ min_sample_time, after which speeds are allowed to drop below
 hispeed_freq according to load as usual.
 
 
-2.7 Hotplug
------------
-
-The CPUfreq governor "hotplug" operates similary to "ondemand" and
-"conservative".  It's decisions are based primarily on CPU load.  Like
-"ondemand" the "hotplug" governor will ramp up to the highest frequency
-once the run-time tunable "up_threshold" parameter is crossed.  Like
-"conservative", the "hotplug" governor exports a "down_threshold"
-parameter that is also tunable at run-time.  When the "down_threshold"
-is crossed the CPU transitions to the next lowest frequency in the
-CPUfreq frequency table instead of decrementing the frequency based on a
-percentage of maximum load.
-
-The main reason "hotplug" governor exists is for architectures requiring
-that only the master CPU be online in order to hit low-power states
-(C-states).  OMAP4 is one such example of this.  The "hotplug" governor
-is also helpful in reducing thermal output in devices with tight thermal
-constraints.
-
-Auxillary CPUs are onlined/offline based on CPU load, but the decision
-to do so is made after averaging several sampling windows.  This is to
-reduce CPU hotplug "thrashing", which can be caused by normal system
-entropy and leads to lots of spurious plug-in and plug-out transitions.
-The number of sampling periods averaged together is tunable via the
-"hotplug_in_sampling_periods" and "hotplug_out_sampling_periods"
-run-time tunable parameters.
-
 3. The Governor Interface in the CPUfreq Core
 =============================================
 
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index f2f64a0b72c5..194708850ede 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -109,19 +109,6 @@ config CPU_FREQ_DEFAULT_GOV_INTERACTIVE
 	  loading your cpufreq low-level hardware driver, using the
 	  'interactive' governor for latency-sensitive workloads.
 
-config CPU_FREQ_DEFAULT_GOV_HOTPLUG
-	bool "hotplug"
-	select CPU_FREQ_GOV_HOTPLUG
-	select CPU_FREQ_GOV_PERFORMANCE
-	help
-	  Use the CPUFreq governor 'hotplug' as default. This allows you
-	  to get a full dynamic frequency capable system with CPU
-	  hotplug support by simply loading your cpufreq low-level
-	  hardware driver.  Be aware that not all cpufreq drivers
-	  support the hotplug governor. If unsure have a look at
-	  the help section of the driver. Fallback governor will be the
-	  performance governor.
-
 endchoice
 
 config CPU_FREQ_GOV_PERFORMANCE
@@ -224,25 +211,5 @@ depends on X86
 source "drivers/cpufreq/Kconfig.x86"
 endmenu
 
-config CPU_FREQ_GOV_HOTPLUG
-	tristate "'hotplug' cpufreq governor"
-	depends on CPU_FREQ && NO_HZ && HOTPLUG_CPU
-	help
-	  'hotplug' - this driver mimics the frequency scaling behavior
-	  in 'ondemand', but with several key differences.  First is
-	  that frequency transitions use the CPUFreq table directly,
-	  instead of incrementing in a percentage of the maximum
-	  available frequency.  Second 'hotplug' will offline auxillary
-	  CPUs when the system is idle, and online those CPUs once the
-	  system becomes busy again.  This last feature is needed for
-	  architectures which transition to low power states when only
-	  the "master" CPU is online, or for thermally constrained
-	  devices.
-
-	  If you don't have one of these architectures or devices, use
-	  'ondemand' instead.
-
-	  If in doubt, say N.
-
 endif
 endmenu
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 1a5e64d6fcf3..c044060a4b07 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -10,7 +10,6 @@ obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE)	+= cpufreq_userspace.o
 obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND)	+= cpufreq_ondemand.o
 obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE)	+= cpufreq_conservative.o
 obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE)	+= cpufreq_interactive.o
-obj-$(CONFIG_CPU_FREQ_GOV_HOTPLUG)	+= cpufreq_hotplug.o
 
 # CPUfreq cross-arch helpers
 obj-$(CONFIG_CPU_FREQ_TABLE)		+= freq_table.o
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 6f492ea8a1ac..ae06dc9a0cda 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -361,9 +361,6 @@ extern struct cpufreq_governor cpufreq_gov_conservative;
 #elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE)
 extern struct cpufreq_governor cpufreq_gov_interactive;
 #define CPUFREQ_DEFAULT_GOVERNOR	(&cpufreq_gov_interactive)
-#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG)
-extern struct cpufreq_governor cpufreq_gov_hotplug;
-#define CPUFREQ_DEFAULT_GOVERNOR	(&cpufreq_gov_hotplug)
 #endif