Commit 18a58b8b authored by Anton Blanchard's avatar Anton Blanchard

ppc64: Fix for copy_tofrom_user from Paul Mackerras

parent d51167f4
......@@ -124,7 +124,7 @@ _GLOBAL(DoSyscall)
addi r9,r1,STACK_FRAME_OVERHEAD
blrl /* Call handler */
_GLOBAL(ret_from_syscall_1)
20: std r3,RESULT(r1) /* Save result */
std r3,RESULT(r1) /* Save result */
#ifdef SHOW_SYSCALLS
#ifdef SHOW_SYSCALLS_TASK
ld r10, PACACURRENT(13)
......@@ -195,7 +195,7 @@ _GLOBAL(ret_from_syscall_1)
addi r9,r1,STACK_FRAME_OVERHEAD
blrl /* Call handler */
_GLOBAL(ret_from_syscall_2)
58: std r3,RESULT(r1) /* Save result */
std r3,RESULT(r1) /* Save result */
std r3,GPR0(r1) /* temporary gross hack to make strace work */
li r10,-_LAST_ERRNO
cmpl 0,r3,r10
......@@ -240,9 +240,9 @@ _GLOBAL(ppc64_rt_sigreturn)
bne- 81f
cmpi 0,r3,0
bge .ret_from_except
b 20b
b .ret_from_syscall_1
81: cmpi 0,r3,0
blt 58b
blt .ret_from_syscall_2
bl .do_syscall_trace
b .ret_from_except
......
......@@ -434,6 +434,7 @@ pcibios_init(void)
PPCDBG(PPCDBG_BUSWALK,"PCI: Probing PCI hardware done.\n");
//ppc64_boot_msg(0x41, "PCI Done");
return 0;
}
subsys_initcall(pcibios_init);
......
......@@ -23,6 +23,7 @@
#include "i8259.h"
#include "xics.h"
#include <asm/ppcdebug.h>
#include <asm/machdep.h>
void xics_enable_irq(u_int irq);
void xics_disable_irq(u_int irq);
......
......@@ -253,14 +253,16 @@ _GLOBAL(__copy_tofrom_user)
addi r4,r4,1
bne 1b
blr
3: srdi r9,r5,3
3: cmpldi cr1,r5,8
srdi r9,r5,3
andi. r5,r5,7
blt cr1,93f
mtctr r9
91: std r0,0(r4)
addi r4,r4,8
bdnz 91b
beqlr
mtctr r5
93: beqlr
mtctr r5
92: stb r0,0(r4)
addi r4,r4,1
bdnz 92b
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment