diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2012-05-11 07:35:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-11 22:27:52 -0400 |
commit | ef136bc91e3a98d34f32d85ab0c79de67b4f6f87 (patch) | |
tree | 6455e0125f740e5afdb18d3c11daf2b9c2c44729 /arch/sparc/kernel | |
parent | e098ff92f65048ce327927c0ce3daed0ef34988f (diff) |
sparc32: drop sun4c user stack checking routine
With this we no longer do any run-time patchings of traps.
So drop the function + macro to support this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/rtrap_32.S | 76 |
1 files changed, 6 insertions, 70 deletions
diff --git a/arch/sparc/kernel/rtrap_32.S b/arch/sparc/kernel/rtrap_32.S index 5f5f74c2c2ca..7abc24e2bf1a 100644 --- a/arch/sparc/kernel/rtrap_32.S +++ b/arch/sparc/kernel/rtrap_32.S | |||
@@ -128,13 +128,12 @@ rtrap_patch2: and %glob_tmp, 0xff, %glob_tmp | |||
128 | 128 | ||
129 | wr %glob_tmp, 0x0, %wim | 129 | wr %glob_tmp, 0x0, %wim |
130 | 130 | ||
131 | /* Here comes the architecture specific | 131 | /* Here comes the architecture specific |
132 | * branch to the user stack checking routine | 132 | * branch to the user stack checking routine |
133 | * for return from traps. | 133 | * for return from traps. |
134 | */ | 134 | */ |
135 | .globl rtrap_mmu_patchme | 135 | b srmmu_rett_stackchk |
136 | rtrap_mmu_patchme: b sun4c_rett_stackchk | 136 | andcc %fp, 0x7, %g0 |
137 | andcc %fp, 0x7, %g0 | ||
138 | 137 | ||
139 | ret_trap_userwins_ok: | 138 | ret_trap_userwins_ok: |
140 | LOAD_PT_PRIV(sp, t_psr, t_pc, t_npc) | 139 | LOAD_PT_PRIV(sp, t_psr, t_pc, t_npc) |
@@ -225,69 +224,6 @@ ret_trap_user_stack_is_bolixed: | |||
225 | b signal_p | 224 | b signal_p |
226 | ld [%curptr + TI_FLAGS], %g2 | 225 | ld [%curptr + TI_FLAGS], %g2 |
227 | 226 | ||
228 | sun4c_rett_stackchk: | ||
229 | be 1f | ||
230 | and %fp, 0xfff, %g1 ! delay slot | ||
231 | |||
232 | b ret_trap_user_stack_is_bolixed + 0x4 | ||
233 | wr %t_wim, 0x0, %wim | ||
234 | |||
235 | /* See if we have to check the sanity of one page or two */ | ||
236 | 1: | ||
237 | add %g1, 0x38, %g1 | ||
238 | sra %fp, 29, %g2 | ||
239 | add %g2, 0x1, %g2 | ||
240 | andncc %g2, 0x1, %g0 | ||
241 | be 1f | ||
242 | andncc %g1, 0xff8, %g0 | ||
243 | |||
244 | /* %sp is in vma hole, yuck */ | ||
245 | b ret_trap_user_stack_is_bolixed + 0x4 | ||
246 | wr %t_wim, 0x0, %wim | ||
247 | |||
248 | 1: | ||
249 | be sun4c_rett_onepage /* Only one page to check */ | ||
250 | lda [%fp] ASI_PTE, %g2 | ||
251 | |||
252 | sun4c_rett_twopages: | ||
253 | add %fp, 0x38, %g1 | ||
254 | sra %g1, 29, %g2 | ||
255 | add %g2, 0x1, %g2 | ||
256 | andncc %g2, 0x1, %g0 | ||
257 | be 1f | ||
258 | lda [%g1] ASI_PTE, %g2 | ||
259 | |||
260 | /* Second page is in vma hole */ | ||
261 | b ret_trap_user_stack_is_bolixed + 0x4 | ||
262 | wr %t_wim, 0x0, %wim | ||
263 | |||
264 | 1: | ||
265 | srl %g2, 29, %g2 | ||
266 | andcc %g2, 0x4, %g0 | ||
267 | bne sun4c_rett_onepage | ||
268 | lda [%fp] ASI_PTE, %g2 | ||
269 | |||
270 | /* Second page has bad perms */ | ||
271 | b ret_trap_user_stack_is_bolixed + 0x4 | ||
272 | wr %t_wim, 0x0, %wim | ||
273 | |||
274 | sun4c_rett_onepage: | ||
275 | srl %g2, 29, %g2 | ||
276 | andcc %g2, 0x4, %g0 | ||
277 | bne,a 1f | ||
278 | restore %g0, %g0, %g0 | ||
279 | |||
280 | /* A page had bad page permissions, losing... */ | ||
281 | b ret_trap_user_stack_is_bolixed + 0x4 | ||
282 | wr %t_wim, 0x0, %wim | ||
283 | |||
284 | /* Whee, things are ok, load the window and continue. */ | ||
285 | 1: | ||
286 | LOAD_WINDOW(sp) | ||
287 | |||
288 | b ret_trap_userwins_ok | ||
289 | save %g0, %g0, %g0 | ||
290 | |||
291 | .globl srmmu_rett_stackchk | 227 | .globl srmmu_rett_stackchk |
292 | srmmu_rett_stackchk: | 228 | srmmu_rett_stackchk: |
293 | bne ret_trap_user_stack_is_bolixed | 229 | bne ret_trap_user_stack_is_bolixed |