Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10367903rwb; Fri, 25 Nov 2022 04:06:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf7NVbBIkkio6yrNBsY6p+SudRYxVvS7mMxBRE10j78KlsKPEi5afLfwus4ztusQkFla3sOt X-Received: by 2002:a17:906:1953:b0:7a2:36c7:31eb with SMTP id b19-20020a170906195300b007a236c731ebmr30291246eje.491.1669377995070; Fri, 25 Nov 2022 04:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669377995; cv=none; d=google.com; s=arc-20160816; b=WEBiqxn69pw3W9aj4zEv4yzAoWWt2O2+qMOyFo5Wb+tHGnmJ7tJ5/UiroC5hEYzAF4 BgC64Yi6+0B0TjodDp3WRNuQXkBoAAgblroyiW/jLJVUrE3wKRpuzN3LOOGZcvDNQnLs wZCkb/iZA/XHx4FR6/btWOhcgleHk26Yy73Z/cM4GNIEcKm21ss4UOioZ2CQjL4XA6+1 iwlTQTpQ1QdaUr2/mC/7XB1lsUnBkffV/npKRq49l7Qwj3Kqh8KQCHDyw+RETevb/9EO 1HA6Z8L1I5VvI0SOogLydoncC74I4fjBbl5/eDLDQPz3CJlBMNl8ShOykgEqNtNzPNAA TWbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=crz04ig20tpvAmEbWeHvM10lzZnFghyvDj4EsoOeDhI=; b=Vhs7T+4QiG9SRQb/xb9JumXp5cKWPXB2uEQVrIbpZ15+ns2USOGxJyvbA9/qt7K0PD hMptaC2N/mAe6hfzebGtf5JiqtYi1URtJfKJS/Z2ZuFMJsnj+YZqAkHBSlONLCPofOXL nvf0zY2CTFIH0ossY/yNMdaYwXGza/bB+8RJRXkYfoKvwKbeWZqAkYOGOuYx5qwofVdw mDp3q+/uTLLfCgUixv8xFq5a3uaJTk8oxZ2vQjBzfSr2a8GKIf9E8z+gsZw3eK83o2QW 6rI+xJlxOCa7riD7qFkXk9pvi0HMZhYrS0wrbpmZRs8NdhCM/X43CE0uCObCX5seqebW o/CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=EEnoPylp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020aa7d484000000b0046977e0b06dsi3052063edr.117.2022.11.25.04.06.13; Fri, 25 Nov 2022 04:06:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=EEnoPylp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229673AbiKYLxO (ORCPT + 86 others); Fri, 25 Nov 2022 06:53:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbiKYLxN (ORCPT ); Fri, 25 Nov 2022 06:53:13 -0500 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 366CA1A800 for ; Fri, 25 Nov 2022 03:53:12 -0800 (PST) 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-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20201229030933.GC28115@leoy-ThinkPad-X240s> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.