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

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



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)
+#define pci_domain_nr(dev) dev->seg
 #define for_each_pdev(domain, pdev) \
     list_for_each_entry(pdev, &(domain->arch.pdev_list), domain_list)
 
-- 
2.14.1


_______________________________________________
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®.