arch/s390/include/asm/debug.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/debug.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/debug.h- Extension
.h- Size
- 14789 bytes
- Lines
- 501
- Domain
- Architecture Layer
- Bucket
- arch/s390
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/string.hlinux/spinlock.hlinux/kernel.hlinux/time.hlinux/refcount.hlinux/fs.hlinux/init.h
Detected Declarations
struct __debug_entrystruct debug_viewstruct debug_viewfunction debug_level_enabledfunction debug_eventfunction debug_int_eventfunction debug_long_eventfunction debug_text_eventfunction debug_exceptionfunction debug_int_exceptionfunction debug_long_exceptionfunction debug_text_exceptionfunction VNAME
Annotated Snippet
struct __debug_entry {
unsigned long clock : 60;
unsigned long exception : 1;
unsigned long level : 3;
void *caller;
unsigned short cpu;
} __packed;
typedef struct __debug_entry debug_entry_t;
struct debug_view;
typedef struct debug_info {
struct debug_info *next;
struct debug_info *prev;
refcount_t ref_count;
raw_spinlock_t lock;
int level;
int nr_areas;
int pages_per_area;
int buf_size;
int entry_size;
debug_entry_t ***areas;
int active_area;
int *active_pages;
int *active_entries;
struct dentry *debugfs_root_entry;
struct dentry *debugfs_entries[DEBUG_MAX_VIEWS];
struct debug_view *views[DEBUG_MAX_VIEWS];
char name[DEBUG_MAX_NAME_LEN];
umode_t mode;
} debug_info_t;
typedef int (debug_header_proc_t) (debug_info_t *id,
struct debug_view *view,
int area,
debug_entry_t *entry,
char *out_buf, size_t out_buf_size);
typedef int (debug_format_proc_t) (debug_info_t *id,
struct debug_view *view, char *out_buf,
size_t out_buf_size,
const char *in_buf);
typedef int (debug_prolog_proc_t) (debug_info_t *id,
struct debug_view *view,
char *out_buf, size_t out_buf_size);
typedef int (debug_input_proc_t) (debug_info_t *id,
struct debug_view *view,
struct file *file,
const char __user *user_buf,
size_t in_buf_size, loff_t *offset);
int debug_dflt_header_fn(debug_info_t *id, struct debug_view *view,
int area, debug_entry_t *entry,
char *out_buf, size_t out_buf_size);
#define DEBUG_SPRINTF_MAX_ARGS 10
int debug_sprintf_format_fn(debug_info_t *id, struct debug_view *view,
char *out_buf, size_t out_buf_size,
const char *inbuf);
struct debug_view {
char name[DEBUG_MAX_NAME_LEN];
debug_prolog_proc_t *prolog_proc;
debug_header_proc_t *header_proc;
debug_format_proc_t *format_proc;
debug_input_proc_t *input_proc;
void *private_data;
};
extern struct debug_view debug_hex_ascii_view;
extern struct debug_view debug_sprintf_view;
/* do NOT use the _common functions */
debug_entry_t *debug_event_common(debug_info_t *id, int level,
const void *data, int length);
debug_entry_t *debug_exception_common(debug_info_t *id, int level,
const void *data, int length);
/* Debug Feature API: */
debug_info_t *debug_register(const char *name, int pages, int nr_areas,
int buf_size);
debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas,
int buf_size, umode_t mode, uid_t uid,
gid_t gid);
ssize_t debug_dump(debug_info_t *id, struct debug_view *view,
Annotation
- Immediate include surface: `linux/string.h`, `linux/spinlock.h`, `linux/kernel.h`, `linux/time.h`, `linux/refcount.h`, `linux/fs.h`, `linux/init.h`.
- Detected declarations: `struct __debug_entry`, `struct debug_view`, `struct debug_view`, `function debug_level_enabled`, `function debug_event`, `function debug_int_event`, `function debug_long_event`, `function debug_text_event`, `function debug_exception`, `function debug_int_exception`.
- Atlas domain: Architecture Layer / arch/s390.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.