mako_hotplug: Add my Hotplug driver.

Change-Id: I31966aa78d141774090e3e5044c02bccf8580c9e
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: we can live with 80% threshold.

Change-Id: I7f7c8bc6f5af7e02f74c91b5235d8c3f9d324d62
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: we can now cap max freq to 1GHz on screen off.

Change-Id: I832c035aeaf7896ee3dd76253a63cbd0056a0374
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: without updating the policy nothing actually happened.

Change-Id: I3ba8c1f8d4288adcc21af9b73b95696ba09bcce3
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: make sure the notifier does not go through for every damn CPUFREQ_ADJUST otherwise it's a mess.

Change-Id: I1abbc5cd36838aeea3d74db4e24c7e72a541c00b
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: lets try this fix for the crippling sound when changing networks.

Change-Id: I56e9695aa1dd3ccc6a94b2432263bf6fe399571d
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: minor code optimisations.

Change-Id: I9cb4138141d8096d33610df3bbee9175f91d55d3
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: small fix to make sure we don't try to cpu_up(x) if x is alread online.

Change-Id: I9f2f65b04140ea74363639fbd61545d6e3e30b18
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: clean-up

* clean up the store functions using proper and modern kstrtoul

Change-Id: I258f539b37945c817a71ddd6a1371832d9d812eb
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: bugfixing

* fix a bug where cpu_smash()->cpus_cpufreq_work()->cpus_offline_work()
was being called every 100ms

Change-Id: I07fa9b95b77994bd36ba9cd3e8c93298ea42bfff
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: fix checkpatch warnings

Change-Id: I79f4bad71947c0074815e1eb6dc8482b5a219ddd
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: we can shift left here instead.

Change-Id: I29b2a1b5601248f4fa29f882e72e973694520c7a
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: fix a bug where all cores could stay indefinitely online

if userspace (either root command or an app) onlined all cores when the counter was < 10.
Fix it by querying the num_online_cpus() every sample (100ms).

Change-Id: Ia3e01e647b1d451a31e237c735445d711ac35e30
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: fix a rare case where the restored frequency wouldn't be the same as when the device wen't to sleep.

Change-Id: I960307cfdcc8af494d0739309a116a7ae5b0f564
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: don't call the screen on work aon boot after the first screen on.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: improve the suspend/resume routines on the cpu frequency management.

Change-Id: I10e0b7daebe334e52e0027eb3d91decc92948a3c
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: fix a bug where all the cores would be left online if the min cpu would be >= CPUFREQ_UNPLUG_LIMIT

Change-Id: I3c12a5c4faa276f2a5a928475d7674035a2d3315
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: fix some weird behaviours on rare cases during suspend/resume

Change-Id: Id2bee29b63a5208bfde8ade5afff14a06bf10f93
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: disable lcd notify code

Change-Id: I180acb27a65f2a5e693e74c29697c84b4bf5eb1d
kthread: introduce to_live_kthread()

"k->vfork_done != NULL" with a barrier() after to_kthread(k) in
task_get_live_kthread(k) looks unclear, and sub-optimal because we load
->vfork_done twice.

All we need is to ensure that we do not return to_kthread(NULL).  Add a
new trivial helper which loads/checks ->vfork_done once, this also looks
more understandable.

Change-Id: Ibe38ccd660032974e2b15a8c35f216daf7e64f30
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>