From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4E1FC4332F for ; Fri, 25 Nov 2022 11:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=q1xbQpN1bmGgvBJGWyRjbPpplHL2nog8NWF8gbsoIGE=; b=OF6kvI9VlUIRjf aSQ2DRH+kMmJDxKGfkCUTu9JUULOYHBqBEJkKbDx2tMXon4bbsP9k7DM9RdztGEM4XyzquIh6FjDD kOiR6j16EbX/e3RxowqoEstpyFHQXpX9WZ2BYud0RBKeVeHQqDlAyKhJDw56hp3RyQEdlKg/mmAVi O4Kvjlz2bZUOvXwloIZbTESham20EqzUNr3okrJCLyHGRjNCg4OIvULWFYbdi+7d4P0LVw72Vm7cg VsLHq3n3TuSPZr4lqNw86XZFeJ6m7PTwo5twvtVfxdqBjs5qCL/5uSGm2xty+UvbLor2ZJ/bfNShh fgXxiSJiCv7dSx4U2QlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyXGe-00GG2e-Lw; Fri, 25 Nov 2022 11:53:16 +0000 Received: from smtp1.axis.com ([195.60.68.17]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyXGa-00GG0r-Jw for linux-arm-kernel@lists.infradead.org; Fri, 25 Nov 2022 11:53:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1669377192; x=1700913192; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=crz04ig20tpvAmEbWeHvM10lzZnFghyvDj4EsoOeDhI=; b=EEnoPylpzVWOO7cWrNVme95lRN1AOoxdjgMvd0vdT/MWHcN+kVbPvXKH x+ZHqdo83elwR7IqZwZZAzsVYF0IJe5VBxLrlnqpH+yzRa8BHmc1NDiBg 5vjaL8pjOtJnzaTs/rDgEd0THUgLdcWcOeXFtYDuxxzz3ymySpviq9r7+ e8Gs72Yt8zdeQ3JjMiXTM2Xm4mHSj4ncy70dJzjpZyl2Hdj9ETv5aIyJw WJ2sSKfGJH9CZJphOFH6LTwd5/QSImxINrH6wWeqtydC0awvnMdOMves0 +G04YFmHBPHZKN7DeeNjUDzQTX1mhZlIvjOAiwslg7xCEAsPQgYXoU2zw A==; Date: Fri, 25 Nov 2022 12:53:10 +0100 From: Vincent Whitchurch To: Leo Yan , Arnaldo Carvalho de Melo CC: Hans-Peter Nilsson , , , John Garry , Will Deacon , Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Kim Phillips Subject: Re: [PATCH] perf arm64: Fix mksyscalltbl, don't lose syscalls due to sort -nu Message-ID: References: <20201228023941.E0DE2203B5@pchp3.se.axis.com> <20201229030933.GC28115@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201229030933.GC28115@leoy-ThinkPad-X240s> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221125_035312_993939_8D1EB31D X-CRM114-Status: GOOD ( 19.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Dec 29, 2020 at 11:09:33AM +0800, Leo Yan wrote: > On Mon, Dec 28, 2020 at 03:39:41AM +0100, Hans-Peter Nilsson wrote: > > When using "sort -nu", arm64 syscalls were lost. That is, the > > io_setup syscall (number 0) and all but one (typically > > ftruncate; 64) of the syscalls that are defined symbolically > > (like "#define __NR_ftruncate __NR3264_ftruncate") at the point > > where "sort" is applied. > > > > This creation-of-syscalls.c-scheme is, judging from comments, > > copy-pasted from powerpc, and worked there because at the time, > > its tools/arch/powerpc/include/uapi/asm/unistd.h had *literals*, > > like "#define __NR_ftruncate 93". > > > > With sort being numeric and the non-numeric key effectively > > evaluating to 0, the sort option "-u" means these "duplicates" > > are removed. There's no need to remove syscall lines with > > duplicate numbers for arm64 because there are none, so let's fix > > that by just losing the "-u". Having the table numerically > > sorted on syscall-number for the rest of the syscalls looks > > nice, so keep the "-n". > > > > Signed-off-by: Hans-Peter Nilsson > > Very good catching! I tested this patch with the commands: > > $ cd $LINUX_KERN > $ tools/perf/arch/arm64/entry/syscalls/mksyscalltbl \ > $ARM64_TOOLCHAIN_PATH/aarch64-linux-gnu-gcc \ > gcc tools tools/include/uapi/asm-generic/unistd.h > > It gives out complete syscall tables: > > $ diff /tmp/mksyscall_before.txt /tmp/mksyscall_after.txt > 1a2,4 > > [223] = "fadvise64", > > [25] = "fcntl", > > [44] = "fstatfs", > 2a6,11 > > [0] = "io_setup", > > [62] = "lseek", > > [222] = "mmap", > > [71] = "sendfile", > > [43] = "statfs", > > [45] = "truncate", > > Rather than dropping option "-u" for sort command, I googled and read > the manual of "sort", but cannot find other better method. So this > patch looks good for me: > > Reviewed-by: Leo Yan > Tested-by: Leo Yan It looks like this patch was never applied? AFAICS it is still needed on current HEAD and it still applies cleanly. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel