ARM: mutex: use generic atomic_dec-based implementation for ARMv6+

Commit a76d7bd96d65 ("ARM: 7467/1: mutex: use generic xchg-based
implementation for ARMv6+") removed the barrier-less, ARM-specific
mutex implementation in favour of the generic xchg-based code.

Since then, a bug was uncovered in the xchg code when running on SMP
platforms, due to interactions between the locking paths and the
MUTEX_SPIN_ON_OWNER code. This was fixed in 0bce9c46bf3b ("mutex: place
lock in contended state after fastpath_lock failure"), however, the
atomic_dec-based mutex algorithm is now marginally more efficient for
ARM (~0.5% improvement in hackbench scores on dual A15).

This patch moves ARMv6+ platforms to the atomic_dec-based mutex code.

Change-Id: I8f64e98ccb61cc1cb9cb68ee15e55d8a792792f5
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Reviewed-on: http://git-master/r/130941
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
msm: kgsl: Add new sysfs node to list GPU clock frequencies

Add a new sysfs node to communicate available GPU clock frequencies
to userspace for the power daemons.

Change-Id: I2479217aa797e2066cc50476ef7f73c5cae8aebe
Signed-off-by: Anshuman Dani <adani@codeaurora.org>
modified for Linux 3.0.x kernel from CAF

Signed-off-by: Paul Reioux <reioux@gmail.com>
KGSL: Add a simple GPU governor for Adreno xxx GPU series

initial coding for a Simple GPU governor based on my own work 2 years ago
from Sensation GB kernel commit: c1ea8f64167270d67915b4d4fb00910b1c0f513f

Signed-off-by: Paul Reioux <reioux@gmail.com>
KGSL: make simple govenor a selectable option, co-exist with ondemand

also removed some hardcoded values

Signed-off-by: Paul Reioux <reioux@gmail.com>
KGSL: simple governor: expose tunables to sysfs interface via module_param

Signed-off-by: Paul Reioux <reioux@gmail.com>
KGSL: Simple Governor: fix minor logic issue

Signed-off-by: Paul Reioux <reioux@gmail.com>
board/devices: GPU overclocking option enabled

increase max to turb 320 MHz with corresponding bandwidth increase
to avoid BW starvation which defeats the purpose of frequency bump
in the first place.
msm: kgsl: Add supporting code for 2d dcvs

2d dcvs will also need changes in TrustZone.  However
by adding this code first the TrustZone update can be
made later without breaking any functionality.  This
feature is disabled by default and should not be
enabled without the necessary TrustZone changes in
place.

Change-Id: Ifdd511a3f18ba90faee189393ffc231fbbc6e2cd
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
modified by faux123

Conflicts:
	drivers/gpu/msm_adreno220/kgsl_device.h
	drivers/gpu/msm_adreno220/kgsl_pwrscale_trustzone.c
	drivers/gpu/msm_adreno220/z180.c
	drivers/gpu/msm_adreno220/z180.h
Update Linux 3.0.83
board/devices: add another clock speed step for GPU 2D to conserve battery
gpu overclock: add 300MHz entry and change max GPU to 300MHz

also adjust the low nominal entry from 178MHz to 160MHz to further
reduce gpu clock
Revert "gpu overclock: add 300MHz entry and change max GPU to 300MHz"

This reverts commit 063d8f70914a20141ba9141fac46382eac6ef5de.
Revert "board/devices: add another clock speed step for GPU 2D to conserve battery"

This reverts commit 2c96adca8f5c2d6be1e40363de9519eaf818f51c.
Revert "msm: kgsl: Add supporting code for 2d dcvs"

This reverts commit 36c506595d6f9c698580931378079753ad9495ff.
Revert "board/devices: GPU overclocking option enabled"

This reverts commit fc35e7cea87a3e4a029a2d7dfb9a45810d0c1d8e.
DEVICE: patch from Chad Goodman to help prevent (gfx2d1_clk status stuck at 'off') errors
2D: define 266Mhz 2D GPU clock
GPU 3D: define 300Mhz 3D GPU clock
GPU: Overclock 2D and 3D gpu. set GPU Bus to match requirements of GPU clock
GPU: dont OC by default, allow SYSFS contol over max clock