summaryrefslogtreecommitdiffstats
path: root/patches/0211-x86-no-perf-irq-work-rt.patch.patch
blob: 7319df72f7f94a6e7b462d2f5f7948898454f4c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From 3ff983e6aaf1e802b678f0aeb7133fce172ed0df Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 13 Jul 2011 14:05:05 +0200
Subject: [PATCH 211/274] x86-no-perf-irq-work-rt.patch

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/irq_work.c |    2 ++
 kernel/irq_work.c          |    2 ++
 kernel/timer.c             |    6 +++++-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/irq_work.c b/arch/x86/kernel/irq_work.c
index ca8f703..129b8bb 100644
--- a/arch/x86/kernel/irq_work.c
+++ b/arch/x86/kernel/irq_work.c
@@ -18,6 +18,7 @@ void smp_irq_work_interrupt(struct pt_regs *regs)
 	irq_exit();
 }
 
+#ifndef CONFIG_PREEMPT_RT_FULL
 void arch_irq_work_raise(void)
 {
 #ifdef CONFIG_X86_LOCAL_APIC
@@ -28,3 +29,4 @@ void arch_irq_work_raise(void)
 	apic_wait_icr_idle();
 #endif
 }
+#endif
diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index 1588e3b..170c2ea 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -107,8 +107,10 @@ void irq_work_run(void)
 	if (llist_empty(this_list))
 		return;
 
+#ifndef CONFIG_PREEMPT_RT_FULL
 	BUG_ON(!in_irq());
 	BUG_ON(!irqs_disabled());
+#endif
 
 	llnode = llist_del_all(this_list);
 	while (llnode != NULL) {
diff --git a/kernel/timer.c b/kernel/timer.c
index e15edbe..e5b51e0 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1414,7 +1414,7 @@ void update_process_times(int user_tick)
 	scheduler_tick();
 	run_local_timers();
 	rcu_check_callbacks(cpu, user_tick);
-#ifdef CONFIG_IRQ_WORK
+#if defined(CONFIG_IRQ_WORK) && !defined(CONFIG_PREEMPT_RT_FULL)
 	if (in_irq())
 		irq_work_run();
 #endif
@@ -1428,6 +1428,10 @@ static void run_timer_softirq(struct softirq_action *h)
 {
 	struct tvec_base *base = __this_cpu_read(tvec_bases);
 
+#if defined(CONFIG_IRQ_WORK) && defined(CONFIG_PREEMPT_RT_FULL)
+	irq_work_run();
+#endif
+
 	printk_tick();
 	hrtimer_run_pending();
 
-- 
1.7.10.4