summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0316-rt-arm64-make-_TIF_WORK_MASK-bits-contiguous.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/0316-rt-arm64-make-_TIF_WORK_MASK-bits-contiguous.patch')
-rw-r--r--debian/patches-rt/0316-rt-arm64-make-_TIF_WORK_MASK-bits-contiguous.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/debian/patches-rt/0316-rt-arm64-make-_TIF_WORK_MASK-bits-contiguous.patch b/debian/patches-rt/0316-rt-arm64-make-_TIF_WORK_MASK-bits-contiguous.patch
new file mode 100644
index 000000000..38664d0ff
--- /dev/null
+++ b/debian/patches-rt/0316-rt-arm64-make-_TIF_WORK_MASK-bits-contiguous.patch
@@ -0,0 +1,57 @@
+From 599ec4565144185541405febb71e81cf36cad908 Mon Sep 17 00:00:00 2001
+From: Salvatore Bonaccorso <carnil@debian.org>
+Date: Fri, 20 Jan 2023 19:23:03 +0100
+Subject: [PATCH 316/323] rt: arm64: make _TIF_WORK_MASK bits contiguous
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz
+
+As same as in commit 870d16757ba8 ("arm64: make _TIF_WORK_MASK bits
+contiguous") in mainline, we need to make the bits of _TIF_WORK_MASK to
+be contiguous in order to use this as an immediate argument to an AND
+instruction in entry.S.
+
+We shuffle these bits down-by-one keeping the existing contiguity after
+inserting TIF_NEED_RESCHED_LAZY in the preempt-rt patch series.
+
+Otherwise, omitting this change will result in a build failure as below:
+
+ arch/arm64/kernel/entry.S: Assembler messages:
+ arch/arm64/kernel/entry.S:763: Error: immediate out of range at operand 3 -- `and x2,x19,#((1<<1)|(1<<0)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<13)|(1<<7))'
+
+Reported-by: Vignesh Raghavendra <vigneshr@ti.com>
+Reported-by: Pavel Machek <pavel@denx.de>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Catalin Marinas <catalin.marinas@arm.com>
+Cc: Will Deacon <will@kernel.org>
+Link: https://lore.kernel.org/lkml/40de655e-26f3-aa7b-f1ec-6877396a9f1e@ti.com/
+Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
+Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
+---
+ arch/arm64/include/asm/thread_info.h | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
+index 6eb36a2126e8..2afd9ceb66c9 100644
+--- a/arch/arm64/include/asm/thread_info.h
++++ b/arch/arm64/include/asm/thread_info.h
+@@ -70,12 +70,12 @@ void arch_release_task_struct(struct task_struct *tsk);
+ #define TIF_FSCHECK 5 /* Check FS is USER_DS on return */
+ #define TIF_MTE_ASYNC_FAULT 6 /* MTE Asynchronous Tag Check Fault */
+ #define TIF_NOTIFY_SIGNAL 7 /* signal notifications exist */
+-#define TIF_SYSCALL_TRACE 8 /* syscall trace active */
+-#define TIF_SYSCALL_AUDIT 9 /* syscall auditing */
+-#define TIF_SYSCALL_TRACEPOINT 10 /* syscall tracepoint for ftrace */
+-#define TIF_SECCOMP 11 /* syscall secure computing */
+-#define TIF_SYSCALL_EMU 12 /* syscall emulation active */
+-#define TIF_NEED_RESCHED_LAZY 13
++#define TIF_NEED_RESCHED_LAZY 8
++#define TIF_SYSCALL_TRACE 9 /* syscall trace active */
++#define TIF_SYSCALL_AUDIT 10 /* syscall auditing */
++#define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint for ftrace */
++#define TIF_SECCOMP 12 /* syscall secure computing */
++#define TIF_SYSCALL_EMU 13 /* syscall emulation active */
+ #define TIF_MEMDIE 18 /* is terminating due to OOM killer */
+ #define TIF_FREEZE 19
+ #define TIF_RESTORE_SIGMASK 20
+--
+2.43.0
+