summaryrefslogtreecommitdiffstats
path: root/kernel/printk/printk.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2022-09-24 02:04:41 +0200
committerPetr Mladek <pmladek@suse.com>2022-09-29 15:20:52 +0200
commit78ba392c84c74903b979c1ef5ded93430acd9ad6 (patch)
tree8771cdf3c77493714f65cfc0af68c802c06a54c3 /kernel/printk/printk.c
parentprintk: Remove bogus comment vs. boot consoles (diff)
downloadlinux-78ba392c84c74903b979c1ef5ded93430acd9ad6.tar.xz
linux-78ba392c84c74903b979c1ef5ded93430acd9ad6.zip
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
Diffstat (limited to 'kernel/printk/printk.c')
-rw-r--r--kernel/printk/printk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 770511b89504..e4f1e7478b52 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -430,7 +430,7 @@ static struct printk_ringbuffer *prb = &printk_rb_static;
* per_cpu_areas are initialised. This variable is set to true when
* 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)
{