All of lore.kernel.org
 help / color / mirror / Atom feed
* [Adeos-main] [PATCH 1/2] Perform panic traces only once
@ 2007-05-13 19:26 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2007-05-13 19:26 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: adeos-main


[-- Attachment #1.1: Type: text/plain, Size: 357 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: trace_panic-only-once.patch --]
[-- Type: text/x-patch; name="trace_panic-only-once.patch", Size: 907 bytes --]

---
 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);
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-13 19:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-13 19:26 [Adeos-main] [PATCH 1/2] Perform panic traces only once 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.