Revert "add arm topology support"

This reverts commit 5e83db6186d787d47ffa378f258e5e4ba8984012.
msm: mpdecision: Add in-kernel CPU hotplug management

mach-msm: Add msm_mpdecision Kconfig & Makefile hooks

Change-Id: I1bb994370cf5568c01b1e99d74475f5d1ec52fe4
Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: Add msm_mpdecision

This currently only does the following thing:
Screen on -> CPU1 online
Screen off -> CPU1 offline

More to come.

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: small cleanup

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: add load based decision making

This now works like the mpdecision binary from QCOM.
CPU hotplugging/unplugging based on system load.

A sysfs interface will be built in with a later commit.

Change-Id: I6b8307a8e9f7425d99a84eb25798e8498cb9ba5a
Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: restructure locks, add delay

The new delay allows the CPU to come up before any other action is taken.
This prevents fast plugging and also ensures the CPU hotplug process
is really done, before trying to unplug it again (or plug it).

The new locks are more efficient, and only used if necessary.

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: pause if CPU is unplugged outside of mpdecision

This fixes cpu wars if something else tries to control the cpus.
default delay: 10000ms

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: change early_suspend_level to blank_screen

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: don't start immediately

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: show cpumask after up/down

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: always set the suspend var

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: remove up/down delay, our default delay is large enough

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: remove debug output

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: add email to (c)

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: fix foreign hotplug/unplug detection

Signed-off-by: showp1984 <showp1984@gmail.com>

Conflicts:

	arch/arm/mach-msm/msm_mpdecision.c

mach-msm: mpdecision: show how long the cpu was online

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: rename msm_mpdec_suspend to msm_mpdec_cpudata

Since this is being used for more than suspend stuff the old name
just isn't accurate anymore.

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: add sysfs interface

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: increase startdelay for sense

Surprise! Sense needs a lot longer to boot up than aosp...

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: adjust thresholds for sense

Sense is just too hungry...

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: fix foreign cpu control detection

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: allow mpdecision to be disabled (sysfs)

This allows disabling/enabling of mpdecision over sysfs.

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: increase start delay for Sense

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: increase up threshold for Sense

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: sysfs: check if cpu is offline before hotplugging it

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: don't turn off cpu1 if freq > idle

This fixes cpu1 being turned off though it is still working
with a high frequency. The idle_freq can be modified through sysfs.

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: fixup: move idle block to mpdecision()

This belongs in mp_decision() because this influences the decision
mpdecision is about to make.

Signed-off-by: showp1984 <showp1984@gmail.com>

mach-msm: mpdecision: don't turn on cpu1 if cpu0 freq is below idle_freq
If the clock of cpu0 is below the set idle_freq don't enable cpu1 and
disregard the runqueue value.

Signed-off-by: showp1984 <showp1984@gmail.com>

msm: mpdecision: 8960 compat

Change-Id: I49541f2a644d61e567e9997a742f54154e703674

msm: mpdecision: Use the standard get_rate api

Change-Id: I738cfe2165899001a0fca37c1dd2a5746c6ba53b
Lagfree CONFIG Cleanup
block:BFQ:Update v3r4 -> v4
d2: add xz compression support
cpufreq: Make the "scaling_governor" sysfs node pollable

A userspace module programs different qos-rules depending on the
governor running in the system. Make the governor node
pollable, so that the userspace module can be triggered when
the value of the governor changes.

change-Id: Ic89c77c7d16b0f8954d59a211612e9a8e98a2c28
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
cpufreq: Fix sysfs deadlock with concurrent
 hotplug/frequency switch

Running one program that continuously hotplugs and replugs a cpu
concurrently with another program that continuously writes to the
scaling_set_speed node eventually deadlocks with:

=============================================
[ INFO: possible recursive locking detected ]
3.4.0 #37 Tainted: G        W
---------------------------------------------
filemonkey/122 is trying to acquire lock:
 (s_active#13){++++.+}, at: [<c01a3d28>] sysfs_remove_dir+0x9c/0xb4

but task is already holding lock:
 (s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(s_active#13);
  lock(s_active#13);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by filemonkey/122:
 #0:  (&buffer->mutex){+.+.+.}, at: [<c01a2230>] sysfs_write_file+0x28/0x140
 #1:  (s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140

stack backtrace:
[<c0014fcc>] (unwind_backtrace+0x0/0x120) from [<c00ca600>] (validate_chain+0x6f8/0x1054)
[<c00ca600>] (validate_chain+0x6f8/0x1054) from [<c00cb778>] (__lock_acquire+0x81c/0x8d8)
[<c00cb778>] (__lock_acquire+0x81c/0x8d8) from [<c00cb9c0>] (lock_acquire+0x18c/0x1e8)
[<c00cb9c0>] (lock_acquire+0x18c/0x1e8) from [<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180)
[<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180) from [<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4)
[<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4) from [<c02d0e5c>] (kobject_del+0x10/0x38)
[<c02d0e5c>] (kobject_del+0x10/0x38) from [<c02d0f74>] (kobject_release+0xf0/0x194)
[<c02d0f74>] (kobject_release+0xf0/0x194) from [<c0565a98>] (cpufreq_cpu_put+0xc/0x24)
[<c0565a98>] (cpufreq_cpu_put+0xc/0x24) from [<c05683f0>] (store+0x6c/0x74)
[<c05683f0>] (store+0x6c/0x74) from [<c01a2314>] (sysfs_write_file+0x10c/0x140)
[<c01a2314>] (sysfs_write_file+0x10c/0x140) from [<c014af44>] (vfs_write+0xb0/0x128)
[<c014af44>] (vfs_write+0xb0/0x128) from [<c014b06c>] (sys_write+0x3c/0x68)
[<c014b06c>] (sys_write+0x3c/0x68) from [<c000e0e0>] (ret_fast_syscall+0x0/0x3c)

This is because store() in cpufreq.c indirectly grabs a kobject
with kobject_get() and is the last one to call kobject_put()
indirectly via cpufreq_cpu_put().

Fix this deadlock by introducing two new functions,
cpufreq_cpu_get_sysfs() and cpufreq_cpu_put_sysfs() which do the
same thing as cpufreq_cpu_{get,put}() but don't grab the kobject.

CRs-fixed: 366560

Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
(cherry picked from commit ddda0cf21dc6cb487aacd81fdb1a7343d2746d94)

Change-Id: I6ac89789e89099cff315d7a02de216423376b7f7
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Config:aosp:Enable XZ kernel
Confid:aosp:Enable zram
Config:aosp:Change DEFAULT_IOSCHED="vr"
Config:samsung:Updatedefconfig