arch/arm/mach-rpc/ecard.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-rpc/ecard.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-rpc/ecard.c- Extension
.c- Size
- 26122 bytes
- Lines
- 1147
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/module.hlinux/kernel.hlinux/types.hlinux/sched.hlinux/sched/mm.hlinux/interrupt.hlinux/completion.hlinux/reboot.hlinux/mm.hlinux/slab.hlinux/proc_fs.hlinux/seq_file.hlinux/device.hlinux/init.hlinux/mutex.hlinux/kthread.hlinux/irq.hlinux/io.hasm/dma.hasm/ecard.hmach/hardware.hasm/irq.hasm/mmu_context.hasm/mach/irq.hasm/tlbflush.hecard.h
Detected Declarations
struct ecard_requeststruct expcard_quirklistfunction ecard_getu16function ecard_gets24function ecard_task_resetfunction ecard_task_readbytesfunction ecard_init_pgtablesfunction ecard_init_mmfunction ecard_taskfunction ecard_callfunction ecard_readbytesfunction ecard_readchunkfunction ecard_def_irq_enablefunction ecard_def_fiq_enablefunction ecard_def_fiq_disablefunction ecard_def_fiq_pendingfunction ecard_irq_unmaskfunction ecard_irq_maskfunction ecard_enablefiqfunction ecard_disablefiqfunction ecard_dump_irq_statefunction ecard_check_lockupfunction ecard_irq_handlerfunction ecard_printsfunction ecard_devices_proc_showfunction ecard_proc_initfunction ecard_free_cardfunction ecard_alloc_cardfunction irq_showfunction dma_showfunction resource_showfunction vendor_showfunction device_showfunction type_showfunction ecard_request_resourcesfunction ecard_release_resourcesfunction ecard_setirqfunction atomwide_3p_quirkfunction ecard_probefunction ecard_initfunction ecard_match_devicefunction ecard_drv_probefunction ecard_drv_removefunction ecard_drv_shutdownfunction ecard_register_driverfunction ecard_remove_driverfunction ecard_matchfunction ecard_bus_init
Annotated Snippet
static int ecard_match(struct device *_dev, const struct device_driver *_drv)
{
struct expansion_card *ec = ECARD_DEV(_dev);
struct ecard_driver *drv = ECARD_DRV(_drv);
int ret;
if (drv->id_table) {
ret = ecard_match_device(drv->id_table, ec) != NULL;
} else {
ret = ec->cid.id == drv->id;
}
return ret;
}
const struct bus_type ecard_bus_type = {
.name = "ecard",
.dev_groups = ecard_dev_groups,
.match = ecard_match,
.probe = ecard_drv_probe,
.remove = ecard_drv_remove,
.shutdown = ecard_drv_shutdown,
};
static int ecard_bus_init(void)
{
return bus_register(&ecard_bus_type);
}
postcore_initcall(ecard_bus_init);
EXPORT_SYMBOL(ecard_readchunk);
EXPORT_SYMBOL(ecard_register_driver);
EXPORT_SYMBOL(ecard_remove_driver);
EXPORT_SYMBOL(ecard_bus_type);
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/types.h`, `linux/sched.h`, `linux/sched/mm.h`, `linux/interrupt.h`, `linux/completion.h`, `linux/reboot.h`.
- Detected declarations: `struct ecard_request`, `struct expcard_quirklist`, `function ecard_getu16`, `function ecard_gets24`, `function ecard_task_reset`, `function ecard_task_readbytes`, `function ecard_init_pgtables`, `function ecard_init_mm`, `function ecard_task`, `function ecard_call`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: pattern 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.