author: John Ogness <john.ogness@linutronix.de> 2020-11-30 01:42:03 +0106
committer: Minda Chen <minda.chen@starfivetech.com> 2023-11-06 19:24:37 +0800
commit: 0685e84413745c7fbc0c71893102d0acf67a1a96
parent: e87d635bbace7e3d37cae016a34cef8f490ed4ef
Commit Summary:
Diffstat:
1 file changed, 12 insertions, 12 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index c344072fc0d5..1b1236e0f3ba 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1748,6 +1748,20 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len)
return do_syslog(type, buf, len, SYSLOG_FROM_READER);
}
+int printk_delay_msec __read_mostly;
+
+static inline void printk_delay(void)
+{
+ if (unlikely(printk_delay_msec)) {
+ int m = printk_delay_msec;
+
+ while (m--) {
+ mdelay(1);
+ touch_nmi_watchdog();
+ }
+ }
+}
+
/*
* Special console_lock variants that help to reduce the risk of soft-lockups.
* They allow to pass console_lock to another printk() call using a busy wait.
@@ -2002,20 +2016,6 @@ static u8 *__printk_recursion_counter(void)
local_irq_restore(flags); \
} while (0)
-int printk_delay_msec __read_mostly;
-
-static inline void printk_delay(void)
-{
- if (unlikely(printk_delay_msec)) {
- int m = printk_delay_msec;
-
- while (m--) {
- mdelay(1);
- touch_nmi_watchdog();
- }
- }
-}
-
static inline u32 printk_caller_id(void)
{
return in_task() ? task_pid_nr(current) :