summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2022-08-09 15:27:05 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2022-08-09 16:17:36 +0200
commitd4c628ad215fb18ee082891cc322c05982d6012c (patch)
tree76f9a69a41adfa2d9f89aa9be8c7217e9e855f8e /recipes-kernel/linux
parent93409bedef388ce40986f18ca20ee80a25883613 (diff)
linux-toradex_5.15-2.0.x.bb: make rt patch apply
Revert conflicting downstream changes before applying the RT-Patch and reapply those changes afterwards. Related-to: ELB-4597 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-kernel/linux')
-rw-r--r--recipes-kernel/linux/linux-toradex-5.15-2.0.x/0001-Revert-Revert-ARM-9113-1-uaccess-remove-set_fs-imple.patch44
-rw-r--r--recipes-kernel/linux/linux-toradex-5.15-2.0.x/0003-Revert-Revert-Revert-ARM-9113-1-uaccess-remove-set_f.patch41
-rw-r--r--recipes-kernel/linux/linux-toradex_5.15-2.0.x.bb2
3 files changed, 87 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-toradex-5.15-2.0.x/0001-Revert-Revert-ARM-9113-1-uaccess-remove-set_fs-imple.patch b/recipes-kernel/linux/linux-toradex-5.15-2.0.x/0001-Revert-Revert-ARM-9113-1-uaccess-remove-set_fs-imple.patch
new file mode 100644
index 0000000..7c94468
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-5.15-2.0.x/0001-Revert-Revert-ARM-9113-1-uaccess-remove-set_fs-imple.patch
@@ -0,0 +1,44 @@
+From 64efc14ff356ae672822e67d42cfc6304228ebd1 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.krummenacher@toradex.com>
+Date: Tue, 9 Aug 2022 14:47:27 +0200
+Subject: [PATCH 1/3] Revert "Revert "ARM: 9113/1: uaccess: remove set_fs()
+ implementation""
+
+Prepare for applying RT-Patch by partly reverting the conflicting
+downstream commit.
+
+This reverts commit ee69377c0fb428a2319ca071bbdbbddbb756cd02.
+
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+---
+ arch/arm/include/asm/thread_info.h | 1 -
+ arch/arm/kernel/asm-offsets.c | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
+index bf64b41d47eb..d1f959463e17 100644
+--- a/arch/arm/include/asm/thread_info.h
++++ b/arch/arm/include/asm/thread_info.h
+@@ -54,7 +54,6 @@ struct cpu_context_save {
+ struct thread_info {
+ unsigned long flags; /* low level flags */
+ int preempt_count; /* 0 => preemptable, <0 => bug */
+- mm_segment_t addr_limit; /* address limit */
+ struct task_struct *task; /* main task structure */
+ __u32 cpu; /* cpu */
+ __u32 cpu_domain; /* cpu domain */
+diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
+index 2dc0f59b0053..77a253fe3ff3 100644
+--- a/arch/arm/kernel/asm-offsets.c
++++ b/arch/arm/kernel/asm-offsets.c
+@@ -43,7 +43,6 @@ int main(void)
+ BLANK();
+ DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
+ DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
+- DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit));
+ DEFINE(TI_TASK, offsetof(struct thread_info, task));
+ DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
+ DEFINE(TI_CPU_DOMAIN, offsetof(struct thread_info, cpu_domain));
+--
+2.35.3
+
diff --git a/recipes-kernel/linux/linux-toradex-5.15-2.0.x/0003-Revert-Revert-Revert-ARM-9113-1-uaccess-remove-set_f.patch b/recipes-kernel/linux/linux-toradex-5.15-2.0.x/0003-Revert-Revert-Revert-ARM-9113-1-uaccess-remove-set_f.patch
new file mode 100644
index 0000000..16b2e1c
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-5.15-2.0.x/0003-Revert-Revert-Revert-ARM-9113-1-uaccess-remove-set_f.patch
@@ -0,0 +1,41 @@
+From 4763868800d10510c87f3c526aae050429dbb5c1 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.krummenacher@toradex.com>
+Date: Tue, 9 Aug 2022 14:56:10 +0200
+Subject: [PATCH 3/3] Revert "Revert "Revert "ARM: 9113/1: uaccess: remove
+ set_fs() implementation"""
+
+Bring back the changes reverted to make the RT-Patch apply.
+
+This reverts commit 64efc14ff356ae672822e67d42cfc6304228ebd1.
+---
+ arch/arm/include/asm/thread_info.h | 1 +
+ arch/arm/kernel/asm-offsets.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
+index c15dbffabf99..fc6f70b83ba1 100644
+--- a/arch/arm/include/asm/thread_info.h
++++ b/arch/arm/include/asm/thread_info.h
+@@ -55,6 +55,7 @@ struct thread_info {
+ unsigned long flags; /* low level flags */
+ int preempt_count; /* 0 => preemptable, <0 => bug */
+ int preempt_lazy_count; /* 0 => preemptable, <0 => bug */
++ mm_segment_t addr_limit; /* address limit */
+ struct task_struct *task; /* main task structure */
+ __u32 cpu; /* cpu */
+ __u32 cpu_domain; /* cpu domain */
+diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
+index addef75db054..997d7ff758f9 100644
+--- a/arch/arm/kernel/asm-offsets.c
++++ b/arch/arm/kernel/asm-offsets.c
+@@ -44,6 +44,7 @@ int main(void)
+ DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
+ DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
+ DEFINE(TI_PREEMPT_LAZY, offsetof(struct thread_info, preempt_lazy_count));
++ DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit));
+ DEFINE(TI_TASK, offsetof(struct thread_info, task));
+ DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
+ DEFINE(TI_CPU_DOMAIN, offsetof(struct thread_info, cpu_domain));
+--
+2.35.3
+
diff --git a/recipes-kernel/linux/linux-toradex_5.15-2.0.x.bb b/recipes-kernel/linux/linux-toradex_5.15-2.0.x.bb
index c56bccf..4982fcb 100644
--- a/recipes-kernel/linux/linux-toradex_5.15-2.0.x.bb
+++ b/recipes-kernel/linux/linux-toradex_5.15-2.0.x.bb
@@ -41,7 +41,9 @@ export DTC_FLAGS = "-@"
# both possible storage locations.
MIRRORS:append:preempt-rt = "${KERNELORG_MIRROR}/linux/kernel/projects/rt/5.15/older/ ${KERNELORG_MIRROR}/linux/kernel/projects/rt/5.15/"
SRC_URI:append:preempt-rt = " \
+ file://0001-Revert-Revert-ARM-9113-1-uaccess-remove-set_fs-imple.patch \
${KERNELORG_MIRROR}/linux/kernel/projects/rt/5.15/older/patch-5.15.40-rt43.patch.xz;name=rt-patch \
+ file:://0003-Revert-Revert-Revert-ARM-9113-1-uaccess-remove-set_f.patch \
file://preempt-rt.scc \
file://preempt-rt-less-latency.scc \
"