ipipe-noarch: IRQ tracing and lockdep fixes/cleanups
Subsystems (2)
cover ipipe-noarch: IRQ tracing and lockdep fixes/cleanups
See patches for details.
Jan
Jan Kiszka (2):
ipipe: Restore trace_hardirqs_on_virt_caller
ipipe: lockdep: Remove duplicate context checks
kernel/locking/lockdep.c | 6 ------ kernel/trace/trace_preemptirq.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-)
Signature · 1 line
2.16.4
PATCH 1/2 ipipe: Restore trace_hardirqs_on_virt_caller
From: Jan Kiszka <[email protected]>
Lost in d7fc2c06edc9 ("lockdep: ipipe: exclude the head stage from IRQ state tracing") but still needed by x86 at least.
--- kernel/trace/trace_preemptirq.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
kernel/trace/trace_preemptirq.c +11 -0
@@ -66,6 +66,17 @@ __visible void trace_hardirqs_on_caller(unsigned long caller_addr) }EXPORT_SYMBOL (trace_hardirqs_on_caller); +__visible void trace_hardirqs_on_virt_caller(unsigned long ip) +{ +/* +* The IRQ tracing logic only applies to the root domain, and +* must consider the virtual disable flag exclusively when +* leaving an interrupt/fault context. +*/ +if (ipipe_root_p && !irqs_disabled ()) +trace_hardirqs_on_caller (ip); +} + __visible void trace_hardirqs_on_virt(void) {/*
Signature · 1 line
2.16.4
PATCH 2/2 ipipe: lockdep: Remove duplicate context checks
In reply to Jan KiszkaFrom: Jan Kiszka <[email protected]>
All callers of lockdep_hardirqs_on/off already filter out !ipipe_root_p.
--- kernel/locking/lockdep.c | 6 ------ 1 file changed, 6 deletions(-)
kernel/locking/lockdep.c +0 -6
@@ -2841,9 +2841,6 @@ static void __trace_hardirqs_on_caller(unsigned long ip)void lockdep_hardirqs_on (unsigned long ip) { -if (!ipipe_root_p) -return ; -if (unlikely (!debug_locks || current->lockdep_recursion))return ;
@@ -2890,9 +2887,6 @@ void lockdep_hardirqs_off(unsigned long ip) {struct task_struct *curr; -if (!ipipe_root_p) -return ; - curr = current;if (unlikely (!debug_locks || current->lockdep_recursion))
Signature · 1 line
2.16.4
[PATCH 3/2] ipipe: Add missing include for ipipe_root_only
In reply to Jan KiszkaFrom: Jan Kiszka <[email protected]>
Breaks in non-debug builds otherwise, e.g.
https://travis-ci.com/xenomai-ci/xenomai/jobs/212725223
--- include/linux/kernel.h | 1 + 1 file changed, 1 insertion(+)
include/linux/kernel.h +1 -0
@@ -14,6 +14,7 @@#include <linux/printk.h> #include <linux/build_bug.h> #include <asm/byteorder.h> +#include <asm-generic/ipipe.h> #include <uapi/linux/kernel.h> #define USHRT_MAX ((u16)(~0U))
Signature · 1 line
2.16.4