Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2106186rdh; Tue, 26 Sep 2023 12:35:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFD26Jy+bZZXB2DfhG1wINw4lFzJ+Qhv/zdfHj9x4P9Y5UoTNKlMPY2JFUvk31zJxsLS38G X-Received: by 2002:a05:6a00:c8d:b0:68a:5cf8:dac5 with SMTP id a13-20020a056a000c8d00b0068a5cf8dac5mr13532586pfv.22.1695756959378; Tue, 26 Sep 2023 12:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695756959; cv=none; d=google.com; s=arc-20160816; b=s3veCyZZcpslszVkXaf351yrxnGwXwRuSPorb7+Is2I48afJUPmZYmk5FJhVLflwhg hvpmVkePh4mTizlGzAyYyp48v9Ugp/842TK/SX/Zc9X+52NEJi/aYX27bcatXIFpkDDo MB9YivoX42wpvU06Qo4doUDG2LDRYMaWy8Choh3mu+rhgiUtbqbZQaBwqVzXHt3Uxq+h b8YHpAPlIC0AEuyQkAe92msA6tyGKpTN+SPlDJAutCNfR+Re65EWmtzmtbEX6LLDbiXp Igq4yl4ohFQr0bR0QCIL8CZFNBvKYDJ4N4/5jbSm0TAcHPu0yRPJDstefFAUx+qvrQSZ H9nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=xZ//d5rAxIyL4DIO25l3Kqx9snAaHxvzdTIm60dV7fo=; fh=XcrYWQqgFO9lMX5UPhjKG6RtZGi+qRh5R0fNAjjR6H8=; b=jiMJgW2KjRr5YbWZk0cTnTJMq0Zjla58GXHM8+Gf7cuId39chR2h2pXGxZFLw00fZW HvNSORxSMit/nZbIR5x5ds757bsplKUthZnBlXqNXP5rJRgZK2yWEc82Cykr8YK0h0tw 9SaOi/JcQ84s5Du0XNiXiqSBClIN6x/ROLnpA2WV3hve42SSJQed3ge3SUu4myr2SDco VTJqyjFn7x06C4Ot4oW3fBkVu2zFUieWp93f8pLZLNwDhmmTZcF6klfefbMXlLWFk+Xv HrZjLubxaLG6LVylG+06yTSpIIZSkRyrW1Mmu4wqzEZ8n3MfBIQKr75YEfWNqvbe5NjJ gwOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=k8GgK8b8; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=VGOMi6Hn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id 1-20020a630101000000b005652a295669si13170018pgb.490.2023.09.26.12.35.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 12:35:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=k8GgK8b8; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=VGOMi6Hn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id AF51D81ADD7E; Mon, 25 Sep 2023 23:08:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233739AbjIZGIL (ORCPT + 99 others); Tue, 26 Sep 2023 02:08:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233747AbjIZGIK (ORCPT ); Tue, 26 Sep 2023 02:08:10 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0544011D; Mon, 25 Sep 2023 23:08:03 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 85E0D32009F4; Tue, 26 Sep 2023 02:08:01 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Tue, 26 Sep 2023 02:08:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1695708481; x=1695794881; bh=xZ //d5rAxIyL4DIO25l3Kqx9snAaHxvzdTIm60dV7fo=; b=k8GgK8b8bdbMrxec14 vQF7AIOuOLxboNppmnLK9zaKi+d+Tp+yVgazv7sqFmNtdeP0aZyrlf2hB+9CyTyN Bxd1N65CUpF5BifXyNljwPU/YIJAYl8cEmqO9eW1ozNxx0StAkRpBJsp5R7EDOy3 FVDekivSaQOYc5qjMWOJe79cnfv+KEySWlJ094MwFD1fYe9AtFT419Le66TH3vJS E2y7cYRgaD/RvN205GxckZuiYZ2JTGRiYZnv6SDpII80yMXXkEajwtcKgKWWqzNK vVHTE/5+Hwj8R9Qe888Dc/etYdGyczVAvk9/uNGBSGFRgL7TlnhQMY6CCmKac5/q jxuQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1695708481; x=1695794881; bh=xZ//d5rAxIyL4 DIO25l3Kqx9snAaHxvzdTIm60dV7fo=; b=VGOMi6HnfP/cfR1kzW9zh1OSswSZv bKIiaa3E3Ar5x6E4b4QKSoqZ3FYSSs10iBjwp9sl7Wev0ChCekF3gGbCKH39kePz upTMKHZpcyO7pROwYUqN2j5eXZ7VWaj0rXuyvYr1v05qq/t0lTemD0UHnRkuxJh9 uVe35RrBngFSnrTeZABHHKjP186/bfOc+BkMg259YYIeS0tXnIUQYq3vrnNuvOjU xWGOM82HD7sKxUoq/sjU2AmF57UgMjwe0/Thfr3oYK/oY2jMU2QMJEl/MkDxG7bK RbNtqegmLQoDj5AN0MYPtS74aYSHrMUXTg2BrqK+w9eSGeRC/akkkuqUQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudelhedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B0DEBB60089; Tue, 26 Sep 2023 02:08:00 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-957-ga1ccdb4cff-fm-20230919.001-ga1ccdb4c MIME-Version: 1.0 Message-Id: <862f42d7-b582-4d88-a9d2-f72ea5bfe903@app.fastmail.com> In-Reply-To: <3042b32a13aecbf8f3c8bedee34a4ca8c7d7cb2e.1695679700.git.falcon@tinylab.org> References: <3042b32a13aecbf8f3c8bedee34a4ca8c7d7cb2e.1695679700.git.falcon@tinylab.org> Date: Tue, 26 Sep 2023 08:07:40 +0200 From: "Arnd Bergmann" To: "Zhangjin Wu" , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org Cc: "Palmer Dabbelt" , "Paul Walmsley" , paulburton@kernel.org, "Paul E. McKenney" , "Thomas Bogendoerfer" , "Willy Tarreau" , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , "Tim Bird" Subject: Re: [PATCH v1 4/7] DCE/DSE: mips: add HAVE_TRIM_UNUSED_SYSCALLS support Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 25 Sep 2023 23:08:13 -0700 (PDT) On Tue, Sep 26, 2023, at 00:40, Zhangjin Wu wrote: > For HAVE_TRIM_UNUSED_SYSCALLS, the syscall tables are hacked with the > input used syscalls. > > Based on the used syscalls information, a new version of tbl file is > generated from the original tbl file and named with a 'used' suffix. > > With this new tbl file, both unistd_nr_*.h and syscall_table_*.h files > are updated to only include the used syscalls. > > $ grep _Linux_syscalls -ur arch/mips/include/generated/asm/ > arch/mips/include/generated/asm/unistd_nr_n64.h:#define > __NR_64_Linux_syscalls 165 > arch/mips/include/generated/asm/unistd_nr_n32.h:#define > __NR_N32_Linux_syscalls 165 > arch/mips/include/generated/asm/unistd_nr_o32.h:#define > __NR_O32_Linux_syscalls 89 > > $ grep -vr sys_ni_syscall > arch/mips/include/generated/asm/syscall_table_*.h > arch/mips/include/generated/asm/syscall_table_n32.h:__SYSCALL(58, > sys_exit) > arch/mips/include/generated/asm/syscall_table_n32.h:__SYSCALL(164, > sys_reboot) > arch/mips/include/generated/asm/syscall_table_n64.h:__SYSCALL(58, > sys_exit) My feeling is that instead of postprocessing the generated files, it would be much better to make the elimination part of the existing infrastructure that generates the files from syscall.tbl, and finally change the include/asm-generic/unistd.h to the same format, as we had planned for a long time. I should be able to help out with that part. Arnd