From nobody Mon Feb 9 08:29:11 2026 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B768B21CFE0 for ; Sun, 25 Jan 2026 16:41:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769359315; cv=none; b=hc6t9R8e8A15byTDWtOV7MrdY5KN2hCHAD50Sw+tlmxI/4ZoWWtC3fdt8YjOdmpkdOfggmaOF690h6tpko8bM1ZfiYHO4gO6xl3oSNcGFD9z3Q+Far/TkJDIczMqrlZu2nJn5DAPyeYctkR3gjYiBwRg0rI101cSm392Am1pZNc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769359315; c=relaxed/simple; bh=PgCJNsaYFvGErhUFpeBHCaekgs3UfD+s3YHnAVFY5co=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EfrzwuuXGRA5iTadvyBX0texBhjpujVx2tj57X7Rz6o3rIy6sPdkkB/9nWb3w16to2aiV+C32aUa7rZV+shgUO7O7S5QwtRvWgIqOZcx9OkjKU0ELlSO9pk7MXKVxf92DmP9Snf4dTY9ItfzZVa3ypFChIA87Ib6rTFfb2wFVH4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aV2np9Cz; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aV2np9Cz" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2a09a3bd9c5so28578865ad.3 for ; Sun, 25 Jan 2026 08:41:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769359313; x=1769964113; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1ZxocYBmRzY7JkVMi8gSJcmXEwv7uEau4/9ve17+UI4=; b=aV2np9CzRGdBApJAH0rBeNMxsT8jzPtUWW80ES/QXR93GSPyphY/q+mNvyeZg5clo/ Hhr/QoJb2q9GYDf25ltmbo7gO6JN30RBb+plzdkRsKNbDXNmWHVxdYNLbWMos8xu2dWu K+qYXMwJX6QIv/rMT/tOJaIYWODCUetWsB0y66kuNDoLByVBuON4ReiiyKHDs1zzSsYA PL7E5tQGxZxK253fdfjAXX4aPqfAkaC/wHGKrSXeCsFPOHOD+W7mFSrO8OgAqpT2PZoY SRml3lMnzJ532rOgQKqN8cxi8XRYAIK9h0AmqhzoGnJWLdGr96+t2KdjijEZnDHRMbme YU6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769359313; x=1769964113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=1ZxocYBmRzY7JkVMi8gSJcmXEwv7uEau4/9ve17+UI4=; b=qTjMnRm+cdIAzh9pT1HSqCuKVX22IpqEsmEErabu9ZL6e0867e/ImqeFGOkp7UHQcy aQpbXwYjkPVTcY8W2bZPbEegkj8JKpmd5EFLfyQlPK6PDqvnlmF+caW7BxClKujEHDfO mijAT1Nadj3oggl6nLQRgryqRTE0qSlb13/j/2aM9KbDG5vvVqUpm7OUpdEZAFlJqPL/ N5FeqW2VIsCsOsw/2Iy1dDGkkG48dTmNKz9VwIOjhSCfYEGWZWjPv/rB4DYb4VmetnVJ rMhNApN1vtiFVaxq3Ea7KBxWZABl6NUZQv9eULPxvpd37f1kWOR4mQuc3u/J8Yt6AfDX oZIw== X-Forwarded-Encrypted: i=1; AJvYcCU2whq4l1Us4XuvywrtaJAjqWsFEoSJshJDantamo4kw6xgrfpTvkLKAdWeB9ejaWfLUjCaJvDFW8LAoJk=@vger.kernel.org X-Gm-Message-State: AOJu0YzYP6qoxiXGGm9uynfZS42rvzltR7ZEQh4AQ73eFlrmfMxIccT6 j5WrTqSaNipae7HjJTX/MBbec/Pd1Idy7cnDasi8IOrQc5xy5JXRv2E9 X-Gm-Gg: AZuq6aKNf+DuTY8qNBjbD28idiVot9PKWFHGLzNZxiPC9SEEJNuUX5lnIr/1Ogz94FV EFdekPSgxKsQRfJzwp/FPH48QbsIrDREBf4dmbrnGTn6JzlBQqp+gkba5XLfGQvAE6mb/Q8mcFG xs/Gv2yZlSmpIzUdcvDtjfMoC8/eMMfR5mX8+eCpdqMFhXyl516YTL/Yc4puO1W1s1U5+GGjFIM Tl19vENKZiSy5kc22iFAPxOkaUBG5fXZeObtqdqHvxMIUwAAMtgqItCpde7NtqJvtgLe91Xazty LBc+FClMCEgypDUYdbOsUdWTlyD6NiigThDWo3s/Kcq9cb8s20BZpb0wk9EipluIG4bSk6D9u9i UuuXhA/cMc5/Ing83NN2a9uDbRgMKtBwrQv79e/3oFyfNaZSMrrKlcwN5r4HURGZwkElcOg/SEe TNsQBSE7EnKP2V18ZHiJytu/k7zgYOd5o= X-Received: by 2002:a17:902:e841:b0:2a7:8088:371a with SMTP id d9443c01a7336-2a845312f80mr19771165ad.35.1769359312856; Sun, 25 Jan 2026 08:41:52 -0800 (PST) Received: from DESKTOP-3LEPQG8.localdomain ([119.28.20.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802f97667sm70633225ad.56.2026.01.25.08.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jan 2026 08:41:52 -0800 (PST) From: Xie Yuanbin To: linux@armlinux.org.uk, johannes@sipsolutions.net, masahiroy@kernel.org, jgross@suse.com, nsc@kernel.org, kees@kernel.org, tglx@kernel.org, mingo@kernel.org, frederic@kernel.org, paulmck@kernel.org, peterz@infradead.org, mathieu.desnoyers@efficios.com, luto@kernel.org, edumazet@google.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Xie Yuanbin Subject: [PATCH 8/9] ARM: entry: use enter_from_user_mode() instead of user_exit_callable() Date: Mon, 26 Jan 2026 00:40:15 +0800 Message-ID: <20260125164016.331257-9-qq570070308@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260125164016.331257-1-qq570070308@gmail.com> References: <20260125164016.331257-1-qq570070308@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" According to user_exit_callable()'s comment, the function is obsolete. Use enter_from_user_mode() instead of user_exit_callable() to pair with the calling of exit_to_user_mode() at returning to user. Since enter_from_user_mode() is a inline function, add arm_enter_from_user_mode() to call enter_from_user_mode(), thereby replacing user_exit_callable() and trace_hardirqs_off(). Signed-off-by: Xie Yuanbin --- arch/arm/include/asm/entry-common.h | 3 +++ arch/arm/kernel/entry-armv.S | 7 +------ arch/arm/kernel/entry-common.S | 6 ++---- arch/arm/kernel/entry.c | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/arch/arm/include/asm/entry-common.h b/arch/arm/include/asm/ent= ry-common.h index d34c80d4b32b..0158a671d4fc 100644 --- a/arch/arm/include/asm/entry-common.h +++ b/arch/arm/include/asm/entry-common.h @@ -2,6 +2,9 @@ #ifndef ARCH_ARM_ENTRY_COMMON_H #define ARCH_ARM_ENTRY_COMMON_H =20 +asmlinkage __section(".entry.text") +void arm_enter_from_user_mode(void); + asmlinkage __section(".entry.text") void arm_exit_to_user_mode_no_work_pending(void); =20 diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 7f8781666a44..083782ef8180 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -403,12 +403,7 @@ ENDPROC(__fiq_abt) zero_fp =20 .if \trace -#ifdef CONFIG_TRACE_IRQFLAGS - bl trace_hardirqs_off -#endif -#ifdef CONFIG_CONTEXT_TRACKING_USER - bl user_exit_callable -#endif + bl arm_enter_from_user_mode .endif .endm =20 diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 108b77e2b405..0556d01ef55b 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -181,10 +181,8 @@ ENTRY(vector_swi) zero_fp alignment_trap r10, ip, cr_alignment asm_trace_hardirqs_on save=3D0 - enable_irq_notrace -#ifdef CONFIG_CONTEXT_TRACKING_USER - bl user_exit_callable -#endif + bl arm_enter_from_user_mode + enable_irq save=3D0 =20 /* * Get the system call number. diff --git a/arch/arm/kernel/entry.c b/arch/arm/kernel/entry.c index 85df47b5c359..0438e1b7a704 100644 --- a/arch/arm/kernel/entry.c +++ b/arch/arm/kernel/entry.c @@ -5,6 +5,20 @@ #include #include =20 +/* + * arm_enter_from_user_mode - Establish state when coming from user mode + * + * The calling code satisfies (arch_irqs_disabled() && lockdep_hardirqs_en= abled()). + * When the function returns, the state satisfies (arch_irqs_disabled() && + * !lockdep_hardirqs_enabled()). + */ +asmlinkage __section(".entry.text") +void arm_enter_from_user_mode(void) +{ + /* arm32 not uses pt_regs now */ + enter_from_user_mode(NULL); +} + /* * arm_exit_to_user_mode_no_work_pending - Fixup state when exiting to use= r mode * --=20 2.51.0