Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1700960imm; Thu, 20 Sep 2018 01:13:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZbShopLNf7NITMJwlUnax0DzczqlDppzzOSBSx6NdbH6M42VGe5WXe4i3QgZdFUmb074LX X-Received: by 2002:a63:2703:: with SMTP id n3-v6mr3014089pgn.113.1537431198115; Thu, 20 Sep 2018 01:13:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537431198; cv=none; d=google.com; s=arc-20160816; b=D5oq1uTkc5QykOODitZbDZVRfJMrLAMct2kUrAGQccFzE2rrDNfXbVistbGjBYLiVi VpnfSqWOnLXLnXK0pdSbYEn7Nf+1NLT6943hFk0FJT+CTcSY1MavUYcQjFCgU2nyi6JZ t5hEDQ7DqcJjCQU09wtDACKY3TNoNRATnLyjH2yWys/7xRZuI70Wy6Nmm2ocU3952/8R dQWvZSsT1n1O9J1/jmZ93LnasjFdNyh6eXJaMfXDS9x13CvOjC9rkciotuJK1kBJIPX7 myS84nsLoD7LFr/kBJ8OM8mQi5otOfhdq/SUINp95L9AhLLC2tf9ZHy3B4plMOXn4tc5 w8/A== 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; bh=8oJy7BqSZNnTAN520tyfdX6YbtuMitnMJzwVgZH+hV4=; b=sPx4CyRaeyBG5gZ4RKZ3638DbrpH5F0rePQsqJJEGFAl9gEVG1VVfz0FcAgNS6q31g 5AONxvEL2nwgKGcxk7uAiXBI433jwbNxqGJUAV67YuXWB9+CaMkUiBQr4dMBCcVnDfKe +bTaddcX+RGyXbRx6kwZ26Eu60HCywDfp8WwUnbFhaWOwWoWiFwuh4/uXSjX6VgKP9s5 fs8EXYKX3VQ4tykNwgKE8A8WP0nZMGQ15Fs74pCp9uZc2pDOQU3AT/GHvcbtOogbte1g NTRkNanESSf62BhANtACRgtM+EZDbOkmvUSiFsJf5Ov5S5+ETAmcjpihhq9X4nvNzpyf CREw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RJLkByaj; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d30-v6si25330642pld.452.2018.09.20.01.13.02; Thu, 20 Sep 2018 01:13:18 -0700 (PDT) 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=@linaro.org header.s=google header.b=RJLkByaj; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731678AbeITNyw (ORCPT + 99 others); Thu, 20 Sep 2018 09:54:52 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:39077 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726296AbeITNyw (ORCPT ); Thu, 20 Sep 2018 09:54:52 -0400 Received: by mail-yw1-f67.google.com with SMTP id k130-v6so903795ywe.6 for ; Thu, 20 Sep 2018 01:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8oJy7BqSZNnTAN520tyfdX6YbtuMitnMJzwVgZH+hV4=; b=RJLkByajtf0DrgeClLVN3foGgGLUj6/WQJL9pWNAamx2eyE+8wS7zzubgUb1paAt5h RE5fmkrHF1qWcY94XJalt+wevPNvIokB8Axb4j9IO6jHzVM277fXJxBwlMy2KjID2+wc TbO/pcgT/y2uBVYUOHYKXTPDMOjg0lvwA59pM= 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=8oJy7BqSZNnTAN520tyfdX6YbtuMitnMJzwVgZH+hV4=; b=GEF4LE1tOPL0f4CxBljqx6JorZO0f5MR7C5LDt640BAyozWgiXC/erRAfZ+ox9KqV/ tD/f5N6KwV8qjCzqoXDtMEGxt08t/40aOt8cPq4gJwCHr7exueM49MXS7fJVKHelFF// +PsjlHqMi56liohBTtbm+nOOqvfrggQbwptRx8f9qAvP9bwB46CxdrzoSiCLorI+53DU Bcpfb4p3SeV6SPqA77wJE022HxMxlBV64zmfSwi4qa8m7ly7xyTho82mVZ+EXQME8Fyc c8/l1372Fc/sY/DsncUhGwExtCOoafFjkR2aDjUaREftesQ+/agYr4qbo2ZfsTwfDOjK Kpcw== X-Gm-Message-State: APzg51DVRNXmteVbPVMz+rpGUir5WglJ+exqtBAUKQWAlql07Fs1TshX u/VUwcXR1z0EHupxQDx6Ytrer1ZLjGKpwHsQ6R8O5A== X-Received: by 2002:a81:5fd4:: with SMTP id t203-v6mr12568140ywb.84.1537431157642; Thu, 20 Sep 2018 01:12:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0d:cc4f:0:0:0:0:0 with HTTP; Thu, 20 Sep 2018 01:12:37 -0700 (PDT) In-Reply-To: References: <1533791723-3882-1-git-send-email-firoz.khan@linaro.org> <1533791723-3882-3-git-send-email-firoz.khan@linaro.org> From: Firoz Khan Date: Thu, 20 Sep 2018 13:42:37 +0530 Message-ID: Subject: Re: [PATCH 2/4] m68k: Replace NR_syscalls macro from asm/unistd.h To: Geert Uytterhoeven Cc: linux-m68k , y2038 Mailman List , Linux Kernel Mailing List , Linux-Arch , Arnd Bergmann , Deepa Dinamani , Marcin Juszkiewicz 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 Hi Geert, On 18 September 2018 at 15:34, Geert Uytterhoeven wrote: > Hi Firoz, > > On Tue, Sep 18, 2018 at 9:16 AM Firoz Khan wrote: >> On 9 August 2018 at 13:00, Geert Uytterhoeven wrote: >> > One first comment below... >> > >> > On Thu, Aug 9, 2018 at 7:16 AM Firoz Khan wrote: >> >> NR_syscalls macro holds the number of system call exist in m68k >> >> architecture. This macro is currently the part of asm/unistd.h file. >> >> We have to change the value of NR_syscalls, if we add or delete a >> >> system call. >> >> >> >> One of patch in this patch series has a script which will generate >> >> a uapi header based on syscall.tbl file. The syscall.tbl file >> >> contains the number of system call information. So we have two >> >> option to update NR_syscalls value. >> >> >> >> 1. Update NR_syscalls in asm/unistd.h manually by counting the >> >> no.of system calls. No need to update NR_syscalls untill >> >> we either add a new system call or delete an existing system >> >> call. >> >> >> >> 2. We can keep this feature it above mentioned script, that'll >> >> count the number of syscalls and keep it in a generated file. >> >> In this case we don't need to explicitly update NR_syscalls >> >> in asm/unistd.h file. >> >> >> >> The 2nd option will be the recommended one. For that, I moved the >> >> NR_syscalls macro from asm/unistd.h to uapi/asm/unistd.h. The macro >> >> name also changed form NR_syscalls to __NR_syscalls for making the >> >> name convention same across all architecture. While __NR_syscalls >> >> isn't strictly part of the uapi, having it as part of the generated >> >> header to simplifies the implementation. >> > >> > It can indeed not be part of the UAPI, as UAPI definitions can never change, >> > while new syscalls will be added in the future, increasing the number ;-) >> >> Thanks for your reply :) >> Sorry for the delayed response :( >> >> I would like to keep __NR_syscalls macro to uapi header in order to simplify >> the system call table generation script. Otherwise the __NR_syscalls >> macro need to update manually. That become a problem. >> >> Please check the below implementation in uapi file make sense? >> It is an easy workaround to leave __NR_syscalls macro in uapi/asm/unistd.h >> and enclose it in #ifdef __KERNEL__ >> >> ... >> ... >> #define __NR_pwritev2 378 >> #define __NR_statx 379 >> >> #ifdef __KERNEL__ >> #define __NR_syscalls 380 >> #endif >> ... >> ... > > #ifdef __KERNEL__ sounds fine to me. I posted similar script for 10 different architectures. I got few good review from the maintainers and it will be applicable for all the architectures including m68k. There are few area which I identified need to improve. This will take couple of days. But it will be very helpful if you can perform the boot test on the actual platform and share the result. FYI, Keeping a single script is always our plan for long run. But I have to keep a separate versions for the start so each architecture can be handled in one series. Which would make easier to merge in the initial version. we could probably add it to scripts/*.sh first, but that requires more coordination between the architectures. - Firoz > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds