Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp33352pxu; Tue, 5 Jan 2021 04:33:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEubqmBN2M4MJ6myXxQvWxbg46WJ9u0UzZCkidXAfBqtaEB7zx7EjPJmUMnMkPgGWiE8rx X-Received: by 2002:a17:907:1607:: with SMTP id hb7mr68654804ejc.81.1609849981686; Tue, 05 Jan 2021 04:33:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609849981; cv=none; d=google.com; s=arc-20160816; b=GhbriJVGoUFkHP13eZ1iVfYENM0k7/fyOwrcu1lIIAlHNcC5vYRcpJRTwgxPmaR6Z1 NBweUG37qnsSBCYkc7PUBxKLM73Ge78f2kKEfvwUWsppUoPPlx4YXrNGMBCrzX2QfJkG 3FoHVO+2PUErPrSBhEPI9WNR1Z2zHpeu5hQhhyDWcofL5+pe53pULbadkXQCuFej/TB5 4xXY176AVUMrvmf2tY+uWmhWvaeAIRC6582AZYeTEce5azmt02pjyxLT1NPz6YSDnS/0 K5KE6bGsPYzVYGeSZ5r43pQlR0upvRGTH5bCNHxN57cKWB+l9xZa2U8t/bVudO+cti8y +eXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xZxch06ns9SygIlnz9oprb9p8n8JdJAGHl9arH7x26g=; b=bkhy+5O6ce4nGu/ocMzP0yAzg0m2lgCOx+VQmWs7/MkTRin5/GRLZPQF/8jx2pdABR ADRym0F6D3trAfyaAy7ve/w4h97yISgu0Qo0+QrLqa1svKW1w/iQJW1yuO6x2jqeQuWm YwKCuQZPIb9jUSE08Fsle8xBIqLsAnzGfAos0e31wSfZtT7cwihy47ppdUevIH5E0S2L kak8mxmBhasuvd1yoNsLoS5zNQsDK4midVrc2pQL/sxKR8d40EtTCI3Owce+41Jh+L2b oXHnM8YBiafMNWiHZhckhu6waokXBcbLEdDoX7uVM5mCJpZEgGbYXP1BKbnKyjiKua0y 6WSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DIHIj5JG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d23si30817016ejd.151.2021.01.05.04.32.38; Tue, 05 Jan 2021 04:33:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DIHIj5JG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728754AbhAEKsW (ORCPT + 99 others); Tue, 5 Jan 2021 05:48:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:35218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727841AbhAEKsV (ORCPT ); Tue, 5 Jan 2021 05:48:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 369E8227C3 for ; Tue, 5 Jan 2021 10:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609843660; bh=/Tl83Bdn72WSQKObXAulIf4joOMIe7PotYb7NFDieOQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DIHIj5JGFwd7TpyHNWpmbpcPAcGQD//AXfIX1nWZdjcC8Rv4w4i+Ba26kMw6/3ZFp MFbdUKYQG/CQB+Dew5PpU35WRaDQ15MDD+aubtKewLXUtvy/fD3dMWvdpMDw/0BGiA P+QZsVPftRZfp3+t2+BmddA8orD2dWSu3GEvwU3wqPDQpUqO+EPo/nEC8hRGR2cIr0 kZMdAIASf015tp/pqHVglWbvjck0kIVtHlx+phCocw6WBHfQyyQGtcZ+5jVBSpVQsD NccC/7XILy7buaSeWxrJES9cOHAOaxa6fD+v3woFDotxLMBT5/aYIUqsVdJg6rKrEm i+97cXDeL1C4g== Received: by mail-oo1-f46.google.com with SMTP id k7so6984219ooa.0 for ; Tue, 05 Jan 2021 02:47:40 -0800 (PST) X-Gm-Message-State: AOAM532jkDNEY49JUOQerl7W4pRg9rUOobONHVVQrs0Zcp6pi9foGdpk 10+dukn60wa7jqM9N3oU2f9OxJdt3//OHlgfvxg= X-Received: by 2002:a4a:2cc9:: with SMTP id o192mr50837741ooo.66.1609843659138; Tue, 05 Jan 2021 02:47:39 -0800 (PST) MIME-Version: 1.0 References: <20201228024159.2BB66203B5@pchp3.se.axis.com> In-Reply-To: <20201228024159.2BB66203B5@pchp3.se.axis.com> From: Arnd Bergmann Date: Tue, 5 Jan 2021 11:47:23 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] perf arm64: Simplify mksyscalltbl To: Hans-Peter Nilsson Cc: Linux ARM , "linux-kernel@vger.kernel.org" , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Kim Phillips Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 28, 2020 at 3:44 AM Hans-Peter Nilsson 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 }; #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