Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp949789rdb; Sat, 7 Oct 2023 05:58:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHRD35j9ekaQuBcvO2fTk2/xHyqAN1FXujSW00pt4XgF3jhQEQ7ZSaIQJSs6dqPZjj3ja7 X-Received: by 2002:a05:6a20:1612:b0:149:9b2f:a79d with SMTP id l18-20020a056a20161200b001499b2fa79dmr12441924pzj.6.1696683528048; Sat, 07 Oct 2023 05:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696683527; cv=none; d=google.com; s=arc-20160816; b=ROeIs88gZjxkoRIHHJI+xeYQYTt/IG6nGk6N+/16j4k0ZoOJYYP7CWr7hkCyNY+7gs vvLRkBfyPPUHZbI3hcj8UJIqiPH2OuMv/CyBHj9AMA+d7iRDCJwMTpm4OAqzKB9rN5N/ cMhCHNiG4wGvarhr5NPFnnzqVsL2vyNQpbY9IV/iMQArubYgtIShKfqaNnFUR7i75pnt Hwa8KNDa0MJnCdBaiLTmqizNiXwm5NsHJcZZM023kqCfIKzbgE6WiLO42m5b3ATb1oo/ cg9fM6hQnDZMb8gooiOfP73ZUp6gnZhqoNPCfK6sCU77WnV+f4QBAb/lEJ3TjSujlc+Z gVwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=DXr24be7roZ72kjPQl+SscLCuxkpip1rR4IUDQbeVb0=; fh=x8PWLvxdcUoplnIYfy3QIRNQqpH6wW84TeJufCy6Cfs=; b=Kp1xm9ocU3AcxDGZQED/FWz8Lx+f+3TfWXrkSAjNTIbhfgmaXYvez3GP6+wpH1RKv1 URM/8Q85poDUg2eU9vDbTU14mVTnS3a2a6LKdHWtgS0OMyQx5oTvh9pTw0Mw4NIhvzdH dU/2QLpUI8C355i9N0lqg1zrTYhM7fYrWFq9O4lgDML1OkRzaBasVzcqtx7KgL0jgyZh Kk5TH09p65kCrA6ovk2oSDBJKDxxL+z7BZjRgv2/HbGzoFdBMYc3YnYX0u1NZQ1fPcj9 DDUlUHkDzCpCTZA+uEgpYy6kn5KjN0A/NU6VszNY81ubCX2ZozeDlvgBUUjUifdQiqWJ 5NUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id u23-20020a056a00099700b0069339f19f93si3624626pfg.277.2023.10.07.05.58.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 05:58:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 24CB280320FD; Sat, 7 Oct 2023 05:58:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343904AbjJGM6h (ORCPT + 99 others); Sat, 7 Oct 2023 08:58:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343748AbjJGM6g (ORCPT ); Sat, 7 Oct 2023 08:58:36 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8B0FAB; Sat, 7 Oct 2023 05:58:32 -0700 (PDT) X-QQ-mid: bizesmtp62t1696683499toxoeh80 Received: from linux-lab-host.localdomain ( [116.30.131.235]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 07 Oct 2023 20:58:18 +0800 (CST) X-QQ-SSF: 01200000000000E0Y000000A0000000 X-QQ-FEAT: znfcQSa1hKZVfh9GrD3uNMtHNu/dw/83w4TCDC4x6Jkd6m4RFK30wwv2HWQDi KugXEjBTPsuU63pTKX6kpwf6tCMey5OtbXURMx/GfECLbAQJOHnY1olUoKfE2C0DhXXEGUK 7vkArlwgpGMvr3PmudYOTzGZUCDAnWzB2lBm/xMADqA0KzWwZ7wW94nePe3r8/ozUgWH+x0 QeskCUegNlNShOPcCSC/oa6tLrv+mOGQa+JFUsTRHgVVh35NIdfmeXMmYpDS3x12S1KqH6g YQtzglvBMd/L1n8DnnFJbiyCecymNKTV74C1HIanc52TVIGytRS/+51gao0723AL6cZSL8Y UHsmO2K0qCEQWFiuxIuaZLs4owMb1IpjNmYwTBPO1wKxjIMVXI= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 4895001494971990047 From: Zhangjin Wu To: arnd@arndb.de Cc: falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, tim.bird@sony.com, tanyuan@tinylab.org Subject: Re: [PATCH v1 4/7] DCE/DSE: mips: add HAVE_TRIM_UNUSED_SYSCALLS support Date: Sat, 7 Oct 2023 20:58:17 +0800 Message-Id: <20231007125817.5259-1-falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <862f42d7-b582-4d88-a9d2-f72ea5bfe903@app.fastmail.com> References: <862f42d7-b582-4d88-a9d2-f72ea5bfe903@app.fastmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Sat, 07 Oct 2023 05:58:45 -0700 (PDT) Hi, Arnd > 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. > Agree very much, then we can simply touch the common files, no need to touch the arch specific files. > I should be able to help out with that part. > Thanks, is it enough to touch these ones? $ ls scripts/syscall* scripts/syscallhdr.sh scripts/syscallnr.sh scripts/syscalltbl.sh One question here is that is it possible or required to share the used syscalls selection code among them? Another question require your help is the compat part, the compat stuff makes things harder (include the Kconfig symbol interface definition and select logic), perhaps we can simply limit our first DSE version under !COMPAT? Best regards, Zhangjin > Arnd