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

Commit 1339734b authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "arm64: Add TLB conflict fault handler"

parents 5de64233 d99faaa6
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include <asm/tlbflush.h>
#include <asm/kryo-arm64-edac.h>
#include <asm/traps.h>
#include <soc/qcom/scm.h>

#include <acpi/ghes.h>

@@ -601,6 +602,23 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
	return 0;
}

static int do_tlb_conf_fault(unsigned long addr,
				unsigned int esr,
				struct pt_regs *regs)
{
#define SCM_TLB_CONFLICT_CMD	0x1B
	struct scm_desc desc = {
		.args[0] = addr,
		.arginfo = SCM_ARGS(1),
	};

	if (scm_call2_atomic(SCM_SIP_FNID(SCM_SVC_MP, SCM_TLB_CONFLICT_CMD),
						&desc))
		return 1;

	return 0;
}

static int __kprobes do_translation_fault(unsigned long addr,
					  unsigned int esr,
					  struct pt_regs *regs)
@@ -709,7 +727,7 @@ static const struct fault_info fault_info[] = {
	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 45"			},
	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 46"			},
	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 47"			},
	{ do_bad,		SIGKILL, SI_KERNEL,	"TLB conflict abort"		},
	{ do_tlb_conf_fault,	SIGKILL, SI_KERNEL,	"TLB conflict abort"},
	{ do_bad,		SIGKILL, SI_KERNEL,	"Unsupported atomic hardware update fault"	},
	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 50"			},
	{ do_bad,		SIGKILL, SI_KERNEL,	"unknown 51"			},