diff --git a/include/linux/printk.h b/include/linux/printk.h index 895a46da8827772a81cc3e3c64ac4aa22d37239f..c2e583c0b303c4a53d18e1939211dc18b6adc93c 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -570,4 +570,23 @@ static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type, } #endif +#ifdef CONFIG_PRINTK +extern void printk_safe_enter(void); +extern void printk_safe_exit(void); +/* + * The printk_deferred_enter/exit macros are available only as a hack for + * some code paths that need to defer all printk console printing. Interrupts + * must be disabled for the deferred duration. + */ +#define printk_deferred_enter printk_safe_enter +#define printk_deferred_exit printk_safe_exit +#else +static inline void printk_deferred_enter(void) +{ +} +static inline void printk_deferred_exit(void) +{ +} +#endif + #endif