drivers/sh/intc/core.c
Source file repositories/reference/linux-study-clean/drivers/sh/intc/core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/sh/intc/core.c- Extension
.c- Size
- 12008 bytes
- Lines
- 503
- Domain
- Driver Families
- Bucket
- drivers/sh
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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/init.hlinux/irq.hlinux/io.hlinux/slab.hlinux/stat.hlinux/interrupt.hlinux/sh_intc.hlinux/irqdomain.hlinux/device.hlinux/syscore_ops.hlinux/list.hlinux/spinlock.hlinux/radix-tree.hlinux/export.hlinux/sort.hinternals.h
Detected Declarations
function intc_get_dfl_prio_levelfunction intc_get_prio_levelfunction intc_set_prio_levelfunction intc_redirect_irqfunction intc_register_irqfunction save_regfunction intc_mapfunction register_intc_controllerfunction intc_suspendfunction list_for_each_entryfunction for_each_active_irqfunction intc_resumefunction list_for_each_entryfunction for_each_active_irqfunction show_intc_namefunction register_intc_devsfunction list_for_each_entrymodule init register_intc_devs
Annotated Snippet
const struct bus_type intc_subsys = {
.name = "intc",
.dev_name = "intc",
};
static ssize_t
show_intc_name(struct device *dev, struct device_attribute *attr, char *buf)
{
struct intc_desc_int *d;
d = container_of(dev, struct intc_desc_int, dev);
return sprintf(buf, "%s\n", d->chip.name);
}
static DEVICE_ATTR(name, S_IRUGO, show_intc_name, NULL);
static int __init register_intc_devs(void)
{
struct intc_desc_int *d;
int error;
register_syscore(&intc_syscore);
error = subsys_system_register(&intc_subsys, NULL);
if (!error) {
list_for_each_entry(d, &intc_list, list) {
d->dev.id = d->index;
d->dev.bus = &intc_subsys;
error = device_register(&d->dev);
if (error == 0)
error = device_create_file(&d->dev,
&dev_attr_name);
if (error)
break;
}
}
if (error)
pr_err("device registration error\n");
return error;
}
device_initcall(register_intc_devs);
Annotation
- Immediate include surface: `linux/init.h`, `linux/irq.h`, `linux/io.h`, `linux/slab.h`, `linux/stat.h`, `linux/interrupt.h`, `linux/sh_intc.h`, `linux/irqdomain.h`.
- Detected declarations: `function intc_get_dfl_prio_level`, `function intc_get_prio_level`, `function intc_set_prio_level`, `function intc_redirect_irq`, `function intc_register_irq`, `function save_reg`, `function intc_map`, `function register_intc_controller`, `function intc_suspend`, `function list_for_each_entry`.
- Atlas domain: Driver Families / drivers/sh.
- 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.