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>
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>
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)
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)
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)
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)
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