include/linux/irqchip/riscv-imsic.h
Source file repositories/reference/linux-study-clean/include/linux/irqchip/riscv-imsic.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/irqchip/riscv-imsic.h- Extension
.h- Size
- 2558 bytes
- Lines
- 102
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/bitops.hlinux/device.hlinux/fwnode.h
Detected Declarations
struct imsic_local_configstruct imsic_global_config
Annotated Snippet
struct imsic_local_config {
phys_addr_t msi_pa;
void __iomem *msi_va;
/* Number of guest interrupt files per-HART */
u32 nr_guest_files;
};
struct imsic_global_config {
/*
* MSI Target Address Scheme
*
* XLEN-1 12 0
* | | |
* -------------------------------------------------------------
* |xxxxxx|Group Index|xxxxxxxxxxx|HART Index|Guest Index| 0 |
* -------------------------------------------------------------
*/
/* Bits representing Guest index, HART index, and Group index */
u32 guest_index_bits;
u32 hart_index_bits;
u32 group_index_bits;
u32 group_index_shift;
/* Global base address matching all target MSI addresses */
phys_addr_t base_addr;
/* Number of interrupt identities */
u32 nr_ids;
/* Number of guest interrupt identities */
u32 nr_guest_ids;
/* Number of guest interrupt files across all HARTs */
u32 nr_guest_files;
/* Per-CPU IMSIC addresses */
struct imsic_local_config __percpu *local;
};
#ifdef CONFIG_RISCV_IMSIC
const struct imsic_global_config *imsic_get_global_config(void);
#else
static inline const struct imsic_global_config *imsic_get_global_config(void)
{
return NULL;
}
#endif
#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_RISCV_IMSIC)
int imsic_platform_acpi_probe(struct fwnode_handle *fwnode);
struct fwnode_handle *imsic_acpi_get_fwnode(struct device *dev);
#else
static inline struct fwnode_handle *imsic_acpi_get_fwnode(struct device *dev) { return NULL; }
#endif
#endif
Annotation
- Immediate include surface: `linux/types.h`, `linux/bitops.h`, `linux/device.h`, `linux/fwnode.h`.
- Detected declarations: `struct imsic_local_config`, `struct imsic_global_config`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.