hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/linux/printk.h
....@@ -45,12 +45,6 @@
4545
4646 #define CONSOLE_EXT_LOG_MAX 8192
4747
48
-/*
49
- * The maximum size of a record formatted for console printing
50
- * (i.e. with the prefix prepended to every line).
51
- */
52
-#define CONSOLE_LOG_MAX 4096
53
-
5448 /* printk's without a loglevel use this.. */
5549 #define MESSAGE_LOGLEVEL_DEFAULT CONFIG_MESSAGE_LOGLEVEL_DEFAULT
5650
....@@ -154,6 +148,18 @@
154148 void early_printk(const char *s, ...) { }
155149 #endif
156150
151
+#ifdef CONFIG_PRINTK_NMI
152
+extern void printk_nmi_enter(void);
153
+extern void printk_nmi_exit(void);
154
+extern void printk_nmi_direct_enter(void);
155
+extern void printk_nmi_direct_exit(void);
156
+#else
157
+static inline void printk_nmi_enter(void) { }
158
+static inline void printk_nmi_exit(void) { }
159
+static inline void printk_nmi_direct_enter(void) { }
160
+static inline void printk_nmi_direct_exit(void) { }
161
+#endif /* PRINTK_NMI */
162
+
157163 struct dev_printk_info;
158164
159165 #ifdef CONFIG_PRINTK
....@@ -201,6 +207,8 @@
201207 void show_regs_print_info(const char *log_lvl);
202208 extern asmlinkage void dump_stack_lvl(const char *log_lvl) __cold;
203209 extern asmlinkage void dump_stack(void) __cold;
210
+extern void printk_safe_flush(void);
211
+extern void printk_safe_flush_on_panic(void);
204212 #else
205213 static inline __printf(1, 0)
206214 int vprintk(const char *s, va_list args)
....@@ -266,6 +274,14 @@
266274 }
267275
268276 static inline void dump_stack(void)
277
+{
278
+}
279
+
280
+static inline void printk_safe_flush(void)
281
+{
282
+}
283
+
284
+static inline void printk_safe_flush_on_panic(void)
269285 {
270286 }
271287 #endif
....@@ -484,8 +500,6 @@
484500 #define pr_debug_once(fmt, ...) \
485501 no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
486502 #endif
487
-
488
-bool pr_flush(int timeout_ms, bool reset_on_progress);
489503
490504 /*
491505 * ratelimited messages with local ratelimit_state,