[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250310164122.GA551965@bhelgaas>
Date: Mon, 10 Mar 2025 11:41:22 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Roman Kisel <romank@...ux.microsoft.com>
Cc: arnd@...db.de, bhelgaas@...gle.com, bp@...en8.de,
catalin.marinas@....com, conor+dt@...nel.org,
dave.hansen@...ux.intel.com, decui@...rosoft.com,
haiyangz@...rosoft.com, hpa@...or.com, joey.gouly@....com,
krzk+dt@...nel.org, kw@...ux.com, kys@...rosoft.com,
lenb@...nel.org, lpieralisi@...nel.org,
manivannan.sadhasivam@...aro.org, mark.rutland@....com,
maz@...nel.org, mingo@...hat.com, oliver.upton@...ux.dev,
rafael@...nel.org, robh@...nel.org, ssengar@...ux.microsoft.com,
sudeep.holla@....com, suzuki.poulose@....com, tglx@...utronix.de,
wei.liu@...nel.org, will@...nel.org, yuzenghui@...wei.com,
devicetree@...r.kernel.org, kvmarm@...ts.linux.dev,
linux-acpi@...r.kernel.org, linux-arch@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
x86@...nel.org, apais@...rosoft.com, benhill@...rosoft.com,
bperkins@...rosoft.com, sunilmut@...rosoft.com
Subject: Re: [PATCH hyperv-next v5 11/11] PCI: hv: Get vPCI MSI IRQ domain
from DeviceTree
On Fri, Mar 07, 2025 at 02:03:03PM -0800, Roman Kisel wrote:
> The hyperv-pci driver uses ACPI for MSI IRQ domain configuration on
> arm64. It won't be able to do that in the VTL mode where only DeviceTree
> can be used.
>
> Update the hyperv-pci driver to get vPCI MSI IRQ domain in the DeviceTree
> case, too.
>
> Signed-off-by: Roman Kisel <romank@...ux.microsoft.com>
A couple minor comments below, but I don't have any objection to this,
so if it's OK with the pci-hyperv.c folks, it's OK with me.
> +#ifdef CONFIG_OF
> +
> +static struct irq_domain *hv_pci_of_irq_domain_parent(void)
> +{
> + struct device_node *parent;
> + struct irq_domain *domain;
> +
> + parent = of_irq_find_parent(hv_get_vmbus_root_device()->of_node);
> + domain = NULL;
> + if (parent) {
> + domain = irq_find_host(parent);
> + of_node_put(parent);
> + }
> +
> + return domain;
I think this would be a little simpler as:
parent = of_irq_find_parent(hv_get_vmbus_root_device()->of_node);
if (!parent)
return NULL;
domain = irq_find_host(parent);
of_node_put(parent);
return domain;
> +}
> +
> +#endif
> +
> +#ifdef CONFIG_ACPI
> +
> +static struct irq_domain *hv_pci_acpi_irq_domain_parent(void)
> +{
> + struct irq_domain *domain;
> + acpi_gsi_domain_disp_fn gsi_domain_disp_fn;
> +
> + if (acpi_irq_model != ACPI_IRQ_MODEL_GIC)
> + return NULL;
> + gsi_domain_disp_fn = acpi_get_gsi_dispatcher();
> + if (!gsi_domain_disp_fn)
> + return NULL;
> + domain = irq_find_matching_fwnode(gsi_domain_disp_fn(0),
> + DOMAIN_BUS_ANY);
> +
> + if (!domain)
> + return NULL;
> +
> + return domain;
if (!domain)
return NULL;
return domain;
is the same as:
return domain;
or even just:
return irq_find_matching_fwnode(gsi_domain_disp_fn(0), DOMAIN_BUS_ANY);
> +}
Powered by blists - more mailing lists