Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7957571imu; Mon, 3 Dec 2018 23:56:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/XxPU+UGd71FZ8SeDMH4lxXm7s8DTD71aVdo4glE6MWFO8SwdYKJxwIyhLtT72QTax/rOLs X-Received: by 2002:a62:d005:: with SMTP id p5mr10830807pfg.175.1543910219005; Mon, 03 Dec 2018 23:56:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543910218; cv=none; d=google.com; s=arc-20160816; b=rdbyYUwcaJTKqS2/eRr8L/MypOQfTO8m+Ir+NP0HwcsB0iOZobmaVS578i3ue1dhS2 7mCGVWM7eTzg05SPul3euQy2c5mrv7VCSMfuXbEaLSg0i2iU+ExE00zuHPoQtkaiBh5H WmvJNEP7PkEKdooK/NjxrVeHnEVKlDThv06BFyTSi4FqRJfd+zG7Qe+/RcdW3VUcQScW ufaZ2Qg7WVQn1jSYWMav2RxXY/giEjKI2p3CXwvoHok6vUu4IgQ/Yr/rHP76ydFm8jyo nyx7I/m/0VcgYF4VTeKRn65dryjPdUgRo+9dxyUy0aosbaC+JgRVPuiOBTpcXwxwP0ym OWew== 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; bh=TcogNWpZu54uDZOkaOo6fOMgxfk8n223Y+G8bBpezGY=; b=PMkTO6rNqhcLigvH1an6bXy+R/bbEIByFtzX8O5c77vfzp6UGmI1B3dIhhvoL2+vMp tCQTRqlrYkY1mG50Yn6HXt8oLRan6uObmOIdihHPbcshzCWUpezDgS0rJ0WrYagP/Ssw YBS0qK+XcxB5OINqLB79L/j/fTVre5NCz5HTSAyYMQpJr5ggr4OXr8R8u4q8OUQKfMbX Llv193facRMvWIdYAxrVaNCyWvIj1ilvHDwFFgw3GrHGVltKb8dRgiJJVK14YAgMFDLu Jq8mUZkcGlVk1bc0l552Uxxc1KY4aEv93bV/PcZ89ZJNgH6NKCQESOvCphFVuKwHUH8C GByA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a34si14497435pgb.458.2018.12.03.23.56.43; Mon, 03 Dec 2018 23:56:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726035AbeLDH4J (ORCPT + 99 others); Tue, 4 Dec 2018 02:56:09 -0500 Received: from mail-ua1-f67.google.com ([209.85.222.67]:45867 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725996AbeLDH4J (ORCPT ); Tue, 4 Dec 2018 02:56:09 -0500 Received: by mail-ua1-f67.google.com with SMTP id e16so5426966uam.12; Mon, 03 Dec 2018 23:56:08 -0800 (PST) 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=TcogNWpZu54uDZOkaOo6fOMgxfk8n223Y+G8bBpezGY=; b=Ci+XmGSFhdxmayndFPC1u9cRqm6qaaqkHILC7triNII2aYw7Kh8Wyd0gXMPopG+6KD /Gip+Asd53SbJnhIcmPaxWF8ilZAl7t9icUKQYShVdM7jQXkzbslqeW04Jxamo4sjxUM +weVP8CXhT1XfuionzD2VQhvcTMRx5oIMnuqoa7mJASXuQTSCUP7aQNqcWNp+VQp75Po 1n+8yedtGhZGZbotefE/9bMr/RA++JRrlM33Ro0aqrpfVwk431X6rV+HJShC6qn7kwyf n7HZrrKouR89fTPpr4zZ8KkEN6jTvxcmZMubgdVoOBB8pf6+h3T/+fSK/ym2zRqYCkun 8Beg== X-Gm-Message-State: AA+aEWaOI5KOEK5oHrfWZAhe2oZLDu4HLBeR73vlOk2s8Xpy0VRyE8UE bDgu5EVAwDKnbYwGTKEpo5rG14h1VuvXfsU9W4c= X-Received: by 2002:ab0:210e:: with SMTP id d14mr8839307ual.20.1543910167860; Mon, 03 Dec 2018 23:56:07 -0800 (PST) MIME-Version: 1.0 References: <1542088829-19790-1-git-send-email-firoz.khan@linaro.org> <1542088829-19790-3-git-send-email-firoz.khan@linaro.org> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 4 Dec 2018 08:55:55 +0100 Message-ID: Subject: Re: [PATCH v5 2/3] m68k: add system call table generation support To: firoz.khan@linaro.org Cc: linux-m68k , Greg KH , Philippe Ombredanne , Thomas Gleixner , Kate Stewart , y2038 Mailman List , Linux Kernel Mailing List , Linux-Arch , Arnd Bergmann , Deepa Dinamani , marcin.juszkiewicz@linaro.org 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 Firoz, On Tue, Dec 4, 2018 at 4:22 AM Firoz Khan wrote: > On Sun, 2 Dec 2018 at 19:27, Geert Uytterhoeven wrote: > > On Tue, Nov 13, 2018 at 7:01 AM Firoz Khan wrote: > > > The system call tables are in different format in all > > > architecture and it will be difficult to manually add, > > > modify or delete the syscall table entries in the res- > > > pective files. To make it easy by keeping a script and > > > which will generate the uapi header and syscall table > > > file. This change will also help to unify the implemen- > > > tation across all architectures. > > > > > > The system call table generation script is added in > > > kernel/syscalls directory which contain the scripts to > > > generate both uapi header file and system call table > > > files. The syscall.tbl will be input for the scripts. > > > > > > syscall.tbl contains the list of available system calls > > > along with system call number and corresponding entry > > > point. Add a new system call in this architecture will > > > be possible by adding new entry in the syscall.tbl file. > > > > > > Adding a new table entry consisting of: > > > - System call number. > > > - ABI. > > > - System call name. > > > - Entry point name. > > > > > > syscallhdr.sh and syscalltbl.sh will generate uapi header > > > unistd_32.h and syscall_table.h files respectively. Both > > > .sh files will parse the content syscall.tbl to generate > > > the header and table files. unistd_32.h will be included > > > by uapi/asm/unistd.h and syscall_table.h is included by > > > kernel/syscall_table.S - the real system call table. > > > > > > ARM, s390 and x86 architecuture does have similar support. > > > I leverage their implementation to come up with a generic > > > solution. > > > > > > Signed-off-by: Firoz Khan > > > > Thanks for your patch! > > > > > --- /dev/null > > > +++ b/arch/m68k/kernel/syscalls/syscallhdr.sh > > > + printf "#endif\n" > > > + printf "\n" > > > + printf "#endif /* %s */" "${fileguard}" > > > > The above line is lacking a "\n", causing: > > > > ./arch/m68k/include/generated/uapi/asm/unistd_32.h:370:42: > > warning: no newline at end of file > > I was wondering, I haven't seen this warning when I compiled it. It seems to depend on the compiler version. One more thing found by my good old gcc-4.1 ;-) (which I plan to retire soon, as I need to revert too many "drop support for old gcc" patches to keep it working :-(. > > Changing it to: > > > > printf "#endif /* %s */\n" "${fileguard}" > > > > fixes this. > > Yes. > > > Interestingly, this issue seems to be present on powerpc, parisc, sparc, > > sh, xtensa (and probably more, I gave up looking), too? > > I kept the script to generate files *almost* identical. so this will be present > all 10 architecture. > > > Apart from that, it seems to work fine on m68k. > > I have three options here to fix this; > 1. I can send v6 by fixing this one. > 2. I can post a single patch which add \n in the script. > 3. Could you able to add \n in the script. > > Please choose one, I can act accordingly. So your plan is for me to apply your series to the m68k tree? In that case there's no need to send a v6, I can incorporate the fix myself. 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