x86/debug: Implement __WARN() using UD0
[linux-2.6-block.git] / arch / x86 / kernel / dumpstack_32.c
index bb3b5b9a6899215ff3ff456367c93002d35eece8..e5f0b40e66d238b931d14d78ea579abd195a3350 100644 (file)
@@ -2,6 +2,7 @@
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
  */
+#include <linux/sched/debug.h>
 #include <linux/kallsyms.h>
 #include <linux/kprobes.h>
 #include <linux/uaccess.h>
@@ -161,15 +162,3 @@ void show_regs(struct pt_regs *regs)
        }
        pr_cont("\n");
 }
-
-int is_valid_bugaddr(unsigned long ip)
-{
-       unsigned short ud2;
-
-       if (ip < PAGE_OFFSET)
-               return 0;
-       if (probe_kernel_address((unsigned short *)ip, ud2))
-               return 0;
-
-       return ud2 == 0x0b0f;
-}