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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B409DE8782D for ; Tue, 3 Feb 2026 13:37:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dTV0Oa/cOQqWwINmH2VGeDsRDI5Mdh3dGyGmVrTzyNQ=; b=cK+9qP5ikIw3KzsmgE2sUfIBDr zuZaHVu6jm3ZKG03UqCGDNEoTyNGA5eyK+kGG7Fe9iLH4ts9lWdQUBg5nTSEeZmnoaxxQgeDgcwIT aBr/SITrz8F15k810vo06GOJdTBB5UcCjmpoylzH2FKkpHmfoYvbyxdgjPivvZ+pgtPRBglpCHGId CSPbjxAq7hNYRqVU8ECF+aZbXZPf21+VILKBzAgur/sILHCdWMvZi/eDj+8M3n+pRNXLMoe2DlPJf 0N7KOQ5HqQSZscUsCGrE1wdRLDujKfYKdwXUdYUrBIjk8fvpjW0c+eI5IP0DS5a9Y/iDGm2KLXKvq RUDcV/Lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vnGb0-00000006gGe-1Nck; Tue, 03 Feb 2026 13:37:34 +0000 Received: from canpmsgout06.his.huawei.com ([113.46.200.221]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vnGax-00000006g7G-239T for linux-arm-kernel@lists.infradead.org; Tue, 03 Feb 2026 13:37:32 +0000 dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=dTV0Oa/cOQqWwINmH2VGeDsRDI5Mdh3dGyGmVrTzyNQ=; b=IO8W6G9rg+l07dq3t/hBC0kwwpklTbYZGPSK5Mgntj+BWTZFmxjGRTmr0nYrMb8KkyZjqBv3p /SmBqUEkqXZM0faM20MK0Mad4XcwL9jiNFyEPcRXRzKX/TvwXoZ4QOqj3Z/Ve3EEpUrVC3vI+Ro /7Kwy13s7EuXA5XBjgYDZbA= Received: from mail.maildlp.com (unknown [172.19.163.104]) by canpmsgout06.his.huawei.com (SkyGuard) with ESMTPS id 4f54DN0llQzRhSv; Tue, 3 Feb 2026 21:32:52 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id 40EEA4056A; Tue, 3 Feb 2026 21:37:25 +0800 (CST) Received: from huawei.com (10.90.53.73) 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; Tue, 3 Feb 2026 21:37:23 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Subject: [PATCH v12 12/13] arm64: Inline el0_svc_common() Date: Tue, 3 Feb 2026 21:37:27 +0800 Message-ID: <20260203133728.848283-13-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260203133728.848283-1-ruanjinjie@huawei.com> References: <20260203133728.848283-1-ruanjinjie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: kwepems200002.china.huawei.com (7.221.188.68) To dggpemf500011.china.huawei.com (7.185.36.131) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260203_053731_707671_908650B0 X-CRM114-Status: GOOD ( 10.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org After switch arm64 to Generic Entry, the compiler no longer inlines el0_svc_common() into do_el0_svc(). So inline el0_svc_common() and it has 1% performance uplift on perf bench basic syscall on kunpeng920 as below which is based on v6.19-rc1. | Metric | W/O this patch | With this patch | Change | | ---------- | -------------- | --------------- | --------- | | Total time | 2.195 [sec] | 2.171 [sec] | ↓1.1% | | usecs/op | 0.219575 | 0.217192 | ↓1.1% | | ops/sec | 4,554,260 | 4,604,225 | ↑1.1% | Reviewed-by: Kevin Brodsky Signed-off-by: Jinjie Ruan --- arch/arm64/kernel/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c index 77d00a5cf0e9..6fcd97c46716 100644 --- a/arch/arm64/kernel/syscall.c +++ b/arch/arm64/kernel/syscall.c @@ -66,8 +66,8 @@ static void invoke_syscall(struct pt_regs *regs, unsigned int scno, choose_random_kstack_offset(get_random_u16()); } -static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr, - const syscall_fn_t syscall_table[]) +static __always_inline void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr, + const syscall_fn_t syscall_table[]) { unsigned long work = READ_ONCE(current_thread_info()->syscall_work); unsigned long flags = read_thread_flags(); -- 2.34.1