arch/parisc/kernel/stacktrace.c
Source file repositories/reference/linux-study-clean/arch/parisc/kernel/stacktrace.c
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/kernel/stacktrace.c- Extension
.c- Size
- 1174 bytes
- Lines
- 44
- Domain
- Architecture Layer
- Bucket
- arch/parisc
- 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/stacktrace.hasm/unwind.h
Detected Declarations
function Copyrightfunction arch_stack_walkfunction arch_stack_walk_reliable
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Stack trace management functions
*
* Copyright (C) 2009-2021 Helge Deller <deller@gmx.de>
* based on arch/x86/kernel/stacktrace.c by Ingo Molnar <mingo@redhat.com>
* and parisc unwind functions by Randolph Chung <tausq@debian.org>
*
* TODO: Userspace stacktrace (CONFIG_USER_STACKTRACE_SUPPORT)
*/
#include <linux/kernel.h>
#include <linux/stacktrace.h>
#include <asm/unwind.h>
static void notrace walk_stackframe(struct task_struct *task,
struct pt_regs *regs, bool (*fn)(void *, unsigned long), void *cookie)
{
struct unwind_frame_info info;
unwind_frame_init_task(&info, task, NULL);
while (1) {
if (unwind_once(&info) < 0 || info.ip == 0)
break;
if (__kernel_text_address(info.ip))
if (!fn(cookie, info.ip))
break;
}
}
void arch_stack_walk(stack_trace_consume_fn consume_entry, void *cookie,
struct task_struct *task, struct pt_regs *regs)
{
walk_stackframe(task, regs, consume_entry, cookie);
}
int arch_stack_walk_reliable(stack_trace_consume_fn consume_entry, void *cookie,
struct task_struct *task)
{
walk_stackframe(task, NULL, consume_entry, cookie);
return 1;
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/stacktrace.h`, `asm/unwind.h`.
- Detected declarations: `function Copyright`, `function arch_stack_walk`, `function arch_stack_walk_reliable`.
- Atlas domain: Architecture Layer / arch/parisc.
- 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.