From patchwork Thu Dec 14 06:29:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 848383 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=uclibc-ng.org (client-ip=89.238.66.15; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mOIfsPBS"; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yy3Z26Tqqz9s83 for ; Thu, 14 Dec 2017 17:29:30 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id A89A6106FD; Thu, 14 Dec 2017 07:29:27 +0100 (CET) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by helium.openadk.org (Postfix) with ESMTPS id 5A3E6106FD for ; Thu, 14 Dec 2017 07:29:23 +0100 (CET) Received: by mail-pf0-f193.google.com with SMTP id d23so2970613pfe.9 for ; Wed, 13 Dec 2017 22:29:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GPsRzCZG+/5PvELCq6jzGkxBMYSyxmiZnXdQe4xFdX4=; b=mOIfsPBS0ldOXXFSaPF2Ue2McG5A+Sx3BX0xTOO9L9wR5MK2K9QWTw+XdSGTuQWAVJ GL3FFesl0W/lrS/hcUEB57YqtsODWNZmU9NXhxSlijWix2/PkKwbrqXbtfWOQAf/3zMc O72fU2X//DP80WNzzkxBc5AR92EjXzeGlm7KWrnV1K/7OMhj1uXl059Xza/qTl8yTclq becAYjJEGX8C1e8grgzFROFqwmlCH611HhwSVWgXSKARn649wWHbHTfYcRf3si1VjXFd 50bmOxxycJw7ofM/ewC+rzQxRCWTGu84LcmFZPFu9IUG9hU527Hnf/bA49ojJmJs2/AP pMMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GPsRzCZG+/5PvELCq6jzGkxBMYSyxmiZnXdQe4xFdX4=; b=ZjUV+HIGWHd56UKVKjOttSDjhbXD0K7P50tPsZQaF2uoPSgaZyd4vXHMmcFqAwz/2f JbFwLjQxTLVTDcTISNBUx0qVU9l2K986UdbwIlTErmNAQXtk+RBU/dhOTCAqHTIGyw9H dDCcLGrfxltEbRNjKL9qP1MuNtnSgeJ7BlqDwaOswndltF+cZMCw7Jik7e2EeyLoY0k/ Um/rWRZWK0vi1uhI37kQW9HFTPyLlIlWEuwU2bUxw+fMlYfC/IkSZ/yy43LxDr1NnUTC 88IHbJ54xhf2FDHa/tvHxauavjJud5raPrIvK/58et2VEp+cSy3eBWs2zqwJx7LrgN1N VyVA== X-Gm-Message-State: AKGB3mKeMD6iPCHbg3gRuNkdvV25OlBh5/t3/NuiuYiAINQd/WAl83dg DP6fDeY6ehz2brn8/tmT1D3svPRI X-Google-Smtp-Source: ACJfBot2UwXCkhl52xTwepjn548e5FO5NFTXqJMcO727dqZehEe6bd5NbL9b/Brt/BGfeCa47OowVg== X-Received: by 10.159.244.131 with SMTP id y3mr8634165plr.244.1513232961478; Wed, 13 Dec 2017 22:29:21 -0800 (PST) Received: from localhost (g41.219-103-184.ppp.wakwak.ne.jp. [219.103.184.41]) by smtp.gmail.com with ESMTPSA id j6sm6190355pfg.85.2017.12.13.22.29.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Dec 2017 22:29:21 -0800 (PST) From: Stafford Horne To: uclibc-ng Devel Date: Thu, 14 Dec 2017 15:29:08 +0900 Message-Id: <20171214062909.8602-4-shorne@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171214062909.8602-1-shorne@gmail.com> References: <20171214062909.8602-1-shorne@gmail.com> Subject: [uclibc-ng-devel] [PATCH 3/4] nds32: Use new common syscall() implementation X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" Traditionally nds32 has had a generic syscall implementation supporting varargs. During an audit it was found that this implementation seems to duplicate the new common implementation and is no longer needed. Signed-off-by: Stafford Horne --- libc/sysdeps/linux/nds32/Makefile.arch | 4 ++-- libc/sysdeps/linux/nds32/syscall.c | 28 ---------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 libc/sysdeps/linux/nds32/syscall.c diff --git a/libc/sysdeps/linux/nds32/Makefile.arch b/libc/sysdeps/linux/nds32/Makefile.arch index d5cdddbfa..caf163844 100644 --- a/libc/sysdeps/linux/nds32/Makefile.arch +++ b/libc/sysdeps/linux/nds32/Makefile.arch @@ -1,7 +1,7 @@ # Copyright (C) 2016 Andes Technology, Inc. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -CSRC-y := brk.c prctl.c mremap.c syscall.c -SSRC-y := setjmp.S __longjmp.S bsd-setjmp.S bsd-_setjmp.S clone.S vfork.S sysdep.S syscall.S +CSRC-y := brk.c prctl.c mremap.c +SSRC-y := setjmp.S __longjmp.S bsd-setjmp.S bsd-_setjmp.S clone.S vfork.S sysdep.S CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c swapcontext.c SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += getcontext.S setcontext.S diff --git a/libc/sysdeps/linux/nds32/syscall.c b/libc/sysdeps/linux/nds32/syscall.c deleted file mode 100644 index 2c949ef3a..000000000 --- a/libc/sysdeps/linux/nds32/syscall.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 Andes Technology, Inc. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ - -#include -#include -#include -#include -#include -long int syscall (long int __sysno, ...) -{ - - int result; - unsigned long arg1,arg2,arg3,arg4,arg5,arg6; - va_list arg; - va_start (arg, __sysno); - arg1 = va_arg (arg, unsigned long); - arg2 = va_arg (arg, unsigned long); - arg3 = va_arg (arg, unsigned long); - arg4 = va_arg (arg, unsigned long); - arg5 = va_arg (arg, unsigned long); - arg6 = va_arg (arg, unsigned long); - va_end (arg); - __asm__ volatile ( "" ::: "memory" ); - result = INLINE_SYSCALL(syscall,7,__sysno,arg1,arg2,arg3,arg4,arg5,arg6); - return result; -}