aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/syscall.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 15:38:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 15:38:39 -0400
commitc3c9897c63ebb0b93b7f78724e38d6ee1da04041 (patch)
treef1ed40f2ac6108b23251dd4e41adeac403396fea /arch/x86/include/asm/syscall.h
parentd2441183dc222d12961ff2201f5086c846505d93 (diff)
parent3cfba0892585d4c8e7b4122b5dc0d206a76936de (diff)
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: fix section mismatch warning - apic_x2apic_phys x86: fix section mismatch warning - apic_x2apic_cluster x86: fix section mismatch warning - apic_x2apic_uv_x x86: fix section mismatch warning - apic_physflat x86: fix section mismatch warning - apic_flat x86: memtest fix use of reserve_early() x86 syscall.h: fix argument order x86/tlb_uv: remove strange mc146818rtc include x86: remove redundant KERN_DEBUG on pr_debug x86: do_boot_cpu - check if we have ESR register x86: MAINTAINERS change for AMD microcode patch loader x86/proc: fix /proc/cpuinfo cpu offline bug x86: call dmi-quirks for HP Laptops after early-quirks are executed x86, kexec: fix hang on i386 when panic occurs while console_sem is held MCE: Don't run 32bit machine checks with interrupts on x86: SB600: skip IRQ0 override if it is not routed to INT2 of IOAPIC x86: make variables static
Diffstat (limited to 'arch/x86/include/asm/syscall.h')
-rw-r--r--arch/x86/include/asm/syscall.h106
1 files changed, 54 insertions, 52 deletions
diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h
index 1d88f6957d39..d82f39bb7905 100644
--- a/arch/x86/include/asm/syscall.h
+++ b/arch/x86/include/asm/syscall.h
@@ -93,26 +93,26 @@ static inline void syscall_get_arguments(struct task_struct *task,
93{ 93{
94# ifdef CONFIG_IA32_EMULATION 94# ifdef CONFIG_IA32_EMULATION
95 if (task_thread_info(task)->status & TS_COMPAT) 95 if (task_thread_info(task)->status & TS_COMPAT)
96 switch (i + n) { 96 switch (i) {
97 case 6: 97 case 0:
98 if (!n--) break; 98 if (!n--) break;
99 *args++ = regs->bp; 99 *args++ = regs->bx;
100 case 5: 100 case 1:
101 if (!n--) break; 101 if (!n--) break;
102 *args++ = regs->di; 102 *args++ = regs->cx;
103 case 4: 103 case 2:
104 if (!n--) break; 104 if (!n--) break;
105 *args++ = regs->si; 105 *args++ = regs->dx;
106 case 3: 106 case 3:
107 if (!n--) break; 107 if (!n--) break;
108 *args++ = regs->dx; 108 *args++ = regs->si;
109 case 2: 109 case 4:
110 if (!n--) break; 110 if (!n--) break;
111 *args++ = regs->cx; 111 *args++ = regs->di;
112 case 1: 112 case 5:
113 if (!n--) break; 113 if (!n--) break;
114 *args++ = regs->bx; 114 *args++ = regs->bp;
115 case 0: 115 case 6:
116 if (!n--) break; 116 if (!n--) break;
117 default: 117 default:
118 BUG(); 118 BUG();
@@ -120,26 +120,26 @@ static inline void syscall_get_arguments(struct task_struct *task,
120 } 120 }
121 else 121 else
122# endif 122# endif
123 switch (i + n) { 123 switch (i) {
124 case 6: 124 case 0:
125 if (!n--) break; 125 if (!n--) break;
126 *args++ = regs->r9; 126 *args++ = regs->di;
127 case 5: 127 case 1:
128 if (!n--) break; 128 if (!n--) break;
129 *args++ = regs->r8; 129 *args++ = regs->si;
130 case 4: 130 case 2:
131 if (!n--) break; 131 if (!n--) break;
132 *args++ = regs->r10; 132 *args++ = regs->dx;
133 case 3: 133 case 3:
134 if (!n--) break; 134 if (!n--) break;
135 *args++ = regs->dx; 135 *args++ = regs->r10;
136 case 2: 136 case 4:
137 if (!n--) break; 137 if (!n--) break;
138 *args++ = regs->si; 138 *args++ = regs->r8;
139 case 1: 139 case 5:
140 if (!n--) break; 140 if (!n--) break;
141 *args++ = regs->di; 141 *args++ = regs->r9;
142 case 0: 142 case 6:
143 if (!n--) break; 143 if (!n--) break;
144 default: 144 default:
145 BUG(); 145 BUG();
@@ -154,55 +154,57 @@ static inline void syscall_set_arguments(struct task_struct *task,
154{ 154{
155# ifdef CONFIG_IA32_EMULATION 155# ifdef CONFIG_IA32_EMULATION
156 if (task_thread_info(task)->status & TS_COMPAT) 156 if (task_thread_info(task)->status & TS_COMPAT)
157 switch (i + n) { 157 switch (i) {
158 case 6: 158 case 0:
159 if (!n--) break; 159 if (!n--) break;
160 regs->bp = *args++; 160 regs->bx = *args++;
161 case 5: 161 case 1:
162 if (!n--) break; 162 if (!n--) break;
163 regs->di = *args++; 163 regs->cx = *args++;
164 case 4: 164 case 2:
165 if (!n--) break; 165 if (!n--) break;
166 regs->si = *args++; 166 regs->dx = *args++;
167 case 3: 167 case 3:
168 if (!n--) break; 168 if (!n--) break;
169 regs->dx = *args++; 169 regs->si = *args++;
170 case 2: 170 case 4:
171 if (!n--) break; 171 if (!n--) break;
172 regs->cx = *args++; 172 regs->di = *args++;
173 case 1: 173 case 5:
174 if (!n--) break; 174 if (!n--) break;
175 regs->bx = *args++; 175 regs->bp = *args++;
176 case 0: 176 case 6:
177 if (!n--) break; 177 if (!n--) break;
178 default: 178 default:
179 BUG(); 179 BUG();
180 break;
180 } 181 }
181 else 182 else
182# endif 183# endif
183 switch (i + n) { 184 switch (i) {
184 case 6: 185 case 0:
185 if (!n--) break; 186 if (!n--) break;
186 regs->r9 = *args++; 187 regs->di = *args++;
187 case 5: 188 case 1:
188 if (!n--) break; 189 if (!n--) break;
189 regs->r8 = *args++; 190 regs->si = *args++;
190 case 4: 191 case 2:
191 if (!n--) break; 192 if (!n--) break;
192 regs->r10 = *args++; 193 regs->dx = *args++;
193 case 3: 194 case 3:
194 if (!n--) break; 195 if (!n--) break;
195 regs->dx = *args++; 196 regs->r10 = *args++;
196 case 2: 197 case 4:
197 if (!n--) break; 198 if (!n--) break;
198 regs->si = *args++; 199 regs->r8 = *args++;
199 case 1: 200 case 5:
200 if (!n--) break; 201 if (!n--) break;
201 regs->di = *args++; 202 regs->r9 = *args++;
202 case 0: 203 case 6:
203 if (!n--) break; 204 if (!n--) break;
204 default: 205 default:
205 BUG(); 206 BUG();
207 break;
206 } 208 }
207} 209}
208 210