net: wirelss:bcmdhd revert roaming patch

1) The patch was needed for roaming patch in the FW.
However, we need to revert this code because we revert
the roaming patch in new FW(7.35.79.49)
2) Bug : 18541286
Signed-off-by: Ecco park <eccopark@broadcom.com>

Change-Id: I66123f0911670a66e923353ae112d492a3b3869a
ASoC: msm: qdsp6v2: update int to size_t

Int aren't same size as size_t in 64bit kernel. This actually cause part of
the stack to be overwritten.

Change-Id: I0ebff1fb9030fdb93a6889ee02329599ae2800fb
Signed-off-by: Fred Oh <fred@codeaurora.org>
msm: compr: Use irq{save/restore} version of spinlock

compress driver event handler uses spin_lock/unlock APIs.
It should be sufficient to use the irq{save/restore} versions.

Change-Id: I8f32c6896396a09faa1baf741bd182d8ceb4301a
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
ASoC: msm: compr: Ensure drain sequence is executed

This change ensures drain sequence is executed even if
a pause/resume commands are sent from userspace while
the control thread is waiting for all buffers to be consumed
by DSP.
CRs-Fixed: 711920

Change-Id: I6ffcc072e00fa1865b0484f54fa6b070c1a73cf2
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
msm: perf: tracectr: Initialize cnts after hotplug

Due to the mismatch between counter values saved across CPU hotplug
by perf and tracecounter logic, incorrect values are calculated
for first entry in trace buffer.
Ignore the first entry when CPU comes out of hotplug and set previous
counter values in this scenario.

Change-Id: Ieeeaa301d713f338f11f6e84aeb984a3708e45fc
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
Perf: Reset pmu after hotplug

The counter enable bits were staying in undefined state after CPU
came out of hotplug when perf was not enabled.
This was resulting into non-zero values for counters in ftrace
buffer which were not enabled by perf.
Clear the pmu when CPU comes out of hotplug and perf is not enabled.

Change-Id: I31e17565ad914650a12102a5c359b363f8f2ca2a
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
msm: perf: set filter bits for cycle counter on krait

When programming the cycle counter on krait, the filter
register needs to be programmed in order to set the
usermode/kernelmode filter options.

Change-Id: Ifd5b032c9a5df4821706438d4359f84d8f614468
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Perf: Fix hrtimer operation across hotplug

Stop hrtimer associated with CPU clock event when
core goes down. Start the timer when core comes back up.
This is needed to ensure proper software timer operation
across hotplug.

Change-Id: I027bf2718d177fa31be2a7cfe7ef98f93cb4aeda
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
Perf: add perf user-mode permissions

Allow user-mode applications to use the performance
counters for debugging and performance analysis.

Change-Id: I0caed53dafb9965b8eece92762a0b67a40ff3be5
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Perf: Add event type check in hrtimer hotplug fix

The hrtimer hotplug fix was missing event_type check due to which
the check was passing both software clock and hardware cycles.

Change-Id: I1d16d0ccc6ce27963ace9d2f3e1e1eab8f8c7d18
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
Perf: Add debugfs node to clear PMU

Create debugfs node to clear PMU and some internal variables
used by Perf code. This provides a recovery path for
PMU related unexpected error scenarios.

Change-Id: I88ae9dda0888db9316ce123f6f3a58faec4d69ee
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
msm: perf: reset perf cycle counter on krait

The cycle counter was not included in the list of
counters being reset. This could result in the cc
enable bit being set randomly, leading to spurious
interrupts when the counter overflowed, even though
the cc was not being used.

Change-Id: Ic7da5e78f932a25d05ce116aeec7a0709ddbb20e
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Perf: interrupt disable without bringing cpus up

Refactor the interrupt disabling so that interrupts
are disabled when a cpu is hotplugged out, even if
there are no perf events on that cpu, but it holds
the PMU irq. This means that when perf ends it does
not have to re-enable an offline cpu just to disable
its irq.

Change-Id: Id0e052e4386173e107abe0eb6e80cb130d92ec24
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Perf: stop counters when going into hotplug

Hotplug disables the pmu irq, but if counters are
running in the window before the CPU is hotplugged off
they can overflow and generate an interrupt. Because the
interrupt is disabled, this prevents the cpu from going
down which leads to a spin loop in the cpu_down driver
which consumes 100% cpu.

Events are stopped during hotplug processing. However,
perf is hooked into the timer tick, and restarts enabled
events on every tick, even if they were stopped. Change
the event state to OFF to prevent this.

Processing for stop reads the counters, so a separate call
is no longer needed. Start processing re-enables events so
the from_idle flag is not needed during pmu_enable.

Change-Id: I27ded876315147b50d9f85c09487b107a9216641
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
msm: perf: Refine disable/enable in tracecounters

Tracecounter code was not disabling counters as early as possible
and enabling them as late as possible. Refine the logic so cycles
spent inside the handler are as lower. This results in more accurate
per-process counter values.

Change-Id: Ib8bb17b1212ddf9e3d1c33a00ae486d885a36e45
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
Perf: reset pmu enables when starting perf

PMU enable registers are not cleared when coming out
of cpu idle and perf is not running. This means that
enable bits may be set when perf starts. This is not normally
a problem because perf only looks at the counters it enables.
But per-pid tracing will see the enabled counters and the
garbage count values that get put into trace records, and generally
be unable to distinguish them from good values.

Clear the counters when perf starts. Then also reset them when coming
out of cpu idle. The existing test was to do this when a perf
event was running on a cpu, but there is a window between init and
starting events where drop into cpu idle could happen and allow garbage
values to be loaded into the enable register again. So change the
criterion for reset after cpu idle to be whenever the PMU is running.

Change-Id: Ie807363de92d166994ebbb9369132176ceaa4f68
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Perf: make debug dir handle exportable

The perf debug directory is exported so that other
drivers can place nodes there.

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