Skip to content

Commit c77ae0b

Browse files
committed
Merge branch 'rework/kthreads' into for-linus
2 parents da743a9 + 78ba392 commit c77ae0b

File tree

4 files changed

+7
-24
lines changed

4 files changed

+7
-24
lines changed

fs/proc/kmsg.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include <linux/uaccess.h>
1919
#include <asm/io.h>
2020

21-
extern wait_queue_head_t log_wait;
22-
2321
static int kmsg_open(struct inode * inode, struct file * file)
2422
{
2523
return do_syslog(SYSLOG_ACTION_OPEN, NULL, 0, SYSLOG_FROM_PROC);

include/linux/printk.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ extern void __printk_safe_exit(void);
169169
#define printk_deferred_enter __printk_safe_enter
170170
#define printk_deferred_exit __printk_safe_exit
171171

172-
extern bool pr_flush(int timeout_ms, bool reset_on_progress);
173-
174172
/*
175173
* Please don't use printk_ratelimit(), because it shares ratelimiting state
176174
* with all other unrelated printk_ratelimit() callsites. Instead use
@@ -221,11 +219,6 @@ static inline void printk_deferred_exit(void)
221219
{
222220
}
223221

224-
static inline bool pr_flush(int timeout_ms, bool reset_on_progress)
225-
{
226-
return true;
227-
}
228-
229222
static inline int printk_ratelimit(void)
230223
{
231224
return 0;

include/linux/syslog.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#ifndef _LINUX_SYSLOG_H
99
#define _LINUX_SYSLOG_H
1010

11+
#include <linux/wait.h>
12+
1113
/* Close the log. Currently a NOP. */
1214
#define SYSLOG_ACTION_CLOSE 0
1315
/* Open the log. Currently a NOP. */
@@ -35,5 +37,6 @@
3537
#define SYSLOG_FROM_PROC 1
3638

3739
int do_syslog(int type, char __user *buf, int count, int source);
40+
extern wait_queue_head_t log_wait;
3841

3942
#endif /* _LINUX_SYSLOG_H */

kernel/printk/printk.c

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,6 @@ int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
220220
}
221221
#endif /* CONFIG_PRINTK && CONFIG_SYSCTL */
222222

223-
/* Number of registered extended console drivers. */
224-
static int nr_ext_console_drivers;
225-
226223
/*
227224
* Helper macros to handle lockdep when locking/unlocking console_sem. We use
228225
* macros instead of functions so that _RET_IP_ contains useful information.
@@ -433,7 +430,7 @@ static struct printk_ringbuffer *prb = &printk_rb_static;
433430
* per_cpu_areas are initialised. This variable is set to true when
434431
* it's safe to access per-CPU data.
435432
*/
436-
static bool __printk_percpu_data_ready __read_mostly;
433+
static bool __printk_percpu_data_ready __ro_after_init;
437434

438435
bool printk_percpu_data_ready(void)
439436
{
@@ -2296,6 +2293,7 @@ asmlinkage __visible int _printk(const char *fmt, ...)
22962293
}
22972294
EXPORT_SYMBOL(_printk);
22982295

2296+
static bool pr_flush(int timeout_ms, bool reset_on_progress);
22992297
static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress);
23002298

23012299
#else /* CONFIG_PRINTK */
@@ -2330,6 +2328,7 @@ static void call_console_driver(struct console *con, const char *text, size_t le
23302328
{
23312329
}
23322330
static bool suppress_message_printing(int level) { return false; }
2331+
static bool pr_flush(int timeout_ms, bool reset_on_progress) { return true; }
23332332
static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress) { return true; }
23342333

23352334
#endif /* CONFIG_PRINTK */
@@ -3186,9 +3185,6 @@ void register_console(struct console *newcon)
31863185
console_drivers->next = newcon;
31873186
}
31883187

3189-
if (newcon->flags & CON_EXTENDED)
3190-
nr_ext_console_drivers++;
3191-
31923188
newcon->dropped = 0;
31933189
if (newcon->flags & CON_PRINTBUFFER) {
31943190
/* Get a consistent copy of @syslog_seq. */
@@ -3213,9 +3209,6 @@ void register_console(struct console *newcon)
32133209
if (bootcon_enabled &&
32143210
((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) &&
32153211
!keep_bootcon) {
3216-
/* We need to iterate through all boot consoles, to make
3217-
* sure we print everything out, before we unregister them.
3218-
*/
32193212
for_each_console(con)
32203213
if (con->flags & CON_BOOT)
32213214
unregister_console(con);
@@ -3254,9 +3247,6 @@ int unregister_console(struct console *console)
32543247
if (res)
32553248
goto out_disable_unlock;
32563249

3257-
if (console->flags & CON_EXTENDED)
3258-
nr_ext_console_drivers--;
3259-
32603250
/*
32613251
* If this isn't the last console and it has CON_CONSDEV set, we
32623252
* need to set it on the next preferred console.
@@ -3438,11 +3428,10 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre
34383428
* Context: Process context. May sleep while acquiring console lock.
34393429
* Return: true if all enabled printers are caught up.
34403430
*/
3441-
bool pr_flush(int timeout_ms, bool reset_on_progress)
3431+
static bool pr_flush(int timeout_ms, bool reset_on_progress)
34423432
{
34433433
return __pr_flush(NULL, timeout_ms, reset_on_progress);
34443434
}
3445-
EXPORT_SYMBOL(pr_flush);
34463435

34473436
/*
34483437
* Delayed printk version, for scheduler-internal messages:

0 commit comments

Comments
 (0)