[PATCH Dovetail 12/13] cobalt/debug: pipeline: abstract panic prep call

Philippe Gerum rpm at xenomai.org
Sat Jan 2 10:33:52 CET 2021


From: Philippe Gerum <rpm at xenomai.org>

No functional change is introduced.

Signed-off-by: Philippe Gerum <rpm at xenomai.org>
---
 include/cobalt/kernel/ipipe/pipeline/pipeline.h | 5 +++++
 kernel/cobalt/debug.c                           | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/cobalt/kernel/ipipe/pipeline/pipeline.h b/include/cobalt/kernel/ipipe/pipeline/pipeline.h
index 6f6958402..0ffc9b00b 100644
--- a/include/cobalt/kernel/ipipe/pipeline/pipeline.h
+++ b/include/cobalt/kernel/ipipe/pipeline/pipeline.h
@@ -70,4 +70,9 @@ static inline void pipeline_send_timer_ipi(const struct cpumask *dest)
 
 #endif
 
+static inline void pipeline_prepare_panic(void)
+{
+	ipipe_prepare_panic();
+}
+
 #endif /* !_COBALT_KERNEL_IPIPE_PIPELINE_H */
diff --git a/kernel/cobalt/debug.c b/kernel/cobalt/debug.c
index 12fc57289..1e9edda99 100644
--- a/kernel/cobalt/debug.c
+++ b/kernel/cobalt/debug.c
@@ -587,7 +587,7 @@ int xnlock_dbg_release(struct xnlock *lock,
 	}
 
 	if (unlikely(lock->owner != cpu)) {
-		ipipe_prepare_panic();
+		pipeline_prepare_panic();
 		printk(XENO_ERR "lock %p already unlocked on CPU #%d\n"
 				"          last owner = %s:%u (%s(), CPU #%d)\n",
 		       lock, cpu, lock->file, lock->line, lock->function,
-- 
2.26.2




More information about the Xenomai mailing list