All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-core] [PATCH v2 1/5] x86_32: Fix NMI watchdog build for 2.6.27
Date: Tue, 23 Dec 2008 20:06:49 +0100	[thread overview]
Message-ID: <20081223190649.26094.60192.stgit@domain.hid> (raw)
In-Reply-To: <20081223190649.26094.61372.stgit@domain.hid>

Fix build breakage against 2.6.27-x86-32 due to changes of die_nmi. At
this chance, switch the internal function call wrapping to latest
unified mainline instead of using the legacy prototype.

Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---

 ksrc/arch/x86/hal_32.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ksrc/arch/x86/hal_32.c b/ksrc/arch/x86/hal_32.c
index e8e1258..79b7c83 100644
--- a/ksrc/arch/x86/hal_32.c
+++ b/ksrc/arch/x86/hal_32.c
@@ -107,7 +107,7 @@ extern void show_registers(struct pt_regs *regs);
 
 extern spinlock_t nmi_print_lock;
 
-void die_nmi(struct pt_regs *regs, const char *msg)
+void die_nmi(const char *msg, struct pt_regs *regs, int do_panic)
 {
 	spin_lock(&nmi_print_lock);
 	/*
@@ -124,7 +124,11 @@ void die_nmi(struct pt_regs *regs, const char *msg)
 	do_exit(SIGSEGV);
 }
 
-#endif /* Linux < 2.6 */
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+#define die_nmi(msg, regs, do_panic)	die_nmi(regs, msg)
+#else /* Linux >= 2.6.27 */
+#include <asm/nmi.h>
+#endif /* Linux >= 2.6.27 */
 
 void rthal_latency_above_max(struct pt_regs *regs)
 {
@@ -136,7 +140,7 @@ void rthal_latency_above_max(struct pt_regs *regs)
 			 sizeof(buf),
 			 "NMI watchdog detected timer latency above %u us\n",
 			 rthal_maxlat_us);
-		die_nmi(regs, buf);
+		die_nmi(buf, regs, 1);
 	}
 }
 



  parent reply	other threads:[~2008-12-23 19:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23 19:06 [Xenomai-core] [PATCH v2 0/5] NMI watchdog fixes / enhancements Jan Kiszka
2008-12-23 19:06 ` [Xenomai-core] [PATCH v2 2/5] Update NMI watchdog for latest Intel CPUs Jan Kiszka
2008-12-23 19:06 ` [Xenomai-core] [PATCH v2 4/5] NMI watchdog support for x86-64 Jan Kiszka
2008-12-23 19:06 ` [Xenomai-core] [PATCH v2 3/5] x86: Clear perfctr_msr on rthal_nmi_release Jan Kiszka
2008-12-23 19:06 ` Jan Kiszka [this message]
2008-12-23 19:06 ` [Xenomai-core] [PATCH v2 5/5] Rework x86 NMI watchdog pass-through Jan Kiszka
2008-12-23 19:21 ` [Xenomai-core] [PATCH v2 0/5] NMI watchdog fixes / enhancements Gilles Chanteperdrix
2008-12-24  0:57   ` Jan Kiszka
2008-12-24  7:25     ` Gilles Chanteperdrix
2008-12-29 14:32       ` Jan Kiszka
2008-12-29 16:36         ` Gilles Chanteperdrix

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=20081223190649.26094.60192.stgit@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=xenomai@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.