aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/parisc/hpux/entry_hpux.S10
-rw-r--r--arch/parisc/hpux/gate.S23
-rw-r--r--arch/parisc/hpux/sys_hpux.c2
-rw-r--r--arch/parisc/hpux/wrappers.S45
4 files changed, 32 insertions, 48 deletions
diff --git a/arch/parisc/hpux/entry_hpux.S b/arch/parisc/hpux/entry_hpux.S
index 31c8cccfba31..d15a413572f0 100644
--- a/arch/parisc/hpux/entry_hpux.S
+++ b/arch/parisc/hpux/entry_hpux.S
@@ -18,17 +18,16 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <asm/unistd.h>
22#include <asm/assembly.h>
21#include <linux/sys.h> 23#include <linux/sys.h>
22#include <linux/linkage.h> 24#include <linux/linkage.h>
23#include <asm/unistd.h>
24 25
25#define ENTRY_NAME(_name_) .word _name_ 26#define ENTRY_NAME(_name_) ASM_ULONG_INSN _name_
26 27
27 .section .rodata,"a" 28 .section .rodata,"a"
28 .align 4
29 .export hpux_call_table
30 .import hpux_unimplemented_wrapper 29 .import hpux_unimplemented_wrapper
31hpux_call_table: 30ENTRY(hpux_call_table)
32 ENTRY_NAME(sys_ni_syscall) /* 0 */ 31 ENTRY_NAME(sys_ni_syscall) /* 0 */
33 ENTRY_NAME(sys_exit) 32 ENTRY_NAME(sys_exit)
34 ENTRY_NAME(hpux_fork_wrapper) 33 ENTRY_NAME(hpux_fork_wrapper)
@@ -542,5 +541,6 @@ hpux_call_table:
542 ENTRY_NAME(hpux_unimplemented_wrapper) /* 510 */ 541 ENTRY_NAME(hpux_unimplemented_wrapper) /* 510 */
543 ENTRY_NAME(hpux_unimplemented_wrapper) 542 ENTRY_NAME(hpux_unimplemented_wrapper)
544 ENTRY_NAME(hpux_unimplemented_wrapper) 543 ENTRY_NAME(hpux_unimplemented_wrapper)
544END(hpux_call_table)
545.end 545.end
546 546
diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S
index aaaf3306c05a..0b9d5b1e4b37 100644
--- a/arch/parisc/hpux/gate.S
+++ b/arch/parisc/hpux/gate.S
@@ -12,27 +12,18 @@
12#include <asm/asm-offsets.h> 12#include <asm/asm-offsets.h>
13#include <asm/unistd.h> 13#include <asm/unistd.h>
14#include <asm/errno.h> 14#include <asm/errno.h>
15#include <linux/linkage.h>
15 16
16#ifdef __LP64__ 17 .level LEVEL
17 .level 2.0w
18#else
19 .level 1.1
20#endif
21 .text 18 .text
22 19
23#ifdef __LP64__
24#define FRAME_SIZE 128
25#else
26#define FRAME_SIZE 64
27#endif
28 .import hpux_call_table 20 .import hpux_call_table
29 .import hpux_syscall_exit,code 21 .import hpux_syscall_exit,code
30 .export hpux_gateway_page
31 22
32 .align 4096 23 .align 4096
33hpux_gateway_page: 24ENTRY(hpux_gateway_page)
34 nop 25 nop
35#ifdef __LP64__ 26#ifdef CONFIG_64BIT
36#warning NEEDS WORK for 64-bit 27#warning NEEDS WORK for 64-bit
37#endif 28#endif
38 ldw -64(%r30), %r29 ;! 8th argument 29 ldw -64(%r30), %r29 ;! 8th argument
@@ -101,7 +92,7 @@ hpux_gateway_page:
101 ldo R%hpux_call_table(%r21), %r21 92 ldo R%hpux_call_table(%r21), %r21
102 comiclr,>>= __NR_HPUX_syscalls, %r22, %r0 93 comiclr,>>= __NR_HPUX_syscalls, %r22, %r0
103 b,n syscall_nosys 94 b,n syscall_nosys
104 ldwx,s %r22(%r21), %r21 95 LDREGX %r22(%r21), %r21
105 ldil L%hpux_syscall_exit,%r2 96 ldil L%hpux_syscall_exit,%r2
106 be 0(%sr7,%r21) 97 be 0(%sr7,%r21)
107 ldo R%hpux_syscall_exit(%r2),%r2 98 ldo R%hpux_syscall_exit(%r2),%r2
@@ -110,7 +101,7 @@ syscall_nosys:
110 ldil L%hpux_syscall_exit,%r1 101 ldil L%hpux_syscall_exit,%r1
111 be R%hpux_syscall_exit(%sr7,%r1) 102 be R%hpux_syscall_exit(%sr7,%r1)
112 ldo -ENOSYS(%r0),%r28 103 ldo -ENOSYS(%r0),%r28
104ENDPROC(hpux_gateway_page)
113 105
114 .align 4096 106 .align 4096
115 .export end_hpux_gateway_page 107ENTRY(end_hpux_gateway_page)
116end_hpux_gateway_page:
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c
index c57fcb4b2173..3e025df2dc86 100644
--- a/arch/parisc/hpux/sys_hpux.c
+++ b/arch/parisc/hpux/sys_hpux.c
@@ -511,7 +511,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
511 511
512 512
513/* Table of syscall names and handle for unimplemented routines */ 513/* Table of syscall names and handle for unimplemented routines */
514static const char *syscall_names[] = { 514static const char * const syscall_names[] = {
515 "nosys", /* 0 */ 515 "nosys", /* 0 */
516 "exit", 516 "exit",
517 "fork", 517 "fork",
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
89hpux_fork_wrapper: 84ENTRY(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:
128fork_exit: 123fork_exit:
129 bv %r0(%r2) 124 bv %r0(%r2)
130 nop 125 nop
126ENDPROC(hpux_fork_wrapper)
131 127
132 /* Set the return value for the child */ 128 /* Set the return value for the child */
133 129
134hpux_child_return: 130ENTRY(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
138ENDPROC(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
148hpux_execv_wrapper: 142ENTRY(hpux_execv_wrapper)
149 copy %r0,%r24 /* NULL environment */ 143 copy %r0,%r24 /* NULL environment */
150 144
151hpux_execve_wrapper: 145ENTRY(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:
187exec_error: 181exec_error:
188 bv %r0(%r19) 182 bv %r0(%r19)
189 nop 183 nop
184ENDPROC(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
196hpux_pipe_wrapper: 190ENTRY(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:
212pipe_exit: 206pipe_exit:
213 bv %r0(%r2) 207 bv %r0(%r2)
214 ldo -64(%r30),%r30 208 ldo -64(%r30),%r30
209ENDPROC(hpux_pipe_wrapper)
215 210
216 .export hpux_syscall_exit
217 .import syscall_exit 211 .import syscall_exit
218 212
219hpux_syscall_exit: 213ENTRY(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
248no_error: 241no_error:
249 b syscall_exit 242 b,n syscall_exit
250 nop 243ENDPROC(hpux_syscall_exit)
251 244
252 .export hpux_unimplemented_wrapper
253 .import hpux_unimplemented 245 .import hpux_unimplemented
254 246
255hpux_unimplemented_wrapper: 247ENTRY(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 */
250ENDPROC(hpux_unimplemented_wrapper)