From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jaggi, Manish" Subject: Issue With Patch Compilation Fails ( xen/arm: Introduce a generic way to describe device) with HAS_PCI and HAS_PASSTHROUGH. Date: Tue, 7 Apr 2015 16:27:38 +0000 Message-ID: <1428424057966.85266@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall , "xen-devel@lists.xensource.com" Cc: Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Hi Julien, Following patch generated compiler error when HAS_PCI adn HAS_PASSTHROUGH e= nabled. Please advice how to fix this issue, or you can revert this patch. Should I add a device structure in pci_dev or there is another way. ---- =A0=A0=A0 xen/arm: Introduce a generic way to describe device =A0=A0 =A0 =A0=A0=A0 Currently, Xen is supporting PCI and Platform device (based on De= vice Tree). =A0=A0 = =A0=A0=A0 While Xen only supports Platform device on ARM, Xen will gain sup= port of =A0=A0=A0 PCI soon. =A0=A0 =A0 =A0=A0=A0 Some drivers, such as IOMMU drivers, may handle PCI and platform = device in =A0=A0=A0 the same way. Only few lines of code differs. =A0=A0 =A0 =A0=A0=A0 Rather than requesting to provide 2 set of functions (one for PCI= and =A0=A0=A0 one for platform device), introduce a generic structure "device" = which =A0=A0=A0 is embedded in each specialized device. =A0=A0 =A0 =A0=A0=A0 As x86 only supports PCI, introduce a new type device_t which wil= l be an =A0=A0=A0 alias to pci_dev for this architecture. It will avoid to add a ne= w field =A0=A0=A0 for this place. =A0=A0 =A0 =A0=A0=A0 Signed-off-by: Julien Grall =A0=A0=A0 Acked-by: Jan Beulich =A0=A0=A0 Acked-by: Stefano Stabellini =A0=A0=A0 CC: Keir Fraser =A0=A0=A0 CC: Andrew Cooper ---- Compilation error pci.c: In function =91iommu_add_device=92: pci.c:1263:5: error: implicit declaration of function =91pci_to_dev=92 [-We= rror=3Dimplicit-function-declaration] pci.c:1263:5: error: nested extern declaration of =91pci_to_dev=92 [-Werror= =3Dnested-externs] pci.c:1263:5: error: passing argument 2 of =91hd->platform_ops->add_device= =92 makes pointer from integer without a cast [-Werror] pci.c:1263:5: note: expected =91struct device_t *=92 but argument is of typ= e =91int=92 pci.c:1272:9: error: passing argument 2 of =91hd->platform_ops->add_device= =92 makes pointer from integer without a cast [-Werror] pci.c:1272:9: note: expected =91struct device_t *=92 but argument is of typ= e =91int=92 Regards, Manish Jaggi =