[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a1G2YHh2FRd=vBY4xxsJ1wZFh2pB1wyw82QmQOaiV4+CA@mail.gmail.com>
Date: Tue, 5 Jan 2021 11:47:23 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Hans-Peter Nilsson <hp@...s.com>
Cc: Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
John Garry <john.garry@...wei.com>,
Will Deacon <will@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Leo Yan <leo.yan@...aro.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Kim Phillips <kim.phillips@....com>
Subject: Re: [PATCH] perf arm64: Simplify mksyscalltbl
On Mon, Dec 28, 2020 at 3:44 AM Hans-Peter Nilsson <hp@...s.com> wrote:
>
> This patch isn't intended to have any effect on the compiled
> code. It just removes one level of indirection: calling the
> *host* compiler to build and then run a program that just
> printf:s the numerical entries of the syscall-table. In other
> words, the generated syscalls.c changes from:
> [46] = "ftruncate",
> to:
> [__NR3264_ftruncate] = "ftruncate",
If you include the file, why not just use the macros directly, like
#define __SYSCALL(nr, sym) [nr] = #sym ;
static const char *syscalltbl_arm64[] = {
#include <uapi/asm-generic/unistd.h>
};
#undef __SYSCALL
The leaves an extra "sys_" in front of every name, but if you
care, that could be left out afterwards.
> At the time of this patch, powerpc (the origin, see comments),
> and also e.g. x86 has moved on, from filtering "gcc -dM -E"
> output to reading separate specific text-file, a table of
> syscall numbers. IMHO should arm64 consider adopting this.
Right, we had patches to convert include/uapi/asm-generic/unistd.h
to the syscall.tbl format some time ago, but they were never
merged as there were a few remaining bugs. I had planned to
pick up that work but have not gotten around to it yet.
If anyone is interested in doing this, I can dig out the last version
of the patches.
Arnd
Powered by blists - more mailing lists