/linux/include/linux/ |
H A D | irqdomain.h | 42 struct irq_domain; 102 int (*match)(struct irq_domain *d, struct device_node *node, 104 int (*select)(struct irq_domain *d, struct irq_fwspec *fwspec, 106 int (*map)(struct irq_domain *d, unsigned int virq, irq_hw_number_t hw); 107 void (*unmap)(struct irq_domain *d, unsigned int virq); 108 int (*xlate)(struct irq_domain *d, struct device_node *node, 113 int (*alloc)(struct irq_domain *d, unsigned int virq, 115 void (*free)(struct irq_domain *d, unsigned int virq, 117 int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool reserve); 118 void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data); [all …]
|
H A D | msi.h | 81 struct irq_domain; 223 struct irq_domain *domain; 391 struct irq_domain; 433 int (*msi_init)(struct irq_domain *domain, 437 void (*msi_free)(struct irq_domain *domain, 440 int (*msi_prepare)(struct irq_domain *domain, 443 void (*prepare_desc)(struct irq_domain *domain, msi_alloc_info_t *arg, 447 int (*domain_alloc_irqs)(struct irq_domain *domain, 449 void (*domain_free_irqs)(struct irq_domain *domain, 451 void (*msi_post_free)(struct irq_domain *domain, [all …]
|
H A D | irq_sim.h | 20 int (*irq_sim_irq_requested)(struct irq_domain *domain, 22 void (*irq_sim_irq_released)(struct irq_domain *domain, 26 struct irq_domain *irq_domain_create_sim(struct fwnode_handle *fwnode, 28 struct irq_domain *devm_irq_domain_create_sim(struct device *dev, 31 struct irq_domain *irq_domain_create_sim_full(struct fwnode_handle *fwnode, 35 struct irq_domain * 41 void irq_domain_remove_sim(struct irq_domain *domain);
|
/linux/Documentation/translations/zh_CN/core-api/irq/ |
H A D | irq-domain.rst | 13 irq_domain 中断号映射库 35 irq_domain 库在 irq_alloc_desc*() API 的基础上增加了 hwirq 和 IRQ 号码 37 irq_domain来管理映射。 39 irq_domain还实现了从抽象的irq_fwspec结构体到hwirq号的转换(到目前为止是 42 irq_domain的用法 45 中断控制器驱动程序通过以下方式创建并注册一个irq_domain。调用 47 同的分配器函数,后面会详细介绍)。 函数成功后会返回一个指向irq_domain的指针。 50 在大多数情况下,irq_domain在开始时是空的,没有任何hwirq和IRQ号之间的映射。 51 通过调用irq_create_mapping()将映射添加到irq_domain中,该函数接受 52 irq_domain和一个hwirq号作为参数。 如果hwirq的映射还不存在,那么它将分配 [all …]
|
/linux/kernel/irq/ |
H A D | irqdomain.c | 26 static struct irq_domain *irq_default_domain; 28 static int irq_domain_alloc_irqs_locked(struct irq_domain *domain, int irq_base, 31 static void irq_domain_check_hierarchy(struct irq_domain *domain); 32 static void irq_domain_free_one_irq(struct irq_domain *domain, unsigned int virq); 42 static void debugfs_add_domain_dir(struct irq_domain *d); 43 static void debugfs_remove_domain_dir(struct irq_domain *d); 45 static inline void debugfs_add_domain_dir(struct irq_domain *d) { } in debugfs_add_domain_dir() 46 static inline void debugfs_remove_domain_dir(struct irq_domain *d) { } in debugfs_remove_domain_dir() 131 static int alloc_name(struct irq_domain *domain, char *base, enum irq_domain_bus_token bus_token) in alloc_name() 144 static int alloc_fwnode_name(struct irq_domain *domain, const struct fwnode_handle *fwnode, in alloc_fwnode_name() [all …]
|
H A D | msi.c | 600 static struct irq_domain *msi_get_device_domain(struct device *dev, unsigned int domid) in msi_get_device_domain() 602 struct irq_domain *domain; in msi_get_device_domain() 622 struct irq_domain *domain; in msi_domain_get_hwsize() 639 static void msi_check_level(struct irq_domain *domain, struct msi_msg *msg) in msi_check_level() 680 static int msi_domain_activate(struct irq_domain *domain, in msi_domain_activate() 691 static void msi_domain_deactivate(struct irq_domain *domain, in msi_domain_deactivate() 700 static int msi_domain_alloc(struct irq_domain *domain, unsigned int virq, in msi_domain_alloc() 732 static void msi_domain_free(struct irq_domain *domain, unsigned int virq, in msi_domain_free() 745 static int msi_domain_translate(struct irq_domain *domain, struct irq_fwspec *fwspec, in msi_domain_translate() 773 static int msi_domain_ops_prepare(struct irq_domain *domain, struct device *dev, in msi_domain_ops_prepare() [all …]
|
H A D | irq_sim.c | 18 struct irq_domain *domain; 145 static int irq_sim_domain_map(struct irq_domain *domain, in irq_sim_domain_map() 164 static void irq_sim_domain_unmap(struct irq_domain *domain, unsigned int virq) in irq_sim_domain_unmap() 192 struct irq_domain *irq_domain_create_sim(struct fwnode_handle *fwnode, in irq_domain_create_sim() 199 struct irq_domain *irq_domain_create_sim_full(struct fwnode_handle *fwnode, in irq_domain_create_sim_full() 238 void irq_domain_remove_sim(struct irq_domain *domain) in irq_domain_remove_sim() 252 struct irq_domain *domain = data; in devm_irq_domain_remove_sim() 268 struct irq_domain *devm_irq_domain_create_sim(struct device *dev, in devm_irq_domain_create_sim() 277 struct irq_domain * 284 struct irq_domain *domain; in devm_irq_domain_create_sim_full()
|
/linux/drivers/irqchip/ |
H A D | irq-loongson.h | 11 int liointc_acpi_init(struct irq_domain *parent, 13 int eiointc_acpi_init(struct irq_domain *parent, 15 int avecintc_acpi_init(struct irq_domain *parent); 17 int htvec_acpi_init(struct irq_domain *parent, 19 int pch_lpc_acpi_init(struct irq_domain *parent, 21 int pch_pic_acpi_init(struct irq_domain *parent, 23 int pch_msi_acpi_init(struct irq_domain *parent, 25 int pch_msi_acpi_init_avec(struct irq_domain *parent);
|
H A D | irq-loongarch-cpu.c | 18 static struct irq_domain *irq_domain; variable 81 generic_handle_domain_irq(irq_domain, hwirq - 1); in handle_cpu_irq() 85 static int loongarch_cpu_intc_map(struct irq_domain *d, unsigned int irq, in loongarch_cpu_intc_map() 105 irq_domain = irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM, in cpuintc_of_init() 107 if (!irq_domain) in cpuintc_of_init() 122 return liointc_acpi_init(irq_domain, liointc_entry); in liointc_parse_madt() 130 return eiointc_acpi_init(irq_domain, eiointc_entry); in eiointc_parse_madt() 146 r = avecintc_acpi_init(irq_domain); in acpi_cascade_irqdomain_init() 156 if (irq_domain) in cpuintc_acpi_init() 164 irq_domain = irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM, in cpuintc_acpi_init() [all …]
|
H A D | irq-mips-cpu.c | 37 static struct irq_domain *irq_domain; variable 38 static struct irq_domain *ipi_domain; 139 struct irq_domain *d; in plat_irq_dispatch() 145 d = irq_domain; in plat_irq_dispatch() 152 static int mips_cpu_intc_map(struct irq_domain *d, unsigned int irq, in mips_cpu_intc_map() 183 static int mips_cpu_ipi_alloc(struct irq_domain *domain, unsigned int virq, in mips_cpu_ipi_alloc() 217 static int mips_cpu_ipi_match(struct irq_domain *d, struct device_node *node, in mips_cpu_ipi_match() 241 ipi_domain = irq_domain_add_hierarchy(irq_domain, in mips_cpu_register_ipi_domain() 263 irq_domain = irq_domain_add_legacy(of_node, 8, MIPS_CPU_IRQ_BASE, 0, in __mips_cpu_irq_init() 266 if (!irq_domain) in __mips_cpu_irq_init()
|
H A D | irq-aspeed-i2c-ic.c | 24 struct irq_domain *irq_domain; member 41 generic_handle_domain_irq(i2c_ic->irq_domain, bit); in aspeed_i2c_ic_irq_handler() 50 static int aspeed_i2c_ic_map_irq_domain(struct irq_domain *domain, in aspeed_i2c_ic_map_irq_domain() 85 i2c_ic->irq_domain = irq_domain_add_linear(node, ASPEED_I2C_IC_NUM_BUS, in aspeed_i2c_ic_of_init() 88 if (!i2c_ic->irq_domain) { in aspeed_i2c_ic_of_init() 93 i2c_ic->irq_domain->name = "aspeed-i2c-domain"; in aspeed_i2c_ic_of_init()
|
H A D | irq-renesas-irqc.c | 52 struct irq_domain *irq_domain; member 118 generic_handle_domain_irq(p->irq_domain, i->hw_irq); in irqc_irq_handler() 171 p->irq_domain = irq_domain_add_linear(dev->of_node, p->number_of_irqs, in irqc_probe() 173 if (!p->irq_domain) { in irqc_probe() 179 ret = irq_alloc_domain_generic_chips(p->irq_domain, p->number_of_irqs, in irqc_probe() 187 p->gc = irq_get_domain_generic_chip(p->irq_domain, 0); in irqc_probe() 197 irq_domain_set_pm_device(p->irq_domain, dev); in irqc_probe() 214 irq_domain_remove(p->irq_domain); in irqc_probe() 225 irq_domain_remove(p->irq_domain); in irqc_remove()
|
H A D | irq-loongson-pch-msi.c | 80 static int pch_msi_parent_domain_alloc(struct irq_domain *domain, in pch_msi_parent_domain_alloc() 92 static int pch_msi_middle_domain_alloc(struct irq_domain *domain, in pch_msi_middle_domain_alloc() 121 static void pch_msi_middle_domain_free(struct irq_domain *domain, in pch_msi_middle_domain_free() 156 struct irq_domain *parent, in pch_msi_init_domains() 159 struct irq_domain *middle_domain; in pch_msi_init_domains() 179 struct irq_domain *parent_domain, struct fwnode_handle *domain_handle) in pch_msi_init() 222 struct irq_domain *parent_domain; in pch_msi_of_init() 268 int __init pch_msi_acpi_init(struct irq_domain *parent, struct acpi_madt_msi_pic *acpi_pchmsi) in pch_msi_acpi_init() 282 int __init pch_msi_acpi_init_avec(struct irq_domain *parent) in pch_msi_acpi_init_avec()
|
H A D | irq-atmel-aic5.c | 68 static struct irq_domain *aic5_domain; 87 struct irq_domain *domain = d->domain; in aic5_mask() 104 struct irq_domain *domain = d->domain; in aic5_unmask() 121 struct irq_domain *domain = d->domain; in aic5_retrigger() 135 struct irq_domain *domain = d->domain; in aic5_set_type() 156 struct irq_domain *domain = d->domain; in aic5_suspend() 186 struct irq_domain *domain = d->domain; in aic5_resume() 222 struct irq_domain *domain = d->domain; in aic5_pm_shutdown() 242 static void __init aic5_hw_init(struct irq_domain *domain) in aic5_hw_init() 273 static int aic5_irq_domain_xlate(struct irq_domain *d, in aic5_irq_domain_xlate() [all …]
|
H A D | irq-renesas-rza1.c | 45 struct irq_domain *irq_domain; member 102 static int rza1_irqc_alloc(struct irq_domain *domain, unsigned int virq, in rza1_irqc_alloc() 125 static int rza1_irqc_translate(struct irq_domain *domain, in rza1_irqc_translate() 194 struct irq_domain *parent = NULL; in rza1_irqc_probe() 234 priv->irq_domain = irq_domain_add_hierarchy(parent, 0, IRQC_NUM_IRQ, in rza1_irqc_probe() 237 if (!priv->irq_domain) { in rza1_irqc_probe() 251 irq_domain_remove(priv->irq_domain); in rza1_irqc_remove()
|
/linux/arch/powerpc/platforms/embedded6xx/ |
H A D | hlwd-pic.c | 93 static struct irq_domain *hlwd_irq_host; 95 static int hlwd_pic_map(struct irq_domain *h, unsigned int virq, in hlwd_pic_map() 108 static unsigned int __hlwd_pic_get_irq(struct irq_domain *h) in __hlwd_pic_get_irq() 124 struct irq_domain *irq_domain = irq_desc_get_handler_data(desc); in hlwd_pic_irq_cascade() local 131 hwirq = __hlwd_pic_get_irq(irq_domain); in hlwd_pic_irq_cascade() 133 generic_handle_domain_irq(irq_domain, hwirq); in hlwd_pic_irq_cascade() 156 static struct irq_domain *__init hlwd_pic_init(struct device_node *np) in hlwd_pic_init() 158 struct irq_domain *irq_domain; in hlwd_pic_init() local 178 irq_domain = irq_domain_add_linear(np, HLWD_NR_IRQS, in hlwd_pic_init() 180 if (!irq_domain) { in hlwd_pic_init() [all …]
|
H A D | flipper-pic.c | 96 static struct irq_domain *flipper_irq_host; 98 static int flipper_pic_map(struct irq_domain *h, unsigned int virq, in flipper_pic_map() 123 static struct irq_domain * __init flipper_pic_init(struct device_node *np) in flipper_pic_init() 126 struct irq_domain *irq_domain = NULL; in flipper_pic_init() local 152 irq_domain = irq_domain_add_linear(np, FLIPPER_NR_IRQS, in flipper_pic_init() 154 if (!irq_domain) { in flipper_pic_init() 160 return irq_domain; in flipper_pic_init()
|
/linux/arch/x86/include/asm/ |
H A D | irqdomain.h | 16 extern struct irq_domain *x86_vector_domain; 43 extern int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq, 45 extern void mp_irqdomain_free(struct irq_domain *domain, unsigned int virq, 47 extern int mp_irqdomain_activate(struct irq_domain *domain, 49 extern void mp_irqdomain_deactivate(struct irq_domain *domain, 51 extern int mp_irqdomain_ioapic_idx(struct irq_domain *domain); 56 struct irq_domain *native_create_pci_msi_domain(void); 57 extern struct irq_domain *x86_pci_msi_default_domain;
|
/linux/drivers/ssb/ |
H A D | driver_gpio.c | 31 return irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_to_irq() 135 generic_handle_domain_irq_safe(bus->irq_domain, gpio); in ssb_gpio_irq_chipco_handler() 151 bus->irq_domain = irq_domain_add_linear(NULL, chip->ngpio, in ssb_gpio_irq_chipco_domain_init() 153 if (!bus->irq_domain) { in ssb_gpio_irq_chipco_domain_init() 158 int irq = irq_create_mapping(bus->irq_domain, gpio); in ssb_gpio_irq_chipco_domain_init() 178 int irq = irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_irq_chipco_domain_init() 182 irq_domain_remove(bus->irq_domain); in ssb_gpio_irq_chipco_domain_init() 199 int irq = irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_irq_chipco_domain_exit() 203 irq_domain_remove(bus->irq_domain); in ssb_gpio_irq_chipco_domain_exit() 334 generic_handle_domain_irq_safe(bus->irq_domain, gpio); in ssb_gpio_irq_extif_handler() [all …]
|
/linux/Documentation/core-api/irq/ |
H A D | irq-domain.rst | 2 The irq_domain interrupt number mapping library 32 The irq_domain library adds mapping between hwirq and IRQ numbers on 33 top of the irq_alloc_desc*() API. An irq_domain to manage mapping is 37 irq_domain also implements translation from an abstract irq_fwspec 41 irq_domain usage 44 An interrupt controller driver creates and registers an irq_domain by 47 The function will return a pointer to the irq_domain on success. The caller 50 In most cases, the irq_domain will begin empty without any mappings 51 between hwirq and IRQ numbers. Mappings are added to the irq_domain 52 by calling irq_create_mapping() which accepts the irq_domain and a [all …]
|
/linux/drivers/platform/x86/intel/ |
H A D | crystal_cove_charger.c | 26 struct irq_domain *irq_domain; member 83 irq_domain_remove(charger->irq_domain); in crystal_cove_charger_rm_irq_domain() 103 charger->irq_domain = irq_domain_create_linear(dev_fwnode(pdev->dev.parent), 1, in crystal_cove_charger_probe() 105 if (!charger->irq_domain) in crystal_cove_charger_probe() 109 irq_domain_update_bus_token(charger->irq_domain, DOMAIN_BUS_WAKEUP); in crystal_cove_charger_probe() 115 charger->charger_irq = irq_create_mapping(charger->irq_domain, 0); in crystal_cove_charger_probe()
|
/linux/drivers/pci/msi/ |
H A D | irqdomain.c | 13 struct irq_domain *domain; in pci_msi_setup_msi_irqs() 24 struct irq_domain *domain; in pci_msi_teardown_msi_irqs() 114 struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode, in pci_msi_create_irq_domain() 116 struct irq_domain *parent) in pci_msi_create_irq_domain() 225 static void pci_msix_prepare_desc(struct irq_domain *domain, msi_alloc_info_t *arg, in pci_msix_prepare_desc() 262 struct irq_domain *domain = dev_get_msi_domain(&pdev->dev); in pci_create_device_domain() 348 struct irq_domain *domain; in pci_msi_domain_supports() 415 u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev) in pci_msi_domain_get_msi_rid() 438 struct irq_domain *pci_msi_get_device_domain(struct pci_dev *pdev) in pci_msi_get_device_domain() 440 struct irq_domain *dom; in pci_msi_get_device_domain()
|
/linux/arch/x86/platform/uv/ |
H A D | uv_irq.c | 75 static int uv_domain_alloc(struct irq_domain *domain, unsigned int virq, in uv_domain_alloc() 109 static void uv_domain_free(struct irq_domain *domain, unsigned int virq, in uv_domain_free() 125 static int uv_domain_activate(struct irq_domain *domain, in uv_domain_activate() 136 static void uv_domain_deactivate(struct irq_domain *domain, in uv_domain_deactivate() 155 static struct irq_domain *uv_get_irq_domain(void) in uv_get_irq_domain() 157 static struct irq_domain *uv_domain; in uv_get_irq_domain() 188 struct irq_domain *domain = uv_get_irq_domain(); in uv_setup_irq()
|
/linux/drivers/mailbox/ |
H A D | qcom-ipcc.c | 53 struct irq_domain *irq_domain; member 83 virq = irq_find_mapping(ipcc->irq_domain, hwirq); in qcom_ipcc_irq_fn() 114 static int qcom_ipcc_domain_map(struct irq_domain *d, unsigned int irq, in qcom_ipcc_domain_map() 126 static int qcom_ipcc_domain_xlate(struct irq_domain *d, in qcom_ipcc_domain_xlate() 266 virq = irq_find_mapping(ipcc->irq_domain, hwirq); in qcom_ipcc_pm_resume() 299 ipcc->irq_domain = irq_domain_add_tree(pdev->dev.of_node, in qcom_ipcc_probe() 301 if (!ipcc->irq_domain) in qcom_ipcc_probe() 324 irq_domain_remove(ipcc->irq_domain); in qcom_ipcc_probe() 334 irq_domain_remove(ipcc->irq_domain); in qcom_ipcc_remove()
|
/linux/drivers/mfd/ |
H A D | twl6030-irq.c | 113 struct irq_domain *irq_domain; member 190 irq_find_mapping(pdata->irq_domain, in twl6030_irq_thread() 303 return irq_find_mapping(twl6030_irq->irq_domain, in twl6030_mmc_card_detect_config() 333 static int twl6030_irq_map(struct irq_domain *d, unsigned int virq, in twl6030_irq_map() 347 static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq) in twl6030_irq_unmap() 414 twl6030_irq->irq_domain = in twl6030_init_irq() 417 if (!twl6030_irq->irq_domain) { in twl6030_init_irq() 437 irq_domain_remove(twl6030_irq->irq_domain); in twl6030_init_irq()
|