arch/arm/mach-mvebu/coherency.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-mvebu/coherency.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-mvebu/coherency.c- Extension
.c- Size
- 7964 bytes
- Lines
- 298
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/kernel.hlinux/init.hlinux/of_address.hlinux/io.hlinux/smp.hlinux/dma-map-ops.hlinux/platform_device.hlinux/slab.hlinux/mbus.hlinux/pci.hasm/smp_plat.hasm/cacheflush.hasm/mach/map.hasm/dma-mapping.hcoherency.hmvebu-soc-id.h
Detected Declarations
function armada_xp_clear_shared_l2function mvebu_hwcc_notifierfunction armada_xp_clear_l2_startingfunction armada_370_coherency_initfunction armada_wa_ioremap_callerfunction armada_375_380_coherency_initfunction coherency_typefunction set_cpu_coherentfunction coherency_availablefunction coherency_initfunction coherency_late_initfunction coherency_pci_init
Annotated Snippet
if (!coherency_base) {
pr_warn("Can't make current CPU cache coherent.\n");
pr_warn("Coherency fabric is not initialized\n");
return 1;
}
armada_xp_clear_shared_l2();
ll_add_cpu_to_smp_group();
return ll_enable_coherency();
}
return 0;
}
int coherency_available(void)
{
return coherency_type() != COHERENCY_FABRIC_TYPE_NONE;
}
int __init coherency_init(void)
{
int type = coherency_type();
struct device_node *np;
np = of_find_matching_node(NULL, of_coherency_table);
if (type == COHERENCY_FABRIC_TYPE_ARMADA_370_XP)
armada_370_coherency_init(np);
else if (type == COHERENCY_FABRIC_TYPE_ARMADA_375 ||
type == COHERENCY_FABRIC_TYPE_ARMADA_380)
armada_375_380_coherency_init(np);
of_node_put(np);
return 0;
}
static int __init coherency_late_init(void)
{
if (coherency_available())
bus_register_notifier(&platform_bus_type,
&mvebu_hwcc_nb);
return 0;
}
postcore_initcall(coherency_late_init);
#if IS_ENABLED(CONFIG_PCI)
static int __init coherency_pci_init(void)
{
if (coherency_available())
bus_register_notifier(&pci_bus_type,
&mvebu_hwcc_pci_nb);
return 0;
}
arch_initcall(coherency_pci_init);
#endif
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/of_address.h`, `linux/io.h`, `linux/smp.h`, `linux/dma-map-ops.h`, `linux/platform_device.h`, `linux/slab.h`.
- Detected declarations: `function armada_xp_clear_shared_l2`, `function mvebu_hwcc_notifier`, `function armada_xp_clear_l2_starting`, `function armada_370_coherency_init`, `function armada_wa_ioremap_caller`, `function armada_375_380_coherency_init`, `function coherency_type`, `function set_cpu_coherent`, `function coherency_available`, `function coherency_init`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: integration 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.