[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 09/13] asm: arm: to_pci_dev
From: Manish Jaggi <mjaggi@xxxxxxxxxxxxxxxxxx> to_pci_dev for ARM was todo till now. Provide definition for this macro. Signed-off-by: Manish Jaggi <manish.jaggi@xxxxxxxxxx> --- xen/drivers/passthrough/arm/smmu.c | 3 ++- xen/include/asm-arm/pci.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers/passthrough/arm/smmu.c index 74c09b0991..81629a695c 100644 --- a/xen/drivers/passthrough/arm/smmu.c +++ b/xen/drivers/passthrough/arm/smmu.c @@ -46,10 +46,12 @@ #include <xen/rbtree.h> #include <xen/sched.h> #include <xen/sizes.h> +#include <xen/pci.h> #include <asm/atomic.h> #include <asm/device.h> #include <asm/io.h> #include <asm/platform.h> +#include <asm/pci.h> /* Xen: The below defines are redefined within the file. Undef it */ #undef SCTLR_AFE @@ -181,7 +183,6 @@ static void __iomem *devm_ioremap_resource(struct device *dev, * Xen: PCI functions * TODO: It should be implemented when PCI will be supported */ -#define to_pci_dev(dev) (NULL) static inline int pci_for_each_dma_alias(struct pci_dev *pdev, int (*fn) (struct pci_dev *pdev, u16 alias, void *data), diff --git a/xen/include/asm-arm/pci.h b/xen/include/asm-arm/pci.h index 3145ed505c..d3de409927 100644 --- a/xen/include/asm-arm/pci.h +++ b/xen/include/asm-arm/pci.h @@ -2,6 +2,12 @@ #define __ASM_ARM_PCI_H__ struct arch_pci_dev { + struct device dev; }; +#define to_pci_dev(d) container_of( \ + container_of(d, struct arch_pci_dev, dev), \ + struct pci_dev,\ + arch\ + ) #endif /* __ASM_ARM_PCI_H__ */ -- 2.14.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |