Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4db3dddb authored by Neil Leeder's avatar Neil Leeder
Browse files

soc: qcom: cpaccess: use insn to write kernel word



Use the aarch64 insn functionality to write a word
into kernel space which might otherwise be
write-protected.

Change-Id: I022ecfb3c00b81146baf165f2980104e6ec9d502
Signed-off-by: default avatarNeil Leeder <nleeder@codeaurora.org>
parent 0600f6c1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#include <linux/types.h>
#include <asm/cacheflush.h>
#include <asm/smp_plat.h>
#include <asm/mmu.h>
#include <asm/insn.h>
#include <soc/qcom/kryo-l2-accessors.h>

#define TYPE_MAX_CHARACTERS 20
@@ -176,7 +176,7 @@ static u64 do_cpregister_rw(int write)
	 * instruction, ensuring cache coherency.
	 */
	p_opcode = (u32 *)&cpaccess_dummy_inst;
	mem_text_write_kernel_word(p_opcode, opcode);
	aarch64_insn_write(p_opcode, opcode);

	/*
	 * Use smp_call_function_single to do CPU core specific