]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-generic/bug.h
alpha: convert to generic helpers for IPI function calls
[linux-2.6-omap-h63xx.git] / include / asm-generic / bug.h
index d56fedbb457ab5aa5c5bd7a63affbd10afae6161..2632328d8646840aab41c8e401a1088e922754f2 100644 (file)
@@ -31,14 +31,19 @@ struct bug_entry {
 #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0)
 #endif
 
-#ifndef HAVE_ARCH_WARN_ON
+#ifndef __WARN
+#ifndef __ASSEMBLY__
+extern void warn_on_slowpath(const char *file, const int line);
+#define WANT_WARN_ON_SLOWPATH
+#endif
+#define __WARN() warn_on_slowpath(__FILE__, __LINE__)
+#endif
+
+#ifndef WARN_ON
 #define WARN_ON(condition) ({                                          \
        int __ret_warn_on = !!(condition);                              \
-       if (unlikely(__ret_warn_on)) {                                  \
-               printk("WARNING: at %s:%d %s()\n", __FILE__,            \
-                       __LINE__, __FUNCTION__);                        \
-               dump_stack();                                           \
-       }                                                               \
+       if (unlikely(__ret_warn_on))                                    \
+               __WARN();                                               \
        unlikely(__ret_warn_on);                                        \
 })
 #endif