squashed update 3.4.70

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
squashed update 3.4.72

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
cpu_gov:XPerience: Update

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM: add support for bit sliced AES using NEON instructions

Bit sliced AES gives around 45% speedup on Cortex-A15 for encryption
and around 25% for decryption. This implementation of the AES algorithm
does not rely on any lookup tables so it is believed to be invulnerable
to cache timing attacks.

This algorithm processes up to 8 blocks in parallel in constant time. This
means that it is not usable by chaining modes that are strictly sequential
in nature, such as CBC encryption. CBC decryption, however, can benefit from
this implementation and runs about 25% faster. The other chaining modes
implemented in this module, XTS and CTR, can execute fully in parallel in
both directions.

The core code has been adopted from the OpenSSL project (in collaboration
with the original author, on cc). For ease of maintenance, this version is
identical to the upstream OpenSSL code, i.e., all modifications that were
required to make it suitable for inclusion into the kernel have been made
upstream. The original can be found here:

    http://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=6f6a6130

Note to integrators:
While this implementation is significantly faster than the existing table
based ones (generic or ARM asm), especially in CTR mode, the effects on
power efficiency are unclear as of yet. This code does fundamentally more
work, by calculating values that the table based code obtains by a simple
lookup; only by doing all of that work in a SIMD fashion, it manages to
perform better.

Cc: Andy Polyakov <appro@openssl.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM: 7495/1: 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.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: flar2 <asegaert@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
slimbus: overclock root freq

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
PM: devfreq: Add sysfs nodes for devfreq governors

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
PM: devfreq: Fix show available freqs

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
PM: devfreq: Add conservative governor

A GPU governor is not rocket science. This one gets the job done pretty
smoothly while complying with devfreq framework rules.

Conflicts:
	drivers/devfreq/Kconfig

Conflicts:
	drivers/devfreq/Kconfig

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
gpu: conservative gob

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
PM: devfreq: Add some conservativeness

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
PM: devfreq: Always reflect a change of polling interval

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
PM: devfreq: conservative: Return 0 if GPU just started

Bailing out early is perfectly fine, so do not trigger an error in
update_devfreq.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
PM: devfreq: Use high priority workqueue

It does not make sense to run kgsl on high and devfreq on regular
priority.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: kgsl: Export device state to devfreq

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: kgsl: Delay the first devfreq status read

No reason to read status when there hasn't been any activity
yet.  Wait at least one sample period after the GPU has been
turned on before pinging devfreq to read status.

Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
PM / devfreq: Check for GPU busy time before sending the sample

Sometimes GPU busy time is very low during sampling. Accumulate
the statistics and send them with the next sample.

Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM: 7583/1: decompressor: Enable unaligned memory access for v6 and above

Modern GCC can generate code which makes use of the CPU's native
unaligned memory access capabilities.  This is useful for the C
decompressor implementations used for unpacking compressed kernels.

This patch disables alignment faults and enables the v6 unaligned
access model on CPUs which support these features (i.e., v6 and
later), allowing full unaligned access support for C code in the
decompressor.

The decompressor C code must not be built to assume that unaligned
access works if support for v5 or older platforms is included in
the kernel.

For correct code generation, C decompressor code must always use
the get_unaligned and put_unaligned accessors when dealing with
unaligned pointers, regardless of this patch.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
power: msm_battery: Increase battery check interval from 5 seconds to 15 seconds.

Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
Added optimized ARM RWSEM algorithm.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>