Revert derp in Makefile regarding memutils lol
allow all hotplug/cpufreqs to get cpu utilization
sync: Add a "details" callback for sync points

Allow drivers to add a callback for expanded details about a sync
point.  This provides for a much richer debug experience than can
be provided by the simpler callbacks.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sync: Only print details for active fences

Only call the pt_log callback for active fences.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
netfilter: nf_conntrack: decrement global counter after object release

nf_conntrack_free() decrements our counter (net->ct.count)
before releasing the conntrack object. That counter is used in the
nf_conntrack_cleanup_net_list path to check if it's time to
kmem_cache_destroy our cache of conntrack objects. I think we have
a race there that should be easier to trigger (although still hard)
with CONFIG_DEBUG_OBJECTS_FREE as object releases become slowier
according to the following splat:

[ 1136.321305] WARNING: CPU: 2 PID: 2483 at lib/debugobjects.c:260
debug_print_object+0x83/0xa0()
[ 1136.321311] ODEBUG: free active (active state 0) object type:
timer_list hint: delayed_work_timer_fn+0x0/0x20
...
[ 1136.321390] Call Trace:
[ 1136.321398]  [<ffffffff8160d4a2>] dump_stack+0x45/0x56
[ 1136.321405]  [<ffffffff810514e8>] warn_slowpath_common+0x78/0xa0
[ 1136.321410]  [<ffffffff81051557>] warn_slowpath_fmt+0x47/0x50
[ 1136.321414]  [<ffffffff812f8883>] debug_print_object+0x83/0xa0
[ 1136.321420]  [<ffffffff8106aa90>] ? execute_in_process_context+0x90/0x90
[ 1136.321424]  [<ffffffff812f99fb>] debug_check_no_obj_freed+0x20b/0x250
[ 1136.321429]  [<ffffffff8112e7f2>] ? kmem_cache_destroy+0x92/0x100
[ 1136.321433]  [<ffffffff8115d945>] kmem_cache_free+0x125/0x210
[ 1136.321436]  [<ffffffff8112e7f2>] kmem_cache_destroy+0x92/0x100
[ 1136.321443]  [<ffffffffa046b806>] nf_conntrack_cleanup_net_list+0x126/0x160 [nf_conntrack]
[ 1136.321449]  [<ffffffffa046c43d>] nf_conntrack_pernet_exit+0x6d/0x80 [nf_conntrack]
[ 1136.321453]  [<ffffffff81511cc3>] ops_exit_list.isra.3+0x53/0x60
[ 1136.321457]  [<ffffffff815124f0>] cleanup_net+0x100/0x1b0
[ 1136.321460]  [<ffffffff8106b31e>] process_one_work+0x18e/0x430
[ 1136.321463]  [<ffffffff8106bf49>] worker_thread+0x119/0x390
[ 1136.321467]  [<ffffffff8106be30>] ? manage_workers.isra.23+0x2a0/0x2a0
[ 1136.321470]  [<ffffffff8107210b>] kthread+0xbb/0xc0
[ 1136.321472]  [<ffffffff81072050>] ? kthread_create_on_node+0x110/0x110
[ 1136.321477]  [<ffffffff8161b8fc>] ret_from_fork+0x7c/0xb0
[ 1136.321479]  [<ffffffff81072050>] ? kthread_create_on_node+0x110/0x110
[ 1136.321481] ---[ end trace 25f53c192da70825 ]---

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
alucard_hotplug: now nr_run_avg calculation is correct.
cpufreq: Add interface to set/get min/max freq

* Interface similar to that for setting governor.
* Interface can be used by drivers to change/get
  min/max freq per cpu.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Simplify and debugify min/max freq

* 5echo2@xda reported that sibling cores may or may not
  get updated with required max freq after every resume
  operation.
* This patch make use of hooks added in cpufreq driver.
  These hooks save desired min/max freq if CPU is
  offline OR update min/max freq if CPU is online
  and thus sibling cores will have their proper scaling
  frequencies updated whenever called.
* Also live_min_freq and live_max_freq are added per-cpu
  to help user retrieve actual min/max per cpu.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: Make get governor interface always return good value

* In rare scenario, we may not able to lock policy
  and in such case, get governor interface returns
  "invalid" governor.
* This patch ensures we never get "invalid" governor.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Do not store governor locally

* @RenderBroken reported that local variables do
  not reflect actual value on boot.
* This happens because ramdisk or userspace apps
  change scaling_governor by using following path
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
* When above path is updated with new governor, local
  variables in limiter driver are not.
* Drop local variables and reflect actual governor per
  core always.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Add readable tunable for current frequency

* It returns 0 if core is offline else current frequency
  of that core.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
update live scaling freqs/hotplugs in Synapse
enable msm_limiter by default
cpufreq_intellimm: intelliminmax cpu governor initial baseline commit

intelliminmax (intellimm) governor is designed to work with the newer SOCs with fixed voltage rails (ie MSM8974+ SOCs).  It is designed to work within those
fixed voltage ranges in order to maximize battery performance while creating a
smooth UI operations.

Copyright 2014 Paul Reioux <aka faux123>

Signed-off-by: Paul Reioux <reioux@gmail.com>

WIP: Intellimm: remove unused code and change tblmap algorithm

tblmap: add power-save frequencies for the first 5 entries

Signed-off-by: Paul Reioux <reioux@gmail.com>

WIP: intellimm: more tweaks and table clean up

Signed-off-by: Paul Reioux <reioux@gmail.com>

WIP: intellimm: more tweaks

Signed-off-by: Paul Reioux <reioux@gmail.com>

WIP: intellimm: clean up derpy logic

Signed-off-by: Paul Reioux <reioux@gmail.com>

WIP: intellimm: final clean up and algorithm tweaks

Signed-off-by: Paul Reioux <reioux@gmail.com>

WIP: intellimm: finalizing part 2

Signed-off-by: Paul Reioux <reioux@gmail.com>

WIP: intellimm: finalizing part 3

add back burst for smoother UI

Signed-off-by: Paul Reioux <reioux@gmail.com>

intellimm: fix div by zero derp

Signed-off-by: Paul Reioux <reioux@gmail.com>
cpufreq_intellimm: remove common function, setup for io_is_busy
Disable slim cpu governor, already have a ton of cpu governors, slim tends to use more battery anyways
intelli_hotplug: Remove unused cur_max percpu variable

* We removed its usage long since we dont want hotplug
  drivers to play with frequencies.
alucard_hotplug: Use INIT_DELAYED_WORK for RQ_AVG calculation.
decompressors: group XZ_DEC_* symbols under an if XZ_BCJ / endif

Group all architecture-specific BCJ filter configuration symbols under an
if XZ_BCJ / endif statement.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
decompressors: drop dependency on CONFIG_EXPERT

Remove the XZ_DEC_* depedencey on CONFIG_EXPERT as recommended by Lasse
Colin.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>