On Thu, 2008-11-20 at 10:37 -0500, Josh Boyer wrote: > On Thu, 20 Nov 2008 16:09:16 +0100 > "Joakim Tjernlund" <[EMAIL PROTECTED]> wrote: > > > Why does the below program end up reporting -1 > > multiple seconds when times() wrap: > > http://sources.redhat.com/bugzilla/show_bug.cgi?id=5209 > > josh
I see, but this is a new ppc kernel bug I think. This little hack changes the kernel sys call handling in an crude way and then it works. Apperently the kernel thinks is an error if the syscall returns a value between -_LAST_ERRNO and -1. Perhaps a known bug? diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 1cbbf70..72effde 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -278,7 +278,8 @@ ret_from_syscall: SYNC MTMSRD(r10) lwz r9,TI_FLAGS(r12) - li r8,-_LAST_ERRNO + //li r8,-_LAST_ERRNO + li r8,-2 andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) bne- syscall_exit_work cmplw 0,r3,r8 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev