arch/riscv/errata/mips/errata.c
Source file repositories/reference/linux-study-clean/arch/riscv/errata/mips/errata.c
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/errata/mips/errata.c- Extension
.c- Size
- 1537 bytes
- Lines
- 68
- Domain
- Architecture Layer
- Bucket
- arch/riscv
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/memory.hlinux/module.hasm/text-patching.hasm/alternative.hasm/errata_list.hasm/vendorid_list.hasm/vendor_extensions.hasm/vendor_extensions/mips.h
Detected Declarations
function Copyrightfunction mips_errata_probefunction mips_errata_patch_func
Annotated Snippet
if (alt->patch_id >= ERRATA_MIPS_NUMBER) {
WARN(1, "MIPS errata id:%d not in kernel errata list\n",
alt->patch_id);
continue;
}
tmp = (1U << alt->patch_id);
if (cpu_req_errata & tmp) {
mutex_lock(&text_mutex);
patch_text_nosync(ALT_OLD_PTR(alt), ALT_ALT_PTR(alt),
alt->alt_len);
mutex_unlock(&text_mutex);
}
}
}
Annotation
- Immediate include surface: `linux/memory.h`, `linux/module.h`, `asm/text-patching.h`, `asm/alternative.h`, `asm/errata_list.h`, `asm/vendorid_list.h`, `asm/vendor_extensions.h`, `asm/vendor_extensions/mips.h`.
- Detected declarations: `function Copyright`, `function mips_errata_probe`, `function mips_errata_patch_func`.
- Atlas domain: Architecture Layer / arch/riscv.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.