Perf: Check perf activity on correct CPU

The CPU hotplug notifier is not always preempt safe.
So relying on smp_processor_id() is not correct.

Use the cpu id from the notifier as the target
CPU to check for perf activity before hotplug or power
collapse.

Change-Id: I1a96b236904a2c8ae2f82bbceab4ca8a195395d1
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Perf: Add L1 counters to tracepoints

Create a new tracepoint to get L1 PMU counter
information at every context switch. Counters
are captured only when the tracepoint is enabled
via perf or ftrace.

Change-Id: If05527b29e04c700170cfdf9f88d300b2f558ffa
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Perf: Fix counts across power collapse

After entry and exit from power collapse, the perf pm_notifier was
calling perf_pmu_disable/enable functions from perf core. Perf core
maintains a counter that it uses to match disable and enable calls but
since pm_notifier is invoked asynchronously, the counter was getting a
non-zero value which prevented the pmu from being enabled. As a result of
this, we were seeing zero counts for some cores across power collapse.

Make the architecture specific calls directly from pm_notifier.

Change-Id: I744e190906a20e70e1e4798235215c385018b121
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
Perf: Make per-process counters configurable

Add feature to enable/disable per-process tracecounters at run-time.

Change-Id: Id6a4c7a0ecd1f5add85464c6ed260860e15c4e3b
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
msm: perf: Add L2 support for tracecounters

Add L2 counter output to the tracecounters implementation.
This enables collection of L2 PMU counter values upon context switch.
Set up filtering based on number of L2 counters and number of cores.
Read L2 counter values and display them along with L1 counter values.

Change-Id: I8bbbd251ee52c66505d22ccf037c601013a916f0
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
wlan: Forward cached data to the STA via RX thread.

Currently the cached frames are forwared to STA in
TX thread context. Changing it to go via RX thread.
For this, a new api WLANTL_RxProcessMsg to process
messages in RX thread and a new TL queue ( tlrxmq )
has been added.

Change-Id: Iacae4a45f13a7c51d12f29895d18b90c15b49cb6
CRs-Fixed: 657831
Merge "Merge "wlan: Host is not sending stop roam scan offload properly""
Merge "Merge "msm: camera: Sanity check in ispif release Add BUG_ON for ispif address and check ispif base address validity in ispif release function.""
Merge "Merge "Merge "wlan: Host is not sending stop roam scan offload properly"""
Merge "Merge "Merge "msm: camera: Sanity check in ispif release Add BUG_ON for ispif address and check ispif base address validity in ispif release function."""
Merge "Merge "wlan: Host is not sending stop roam scan offload properly""
Merge "Merge "msm: msm_fb: Handle out of order msm_fb ioctls""
Merge "Merge "Merge "wlan: Host is not sending stop roam scan offload properly"""
Merge "Merge "Merge "msm: msm_fb: Handle out of order msm_fb ioctls"""
Merge "Merge "wlan: Host is not sending stop roam scan offload properly""
Merge "Merge "msm: msm_fb: Handle out of order msm_fb ioctls""
Merge "Merge "Merge "wlan: Host is not sending stop roam scan offload properly"""
Merge "Merge "Merge "msm: msm_fb: Handle out of order msm_fb ioctls"""
msm: perf: Fix debug node permissions

Fix testAllFilesInSysAreNotWritable failure by changing permissions
for [/sys/kernel/debug/perf_debug_tp/enabled] from 0777 to 0660

Change-Id: Iea7fc2072ea00f011fd7a91fd16c936e42272b14
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
Perf: keep events across hotplug

Keep event list alive across a CPU hotplug so that perf
can resume when the CPU comes back online. Bring a CPU
online when exiting a perf session so it can be cleaned
up properly.

Change-Id: Ie0e4a43f751beb77afdc84e9d52b21780f279d80
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>