summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/setup.c
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2024-11-20 22:23:48 +0100
committerAlexander Gordeev <agordeev@linux.ibm.com>2025-01-26 17:24:01 +0100
commitd20d8e51338fc39aedf98786a4e9b71d4af4bda7 (patch)
treeaba7ebf2af9eaa89c6197df6c5d3c610a22897db /arch/s390/kernel/setup.c
parentc09f8d0ad673afdfd5d097d95d2026a84fa4926e (diff)
s390/boot: Add bootdebug option to control debug messages
Suppress decompressor debug messages by default, similar to regular kernel debug messages that require 'DEBUG' or 'dyndbg' to be enabled (depending on CONFIG_DYNAMIC_DEBUG). Introduce a 'bootdebug' option to enable printing these messages when needed. All messages are still stored in the boot ring buffer regardless. To enable boot debug messages: bootdebug debug Or combine with 'earlyprintk' to print them without delay: bootdebug debug earlyprintk Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r--arch/s390/kernel/setup.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index feff1bb9ac2d..dd0979182890 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -160,6 +160,7 @@ struct oldmem_data __bootdata_preserved(oldmem_data);
char __bootdata(boot_rb)[PAGE_SIZE * 2];
bool __bootdata(boot_earlyprintk);
size_t __bootdata(boot_rb_off);
+bool __bootdata(bootdebug);
unsigned long __bootdata_preserved(VMALLOC_START);
EXPORT_SYMBOL(VMALLOC_START);
@@ -882,13 +883,18 @@ static void __init log_component_list(void)
}
/*
- * Print avoiding interpretation of % in buf
+ * Print avoiding interpretation of % in buf and taking bootdebug option
+ * into consideration.
*/
static void __init print_rb_entry(char *buf)
{
char fmt[] = KERN_SOH "0boot: %s";
+ int level = printk_get_level(buf);
- fmt[1] = printk_get_level(buf);
+ if (level == KERN_DEBUG[1] && !bootdebug)
+ return;
+
+ fmt[1] = level;
printk(fmt, printk_skip_level(buf));
}