lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151119120807.07ffd476@arm.com>
Date:	Thu, 19 Nov 2015 12:08:07 +0000
From:	Marc Zyngier <marc.zyngier@....com>
To:	Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>
Cc:	<tglx@...utronix.de>, <jason@...edaemon.net>, <rjw@...ysocki.net>,
	Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
	Will Deacon <will.deacon@....com>,
	Catalin Marinas <Catalin.Marinas@....com>,
	<hanjun.guo@...aro.org>, <tomasz.nowicki@...aro.org>,
	<graeme.gregory@...aro.org>, <dhdang@....com>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH V3 2/6] acpi: pci: Setup MSI domain for ACPI based pci
 devices

On Wed, 21 Oct 2015 11:47:25 -0700
Suravee Suthikulpanit <Suravee.Suthikulpanit@....com> wrote:

Hi Suravee,

Sorry it took so long to get to this series. Comments below.

> This patch introduces pci_host_bridge_acpi_msi_domain(), which returns
> the MSI domain of the specified PCI host bridge with DOMAIN_BUS_PCI_MSI
> bus token. Then, it is assigned to pci device.
> 
> Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>
> ---
>  drivers/pci/pci-acpi.c | 13 +++++++++++++
>  drivers/pci/probe.c    |  2 ++
>  include/linux/pci.h    |  7 +++++++
>  3 files changed, 22 insertions(+)
> 
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index a32ba75..0e21ef4 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -9,7 +9,9 @@
>  
>  #include <linux/delay.h>
>  #include <linux/init.h>
> +#include <linux/irqdomain.h>
>  #include <linux/pci.h>
> +#include <linux/msi.h>
>  #include <linux/pci_hotplug.h>
>  #include <linux/module.h>
>  #include <linux/pci-aspm.h>
> @@ -689,6 +691,17 @@ static struct acpi_bus_type acpi_pci_bus = {
>  	.cleanup = pci_acpi_cleanup,
>  };
>  
> +struct irq_domain *pci_host_bridge_acpi_msi_domain(struct pci_bus *bus)
> +{
> +	struct irq_domain *dom = NULL;
> +	struct fwnode_handle *fwnode = pci_msi_get_fwnode(&bus->dev);
> +
> +	if (fwnode)
> +		dom = irq_find_matching_fwnode(fwnode,
> +					       DOMAIN_BUS_PCI_MSI);
> +	return dom;
> +}
> +

Given this, I really question the need for what you define in patch #1
to be standalone. It is only used by ACPI (DT has its own private
helpers), and it is so far unlikely that it will be of any use for
other firmware interfaces.

My suggestion is to get rid of pci_msi_get_fwnode() and move the
registration helper into this file. That'd be much simpler.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ