aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/include/asm/syscall.h
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2010-02-26 15:04:13 -0500
committerTony Luck <tony.luck@intel.com>2010-02-26 15:04:13 -0500
commit8d6339b8a532ec4eeb31db321cf1e6068965deda (patch)
tree0fa1d7aa14d3dcc6f6ac5236ba14649fd9a0d5e6 /arch/ia64/include/asm/syscall.h
parent60b341b778cc2929df16c0a504c91621b3c6a4ad (diff)
parent32974ad4907cdde6c9de612cd1b2ee0568fb9409 (diff)
Pull rmia32 into release branch
Diffstat (limited to 'arch/ia64/include/asm/syscall.h')
-rw-r--r--arch/ia64/include/asm/syscall.h81
1 files changed, 0 insertions, 81 deletions
diff --git a/arch/ia64/include/asm/syscall.h b/arch/ia64/include/asm/syscall.h
index 2f758a42f94b..a7ff1c6ab068 100644
--- a/arch/ia64/include/asm/syscall.h
+++ b/arch/ia64/include/asm/syscall.h
@@ -22,33 +22,18 @@ static inline long syscall_get_nr(struct task_struct *task,
22 if ((long)regs->cr_ifs < 0) /* Not a syscall */ 22 if ((long)regs->cr_ifs < 0) /* Not a syscall */
23 return -1; 23 return -1;
24 24
25#ifdef CONFIG_IA32_SUPPORT
26 if (IS_IA32_PROCESS(regs))
27 return regs->r1;
28#endif
29
30 return regs->r15; 25 return regs->r15;
31} 26}
32 27
33static inline void syscall_rollback(struct task_struct *task, 28static inline void syscall_rollback(struct task_struct *task,
34 struct pt_regs *regs) 29 struct pt_regs *regs)
35{ 30{
36#ifdef CONFIG_IA32_SUPPORT
37 if (IS_IA32_PROCESS(regs))
38 regs->r8 = regs->r1;
39#endif
40
41 /* do nothing */ 31 /* do nothing */
42} 32}
43 33
44static inline long syscall_get_error(struct task_struct *task, 34static inline long syscall_get_error(struct task_struct *task,
45 struct pt_regs *regs) 35 struct pt_regs *regs)
46{ 36{
47#ifdef CONFIG_IA32_SUPPORT
48 if (IS_IA32_PROCESS(regs))
49 return regs->r8;
50#endif
51
52 return regs->r10 == -1 ? regs->r8:0; 37 return regs->r10 == -1 ? regs->r8:0;
53} 38}
54 39
@@ -62,13 +47,6 @@ static inline void syscall_set_return_value(struct task_struct *task,
62 struct pt_regs *regs, 47 struct pt_regs *regs,
63 int error, long val) 48 int error, long val)
64{ 49{
65#ifdef CONFIG_IA32_SUPPORT
66 if (IS_IA32_PROCESS(regs)) {
67 regs->r8 = (long) error ? error : val;
68 return;
69 }
70#endif
71
72 if (error) { 50 if (error) {
73 /* error < 0, but ia64 uses > 0 return value */ 51 /* error < 0, but ia64 uses > 0 return value */
74 regs->r8 = -error; 52 regs->r8 = -error;
@@ -89,37 +67,6 @@ static inline void syscall_get_arguments(struct task_struct *task,
89{ 67{
90 BUG_ON(i + n > 6); 68 BUG_ON(i + n > 6);
91 69
92#ifdef CONFIG_IA32_SUPPORT
93 if (IS_IA32_PROCESS(regs)) {
94 switch (i + n) {
95 case 6:
96 if (!n--) break;
97 *args++ = regs->r13;
98 case 5:
99 if (!n--) break;
100 *args++ = regs->r15;
101 case 4:
102 if (!n--) break;
103 *args++ = regs->r14;
104 case 3:
105 if (!n--) break;
106 *args++ = regs->r10;
107 case 2:
108 if (!n--) break;
109 *args++ = regs->r9;
110 case 1:
111 if (!n--) break;
112 *args++ = regs->r11;
113 case 0:
114 if (!n--) break;
115 default:
116 BUG();
117 break;
118 }
119
120 return;
121 }
122#endif
123 ia64_syscall_get_set_arguments(task, regs, i, n, args, 0); 70 ia64_syscall_get_set_arguments(task, regs, i, n, args, 0);
124} 71}
125 72
@@ -130,34 +77,6 @@ static inline void syscall_set_arguments(struct task_struct *task,
130{ 77{
131 BUG_ON(i + n > 6); 78 BUG_ON(i + n > 6);
132 79
133#ifdef CONFIG_IA32_SUPPORT
134 if (IS_IA32_PROCESS(regs)) {
135 switch (i + n) {
136 case 6:
137 if (!n--) break;
138 regs->r13 = *args++;
139 case 5:
140 if (!n--) break;
141 regs->r15 = *args++;
142 case 4:
143 if (!n--) break;
144 regs->r14 = *args++;
145 case 3:
146 if (!n--) break;
147 regs->r10 = *args++;
148 case 2:
149 if (!n--) break;
150 regs->r9 = *args++;
151 case 1:
152 if (!n--) break;
153 regs->r11 = *args++;
154 case 0:
155 if (!n--) break;
156 }
157
158 return;
159 }
160#endif
161 ia64_syscall_get_set_arguments(task, regs, i, n, args, 1); 80 ia64_syscall_get_set_arguments(task, regs, i, n, args, 1);
162} 81}
163#endif /* _ASM_SYSCALL_H */ 82#endif /* _ASM_SYSCALL_H */