aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/unaligned.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 15:48:06 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-26 15:48:06 -0500
commitb0138a6cb7923a997d278b47c176778534d1095b (patch)
tree4fcb8822a69631baba568e4e1942847747123887 /arch/parisc/kernel/unaligned.c
parent6572d6d7d0f965dda19d02af804ed3ae4b3bf1fc (diff)
parent1055a8af093fea7490445bd15cd671020e542035 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits) [PARISC] Use symbolic last syscall in __NR_Linux_syscalls [PARISC] Add missing statfs64 and fstatfs64 syscalls Revert "[PARISC] Optimize TLB flush on SMP systems" [PARISC] Compat signal fixes for 64-bit parisc [PARISC] Reorder syscalls to match unistd.h Revert "[PATCH] make kernel/signal.c:kill_proc_info() static" [PARISC] fix sys_rt_sigqueueinfo [PARISC] fix section mismatch warnings in harmony sound driver [PARISC] do not export get_register/set_register [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code [PARISC] convert to use CONFIG_64BIT instead of __LP64__ [PARISC] use CONFIG_64BIT instead of __LP64__ [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro [PARISC] more ENTRY(), ENDPROC(), END() conversions [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc [PARISC] Fixes /proc/cpuinfo cache output on B160L [PARISC] implement standard ENTRY(), END() and ENDPROC() [PARISC] kill ENTRY_SYS_CPUS [PARISC] clean up debugging printks in smp.c [PARISC] factor syscall_restart code out of do_signal ... Fix conflict in include/linux/sched.h due to kill_proc_info() being made publicly available to PARISC again.
Diffstat (limited to 'arch/parisc/kernel/unaligned.c')
-rw-r--r--arch/parisc/kernel/unaligned.c115
1 files changed, 28 insertions, 87 deletions
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c
index bd2230d6a2a6..347bb922e6d0 100644
--- a/arch/parisc/kernel/unaligned.c
+++ b/arch/parisc/kernel/unaligned.c
@@ -20,8 +20,11 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/jiffies.h>
23#include <linux/kernel.h> 24#include <linux/kernel.h>
24#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/sched.h>
27#include <linux/signal.h>
25#include <asm/uaccess.h> 28#include <asm/uaccess.h>
26 29
27/* #define DEBUG_UNALIGNED 1 */ 30/* #define DEBUG_UNALIGNED 1 */
@@ -32,7 +35,7 @@
32#define DPRINTF(fmt, args...) 35#define DPRINTF(fmt, args...)
33#endif 36#endif
34 37
35#ifdef __LP64__ 38#ifdef CONFIG_64BIT
36#define RFMT "%016lx" 39#define RFMT "%016lx"
37#else 40#else
38#define RFMT "%08lx" 41#define RFMT "%08lx"
@@ -147,15 +150,8 @@ static int emulate_ldh(struct pt_regs *regs, int toreg)
147"4: ldi -2, %1\n" 150"4: ldi -2, %1\n"
148 FIXUP_BRANCH(3b) 151 FIXUP_BRANCH(3b)
149" .previous\n" 152" .previous\n"
150" .section __ex_table,\"aw\"\n" 153 ASM_EXCEPTIONTABLE_ENTRY(1b, 4b)
151#ifdef __LP64__ 154 ASM_EXCEPTIONTABLE_ENTRY(2b, 4b)
152" .dword 1b,4b\n"
153" .dword 2b,4b\n"
154#else
155" .word 1b,4b\n"
156" .word 2b,4b\n"
157#endif
158" .previous\n"
159 : "=r" (val), "=r" (ret) 155 : "=r" (val), "=r" (ret)
160 : "0" (val), "r" (saddr), "r" (regs->isr) 156 : "0" (val), "r" (saddr), "r" (regs->isr)
161 : "r20", FIXUP_BRANCH_CLOBBER ); 157 : "r20", FIXUP_BRANCH_CLOBBER );
@@ -192,15 +188,8 @@ static int emulate_ldw(struct pt_regs *regs, int toreg, int flop)
192"4: ldi -2, %1\n" 188"4: ldi -2, %1\n"
193 FIXUP_BRANCH(3b) 189 FIXUP_BRANCH(3b)
194" .previous\n" 190" .previous\n"
195" .section __ex_table,\"aw\"\n" 191 ASM_EXCEPTIONTABLE_ENTRY(1b, 4b)
196#ifdef __LP64__ 192 ASM_EXCEPTIONTABLE_ENTRY(2b, 4b)
197" .dword 1b,4b\n"
198" .dword 2b,4b\n"
199#else
200" .word 1b,4b\n"
201" .word 2b,4b\n"
202#endif
203" .previous\n"
204 : "=r" (val), "=r" (ret) 193 : "=r" (val), "=r" (ret)
205 : "0" (val), "r" (saddr), "r" (regs->isr) 194 : "0" (val), "r" (saddr), "r" (regs->isr)
206 : "r19", "r20", FIXUP_BRANCH_CLOBBER ); 195 : "r19", "r20", FIXUP_BRANCH_CLOBBER );
@@ -224,7 +213,7 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
224 regs->isr, regs->ior, toreg); 213 regs->isr, regs->ior, toreg);
225#ifdef CONFIG_PA20 214#ifdef CONFIG_PA20
226 215
227#ifndef __LP64__ 216#ifndef CONFIG_64BIT
228 if (!flop) 217 if (!flop)
229 return -1; 218 return -1;
230#endif 219#endif
@@ -243,15 +232,8 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
243"4: ldi -2, %1\n" 232"4: ldi -2, %1\n"
244 FIXUP_BRANCH(3b) 233 FIXUP_BRANCH(3b)
245" .previous\n" 234" .previous\n"
246" .section __ex_table,\"aw\"\n" 235 ASM_EXCEPTIONTABLE_ENTRY(1b,4b)
247#ifdef __LP64__ 236 ASM_EXCEPTIONTABLE_ENTRY(2b,4b)
248" .dword 1b,4b\n"
249" .dword 2b,4b\n"
250#else
251" .word 1b,4b\n"
252" .word 2b,4b\n"
253#endif
254" .previous\n"
255 : "=r" (val), "=r" (ret) 237 : "=r" (val), "=r" (ret)
256 : "0" (val), "r" (saddr), "r" (regs->isr) 238 : "0" (val), "r" (saddr), "r" (regs->isr)
257 : "r19", "r20", FIXUP_BRANCH_CLOBBER ); 239 : "r19", "r20", FIXUP_BRANCH_CLOBBER );
@@ -275,17 +257,9 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
275"5: ldi -2, %2\n" 257"5: ldi -2, %2\n"
276 FIXUP_BRANCH(4b) 258 FIXUP_BRANCH(4b)
277" .previous\n" 259" .previous\n"
278" .section __ex_table,\"aw\"\n" 260 ASM_EXCEPTIONTABLE_ENTRY(1b,5b)
279#ifdef __LP64__ 261 ASM_EXCEPTIONTABLE_ENTRY(2b,5b)
280" .dword 1b,5b\n" 262 ASM_EXCEPTIONTABLE_ENTRY(3b,5b)
281" .dword 2b,5b\n"
282" .dword 3b,5b\n"
283#else
284" .word 1b,5b\n"
285" .word 2b,5b\n"
286" .word 3b,5b\n"
287#endif
288" .previous\n"
289 : "=r" (valh), "=r" (vall), "=r" (ret) 263 : "=r" (valh), "=r" (vall), "=r" (ret)
290 : "0" (valh), "1" (vall), "r" (saddr), "r" (regs->isr) 264 : "0" (valh), "1" (vall), "r" (saddr), "r" (regs->isr)
291 : "r19", "r20", FIXUP_BRANCH_CLOBBER ); 265 : "r19", "r20", FIXUP_BRANCH_CLOBBER );
@@ -325,15 +299,8 @@ static int emulate_sth(struct pt_regs *regs, int frreg)
325"4: ldi -2, %0\n" 299"4: ldi -2, %0\n"
326 FIXUP_BRANCH(3b) 300 FIXUP_BRANCH(3b)
327" .previous\n" 301" .previous\n"
328" .section __ex_table,\"aw\"\n" 302 ASM_EXCEPTIONTABLE_ENTRY(1b,4b)
329#ifdef __LP64__ 303 ASM_EXCEPTIONTABLE_ENTRY(2b,4b)
330" .dword 1b,4b\n"
331" .dword 2b,4b\n"
332#else
333" .word 1b,4b\n"
334" .word 2b,4b\n"
335#endif
336" .previous\n"
337 : "=r" (ret) 304 : "=r" (ret)
338 : "r" (val), "r" (regs->ior), "r" (regs->isr) 305 : "r" (val), "r" (regs->ior), "r" (regs->isr)
339 : "r19", FIXUP_BRANCH_CLOBBER ); 306 : "r19", FIXUP_BRANCH_CLOBBER );
@@ -379,15 +346,8 @@ static int emulate_stw(struct pt_regs *regs, int frreg, int flop)
379"4: ldi -2, %0\n" 346"4: ldi -2, %0\n"
380 FIXUP_BRANCH(3b) 347 FIXUP_BRANCH(3b)
381" .previous\n" 348" .previous\n"
382" .section __ex_table,\"aw\"\n" 349 ASM_EXCEPTIONTABLE_ENTRY(1b,4b)
383#ifdef __LP64__ 350 ASM_EXCEPTIONTABLE_ENTRY(2b,4b)
384" .dword 1b,4b\n"
385" .dword 2b,4b\n"
386#else
387" .word 1b,4b\n"
388" .word 2b,4b\n"
389#endif
390" .previous\n"
391 : "=r" (ret) 351 : "=r" (ret)
392 : "r" (val), "r" (regs->ior), "r" (regs->isr) 352 : "r" (val), "r" (regs->ior), "r" (regs->isr)
393 : "r19", "r20", "r21", "r22", "r1", FIXUP_BRANCH_CLOBBER ); 353 : "r19", "r20", "r21", "r22", "r1", FIXUP_BRANCH_CLOBBER );
@@ -410,7 +370,7 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
410 val, regs->isr, regs->ior); 370 val, regs->isr, regs->ior);
411 371
412#ifdef CONFIG_PA20 372#ifdef CONFIG_PA20
413#ifndef __LP64__ 373#ifndef CONFIG_64BIT
414 if (!flop) 374 if (!flop)
415 return -1; 375 return -1;
416#endif 376#endif
@@ -436,19 +396,10 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
436"6: ldi -2, %0\n" 396"6: ldi -2, %0\n"
437 FIXUP_BRANCH(5b) 397 FIXUP_BRANCH(5b)
438" .previous\n" 398" .previous\n"
439" .section __ex_table,\"aw\"\n" 399 ASM_EXCEPTIONTABLE_ENTRY(1b,6b)
440#ifdef __LP64__ 400 ASM_EXCEPTIONTABLE_ENTRY(2b,6b)
441" .dword 1b,6b\n" 401 ASM_EXCEPTIONTABLE_ENTRY(3b,6b)
442" .dword 2b,6b\n" 402 ASM_EXCEPTIONTABLE_ENTRY(4b,6b)
443" .dword 3b,6b\n"
444" .dword 4b,6b\n"
445#else
446" .word 1b,6b\n"
447" .word 2b,6b\n"
448" .word 3b,6b\n"
449" .word 4b,6b\n"
450#endif
451" .previous\n"
452 : "=r" (ret) 403 : "=r" (ret)
453 : "r" (val), "r" (regs->ior), "r" (regs->isr) 404 : "r" (val), "r" (regs->ior), "r" (regs->isr)
454 : "r19", "r20", "r21", "r22", "r1", FIXUP_BRANCH_CLOBBER ); 405 : "r19", "r20", "r21", "r22", "r1", FIXUP_BRANCH_CLOBBER );
@@ -479,21 +430,11 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
479"7: ldi -2, %0\n" 430"7: ldi -2, %0\n"
480 FIXUP_BRANCH(6b) 431 FIXUP_BRANCH(6b)
481" .previous\n" 432" .previous\n"
482" .section __ex_table,\"aw\"\n" 433 ASM_EXCEPTIONTABLE_ENTRY(1b,7b)
483#ifdef __LP64__ 434 ASM_EXCEPTIONTABLE_ENTRY(2b,7b)
484" .dword 1b,7b\n" 435 ASM_EXCEPTIONTABLE_ENTRY(3b,7b)
485" .dword 2b,7b\n" 436 ASM_EXCEPTIONTABLE_ENTRY(4b,7b)
486" .dword 3b,7b\n" 437 ASM_EXCEPTIONTABLE_ENTRY(5b,7b)
487" .dword 4b,7b\n"
488" .dword 5b,7b\n"
489#else
490" .word 1b,7b\n"
491" .word 2b,7b\n"
492" .word 3b,7b\n"
493" .word 4b,7b\n"
494" .word 5b,7b\n"
495#endif
496" .previous\n"
497 : "=r" (ret) 438 : "=r" (ret)
498 : "r" (valh), "r" (vall), "r" (regs->ior), "r" (regs->isr) 439 : "r" (valh), "r" (vall), "r" (regs->ior), "r" (regs->isr)
499 : "r19", "r20", "r21", "r1", FIXUP_BRANCH_CLOBBER ); 440 : "r19", "r20", "r21", "r1", FIXUP_BRANCH_CLOBBER );