cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features
PATCH 1/2 cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features
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).
include/cobalt/kernel/dovetail/pipeline/trace.h +3 -6
@@ -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 )
Signature · 1 line
2.17.1
PATCH 2/2 cobalt/trace: dovetail: drop unnecessary helpers
For dovetail-based, handle_oob_trap_entry would try to demote oob stage and leave in-band to do panic thing when fault happen.
include/cobalt/kernel/dovetail/pipeline/trace.h +0 -12
@@ -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 );
kernel/cobalt/dovetail/kevents.c +0 -2
@@ -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 "
Signature · 1 line
2.17.1
Re: [PATCH 2/2] cobalt/trace: dovetail: drop unnecessary helpers
Quoted 38 lines · Hongzhan Chen via Xenomai
For dovetail-based,
handle_oob_trap_entrywould try to demote oob stage and leave in-band to do panic thing when fault happen.Signed-off-by Hongzhan Chen <[email protected]>include/cobalt/kernel/dovetail/pipeline/trace.h +0
-12@@ -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 );kernel/cobalt/dovetail/kevents.c +0
-1@@ -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 ();
kernel/cobalt/dovetail/kevents.c void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs) · line 75
Quoted 10 lines
kernel/cobalt/dovetail/kevents.c +0
-1printk (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
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux