summaryrefslogtreecommitdiffstats
path: root/trace-fix-erroneous-histogram-stop-WARN_ON-messages.patch
blob: 5ef24ce498fa2fa1d4e30aa632f56fbc786b9156 (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
From 40f3bac4ebbda745849004652c0ecb59eb8ec8dd Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 3 Jul 2009 08:44:29 -0500
Subject: [PATCH] trace: fix erroneous histogram stop WARN_ON() messages

commit ec4ed75d7e2fedd6c353d63be2583acd3d411b43 in tip.

IRQs are temporarily disabled during histogram calculation in
cycles_2_ns(). This causes a nested irqs_off histogram processing
which emittes an erroneous WARN_ON() message and also confuses the
histogramm output.

Change local_irq to raw_local_irq in cycles_2_ns to prevent irqs_off
histogram processing.

Tested-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/x86/include/asm/timer.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h
index 5469630..3d20117 100644
--- a/arch/x86/include/asm/timer.h
+++ b/arch/x86/include/asm/timer.h
@@ -58,9 +58,9 @@ static inline unsigned long long cycles_2_ns(unsigned long long cyc)
 	unsigned long long ns;
 	unsigned long flags;
 
-	local_irq_save(flags);
+	raw_local_irq_save(flags);
 	ns = __cycles_2_ns(cyc);
-	local_irq_restore(flags);
+	raw_local_irq_restore(flags);
 
 	return ns;
 }
-- 
1.7.0.4