linux/debian/patches-rt/0117-lockdep-Make-it-RT-awa...

79 lines
2.2 KiB
Diff
Raw Normal View History

From 8ed2b42d1e41402d585e7907ef754461cda3ff25 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 17 Jul 2011 18:51:23 +0200
Subject: [PATCH 117/325] lockdep: Make it RT aware
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.115-rt48.tar.xz
teach lockdep that we don't really do softirqs on -RT.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
2019-04-08 23:49:20 +00:00
include/linux/irqflags.h | 23 +++++++++++++++--------
kernel/locking/lockdep.c | 2 ++
2 files changed, 17 insertions(+), 8 deletions(-)
2019-04-08 23:49:20 +00:00
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index 21619c92c377..b20eeb25e9fa 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
2018-10-30 12:40:05 +00:00
@@ -43,14 +43,6 @@ do { \
do { \
current->hardirq_context--; \
} while (0)
-# define lockdep_softirq_enter() \
-do { \
- current->softirq_context++; \
-} while (0)
-# define lockdep_softirq_exit() \
-do { \
- current->softirq_context--; \
-} while (0)
#else
# define trace_hardirqs_on() do { } while (0)
# define trace_hardirqs_off() do { } while (0)
2019-04-08 23:49:20 +00:00
@@ -64,6 +56,21 @@ do { \
# define lockdep_softirq_exit() do { } while (0)
#endif
2019-04-08 23:49:20 +00:00
+#if defined(CONFIG_TRACE_IRQFLAGS) && !defined(CONFIG_PREEMPT_RT_FULL)
+# define lockdep_softirq_enter() \
+do { \
+ current->softirq_context++; \
+} while (0)
+# define lockdep_softirq_exit() \
+do { \
+ current->softirq_context--; \
+} while (0)
+
+#else
+# define lockdep_softirq_enter() do { } while (0)
+# define lockdep_softirq_exit() do { } while (0)
+#endif
2019-04-08 23:49:20 +00:00
+
#if defined(CONFIG_IRQSOFF_TRACER) || \
defined(CONFIG_PREEMPT_TRACER)
2019-04-08 23:49:20 +00:00
extern void stop_critical_timings(void);
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
2019-11-25 00:04:39 +00:00
index 1e272f6a01e7..1938b4bfb098 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
2019-11-25 00:04:39 +00:00
@@ -3826,6 +3826,7 @@ static void check_flags(unsigned long flags)
}
}
+#ifndef CONFIG_PREEMPT_RT_FULL
/*
* We dont accurately track softirq state in e.g.
* hardirq contexts (such as on 4KSTACKS), so only
2019-11-25 00:04:39 +00:00
@@ -3840,6 +3841,7 @@ static void check_flags(unsigned long flags)
DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled);
}
}
+#endif
if (!debug_locks)
print_irqtrace_events(current);
2020-01-03 23:36:11 +00:00
--
2020-04-09 19:44:24 +00:00
2.25.1
2020-01-03 23:36:11 +00:00