cpufreq: Introduce Optimax

adapted from :
https://github.com/AICP/kernel_lge_msm8974/commit/54f6f59b37fdb5ea93c610630c6d1274eb90728b

Change-Id: I442990a159399ef786886f9274fb00b0c78e9277
Signed-off-by: cj360 <ayunker551@gmail.com>
Squashed commits for Unified cpufreq support

cpufreq: unified governor and scaling min and max switching
governor scaling_min_freq and scaling_max_freq will be populated to all online cpus immediately

cpufreq: unified governor and scaling min and max switching
use related_cpus to apply correctly to new online cpus

Conflicts:
	arch/arm/mach-msm/cpufreq.c

cpufreq: block hotplugging during multi-cpu operations

cpufreq: dont apply multi-cpu values if not changed
tracing/sched: Add trace events to track cpu hotplug.

Add ftrace event trace_sched_cpu_hotplug to track cpu
hot-add and hot-remove events.

This is useful in a variety of power, performance and
debug analysis scenarios.

Change-Id: I5d202c7a229ffacc3aafb7cf9afee0b0ee7b0931
Signed-off-by: Arun Bharadwaj <abharadw@codeaurora.org>
smp: Relax irqs_disable() warning in smp_call_function_single()

The change that long-ago added the interrupts-disabled warning in
smp_call_function_single() cited the following deadlock as the reason:
	CPU A				CPU B
	Disable interrupts
					smp_call_function()
					Take call_lock
					Send IPIs
					Wait for all cpus to acknowledge IPI
					CPU A has not responded, spin waiting
					for cpu A to respond, holding call_lock
	smp_call_function()
	Spin waiting for call_lock
	Deadlock			Deadlock

Such a deadlock is not possible however, in the event that
smp_call_function_single() is called for the currently-executing CPU.
While not a common usecase, relaxing the warning may simplify some
driver implementations.

The 'acpuclock-krait' driver in the MSM ARM sub-architecture provides
one example, where smp_call_function_single() is sometimes called from
a cpuidle path with interrupts disabled, but only ever from the target
CPU. Other callers of that same function may cross-call, but only do so
when interrupts are enabled.

Bug: 10858938
Change-Id: I647b3b46fe6aa4dfb06f7750396986b80b92d700
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>