ARM: dts: msm: Add pipe-ownership and product-code for slimbus in 8974

To setup data channels from application processor with at least one
endpoint in memory, slimbus driver requires information about pipes
owned by the apps processor, and the product-code of the controller.
Add this information to Device-Tree for MSM slimbus controller on
8974.

Change-Id: Ice45907c784f532b727868ce0f14a94e08313eeb
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
ARM: dts: msm: Update regulator supply name for msm8974
There should not be underscore in the property name.
Remove the underdcore in the regulator supply name defined
in msm-thermal device tree.

Change-Id: Id4949d8ca9d9d14ad2a8862d94571d070326d45e
Signed-off-by: Jennifer Liu <chihning@codeaurora.org>
ARM: dts: msm: Update TSENS efuse address

Use the shadow address while reading the TSENS
efuse region. Currently TSENS reads the raw address region
but it is recommended to read the shadow region instead
which is designated as a read only region.

Change-Id: If04159dfb35d5c225c4d2720b5fbc9c1f2998cba
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/apq8084.dtsi
ARM: dts: msm: Add entry for relocatable pil heaps for 8974

Add device tree entry for relocatable pil heaps to be used
using the ion framework.

Change-Id: I813f154d45363706f78b5b23353e80f082aec56c
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
arm/dt: msm8974: Add GDSC regulator controlling Venus core

GDSC control is now moved out of PIL to enable power collapse
of Venus core through video driver.

Change-Id: Id8cf5547871434dede63c5a304311c53a9bc78dc
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
ARM: dts: msm: Update device tree with memory map information for 8974

Update the device tree in order to be aligned with the latest memory
map. As the venus and adsp images are relocatable, reclaim the memory
that was previously occupied by non relocatable images of these
subsystems.

Change-Id: I4c4ff452f01877378247d275a9a86ee88a1948cb
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
ARM: dts: msm: remove ebi cache dump reservation for 8974

The cache dump driver no longer uses the deprecated ebi memory
reservation api to reserve memory. As such, remove the
reservation from the device tree.

Change-Id: Ib016094da95c0dbc4520b9e3ed657487b180c853
Signed-off-by: Pushkar Joshi <pushkarj@codeaurora.org>
ARM: dts: msm: Remove bus active-only property from TSPP

TSPP HW blocks would use the PNOC bus independent
of the power collapse state of the CPU. Making bus vote
with active-only will cause the vote to be removed by
RPM when CPU gets into power collapse state.

CRs-Fixed: 546090
Change-Id: Ia3963f84f96eb96747867d28a8b09889de8ca22f
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
ARM: dts: msm: Fix TSPP interrupt numbers in msm8974

TSPP interrupt numbers were defined wrongly.

CRs-Fixed: 533933
Change-Id: I3b5b81285a8e5e7634d855980b280ba5855c7b36
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
ARM: dts: msm: increase adsp heap size for msm8974

For hevc hybrid codec, adsp heap size needs to be increased to
64MB to support 1080p video.

Change-Id: I3812cc2f0204f18fbade9ae41d8e784909055569
Signed-off-by: Arun Menon <avmenon@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8974.dtsi
ARM: dts: msm: i2c: change  clock rate to 19.2 MHz

For standard  requirement, I2C source
speed of 50MHz causes high power usage, hence
this patch change the clock rate to 19.2 MHz
to save power.

CRs-Fixed: 552956
Change-Id: Ifb17fb79062a390a19881d247a2ac0ca5cc55d80
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
arm/dts: msm8974: Change qseecom device tree setting

set the flag of support-bus-scaling and change ab & ib
value to support bus bandwidth scaling.

Change-Id: Ia509729675b5c8ce13a9367f8909dc29a1c89944
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
msm: kgsl: Prevent device start after it is already started

Check if device is already started in high priority workqueue thread,
this check prevents calling device start after it is already started,
thereby avoiding unpredictable behavior.

Change-Id: Iffcd065f8c02746d168c8e5779d10d4b0e2404a9
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Revert "msm: kgsl: Lower devfreq polling interval to reasonable 100ms"

This reverts commit 3eb8d4b42ff6ad384007746435e97f3403e84ba8.
PM: devfreq: conservative: Return 0 if GPU just started

Bailing out early is perfectly fine, so do not trigger an error in
update_devfreq.
tracing/sched: Track per-cpu rt and non-rt cpu_load.

Add a new tracepoint trace_sched_enq_deq_task to track
per-cpu rt and non-rt cpu_load during task enqueue
and dequeue.

This is useful to visualize and compare the load on
different cpus and also to understand how balanced
the load is at any point of time.

Note: We only print cpu_load[0] because we only care about
the most recent load history for tracking load balancer
effectiveness.

Change-Id: I46f0bb84e81652099ed5edf8c2686c70c8b8330c
Signed-off-by: Arun Bharadwaj <abharadw@codeaurora.org>
sched: Fix clear NOHZ_BALANCE_KICK

I have faced a sequence where the Idle Load Balance was sometime not
triggered for a while on my platform, in the following scenario:

 CPU 0 and CPU 1 are running tasks and CPU 2 is idle

 CPU 1 kicks the Idle Load Balance
 CPU 1 selects CPU 2 as the new Idle Load Balancer
 CPU 2 sets NOHZ_BALANCE_KICK for CPU 2
 CPU 2 sends a reschedule IPI to CPU 2

 While CPU 3 wakes up, CPU 0 or CPU 1 migrates a waking up task A on CPU 2

 CPU 2 finally wakes up, runs task A and discards the Idle Load Balance
       task A quickly goes back to sleep (before a tick occurs on CPU 2)
 CPU 2 goes back to idle with NOHZ_BALANCE_KICK set

Whenever CPU 2 will be selected as the ILB, no reschedule IPI will be sent
because NOHZ_BALANCE_KICK is already set and no Idle Load Balance will be
performed.

We must wait for the sched softirq to be raised on CPU 2 thanks to another
part the kernel to come back to clear NOHZ_BALANCE_KICK.

The proposed solution clears NOHZ_BALANCE_KICK in schedule_ipi if
we can't raise the sched_softirq for the Idle Load Balance.

Change since V1:

- move the clear of NOHZ_BALANCE_KICK in got_nohz_idle_kick if the ILB
  can't run on this CPU (as suggested by Peter)

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1370419991-13870-1-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-commit: 873b4c65b519fd769940eb281f77848227d4e5c1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[smuckle@codeaurora.org: minor merge resolution for 3.4 in scheduler_ipi()]
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Change-Id: I3548612057cccc2ecc29429c129c44183083831f
sched/debug: Make sysrq prints of sched debug data optional

Calls to sysrq_sched_debug_show() can yield rather verbose output
which contributes to log spew and, under heavy load, may increase
the chances of a watchdog bark.

Make printing of this data optional with the introduction of a
new Kconfig, CONFIG_SYSRQ_SCHED_DEBUG.

Change-Id: I5f54d901d0dea403109f7ac33b8881d967a899ed
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Bluetooth: Replace sprintf with snprintf

Change will replace sprintf with snprintf, since sprintf is a
banned function.

CRs-FIxed: 548220
Change-Id: I32f5ab1f3707e5bbe43c31a7ad4611b67557b267
Signed-off-by: Juffin Alex Varghese <jalex@codeaurora.org>
sysctl: Don't scan for the leaks on headers

These header allocations have life cycle till the device goes
shutdown. So, considering them as leak is false positive. Remove
them by marking kmemleak_not_leak

CRs-Fixed: 466552
Change-Id: Id1571b78365e533ddfe866d45cef8f89b0b62bc7
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>