From nobody Mon Jun 15 05:20:29 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB22E35DA6F; Wed, 8 Apr 2026 10:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775643048; cv=none; b=cTDAUJWzZgbUH7ELTe4n6h/VCiDm9TwT+zIKJ6NDg/ejXzCdgZ61byc8e6GlI27ucJ66JqeBB59DIY5oUh1Rh8XaFTJuXQBtOsLGxA2Ba9cpsoHeA1F1qlfGkw0infRG3cy8yIbscVMCKwCMVdy8g6TKozwHBbfyziw46lnTlgs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775643048; c=relaxed/simple; bh=Pd5remvXd+3Jip8QF/cUluNJHKGpjJjz9E/LnAYYnS8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=dq1Lh7edIuyA1LiTdgbJE37n5z/4rZMOrIqEtP18A0ZbGBWBiSU3wH6fqRzAbONOUvNWE064EPEdgZjVlBfFzm+/Lbp2frf1TuNLj1tsIOQr8rDdFxUZD05sxBakiRR4r60hHCJIMIg38itxpPhtNQyMNLuLbjh30q3IzumQw0o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Usjujn/N; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UPhuiLnh; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Usjujn/N"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UPhuiLnh" Date: Wed, 08 Apr 2026 10:10:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775643040; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LVBwpJHQLMDTBOLUyqA+SJ3MX8mnpd84cJbZh6e4MNk=; b=Usjujn/NJnp8vOqoy7WpjRLgEJR2ZyAloe1eS+IDiPh9FKKDaVq+azLvYE11nVnbUAcYY9 CT4pqzET1nc32/zWDy82W1O3KGzFuSK6kpNBfDhB9FrOfs+Hmps2nIG6tlZJ7jblbQDGBk hJUxI2zVxJT3ckz+yIepiILtFn9rAtcOA8EGfioYmqXaV0iXrHMU8oFmjGEapGZGpM3/nG CbSqKVIDc3jiZIM4TSKVwRgrpE8F/2GPBa6VoQaiZiE1dS2OtJp7mHNndvZd4gCBCsvaAY MOeuCrS8j6SjCScaXBtR6p6QNxVdzVmg7J8aMPLvJ+fKiXsfFlOeh7h/kPV71Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775643040; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LVBwpJHQLMDTBOLUyqA+SJ3MX8mnpd84cJbZh6e4MNk=; b=UPhuiLnhydp4ldhXyuaFm2u296EVHfUHQRI+93C8KrnykaEisue2v2+iSiM7YQpef4XLlr x/l8VBz+17+ZjZDQ== From: "tip-bot2 for Mark Rutland" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/hrtick] entry: Remove local_irq_{enable,disable}_exit_to_user() Cc: Mark Rutland , Thomas Gleixner , Jinjie Ruan , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260407131650.3813777-3-mark.rutland@arm.com> References: <20260407131650.3813777-3-mark.rutland@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177564303881.801717.13537239930485870754.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/hrtick branch of tip: Commit-ID: 22f66e7ef4ce9414b4bd18abe50ead4a1284b01a Gitweb: https://git.kernel.org/tip/22f66e7ef4ce9414b4bd18abe50ead4a1= 284b01a Author: Mark Rutland AuthorDate: Tue, 07 Apr 2026 14:16:42 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 08 Apr 2026 11:43:31 +02:00 entry: Remove local_irq_{enable,disable}_exit_to_user() local_irq_enable_exit_to_user() and local_irq_disable_exit_to_user() are never overridden by architecture code, and are always equivalent to local_irq_enable() and local_irq_disable(). These functions were added on the assumption that arm64 would override them to manage 'DAIF' exception masking, as described by Thomas Gleixner in these threads: https://lore.kernel.org/all/20190919150809.340471236@linutronix.de/ https://lore.kernel.org/all/alpine.DEB.2.21.1910240119090.1852@nanos.tec.= linutronix.de/ In practice arm64 did not need to override either. Prior to moving to the generic irqentry code, arm64's management of DAIF was reworked in commit: 97d935faacde ("arm64: Unmask Debug + SError in do_notify_resume()") Since that commit, arm64 only masks interrupts during the 'prepare' step when returning to user mode, and masks other DAIF exceptions later. Within arm64_exit_to_user_mode(), the arm64 entry code is as follows: local_irq_disable(); exit_to_user_mode_prepare_legacy(regs); local_daif_mask(); mte_check_tfsr_exit(); exit_to_user_mode(); Remove the unnecessary local_irq_enable_exit_to_user() and local_irq_disable_exit_to_user() functions. Signed-off-by: Mark Rutland Signed-off-by: Thomas Gleixner Reviewed-by: Jinjie Ruan Acked-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260407131650.3813777-3-mark.rutland@arm.com --- include/linux/entry-common.h | 2 +- include/linux/irq-entry-common.h | 31 +------------------------------- kernel/entry/common.c | 4 ++-- 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index f83ca0a..dbaa153 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -321,7 +321,7 @@ static __always_inline void syscall_exit_to_user_mode(s= truct pt_regs *regs) { instrumentation_begin(); syscall_exit_to_user_mode_work(regs); - local_irq_disable_exit_to_user(); + local_irq_disable(); syscall_exit_to_user_mode_prepare(regs); instrumentation_end(); exit_to_user_mode(); diff --git a/include/linux/irq-entry-common.h b/include/linux/irq-entry-com= mon.h index 3cf4d21..93b4b55 100644 --- a/include/linux/irq-entry-common.h +++ b/include/linux/irq-entry-common.h @@ -101,37 +101,6 @@ static __always_inline void enter_from_user_mode(struc= t pt_regs *regs) } =20 /** - * local_irq_enable_exit_to_user - Exit to user variant of local_irq_enabl= e() - * @ti_work: Cached TIF flags gathered with interrupts disabled - * - * Defaults to local_irq_enable(). Can be supplied by architecture specific - * code. - */ -static inline void local_irq_enable_exit_to_user(unsigned long ti_work); - -#ifndef local_irq_enable_exit_to_user -static __always_inline void local_irq_enable_exit_to_user(unsigned long ti= _work) -{ - local_irq_enable(); -} -#endif - -/** - * local_irq_disable_exit_to_user - Exit to user variant of local_irq_disa= ble() - * - * Defaults to local_irq_disable(). Can be supplied by architecture specif= ic - * code. - */ -static inline void local_irq_disable_exit_to_user(void); - -#ifndef local_irq_disable_exit_to_user -static __always_inline void local_irq_disable_exit_to_user(void) -{ - local_irq_disable(); -} -#endif - -/** * arch_exit_to_user_mode_work - Architecture specific TIF work for exit * to user mode. * @regs: Pointer to currents pt_regs diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 9ef63e4..b5e05d8 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -47,7 +47,7 @@ static __always_inline unsigned long __exit_to_user_mode_= loop(struct pt_regs *re */ while (ti_work & EXIT_TO_USER_MODE_WORK_LOOP) { =20 - local_irq_enable_exit_to_user(ti_work); + local_irq_enable(); =20 if (ti_work & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY)) { if (!rseq_grant_slice_extension(ti_work & TIF_SLICE_EXT_DENY)) @@ -74,7 +74,7 @@ static __always_inline unsigned long __exit_to_user_mode_= loop(struct pt_regs *re * might have changed while interrupts and preemption was * enabled above. */ - local_irq_disable_exit_to_user(); + local_irq_disable(); =20 /* Check if any of the above work has queued a deferred wakeup */ tick_nohz_user_enter_prepare();