diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 21:08:07 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 21:08:07 -0400 |
| commit | d52bd54db8be8999df6df5a776f38c4f8b5e9cea (patch) | |
| tree | 0d8f436e959bb975c002ddf12ea1bdc9adadd04f /include/linux/printk.h | |
| parent | 8cbdd85bda499d028b8f128191f392d701e8e41d (diff) | |
| parent | 3bd080e4d8f2351ee3e143f0ec9307cc95ae6639 (diff) | |
Merge branch 'akpm' (patches from Andrew)
Merge yet more updates from Andrew Morton:
- the rest of ocfs2
- various hotfixes, mainly MM
- quite a bit of misc stuff - drivers, fork, exec, signals, etc.
- printk updates
- firmware
- checkpatch
- nilfs2
- more kexec stuff than usual
- rapidio updates
- w1 things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (111 commits)
ipc: delete "nr_ipc_ns"
kcov: allow more fine-grained coverage instrumentation
init/Kconfig: add clarification for out-of-tree modules
config: add android config fragments
init/Kconfig: ban CONFIG_LOCALVERSION_AUTO with allmodconfig
relay: add global mode support for buffer-only channels
init: allow blacklisting of module_init functions
w1:omap_hdq: fix regression
w1: add helper macro module_w1_family
w1: remove need for ida and use PLATFORM_DEVID_AUTO
rapidio/switches: add driver for IDT gen3 switches
powerpc/fsl_rio: apply changes for RIO spec rev 3
rapidio: modify for rev.3 specification changes
rapidio: change inbound window size type to u64
rapidio/idt_gen2: fix locking warning
rapidio: fix error handling in mbox request/release functions
rapidio/tsi721_dma: advance queue processing from transfer submit call
rapidio/tsi721: add messaging mbox selector parameter
rapidio/tsi721: add PCIe MRRS override parameter
rapidio/tsi721_dma: add channel mask and queue size parameters
...
Diffstat (limited to 'include/linux/printk.h')
| -rw-r--r-- | include/linux/printk.h | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index f136b22c7772..8dc155dab3ed 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -61,6 +61,11 @@ static inline void console_verbose(void) | |||
| 61 | console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH; | 61 | console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | /* strlen("ratelimit") + 1 */ | ||
| 65 | #define DEVKMSG_STR_MAX_SIZE 10 | ||
| 66 | extern char devkmsg_log_str[]; | ||
| 67 | struct ctl_table; | ||
| 68 | |||
| 64 | struct va_format { | 69 | struct va_format { |
| 65 | const char *fmt; | 70 | const char *fmt; |
| 66 | va_list *va; | 71 | va_list *va; |
| @@ -175,6 +180,10 @@ extern int printk_delay_msec; | |||
| 175 | extern int dmesg_restrict; | 180 | extern int dmesg_restrict; |
| 176 | extern int kptr_restrict; | 181 | extern int kptr_restrict; |
| 177 | 182 | ||
| 183 | extern int | ||
| 184 | devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf, | ||
| 185 | size_t *lenp, loff_t *ppos); | ||
| 186 | |||
| 178 | extern void wake_up_klogd(void); | 187 | extern void wake_up_klogd(void); |
| 179 | 188 | ||
| 180 | char *log_buf_addr_get(void); | 189 | char *log_buf_addr_get(void); |
| @@ -257,21 +266,39 @@ extern asmlinkage void dump_stack(void) __cold; | |||
| 257 | * and other debug macros are compiled out unless either DEBUG is defined | 266 | * and other debug macros are compiled out unless either DEBUG is defined |
| 258 | * or CONFIG_DYNAMIC_DEBUG is set. | 267 | * or CONFIG_DYNAMIC_DEBUG is set. |
| 259 | */ | 268 | */ |
| 260 | #define pr_emerg(fmt, ...) \ | 269 | |
| 261 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | 270 | #ifdef CONFIG_PRINTK |
| 262 | #define pr_alert(fmt, ...) \ | 271 | |
| 263 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | 272 | asmlinkage __printf(1, 2) __cold void __pr_emerg(const char *fmt, ...); |
| 264 | #define pr_crit(fmt, ...) \ | 273 | asmlinkage __printf(1, 2) __cold void __pr_alert(const char *fmt, ...); |
| 265 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | 274 | asmlinkage __printf(1, 2) __cold void __pr_crit(const char *fmt, ...); |
| 266 | #define pr_err(fmt, ...) \ | 275 | asmlinkage __printf(1, 2) __cold void __pr_err(const char *fmt, ...); |
| 267 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | 276 | asmlinkage __printf(1, 2) __cold void __pr_warn(const char *fmt, ...); |
| 268 | #define pr_warning(fmt, ...) \ | 277 | asmlinkage __printf(1, 2) __cold void __pr_notice(const char *fmt, ...); |
| 269 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | 278 | asmlinkage __printf(1, 2) __cold void __pr_info(const char *fmt, ...); |
| 270 | #define pr_warn pr_warning | 279 | |
| 271 | #define pr_notice(fmt, ...) \ | 280 | #define pr_emerg(fmt, ...) __pr_emerg(pr_fmt(fmt), ##__VA_ARGS__) |
| 272 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | 281 | #define pr_alert(fmt, ...) __pr_alert(pr_fmt(fmt), ##__VA_ARGS__) |
| 273 | #define pr_info(fmt, ...) \ | 282 | #define pr_crit(fmt, ...) __pr_crit(pr_fmt(fmt), ##__VA_ARGS__) |
| 274 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 283 | #define pr_err(fmt, ...) __pr_err(pr_fmt(fmt), ##__VA_ARGS__) |
| 284 | #define pr_warn(fmt, ...) __pr_warn(pr_fmt(fmt), ##__VA_ARGS__) | ||
| 285 | #define pr_notice(fmt, ...) __pr_notice(pr_fmt(fmt), ##__VA_ARGS__) | ||
| 286 | #define pr_info(fmt, ...) __pr_info(pr_fmt(fmt), ##__VA_ARGS__) | ||
| 287 | |||
| 288 | #else | ||
| 289 | |||
| 290 | #define pr_emerg(fmt, ...) printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) | ||
| 291 | #define pr_alert(fmt, ...) printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 292 | #define pr_crit(fmt, ...) printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) | ||
| 293 | #define pr_err(fmt, ...) printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ||
| 294 | #define pr_warn(fmt, ...) printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ||
| 295 | #define pr_notice(fmt, ...) printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
| 296 | #define pr_info(fmt, ...) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
| 297 | |||
| 298 | #endif | ||
| 299 | |||
| 300 | #define pr_warning pr_warn | ||
| 301 | |||
| 275 | /* | 302 | /* |
| 276 | * Like KERN_CONT, pr_cont() should only be used when continuing | 303 | * Like KERN_CONT, pr_cont() should only be used when continuing |
| 277 | * a line with no newline ('\n') enclosed. Otherwise it defaults | 304 | * a line with no newline ('\n') enclosed. Otherwise it defaults |
| @@ -289,10 +316,11 @@ extern asmlinkage void dump_stack(void) __cold; | |||
| 289 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 316 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
| 290 | #endif | 317 | #endif |
| 291 | 318 | ||
| 292 | #include <linux/dynamic_debug.h> | ||
| 293 | 319 | ||
| 294 | /* If you are writing a driver, please use dev_dbg instead */ | 320 | /* If you are writing a driver, please use dev_dbg instead */ |
| 295 | #if defined(CONFIG_DYNAMIC_DEBUG) | 321 | #if defined(CONFIG_DYNAMIC_DEBUG) |
| 322 | #include <linux/dynamic_debug.h> | ||
| 323 | |||
| 296 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | 324 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ |
| 297 | #define pr_debug(fmt, ...) \ | 325 | #define pr_debug(fmt, ...) \ |
| 298 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | 326 | dynamic_pr_debug(fmt, ##__VA_ARGS__) |
