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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 20 Jul 2015 10:33:23 +0800
From:	"majun (F)" <majun258@...wei.com>
To:	Marc Zyngier <marc.zyngier@....com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Jason Cooper <jason@...edaemon.net>
CC:	<linux-arm-kernel@...ts.infradead.org>,
	<linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	Yijing Wang <wangyijing@...wei.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@....com>,
	Duc Dang <dhdang@....com>
Subject: Re: [PATCH v4 09/19] drivers: base: Add MSI domain support for non-PCI
 devices



在 2015/7/15 20:16, Marc Zyngier 写道:
> With the msi_list and the msi_domain properties now being at the
> generic device level, it is starting to be relatively easy to offer
> a generic way of providing non-PCI MSIs.
> 
[...]
> diff --git a/include/linux/msi.h b/include/linux/msi.h
> index c10ec56..b55cf63 100644
> --- a/include/linux/msi.h
> +++ b/include/linux/msi.h
> @@ -18,6 +18,11 @@ struct pci_dev;
>  void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
>  void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg);
>  
> +typedef void (*irq_write_msi_msg_t)(struct msi_desc *desc,
> +				    struct msi_msg *msg);
> +
> +struct platform_msi_priv_data;
> +
>  struct msi_desc {
>  	struct list_head		list;
>  	unsigned int			irq;
> @@ -42,6 +47,10 @@ struct msi_desc {
>  				void __iomem *mask_base;
>  			};
>  		};
> +		struct {
> +			struct platform_msi_priv_data *platform_msi_priv_data;
> +			u16 msi_index;
> +		};
>  	};
>  };
>  
When I add this patch in linux 4.2.rc2, this part is rejected. So I added this part
myself. But there is compiling errors.

drivers/base/platform-msi.c: In function 'platform_msi_free_descs':
drivers/base/platform-msi.c:129:2: error: implicit declaration of function 'to_pci_dev' [-Werror=implicit-function-declaration]
  list_for_each_entry_safe(desc, tmp, dev_to_msi_list(dev), list) {
  ^
In file included from include/linux/list.h:8:0,
                 from include/linux/kobject.h:20,
                 from include/linux/device.h:17,
                 from drivers/base/platform-msi.c:20:
include/linux/msi.h:57:50: error: invalid type argument of '->' (have 'int')
 #define dev_to_msi_list(dev)  (&to_pci_dev((dev))->msi_list)
                                                  ^
include/linux/kernel.h:810:49: note: in definition of macro 'container_of'
  const typeof( ((type *)0)->member ) *__mptr = (ptr); \
                                                 ^

> @@ -228,6 +237,12 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
>  void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev);
>  struct msi_domain_info *msi_get_domain_info(struct irq_domain *domain);
>  
> +struct irq_domain *platform_msi_create_irq_domain(struct device_node *np,
> +						  struct msi_domain_info *info,
> +						  struct irq_domain *parent);
> +int platform_msi_domain_alloc_irqs(struct device *dev, unsigned int nvec,
> +				   irq_write_msi_msg_t write_msi_msg);
> +void platform_msi_domain_free_irqs(struct device *dev);
>  #endif /* CONFIG_GENERIC_MSI_IRQ_DOMAIN */
>  
>  #ifdef CONFIG_PCI_MSI_IRQ_DOMAIN
> 

--
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