ANDROID: fault: Add vendor hook for TLB conflict

Add android_vh_handle_tlb_conf vendor hook to gracefully
handle TLB conflict.

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_handle_tlb_conf'

Bug: 222637802
Change-Id: I3d6814cd950e77e1a15ce444764078692724cd0a
Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
Signed-off-by: Vamsi Krishna Lanka <quic_vamslank@quicinc.com>
This commit is contained in:
Naina Mehta
2022-03-04 14:54:41 +05:30
committed by Vamsi Krishna Lanka
parent 56b51fac38
commit 368cd63a4a
6 changed files with 1128 additions and 671 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -2026,6 +2026,7 @@
__tracepoint_android_vh_ftrace_oops_exit
__tracepoint_android_vh_ftrace_size_check
__tracepoint_android_vh_gic_resume
__tracepoint_android_vh_handle_tlb_conf
__tracepoint_android_vh_ipi_stop
__tracepoint_android_vh_jiffies_update
__tracepoint_android_vh_kswapd_per_node

View File

@@ -112,6 +112,7 @@
#define ESR_ELx_FSC_ACCESS (0x08)
#define ESR_ELx_FSC_FAULT (0x04)
#define ESR_ELx_FSC_PERM (0x0C)
#define ESR_ELx_FSC_TLBCONF (0x30)
/* ISS field definitions for Data Aborts */
#define ESR_ELx_ISV_SHIFT (24)

View File

@@ -779,7 +779,11 @@ static int do_alignment_fault(unsigned long far, unsigned int esr,
static int do_bad(unsigned long far, unsigned int esr, struct pt_regs *regs)
{
return 1; /* "fault" */
unsigned long addr = untagged_addr(far);
int ret = 1;
trace_android_vh_handle_tlb_conf(addr, esr, &ret);
return ret;
}
static int do_sea(unsigned long far, unsigned int esr, struct pt_regs *regs)

View File

@@ -336,3 +336,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_swappiness);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_partial_init);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_mmc_cache_card_properties);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_print_transaction_info);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_handle_tlb_conf);

View File

@@ -25,6 +25,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_do_sp_pc_abort,
TP_ARGS(addr, esr, regs),
TP_CONDITION(!user_mode(regs)));
DECLARE_HOOK(android_vh_handle_tlb_conf,
TP_PROTO(unsigned long addr, unsigned int esr, int *ret),
TP_ARGS(addr, esr, ret));
#endif /* _TRACE_HOOK_FAULT_H */
/* This part must be outside protection */
#include <trace/define_trace.h>