arch/s390/kernel/sysinfo.c
Source file repositories/reference/linux-study-clean/arch/s390/kernel/sysinfo.c
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/kernel/sysinfo.c- Extension
.c- Size
- 15992 bytes
- Lines
- 537
- Domain
- Architecture Layer
- Bucket
- arch/s390
- Inferred role
- Architecture Layer: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cpufeature.hlinux/debugfs.hlinux/kernel.hlinux/mm.hlinux/proc_fs.hlinux/seq_file.hlinux/init.hlinux/delay.hlinux/export.hlinux/slab.hasm/asm-extable.hasm/machine.hasm/ebcdic.hasm/debug.hasm/sysinfo.hasm/cpcmd.hasm/topology.hasm/fpu.hasm/asm.h
Detected Declarations
struct stsi_filefunction convert_ext_namefunction stsi_1_1_1function stsi_15_1_xfunction stsi_1_2_2function stsi_2_2_2function print_ext_namefunction print_uuidfunction stsi_3_2_2function sysinfo_showfunction sysinfo_create_procfunction register_service_levelfunction unregister_service_levelfunction service_level_stopfunction service_level_showfunction service_level_vm_printfunction create_proc_service_levelfunction s390_adjust_jiffiesfunction calibrate_delayfunction stsi_releasefunction stsi_readfunction stsi_init_debugfsmodule init sysinfo_create_procmodule init create_proc_service_levelmodule init stsi_init_debugfsexport register_service_levelexport unregister_service_level
Annotated Snippet
static const struct file_operations stsi_##fc##_##s1##_##s2##_fs_ops = { \
.open = stsi_open_##fc##_##s1##_##s2, \
.release = stsi_release, \
.read = stsi_read, \
};
static int stsi_release(struct inode *inode, struct file *file)
{
free_page((unsigned long)file->private_data);
return 0;
}
static ssize_t stsi_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
{
return simple_read_from_buffer(buf, size, ppos, file->private_data, PAGE_SIZE);
}
STSI_FILE( 1, 1, 1);
STSI_FILE( 1, 2, 1);
STSI_FILE( 1, 2, 2);
STSI_FILE( 2, 2, 1);
STSI_FILE( 2, 2, 2);
STSI_FILE( 3, 2, 2);
STSI_FILE(15, 1, 2);
STSI_FILE(15, 1, 3);
STSI_FILE(15, 1, 4);
STSI_FILE(15, 1, 5);
STSI_FILE(15, 1, 6);
struct stsi_file {
const struct file_operations *fops;
char *name;
};
static struct stsi_file stsi_file[] __initdata = {
{.fops = &stsi_1_1_1_fs_ops, .name = "1_1_1"},
{.fops = &stsi_1_2_1_fs_ops, .name = "1_2_1"},
{.fops = &stsi_1_2_2_fs_ops, .name = "1_2_2"},
{.fops = &stsi_2_2_1_fs_ops, .name = "2_2_1"},
{.fops = &stsi_2_2_2_fs_ops, .name = "2_2_2"},
{.fops = &stsi_3_2_2_fs_ops, .name = "3_2_2"},
{.fops = &stsi_15_1_2_fs_ops, .name = "15_1_2"},
{.fops = &stsi_15_1_3_fs_ops, .name = "15_1_3"},
{.fops = &stsi_15_1_4_fs_ops, .name = "15_1_4"},
{.fops = &stsi_15_1_5_fs_ops, .name = "15_1_5"},
{.fops = &stsi_15_1_6_fs_ops, .name = "15_1_6"},
};
static u8 stsi_0_0_0;
static __init int stsi_init_debugfs(void)
{
struct dentry *stsi_root;
struct stsi_file *sf;
int lvl, i;
stsi_root = debugfs_create_dir("stsi", arch_debugfs_dir);
lvl = stsi(NULL, 0, 0, 0);
if (lvl > 0)
stsi_0_0_0 = lvl;
debugfs_create_u8("0_0_0", 0400, stsi_root, &stsi_0_0_0);
for (i = 0; i < ARRAY_SIZE(stsi_file); i++) {
sf = &stsi_file[i];
debugfs_create_file(sf->name, 0400, stsi_root, NULL, sf->fops);
}
if (IS_ENABLED(CONFIG_SCHED_TOPOLOGY) && cpu_has_topology()) {
char link_to[10];
snprintf(link_to, sizeof(link_to), "15_1_%d", topology_mnest_limit());
debugfs_create_symlink("topology", stsi_root, link_to);
}
return 0;
}
device_initcall(stsi_init_debugfs);
#endif /* CONFIG_DEBUG_FS */
Annotation
- Immediate include surface: `linux/cpufeature.h`, `linux/debugfs.h`, `linux/kernel.h`, `linux/mm.h`, `linux/proc_fs.h`, `linux/seq_file.h`, `linux/init.h`, `linux/delay.h`.
- Detected declarations: `struct stsi_file`, `function convert_ext_name`, `function stsi_1_1_1`, `function stsi_15_1_x`, `function stsi_1_2_2`, `function stsi_2_2_2`, `function print_ext_name`, `function print_uuid`, `function stsi_3_2_2`, `function sysinfo_show`.
- Atlas domain: Architecture Layer / arch/s390.
- Implementation status: pattern 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.