diff options
Diffstat (limited to 'debian/patches-rt/0025-printk-remove-unused-code.patch')
-rw-r--r-- | debian/patches-rt/0025-printk-remove-unused-code.patch | 61 |
1 files changed, 24 insertions, 37 deletions
diff --git a/debian/patches-rt/0025-printk-remove-unused-code.patch b/debian/patches-rt/0025-printk-remove-unused-code.patch index 721617d8f..ae60cb659 100644 --- a/debian/patches-rt/0025-printk-remove-unused-code.patch +++ b/debian/patches-rt/0025-printk-remove-unused-code.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:30:03 +0100 Subject: [PATCH 25/25] printk: remove unused code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.0/older/patches-5.0.10-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2-rt1.tar.xz Code relating to the safe context and anything dealing with the previous log buffer implementation is no longer in use. Remove it. @@ -9,30 +9,18 @@ previous log buffer implementation is no longer in use. Remove it. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - kernel/printk/internal.h | 53 --------------- - kernel/printk/printk.c | 163 ++++------------------------------------------- + kernel/printk/internal.h | 41 ----------- + kernel/printk/printk.c | 161 ++++------------------------------------------- lib/bust_spinlocks.c | 3 - 3 files changed, 17 insertions(+), 202 deletions(-) + 3 files changed, 16 insertions(+), 189 deletions(-) delete mode 100644 kernel/printk/internal.h --- a/kernel/printk/internal.h +++ /dev/null -@@ -1,53 +0,0 @@ +@@ -1,41 +0,0 @@ +-/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * internal.h - printk internal definitions -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * as published by the Free Software Foundation; either version 2 -- * of the License, or (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, see <http://www.gnu.org/licenses/>. - */ -#include <linux/percpu.h> - @@ -73,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -#define printk_safe_exit_irq() local_irq_enable() --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -60,7 +60,6 @@ +@@ -61,7 +61,6 @@ #include "console_cmdline.h" #include "braille.h" @@ -81,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int console_printk[5] = { CONSOLE_LOGLEVEL_DEFAULT, /* console_loglevel */ -@@ -346,41 +345,6 @@ struct printk_log { +@@ -356,41 +355,6 @@ struct printk_log { #endif ; @@ -123,13 +111,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> DECLARE_STATIC_PRINTKRB_CPULOCK(printk_cpulock); #ifdef CONFIG_PRINTK -@@ -390,23 +354,15 @@ DECLARE_STATIC_PRINTKRB(printk_rb, CONFI +@@ -400,23 +364,15 @@ DECLARE_STATIC_PRINTKRB(printk_rb, CONFI static DEFINE_MUTEX(syslog_lock); DECLARE_STATIC_PRINTKRB_ITER(syslog_iter, &printk_rb); -DECLARE_WAIT_QUEUE_HEAD(log_wait); -/* the next printk record to read by syslog(READ) or /proc/kmsg */ -+/* the last printk record read by syslog(READ) or /proc/kmsg */ ++/* the last printk record to read by syslog(READ) or /proc/kmsg */ static u64 syslog_seq; static size_t syslog_partial; static bool syslog_time; @@ -142,14 +130,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> - static DEFINE_MUTEX(kmsg_dump_lock); --/* the next printk record to read after the last 'clear' command */ -+/* the last printk record at the last 'clear' command */ + /* the next printk record to read after the last 'clear' command */ static u64 clear_seq; -static u32 clear_idx; - #define PREFIX_MAX 32 - #define LOG_LINE_MAX (1024 - PREFIX_MAX) -@@ -414,24 +370,16 @@ static u32 clear_idx; + #ifdef CONFIG_PRINTK_CALLER + #define PREFIX_MAX 48 +@@ -428,24 +384,16 @@ static u32 clear_idx; #define LOG_LEVEL(v) ((v) & 0x07) #define LOG_FACILITY(v) ((v) >> 3 & 0xff) @@ -176,7 +163,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* human readable text of the record */ -@@ -944,11 +892,6 @@ const struct file_operations kmsg_fops = +@@ -970,11 +918,6 @@ const struct file_operations kmsg_fops = */ void log_buf_vmcoreinfo_setup(void) { @@ -188,7 +175,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Export struct printk_log size and field offsets. User space tools can * parse it and detect any changes to structure down the line. -@@ -961,6 +904,8 @@ void log_buf_vmcoreinfo_setup(void) +@@ -990,6 +933,8 @@ void log_buf_vmcoreinfo_setup(void) } #endif @@ -197,7 +184,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* requested log_buf_len from kernel cmdline */ static unsigned long __initdata new_log_buf_len; -@@ -1026,9 +971,12 @@ static void __init log_buf_add_cpu(void) +@@ -1055,9 +1000,12 @@ static void __init log_buf_add_cpu(void) #else /* !CONFIG_SMP */ static inline void log_buf_add_cpu(void) {} #endif /* CONFIG_SMP */ @@ -210,7 +197,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> unsigned long flags; char *new_log_buf; unsigned int free; -@@ -1067,6 +1015,7 @@ void __init setup_log_buf(int early) +@@ -1089,6 +1037,7 @@ void __init setup_log_buf(int early) pr_info("log_buf_len: %u bytes\n", log_buf_len); pr_info("early log buf free: %u(%u%%)\n", free, (free * 100) / __LOG_BUF_LEN); @@ -218,7 +205,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static bool __read_mostly ignore_loglevel; -@@ -1962,7 +1911,7 @@ asmlinkage int vprintk_emit(int facility +@@ -2009,7 +1958,7 @@ asmlinkage int vprintk_emit(int facility } EXPORT_SYMBOL(vprintk_emit); @@ -227,7 +214,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { return vprintk_emit(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args); } -@@ -2023,31 +1972,6 @@ asmlinkage __visible int printk(const ch +@@ -2070,31 +2019,6 @@ asmlinkage __visible int printk(const ch return r; } EXPORT_SYMBOL(printk); @@ -259,8 +246,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* CONFIG_PRINTK */ #ifdef CONFIG_EARLY_PRINTK -@@ -2343,15 +2267,10 @@ void console_unblank(void) - void console_flush_on_panic(void) +@@ -2391,15 +2315,10 @@ void console_unblank(void) + void console_flush_on_panic(enum con_flush_mode mode) { /* - * If someone else is holding the console lock, trylock will fail @@ -278,7 +265,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* -@@ -2700,43 +2619,6 @@ static int __init printk_late_init(void) +@@ -2748,43 +2667,6 @@ static int __init printk_late_init(void) late_initcall(printk_late_init); #if defined CONFIG_PRINTK @@ -322,7 +309,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static int printk_kthread_func(void *data) { struct prb_iterator iter; -@@ -2802,22 +2684,9 @@ static int __init init_printk_kthread(vo +@@ -2850,22 +2732,9 @@ static int __init init_printk_kthread(vo } late_initcall(init_printk_kthread); |