From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: [PATCH 3/8] Use glibc syscall if possible Date: Wed, 14 Dec 2011 11:38:33 -0800 Message-ID: <1323891518-1493-3-git-send-email-andi@firstfloor.org> References: <1323891518-1493-1-git-send-email-andi@firstfloor.org> Return-path: In-Reply-To: <1323891518-1493-1-git-send-email-andi@firstfloor.org> Sender: linux-numa-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: cpw@sgi.com Cc: linux-numa@vger.kernel.org, Andi Kleen From: Andi Kleen Modern glibcs seem to have a working 6 argument syscall, so use the glibc syscall stub if possible. --- syscall.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/syscall.c b/syscall.c index 7b3fe9e..6d0f788 100755 --- a/syscall.c +++ b/syscall.c @@ -115,7 +115,15 @@ #endif -#if defined(__x86_64__) +#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 11) + +/* glibc 2.11 seems to have working 6 argument sycall. Use the + glibc supplied syscall in this case. + The version cut-off is rather arbitary and could be probably + earlier. */ + +#define syscall6 syscall +#elif defined(__x86_64__) /* 6 argument calls on x86-64 are often buggy in both glibc and asm/unistd.h. Add a working version here. */ long syscall6(long call, long a, long b, long c, long d, long e, long f) -- 1.7.5.4