arch/arm/mm/cache-tauros2.c
Source file repositories/reference/linux-study-clean/arch/arm/mm/cache-tauros2.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mm/cache-tauros2.c- Extension
.c- Size
- 7158 bytes
- Lines
- 304
- Domain
- Architecture Layer
- Bucket
- arch/arm
- 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/of.hlinux/of_address.hasm/cacheflush.hasm/cp15.hasm/cputype.hasm/hardware/cache-tauros2.h
Detected Declarations
function Copyrightfunction tauros2_clean_inv_pafunction tauros2_inv_pafunction tauros2_inv_rangefunction tauros2_clean_rangefunction tauros2_flush_rangefunction tauros2_disablefunction tauros2_resumefunction read_extra_featuresfunction write_extra_featuresfunction cpuid_schemefunction read_mmfr3function read_actlrfunction write_actlrfunction enable_extra_featurefunction tauros2_internal_initfunction CPUsfunction tauros2_init
Annotated Snippet
if (!(feat & 0x00400000)) {
pr_info("Tauros2: Enabling L2 cache.\n");
write_extra_features(feat | 0x00400000);
}
mode = "ARMv5";
outer_cache.inv_range = tauros2_inv_range;
outer_cache.clean_range = tauros2_clean_range;
outer_cache.flush_range = tauros2_flush_range;
outer_cache.disable = tauros2_disable;
outer_cache.resume = tauros2_resume;
}
#endif
#ifdef CONFIG_CPU_32v7
/*
* Check whether this CPU has support for the v7 hierarchical
* cache ops. (PJ4 is in its v7 personality mode if the MMFR3
* register indicates support for the v7 hierarchical cache
* ops.)
*
* (Although strictly speaking there may exist CPUs that
* implement the v7 cache ops but are only ARMv6 CPUs (due to
* not complying with all of the other ARMv7 requirements),
* there are no real-life examples of Tauros2 being used on
* such CPUs as of yet.)
*/
if (cpuid_scheme() && (read_mmfr3() & 0xf) == 1) {
u32 actlr;
/*
* When Tauros2 is used in an ARMv7 system, the L2
* enable bit is located in the Auxiliary System Control
* Register (which is the only register allowed by the
* ARMv7 spec to contain fine-grained cache control bits).
*/
actlr = read_actlr();
if (!(actlr & 0x00000002)) {
pr_info("Tauros2: Enabling L2 cache.\n");
write_actlr(actlr | 0x00000002);
}
mode = "ARMv7";
}
#endif
if (mode == NULL) {
pr_crit("Tauros2: Unable to detect CPU mode.\n");
return;
}
pr_info("Tauros2: L2 cache support initialised "
"in %s mode.\n", mode);
}
#ifdef CONFIG_OF
static const struct of_device_id tauros2_ids[] __initconst = {
{ .compatible = "marvell,tauros2-cache"},
{}
};
#endif
void __init tauros2_init(unsigned int features)
{
#ifdef CONFIG_OF
struct device_node *node;
int ret;
unsigned int f;
node = of_find_matching_node(NULL, tauros2_ids);
if (!node) {
pr_info("Not found marvell,tauros2-cache, disable it\n");
} else {
ret = of_property_read_u32(node, "marvell,tauros2-cache-features", &f);
if (ret) {
pr_info("Not found marvell,tauros-cache-features property, "
"disable extra features\n");
features = 0;
} else
features = f;
}
#endif
tauros2_internal_init(features);
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/of.h`, `linux/of_address.h`, `asm/cacheflush.h`, `asm/cp15.h`, `asm/cputype.h`, `asm/hardware/cache-tauros2.h`.
- Detected declarations: `function Copyright`, `function tauros2_clean_inv_pa`, `function tauros2_inv_pa`, `function tauros2_inv_range`, `function tauros2_clean_range`, `function tauros2_flush_range`, `function tauros2_disable`, `function tauros2_resume`, `function read_extra_features`, `function write_extra_features`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.