All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: adeos-main <adeos-main@gna.org>
Cc: Philippe Gerum <rpm@xenomai.org>
Subject: [Adeos-main] [PATCH 2/2] Disable context checks
Date: Fri, 25 May 2007 15:47:24 +0200	[thread overview]
Message-ID: <4656E8EC.5020803@domain.hid> (raw)


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

Introduce ipipe_disable_check_context and use it when dumping panic
traces. This avoids triggering the alarm while actually dumping a
different fault.

Jan

[-- Attachment #1.2: disable-context-check.patch --]
[-- Type: text/plain, Size: 2194 bytes --]

---
 include/linux/ipipe_base.h |   11 +++++++++++
 kernel/ipipe/core.c        |    9 +++++----
 kernel/ipipe/tracer.c      |    2 ++
 3 files changed, 18 insertions(+), 4 deletions(-)

Index: linux-2.6.20/include/linux/ipipe_base.h
===================================================================
--- linux-2.6.20.orig/include/linux/ipipe_base.h
+++ linux-2.6.20/include/linux/ipipe_base.h
@@ -76,9 +76,20 @@ void __ipipe_unstall_root(void);
 void __ipipe_restore_root(unsigned long x);
 
 #ifdef CONFIG_IPIPE_DEBUG_CONTEXT
+
 void ipipe_check_context(struct ipipe_domain *border_ipd);
+
+static inline void ipipe_disable_context_check(void)
+{
+	extern int __ipipe_context_check_enabled;
+	__ipipe_context_check_enabled = 0;
+}
+
 #else /* !CONFIG_IPIPE_DEBUG_CONTEXT */
+
 static inline void ipipe_check_context(struct ipipe_domain *border_ipd) { }
+static inline void ipipe_disable_context_check(void) { }
+
 #endif /* !CONFIG_IPIPE_DEBUG_CONTEXT */
 
 #else /* !CONFIG_IPIPE */
Index: linux-2.6.20/kernel/ipipe/core.c
===================================================================
--- linux-2.6.20.orig/kernel/ipipe/core.c
+++ linux-2.6.20/kernel/ipipe/core.c
@@ -1385,15 +1385,16 @@ void __init ipipe_init_proc(void)
 #endif	/* CONFIG_PROC_FS */
 
 #ifdef CONFIG_IPIPE_DEBUG_CONTEXT
+
+int __ipipe_context_check_enabled = 1;
+
 void ipipe_check_context(struct ipipe_domain *border_ipd)
 {
-	static int check_hit;
-
 	if (likely(ipipe_current_domain->priority <= border_ipd->priority) ||
-	    check_hit)
+	    !__ipipe_context_check_enabled)
 		return;
 
-	check_hit = 1;
+	__ipipe_context_check_enabled = 0;
 
 	ipipe_trace_panic_freeze();
 	ipipe_set_printk_sync(ipipe_current_domain);
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
@@ -625,6 +625,8 @@ void ipipe_trace_panic_dump(void)
 	if (!panic_path)
 		return;
 
+	ipipe_disable_context_check();
+
 	printk("I-pipe tracer log (%d points):\n", cnt);
 
 	start = pos = WRAP_POINT_NO(panic_path->trace_pos-1);

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

                 reply	other threads:[~2007-05-25 13:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4656E8EC.5020803@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=adeos-main@gna.org \
    --cc=rpm@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.