Skip to contentSkip to conversation

dovetail/tick: pipeline: impmement pipeline_must_force_program_tick

PATCH Applied hongzha1 1 participant 2 messages Jan 15, 2021

lore
Share & tools
lore

hongzha1

author
#0 lore raw

PATCH 7/8 dovetail/tick: pipeline: impmement pipeline_must_force_program_tick

1. set XNTSTOP to force to program tick after the ONESHOT_STOPPED state
2. implement pipeline_must_force_program_tick for dovetail

include/cobalt/kernel/dovetail/pipeline/tick.h +4 -0
index 409581a3c..8ac4760ec 100644
@@ -9,4 +9,8 @@ int pipeline_install_tick_proxy(void);
 
 void pipeline_uninstall_tick_proxy(void);
 
+struct xnsched;
+
+inline bool pipeline_must_force_program_tick(struct xnsched *sched);
+
 #endif /* !_COBALT_KERNEL_IPIPE_TICK_H */
kernel/cobalt/dovetail/tick.c +6 -1
index bf267b9d9..8d6dc1812 100644
@@ -96,6 +96,11 @@ void xn_core_tick(struct clock_event_device *dummy) /* hard irqs off */
 	xnintr_core_clock_handler();
 }
 
+inline bool pipeline_must_force_program_tick(struct xnsched *sched)
+{
+	return sched->lflags & XNTSTOP;
+}
+
 static int proxy_set_oneshot_stopped(struct clock_event_device *proxy_dev)
 {
 	struct clock_event_device *real_dev;
@@ -117,7 +122,7 @@ static int proxy_set_oneshot_stopped(struct clock_event_device *proxy_dev)
 	xnlock_get_irqsave(&nklock, s);
 	sched = xnsched_current();
 	xntimer_stop(&sched->htimer);
-	//sched->lflags |= XNTSTOP;
+	sched->lflags |= XNTSTOP;
 
 	if (sched->lflags & XNIDLE) {
 		real_dev = dev->real_device;
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 8/8 dovetail/kevents: enable back tracing

enable back tracing for handle_oob_trap_entry

kernel/cobalt/dovetail/kevents.c +1 -3
index 378017bea..51946e21c 100644
@@ -97,10 +97,8 @@ void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs)
 
 	/*
 	 * Enable back tracing.
-	 *
-	 * trace_cobalt_thread_fault(xnarch_fault_pc(regs), trapnr);
 	 */
-	TODO();
+	trace_cobalt_thread_fault(xnarch_fault_pc(regs), trapnr);
 
 	if (xnthread_test_state(thread, XNROOT))
 		return;
Signature · 1 line
2.17.1