aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-10-05 20:27:32 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-13 13:23:20 -0700
commite392c24a07c18208c29cf11c856d6031b4fb3f87 (patch)
treef526d682f4eab99fc557185185c7cd76e47f1698 /arch
parentbc019aa572e8c5e7fa759edbd50551a596b6ecae (diff)
UML: Fix UML build failure
don't know if the following is already queued, it fixes an ARCH=um build failure, evidence here: http://marc.theaimsgroup.com/?l=linux-kernel&m=115875912525137&w=2 and following thread. Cc-ing uml maintainers and I hope I didn't follow too many Submitting-patches rules... The patch is taken from: http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.18/patches/no-syscallx Since the syscallx macros seem to be under threat, this patch stops using them, using syscall instead. Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/os-Linux/process.c4
-rw-r--r--arch/um/os-Linux/sys-i386/tls.c4
-rw-r--r--arch/um/os-Linux/tls.c7
3 files changed, 4 insertions, 11 deletions
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c
index b98d3ca2cd1..c8bf7727666 100644
--- a/arch/um/os-Linux/process.c
+++ b/arch/um/os-Linux/process.c
@@ -141,11 +141,9 @@ void os_usr1_process(int pid)
* syscalls, and also breaks with clone(), which does not unshare the TLS.
*/
-inline _syscall0(pid_t, getpid)
-
int os_getpid(void)
{
- return(getpid());
+ return syscall(__NR_getpid);
}
int os_getpgrp(void)
diff --git a/arch/um/os-Linux/sys-i386/tls.c b/arch/um/os-Linux/sys-i386/tls.c
index 120abbe4e3c..64f547f49fb 100644
--- a/arch/um/os-Linux/sys-i386/tls.c
+++ b/arch/um/os-Linux/sys-i386/tls.c
@@ -3,8 +3,6 @@
#include "sysdep/tls.h"
#include "user_util.h"
-static _syscall1(int, get_thread_area, user_desc_t *, u_info);
-
/* Checks whether host supports TLS, and sets *tls_min according to the value
* valid on the host.
* i386 host have it == 6; x86_64 host have it == 12, for i386 emulation. */
@@ -17,7 +15,7 @@ void check_host_supports_tls(int *supports_tls, int *tls_min) {
user_desc_t info;
info.entry_number = val[i];
- if (get_thread_area(&info) == 0) {
+ if(syscall(__NR_get_thread_area, &info) == 0){
*tls_min = val[i];
*supports_tls = 1;
return;
diff --git a/arch/um/os-Linux/tls.c b/arch/um/os-Linux/tls.c
index 9cb09a45546..297f263167f 100644
--- a/arch/um/os-Linux/tls.c
+++ b/arch/um/os-Linux/tls.c
@@ -48,14 +48,11 @@ int os_get_thread_area(user_desc_t *info, int pid)
#ifdef UML_CONFIG_MODE_TT
#include "linux/unistd.h"
-static _syscall1(int, get_thread_area, user_desc_t *, u_info);
-static _syscall1(int, set_thread_area, user_desc_t *, u_info);
-
int do_set_thread_area_tt(user_desc_t *info)
{
int ret;
- ret = set_thread_area(info);
+ ret = syscall(__NR_set_thread_area, info);
if (ret < 0) {
ret = -errno;
}
@@ -66,7 +63,7 @@ int do_get_thread_area_tt(user_desc_t *info)
{
int ret;
- ret = get_thread_area(info);
+ ret = syscall(__NR_get_thread_area, info);
if (ret < 0) {
ret = -errno;
}