Skip to content

Commit a1d4646

Browse files
zhangtianyang-ztyKAGA-KOKO
authored andcommitted
irqchip/loongson-pch-msi: Prepare get_pch_msi_handle() for AVECINTC
On Loongson-3C6000 and higher systems with AVECINTC irqchip, there may be multiple PCI segments, but only one PCH-MSI irq domain. In this case, let get_pch_msi_handle() return the first domain handle. Co-developed-by: Jianmin Lv <[email protected]> Signed-off-by: Jianmin Lv <[email protected]> Co-developed-by: Liupu Wang <[email protected]> Signed-off-by: Liupu Wang <[email protected]> Co-developed-by: Huacai Chen <[email protected]> Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Tianyang Zhang <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 9e83dd3 commit a1d4646

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/irqchip/irq-loongson-pch-msi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,17 @@ IRQCHIP_DECLARE(pch_msi, "loongson,pch-msi-1.0", pch_msi_of_init);
255255
#ifdef CONFIG_ACPI
256256
struct fwnode_handle *get_pch_msi_handle(int pci_segment)
257257
{
258-
int i;
258+
if (cpu_has_avecint)
259+
return pch_msi_handle[0];
259260

260-
for (i = 0; i < MAX_IO_PICS; i++) {
261+
for (int i = 0; i < MAX_IO_PICS; i++) {
261262
if (msi_group[i].pci_segment == pci_segment)
262263
return pch_msi_handle[i];
263264
}
264-
return NULL;
265+
return pch_msi_handle[0];
265266
}
266267

267-
int __init pch_msi_acpi_init(struct irq_domain *parent,
268-
struct acpi_madt_msi_pic *acpi_pchmsi)
268+
int __init pch_msi_acpi_init(struct irq_domain *parent, struct acpi_madt_msi_pic *acpi_pchmsi)
269269
{
270270
int ret;
271271
struct fwnode_handle *domain_handle;

0 commit comments

Comments
 (0)