arch/powerpc/platforms/8xx/machine_check.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/8xx/machine_check.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/8xx/machine_check.c- Extension
.c- Size
- 778 bytes
- Lines
- 35
- 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/kernel.hlinux/printk.hlinux/ptrace.hasm/reg.h
Detected Declarations
function machine_check_8xx
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
*/
#include <linux/kernel.h>
#include <linux/printk.h>
#include <linux/ptrace.h>
#include <asm/reg.h>
int machine_check_8xx(struct pt_regs *regs)
{
unsigned long reason = regs->msr;
pr_err("Machine check in kernel mode.\n");
pr_err("Caused by (from SRR1=%lx): ", reason);
if (reason & 0x40000000)
pr_cont("Fetch error at address %lx\n", regs->nip);
else
pr_cont("Data access error at address %lx\n", regs->dar);
#ifdef CONFIG_PCI
/* the qspan pci read routines can cause machine checks -- Cort
*
* yuck !!! that totally needs to go away ! There are better ways
* to deal with that than having a wart in the mcheck handler.
* -- BenH
*/
bad_page_fault(regs, SIGBUS);
return 1;
#else
return 0;
#endif
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/printk.h`, `linux/ptrace.h`, `asm/reg.h`.
- Detected declarations: `function machine_check_8xx`.
- 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.