From patchwork Wed Nov 9 08:29:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 17396 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp217336wru; Wed, 9 Nov 2022 00:33:21 -0800 (PST) X-Google-Smtp-Source: AMsMyM77Kz31LHzEDJ4nklvDlXilsZsip/vH5/k+4Dqq8fdPckGAj9ALg5mCHf2ApjZN7cX0oVhm X-Received: by 2002:a17:902:ef4c:b0:186:6399:6b48 with SMTP id e12-20020a170902ef4c00b0018663996b48mr61734197plx.128.1667982801309; Wed, 09 Nov 2022 00:33:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667982801; cv=none; d=google.com; s=arc-20160816; b=bppgqyfsNakT5/IqTT/K/2BX//ZbAHPKxXpNdcGmJStVhsypWnYXdKl8kxsXGF6+qh V/1gJJ5KAdEyDKVi1WaneHYY8dOAaVHYdWT/Py/bl33XAgdwwwR9aI8GXbWVRTb6xinl BlBMuGv1iwCRAzcbusG3Ha6Sj3SiiDLRNDwtjmvf+X/75tXn7HJgkvAMRH+u3q1xQbmZ GHlDsZzrbt37vAR41Yd1NeZtHzC7HbZocN8NXkrhmvDZNCeiS6J5bZHgeqLHBn+0LvVg QxSSDofGv4Nr0+9xwmAO8N8a7yDhh/2TqOkw22QIco4oxkYebEQEIRtHmxk0MaOhyz9i Ajow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=rqjVWU//AmRZk3aGOcA5+uLiloJLcwnf4lhKaAGbhNE=; b=vo0WqGsHx+/BuDadc+jSAGT8WRaNUGETPC71e+GTIiaqD4t+p5aQbbt5YAtHNfaYz7 kqRz73m4/PvhhA5/08OOHUf39ay0d+56XjMyxcUuq6jr6fEo8SE0QHy5MggvLR4Kkxci IGkHJbXr/aEd4oPL/xGw6K+bGH32ncktBkEWws4fc1vBkAGlOQFb3D7Ox9wNEeQaI4bO GPq4U9LGI2Mqj9lqrZDkj1zAY95SDeMGU9hZmh5uwXczuYw0SDNr60+ClS9fh5bLutOg 3rdKCTlreGzWVSGRZQK2zgpD+wviyBgsdnaNjT+BpIJWRx6OCiSzPv61aXvOOi/ARR3l yuqg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ja18-20020a170902efd200b00186c9d17afbsi15238708plb.293.2022.11.09.00.33.08; Wed, 09 Nov 2022 00:33:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229829AbiKIIav (ORCPT + 99 others); Wed, 9 Nov 2022 03:30:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbiKIIaT (ORCPT ); Wed, 9 Nov 2022 03:30:19 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EA37422B04; Wed, 9 Nov 2022 00:29:19 -0800 (PST) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Dx_7fVZGtjdYEFAA--.16102S3; Wed, 09 Nov 2022 16:29:09 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxtuPTZGtjJnIPAA--.42697S3; Wed, 09 Nov 2022 16:29:08 +0800 (CST) From: Tiezhu Yang To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH v4 1/4] tools x86: Keep list sorted by number in unistd_{32,64}.h Date: Wed, 9 Nov 2022 16:29:04 +0800 Message-Id: <1667982547-22331-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1667982547-22331-1-git-send-email-yangtiezhu@loongson.cn> References: <1667982547-22331-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8BxtuPTZGtjJnIPAA--.42697S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7AFyxurWrZw4Utr1rXw1kZrb_yoW8uF4fpF ykCrWDta15KFWag34SyF18Gw17CFZ7ZrW8KFy5W3s5ZFySqw1xXr1xursxCryUXw4vya4U Xa1xZw47WasrXw7anT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bSxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l n4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6x ACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q6rW5McIj6I8E 87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxV Aaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxY O2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGV WUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_ Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rV WUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4U JbIYCTnIWIevJa73UjIFyTuYvjxU4Xo7DUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749006733582526643?= X-GMAIL-MSGID: =?utf-8?q?1749006733582526643?= It is better to keep list sorted by number in unistd_{32,64}.h, so that we can add more syscall number to a proper position. This is preparation for later patch, no functionality change. Signed-off-by: Tiezhu Yang --- tools/arch/x86/include/uapi/asm/unistd_32.h | 16 ++++++++-------- tools/arch/x86/include/uapi/asm/unistd_64.h | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/arch/x86/include/uapi/asm/unistd_32.h b/tools/arch/x86/include/uapi/asm/unistd_32.h index 60a89db..e1cc62d 100644 --- a/tools/arch/x86/include/uapi/asm/unistd_32.h +++ b/tools/arch/x86/include/uapi/asm/unistd_32.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __NR_perf_event_open -# define __NR_perf_event_open 336 +#ifndef __NR_gettid +#define __NR_gettid 224 #endif #ifndef __NR_futex -# define __NR_futex 240 -#endif -#ifndef __NR_gettid -# define __NR_gettid 224 +#define __NR_futex 240 #endif #ifndef __NR_getcpu -# define __NR_getcpu 318 +#define __NR_getcpu 318 +#endif +#ifndef __NR_perf_event_open +#define __NR_perf_event_open 336 #endif #ifndef __NR_setns -# define __NR_setns 346 +#define __NR_setns 346 #endif diff --git a/tools/arch/x86/include/uapi/asm/unistd_64.h b/tools/arch/x86/include/uapi/asm/unistd_64.h index cb52a3a..ce8b7ab 100644 --- a/tools/arch/x86/include/uapi/asm/unistd_64.h +++ b/tools/arch/x86/include/uapi/asm/unistd_64.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __NR_perf_event_open -# define __NR_perf_event_open 298 +#ifndef __NR_gettid +#define __NR_gettid 186 #endif #ifndef __NR_futex -# define __NR_futex 202 -#endif -#ifndef __NR_gettid -# define __NR_gettid 186 +#define __NR_futex 202 #endif -#ifndef __NR_getcpu -# define __NR_getcpu 309 +#ifndef __NR_perf_event_open +#define __NR_perf_event_open 298 #endif #ifndef __NR_setns #define __NR_setns 308 #endif +#ifndef __NR_getcpu +#define __NR_getcpu 309 +#endif