aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/sys32.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-09-28 23:41:45 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-09-28 23:41:45 -0400
commit5fd29752f09cabff582f65c0ce35518db4c64937 (patch)
treeb46e5c2c596d26125a7c2aac619fe1b52431f978 /arch/sparc64/kernel/sys32.S
parent8cf14af0a740fb7e9f94a203b5a989beb875d58f (diff)
[SPARC64]: Fix fault handling in unaligned trap handler.
We were not calling kernel_mna_trap_fault() correctly. Instead of being fancy, just return 0 vs. -EFAULT from the assembler stubs, and handle that return value as appropriate. Create an "__retl_efault" stub for assembler exception table entries and use it where possible. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/sys32.S')
-rw-r--r--arch/sparc64/kernel/sys32.S57
1 files changed, 34 insertions, 23 deletions
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S
index 4fb99e0bc7c3..9cd272ac3ac1 100644
--- a/arch/sparc64/kernel/sys32.S
+++ b/arch/sparc64/kernel/sys32.S
@@ -157,6 +157,9 @@ sys32_socketcall: /* %o0=call, %o1=args */
157 or %g2, %lo(__socketcall_table_begin), %g2 157 or %g2, %lo(__socketcall_table_begin), %g2
158 jmpl %g2 + %o0, %g0 158 jmpl %g2 + %o0, %g0
159 nop 159 nop
160do_einval:
161 retl
162 mov -EINVAL, %o0
160 163
161 .align 32 164 .align 32
162__socketcall_table_begin: 165__socketcall_table_begin:
@@ -316,29 +319,37 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int)
316 nop 319 nop
317 nop 320 nop
318 321
319do_einval:
320 retl
321 mov -EINVAL, %o0
322do_efault:
323 retl
324 mov -EFAULT, %o0
325
326 .section __ex_table 322 .section __ex_table
327 .align 4 323 .align 4
328 .word 1b, do_efault, 2b, do_efault, 3b, do_efault, 4b, do_efault 324 .word 1b, __retl_efault, 2b, __retl_efault
329 .word 5b, do_efault, 6b, do_efault, 7b, do_efault, 8b, do_efault 325 .word 3b, __retl_efault, 4b, __retl_efault
330 .word 9b, do_efault, 10b, do_efault, 11b, do_efault, 12b, do_efault 326 .word 5b, __retl_efault, 6b, __retl_efault
331 .word 13b, do_efault, 14b, do_efault, 15b, do_efault, 16b, do_efault 327 .word 7b, __retl_efault, 8b, __retl_efault
332 .word 17b, do_efault, 18b, do_efault, 19b, do_efault, 20b, do_efault 328 .word 9b, __retl_efault, 10b, __retl_efault
333 .word 21b, do_efault, 22b, do_efault, 23b, do_efault, 24b, do_efault 329 .word 11b, __retl_efault, 12b, __retl_efault
334 .word 25b, do_efault, 26b, do_efault, 27b, do_efault, 28b, do_efault 330 .word 13b, __retl_efault, 14b, __retl_efault
335 .word 29b, do_efault, 30b, do_efault, 31b, do_efault, 32b, do_efault 331 .word 15b, __retl_efault, 16b, __retl_efault
336 .word 33b, do_efault, 34b, do_efault, 35b, do_efault, 36b, do_efault 332 .word 17b, __retl_efault, 18b, __retl_efault
337 .word 37b, do_efault, 38b, do_efault, 39b, do_efault, 40b, do_efault 333 .word 19b, __retl_efault, 20b, __retl_efault
338 .word 41b, do_efault, 42b, do_efault, 43b, do_efault, 44b, do_efault 334 .word 21b, __retl_efault, 22b, __retl_efault
339 .word 45b, do_efault, 46b, do_efault, 47b, do_efault, 48b, do_efault 335 .word 23b, __retl_efault, 24b, __retl_efault
340 .word 49b, do_efault, 50b, do_efault, 51b, do_efault, 52b, do_efault 336 .word 25b, __retl_efault, 26b, __retl_efault
341 .word 53b, do_efault, 54b, do_efault, 55b, do_efault, 56b, do_efault 337 .word 27b, __retl_efault, 28b, __retl_efault
342 .word 57b, do_efault, 58b, do_efault, 59b, do_efault, 60b, do_efault 338 .word 29b, __retl_efault, 30b, __retl_efault
343 .word 61b, do_efault, 62b, do_efault 339 .word 31b, __retl_efault, 32b, __retl_efault
340 .word 33b, __retl_efault, 34b, __retl_efault
341 .word 35b, __retl_efault, 36b, __retl_efault
342 .word 37b, __retl_efault, 38b, __retl_efault
343 .word 39b, __retl_efault, 40b, __retl_efault
344 .word 41b, __retl_efault, 42b, __retl_efault
345 .word 43b, __retl_efault, 44b, __retl_efault
346 .word 45b, __retl_efault, 46b, __retl_efault
347 .word 47b, __retl_efault, 48b, __retl_efault
348 .word 49b, __retl_efault, 50b, __retl_efault
349 .word 51b, __retl_efault, 52b, __retl_efault
350 .word 53b, __retl_efault, 54b, __retl_efault
351 .word 55b, __retl_efault, 56b, __retl_efault
352 .word 57b, __retl_efault, 58b, __retl_efault
353 .word 59b, __retl_efault, 60b, __retl_efault
354 .word 61b, __retl_efault, 62b, __retl_efault
344 .previous 355 .previous