ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+
commit a76d7bd96d65fa5119adba97e1b58d95f2e78829 upstream.

The open-coded mutex implementation for ARMv6+ cores suffers from a
severe lack of barriers, so in the uncontended case we don't actually
protect any accesses performed during the critical section.

Furthermore, the code is largely a duplication of the ARMv6+ atomic_dec
code but optimised to remove a branch instruction, as the mutex fastpath
was previously inlined. Now that this is executed out-of-line, we can
reuse the atomic access code for the locking (in fact, we use the xchg
code as this produces shorter critical sections).

This patch uses the generic xchg based implementation for mutexes on
ARMv6+, which introduces barriers to the lock/unlock operations and also
has the benefit of removing a fair amount of inline assembly code.

Change-Id: Ie078d293204c562878c3a3e7cb567a8d9ca197fd
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Reported-by: Shan Kang <kangshan0910@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Revert "ASoC: msm: Support independent left-right channel volume control"

 * Requires a userspace change, will revisit after code freeze.

This reverts commit cc650771d74adbfac3e72bb99b45708f5b727f0a.

Change-Id: I6a5062cea236761c69f8260fefecca9dc8c7a066
Merge "ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+ commit a76d7bd96d65fa5119adba97e1b58d95f2e78829 upstream." into cm-10.1
Revert "arm: mm: Add VM_ARM_EMPTY_MAPPING flag to mark the PMD gaps"

This reverts commit 04f9c71592609622de5beb0e4dbf3a65de95be34.
Revert "Revert "arm: mm: Add VM_ARM_EMPTY_MAPPING flag to mark the PMD gaps""

This reverts commit 9834b4d5207ee13536bc41f3a9d98702c0cd9c7a.
Revert "ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS"

This reverts commit 8cc876def310b034ab0e0775a14d1a49472d7f5f.
msm: restart: Always use Samsung magic restart reason

 * If this isn't passed, the bootloader won't honor the
   values written to the bootmode in the param partition.

Change-Id: I1e6d2d47b9cc762b19a48a7edb7abaa296e9e0dc
Revert "Revert "ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS""

The security extension aka trustzone firmware had a bug in the old verizon release which is like the engineering release which causes reboot when a media is playing. I think qcom media goes into secure mode for security reason. verizon users need to update their freaking stuff before they complain something is broken.

Fuck verizon for making this a pain in the ass.

This reverts commit 38e1f74e6898f795b9943d7599fc5c96c13da7a0

Change-Id: If0df40b403546f53cf41642f406fe15cccda149e
Merge "Revert "Revert "ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS""" into cm-10.1
Merge remote-tracking branch 'CM/cm-10.1' into cm-10.1