From 0ef88a54aa341f754707414500158addbf35c780 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Fri, 18 Jan 2013 15:12:23 +0530 Subject: ARC: Diagnostics: show_regs() etc Signed-off-by: Vineet Gupta --- arch/arc/mm/tlbex.S | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'arch/arc/mm/tlbex.S') diff --git a/arch/arc/mm/tlbex.S b/arch/arc/mm/tlbex.S index fc5b97129e55..164b02169498 100644 --- a/arch/arc/mm/tlbex.S +++ b/arch/arc/mm/tlbex.S @@ -133,6 +133,14 @@ ex_saved_reg1: lsr r0, r2, (PAGE_SHIFT - 2) and r0, r0, ( (PTRS_PER_PTE - 1) << 2) ld.aw r0, [r1, r0] ; get PTE and PTE ptr for fault addr +#ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT + and.f 0, r0, _PAGE_PRESENT + bz 1f + ld r2, [num_pte_not_present] + add r2, r2, 1 + st r2, [num_pte_not_present] +1: +#endif .endm @@ -219,6 +227,12 @@ ARC_ENTRY EV_TLBMissI TLBMISS_FREEUP_REGS +#ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT + ld r0, [@numitlb] + add r0, r0, 1 + st r0, [@numitlb] +#endif + ;---------------------------------------------------------------- ; Get the PTE corresponding to V-addr accessed LOAD_FAULT_PTE @@ -252,6 +266,12 @@ ARC_ENTRY EV_TLBMissD TLBMISS_FREEUP_REGS +#ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT + ld r0, [@numdtlb] + add r0, r0, 1 + st r0, [@numdtlb] +#endif + ;---------------------------------------------------------------- ; Get the PTE corresponding to V-addr accessed ; If PTE exists, it will setup, r0 = PTE, r1 = Ptr to PTE -- cgit v1.2.3-59-g8ed1b