diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-06-17 02:05:15 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-06-27 05:07:57 -0400 |
commit | c3e757a77cab461d11cd3e365d700e8c8fb3fae0 (patch) | |
tree | 24328b21614027ff1fc0f9ac1ddea5301736ce65 /arch/arc/mm | |
parent | 5a45da02cf040ae7eacc9da10f6e8e369a220863 (diff) |
ARC: [tlb-miss] Extraneous PTE bit testing/setting
* No need to check for READ access in I-TLB Miss handler
* Redundant PAGE_PRESENT update in PTE
Post TLB entry installation, in updating PTE for software accessed/dity
bits, no need to update PAGE_PRESENT since it will already be set.
Infact the entry won't have installed if !PAGE_PRESENT.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/mm')
-rw-r--r-- | arch/arc/mm/tlbex.S | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arc/mm/tlbex.S b/arch/arc/mm/tlbex.S index 8d61fdf7a43b..fcdc19ff6da7 100644 --- a/arch/arc/mm/tlbex.S +++ b/arch/arc/mm/tlbex.S | |||
@@ -277,16 +277,16 @@ ARC_ENTRY EV_TLBMissI | |||
277 | ;---------------------------------------------------------------- | 277 | ;---------------------------------------------------------------- |
278 | ; VERIFY_PTE: Check if PTE permissions approp for executing code | 278 | ; VERIFY_PTE: Check if PTE permissions approp for executing code |
279 | cmp_s r2, VMALLOC_START | 279 | cmp_s r2, VMALLOC_START |
280 | mov.lo r2, (_PAGE_PRESENT | _PAGE_U_READ | _PAGE_U_EXECUTE) | 280 | mov.lo r2, (_PAGE_PRESENT | _PAGE_U_EXECUTE) |
281 | mov.hs r2, (_PAGE_PRESENT | _PAGE_K_READ | _PAGE_K_EXECUTE) | 281 | mov.hs r2, (_PAGE_PRESENT | _PAGE_K_EXECUTE) |
282 | 282 | ||
283 | and r3, r0, r2 ; Mask out NON Flag bits from PTE | 283 | and r3, r0, r2 ; Mask out NON Flag bits from PTE |
284 | xor.f r3, r3, r2 ; check ( ( pte & flags_test ) == flags_test ) | 284 | xor.f r3, r3, r2 ; check ( ( pte & flags_test ) == flags_test ) |
285 | bnz do_slow_path_pf | 285 | bnz do_slow_path_pf |
286 | 286 | ||
287 | ; Let Linux VM know that the page was accessed | 287 | ; Let Linux VM know that the page was accessed |
288 | or r0, r0, (_PAGE_PRESENT | _PAGE_ACCESSED) ; set Accessed Bit | 288 | or r0, r0, _PAGE_ACCESSED ; set Accessed Bit |
289 | st_s r0, [r1] ; Write back PTE | 289 | st_s r0, [r1] ; Write back PTE |
290 | 290 | ||
291 | CONV_PTE_TO_TLB | 291 | CONV_PTE_TO_TLB |
292 | COMMIT_ENTRY_TO_MMU | 292 | COMMIT_ENTRY_TO_MMU |
@@ -345,7 +345,7 @@ ARC_ENTRY EV_TLBMissD | |||
345 | ;---------------------------------------------------------------- | 345 | ;---------------------------------------------------------------- |
346 | ; UPDATE_PTE: Let Linux VM know that page was accessed/dirty | 346 | ; UPDATE_PTE: Let Linux VM know that page was accessed/dirty |
347 | lr r3, [ecr] | 347 | lr r3, [ecr] |
348 | or r0, r0, (_PAGE_PRESENT | _PAGE_ACCESSED) ; Accessed bit always | 348 | or r0, r0, _PAGE_ACCESSED ; Accessed bit always |
349 | btst_s r3, ECR_C_BIT_DTLB_ST_MISS ; See if it was a Write Access ? | 349 | btst_s r3, ECR_C_BIT_DTLB_ST_MISS ; See if it was a Write Access ? |
350 | or.nz r0, r0, _PAGE_MODIFIED ; if Write, set Dirty bit as well | 350 | or.nz r0, r0, _PAGE_MODIFIED ; if Write, set Dirty bit as well |
351 | st_s r0, [r1] ; Write back PTE | 351 | st_s r0, [r1] ; Write back PTE |