1
0
linux/debian/patches-rt/0037-printk-nbcon-Use-raw_cpu_ptr-instead-of-open-coding.patch

30 lines
1.1 KiB
Diff
Raw Normal View History

From: John Ogness <john.ogness@linutronix.de>
Date: Tue, 27 Aug 2024 16:25:31 +0206
Subject: [PATCH 37/54] printk: nbcon: Use raw_cpu_ptr() instead of open coding
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.11/older/patches-6.11-rt7.tar.xz
There is no need to open code a non-migration-checking
this_cpu_ptr(). That is exactly what raw_cpu_ptr() is.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/87plpum4jw.fsf@jogness.linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/printk/nbcon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
@@ -998,8 +998,7 @@ static __ref unsigned int *nbcon_get_cpu
if (!printk_percpu_data_ready())
return &early_nbcon_pcpu_emergency_nesting;
- /* Open code this_cpu_ptr() without checking migration. */
- return per_cpu_ptr(&nbcon_pcpu_emergency_nesting, raw_smp_processor_id());
+ return raw_cpu_ptr(&nbcon_pcpu_emergency_nesting);
}
/**