arch/s390/include/asm/ptrace.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/ptrace.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/ptrace.h- Extension
.h- Size
- 8974 bytes
- Lines
- 320
- 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/bits.hlinux/typecheck.huapi/asm/ptrace.hasm/thread_info.hasm/tpi.h
Detected Declarations
struct psw_bitsstruct pt_regsstruct per_regsstruct per_eventstruct per_struct_kernelstruct task_structfunction set_pt_regs_flagfunction clear_pt_regs_flagfunction test_pt_regs_flagfunction test_and_clear_pt_regs_flagfunction user_modefunction regs_return_valuefunction instruction_pointerfunction instruction_pointer_setfunction kernel_stack_pointerfunction user_stack_pointerfunction regs_get_registerfunction regs_within_kernel_stackfunction regs_get_kernel_stack_nthfunction regs_get_kernel_argumentfunction regs_set_return_value
Annotated Snippet
struct psw_bits {
unsigned long : 1;
unsigned long per : 1; /* PER-Mask */
unsigned long : 3;
unsigned long dat : 1; /* DAT Mode */
unsigned long io : 1; /* Input/Output Mask */
unsigned long ext : 1; /* External Mask */
unsigned long key : 4; /* PSW Key */
unsigned long : 1;
unsigned long mcheck : 1; /* Machine-Check Mask */
unsigned long wait : 1; /* Wait State */
unsigned long pstate : 1; /* Problem State */
unsigned long as : 2; /* Address Space Control */
unsigned long cc : 2; /* Condition Code */
unsigned long pm : 4; /* Program Mask */
unsigned long ri : 1; /* Runtime Instrumentation */
unsigned long : 6;
unsigned long eaba : 2; /* Addressing Mode */
unsigned long : 31;
unsigned long ia : 64; /* Instruction Address */
};
enum {
PSW_BITS_AMODE_24BIT = 0,
PSW_BITS_AMODE_31BIT = 1,
PSW_BITS_AMODE_64BIT = 3
};
enum {
PSW_BITS_AS_PRIMARY = 0,
PSW_BITS_AS_ACCREG = 1,
PSW_BITS_AS_SECONDARY = 2,
PSW_BITS_AS_HOME = 3
};
#define psw_bits(__psw) (*({ \
typecheck(psw_t, __psw); \
&(*(struct psw_bits *)(&(__psw))); \
}))
typedef struct {
unsigned int mask;
unsigned int addr;
} psw32_t __aligned(8);
#define PGM_INT_CODE_MASK 0x7f
#define PGM_INT_CODE_PER 0x80
/*
* The pt_regs struct defines the way the registers are stored on
* the stack during a system call.
*/
struct pt_regs {
union {
user_pt_regs user_regs;
struct {
unsigned long args[1];
psw_t psw;
unsigned long gprs[NUM_GPRS];
};
};
union {
unsigned long orig_gpr2;
unsigned long monitor_code;
};
union {
struct {
unsigned int int_code;
unsigned int int_parm;
unsigned long int_parm_long;
};
struct tpi_info tpi_info;
};
unsigned long flags;
unsigned long last_break;
unsigned int cpu;
unsigned char percpu_register;
};
/*
* Program event recording (PER) register set.
*/
struct per_regs {
unsigned long control; /* PER control bits */
unsigned long start; /* PER starting address */
unsigned long end; /* PER ending address */
};
/*
* PER event contains information about the cause of the last PER exception.
Annotation
- Immediate include surface: `linux/bits.h`, `linux/typecheck.h`, `uapi/asm/ptrace.h`, `asm/thread_info.h`, `asm/tpi.h`.
- Detected declarations: `struct psw_bits`, `struct pt_regs`, `struct per_regs`, `struct per_event`, `struct per_struct_kernel`, `struct task_struct`, `function set_pt_regs_flag`, `function clear_pt_regs_flag`, `function test_pt_regs_flag`, `function test_and_clear_pt_regs_flag`.
- 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.