irqdomain: Rename irq_get_default_host() to irq_get_default_domain()

Naming interrupt domains host is confusing at best and the irqdomain code
uses both domain and host inconsistently.

Therefore rename irq_get_default_host() to irq_get_default_domain().

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250319092951.37667-4-jirislaby@kernel.org

authored by Jiri Slaby (SUSE) and committed by Thomas Gleixner 0a27ea38 825dfab2

+11 -11
+1 -1
arch/mips/pci/pci-xtalk-bridge.c
··· 620 if (bridge_get_partnum(virt_to_phys((void *)bd->bridge_addr), partnum)) 621 return -EPROBE_DEFER; /* not available yet */ 622 623 - parent = irq_get_default_host(); 624 if (!parent) 625 return -ENODEV; 626 fn = irq_domain_alloc_named_fwnode("BRIDGE");
··· 620 if (bridge_get_partnum(virt_to_phys((void *)bd->bridge_addr), partnum)) 621 return -EPROBE_DEFER; /* not available yet */ 622 623 + parent = irq_get_default_domain(); 624 if (!parent) 625 return -ENODEV; 626 fn = irq_domain_alloc_named_fwnode("BRIDGE");
+1 -1
arch/powerpc/kvm/book3s_hv.c
··· 6041 * the underlying calls, which will EOI the interrupt in real 6042 * mode, need an HW IRQ number mapped in the XICS IRQ domain. 6043 */ 6044 - host_data = irq_domain_get_irq_data(irq_get_default_host(), host_irq); 6045 irq_map->r_hwirq = (unsigned int)irqd_to_hwirq(host_data); 6046 6047 if (i == pimap->n_mapped)
··· 6041 * the underlying calls, which will EOI the interrupt in real 6042 * mode, need an HW IRQ number mapped in the XICS IRQ domain. 6043 */ 6044 + host_data = irq_domain_get_irq_data(irq_get_default_domain(), host_irq); 6045 irq_map->r_hwirq = (unsigned int)irqd_to_hwirq(host_data); 6046 6047 if (i == pimap->n_mapped)
+1 -1
arch/powerpc/kvm/book3s_xive.c
··· 1555 struct kvmppc_xive_src_block *sb; 1556 struct kvmppc_xive_irq_state *state; 1557 struct irq_data *host_data = 1558 - irq_domain_get_irq_data(irq_get_default_host(), host_irq); 1559 unsigned int hw_irq = (unsigned int)irqd_to_hwirq(host_data); 1560 u16 idx; 1561 u8 prio;
··· 1555 struct kvmppc_xive_src_block *sb; 1556 struct kvmppc_xive_irq_state *state; 1557 struct irq_data *host_data = 1558 + irq_domain_get_irq_data(irq_get_default_domain(), host_irq); 1559 unsigned int hw_irq = (unsigned int)irqd_to_hwirq(host_data); 1560 u16 idx; 1561 u8 prio;
+1 -1
arch/powerpc/platforms/powernv/pci-ioda.c
··· 1881 static int __init pnv_msi_allocate_domains(struct pci_controller *hose, unsigned int count) 1882 { 1883 struct pnv_phb *phb = hose->private_data; 1884 - struct irq_domain *parent = irq_get_default_host(); 1885 1886 hose->fwnode = irq_domain_alloc_named_id_fwnode("PNV-MSI", phb->opal_id); 1887 if (!hose->fwnode)
··· 1881 static int __init pnv_msi_allocate_domains(struct pci_controller *hose, unsigned int count) 1882 { 1883 struct pnv_phb *phb = hose->private_data; 1884 + struct irq_domain *parent = irq_get_default_domain(); 1885 1886 hose->fwnode = irq_domain_alloc_named_id_fwnode("PNV-MSI", phb->opal_id); 1887 if (!hose->fwnode)
+1 -1
arch/powerpc/platforms/pseries/msi.c
··· 611 static int __pseries_msi_allocate_domains(struct pci_controller *phb, 612 unsigned int count) 613 { 614 - struct irq_domain *parent = irq_get_default_host(); 615 616 phb->fwnode = irq_domain_alloc_named_id_fwnode("pSeries-MSI", 617 phb->global_number);
··· 611 static int __pseries_msi_allocate_domains(struct pci_controller *phb, 612 unsigned int count) 613 { 614 + struct irq_domain *parent = irq_get_default_domain(); 615 616 phb->fwnode = irq_domain_alloc_named_id_fwnode("pSeries-MSI", 617 phb->global_number);
+2 -2
drivers/irqchip/irq-armada-370-xp.c
··· 564 565 static int mpic_starting_cpu(unsigned int cpu) 566 { 567 - struct mpic *mpic = irq_get_default_host()->host_data; 568 569 mpic_perf_init(mpic); 570 mpic_smp_cpu_init(mpic); ··· 700 701 static void __exception_irq_entry mpic_handle_irq(struct pt_regs *regs) 702 { 703 - struct mpic *mpic = irq_get_default_host()->host_data; 704 irq_hw_number_t i; 705 u32 irqstat; 706
··· 564 565 static int mpic_starting_cpu(unsigned int cpu) 566 { 567 + struct mpic *mpic = irq_get_default_domain()->host_data; 568 569 mpic_perf_init(mpic); 570 mpic_smp_cpu_init(mpic); ··· 700 701 static void __exception_irq_entry mpic_handle_irq(struct pt_regs *regs) 702 { 703 + struct mpic *mpic = irq_get_default_domain()->host_data; 704 irq_hw_number_t i; 705 u32 irqstat; 706
+1 -1
include/linux/irqdomain.h
··· 353 struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, 354 enum irq_domain_bus_token bus_token); 355 void irq_set_default_domain(struct irq_domain *domain); 356 - struct irq_domain *irq_get_default_host(void); 357 int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, 358 irq_hw_number_t hwirq, int node, 359 const struct irq_affinity_desc *affinity);
··· 353 struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, 354 enum irq_domain_bus_token bus_token); 355 void irq_set_default_domain(struct irq_domain *domain); 356 + struct irq_domain *irq_get_default_domain(void); 357 int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, 358 irq_hw_number_t hwirq, int node, 359 const struct irq_affinity_desc *affinity);
+3 -3
kernel/irq/irqdomain.c
··· 590 EXPORT_SYMBOL_GPL(irq_set_default_domain); 591 592 /** 593 - * irq_get_default_host() - Retrieve the "default" irq domain 594 * 595 * Returns: the default domain, if any. 596 * ··· 598 * systems that cannot implement a firmware->fwnode mapping (which 599 * both DT and ACPI provide). 600 */ 601 - struct irq_domain *irq_get_default_host(void) 602 { 603 return irq_default_domain; 604 } 605 - EXPORT_SYMBOL_GPL(irq_get_default_host); 606 607 static bool irq_domain_is_nomap(struct irq_domain *domain) 608 {
··· 590 EXPORT_SYMBOL_GPL(irq_set_default_domain); 591 592 /** 593 + * irq_get_default_domain() - Retrieve the "default" irq domain 594 * 595 * Returns: the default domain, if any. 596 * ··· 598 * systems that cannot implement a firmware->fwnode mapping (which 599 * both DT and ACPI provide). 600 */ 601 + struct irq_domain *irq_get_default_domain(void) 602 { 603 return irq_default_domain; 604 } 605 + EXPORT_SYMBOL_GPL(irq_get_default_domain); 606 607 static bool irq_domain_is_nomap(struct irq_domain *domain) 608 {