msm: cpufreq: increase priority of thread that increases frequencies

When the cpufreq governors request for increase in frequency from kworker
threads, there is chance that the kworker thread is cpu starved due to
other high priority threads, leading to undesirable increase in frequency
ramp-up latency. Add the calling thread to SCHED_FIFO policy when
requesting for increase in frequency and restore back to original policy
after ramp-up is completed.

Change-Id: Ie4fa199b7f9087717cb94dfcc2eddea27cc0012b
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
crypto: msm: apply latest updates from CAF kk_2.7_rb1.13
msm: pm: send notification only for SPC and PC

Today the pm notification is sent for all the power
modes of each CPU. This is not necessary for shallow
power modes.

This change is to send the notification for only
standalone power collapse for each core and idle
power collapse of core0.

Change-Id: I9b3df3d72e43d645387c94b1b9c5da3bcf2f2e5f
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
msm: pm: Add support for retention on each core

Allow each core on 8974 to enter retention and retain
the state of the CPU. On 8960 as hardware restriction does
not permit all cores to enter retention at the same time,
allow only core 0 to enter retention when all other cores
are offline to maintain backward compatibility.

CRs-fixed: 437281
Change-Id: I6690e901afc9fa3a27010c264fa3acc9a0722c1a
Signed-off-by: Priyanka Mathur <pmathur@codeaurora.org>
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
msm: pm-8x60: Setup memory for save/restore cpu registers early

Cores can be offlined early in the boot cycle by certain kernel
drivers.
Ensure that the memory to save and restore the cpu registers is
ready and available early during the boot procedure.

CRs-Fixed: 460083
Change-Id: I925372f066386ceb1e85184d4c58863835c3e88e
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: hotplug: wait for hotplug completion event from secondary core

Primary core has to wait for hotplug completion event from secondary
core to avoid race between ongoing hotplug and already queued online
event. This also prevent CPU_DEAD notifiers from executing before the
SPM has completed the collapse of the CPU. CPU DEAD notifiers executing
early have been attributed to MDD hardware block for the CPU being
turned off prematurely, resulting in crashes.
The patch also adds support for probing with device tree for 8974
targets.

Change-Id: Ibd35a7c56f42f156a643ca6d531509f019b2a3be
CRs-fixed: 438314
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: pm: Add support to query cpu status

During hotplug operation primary core is required to query
cpu registers to determine whether secondary core has
successfully shutdown.

Change-Id: I81bd47ba851698e86269652afe381b0571ca912a
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: pm-8x60: Use relative time for events

There is a bug when adjusting for event wakeups. The adjusted time
is being set in absolute mode incorrectly. Instead just use relative
times.

Without this core wakeups may not happen on time.

CRs-fixed: 486466
Change-Id: If625f25bd573b05befb6e0f922c80db646428b86
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
msm: pm: add failed stats

for idle and suspend failed cases the stats
are not updated correctly, they are just added to
success bucket.

This patch is to log the failed stats separately.

Change-Id: I4b290944e3f4b74ada13ef0ba51b812c83b5ec5d
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
msm:pm: Fix for race condition of starting cpu1 when cpu0 in PC.

There is a window where core sends ipi to secondary core and
wait for it to come online for 1 second. This would allow
core0 to go power collapse in a rare condition where core1
started booting and doesn't become online yet.

Fix this by not allowing power collapse on core0
if hot plug operation is in progress.

CRs-fixed: 545714.
Change-Id: I1ca503a2f09cd9a65c2fdcd41eb54466a1e486c5
Signed-off-by: Anil kumar mamidala <amami@codeaurora.org>
board-mako: add support to query cpu status
prima: TDLS : Initiate the TDLS setup only when externally configured.

This is an preliminary release including just the below SHA.  It should be
identical to the next official Prima release.

	b7eef93 TDLS : Initiate the TDLS setup only when externally configured.

Signed-off-by: Iliyan Malchev <malchev@google.com>
net-fixes: flow_dissector: prevent an infinite loop (CVE-2013-4348)

Jason Wang found that a malicious packet could make skb_flow_dissect()
loop forever. We must check that IP header has a valid ihl to avoid
this loop. It involves IPIP encapsulation and ihl = 0 to trigger.

Given this bug is critical, I cooked a patch before having
a fix in upstream kernel.

Tested:

 Compiled/booted
 Ran some tests on bnx2x and explicitely disabled hardware provided rxhash
 ethtool -K eth1 rxhash off
 ethtool -K eth2 rxhash off

Google-Bug-Id: 11465355
Effort: net-fixes
Change-Id: I813e4dc48cecb05f8edfa218304e1f13fd764323
Signed-off-by: Ed Tam <etam@google.com>
prima: release v3.2.3.13

This is the official drop containing the patch to fix TDLS initiation only when
externally configured, plus a cherry-pick of the locale-based reverts specific
to mako.

	git://codeaurora.org/external/wlan/prima.git'

	d5c5ae4 Revert "wlan: Change regulatory followed customer request"

	0b344c2 wlan : Revision 3.2.3.13
	7dc90cc TDLS: Enhance TDLS external control operations ( gTDLSExternalControl = 1).
	cebe890 wlan : Revision 3.2.3.12
	7ba7677 [PATCH] TDLS : Initiate the TDLS setup only when externally configured.

Signed-off-by: Iliyan Malchev <malchev@google.com>
Add CONFIG_NETFILTER_XT_TARGET_TCPMSS support

set CONFIG_NETFILTER_XT_TARGET_TCPMSS=y in mako defconfig

Bug: 11579326
update configs
ASoC: msm: Add argument to config_debug_fs definition

Add argument name missing from config_debug_fs
definition when debugfs not enabled.

Change-Id: Ib955b5fa60228d48ac6a2c73678f0d6cd766c8a1
CRs-fixed: 551711
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
(cherry picked from commit f512ef3735ccf70fa5874b50a0cb57099cb90051)
USB: Debugfs: Fix compilation issues when debugfs is disabled
When we disable debugfs some of the function driver does not
handle those error properly so we see error of kind variable
undeclared, too many arguements to function. This fixes all
these obseved issue

CRs-fixed: 551713
Change-Id: I1b60c86b1c489f77edf86a5df44f8766a08dc117
Signed-off-by: Tarun Gupta <tarung@codeaurora.org>
mach-msm: fix errors when DEBUG_FS is disabled
disable MEDIA_TUNER