diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-01-18 04:42:23 -0500 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-02-15 12:46:02 -0500 |
commit | 0ef88a54aa341f754707414500158addbf35c780 (patch) | |
tree | 0b849aebc28e9140e79cb7e7f2822939cbac0b39 /arch/arc/mm | |
parent | fa1c3ff935179453801d763940c38c3ac2d581eb (diff) |
ARC: Diagnostics: show_regs() etc
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/mm')
-rw-r--r-- | arch/arc/mm/tlbex.S | 20 |
1 files changed, 20 insertions, 0 deletions
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: | |||
133 | lsr r0, r2, (PAGE_SHIFT - 2) | 133 | lsr r0, r2, (PAGE_SHIFT - 2) |
134 | and r0, r0, ( (PTRS_PER_PTE - 1) << 2) | 134 | and r0, r0, ( (PTRS_PER_PTE - 1) << 2) |
135 | ld.aw r0, [r1, r0] ; get PTE and PTE ptr for fault addr | 135 | ld.aw r0, [r1, r0] ; get PTE and PTE ptr for fault addr |
136 | #ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT | ||
137 | and.f 0, r0, _PAGE_PRESENT | ||
138 | bz 1f | ||
139 | ld r2, [num_pte_not_present] | ||
140 | add r2, r2, 1 | ||
141 | st r2, [num_pte_not_present] | ||
142 | 1: | ||
143 | #endif | ||
136 | 144 | ||
137 | .endm | 145 | .endm |
138 | 146 | ||
@@ -219,6 +227,12 @@ ARC_ENTRY EV_TLBMissI | |||
219 | 227 | ||
220 | TLBMISS_FREEUP_REGS | 228 | TLBMISS_FREEUP_REGS |
221 | 229 | ||
230 | #ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT | ||
231 | ld r0, [@numitlb] | ||
232 | add r0, r0, 1 | ||
233 | st r0, [@numitlb] | ||
234 | #endif | ||
235 | |||
222 | ;---------------------------------------------------------------- | 236 | ;---------------------------------------------------------------- |
223 | ; Get the PTE corresponding to V-addr accessed | 237 | ; Get the PTE corresponding to V-addr accessed |
224 | LOAD_FAULT_PTE | 238 | LOAD_FAULT_PTE |
@@ -252,6 +266,12 @@ ARC_ENTRY EV_TLBMissD | |||
252 | 266 | ||
253 | TLBMISS_FREEUP_REGS | 267 | TLBMISS_FREEUP_REGS |
254 | 268 | ||
269 | #ifdef CONFIG_ARC_DBG_TLB_MISS_COUNT | ||
270 | ld r0, [@numdtlb] | ||
271 | add r0, r0, 1 | ||
272 | st r0, [@numdtlb] | ||
273 | #endif | ||
274 | |||
255 | ;---------------------------------------------------------------- | 275 | ;---------------------------------------------------------------- |
256 | ; Get the PTE corresponding to V-addr accessed | 276 | ; Get the PTE corresponding to V-addr accessed |
257 | ; If PTE exists, it will setup, r0 = PTE, r1 = Ptr to PTE | 277 | ; If PTE exists, it will setup, r0 = PTE, r1 = Ptr to PTE |