Merge tag 'wireless-drivers-for-davem-2016-04-25' of git://git.kernel.org/pub/scm...
[deliverable/linux.git] / include / linux / kernel.h
index b82646ee70eb92b8580cf302dd84eafa60b73189..2f7775e229b093d549aff01270bf3cd2371e5771 100644 (file)
@@ -255,7 +255,7 @@ extern long (*panic_blink)(int state);
 __printf(1, 2)
 void panic(const char *fmt, ...)
        __noreturn __cold;
-void nmi_panic_self_stop(struct pt_regs *);
+void nmi_panic(struct pt_regs *regs, const char *msg);
 extern void oops_enter(void);
 extern void oops_exit(void);
 void print_oops_end_marker(void);
@@ -456,25 +456,6 @@ extern bool crash_kexec_post_notifiers;
 extern atomic_t panic_cpu;
 #define PANIC_CPU_INVALID      -1
 
-/*
- * A variant of panic() called from NMI context. We return if we've already
- * panicked on this CPU. If another CPU already panicked, loop in
- * nmi_panic_self_stop() which can provide architecture dependent code such
- * as saving register state for crash dump.
- */
-#define nmi_panic(regs, fmt, ...)                                      \
-do {                                                                   \
-       int old_cpu, cpu;                                               \
-                                                                       \
-       cpu = raw_smp_processor_id();                                   \
-       old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);   \
-                                                                       \
-       if (old_cpu == PANIC_CPU_INVALID)                               \
-               panic(fmt, ##__VA_ARGS__);                              \
-       else if (old_cpu != cpu)                                        \
-               nmi_panic_self_stop(regs);                              \
-} while (0)
-
 /*
  * Only to be used by arch init code. If the user over-wrote the default
  * CONFIG_PANIC_TIMEOUT, honor it.
@@ -637,7 +618,7 @@ do {                                                        \
 
 #define do_trace_printk(fmt, args...)                                  \
 do {                                                                   \
-       static const char *trace_printk_fmt                             \
+       static const char *trace_printk_fmt __used                      \
                __attribute__((section("__trace_printk_fmt"))) =        \
                __builtin_constant_p(fmt) ? fmt : NULL;                 \
                                                                        \
@@ -681,7 +662,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...);
  */
 
 #define trace_puts(str) ({                                             \
-       static const char *trace_printk_fmt                             \
+       static const char *trace_printk_fmt __used                      \
                __attribute__((section("__trace_printk_fmt"))) =        \
                __builtin_constant_p(str) ? str : NULL;                 \
                                                                        \
@@ -703,7 +684,7 @@ extern void trace_dump_stack(int skip);
 #define ftrace_vprintk(fmt, vargs)                                     \
 do {                                                                   \
        if (__builtin_constant_p(fmt)) {                                \
-               static const char *trace_printk_fmt                     \
+               static const char *trace_printk_fmt __used              \
                  __attribute__((section("__trace_printk_fmt"))) =      \
                        __builtin_constant_p(fmt) ? fmt : NULL;         \
                                                                        \
This page took 0.037217 seconds and 5 git commands to generate.