arch/s390/kernel/runtime_instr.c
Source file repositories/reference/linux-study-clean/arch/s390/kernel/runtime_instr.c
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/kernel/runtime_instr.c- Extension
.c- Size
- 2252 bytes
- Lines
- 103
- Domain
- Architecture Layer
- Bucket
- arch/s390
- Inferred role
- Architecture Layer: syscall or user/kernel boundary
- Status
- core 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 participates in a user/kernel boundary; inspect argument validation, copy_from_user/copy_to_user, credentials, and dispatch target.
- 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/kernel.hlinux/syscalls.hlinux/signal.hlinux/mm.hlinux/slab.hlinux/init.hlinux/errno.hlinux/kernel_stat.hlinux/sched/task_stack.hasm/runtime_instr.hasm/cpu_mf.hasm/irq.hentry.h
Detected Declarations
syscall s390_runtime_instrfunction runtime_instr_releasefunction disable_runtime_instrfunction init_runtime_instr_cb
Annotated Snippet
SYSCALL_DEFINE2(s390_runtime_instr, int, command, int, signum)
{
struct runtime_instr_cb *cb;
if (!test_facility(64))
return -EOPNOTSUPP;
if (command == S390_RUNTIME_INSTR_STOP) {
disable_runtime_instr();
return 0;
}
if (command != S390_RUNTIME_INSTR_START)
return -EINVAL;
if (!current->thread.ri_cb) {
cb = kzalloc_obj(*cb);
if (!cb)
return -ENOMEM;
} else {
cb = current->thread.ri_cb;
memset(cb, 0, sizeof(*cb));
}
init_runtime_instr_cb(cb);
/* now load the control block to make it available */
preempt_disable();
current->thread.ri_cb = cb;
load_runtime_instr_cb(cb);
preempt_enable();
return 0;
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/syscalls.h`, `linux/signal.h`, `linux/mm.h`, `linux/slab.h`, `linux/init.h`, `linux/errno.h`, `linux/kernel_stat.h`.
- Detected declarations: `syscall s390_runtime_instr`, `function runtime_instr_release`, `function disable_runtime_instr`, `function init_runtime_instr_cb`.
- Atlas domain: Architecture Layer / arch/s390.
- Implementation status: core 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.