diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7fa371898e3e..556d781e69fe 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/log2.h> | 16 | #include <linux/log2.h> |
17 | #include <linux/typecheck.h> | 17 | #include <linux/typecheck.h> |
18 | #include <linux/ratelimit.h> | 18 | #include <linux/ratelimit.h> |
19 | #include <linux/dynamic_printk.h> | 19 | #include <linux/dynamic_debug.h> |
20 | #include <asm/byteorder.h> | 20 | #include <asm/byteorder.h> |
21 | #include <asm/bug.h> | 21 | #include <asm/bug.h> |
22 | 22 | ||
@@ -242,6 +242,7 @@ extern struct ratelimit_state printk_ratelimit_state; | |||
242 | extern int printk_ratelimit(void); | 242 | extern int printk_ratelimit(void); |
243 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 243 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
244 | unsigned int interval_msec); | 244 | unsigned int interval_msec); |
245 | void log_buf_kexec_setup(void); | ||
245 | #else | 246 | #else |
246 | static inline int vprintk(const char *s, va_list args) | 247 | static inline int vprintk(const char *s, va_list args) |
247 | __attribute__ ((format (printf, 1, 0))); | 248 | __attribute__ ((format (printf, 1, 0))); |
@@ -253,6 +254,9 @@ static inline int printk_ratelimit(void) { return 0; } | |||
253 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | 254 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ |
254 | unsigned int interval_msec) \ | 255 | unsigned int interval_msec) \ |
255 | { return false; } | 256 | { return false; } |
257 | static inline void log_buf_kexec_setup(void) | ||
258 | { | ||
259 | } | ||
256 | #endif | 260 | #endif |
257 | 261 | ||
258 | extern int printk_needs_cpu(int cpu); | 262 | extern int printk_needs_cpu(int cpu); |
@@ -353,14 +357,17 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
353 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | 357 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) |
354 | #define pr_info(fmt, ...) \ | 358 | #define pr_info(fmt, ...) \ |
355 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 359 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
360 | #define pr_cont(fmt, ...) \ | ||
361 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
356 | 362 | ||
357 | /* If you are writing a driver, please use dev_dbg instead */ | 363 | /* If you are writing a driver, please use dev_dbg instead */ |
358 | #if defined(DEBUG) | 364 | #if defined(DEBUG) |
359 | #define pr_debug(fmt, ...) \ | 365 | #define pr_debug(fmt, ...) \ |
360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 366 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
361 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 367 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
368 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
362 | #define pr_debug(fmt, ...) do { \ | 369 | #define pr_debug(fmt, ...) do { \ |
363 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 370 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ |
364 | } while (0) | 371 | } while (0) |
365 | #else | 372 | #else |
366 | #define pr_debug(fmt, ...) \ | 373 | #define pr_debug(fmt, ...) \ |
@@ -378,18 +385,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
378 | ((unsigned char *)&addr)[3] | 385 | ((unsigned char *)&addr)[3] |
379 | #define NIPQUAD_FMT "%u.%u.%u.%u" | 386 | #define NIPQUAD_FMT "%u.%u.%u.%u" |
380 | 387 | ||
381 | #if defined(__LITTLE_ENDIAN) | ||
382 | #define HIPQUAD(addr) \ | ||
383 | ((unsigned char *)&addr)[3], \ | ||
384 | ((unsigned char *)&addr)[2], \ | ||
385 | ((unsigned char *)&addr)[1], \ | ||
386 | ((unsigned char *)&addr)[0] | ||
387 | #elif defined(__BIG_ENDIAN) | ||
388 | #define HIPQUAD NIPQUAD | ||
389 | #else | ||
390 | #error "Please fix asm/byteorder.h" | ||
391 | #endif /* __LITTLE_ENDIAN */ | ||
392 | |||
393 | /* | 388 | /* |
394 | * min()/max()/clamp() macros that also do | 389 | * min()/max()/clamp() macros that also do |
395 | * strict type-checking.. See the | 390 | * strict type-checking.. See the |