printk: Mark __printk percpu data ready __ro_after_init

This variable cannot change post boot.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220924000454.3319186-6-john.ogness@linutronix.de
This commit is contained in:
Thomas Gleixner 2022-09-24 02:10:41 +02:06 committed by Petr Mladek
parent eb4531b346
commit 78ba392c84

View File

@ -430,7 +430,7 @@ static struct printk_ringbuffer *prb = &printk_rb_static;
* per_cpu_areas are initialised. This variable is set to true when * per_cpu_areas are initialised. This variable is set to true when
* it's safe to access per-CPU data. * it's safe to access per-CPU data.
*/ */
static bool __printk_percpu_data_ready __read_mostly; static bool __printk_percpu_data_ready __ro_after_init;
bool printk_percpu_data_ready(void) bool printk_percpu_data_ready(void)
{ {