arch/powerpc/include/asm/ptrace.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/ptrace.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/ptrace.h- Extension
.h- Size
- 12114 bytes
- Lines
- 430
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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/err.huapi/asm/ptrace.hasm/asm-const.hasm/reg.hasm/paca.hlinux/stddef.hlinux/thread_info.h
Detected Declarations
struct pt_regsfunction set_return_regs_changedfunction regs_set_return_ipfunction regs_set_return_msrfunction regs_add_return_ipfunction instruction_pointerfunction instruction_pointer_setfunction user_stack_pointerfunction frame_pointerfunction bitsfunction trap_is_scvfunction trap_is_unsupported_scvfunction trap_is_syscallfunction trap_norestartfunction set_trap_norestartfunction is_syscall_successfunction regs_return_valuefunction regs_set_return_valuefunction cpu_has_msr_rifunction regs_is_unrecoverablefunction regs_set_recoverablefunction regs_set_unrecoverablefunction regs_get_registerfunction regs_within_kernel_stackfunction regs_get_kernel_stack_nthfunction regs_get_kernel_argument
Annotated Snippet
#ifndef _ASM_POWERPC_PTRACE_H
#define _ASM_POWERPC_PTRACE_H
#include <linux/err.h>
#include <uapi/asm/ptrace.h>
#include <asm/asm-const.h>
#include <asm/reg.h>
#ifndef __ASSEMBLER__
struct pt_regs
{
union {
struct user_pt_regs user_regs;
struct {
unsigned long gpr[32];
unsigned long nip;
unsigned long msr;
unsigned long orig_gpr3;
unsigned long ctr;
unsigned long link;
unsigned long xer;
unsigned long ccr;
#ifdef CONFIG_PPC64
unsigned long softe;
#else
unsigned long mq;
#endif
unsigned long trap;
union {
unsigned long dar;
unsigned long dear;
};
union {
unsigned long dsisr;
unsigned long esr;
};
unsigned long result;
unsigned long exit_flags;
/* Maintain 16 byte interrupt stack alignment */
unsigned long __pt_regs_pad[3];
};
};
#if defined(CONFIG_PPC64) || defined(CONFIG_PPC_KUAP)
union {
struct {
#ifdef CONFIG_PPC64
unsigned long ppr;
unsigned long exit_result;
#endif
union {
#ifdef CONFIG_PPC_KUAP
unsigned long kuap;
#endif
#ifdef CONFIG_PPC_PKEY
unsigned long amr;
#endif
};
#ifdef CONFIG_PPC_PKEY
unsigned long iamr;
#endif
};
unsigned long __pad[4]; /* Maintain 16 byte interrupt stack alignment */
};
#endif
#if defined(CONFIG_PPC32) && defined(CONFIG_BOOKE)
struct { /* Must be a multiple of 16 bytes */
unsigned long mas0;
unsigned long mas1;
unsigned long mas2;
unsigned long mas3;
unsigned long mas6;
unsigned long mas7;
unsigned long srr0;
unsigned long srr1;
unsigned long csrr0;
unsigned long csrr1;
unsigned long dsrr0;
unsigned long dsrr1;
};
#endif
};
#endif
// Always displays as "REGS" in memory dumps
#ifdef CONFIG_CPU_BIG_ENDIAN
#define STACK_FRAME_REGS_MARKER ASM_CONST(0x52454753)
#else
#define STACK_FRAME_REGS_MARKER ASM_CONST(0x53474552)
#endif
Annotation
- Immediate include surface: `linux/err.h`, `uapi/asm/ptrace.h`, `asm/asm-const.h`, `asm/reg.h`, `asm/paca.h`, `linux/stddef.h`, `linux/thread_info.h`.
- Detected declarations: `struct pt_regs`, `function set_return_regs_changed`, `function regs_set_return_ip`, `function regs_set_return_msr`, `function regs_add_return_ip`, `function instruction_pointer`, `function instruction_pointer_set`, `function user_stack_pointer`, `function frame_pointer`, `function bits`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.