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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 7105CC43458 for ; Thu, 9 Jul 2026 01:48:09 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4gwdCC5gFkz3cDk; Thu, 09 Jul 2026 11:48:07 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=113.46.200.219 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1783561687; cv=none; b=IhaTYP417T3S+Q77IBuII19J7pjKL9OPU5MDUVKM6CpsTlSnqoopwDqc4Iptxf2MuuIkAxFzZ2T3b40MJvp94W+NdSvOktKjAsgIciUi/wPGSjBjWI348ElFPhSgCq4fBiFZ8gKNvz0d3heYSQf08EduChZQ/Ar5RE2xklWQLZbAZoZHHOk/DoEGWBpsAOJdtMs1XtPyUMAQ0yC13JCKwSBEYMoRBnpDC4QeM3a0tm8XfQy9ToBhDfyOMWbU4tmE1qmrWSF2PuguF4nQAdxgkrO9zUqhJgynzsd6WWUaVmcF5YYOMP9BM4lWOMxHSCdnPf4twL4iKgzylMH3qfxzRw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1783561687; c=relaxed/relaxed; bh=lJ2lsOw1A2mFoTW+4rB/gWuEpAa+RS/uQCfSDrk5Vco=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Qx3iMkugiPYkaYl5K+GFlxBzKnltTeWpF/L4fzROkgJ9fFkxwuKcvnGSzK1Zi7bgW6S7L33EAA0+a9r2Q3d2Yd938Y7NGrFfdKkUt58k2zS+PQciAk4puMDfXWNFPiPgjRFT1ZsuzLjXMaXfVMQbUi1U7Ox2H9eRfm35cw2g2pYdeBMRVUge6BF+197I1Vnv5uct/iKvJjQpIbizsi9gYy+K36/npD/8ApOx/eIBQvWjlN5DkmFqXqhoxD3K3k4Xk2ZhUt8gEr3h3eXBQgUjWMfQGRTd7sfzGthtuswzY7XXgqdrv8FTiB50hnos4nK5MhzslbsN2IBKMxz78ik+Rw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; dkim=pass (1024-bit key; unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=ksHjnD6U; dkim-atps=neutral; spf=pass (client-ip=113.46.200.219; helo=canpmsgout04.his.huawei.com; envelope-from=ruanjinjie@huawei.com; receiver=lists.ozlabs.org) smtp.mailfrom=huawei.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=ksHjnD6U; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=huawei.com (client-ip=113.46.200.219; helo=canpmsgout04.his.huawei.com; envelope-from=ruanjinjie@huawei.com; receiver=lists.ozlabs.org) Received: from canpmsgout04.his.huawei.com (canpmsgout04.his.huawei.com [113.46.200.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4gwdCB4YHJz3c9x for ; Thu, 09 Jul 2026 11:48:06 +1000 (AEST) dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=lJ2lsOw1A2mFoTW+4rB/gWuEpAa+RS/uQCfSDrk5Vco=; b=ksHjnD6U1596jfDaaEoW3GmT39cferO2kq33vFZ36Yq2mGGCmosfTYbLFn7fMP/UeeYaIntK6 p8XaNfppstNTJ0P0vOKbsKrpKmttUnZgBTyp4Laq98LfqAZZrRNzDaKqN/X7my4nhdn8YPnp+8c AalCZ4kXjnU31eOGZTBybVA= Received: from mail.maildlp.com (unknown [172.19.163.0]) by canpmsgout04.his.huawei.com (SkyGuard) with ESMTPS id 4gwd0M5Hszz1prKZ; Thu, 9 Jul 2026 09:38:43 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id 2BC2D40561; Thu, 9 Jul 2026 09:48:00 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by dggpemf500011.china.huawei.com (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 9 Jul 2026 09:47:57 +0800 Message-ID: <19433c47-94b3-46e1-8bd2-1a3f3139fe4e@huawei.com> Date: Thu, 9 Jul 2026 09:47:56 +0800 X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [patch 15/18] x86/entry: Make syscall functions static To: Thomas Gleixner , LKML CC: Peter Zijlstra , Michael Ellerman , Shrikanth Hegde , , Kees Cook , Huacai Chen , , Paul Walmsley , Palmer Dabbelt , , Sven Schnelle , , , Mark Rutland , Andy Lutomirski , Oleg Nesterov , Richard Henderson , Russell King , Catalin Marinas , Guo Ren , Geert Uytterhoeven , Thomas Bogendoerfer , Helge Deller , Yoshinori Sato , Richard Weinberger , Chris Zankel , , , , , , , , , Arnd Bergmann , Vineet Gupta , Will Deacon , Brian Cain , Michal Simek , Dinh Nguyen , "David S. Miller" , Andreas Larsson , , , , , , =?UTF-8?Q?Michal_Such=C3=A1nek?= , Jonathan Corbet , References: <20260707181957.433213175@kernel.org> <20260707190254.438361565@kernel.org> From: Jinjie Ruan In-Reply-To: <20260707190254.438361565@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.109.254] X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To dggpemf500011.china.huawei.com (7.185.36.131) On 7/8/2026 3:06 AM, Thomas Gleixner wrote: > They are only used in the respective source files. No point in exposing > them. > > Signed-off-by: Thomas Gleixner > --- > arch/x86/entry/syscall_32.c | 2 +- > arch/x86/entry/syscall_64.c | 10 ++++++---- > arch/x86/include/asm/syscall.h | 8 -------- > 3 files changed, 7 insertions(+), 13 deletions(-) > > --- a/arch/x86/entry/syscall_32.c > +++ b/arch/x86/entry/syscall_32.c > @@ -41,7 +41,7 @@ const sys_call_ptr_t sys_call_table[] = > #endif > > #define __SYSCALL(nr, sym) case nr: return __ia32_##sym(regs); > -long ia32_sys_call(const struct pt_regs *regs, unsigned int nr) > +static noinline long ia32_sys_call(const struct pt_regs *regs, unsigned int nr) > { > switch (nr) { > #include > --- a/arch/x86/entry/syscall_64.c > +++ b/arch/x86/entry/syscall_64.c > @@ -32,7 +32,7 @@ const sys_call_ptr_t sys_call_table[] = > #undef __SYSCALL > > #define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs); > -long x64_sys_call(const struct pt_regs *regs, unsigned int nr) > +static noinline long x64_sys_call(const struct pt_regs *regs, unsigned int nr) > { > switch (nr) { > #include > @@ -40,15 +40,17 @@ long x64_sys_call(const struct pt_regs * > } > } > > -#ifdef CONFIG_X86_X32_ABI > -long x32_sys_call(const struct pt_regs *regs, unsigned int nr) > +static noinline long x32_sys_call(const struct pt_regs *regs, unsigned int nr) > { > +#ifdef CONFIG_X86_X32_ABI > switch (nr) { > #include > default: return __x64_sys_ni_syscall(regs); > } > -} > +#else > + return -ENOSYS; > #endif > +} > > static __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr) > { > --- a/arch/x86/include/asm/syscall.h > +++ b/arch/x86/include/asm/syscall.h > @@ -21,14 +21,6 @@ typedef long (*sys_call_ptr_t)(const str > extern const sys_call_ptr_t sys_call_table[]; > > /* > - * These may not exist, but still put the prototypes in so we > - * can use IS_ENABLED(). > - */ > -extern long ia32_sys_call(const struct pt_regs *, unsigned int nr); > -extern long x32_sys_call(const struct pt_regs *, unsigned int nr); > -extern long x64_sys_call(const struct pt_regs *, unsigned int nr); > - Reviewed-by: Jinjie Ruan > -/* > * Only the low 32 bits of orig_ax are meaningful, so we return int. > * This importantly ignores the high bits on 64-bit, so comparisons > * sign-extend the low 32 bits. >