arch/powerpc/include/asm/probes.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/probes.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/probes.h- Extension
.h- Size
- 2523 bytes
- Lines
- 91
- 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/types.hasm/disassemble.hasm/ppc-opcode.h
Detected Declarations
function IS_TWIfunction enable_single_step
Annotated Snippet
switch (get_xop(inst)) {
case OP_19_XOP_RFID: return false;
case OP_19_XOP_RFMCI: return false;
case OP_19_XOP_RFDI: return false;
case OP_19_XOP_RFI: return false;
case OP_19_XOP_RFCI: return false;
case OP_19_XOP_RFSCV: return false;
case OP_19_XOP_HRFID: return false;
case OP_19_XOP_URFID: return false;
case OP_19_XOP_STOP: return false;
case OP_19_XOP_DOZE: return false;
case OP_19_XOP_NAP: return false;
case OP_19_XOP_SLEEP: return false;
case OP_19_XOP_RVWINKLE: return false;
}
break;
case OP_31:
switch (get_xop(inst)) {
case OP_31_XOP_TRAP: return false;
case OP_31_XOP_TRAP_64: return false;
case OP_31_XOP_MTMSR: return false;
case OP_31_XOP_MTMSRD: return false;
}
break;
}
return true;
}
/* Enable single stepping for the current task */
static inline void enable_single_step(struct pt_regs *regs)
{
regs_set_return_msr(regs, regs->msr | MSR_SINGLESTEP);
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
/*
* We turn off Critical Input Exception(CE) to ensure that the single
* step will be for the instruction we have the probe on; if we don't,
* it is possible we'd get the single step reported for CE.
*/
regs_set_return_msr(regs, regs->msr & ~MSR_CE);
mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM);
#ifdef CONFIG_PPC_47x
isync();
#endif
#endif
}
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_PROBES_H */
Annotation
- Immediate include surface: `linux/types.h`, `asm/disassemble.h`, `asm/ppc-opcode.h`.
- Detected declarations: `function IS_TWI`, `function enable_single_step`.
- 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.