Closed guysoft closed 6 years ago
Blocks #8
These are the commits that break the patching: https://github.com/raspberrypi/linux/commit/c98ff7299b404f110167883695f81080723e6e15 https://github.com/raspberrypi/linux/commit/ca2d736867200b931ca61383af2fd68bb5fd2ecb
--- kernel/time/hrtimer.c
+++ kernel/time/hrtimer.c
@@ -1824,16 +2040,20 @@ int hrtimers_prepare_cpu(unsigned int cpu)
for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
cpu_base->clock_base[i].cpu_base = cpu_base;
timerqueue_init_head(&cpu_base->clock_base[i].active);
+ INIT_LIST_HEAD(&cpu_base->clock_base[i].expired);
}
cpu_base->cpu = cpu;
hrtimer_init_hres(cpu_base);
+#ifdef CONFIG_PREEMPT_RT_BASE
+ init_waitqueue_head(&cpu_base->wait);
+#endif
return 0;
}
#ifdef CONFIG_HOTPLUG_CPU
-static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base,
+static int migrate_hrtimer_list(struct hrtimer_clock_base *old_base,
struct hrtimer_clock_base *new_base)
{
struct hrtimer *timer;
--- kernel/workqueue.c
+++ kernel/workqueue.c
@@ -48,6 +48,8 @@
#include <linux/nodemask.h>
#include <linux/moduleparam.h>
#include <linux/uaccess.h>
+#include <linux/locallock.h>
+#include <linux/delay.h>
#include "workqueue_internal.h"
With patch-4.9.84-rt62 different code fails:
cat ./kernel/time/posix-timers.c.rej
--- kernel/time/posix-timers.c
+++ kernel/time/posix-timers.c
@@ -517,6 +517,9 @@ static struct pid *good_sigevent(sigevent_t * event)
case SIGEV_THREAD:
if (event->sigev_signo <= 0 || event->sigev_signo > SIGRTMAX)
return NULL;
+ if (sig_kernel_only(event->sigev_signo) ||
+ sig_kernel_coredump(event->sigev_signo))
+ return NULL;
/* FALLTHRU */
case SIGEV_NONE:
return task_pid(rtn);
cat ./arch/x86/include/asm/thread_info.h.rej
--- arch/x86/include/asm/thread_info.h
+++ arch/x86/include/asm/thread_info.h
@@ -54,12 +54,15 @@ struct task_struct;
struct thread_info {
unsigned long flags; /* low level flags */
+ int preempt_lazy_count; /* 0 => lazy preemptable
+ <0 => BUG */
u32 status; /* thread synchronous flags */
};
#define INIT_THREAD_INFO(tsk) \
{ \
.flags = 0, \
+ .preempt_lazy_count = 0, \
}
#define init_stack (init_thread_union.stack)
Fixed
When building: