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>
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: move AES typedefs and function prototypes to separate header

Put the struct definitions for AES keys and the asm function prototypes in a
separate header and export the asm functions from the module.
This allows other drivers to use them directly.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM: 7626/1: arm/crypto: Make asm SHA-1 and AES code Thumb-2 compatible

This patch fixes aes-armv4.S and sha1-armv4-large.S to work
natively in Thumb.  This allows ARM/Thumb interworking workarounds
to be removed.

I also take the opportunity to convert some explicit assembler
directives for exported functions to the standard
ENTRY()/ENDPROC().

For the code itself:

  * In sha1_block_data_order, use of TEQ with sp is deprecated in
    ARMv7 and not supported in Thumb.  For the branches back to
    .L_00_15 and .L_40_59, the TEQ is converted to a CMP, under the
    assumption that clobbering the C flag here will not cause
    incorrect behaviour.

    For the first branch back to .L_20_39_or_60_79 the C flag is
    important, so sp is moved temporarily into another register so
    that TEQ can be used for the comparison.

  * In the AES code, most forms of register-indexed addressing with
    shifts and rotates are not permitted for loads and stores in
    Thumb, so the address calculation is done using a separate
    instruction for the Thumb case.

The resulting code is unlikely to be optimally scheduled, but it
should not have a large impact given the overall size of the code.
I haven't run any benchmarks.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Tested-by: David McCullough <ucdevel@gmail.com> (ARM only)
Acked-by: David McCullough <ucdevel@gmail.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM: 7837/3: fix Thumb-2 bug in AES assembler code

Patch 638591c enabled building the AES assembler code in Thumb2 mode.
However, this code used arithmetic involving PC rather than adr{l}
instructions to generate PC-relative references to the lookup tables,
and this needs to take into account the different PC offset when
running in Thumb mode.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling

Make the SHA1 asm code ABI conformant by making sure all stack
accesses occur above the stack pointer.

Origin:
http://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=1a9d60d2

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM: add .gitignore entry for aesbs-core.S

This avoids this file being incorrectly added to git.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
update VFPmodule

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