@@ -220,9 +220,6 @@ int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
220
220
}
221
221
#endif /* CONFIG_PRINTK && CONFIG_SYSCTL */
222
222
223
- /* Number of registered extended console drivers. */
224
- static int nr_ext_console_drivers ;
225
-
226
223
/*
227
224
* Helper macros to handle lockdep when locking/unlocking console_sem. We use
228
225
* macros instead of functions so that _RET_IP_ contains useful information.
@@ -433,7 +430,7 @@ static struct printk_ringbuffer *prb = &printk_rb_static;
433
430
* per_cpu_areas are initialised. This variable is set to true when
434
431
* it's safe to access per-CPU data.
435
432
*/
436
- static bool __printk_percpu_data_ready __read_mostly ;
433
+ static bool __printk_percpu_data_ready __ro_after_init ;
437
434
438
435
bool printk_percpu_data_ready (void )
439
436
{
@@ -2296,6 +2293,7 @@ asmlinkage __visible int _printk(const char *fmt, ...)
2296
2293
}
2297
2294
EXPORT_SYMBOL (_printk );
2298
2295
2296
+ static bool pr_flush (int timeout_ms , bool reset_on_progress );
2299
2297
static bool __pr_flush (struct console * con , int timeout_ms , bool reset_on_progress );
2300
2298
2301
2299
#else /* CONFIG_PRINTK */
@@ -2330,6 +2328,7 @@ static void call_console_driver(struct console *con, const char *text, size_t le
2330
2328
{
2331
2329
}
2332
2330
static bool suppress_message_printing (int level ) { return false; }
2331
+ static bool pr_flush (int timeout_ms , bool reset_on_progress ) { return true; }
2333
2332
static bool __pr_flush (struct console * con , int timeout_ms , bool reset_on_progress ) { return true; }
2334
2333
2335
2334
#endif /* CONFIG_PRINTK */
@@ -3186,9 +3185,6 @@ void register_console(struct console *newcon)
3186
3185
console_drivers -> next = newcon ;
3187
3186
}
3188
3187
3189
- if (newcon -> flags & CON_EXTENDED )
3190
- nr_ext_console_drivers ++ ;
3191
-
3192
3188
newcon -> dropped = 0 ;
3193
3189
if (newcon -> flags & CON_PRINTBUFFER ) {
3194
3190
/* Get a consistent copy of @syslog_seq. */
@@ -3213,9 +3209,6 @@ void register_console(struct console *newcon)
3213
3209
if (bootcon_enabled &&
3214
3210
((newcon -> flags & (CON_CONSDEV | CON_BOOT )) == CON_CONSDEV ) &&
3215
3211
!keep_bootcon ) {
3216
- /* We need to iterate through all boot consoles, to make
3217
- * sure we print everything out, before we unregister them.
3218
- */
3219
3212
for_each_console (con )
3220
3213
if (con -> flags & CON_BOOT )
3221
3214
unregister_console (con );
@@ -3254,9 +3247,6 @@ int unregister_console(struct console *console)
3254
3247
if (res )
3255
3248
goto out_disable_unlock ;
3256
3249
3257
- if (console -> flags & CON_EXTENDED )
3258
- nr_ext_console_drivers -- ;
3259
-
3260
3250
/*
3261
3251
* If this isn't the last console and it has CON_CONSDEV set, we
3262
3252
* 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
3438
3428
* Context: Process context. May sleep while acquiring console lock.
3439
3429
* Return: true if all enabled printers are caught up.
3440
3430
*/
3441
- bool pr_flush (int timeout_ms , bool reset_on_progress )
3431
+ static bool pr_flush (int timeout_ms , bool reset_on_progress )
3442
3432
{
3443
3433
return __pr_flush (NULL , timeout_ms , reset_on_progress );
3444
3434
}
3445
- EXPORT_SYMBOL (pr_flush );
3446
3435
3447
3436
/*
3448
3437
* Delayed printk version, for scheduler-internal messages:
0 commit comments