lkml.org 
[lkml]   [2004]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.6-rc3: modular DVB tda1004x broken
Andrew Morton writes:

> diff -puN include/asm-ppc64/unistd.h~kernel-syscalls-retval-fix include/asm-ppc64/unistd.h
> --- 25/include/asm-ppc64/unistd.h~kernel-syscalls-retval-fix 2004-05-01 17:06:01.187628160 -0700
> +++ 25-akpm/include/asm-ppc64/unistd.h 2004-05-01 17:21:43.897314504 -0700
> @@ -286,6 +286,17 @@
>
> #ifndef __ASSEMBLY__
>
> +#ifdef __KERNEL__
> +#define __syscall_return /* */

For ppc and ppc64 a syscall that returns an error puts the positive
error number in r3 and sets the SO bit in CR0. So if we are expecting
the negative error number as the return value for syscalls in the
kernel we will need this instead:

#define __syscall_return \
if (__sc_err & 0x10000000) \
__sc_ret = - __sc_ret;

for the #ifdef __KERNEL__ case for both ppc and ppc64.

Thanks,
Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.183 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site