revert last commit - flash map driver not updated yet
[openwrt/staging/mkresin.git] / target / linux / uml-2.6 / patches / 01-no_syscallx
1 # Since the syscallx macros seem to be under threat, this patch stops
2 # using them, using syscall instead.
3
4 Index: linux-2.6.17/arch/um/os-Linux/process.c
5 ===================================================================
6 --- linux-2.6.17.orig/arch/um/os-Linux/process.c 2006-09-20 11:15:08.000000000 -0400
7 +++ linux-2.6.17/arch/um/os-Linux/process.c 2006-09-20 13:35:24.000000000 -0400
8 @@ -140,11 +140,9 @@ void os_usr1_process(int pid)
9 * syscalls, and also breaks with clone(), which does not unshare the TLS.
10 */
11
12 -inline _syscall0(pid_t, getpid)
13 -
14 int os_getpid(void)
15 {
16 - return(getpid());
17 + return syscall(__NR_getpid);
18 }
19
20 int os_getpgrp(void)
21 Index: linux-2.6.17/arch/um/os-Linux/sys-i386/tls.c
22 ===================================================================
23 --- linux-2.6.17.orig/arch/um/os-Linux/sys-i386/tls.c 2006-06-18 13:49:35.000000000 -0400
24 +++ linux-2.6.17/arch/um/os-Linux/sys-i386/tls.c 2006-09-20 13:37:27.000000000 -0400
25 @@ -3,8 +3,6 @@
26 #include "sysdep/tls.h"
27 #include "user_util.h"
28
29 -static _syscall1(int, get_thread_area, user_desc_t *, u_info);
30 -
31 /* Checks whether host supports TLS, and sets *tls_min according to the value
32 * valid on the host.
33 * i386 host have it == 6; x86_64 host have it == 12, for i386 emulation. */
34 @@ -17,7 +15,7 @@ void check_host_supports_tls(int *suppor
35 user_desc_t info;
36 info.entry_number = val[i];
37
38 - if (get_thread_area(&info) == 0) {
39 + if(syscall(__NR_get_thread_area, &info) == 0){
40 *tls_min = val[i];
41 *supports_tls = 1;
42 return;
43 Index: linux-2.6.17/arch/um/os-Linux/tls.c
44 ===================================================================
45 --- linux-2.6.17.orig/arch/um/os-Linux/tls.c 2006-08-15 21:59:56.000000000 -0400
46 +++ linux-2.6.17/arch/um/os-Linux/tls.c 2006-09-20 13:37:14.000000000 -0400
47 @@ -48,14 +48,11 @@ int os_get_thread_area(user_desc_t *info
48 #ifdef UML_CONFIG_MODE_TT
49 #include "linux/unistd.h"
50
51 -static _syscall1(int, get_thread_area, user_desc_t *, u_info);
52 -static _syscall1(int, set_thread_area, user_desc_t *, u_info);
53 -
54 int do_set_thread_area_tt(user_desc_t *info)
55 {
56 int ret;
57
58 - ret = set_thread_area(info);
59 + ret = syscall(__NR_set_thread_area, info);
60 if (ret < 0) {
61 ret = -errno;
62 }
63 @@ -66,7 +63,7 @@ int do_get_thread_area_tt(user_desc_t *i
64 {
65 int ret;
66
67 - ret = get_thread_area(info);
68 + ret = syscall(__NR_get_thread_area, info);
69 if (ret < 0) {
70 ret = -errno;
71 }