aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-08-12 15:38:56 -0400
committerIngo Molnar <mingo@elte.hu>2010-08-12 15:39:04 -0400
commitf46a6804135795f77d096ab0128f27531c7d051c (patch)
tree7cd33f69e3661327739ae4c96e5a8389e7fc912e /include/linux/kernel.h
parentb3e84ffa21f916e3354a12a7f19169c9febe96d0 (diff)
parentad41a1e0cab07c5125456e8d38e5b1ab148d04aa (diff)
Merge branch 'linus' into perf/urgent
Merge reason: Fix upstream breakage introduced by: de5d9bf: Move list types from <linux/list.h> to <linux/types.h>. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index adee958b5989..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
174struct va_format {
175 const char *fmt;
176 va_list *va;
177};
178
174extern struct atomic_notifier_head panic_notifier_list; 179extern struct atomic_notifier_head panic_notifier_list;
175extern long (*panic_blink)(long time); 180extern long (*panic_blink)(int state);
176NORET_TYPE void panic(const char * fmt, ...) 181NORET_TYPE void panic(const char * fmt, ...)
177 __attribute__ ((NORET_AND format (printf, 1, 2))) __cold; 182 __attribute__ ((NORET_AND format (printf, 1, 2))) __cold;
178extern void oops_enter(void); 183extern void oops_enter(void);
179extern void oops_exit(void); 184extern void oops_exit(void);
185void print_oops_end_marker(void);
180extern int oops_may_print(void); 186extern int oops_may_print(void);
181NORET_TYPE void do_exit(long error_code) 187NORET_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
251asmlinkage int vprintk(const char *fmt, va_list args) 264asmlinkage 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 */
313static inline __attribute__ ((format (printf, 1, 2)))
314int no_printk(const char *s, ...) { return 0; }
315
296extern int printk_needs_cpu(int cpu); 316extern int printk_needs_cpu(int cpu);
297extern void printk_tick(void); 317extern void printk_tick(void);
298 318
@@ -604,17 +624,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
604#endif /* CONFIG_TRACING */ 624#endif /* CONFIG_TRACING */
605 625
606/* 626/*
607 * Display an IP address in readable format.
608 */
609
610#define NIPQUAD(addr) \
611 ((unsigned char *)&addr)[0], \
612 ((unsigned char *)&addr)[1], \
613 ((unsigned char *)&addr)[2], \
614 ((unsigned char *)&addr)[3]
615#define NIPQUAD_FMT "%u.%u.%u.%u"
616
617/*
618 * min()/max()/clamp() macros that also do 627 * min()/max()/clamp() macros that also do
619 * strict type-checking.. See the 628 * strict type-checking.. See the
620 * "unnecessary" pointer comparison. 629 * "unnecessary" pointer comparison.
@@ -723,12 +732,6 @@ extern int do_sysinfo(struct sysinfo *info);
723 732
724#endif /* __KERNEL__ */ 733#endif /* __KERNEL__ */
725 734
726#ifndef __EXPORTED_HEADERS__
727#ifndef __KERNEL__
728#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
729#endif /* __KERNEL__ */
730#endif /* __EXPORTED_HEADERS__ */
731
732#define SI_LOAD_SHIFT 16 735#define SI_LOAD_SHIFT 16
733struct sysinfo { 736struct sysinfo {
734 long uptime; /* Seconds since boot */ 737 long uptime; /* Seconds since boot */