arch/arc/kernel/arc_hostlink.c
Source file repositories/reference/linux-study-clean/arch/arc/kernel/arc_hostlink.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arc/kernel/arc_hostlink.c- Extension
.c- Size
- 1477 bytes
- Lines
- 56
- Domain
- Architecture Layer
- Bucket
- arch/arc
- Inferred role
- Architecture Layer: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/fs.hlinux/miscdevice.hlinux/mm.hlinux/module.hlinux/uaccess.h
Detected Declarations
function arc_hl_mmapfunction arc_hl_ioctlfunction arc_hl_initmodule init arc_hl_init
Annotated Snippet
static const struct file_operations arc_hl_fops = {
.unlocked_ioctl = arc_hl_ioctl,
.mmap = arc_hl_mmap,
};
static struct miscdevice arc_hl_dev = {
.minor = MISC_DYNAMIC_MINOR,
.name = "hostlink",
.fops = &arc_hl_fops
};
static int __init arc_hl_init(void)
{
pr_info("ARC Hostlink driver mmap at 0x%p\n", __HOSTLINK__);
return misc_register(&arc_hl_dev);
}
module_init(arc_hl_init);
Annotation
- Immediate include surface: `linux/fs.h`, `linux/miscdevice.h`, `linux/mm.h`, `linux/module.h`, `linux/uaccess.h`.
- Detected declarations: `function arc_hl_mmap`, `function arc_hl_ioctl`, `function arc_hl_init`, `module init arc_hl_init`.
- Atlas domain: Architecture Layer / arch/arc.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.