Received: by 10.223.164.202 with SMTP id h10csp2481879wrb; Mon, 27 Nov 2017 18:19:19 -0800 (PST) X-Google-Smtp-Source: AGs4zMZOe5BRG1jvb+G7ZPTd5wytAdiCsacJ8UUWo4k0159tUDBU3h0rAgwUmqeoDcXBQdIvWrXT X-Received: by 10.99.97.76 with SMTP id v73mr37841481pgb.378.1511835559851; Mon, 27 Nov 2017 18:19:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511835559; cv=none; d=google.com; s=arc-20160816; b=duWSYG/iX4UZ/dVaI/dbgCtvelnIINASSo+DlsYVQryaLLvEYivTxMdE2YfUxL1eUI 7j/o3JZ64iq0X8YvWC9H9vwTnPE/iXt1t8I9IEni6wfAG2vJevbzG7q2cCpp2kKcl4on 8DTIgLlWnNGqGxmszKb7yINPcrw8/Oq6dfVyFRDs6OxWu39Ualb8UqPr45PIJXPyFda8 XUUH5vXdEurTAcvQij6vVmKUtIoP+HyS6eJri0znyBRac23gm8a5owoojTmcRiXjQr3z IrcKISnZYkFtAO1tfTpIhJVfgEja7WFaIicxttiSyavc4JZIZAzJiXYav/vlKB3zOu8w po1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=uTnUWLJSiTf4Ov0ucT7zIV/lgvUURiDQEhTVFpc/2NQ=; b=v/NJ9PNUAtZMm/Eaw3rujbFb+JetuYQN9X2TS0qtn+eDiBd5EM6TA6llUqdsFaG+qo k+dxz0unWw+14PdWEyktsMmTbE62lAEuYRKY/hxo0yfaUvr8f0p17Hn0VgI53+cpvGlg yIX5PV4sZePAzEJLsef637cRwo4F9ZuJL6OcSJiFoAP6jZAAY+7iHDpUntVDgreKjzQ7 NozAIMaVNMaJCac6yx1tmMSrNO+4RfG+lKcrnwX3Dd2nDHMFvBuE2z4uZRckKwq/mfRV aZZIoUG+HABe0a95sDCSfS3catbYlPCKEozvImksoN7Lot/Yo9fnNvgmrPuiZ2i/i58l 6LRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nkjksYB2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si22140972pll.79.2017.11.27.18.19.07; Mon, 27 Nov 2017 18:19:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nkjksYB2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753444AbdK1CSZ (ORCPT + 78 others); Mon, 27 Nov 2017 21:18:25 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:44145 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752172AbdK1CSW (ORCPT ); Mon, 27 Nov 2017 21:18:22 -0500 Received: by mail-it0-f66.google.com with SMTP id b5so23659548itc.3; Mon, 27 Nov 2017 18:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uTnUWLJSiTf4Ov0ucT7zIV/lgvUURiDQEhTVFpc/2NQ=; b=nkjksYB2IC1N2IQ7ZJ7eBeNLp5BNAXsSfgTfuPcmIqLhQzRdUtCWwzD1BRTVhZnVei 2gIjEFerkHrDZ4QS3RfBtHMG/Nn09NXLu9rbwJh2n7qWtJewvXonQHg8XOxMV1gDRv5U a4LAAFRQEWURwsK1V4AmOaWojb5YqBYWBWMGUHFayvn/4Edq5C8u6vJzwsRboCnz2TF+ fpHVlTMH0CWuJzNrbhy4IJnniSDM4y9Wo6WKg9srfCk6r19Jx65DGwqyV4Qe6Cpx4ODU 2MR39qoLkGL4+q7cv+0ibnWbV0DGNTHi8CZchCWQRLpMglQodBhpxhmN5DdqyrsOJbIt AUCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uTnUWLJSiTf4Ov0ucT7zIV/lgvUURiDQEhTVFpc/2NQ=; b=hKAtUCtO+SB5b6A449Euxn35uHq4OPu0WCHzxlbbi4ADPP+MIaHpTJ8ldCMIi40lAh CEEJTqRiDcfzNLVxLKNFzAwghWERNKU3KiRnqm2CysrMVJoNqL7FgVIMnx0V/z7rAhS2 KJf+sl9hxkkRcw9PmPCrq7ipNQwi4WJALT4UdE3/w44LcH4yLUyTLvqUXdBWMtuMaENu mauNhcTx/7TJEndwcq2BAifytWUGLQafsRrZY6ZMBJfN+9i8Y5tefdSHVhfQ6DIuM61B iqrUU4VgROb0PBOA390Afpin12annJMuvumxxmM6ppcQ6/bpUo5m1cpkjWBRLntwV7Dh EFaw== X-Gm-Message-State: AJaThX7cQt8j5GXnT1rVBhdIfMEV6Kirnurvl9Qwvsv4RDT96sE4eIxU 2RI7r/ovM7TIdssOZXp+kfok/xH6fVqD+6Xigp0= X-Received: by 10.36.178.68 with SMTP id h4mr392570iti.77.1511835501653; Mon, 27 Nov 2017 18:18:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.7.91 with HTTP; Mon, 27 Nov 2017 18:18:21 -0800 (PST) In-Reply-To: References: From: Vincent Chen Date: Tue, 28 Nov 2017 10:18:21 +0800 Message-ID: Subject: Re: [PATCH v2 14/35] nds32: System calls handling To: Arnd Bergmann Cc: Greentime Hu , Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , DTML , Al Viro , David Howells , Will Deacon , Daniel Lezcano , linux-serial@vger.kernel.org, Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-27 22:46 GMT+08:00 Arnd Bergmann : > On Mon, Nov 27, 2017 at 1:28 PM, Greentime Hu wrote: > >> diff --git a/arch/nds32/include/asm/syscalls.h b/arch/nds32/include/asm/syscalls.h >> new file mode 100644 >> index 0000000..741ccdc >> --- /dev/null >> +++ b/arch/nds32/include/asm/syscalls.h >> @@ -0,0 +1,27 @@ >> +/* >> + * Copyright (C) 2005-2017 Andes Technology Corporation >> + * >> + * This program is free software; you can redistribute it and/or modify >> + * it under the terms of the GNU General Public License version 2 as >> + * published by the Free Software Foundation. >> + * >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + * >> + * You should have received a copy of the GNU General Public License >> + * along with this program. If not, see . >> + */ >> + >> +#ifndef __ASM_NDS32_SYSCALLS_H >> +#define __ASM_NDS32_SYSCALLS_H >> + >> +int sys_cacheflush(unsigned long addr, unsigned long len, unsigned int op); >> +long sys_fadvise64_64_wrapper(int fd, int advice, loff_t offset, loff_t len); >> +asmlinkage int sys_syscall(void); >> +asmlinkage int sys_rt_sigreturn_wrapper(void); > > You mentioned that sys_syscall() should be removed in this version. > Sorry, I will remove it in next version patch. > By convention, all syscall declarations should start with 'asmlinkage long', > even though this has no effect in your architecture. > Thanks. I will modify it in next version patch. >> diff --git a/arch/nds32/include/uapi/asm/unistd.h b/arch/nds32/include/uapi/asm/unistd.h >> new file mode 100644 >> index 0000000..2bad1e7 >> --- /dev/null >> +++ b/arch/nds32/include/uapi/asm/unistd.h > >> + >> +#define __ARCH_WANT_RENAMEAT >> +#define __ARCH_WANT_SYSCALL_OFF_T > > These two should not be here. > Thanks. But, I don't know I should move these two macro to which file. In asm-generic/unistd.h, these two are used to decide whether relative syscall number is defined or not. Therefore, I put these two macros here in order that these two definitions are available in user space. >> +#define __ARCH_WANT_SYNC_FILE_RANGE2 > > This one is fine though > >> +/* Use the standard ABI for syscalls */ >> +#include >> + >> +__SYSCALL(__NR_fadvise64_64, sys_fadvise64_64_wrapper) >> +__SYSCALL(__NR_rt_sigreturn, sys_rt_sigreturn_wrapper) > > I think you are overriding the array assignment here, this may cause a > compiler warning when building with "make C=1 V=1" since you have > the same index assigned to two pointers. A better way to do this > is to override the name: > > #define sys_rt_sigreturn sys_rt_sigreturn_wrapper > #define sys_fadvise64_64 sys_fadvise64_64_wrapper > #include > Thanks, I will follow your suggestion to modify it in the next version patch. > > Arnd Vincent From 1585230983423151929@xxx Mon Nov 27 14:47:54 +0000 2017 X-GM-THRID: 1585224575118328148 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread