Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp487200imm; Sat, 22 Sep 2018 04:34:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV60cA2sIfLNeUg4DbxlMXeByn33La8Swgfd4TZdjvbs6WcDfPeRKGjMmnmzdYiXw3SOAKL3l X-Received: by 2002:a62:2a48:: with SMTP id q69-v6mr2231659pfq.86.1537616055938; Sat, 22 Sep 2018 04:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537616055; cv=none; d=google.com; s=arc-20160816; b=K6liqwODtOSJ8+6GQwxd78YVoPafueK28x0M4Ze/8GHEX4XksfxqEJ6297TQGO5v6J 8JeV8cim92D9knnZ9qNG0pTl74+hwGXCl4HEuoyOeHlUcAA2uk83lFbD3x3HOuFbosd9 1muH1Ck90c6n75KgHAhvSfzDuip858vqHimIOl2NPNiO6qIiO4kxfOExp8Ts2zfyMuaV kAy5+DKN0Oz0fq9qII4NUXl1/d9cjFOo1J6A/InWMxZYFQRWjCnkFby76ICF60hzX7QI uUqVGZ7ShAZOpi5oxkEnlpscSgWdb6ibsQlQwmB9Hnk4Ljb5UYbIMZTRvoHN2vAAxnRc /euQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=ndm8L3AdSTYifie8wUxQs4Eh1zw0lRPpstlEqJmGqjE=; b=fzhs8oFVuWZrnp+u8u8hTqx61Nmb+JJxQLTaGNMe9ME5nW98jzBvJHMpsJAvM0Ezly y5U7xRp4Y/D43F/CJSy7oqyulzqnSO0VooJc4MmDyoSwlemiy7adyXVPDVT7V2KogKL1 1OrTey28VBDnovVC8NOCQ5uJG1O9nLGoqVO92Rpeya63ywKdeH5c7IRbRRacPcyNAqhv HwLr6KFsVduotBFax0pPyZqGBNDi3REfaEvwXSEPdOzbetZlnjSi5InlxgnuHctZq+lq pOopfytKdhlZoqI4P5NsGouACqh2YmBovPiF86Fk6manQj0IJ42AysZ4PrrtdGTEmKYr i6jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cbHFKOhe; 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 n21-v6si1666948pgd.145.2018.09.22.04.33.59; Sat, 22 Sep 2018 04:34:15 -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=cbHFKOhe; 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 S1728624AbeIVR1L (ORCPT + 99 others); Sat, 22 Sep 2018 13:27:11 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:38520 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727057AbeIVR1L (ORCPT ); Sat, 22 Sep 2018 13:27:11 -0400 Received: by mail-yb1-f193.google.com with SMTP id e190-v6so6516327ybb.5 for ; Sat, 22 Sep 2018 04:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ndm8L3AdSTYifie8wUxQs4Eh1zw0lRPpstlEqJmGqjE=; b=cbHFKOhe27mHcoTFP3aFTJP8t/zInP5HXAx+DJOtcTpUaEi05svP2puY+u65tW8GP1 BH4Ib/eNk/Fz/l8+jWp78DVDej5R+OmYih4CxL5xgbapcmTuNxigo8ytHY7mmYVsj7sR fOUkKMjexSYccyIwXZm/ySOmg+JLFbkXZONKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ndm8L3AdSTYifie8wUxQs4Eh1zw0lRPpstlEqJmGqjE=; b=NvY9D88J1HXRhL2A0pYyCNMhgppvz6eUMI1QIpKednVTQqAE4Tb7I+pcuWWZ2FG0DA vIqNituC3LNH+QUEa/9lcwfaA7Ze3qQDNF+Z1eHd2kXXdkUVtb+dO1UCIYaWpRbv58m3 dsWAvk5o49Eirwjz2gHjTCAOGf4b8ZV4ZpgZJLNbEoLHTAn6j8GeDHTmwgK9qRxyuYPE pHWjB45v2v44K40+XbHIPyoV2nxJmSZ+NsGRjMjvOejnzRu8wQ2AcgBGBlX/NnoS8ZzI JQxK42G0oBoKlMFcVp5P9t9YhIGMtz8YAB83C7523smZc5n4ZfeGFPlCvJ0ejARecFSB Yhtw== X-Gm-Message-State: ABuFfoic+mm6caukfV8Hd6I+2uDWkPoxD7U6qb0rUCtCFnqebnmAjJRm H8XfG1hLNSThpPD2qo0nJRvUSK3GUaD/ELHWQH5Dvw== X-Received: by 2002:a25:e548:: with SMTP id c69-v6mr732998ybh.393.1537616035237; Sat, 22 Sep 2018 04:33:55 -0700 (PDT) MIME-Version: 1.0 References: <1533791723-3882-1-git-send-email-firoz.khan@linaro.org> <1533791723-3882-3-git-send-email-firoz.khan@linaro.org> In-Reply-To: From: Firoz Khan Date: Sat, 22 Sep 2018 17:03:43 +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 Thu, 20 Sep 2018 at 14:54, Geert Uytterhoeven wrote: > > Hi Firoz, > > On Thu, Sep 20, 2018 at 10:12 AM Firoz Khan wrote: > > On 18 September 2018 at 15:34, Geert Uytterhoeven wrote: > > > 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. > > Builds and boots fine on ARAnyM (virtual Atari). Thanks for the support :) > > So for the full series: > Tested-by: Geert Uytterhoeven > > However, I noticed the following effective difference between the old > arch/m68k/include/uapi/asm/unistd.h and the new generated > arch/m68k/include/generated/uapi/asm/unistd_32.h: > > -/*#define __NR_break 17*/ > -/*#define __NR_stty 31*/ > -/*#define __NR_gtty 32*/ > -/*#define __NR_ftime 35*/ > -/*#define __NR_prof 44*/ > -/*#define __NR_lock 53*/ > -/*#define __NR_mpx 56*/ > -/*#define __NR_ulimit 58*/ > -/*#define __NR_oldolduname 59*/ > -/*#define __NR_profil 98*/ > -/*#define __NR_ioperm 101*/ > -/*#define __NR_olduname 109*/ > -/*#define __NR_iopl 110*/ /* not supported */ > -/*#define __NR_idle 112*/ /* Obsolete */ > -/*#define __NR_vm86 113*/ /* not supported */ > -/*#define __NR_afs_syscall 137*/ /* Syscall for Andrew File System */ > -/*#define __NR_vserver 278*/ > +#define __NR_break 17 > +#define __NR_stty 31 > +#define __NR_gtty 32 > +#define __NR_ftime 35 > +#define __NR_prof 44 > +#define __NR_lock 53 > +#define __NR_mpx 56 > +#define __NR_ulimit 58 > +#define __NR_oldolduname 59 > +#define __NR_profil 98 > +#define __NR_ioperm 101 > +#define __NR_olduname 109 > +#define __NR_iopl 110 > +#define __NR_idle 112 > +#define __NR_vm86 113 > +#define __NR_afs_syscall 137 > +#define __NR_vserver 278 > > Given userspace code may contain checks for the presence of these > defines, I think they should not be present. My patch series had some different way to handle the above one. Some how the plan got changed and missed it :( I posted v2 patch series Thursday evening. This contain some modi- fications suggested by different architecture maintainers including you. Please help us to review the patch series and please perform boot test on the actual platform. Thanks 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