diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/crash_core.h | 3 | ||||
-rw-r--r-- | include/linux/debug_locks.h | 2 | ||||
-rw-r--r-- | include/linux/dev_printk.h | 8 | ||||
-rw-r--r-- | include/linux/kernel.h | 1 | ||||
-rw-r--r-- | include/linux/printk.h | 8 |
5 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/crash_core.h b/include/linux/crash_core.h index 6594dbc34a37..206bde8308b2 100644 --- a/include/linux/crash_core.h +++ b/include/linux/crash_core.h @@ -55,6 +55,9 @@ phys_addr_t paddr_vmcoreinfo_note(void); #define VMCOREINFO_OFFSET(name, field) \ vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ (unsigned long)offsetof(struct name, field)) +#define VMCOREINFO_TYPE_OFFSET(name, field) \ + vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", #name, #field, \ + (unsigned long)offsetof(name, field)) #define VMCOREINFO_LENGTH(name, value) \ vmcoreinfo_append_str("LENGTH(%s)=%lu\n", #name, (unsigned long)value) #define VMCOREINFO_NUMBER(name) \ diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index e7e45f0cc7da..2915f56ad421 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h @@ -2,9 +2,9 @@ #ifndef __LINUX_DEBUG_LOCKING_H #define __LINUX_DEBUG_LOCKING_H -#include <linux/kernel.h> #include <linux/atomic.h> #include <linux/bug.h> +#include <linux/printk.h> struct task_struct; diff --git a/include/linux/dev_printk.h b/include/linux/dev_printk.h index 3028b644b4fb..6f009559ee54 100644 --- a/include/linux/dev_printk.h +++ b/include/linux/dev_printk.h @@ -21,6 +21,14 @@ struct device; +#define PRINTK_INFO_SUBSYSTEM_LEN 16 +#define PRINTK_INFO_DEVICE_LEN 48 + +struct dev_printk_info { + char subsystem[PRINTK_INFO_SUBSYSTEM_LEN]; + char device[PRINTK_INFO_DEVICE_LEN]; +}; + #ifdef CONFIG_PRINTK __printf(3, 0) __cold diff --git a/include/linux/kernel.h b/include/linux/kernel.h index c25b8e41c0ea..e4aa29b1ad62 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -526,7 +526,6 @@ extern unsigned int sysctl_oops_all_cpu_backtrace; #endif /* CONFIG_SMP */ extern void bust_spinlocks(int yes); -extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ extern int panic_timeout; extern unsigned long panic_print; extern int panic_on_oops; diff --git a/include/linux/printk.h b/include/linux/printk.h index 34c1a7be3e01..78479633ccfc 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -12,6 +12,8 @@ extern const char linux_banner[]; extern const char linux_proc_banner[]; +extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ + #define PRINTK_MAX_SINGLE_HEADER_LEN 2 static inline int printk_get_level(const char *buffer) @@ -159,10 +161,12 @@ static inline void printk_nmi_direct_enter(void) { } static inline void printk_nmi_direct_exit(void) { } #endif /* PRINTK_NMI */ +struct dev_printk_info; + #ifdef CONFIG_PRINTK -asmlinkage __printf(5, 0) +asmlinkage __printf(4, 0) int vprintk_emit(int facility, int level, - const char *dict, size_t dictlen, + const struct dev_printk_info *dev_info, const char *fmt, va_list args); asmlinkage __printf(1, 0) |