arch/mips/mm/sc-mips.c
Source file repositories/reference/linux-study-clean/arch/mips/mm/sc-mips.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/mm/sc-mips.c- Extension
.c- Size
- 6308 bytes
- Lines
- 265
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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/init.hlinux/kernel.hlinux/sched.hlinux/mm.hasm/cpu-type.hasm/mipsregs.hasm/bcache.hasm/cacheops.hasm/page.hasm/mmu_context.hasm/r4kcache.hasm/mips-cps.hasm/bootinfo.h
Detected Declarations
function Copyrightfunction mips_sc_invfunction mips_sc_enablefunction mips_sc_prefetch_disablefunction mips_sc_prefetch_is_enabledfunction mips_sc_is_activatedfunction mips_sc_probe_cm3function mips_sc_probefunction mips_sc_init
Annotated Snippet
switch (mips_machtype) {
/*
* According to config2 it would be 5-ways, but that is
* contradicted by all documentation.
*/
case MACH_INGENIC_JZ4770:
case MACH_INGENIC_JZ4775:
c->scache.ways = 4;
break;
/*
* According to config2 it would be 5-ways and 512-sets,
* but that is contradicted by all documentation.
*/
case MACH_INGENIC_X1000:
case MACH_INGENIC_X1000E:
c->scache.sets = 256;
c->scache.ways = 4;
break;
}
}
c->scache.waysize = c->scache.sets * c->scache.linesz;
c->scache.waybit = __ffs(c->scache.waysize);
c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
return 1;
}
int mips_sc_init(void)
{
int found = mips_sc_probe();
if (found) {
mips_sc_enable();
mips_sc_prefetch_enable();
bcops = &mips_sc_ops;
}
return found;
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/sched.h`, `linux/mm.h`, `asm/cpu-type.h`, `asm/mipsregs.h`, `asm/bcache.h`, `asm/cacheops.h`.
- Detected declarations: `function Copyright`, `function mips_sc_inv`, `function mips_sc_enable`, `function mips_sc_prefetch_disable`, `function mips_sc_prefetch_is_enabled`, `function mips_sc_is_activated`, `function mips_sc_probe_cm3`, `function mips_sc_probe`, `function mips_sc_init`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.