aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-13 14:05:05 +0200
committerSteven Rostedt <rostedt@goodmis.org>2012-01-24 10:51:29 -0500
commita50aa16b9024c7b028bccd6f74323b9af7962c70 (patch)
tree87ebb477963a1fdae28c7ea859e431dcea788fca
parent2373a5ef139e47e15cf389f079ef3d04081b16f6 (diff)
x86-no-perf-irq-work-rt.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/irq_work.c2
-rw-r--r--kernel/events/core.c8
-rw-r--r--kernel/irq_work.c2
-rw-r--r--kernel/timer.c6
4 files changed, 16 insertions, 2 deletions
diff --git a/arch/x86/kernel/irq_work.c b/arch/x86/kernel/irq_work.c
index ca8f703a1e70..129b8bb73de2 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/events/core.c b/kernel/events/core.c
index 32a61513f890..08315ad82a84 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3916,9 +3916,15 @@ static bool perf_output_space(struct perf_buffer *buffer, unsigned long tail,
static void perf_output_wakeup(struct perf_output_handle *handle)
{
+ int queue = handle->nmi;
+
+#ifdef CONFIG_PREEMPT_RT_FULL
+ queue |= irqs_disabled() || preempt_count();
+#endif
+
atomic_set(&handle->buffer->poll, POLL_IN);
- if (handle->nmi) {
+ if (queue) {
handle->event->pending_wakeup = 1;
irq_work_queue(&handle->event->pending);
} else
diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index c58fa7da8aef..75ea0064faed 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -125,8 +125,10 @@ void irq_work_run(void)
if (this_cpu_read(irq_work_list) == NULL)
return;
+#ifndef CONFIG_PREEMPT_RT_FULL
BUG_ON(!in_irq());
BUG_ON(!irqs_disabled());
+#endif
list = this_cpu_xchg(irq_work_list, NULL);
diff --git a/kernel/timer.c b/kernel/timer.c
index 6e320bad09d4..937799f3733c 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1362,7 +1362,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
@@ -1376,6 +1376,10 @@ static void run_timer_softirq(struct softirq_action *h)
{
struct tvec_base *base = __this_cpu_read(tvec_bases);
+#if defined(CONFIG_IRQ_WORK)
+ irq_work_run();
+#endif
+
printk_tick();
hrtimer_run_pending();