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.kis...@web.de>
---

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


_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to