Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
86098bcd
Commit
86098bcd
authored
Nov 02, 2023
by
Petr Mladek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rework/misc-cleanups' into for-linus
parents
adb982ad
29fda1ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
kernel/printk/printk.c
kernel/printk/printk.c
+13
-13
No files found.
kernel/printk/printk.c
View file @
86098bcd
...
...
@@ -3727,7 +3727,8 @@ late_initcall(printk_late_init);
/* If @con is specified, only wait for that console. Otherwise wait for all. */
static
bool
__pr_flush
(
struct
console
*
con
,
int
timeout_ms
,
bool
reset_on_progress
)
{
int
remaining
=
timeout_ms
;
unsigned
long
timeout_jiffies
=
msecs_to_jiffies
(
timeout_ms
);
unsigned
long
remaining_jiffies
=
timeout_jiffies
;
struct
console
*
c
;
u64
last_diff
=
0
;
u64
printk_seq
;
...
...
@@ -3744,6 +3745,9 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre
console_unlock
();
for
(;;)
{
unsigned
long
begin_jiffies
;
unsigned
long
slept_jiffies
;
diff
=
0
;
/*
...
...
@@ -3772,24 +3776,20 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre
console_srcu_read_unlock
(
cookie
);
if
(
diff
!=
last_diff
&&
reset_on_progress
)
remaining
=
timeout_m
s
;
remaining
_jiffies
=
timeout_jiffie
s
;
console_unlock
();
/* Note: @diff is 0 if there are no usable consoles. */
if
(
diff
==
0
||
remaining
==
0
)
if
(
diff
==
0
||
remaining
_jiffies
==
0
)
break
;
if
(
remaining
<
0
)
{
/* no timeout limit */
msleep
(
100
);
}
else
if
(
remaining
<
100
)
{
msleep
(
remaining
);
remaining
=
0
;
}
else
{
msleep
(
100
);
remaining
-=
100
;
}
/* msleep(1) might sleep much longer. Check time by jiffies. */
begin_jiffies
=
jiffies
;
msleep
(
1
);
slept_jiffies
=
jiffies
-
begin_jiffies
;
remaining_jiffies
-=
min
(
slept_jiffies
,
remaining_jiffies
);
last_diff
=
diff
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment