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: <54637CCF.6020501@arm.com>
Date:	Wed, 12 Nov 2014 15:29:19 +0000
From:	Marc Zyngier <marc.zyngier@....com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	LKML <linux-kernel@...r.kernel.org>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	"grant.likely@...aro.org" <grant.likely@...aro.org>,
	Yingjoe Chen <yingjoe.chen@...iatek.com>,
	Yijing Wang <wangyijing@...wei.com>
Subject: Re: [patch 16/16] PCI/MSI: Enhance core to support hierarchy irqdomain

Hi Thomas,

On 12/11/14 13:43, Thomas Gleixner wrote:
> From: Jiang Liu <jiang.liu@...ux.intel.com>
> 
> Enhance PCI MSI core to support hierarchy irqdomain, so the common
> code can be shared across architectures.
> 
> [ tglx: Extracted and combined from several patches ]
> 
> Signed-off-by: Jiang Liu <jiang.liu@...ux.intel.com>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Grant Likely <grant.likely@...aro.org>
> Cc: Marc Zyngier <marc.zyngier@....com>
> Cc: Yingjoe Chen <yingjoe.chen@...iatek.com>
> Cc: Yijing Wang <wangyijing@...wei.com>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  drivers/pci/Kconfig |    5 ++++
>  drivers/pci/msi.c   |   62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/msi.h |    8 ++++++
>  3 files changed, 75 insertions(+)
> 
> Index: tip/drivers/pci/Kconfig
> ===================================================================
> --- tip.orig/drivers/pci/Kconfig
> +++ tip/drivers/pci/Kconfig
> @@ -17,6 +17,11 @@ config PCI_MSI
>  
>  	   If you don't know what to do here, say Y.
>  
> +config PCI_MSI_IRQ_DOMAIN
> +	bool
> +	depends on PCI_MSI
> +	select GENERIC_MSI_IRQ_DOMAIN
> +
>  config PCI_DEBUG
>  	bool "PCI Debugging"
>  	depends on PCI && DEBUG_KERNEL
> Index: tip/drivers/pci/msi.c
> ===================================================================
> --- tip.orig/drivers/pci/msi.c
> +++ tip/drivers/pci/msi.c
> @@ -19,6 +19,7 @@
>  #include <linux/errno.h>
>  #include <linux/io.h>
>  #include <linux/slab.h>
> +#include <linux/irqdomain.h>
>  
>  #include "pci.h"
>  
> @@ -1072,3 +1073,64 @@ int pci_enable_msix_range(struct pci_dev
>  	return nvec;
>  }
>  EXPORT_SYMBOL(pci_enable_msix_range);
> +
> +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN
> +void pci_msi_domain_write_msg(struct irq_data *irq_data, struct msi_msg *msg)
> +{
> +	struct msi_desc *desc = irq_data->msi_desc;
> +
> +	/*
> +	 * MSI-X message is written per-IRQ.
> +	 * MSI message denotes a contiguous group of IRQs, written for 0th IRQ.
> +	 */
> +	if (desc->irq == irq_data->irq)
> +		pci_write_msi_msg(desc, msg);

My compiler barks at this. Shouldn't that be either:
		pci_write_msi_msg(desc->irq, msg);
or
		__pci_write_msi_msg(desc, msg);
?

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