cpufreq: introduce hotplug governor

The "hotplug" governor scales CPU frequency based on load, similar to
"ondemand".  It scales up to the highest frequency when "up_threshold"
is crossed and scales down one frequency at a time when "down_threshold"
is crossed.  Unlike those governors, target frequencies are determined
by directly accessing the CPUfreq frequency table, instead of taking
some percentage of maximum available frequency.

The key difference in the "hotplug" governor is that it will disable
auxillary CPUs when the system is very idle, and enable them again once
the system becomes busy.  This is achieved by averaging load over
multiple sampling periods; if CPUs were online or offlined based on a
single sampling period then thrashing will occur.

Sysfs entries exist for "hotplug_in_sampling_periods" and for
"hotplug_out_sampling_periods" which determine how many consecutive
periods get averaged to determine if auxillery CPUs should be onlined or
offlined.  Defaults are 5 periods and 20 periods respectively.
Otherwise the standard sysfs entries you might find for "ondemand" and
"conservative" governors are there.

To use this governor it is assumed that your CPUfreq driver has
populated the CPUfreq table, CONFIG_NO_HZ is enabled and
CONFIG_HOTPLUG_CPU is enabled.

Changes in V2:
	Corrected default sampling periods
	Optimized load history array resizing
	Maintain load history when resizing array
	Add locking to dbs_check_cpu
	Switch from enable_nonboot_cpus to cpu_up
	Switch from disable_nonboot_cpus to down_cpu
	Fix some printks
	Coding style around for-loops

Signed-off-by: Mike Turquette <mturquette@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
cpufreq: hotplug: Update governor policy

When 2 CPUs are plugged on, use the max load to decide
increasing/decreasing the frequency. Keep on using the average
load in the CPU hotplug policy.
Update the frequency decrease policy as done by the ondemand
governor: don't wait to cross the down_threshold in order to
decrease the frequency, go directly to the lowest frequency which
can support the current CPU utilization by keeping 30% of idle in
order to not cross the up_threshold.

The down_threshold is changed to 30 instead of 20 based on experiments.

This patch shows a good performance and power impact on the different
UCs of the OMAP4 platform:
- Divide by 2 the time of the sunspider web browsing benchmark.
- Gain of ~15mW on AV record use case.

Acked-by: Axel Haslam <axelhaslam@ti.com>
Signed-off-by: Nicole Chalhoub <n-chalhoub@ti.com>
CPUfreq: Hotplug: Update down threshold to 35% CPU load

This patch sets down threshold to 35% of CPU load. This implies freq
decrease happens when system load is less than 35%.
From different usecase analysis on reference platform we have seen average
savings of around 15-20mA on VBAT.
Also, this will impact on how quickly the CPU1 is offlined inturn helping
system to inactive in idle thread (For OMAP4 case).

Signed-off-by: Girish S G <girishsg@ti.com>
build_script: change toolchain directory
Revert "Revert "Revert "add undervolting"""

This reverts commit fcb2587efe5fdd8b2e224596216464ce01645c44.
cpufreq: backport cpuboost from linux 3.4
 cpufreq: Add a sync limit to cpu-boost

Perform frequency synchronization only when source CPU's frequency
is less than sync_threshold, else sync to the sync_threshold.
fs-writeback: fix occasional slow sync
mmc: disable crc for better performance
Revert "Add frandom support. Frandom needs to get built from source after running 'make mrproper'."

This reverts commit ce7ebd73d0075d484adeb931a0354fae96822523.
char: add frandom support

Conflicts:
	arch/arm/configs/0googymax2_defconfig
	drivers/char/Kconfig
	drivers/char/Makefile
Wireless: Enable mac adress change
wireless: Fix memory leak
char: fix Kconfig typo happend while resolving framdom conflicts
more optimization