Re: [ANNOUNCE] 5.10.162-rt78

From: Mike Galbraith
Date: Fri Jan 20 2023 - 01:02:03 EST


On Thu, 2023-01-19 at 16:09 -0700, Jens Axboe wrote:
>
> I guess we need to twiddle that asm to deal with eg 16 bits, rather than
> attempt to backport any TIF removal patches.

Hm, 'mov' gets past the weird ass rules committee, so seems it should
be trivial for someone who speaks arm. This built/booted once on rpi4.

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index d5bc1dbdd2fd..a4931bff8ea9 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -751,7 +760,12 @@ SYM_CODE_START_LOCAL(ret_to_user)
bl trace_hardirqs_off
#endif
ldr x19, [tsk, #TSK_TI_FLAGS]
+#ifndef CONFIG_PREEMPT_RT
and x2, x19, #_TIF_WORK_MASK
+#else
+ mov x2, #_TIF_WORK_MASK
+ and x2, x19, x2
+#endif
cbnz x2, work_pending
finish_ret_to_user:
user_enter_irqoff