locking: Move the mutex code to kernel/locking/

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-1ditvncg30dgbpvrz2bxfmke@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sched: defining relaxed version of idle_cpu (squashed
 commit!)

Defining relaxed version of idle_cpu, which uses
macro cpu_relaxed_read_long, that will be used to
enhance power efficiency.

 smp: enhance power efficiency

Here we are trying to reduce power usage through the
use of macros cpu_relaxed_read_short and cpu_relaxed_read.
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/516dadb6544d7f11fd47b9a899786b521e95200c

 arm: atomic.h: defined relaxed atomic_read

Defining relaxed version of atomic read as cpu_relaxed_read_atomic.
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/7aa0038ff5628e60004df7a4c03a855903cfde9b

 arm: asm: relaxed.h: defined relaxed.h

Defined a new header file relaxed.h, which uses generic
definitions of some macros used by arm64 for improving
power efficiency.
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/66abb73bc4294e13c47465f99aed849c02d5e646

 cpu: enhance power efficiency

Here we are trying to reduce power usage through the
use of macros cpu_relaxed_read and relaxed version of
idle_cpu().
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/c45d193c8c8437933f42cf8c518a38e95f217bbe

 asm-generic: relaxed.h: defined relaxed.h

Defined a new header file relaxed.h, which contains basic
macros which will be used for improving power efficiency for
arm64.
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/a25855c38048a35d62f889ee73ef38428243cccd

 llist: defining relaxed version of llist_empty

Defining relaxed version of llist_empty as llist_empty_relaxed,
which will be used for power-optimization.
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/baba912832f3d06497bdb99ec767639615ddf743

 seqlock: enhance power efficiency

Trying to improve the power efficiency in linux/seqlock.h,
using macros cpu_relaxed_read and cpu_read_relax.
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/4968bde65374b1f36be21216ea7b472db589865f

 hrtimer: enhance power efficiency

Defining relaxed version of hrtimer_callback_running(),
which will be used to improve power efficiency through
the use of macro cpu_relaxed_read_long.
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/f0f0e9f68bb7fbb17644859cd8e5e90f3fc91fdb

asm-generic: processor.h: adding new header file

Defining a new header file and adding architecture
independent macros. Using these macros we are optimizing
power usage on ARM64.
https://android.googlesource.com/kernel/tegra.git/+/14ad62abbcc1b2a331ff08a2fb874e5eb3c17a01%5E!/include/asm-generic/processor.h

asm-generic: processor.h: remove redundant macros

Removing cpu_relaxed_read and cpu_relaxed_read_long macros from
processor.h, as these macros are defined in asm-generic/relaxed.h.
https://android.googlesource.com/kernel/tegra.git/+/9a2cf3cfffabaa6088c36ec635e2ecfb7aa168b8%5E!/include/asm-generic/processor.h

arm: including asm-generic/processor.h

Here we are including asm-generic/processor.h
because it has defined some generic macros which
can be used by any architecture for optimaztion
of power usage.
https://android.googlesource.com/kernel/tegra.git/+/05aba0419844a7261e5ed06f49dc99216ea70744%5E!/arch/arm/include/asm/processor.h

mutex: save power with better cpu_relax

Use cpu_relaxed_read and cpu_read_relax to allow more architectures to be able
to "relax" instead of busy spinning.
https://android.googlesource.com/kernel/tegra.git/+/1937ef6f9ce114ad8a9cac6a06e3dce8a1affae2%5E!/kernel/mutex.c

sched: Trying to reduce power usage

Using macros cpu_relaxed_read, cpu_relaxed_read_long and
cpu_read_relax in core.c to improve power efficiency.
https://android.googlesource.com/kernel/tegra.git/+/6e4ee00333a93fdf949c283cce0f0e948cbae08f%5E!/kernel/sched/core.c

bug 1440421

Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
arch: arm: lib: optimize memcpy for cortex-A15

The LDRD/STRD instruction is faster than LDM/STM on Cortex-A15.
Also optimized preload cache size for Cortex-A15.

Added USE_LDRDSTRD_OVER_LDMSTM to turn on LDRD/STRD optimization.
Added ARM_PLD_SIZE, default 32. Should set to 64 for Cortex-A15.

Bug 1185248

Signed-off-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>