[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC 11/11] Add to_pci_dev macro




On 1/2/2018 2:28 AM, manish.jaggi@xxxxxxxxxx wrote:
> From: Manish Jaggi <manish.jaggi@xxxxxxxxxx>
>
> This patch adds to_pci_dev macro
>
> Signed-off-by: Manish Jaggi <manish.jaggi@xxxxxxxxxx>
> ---
>  xen/include/xen/pci.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
> index 43f21251a5..4c7ff4dd10 100644
> --- a/xen/include/xen/pci.h
> +++ b/xen/include/xen/pci.h
> @@ -92,8 +92,11 @@ struct pci_dev {
>  #define PT_FAULT_THRESHOLD 10
>      } fault;
>      u64 vf_rlen[6];
> +    struct device dev;
>  };
>  
> +#define to_pci_dev(p) container_of(p, struct pci_dev, dev)
Remove the above function from smmu.c if it needs to be defined here.
> +#define pci_domain_nr(dev) dev->seg
>  #define for_each_pdev(domain, pdev) \
>      list_for_each_entry(pdev, &(domain->arch.pdev_list), domain_list)
>  


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.