diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 8317ec4b9f3b..2b0a35e6bc69 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -171,12 +171,18 @@ static inline void might_fault(void) | |||
171 | } | 171 | } |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | struct va_format { | ||
175 | const char *fmt; | ||
176 | va_list *va; | ||
177 | }; | ||
178 | |||
174 | extern struct atomic_notifier_head panic_notifier_list; | 179 | extern struct atomic_notifier_head panic_notifier_list; |
175 | extern long (*panic_blink)(long time); | 180 | extern long (*panic_blink)(int state); |
176 | NORET_TYPE void panic(const char * fmt, ...) | 181 | NORET_TYPE void panic(const char * fmt, ...) |
177 | __attribute__ ((NORET_AND format (printf, 1, 2))) __cold; | 182 | __attribute__ ((NORET_AND format (printf, 1, 2))) __cold; |
178 | extern void oops_enter(void); | 183 | extern void oops_enter(void); |
179 | extern void oops_exit(void); | 184 | extern void oops_exit(void); |
185 | void print_oops_end_marker(void); | ||
180 | extern int oops_may_print(void); | 186 | extern int oops_may_print(void); |
181 | NORET_TYPE void do_exit(long error_code) | 187 | NORET_TYPE void do_exit(long error_code) |
182 | ATTRIB_NORET; | 188 | ATTRIB_NORET; |
@@ -247,6 +253,13 @@ extern struct pid *session_of_pgrp(struct pid *pgrp); | |||
247 | #define FW_WARN "[Firmware Warn]: " | 253 | #define FW_WARN "[Firmware Warn]: " |
248 | #define FW_INFO "[Firmware Info]: " | 254 | #define FW_INFO "[Firmware Info]: " |
249 | 255 | ||
256 | /* | ||
257 | * HW_ERR | ||
258 | * Add this to a message for hardware errors, so that user can report | ||
259 | * it to hardware vendor instead of LKML or software vendor. | ||
260 | */ | ||
261 | #define HW_ERR "[Hardware Error]: " | ||
262 | |||
250 | #ifdef CONFIG_PRINTK | 263 | #ifdef CONFIG_PRINTK |
251 | asmlinkage int vprintk(const char *fmt, va_list args) | 264 | asmlinkage int vprintk(const char *fmt, va_list args) |
252 | __attribute__ ((format (printf, 1, 0))); | 265 | __attribute__ ((format (printf, 1, 0))); |
@@ -293,6 +306,13 @@ static inline void log_buf_kexec_setup(void) | |||
293 | } | 306 | } |
294 | #endif | 307 | #endif |
295 | 308 | ||
309 | /* | ||
310 | * Dummy printk for disabled debugging statements to use whilst maintaining | ||
311 | * gcc's format and side-effect checking. | ||
312 | */ | ||
313 | static inline __attribute__ ((format (printf, 1, 2))) | ||
314 | int no_printk(const char *s, ...) { return 0; } | ||
315 | |||
296 | extern int printk_needs_cpu(int cpu); | 316 | extern int printk_needs_cpu(int cpu); |
297 | extern void printk_tick(void); | 317 | extern void printk_tick(void); |
298 | 318 | ||
@@ -508,9 +528,6 @@ extern void tracing_start(void); | |||
508 | extern void tracing_stop(void); | 528 | extern void tracing_stop(void); |
509 | extern void ftrace_off_permanent(void); | 529 | extern void ftrace_off_permanent(void); |
510 | 530 | ||
511 | extern void | ||
512 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3); | ||
513 | |||
514 | static inline void __attribute__ ((format (printf, 1, 2))) | 531 | static inline void __attribute__ ((format (printf, 1, 2))) |
515 | ____trace_printk_check_format(const char *fmt, ...) | 532 | ____trace_printk_check_format(const char *fmt, ...) |
516 | { | 533 | { |
@@ -586,8 +603,6 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); | |||
586 | 603 | ||
587 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); | 604 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); |
588 | #else | 605 | #else |
589 | static inline void | ||
590 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } | ||
591 | static inline int | 606 | static inline int |
592 | trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); | 607 | trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); |
593 | 608 | ||
@@ -609,17 +624,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
609 | #endif /* CONFIG_TRACING */ | 624 | #endif /* CONFIG_TRACING */ |
610 | 625 | ||
611 | /* | 626 | /* |
612 | * Display an IP address in readable format. | ||
613 | */ | ||
614 | |||
615 | #define NIPQUAD(addr) \ | ||
616 | ((unsigned char *)&addr)[0], \ | ||
617 | ((unsigned char *)&addr)[1], \ | ||
618 | ((unsigned char *)&addr)[2], \ | ||
619 | ((unsigned char *)&addr)[3] | ||
620 | #define NIPQUAD_FMT "%u.%u.%u.%u" | ||
621 | |||
622 | /* | ||
623 | * min()/max()/clamp() macros that also do | 627 | * min()/max()/clamp() macros that also do |
624 | * strict type-checking.. See the | 628 | * strict type-checking.. See the |
625 | * "unnecessary" pointer comparison. | 629 | * "unnecessary" pointer comparison. |
@@ -728,12 +732,6 @@ extern int do_sysinfo(struct sysinfo *info); | |||
728 | 732 | ||
729 | #endif /* __KERNEL__ */ | 733 | #endif /* __KERNEL__ */ |
730 | 734 | ||
731 | #ifndef __EXPORTED_HEADERS__ | ||
732 | #ifndef __KERNEL__ | ||
733 | #warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders | ||
734 | #endif /* __KERNEL__ */ | ||
735 | #endif /* __EXPORTED_HEADERS__ */ | ||
736 | |||
737 | #define SI_LOAD_SHIFT 16 | 735 | #define SI_LOAD_SHIFT 16 |
738 | struct sysinfo { | 736 | struct sysinfo { |
739 | long uptime; /* Seconds since boot */ | 737 | long uptime; /* Seconds since boot */ |