arch/microblaze/kernel/traps.c
Source file repositories/reference/linux-study-clean/arch/microblaze/kernel/traps.c
File Facts
- System
- Linux kernel
- Corpus path
arch/microblaze/kernel/traps.c- Extension
.c- Size
- 2024 bytes
- Lines
- 80
- Domain
- Architecture Layer
- Bucket
- arch/microblaze
- 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/cpu.hlinux/export.hlinux/kernel.hlinux/kallsyms.hlinux/sched.hlinux/sched/debug.hlinux/debug_locks.hasm/exceptions.hasm/unwind.h
Detected Declarations
function Copyrightfunction kstack_setupfunction show_stack
Annotated Snippet
if (task) {
fp = ((struct thread_info *)
(task->stack))->cpu_context.r1;
} else {
/* Pick up caller of dump_stack() */
fp = (u32)&sp - 8;
}
}
words_to_show = (THREAD_SIZE - (fp & (THREAD_SIZE - 1))) >> 2;
if (kstack_depth_to_print && (words_to_show > kstack_depth_to_print))
words_to_show = kstack_depth_to_print;
printk("%sKernel Stack:\n", loglvl);
/*
* Make the first line an 'odd' size if necessary to get
* remaining lines to start at an address multiple of 0x10
*/
if (fp & 0xF) {
unsigned long line1_words = (0x10 - (fp & 0xF)) >> 2;
if (line1_words < words_to_show) {
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32,
4, (void *)fp, line1_words << 2, 0);
fp += line1_words << 2;
words_to_show -= line1_words;
}
}
print_hex_dump(loglvl, "", DUMP_PREFIX_ADDRESS, 32, 4, (void *)fp,
words_to_show << 2, 0);
printk("%s\n\nCall Trace:\n", loglvl);
microblaze_unwind(task, NULL, loglvl);
printk("%s\n", loglvl);
if (!task)
task = current;
debug_show_held_locks(task);
}
Annotation
- Immediate include surface: `linux/cpu.h`, `linux/export.h`, `linux/kernel.h`, `linux/kallsyms.h`, `linux/sched.h`, `linux/sched/debug.h`, `linux/debug_locks.h`, `asm/exceptions.h`.
- Detected declarations: `function Copyright`, `function kstack_setup`, `function show_stack`.
- Atlas domain: Architecture Layer / arch/microblaze.
- 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.