Commit Graph

9 Commits

Author SHA1 Message Date
Duy Truong
04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Neil Leeder
03ff6036e0 arm: common: fix cpaccess asm instruction
The write_val argument was not specified as an input
on the asm instruction. The compiler thought it wasn't used,
even though the asm instruction does use r0, which
is how write_val is passed into the function. The compiler
would optimise out the argument being passed into
the function.

Add write_val as an input operand to prevent it being
optimised out.

Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
(cherry picked from commit e1bb10a173de0327171c2c8d16f64af34a5ca937)

Change-Id: I478f79a1a34a4ee15516a1765f8c6094191454fd
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:11 -08:00
Neil Leeder
1fed972759 arm: common: Use label to identify cpaccess dummy instruction
Use a label instead of using function start address. It's not
guaranteed that the compiler will make the mrc instruction
the first instruction in the function.

Self-modifying code replaces the dummy instruction with a new
instruction during runtime according to user inputs.

Change-Id: I8c37f4e414ce5983f0317a51a3cf790b45763bfc
Acked-by: Suren Eda Naarayana Kulothungan <sedanaar@qualcomm.com>
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
2013-02-27 18:13:50 -08:00
Rohit Vaswani
58e1b0d919 arm: common: cpaccess.c: fixup
Change-Id: I02891d35cc969d9e4d408f29a9cf3d8dac63759c
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-20 02:49:17 -08:00
Suren Eda Naarayana Kulothungan
572c8cd1f2 arm: common: For single cores do not use smp_call_function_single
Use smp_call_function_single only for SMP systems. For
single cores, call the function directly. Use CONFIG_SMP
to determine if its a SMP system.

Change-Id: I310d8e449ba1fd00318cb4454b3bc840f67230aa
Signed-off-by: Suren Eda Naarayana Kulothungan <sedanaar@codeaurora.org>
(cherry picked from commit 2c9001b514daecea0433ed0e23fc60b1513ac379)
2013-02-20 02:49:17 -08:00
Suren Eda Naarayana Kulothungan
8e5a687298 arm: common: Use noinline to prevent inlining of function
Declare function as noinline so that function which changes
during run time does not get inlined and instead gets called.
Without this, the function contents get inlined while
optimization is turned on.

Change-Id: I8533b0c5a83ed48346a2846e7cd531b8907f82d8
Signed-off-by: Suren Eda Naarayana Kulothungan <sedanaar@codeaurora.org>
(cherry picked from commit 42b0f68886094aa319aa9ca8da72c5ac394dd1e9)
2013-02-20 02:49:16 -08:00
Neil Leeder
7e5f22b0cd ARM: cpaccess: write-enables kernel space for write
Calls the mmu function to ensure that kernel space is
write-enabled before writing the updated CP15
instruction. Removes the unnecessary write of the
constant bx lr instruction.

Change-Id: Idfe44bb89e793b009b17565e7486f3a6e8cdf582
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
(cherry picked from commit 7673a8753ade677b02fbc013f95958d2ee815ba0)
2013-02-20 02:49:16 -08:00
Suren Eda Naarayana Kulothungan
5a83277e9b arm: common: Add indirect L2 rw support for cpaccess
Added indirect L2 rw support to cpaccess kernel module. Input format
change to include a parameter to specify register access type. Validation
if register type is one of supported types.

Change-Id: I5bd52c89d87a4fb4da4248526e56079bb604f910
Signed-off-by: Suren Eda Naarayana Kulothungan <sedanaar@codeaurora.org>
(cherry picked from commit 4c317fbf87a93d8e34e33063b6164e5d5c32cdd0)
2013-02-20 01:32:10 -08:00
Suren Eda Naarayana Kulothungan
8226f46a08 arm: common: CP register access tool for Read/Write to CP registers
The tool can be used to read/write to CP registers by
passing the CP parameters through /sys interface. SMP
support added.

Change-Id: I01d3621f2b6f17d959a237d207b817992404ef88
Signed-off-by: Suren Eda Naarayana Kulothungan <sedanaar@codeaurora.org>
(cherry picked from commit c399b9755096e95036362f00f819c28650eb1a10)

Conflicts:

	arch/arm/Kconfig
	arch/arm/common/Makefile
2013-02-20 01:32:01 -08:00