Thread (25 messages) 25 messages, 4 authors, 2026-03-27

Re: [PATCH 1/2] arm64/entry: Fix involuntary preemption exception masking

From: Mark Rutland <mark.rutland@arm.com>
Date: 2026-03-26 18:11:59
Also in: lkml

On Wed, Mar 25, 2026 at 04:46:01PM +0100, Thomas Gleixner wrote:
On Wed, Mar 25 2026 at 11:03, Mark Rutland wrote:
quoted
On Sun, Mar 22, 2026 at 12:25:06AM +0100, Thomas Gleixner wrote:
I *think* what would work for us is we could split some of the exit
handling (including involuntary preemption) into a "prepare" step, as we
have for return to userspace. That way, arm64 could handle exiting
something like:

	local_irq_disable();
	irqentry_exit_prepare(); // new, all generic logic
	local_daif_mask();
	arm64_exit_to_kernel_mode() {
		...
		irqentry_exit(); // ideally irqentry_exit_to_kernel_mode().
		...
	}

... and other architectures can use a combined exit_to_kernel_mode() (or
whatever we call that), which does both, e.g.

	// either noinstr, __always_inline, or a macro
	void irqentry_prepare_and_exit(void)
That's a bad idea as that would require to do a full kernel rename of
all existing irqentry_exit() users.
quoted
	{
		irqentry_exit_prepare();
		irqentry_exit();
	}
Aside of the naming that should work.
Thanks for confirming!

I've pushed a (very early, WIP) draft to

  https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/entry/rework

... which is missing commit messages, comments, etc, but seems to work.

I'll see about getting that tested, cleaned up, and on-list.

Mark.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help