diff options
author | John Ogness <john.ogness@linutronix.de> | 2020-11-30 03:36:08 +0300 |
---|---|---|
committer | Minda Chen <minda.chen@starfivetech.com> | 2023-11-06 14:24:37 +0300 |
commit | 5c17a5c18154f25e16336b4127f8d14916d5d028 (patch) | |
tree | 185a229e9ce98986cc405a58e8f69991092e7dd0 /include | |
parent | 521f4e9654e4bb487ac41bfde16b2d8bcfa87ea8 (diff) | |
download | linux-5c17a5c18154f25e16336b4127f8d14916d5d028.tar.xz |
printk: remove deferred printing
Since printing occurs either atomically or from the printing
kthread, there is no need for any deferring or tracking possible
recursion paths. Remove all printk defer functions and context
tracking.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/printk.h | 34 | ||||
-rw-r--r-- | include/linux/suspend.h | 10 |
2 files changed, 2 insertions, 42 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index fb82a5e15b9d..9a7088a926c9 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -162,21 +162,6 @@ asmlinkage __printf(1, 2) __cold int _printk(const char *fmt, ...); /* - * Special printk facility for scheduler/timekeeping use only, _DO_NOT_USE_ ! - */ -__printf(1, 2) __cold int _printk_deferred(const char *fmt, ...); - -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 - -/* * Please don't use printk_ratelimit(), because it shares ratelimiting state * with all other unrelated printk_ratelimit() callsites. Instead use * printk_ratelimited() or plain old __ratelimit(). @@ -215,19 +200,6 @@ int _printk(const char *s, ...) { return 0; } -static inline __printf(1, 2) __cold -int _printk_deferred(const char *s, ...) -{ - return 0; -} - -static inline void printk_deferred_enter(void) -{ -} - -static inline void printk_deferred_exit(void) -{ -} static inline int printk_ratelimit(void) { @@ -471,8 +443,6 @@ struct pi_entry { * See the vsnprintf() documentation for format string extensions over C99. */ #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) -#define printk_deferred(fmt, ...) \ - printk_index_wrap(_printk_deferred, fmt, ##__VA_ARGS__) /** * pr_emerg - Print an emergency-level message @@ -610,13 +580,9 @@ struct pi_entry { #ifdef CONFIG_PRINTK #define printk_once(fmt, ...) \ DO_ONCE_LITE(printk, fmt, ##__VA_ARGS__) -#define printk_deferred_once(fmt, ...) \ - DO_ONCE_LITE(printk_deferred, fmt, ##__VA_ARGS__) #else #define printk_once(fmt, ...) \ no_printk(fmt, ##__VA_ARGS__) -#define printk_deferred_once(fmt, ...) \ - no_printk(fmt, ##__VA_ARGS__) #endif #define pr_emerg_once(fmt, ...) \ diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 8af13ba60c7e..79b6933ef8a0 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -550,23 +550,17 @@ static inline void unlock_system_sleep(void) {} #ifdef CONFIG_PM_SLEEP_DEBUG extern bool pm_print_times_enabled; extern bool pm_debug_messages_on; -extern __printf(2, 3) void __pm_pr_dbg(bool defer, const char *fmt, ...); +extern __printf(1, 2) void pm_pr_dbg(const char *fmt, ...); #else #define pm_print_times_enabled (false) #define pm_debug_messages_on (false) #include <linux/printk.h> -#define __pm_pr_dbg(defer, fmt, ...) \ +#define pm_pr_dbg(fmt, ...) \ no_printk(KERN_DEBUG fmt, ##__VA_ARGS__) #endif -#define pm_pr_dbg(fmt, ...) \ - __pm_pr_dbg(false, fmt, ##__VA_ARGS__) - -#define pm_deferred_pr_dbg(fmt, ...) \ - __pm_pr_dbg(true, fmt, ##__VA_ARGS__) - #ifdef CONFIG_PM_AUTOSLEEP /* kernel/power/autosleep.c */ |