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 A0CAAC43602 for ; Mon, 29 Jun 2026 13:08:32 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4gpmm23PdZz309y; Mon, 29 Jun 2026 23:07:46 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=113.46.200.224 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1782738466; cv=none; b=GD9yZXZ+e55mmQF9i4/E36rbPUR89tEI2E8nYZ5dDDjqc7A4sW53goHHiIJH2al8km/gLVpciM44eTkHMhzTDAxK1L1Znwubc2w6DxhsuSXMXk7ZO2Lc9zerQjjjReOdtWAursY+7UmIly7gj6zHtlVIlWGGeFhs0ryb7Oy3gRMD6g7RAyOMsKCnMP6G1SB/8NUvi3cA8o3zh60jznzlF6ILHwDJtVZhQ1g27vTKIKY/SZq1VebZSq3skOJScOyjk7c0tcyqajr8WNqUAlattDMUN4R/iU65r57DieHI271b6MRCwQRbFbFuRpRWfg9811/As+w0fIPdFx3JJ7UjRQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1782738466; c=relaxed/relaxed; bh=KbCpjFZF6greSjBN49CIhy259uMcOGgcGwhOlbQVct8=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BXW7/u5o/jLusSGNSnfg41RwQRpfUcIindCmq8U50qmpS0S8HDOlahLUKi78ymNtaYJ81Kb/FTr07AvY8TJQTEQkKv4TAlu7RappOUTrMvuoBs/esEsi8f5DR3nf79iMckm9RbzrpUI0kqIxMyHN8x8fC9MK6ty8qnr6PWjG+XNXhargpHVBnVFlV71Ei23wiUEn5HXqw0KxtxZyV+clUT8qLOeZ71iSRiRJWASv/XFtfen5bpzHou/WYhx6FfJ2tPzYby0y3UDrwVK3RpxnPyd0afxtIfLYFtc3BUI9WPgPYL9p+ezshtpk/CUN3wroRUm/buyPus9IJXwlWe1O5A== 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=rEU9ZwrN; dkim-atps=neutral; spf=pass (client-ip=113.46.200.224; helo=canpmsgout09.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=rEU9ZwrN; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=huawei.com (client-ip=113.46.200.224; helo=canpmsgout09.his.huawei.com; envelope-from=ruanjinjie@huawei.com; receiver=lists.ozlabs.org) Received: from canpmsgout09.his.huawei.com (canpmsgout09.his.huawei.com [113.46.200.224]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4gpmm14MYzz30Fm for ; Mon, 29 Jun 2026 23:07:45 +1000 (AEST) dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=KbCpjFZF6greSjBN49CIhy259uMcOGgcGwhOlbQVct8=; b=rEU9ZwrNTUHPPgTu1tePw2vP4nYtQBZo5Qm4Vtevq+N9IfFkvW8HvPX7ogKbzu0wMOOY1x9ko HxJl+IvMii9vzmWoQM/mHLlSm4aN6qWgjuxRfEcPJDUsWXwQAKYXmSQ2v9drGHZOx/KuvkLzylE ww3TwdXayptVRzczxsKwNvI= Received: from mail.maildlp.com (unknown [172.19.163.127]) by canpmsgout09.his.huawei.com (SkyGuard) with ESMTPS id 4gpmYF4C9qz1cySh; Mon, 29 Jun 2026 20:58:25 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id AAE4040572; Mon, 29 Jun 2026 21:07:32 +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; Mon, 29 Jun 2026 21:07:28 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v16 13/18] arm64: syscall: Simplify el0_svc_common() syscall exit path Date: Mon, 29 Jun 2026 21:06:11 +0800 Message-ID: <20260629130616.642022-14-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260629130616.642022-1-ruanjinjie@huawei.com> References: <20260629130616.642022-1-ruanjinjie@huawei.com> 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To dggpemf500011.china.huawei.com (7.185.36.131) Remove the redundant nested conditional check within the system call exit path of el0_svc_common() to streamline the exit sequence. When entering this fast-path block, CONFIG_DEBUG_RSEQ is guaranteed to be disabled. Under this constraint, the code logic inside the block becomes completely identical to the evaluation performed within syscall_exit_to_user_mode_work(). Therefore, invoking the inline helper directly achieves full logical equivalence while eliminating duplicate code nesting. No functional changes. Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: Ada Couprie Diaz Signed-off-by: Jinjie Ruan --- arch/arm64/kernel/syscall.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm64/kernel/syscall.c b/arch/arm64/kernel/syscall.c index 5dd94bece929..74308b6df43b 100644 --- a/arch/arm64/kernel/syscall.c +++ b/arch/arm64/kernel/syscall.c @@ -121,9 +121,7 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr, * exit regardless, as the old entry assembly did. */ if (!(unlikely(flags & _TIF_SYSCALL_WORK)) && !IS_ENABLED(CONFIG_DEBUG_RSEQ)) { - flags = read_thread_flags(); - if (unlikely(flags & _TIF_SYSCALL_EXIT_WORK) || flags & _TIF_SINGLESTEP) - syscall_exit_to_user_mode_work(regs); + syscall_exit_to_user_mode_work(regs); return; } -- 2.34.1