diff options
Diffstat (limited to 'arch/parisc/hpux/wrappers.S')
-rw-r--r-- | arch/parisc/hpux/wrappers.S | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/arch/parisc/hpux/wrappers.S b/arch/parisc/hpux/wrappers.S index 0b0c3a66b1be..58c53c879c02 100644 --- a/arch/parisc/hpux/wrappers.S +++ b/arch/parisc/hpux/wrappers.S | |||
@@ -20,19 +20,16 @@ | |||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifdef __LP64__ | 23 | #ifdef CONFIG_64BIT |
24 | #warning PA64 support needs more work...did first cut | 24 | #warning PA64 support needs more work...did first cut |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include <asm/asm-offsets.h> | 27 | #include <asm/asm-offsets.h> |
28 | #include <asm/assembly.h> | 28 | #include <asm/assembly.h> |
29 | #include <asm/signal.h> | 29 | #include <asm/signal.h> |
30 | #include <linux/linkage.h> | ||
30 | 31 | ||
31 | #ifdef __LP64__ | 32 | .level LEVEL |
32 | .level 2.0w | ||
33 | #else | ||
34 | .level 1.1 | ||
35 | #endif | ||
36 | .text | 33 | .text |
37 | 34 | ||
38 | /* These should probably go in a header file somewhere. | 35 | /* These should probably go in a header file somewhere. |
@@ -41,7 +38,7 @@ | |||
41 | * register save/restore macros. | 38 | * register save/restore macros. |
42 | */ | 39 | */ |
43 | .macro reg_save regs | 40 | .macro reg_save regs |
44 | #ifdef __LP64__ | 41 | #ifdef CONFIG_64BIT |
45 | #warning NEEDS WORK for 64-bit | 42 | #warning NEEDS WORK for 64-bit |
46 | #endif | 43 | #endif |
47 | STREG %r3, PT_GR3(\regs) | 44 | STREG %r3, PT_GR3(\regs) |
@@ -82,11 +79,9 @@ | |||
82 | .endm | 79 | .endm |
83 | 80 | ||
84 | 81 | ||
85 | .export hpux_fork_wrapper | ||
86 | .export hpux_child_return | ||
87 | .import sys_fork | 82 | .import sys_fork |
88 | 83 | ||
89 | hpux_fork_wrapper: | 84 | ENTRY(hpux_fork_wrapper) |
90 | ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs | 85 | ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs |
91 | ;! pointer in task | 86 | ;! pointer in task |
92 | reg_save %r1 | 87 | reg_save %r1 |
@@ -128,27 +123,26 @@ fork_return: | |||
128 | fork_exit: | 123 | fork_exit: |
129 | bv %r0(%r2) | 124 | bv %r0(%r2) |
130 | nop | 125 | nop |
126 | ENDPROC(hpux_fork_wrapper) | ||
131 | 127 | ||
132 | /* Set the return value for the child */ | 128 | /* Set the return value for the child */ |
133 | 129 | ||
134 | hpux_child_return: | 130 | ENTRY(hpux_child_return) |
135 | #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) | 131 | #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) |
136 | bl schedule_tail, %r2 | 132 | bl,n schedule_tail, %r2 |
137 | nop | ||
138 | #endif | 133 | #endif |
139 | 134 | ||
140 | LDREG TASK_PT_GR19-TASK_SZ_ALGN-128(%r30),%r2 | 135 | LDREG TASK_PT_GR19-TASK_SZ_ALGN-128(%r30),%r2 |
141 | b fork_return | 136 | b fork_return |
142 | copy %r0,%r28 | 137 | copy %r0,%r28 |
138 | ENDPROC(hpux_child_return) | ||
143 | 139 | ||
144 | .export hpux_execve_wrapper | ||
145 | .export hpux_execv_wrapper | ||
146 | .import hpux_execve | 140 | .import hpux_execve |
147 | 141 | ||
148 | hpux_execv_wrapper: | 142 | ENTRY(hpux_execv_wrapper) |
149 | copy %r0,%r24 /* NULL environment */ | 143 | copy %r0,%r24 /* NULL environment */ |
150 | 144 | ||
151 | hpux_execve_wrapper: | 145 | ENTRY(hpux_execve_wrapper) |
152 | 146 | ||
153 | ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs | 147 | ldo TASK_REGS-TASK_SZ_ALGN-64(%r30),%r1 ;! get pt regs |
154 | 148 | ||
@@ -187,13 +181,13 @@ hpux_execve_wrapper: | |||
187 | exec_error: | 181 | exec_error: |
188 | bv %r0(%r19) | 182 | bv %r0(%r19) |
189 | nop | 183 | nop |
184 | ENDPROC(hpux_execv_wrapper) | ||
190 | 185 | ||
191 | .export hpux_pipe_wrapper | ||
192 | .import hpux_pipe | 186 | .import hpux_pipe |
193 | 187 | ||
194 | /* HP-UX expects pipefd's returned in r28 & r29 */ | 188 | /* HP-UX expects pipefd's returned in r28 & r29 */ |
195 | 189 | ||
196 | hpux_pipe_wrapper: | 190 | ENTRY(hpux_pipe_wrapper) |
197 | STREG %r2,-20(%r30) | 191 | STREG %r2,-20(%r30) |
198 | ldo 64(%r30),%r30 | 192 | ldo 64(%r30),%r30 |
199 | bl hpux_pipe,%r2 | 193 | bl hpux_pipe,%r2 |
@@ -212,12 +206,11 @@ hpux_pipe_wrapper: | |||
212 | pipe_exit: | 206 | pipe_exit: |
213 | bv %r0(%r2) | 207 | bv %r0(%r2) |
214 | ldo -64(%r30),%r30 | 208 | ldo -64(%r30),%r30 |
209 | ENDPROC(hpux_pipe_wrapper) | ||
215 | 210 | ||
216 | .export hpux_syscall_exit | ||
217 | .import syscall_exit | 211 | .import syscall_exit |
218 | 212 | ||
219 | hpux_syscall_exit: | 213 | ENTRY(hpux_syscall_exit) |
220 | |||
221 | /* | 214 | /* |
222 | * | 215 | * |
223 | * HP-UX call return conventions: | 216 | * HP-UX call return conventions: |
@@ -246,12 +239,12 @@ hpux_syscall_exit: | |||
246 | ldo 1(%r0),%r22 | 239 | ldo 1(%r0),%r22 |
247 | 240 | ||
248 | no_error: | 241 | no_error: |
249 | b syscall_exit | 242 | b,n syscall_exit |
250 | nop | 243 | ENDPROC(hpux_syscall_exit) |
251 | 244 | ||
252 | .export hpux_unimplemented_wrapper | ||
253 | .import hpux_unimplemented | 245 | .import hpux_unimplemented |
254 | 246 | ||
255 | hpux_unimplemented_wrapper: | 247 | ENTRY(hpux_unimplemented_wrapper) |
256 | b hpux_unimplemented | 248 | b hpux_unimplemented |
257 | STREG %r22,-64(%r30) /* overwrite arg8 with syscall number */ | 249 | STREG %r22,-64(%r30) /* overwrite arg8 with syscall number */ |
250 | ENDPROC(hpux_unimplemented_wrapper) | ||