// SPDX-License-Identifier: GPL-2.0/* * S/390 debug facility * * Copyright IBM Corp. 1999, 2012 * * Author(s): Michael Holzheu (holzheu@de.ibm.com), * Holger Smolinski (Holger.Smolinski@de.ibm.com) * * Bugreports to: <Linux390@de.ibm.com> */#define KMSG_COMPONENT "s390dbf"#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt#include<linux/stddef.h>#include<linux/kernel.h>#include<linux/errno.h>#include<linux/slab.h>#include<linux/ctype.h>#include<linux/string.h>#include<linux/sysctl.h>#include<linux/uaccess.h>#include<linux/export.h>#include<linux/init.h>#include<linux/fs.h>#include<linux/debugfs.h>#include<asm/debug.h>#define DEBUG_PROLOG_ENTRY -1#define ALL_AREAS 0 /* copy all debug areas */#define NO_AREAS 1 /* copy no debug areas *//* typedefs */typedefstructfile_private_info{loff_toffset;/* offset of last read in file */intact_area;/* number of last formated area */intact_page;/* act page in given area */intact_entry;/* last formated entry (offset *//* relative to beginning of last *//* formated page) */size_tact_entry_offset;/* up to this offset we copied *//* in last read the last formated *//* entry to userland */chartemp_buf[2048];/* buffer for output */debug_info_t*debug_info_org;/* original debug information */debug_info_t*debug_info_snap;/* snapshot of debug information */structdebug_view*view;/* used view of debug info */}file_private_info_t;typedefstruct{