crypto: create generic version of ablk_helper

Create a generic version of ablk_helper so it can be reused
by other architectures.

Change-Id: I190b42ba61af8736f18e5c870a446cc47010966e
Acked-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
ARM: pull in <asm/simd.h> from asm-generic

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
defconfig: enable ARM optimised AES and SHA1 routines + kernel mode NEON

Change-Id: I65cda6dae5ddddb961f303abfc444badabee1077
Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
cpufreq: Avoid calling cpufreq driver's target() routine if target_freq == policy->cur

Avoid calling cpufreq driver's target() routine if new frequency is same as
policies current frequency.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
msm: clock-krait-8974: User voltage control for msm-cpufreq device
cpufreq: interactive: Revert timer start modification

commit f8b276565ce95bd788af0fc8d060f92632590a40
(cpufreq: Sync on thread migration optimizations)
introduced a change to cpufreq_interactive_timer_start() in order
to reschedule the timer differently based on whether min or max
is changed. A better way is to reschedule the timer only when
necessary.

Revert timer start modification in preparation for the final fix.

Change-Id: I13f3b75a6eee03ac6380c24db899806a9bfbc96a
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>

[zwliew: add missing setting of max_freq after reschedule]
Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
cpufreq: interactive: Add limits_changed to boosted case
cpufreq: interactive: Honor changed minimum frequency

This saves a few cycles in the timer routine.

Change-Id: Id76e60ab6ef2abb20fb37ce0f6cefa7fca13215e
[zwliew: adapt 0c23ad997b240cac5eaafceb2112fe98f7621009]
Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
cpufreq: interactive: Use frequency dependent per cpu timings

This allows in-depth testing of the timer routine.

Change-Id: I59023eb7e7758730ddc4b073087b46aa117e3a41
[zwliew: structural changes for unadulterated timer routine]
Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
cpufreq: interactive: Honor boosted state when entering idle

The old logic didn't take the boosted state in account. Just
leave the comment intact because our temporary min is not
the regular policy->min it refers to.
cpufreq: interactive: fix compiling warnings
cpufreq: interactive: Initialize spinlocks

These were missing in commit 8fbac318173082918312d6a4ceacf63376797c52,
"cpufreq: interactive: Use frequency dependent per cpu timings".
cpufreq: Introduce new relation for freq selection

Introduce CPUFREQ_RELATION_C for frequency selection.
It selects the frequency with the minimum euclidean distance
to target. In case of equal distance between 2 frequencies,
it will select the greater freq.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
cpufreq: interactive: use stratosk's method of calculating new freq

Change-Id: Ibadc149d9e16e8ea9a08384b9646c42516f6b493
Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
net: Fix "ip rule delete table 256"

[ Upstream commit 13eb2ab2d33c57ebddc57437a7d341995fc9138c ]

When trying to delete a table >= 256 using iproute2 the local table
will be deleted.
The table id is specified as a netlink attribute when it needs more then
8 bits and iproute2 then sets the table field to RT_TABLE_UNSPEC (0).
Preconditions to matching the table id in the rule delete code
doesn't seem to take the "table id in netlink attribute" into condition
so the frh_get_table helper function never gets to do its job when
matching against current rule.
Use the helper function twice instead of peaking at the table value directly.

Originally reported at: http://bugs.debian.org/724783

Reported-by: Nicolas HICHER <nhicher@avencall.com>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cpuboost: Add hotplug boosting

If we decide to hotplug a core then we are making a strong
statement that we think that the system load is high.  Let's
have faith in our hotplug driver(s) and boost the cpufreq
when we are hotplugging cores.

Change-Id: Id992f225f89fab0507e20082fd0d32307550d2c1
cpufreq: cpu-boost: Increase sync thread policy and priority

More or less all cpufreq related threads run in a high priority.

Also, CMs patch series was somehow out of sync and incomplete,
readd the unchanged policy update to source cpu bit. And readd
the check for a possible corner case in try_to_wake_up() that
was already missing before.

Change-Id: Ibcc45217ff4b9323178b077754c4bb7c468984db
[zwliew: only increase priority]
Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
cpufreq: interactive: Move definition of cpufreq_gov_interactive downwards

This moves definition of cpufreq_gov_interactive towards the bottom of file, so
that we don't have to add prototype of cpufreq_governor_interactive() in the
beginning of file.

Change-Id: I04bd1004954eb36502c5cd7e35d3d7274cddaf95
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
cpufreq: interactive: remove unused choose frequency functions

ever since the change in new freq calculations, these functions have become obsolete and unused. remove them.

Change-Id: I7279846660e9159324c76f1accdfd6afd2adce98
Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
sched/debug: Limit sd->*_idx range on sysctl

Various sd->*_idx's are used for refering the rq's load average table
when selecting a cpu to run.  However they can be set to any number
with sysctl knobs so that it can crash the kernel if something bad is
given. Fix it by limiting them into the actual range.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1345104204-8317-1-git-send-email-namhyung@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>