* [PATCH 1/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features
@ 2021-11-30 7:31 Hongzhan Chen
2021-11-30 7:31 ` [PATCH 2/2] cobalt/trace: dovetail: drop unnecessary helpers Hongzhan Chen
0 siblings, 1 reply; 3+ messages in thread
From: Hongzhan Chen @ 2021-11-30 7:31 UTC (permalink / raw)
To: xenomai
Some of the features are unportable because ftrace does not
provide equivalent functionality to the ipipe tracer (namely double
buffering so that you can continue to record in flight-recorder mode
while a previous recording remains available).
Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
diff --git a/include/cobalt/kernel/dovetail/pipeline/trace.h b/include/cobalt/kernel/dovetail/pipeline/trace.h
index 479191e0e..7147ab183 100644
--- a/include/cobalt/kernel/dovetail/pipeline/trace.h
+++ b/include/cobalt/kernel/dovetail/pipeline/trace.h
@@ -27,20 +27,17 @@
static inline int xntrace_max_begin(unsigned long v)
{
- TODO();
- return 0;
+ return -ENOSYS;
}
static inline int xntrace_max_end(unsigned long v)
{
- TODO();
- return 0;
+ return -ENOSYS;
}
static inline int xntrace_max_reset(void)
{
- TODO();
- return 0;
+ return -ENOSYS;
}
static inline int xntrace_user_start(void)
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] cobalt/trace: dovetail: drop unnecessary helpers
2021-11-30 7:31 [PATCH 1/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features Hongzhan Chen
@ 2021-11-30 7:31 ` Hongzhan Chen
2021-11-30 8:20 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Hongzhan Chen @ 2021-11-30 7:31 UTC (permalink / raw)
To: xenomai
For dovetail-based, handle_oob_trap_entry would try to demote oob
stage and leave in-band to do panic thing when fault happen.
Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
diff --git a/include/cobalt/kernel/dovetail/pipeline/trace.h b/include/cobalt/kernel/dovetail/pipeline/trace.h
index 7147ab183..306dd549a 100644
--- a/include/cobalt/kernel/dovetail/pipeline/trace.h
+++ b/include/cobalt/kernel/dovetail/pipeline/trace.h
@@ -91,18 +91,6 @@ static inline int xntrace_tick(unsigned long delay_ticks) /* ns */
return 0;
}
-static inline int xntrace_panic_freeze(void)
-{
- TODO();
- return 0;
-}
-
-static inline int xntrace_panic_dump(void)
-{
- TODO();
- return 0;
-}
-
static inline bool xntrace_enabled(void)
{
return IS_ENABLED(CONFIG_DOVETAIL_TRACE);
diff --git a/kernel/cobalt/dovetail/kevents.c b/kernel/cobalt/dovetail/kevents.c
index 648929756..4da4f51b7 100644
--- a/kernel/cobalt/dovetail/kevents.c
+++ b/kernel/cobalt/dovetail/kevents.c
@@ -64,14 +64,12 @@ void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs)
*/
#if defined(CONFIG_XENO_OPT_DEBUG_COBALT) || defined(CONFIG_XENO_OPT_DEBUG_USER)
if (!user_mode(regs)) {
- xntrace_panic_freeze();
printk(XENO_WARNING
"switching %s to secondary mode after exception #%u in "
"kernel-space at 0x%lx (pid %d)\n", thread->name,
trapnr,
xnarch_fault_pc(regs),
xnthread_host_pid(thread));
- xntrace_panic_dump();
} else if (xnarch_fault_notify(trapnr)) /* Don't report debug traps */
printk(XENO_WARNING
"switching %s to secondary mode after exception #%u from "
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] cobalt/trace: dovetail: drop unnecessary helpers
2021-11-30 7:31 ` [PATCH 2/2] cobalt/trace: dovetail: drop unnecessary helpers Hongzhan Chen
@ 2021-11-30 8:20 ` Jan Kiszka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2021-11-30 8:20 UTC (permalink / raw)
To: Hongzhan Chen, xenomai
On 30.11.21 08:31, Hongzhan Chen via Xenomai wrote:
> For dovetail-based, handle_oob_trap_entry would try to demote oob
> stage and leave in-band to do panic thing when fault happen.
>
> Signed-off-by: Hongzhan Chen <hongzhan.chen@intel.com>
>
> diff --git a/include/cobalt/kernel/dovetail/pipeline/trace.h b/include/cobalt/kernel/dovetail/pipeline/trace.h
> index 7147ab183..306dd549a 100644
> --- a/include/cobalt/kernel/dovetail/pipeline/trace.h
> +++ b/include/cobalt/kernel/dovetail/pipeline/trace.h
> @@ -91,18 +91,6 @@ static inline int xntrace_tick(unsigned long delay_ticks) /* ns */
> return 0;
> }
>
> -static inline int xntrace_panic_freeze(void)
> -{
> - TODO();
> - return 0;
> -}
> -
> -static inline int xntrace_panic_dump(void)
> -{
> - TODO();
> - return 0;
> -}
> -
> static inline bool xntrace_enabled(void)
> {
> return IS_ENABLED(CONFIG_DOVETAIL_TRACE);
> diff --git a/kernel/cobalt/dovetail/kevents.c b/kernel/cobalt/dovetail/kevents.c
> index 648929756..4da4f51b7 100644
> --- a/kernel/cobalt/dovetail/kevents.c
> +++ b/kernel/cobalt/dovetail/kevents.c
> @@ -64,14 +64,12 @@ void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs)
> */
> #if defined(CONFIG_XENO_OPT_DEBUG_COBALT) || defined(CONFIG_XENO_OPT_DEBUG_USER)
> if (!user_mode(regs)) {
> - xntrace_panic_freeze();
> printk(XENO_WARNING
> "switching %s to secondary mode after exception #%u in "
> "kernel-space at 0x%lx (pid %d)\n", thread->name,
> trapnr,
> xnarch_fault_pc(regs),
> xnthread_host_pid(thread));
> - xntrace_panic_dump();
> } else if (xnarch_fault_notify(trapnr)) /* Don't report debug traps */
> printk(XENO_WARNING
> "switching %s to secondary mode after exception #%u from "
>
thanks, both applied.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-30 8:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 7:31 [PATCH 1/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features Hongzhan Chen
2021-11-30 7:31 ` [PATCH 2/2] cobalt/trace: dovetail: drop unnecessary helpers Hongzhan Chen
2021-11-30 8:20 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.