diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-09-28 23:41:45 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-09-28 23:41:45 -0400 |
commit | 5fd29752f09cabff582f65c0ce35518db4c64937 (patch) | |
tree | b46e5c2c596d26125a7c2aac619fe1b52431f978 /arch/sparc64/kernel/una_asm.S | |
parent | 8cf14af0a740fb7e9f94a203b5a989beb875d58f (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/una_asm.S')
-rw-r--r-- | arch/sparc64/kernel/una_asm.S | 65 |
1 files changed, 29 insertions, 36 deletions
diff --git a/arch/sparc64/kernel/una_asm.S b/arch/sparc64/kernel/una_asm.S index da48400bcc95..1f5b5b708ce7 100644 --- a/arch/sparc64/kernel/una_asm.S +++ b/arch/sparc64/kernel/una_asm.S | |||
@@ -6,13 +6,6 @@ | |||
6 | 6 | ||
7 | .text | 7 | .text |
8 | 8 | ||
9 | kernel_unaligned_trap_fault: | ||
10 | call kernel_mna_trap_fault | ||
11 | nop | ||
12 | retl | ||
13 | nop | ||
14 | .size kern_unaligned_trap_fault, .-kern_unaligned_trap_fault | ||
15 | |||
16 | .globl __do_int_store | 9 | .globl __do_int_store |
17 | __do_int_store: | 10 | __do_int_store: |
18 | rd %asi, %o4 | 11 | rd %asi, %o4 |
@@ -51,24 +44,24 @@ __do_int_store: | |||
51 | 0: | 44 | 0: |
52 | wr %o4, 0x0, %asi | 45 | wr %o4, 0x0, %asi |
53 | retl | 46 | retl |
54 | nop | 47 | mov 0, %o0 |
55 | .size __do_int_store, .-__do_int_store | 48 | .size __do_int_store, .-__do_int_store |
56 | 49 | ||
57 | .section __ex_table | 50 | .section __ex_table |
58 | .word 4b, kernel_unaligned_trap_fault | 51 | .word 4b, __retl_efault |
59 | .word 5b, kernel_unaligned_trap_fault | 52 | .word 5b, __retl_efault |
60 | .word 6b, kernel_unaligned_trap_fault | 53 | .word 6b, __retl_efault |
61 | .word 7b, kernel_unaligned_trap_fault | 54 | .word 7b, __retl_efault |
62 | .word 8b, kernel_unaligned_trap_fault | 55 | .word 8b, __retl_efault |
63 | .word 9b, kernel_unaligned_trap_fault | 56 | .word 9b, __retl_efault |
64 | .word 10b, kernel_unaligned_trap_fault | 57 | .word 10b, __retl_efault |
65 | .word 11b, kernel_unaligned_trap_fault | 58 | .word 11b, __retl_efault |
66 | .word 12b, kernel_unaligned_trap_fault | 59 | .word 12b, __retl_efault |
67 | .word 13b, kernel_unaligned_trap_fault | 60 | .word 13b, __retl_efault |
68 | .word 14b, kernel_unaligned_trap_fault | 61 | .word 14b, __retl_efault |
69 | .word 15b, kernel_unaligned_trap_fault | 62 | .word 15b, __retl_efault |
70 | .word 16b, kernel_unaligned_trap_fault | 63 | .word 16b, __retl_efault |
71 | .word 17b, kernel_unaligned_trap_fault | 64 | .word 17b, __retl_efault |
72 | .previous | 65 | .previous |
73 | 66 | ||
74 | .globl do_int_load | 67 | .globl do_int_load |
@@ -133,21 +126,21 @@ do_int_load: | |||
133 | 0: | 126 | 0: |
134 | wr %o5, 0x0, %asi | 127 | wr %o5, 0x0, %asi |
135 | retl | 128 | retl |
136 | nop | 129 | mov 0, %o0 |
137 | .size __do_int_load, .-__do_int_load | 130 | .size __do_int_load, .-__do_int_load |
138 | 131 | ||
139 | .section __ex_table | 132 | .section __ex_table |
140 | .word 4b, kernel_unaligned_trap_fault | 133 | .word 4b, __retl_efault |
141 | .word 5b, kernel_unaligned_trap_fault | 134 | .word 5b, __retl_efault |
142 | .word 6b, kernel_unaligned_trap_fault | 135 | .word 6b, __retl_efault |
143 | .word 7b, kernel_unaligned_trap_fault | 136 | .word 7b, __retl_efault |
144 | .word 8b, kernel_unaligned_trap_fault | 137 | .word 8b, __retl_efault |
145 | .word 9b, kernel_unaligned_trap_fault | 138 | .word 9b, __retl_efault |
146 | .word 10b, kernel_unaligned_trap_fault | 139 | .word 10b, __retl_efault |
147 | .word 11b, kernel_unaligned_trap_fault | 140 | .word 11b, __retl_efault |
148 | .word 12b, kernel_unaligned_trap_fault | 141 | .word 12b, __retl_efault |
149 | .word 13b, kernel_unaligned_trap_fault | 142 | .word 13b, __retl_efault |
150 | .word 14b, kernel_unaligned_trap_fault | 143 | .word 14b, __retl_efault |
151 | .word 15b, kernel_unaligned_trap_fault | 144 | .word 15b, __retl_efault |
152 | .word 16b, kernel_unaligned_trap_fault | 145 | .word 16b, __retl_efault |
153 | .previous | 146 | .previous |