Make sure that only the first panic trace gets frozen and that it is only dumped once until being reset by turning ipipe_trace_enable on again. This avoids troubles when multiple ipipe_trace_panic_freeze are called until the related ipipe_trace_panic_dump has been invoked. Required for the succeeding patch, but also of generic usefulness IMO.
Jan
---
kernel/ipipe/tracer.c | 8 ++++++++
1 file changed, 8 insertions(+)
Index: linux-2.6.20/kernel/ipipe/tracer.c
===================================================================
--- linux-2.6.20.orig/kernel/ipipe/tracer.c
+++ linux-2.6.20/kernel/ipipe/tracer.c
@@ -566,6 +566,9 @@ void ipipe_trace_panic_freeze(void)
unsigned long flags;
int cpu_id;
+ if (!ipipe_trace_enable)
+ return;
+
ipipe_trace_enable = 0;
local_irq_save_hw_notrace(flags);
@@ -615,6 +618,9 @@ void ipipe_trace_panic_dump(void)
int start, pos;
char task_info[12];
+ if (!panic_path)
+ return;
+
printk("I-pipe tracer log (%d points):\n", cnt);
start = pos = WRAP_POINT_NO(panic_path->trace_pos-1);
@@ -668,6 +674,8 @@ void ipipe_trace_panic_dump(void)
}
pos = WRAP_POINT_NO(pos - 1);
}
+
+ panic_path = NULL;
}
EXPORT_SYMBOL(ipipe_trace_panic_dump);
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Adeos-main mailing list [email protected] https://mail.gna.org/listinfo/adeos-main
