cpufreq: Introduce new relation for freq selection

Introduce CPUFREQ_RELATION_C for frequency selection.
It selects the frequency with the minimum euclidean distance
to target. In case of equal distance between 2 frequencies,
it will select the greater freq.

Change-Id: Iddfcf37926d4e1152539616e16effcdd75d03487
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
cpufreq: Break out early if freq equals to target_freq

Change-Id: I5804541c26fd507f4514e0e438ca1604ce158848
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
cpufreq: export the cpu load across cores to the policy struct. On Performance governor let's emulate a constant 100% load (in this Kernel's case it will make all cores online, which is kinda the purpose of a performance governor isn't it?).

Change-Id: Ia2892dadee55d90d5d3d7dc8f0238078c7aa269e
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: Initial CPU utilization should be 0

Change-Id: Ica1b2220e6a1c5998bfa0d1a67b8a90fc941febd
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
cpufreq: interactive: q squash code from HH repo.

Change-Id: I8ddd46adc6d6f8c69f0992a807ee79e2170abb6b
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
cpufreq: cpu-boost: Don't register for cpufreq notifiers too early

The cpufreq notifiers should be registered only after all the data
structures used in the notifier callbacks have been initialized. So, move
the cpufreq notifier registration to a later point in the init function.

Change-Id: I043ab5bc0ebb98164c40549fe151a8d801c8c186
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
cpufreq: cpu-boost: merge missing bit of thread priority from https://github.com/myfluxi/kernel_msm/commit/9fbbbdd70ee1ef19e77eb72830cc53ae5c426515

Change-Id: I53bba677ca6710506b89b80ea9ead608921bae13
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: this governor is fundamentally different from Ondemand and by norm its a bit more sensitive to load changes in terms of which freqs are chosen, but even though sometimes it can be a little stupid and non react to load changes that linearly as one could hope for (even though it's better than Ondemand) so for that reason let's try to use this new formula by @stratosk found in this commit: https://github.com/stratosk/kernel_msm/commit/9df03b662b9c213c75ac082138f5ab8afadb9d94 make sure you read his commit message for better understanding of this.

Change-Id: Ida8341840d3bc09fabe1b21acb881af5822cddfb
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: calculate the load based on max (which is volatile) and not cpuinfo.max_freq, which is always 3GHz.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>