summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/boot_data.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/boot_data.h')
-rw-r--r--arch/s390/include/asm/boot_data.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/s390/include/asm/boot_data.h b/arch/s390/include/asm/boot_data.h
index da5527c50738..73c441f5e99a 100644
--- a/arch/s390/include/asm/boot_data.h
+++ b/arch/s390/include/asm/boot_data.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_S390_BOOT_DATA_H
+#include <linux/string.h>
#include <asm/setup.h>
#include <asm/ipl.h>
@@ -18,6 +19,7 @@ extern unsigned long early_ipl_comp_list_size;
extern char boot_rb[PAGE_SIZE * 2];
extern bool boot_earlyprintk;
extern size_t boot_rb_off;
+extern char bootdebug_filter[128];
extern bool bootdebug;
#define boot_rb_foreach(cb) \
@@ -30,4 +32,27 @@ extern bool bootdebug;
cb(boot_rb + off); \
} while (0)
+/*
+ * bootdebug_filter is a comma separated list of strings,
+ * where each string can be a prefix of the message.
+ */
+static inline bool bootdebug_filter_match(const char *buf)
+{
+ char *p = bootdebug_filter, *s;
+ char *end;
+
+ if (!*p)
+ return true;
+
+ end = p + strlen(p);
+ while (p < end) {
+ p = skip_spaces(p);
+ s = memscan(p, ',', end - p);
+ if (!strncmp(p, buf, s - p))
+ return true;
+ p = s + 1;
+ }
+ return false;
+}
+
#endif /* _ASM_S390_BOOT_DATA_H */