usb: msm72k_otg: Update OTG status management
usb: msm72k_otg: Allow USB bus overdraw for Legacy OTG

This commit allow to set a new option in kernel config:
USB_MSM_OTG_72K_ALLOW_BUS_OVERDRAW

The option allows USB bus overdraw when using peripherals
attached via OTG on Legacy Qualcomm on-chip USB controller
msm: Qdsp5v2: audio: Migrate to ION.

PMEM is deprecated, switch to ION.

Change-Id: Ia15c444e26961d8aa40bd5db3ece1fd9368e02ef
Signed-off-by: Kalyani polepeddy <kpolep@codeaurora.org>
audio: msm: qdsp5v2: Switch hostPCM driver to ION.

HostPCM to switch from PMEM to ION to allocate memory.

Change-Id: Ic4f0aa839628ca415702b22005802661674b1fb6
Signed-off-by: Kalyani polepeddy <kpolep@codeaurora.org>
Initial commit for ION compilation errors

Change-Id: Ic003609426ac2fde1e3c506839f31716e708df25
Signed-off-by: Kalyani polepeddy <kpolep@codeaurora.org>
msm: audio : Enable LPA

audio: qdsp5v2: Switch audio drivers to ION
Change-Id: I5a757b606b3159b8fee77b66605343dd2385f3ec

Signed-off-by: Kalyani Polepeddy <kpolep@codeaurora.org>
audio : Copyright correction.

Change-Id: Ibe0642dbb6397ce62d6784752393c0b057706163

Signed-off-by: Kalyani Polepeddy <kpolep@codeaurora.org>
msm: audio  VOIP fixes.

-msm: qdsp5: Moving initialization of wakelock and mutex to mvs init

Added change to move initialization of wakelock and mutex to mvs init
to reduce the VoIP startup time.

-msm: qdsp5: Exit VOIP thread at the end of MVS session

In the MVS open, a thread is created but the same is not getting exited
during the MVS release
Added logic to exit the thread in the release.

-msm: qdsp5: Fix for noise issue during VOIP call

Driver discards the downlink packets when input queue is full.
Added code to block processing of downlink packets in the write()
till a input queue free slot is available for write.

-msm: qdsp5v2: Fix for noise issue during VOIP call

Driver discards the downlink packets when input queue is full.
Added code to block processing of downlink packets in the write()
till a input queue free slot is available for write.

Change-Id: I8f238b572e5ee9f4321089f9fa87dd917098df0d
Signed-off-by: Kalyani Polepeddy  <kpolep@codeaurora.org>
msm: Remove all references to pmem from audio files

PMEM is no longer supported. Remove all references to it.

Change-Id: If68c41901b8fb0b9382650c3123a68958f769761
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
qdsp5: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: I3a043a4ce4e14d8e0c24b434181dff484eddac72
CRs-Fixed: 551548
CRs-Fixed: 551542
CRs-Fixed: 551555
CRs-Fixed: 551563
CRs-Fixed: 551566
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
exFAT: Update to v1.2.5

Change-Id: I6a43a674e5edc599b00a902247539b11569f4e6f
defconfig: Disable NTFS and build exFAT as built-in

 * CM uses ntfs-3g fuse for NTFS.
Revert lowmem and vmalloc patches

Revert "mm: make is_vmalloc_addr lockless"

This reverts commit 675539b2812b0db12490210ed079185f933a1b3b.

Revert "Kconfig: Add menu choice option to reclaim virtual memory"

This reverts commit a447197635ef394d8e9270bbcc7049f8beb20e75.

Revert "Kconfig: Add config option to support vmalloc savings"

This reverts commit f5130adb4c3abd7cbe977f7304bf6fb3ced84fc7.

Revert "mm: Update is_vmalloc_addr to account for vmalloc savings"

This reverts commit 62da64efd769329b19ca1602d5bb5c4ff564a682.

Revert "msm: Increase the kernel virtual area to include lowmem"

This reverts commit 274df3aaf5836c671823318d20ccfac962b4e411.

Revert "msm: Allow lowmem to be non contiguous and mixed."

This reverts commit 258fe02b4797883aef9823a8d1c336ada71a7516.
sensors_ariesve: gp2a_proximity: Fix unbalanced enable for proximity IRQ

This commit fix the following reported issue:

WARNING: at kernel/irq/manage.c:428 enable_irq+0x3c/0x74()
Unbalanced enable for IRQ 246
Modules linked in: dhd cifs [last unloaded: dhd]
[<c00133dc>] (unwind_backtrace+0x0/0xf4) from [<c00a3648>] (warn_slowpath_fmt+0x5c/0x74)
[<c00a3648>] (warn_slowpath_fmt+0x5c/0x74) from [<c00f9ae8>] (enable_irq+0x3c/0x74)
[<c00f9ae8>] (enable_irq+0x3c/0x74) from [<c04f4d70>] (proximity_enable_store+0x174/0x1b0)
[<c04f4d70>] (proximity_enable_store+0x174/0x1b0) from [<c01aebd8>] (sysfs_write_file+0x15c/0x18c)
[<c01aebd8>] (sysfs_write_file+0x15c/0x18c) from [<c01508c0>] (vfs_write+0x9c/0x148)
[<c01508c0>] (vfs_write+0x9c/0x148) from [<c0150bbc>] (sys_write+0x38/0x78)
[<c0150bbc>] (sys_write+0x38/0x78) from [<c000df80>] (ret_fast_syscall+0x0/0x30)
misc: bln: New implementation and changes for BLNv10

This patch includes new implementations and changes for BLN module
to better manage existent features and provide additional in-kernel
features.

1) Add in-kernel management of notifications with static lights:
    Two new sysfs attributes allow to enable in-kernel notifications
    with static lights.
    Set "/sys/class/misc/backlightnotification/in_kernel_static" to 0
    if you want to disable this feature, otherwise set it to 1 to
    enable it, the default value is 0 (disabled).
    Set "/sys/class/misc/backlightnotification/static_maxtime" with the
    preferred lights timeout in seconds (from 1 to 3600 sec = 1 hour),
    the default value is 60 seconds = 1 minute.
2) Possibility to set separate intervals for blink ON and OFF transitions:
    Two new sysfs attributes allow to set separate intervals for blink
    ON and OFF transitions.
    Set "/sys/class/misc/backlightnotification/blink_interval_on" and
    "/sys/class/misc/backlightnotification/blink_interval_off" with the
    preferred interval in milliseconds for the related blink transition,
    the default value is 500 milliseconds.
    The attribute "/sys/class/misc/backlightnotification/blink_interval"
    is still provided to ensure compatibility with other apps, if set,
    both intervals for blink ON and OFF will be updated with the same
    provided value.
3) Possibility to set or not set static lights after the timeout of
   blinking lights:
    A new sysfs attribute allows to enable in-kernel notifications with
    static lights after the expiration of blinking timeout.
    Set "/sys/class/misc/backlightnotification/status_after_blinking"
    to 0 if you want to turn the lights off after blinking timeout,
    otherwise set it to 1 to turn the lights on, the default value is 0.
4) Better timeout management for in-kernel blinking lights
    The code to manage the timeout of blinking lights has been revised
    to use a more reliable comparison between jiffies times instead of a
    simple counter.
5) Use a dedicated workqueue for scheduled works for blinking and static
   lights instead of the shared workqueue
    By using a dedicated workqueue,  blinking and static lights operations
    are performed more efficiently without taking account of the various
    scheduled works from other drivers/processes.
6) Turn the lights off after system resume if a notification is ongoing
7) Remove duplicated calls to wakelock routines
8) Free up the reserved space when the module is removed
9) Some code cleanup, comments, copyright updates and other minor changes

Signed-off-by: Cristoforo Cataldo <cristoforo.cataldo@gmail.com>
Update defconfigs
msm: mdp: Update sync pt. behaviour

Add a retire fence and clean up the existing release fence
implementation

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
netfilter: xt_qtaguid: report only uid tags to non-privileged processes

In the past, a process could only see its own stats (uid-based summary,
and details).
Now we allow any process to see other UIDs uid-based stats, but still
hide the detailed stats.

Change-Id: I24fb841fe36f11b10f16ec61f90aded51b59911c
Signed-off-by: JP Abgrall <jpa@google.com>
Git-commit: c33bcd377203feb708cb02673731e70c14ef8c91
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
netfilter: x_tables: fix ordering of jumpstack allocation and table update

During kernel stability testing on an SMP ARMv7 system, Yalin Wang
reported the following panic from the netfilter code:

  1fe0: 0000001c 5e2d3b10 4007e779 4009e110 60000010 00000032 ff565656 ff545454
  [<c06c48dc>] (ipt_do_table+0x448/0x584) from [<c0655ef0>] (nf_iterate+0x48/0x7c)
  [<c0655ef0>] (nf_iterate+0x48/0x7c) from [<c0655f7c>] (nf_hook_slow+0x58/0x104)
  [<c0655f7c>] (nf_hook_slow+0x58/0x104) from [<c0683bbc>] (ip_local_deliver+0x88/0xa8)
  [<c0683bbc>] (ip_local_deliver+0x88/0xa8) from [<c0683718>] (ip_rcv_finish+0x418/0x43c)
  [<c0683718>] (ip_rcv_finish+0x418/0x43c) from [<c062b1c4>] (__netif_receive_skb+0x4cc/0x598)
  [<c062b1c4>] (__netif_receive_skb+0x4cc/0x598) from [<c062b314>] (process_backlog+0x84/0x158)
  [<c062b314>] (process_backlog+0x84/0x158) from [<c062de84>] (net_rx_action+0x70/0x1dc)
  [<c062de84>] (net_rx_action+0x70/0x1dc) from [<c0088230>] (__do_softirq+0x11c/0x27c)
  [<c0088230>] (__do_softirq+0x11c/0x27c) from [<c008857c>] (do_softirq+0x44/0x50)
  [<c008857c>] (do_softirq+0x44/0x50) from [<c0088614>] (local_bh_enable_ip+0x8c/0xd0)
  [<c0088614>] (local_bh_enable_ip+0x8c/0xd0) from [<c06b0330>] (inet_stream_connect+0x164/0x298)
  [<c06b0330>] (inet_stream_connect+0x164/0x298) from [<c061d68c>] (sys_connect+0x88/0xc8)
  [<c061d68c>] (sys_connect+0x88/0xc8) from [<c000e340>] (ret_fast_syscall+0x0/0x30)
  Code: 2a000021 e59d2028 e59de01c e59f011c (e7824103)
  ---[ end trace da227214a82491bd ]---
  Kernel panic - not syncing: Fatal exception in interrupt

This comes about because CPU1 is executing xt_replace_table in response
to a setsockopt syscall, resulting in:

	ret = xt_jumpstack_alloc(newinfo);
		--> newinfo->jumpstack = kzalloc(size, GFP_KERNEL);

	[...]

	table->private = newinfo;
	newinfo->initial_entries = private->initial_entries;

Meanwhile, CPU0 is handling the network receive path and ends up in
ipt_do_table, resulting in:

	private = table->private;

	[...]

	jumpstack  = (struct ipt_entry **)private->jumpstack[cpu];

On weakly ordered memory architectures, the writes to table->private
and newinfo->jumpstack from CPU1 can be observed out of order by CPU0.
Furthermore, on architectures which don't respect ordering of address
dependencies (i.e. Alpha), the reads from CPU0 can also be re-ordered.

This patch adds an smp_wmb() before the assignment to table->private
(which is essentially publishing newinfo) to ensure that all writes to
newinfo will be observed before plugging it into the table structure.
A dependent-read barrier is also added on the consumer sides, to ensure
the same ordering requirements are also respected there.

CRs-Fixed: 591149

Change-Id: Ica3ec69cd6e2f77945a1a7303f92887feecf42e9
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reported-by: Wang, Yalin <Yalin.Wang@sonymobile.com>
Tested-by: Wang, Yalin <Yalin.Wang@sonymobile.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Git-commit: b416c144f46af1a30ddfa4e4319a8f077381ad63
Git-repo: https://www.codeaurora.org/cgit/quic/la/kernel/msm/common/
Signed-off-by: Vijaya Kumar T M <vtmuni@codeaurora.org>