aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh3
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-14 13:49:40 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-14 13:49:40 -0400
commit112e58471de3431fbd03dee514777ad4a66a77b2 (patch)
treed1cb3238e18467479d876ebcc99e06c1885e2538 /arch/sh/kernel/cpu/sh3
parente7b8b7f16edc9b363573eadf2ab2683473626071 (diff)
sh: TLB protection violation exception optimizations.
This adds a bit of rework to have the TLB protection violations skip the TLB miss fastpath and go directly in to do_page_fault(), as these require slow path handling. Based on an earlier patch by SUGIOKA Toshinobu. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh3')
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S30
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index 3cb531f233f..bbaf2bd118e 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -113,34 +113,33 @@ OFF_TRA = (16*4+6*4)
113#if defined(CONFIG_MMU) 113#if defined(CONFIG_MMU)
114 .align 2 114 .align 2
115ENTRY(tlb_miss_load) 115ENTRY(tlb_miss_load)
116 bra call_dpf 116 bra call_handle_tlbmiss
117 mov #0, r5 117 mov #0, r5
118 118
119 .align 2 119 .align 2
120ENTRY(tlb_miss_store) 120ENTRY(tlb_miss_store)
121 bra call_dpf 121 bra call_handle_tlbmiss
122 mov #1, r5 122 mov #1, r5
123 123
124 .align 2 124 .align 2
125ENTRY(initial_page_write) 125ENTRY(initial_page_write)
126 bra call_dpf 126 bra call_handle_tlbmiss
127 mov #1, r5 127 mov #1, r5
128 128
129 .align 2 129 .align 2
130ENTRY(tlb_protection_violation_load) 130ENTRY(tlb_protection_violation_load)
131 bra call_dpf 131 bra call_do_page_fault
132 mov #0, r5 132 mov #0, r5
133 133
134 .align 2 134 .align 2
135ENTRY(tlb_protection_violation_store) 135ENTRY(tlb_protection_violation_store)
136 bra call_dpf 136 bra call_do_page_fault
137 mov #1, r5 137 mov #1, r5
138 138
139call_dpf: 139call_handle_tlbmiss:
140 mov.l 1f, r0 140 mov.l 1f, r0
141 mov r5, r8 141 mov r5, r8
142 mov.l @r0, r6 142 mov.l @r0, r6
143 mov r6, r9
144 mov.l 2f, r0 143 mov.l 2f, r0
145 sts pr, r10 144 sts pr, r10
146 jsr @r0 145 jsr @r0
@@ -151,16 +150,25 @@ call_dpf:
151 lds r10, pr 150 lds r10, pr
152 rts 151 rts
153 nop 152 nop
1540: mov.l 3f, r0 1530:
155 mov r9, r6
156 mov r8, r5 154 mov r8, r5
155call_do_page_fault:
156 mov.l 1f, r0
157 mov.l @r0, r6
158
159 sti
160
161 mov.l 3f, r0
162 mov.l 4f, r1
163 mov r15, r4
157 jmp @r0 164 jmp @r0
158 mov r15, r4 165 lds r1, pr
159 166
160 .align 2 167 .align 2
1611: .long MMU_TEA 1681: .long MMU_TEA
1622: .long __do_page_fault 1692: .long handle_tlbmiss
1633: .long do_page_fault 1703: .long do_page_fault
1714: .long ret_from_exception
164 172
165 .align 2 173 .align 2
166ENTRY(address_error_load) 174ENTRY(address_error_load)