arch/csky/kernel/module.c
Source file repositories/reference/linux-study-clean/arch/csky/kernel/module.c
File Facts
- System
- Linux kernel
- Corpus path
arch/csky/kernel/module.c- Extension
.c- Size
- 2595 bytes
- Lines
- 98
- Domain
- Architecture Layer
- Bucket
- arch/csky
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/moduleloader.hlinux/elf.hlinux/mm.hlinux/vmalloc.hlinux/slab.hlinux/fs.hlinux/string.hlinux/kernel.hlinux/spinlock.h
Detected Declarations
function jsri_2_lrw_jsrfunction jsri_2_lrw_jsrfunction apply_relocate_add
Annotated Snippet
switch (ELF32_R_TYPE(rel[i].r_info)) {
case R_CSKY_32:
/* We add the value into the location given */
*location = rel[i].r_addend + sym->st_value;
break;
case R_CSKY_PC32:
/* Add the value, subtract its position */
*location = rel[i].r_addend + sym->st_value
- (uint32_t)location;
break;
case R_CSKY_PCRELJSR_IMM11BY2:
break;
case R_CSKY_PCRELJSR_IMM26BY2:
jsri_2_lrw_jsr(location);
break;
case R_CSKY_ADDR_HI16:
temp = ((short *)location) + 1;
*temp = (short)
((rel[i].r_addend + sym->st_value) >> 16);
break;
case R_CSKY_ADDR_LO16:
temp = ((short *)location) + 1;
*temp = (short)
((rel[i].r_addend + sym->st_value) & 0xffff);
break;
default:
pr_err("module %s: Unknown relocation: %u\n",
me->name, ELF32_R_TYPE(rel[i].r_info));
return -ENOEXEC;
}
}
return 0;
}
Annotation
- Immediate include surface: `linux/moduleloader.h`, `linux/elf.h`, `linux/mm.h`, `linux/vmalloc.h`, `linux/slab.h`, `linux/fs.h`, `linux/string.h`, `linux/kernel.h`.
- Detected declarations: `function jsri_2_lrw_jsr`, `function jsri_2_lrw_jsr`, `function apply_relocate_add`.
- Atlas domain: Architecture Layer / arch/csky.
- 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.