From: Stefano Stabellini Subject: Re: 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 17:43:50 +0100 Message-ID: References: <1428424057966.85266@caviumnetworks.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1342847746-939666657-1428425030=:7690" Return-path: In-Reply-To: <1428424057966.85266@caviumnetworks.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Jaggi, Manish" Cc: Ian Campbell , Julien Grall , "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --1342847746-939666657-1428425030=:7690 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 7 Apr 2015, Jaggi, Manish wrote: > Hi Julien, >=20 >=20 > Following patch generated compiler error when HAS_PCI adn HAS_PASSTHROUGH= enabled. > 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. Hello Manish, we have never really built Xen on ARM with HAS_PCI=3Dy so it is normal that it won't compile out of the box, it is not just a problem caused by the commit below. I imagine that you'll need to do more than setting HAS_PCI to y in order to get PCI and PCI passthrough working properly with Xen on ARM. Feel free to go ahead and propose any changes necessary. Cheers, Stefano > =C2=A0=C2=A0=C2=A0 xen/arm: Introduce a generic way to describe device > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0=C2=A0 Currently, Xen is supporting PCI and Platform device (= based on Device Tree). > =C2=A0=C2=A0=20 > =C2=A0=C2=A0=C2=A0 While Xen only supports Platform device on ARM, Xen wi= ll gain support of > =C2=A0=C2=A0=C2=A0 PCI soon. > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0=C2=A0 Some drivers, such as IOMMU drivers, may handle PCI an= d platform device in > =C2=A0=C2=A0=C2=A0 the same way. Only few lines of code differs. > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0=C2=A0 Rather than requesting to provide 2 set of functions (= one for PCI and > =C2=A0=C2=A0=C2=A0 one for platform device), introduce a generic structur= e "device" which > =C2=A0=C2=A0=C2=A0 is embedded in each specialized device. > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0=C2=A0 As x86 only supports PCI, introduce a new type device_= t which will be an > =C2=A0=C2=A0=C2=A0 alias to pci_dev for this architecture. It will avoid = to add a new field > =C2=A0=C2=A0=C2=A0 for this place. > =C2=A0=C2=A0 =C2=A0 > =C2=A0=C2=A0=C2=A0 Signed-off-by: Julien Grall > =C2=A0=C2=A0=C2=A0 Acked-by: Jan Beulich > =C2=A0=C2=A0=C2=A0 Acked-by: Stefano Stabellini > =C2=A0=C2=A0=C2=A0 CC: Keir Fraser > =C2=A0=C2=A0=C2=A0 CC: Andrew Cooper >=20 > ---- >=20 > Compilation error > pci.c: In function =E2=80=98iommu_add_device=E2=80=99: > pci.c:1263:5: error: implicit declaration of function =E2=80=98pci_to_dev= =E2=80=99 [-Werror=3Dimplicit-function-declaration] > pci.c:1263:5: error: nested extern declaration of =E2=80=98pci_to_dev=E2= =80=99 [-Werror=3Dnested-externs] > pci.c:1263:5: error: passing argument 2 of =E2=80=98hd->platform_ops->add= _device=E2=80=99 makes pointer from integer without a cast [-Werror] > pci.c:1263:5: note: expected =E2=80=98struct device_t *=E2=80=99 but argu= ment is of type =E2=80=98int=E2=80=99 > pci.c:1272:9: error: passing argument 2 of =E2=80=98hd->platform_ops->add= _device=E2=80=99 makes pointer from integer without a cast [-Werror] > pci.c:1272:9: note: expected =E2=80=98struct device_t *=E2=80=99 but argu= ment is of type =E2=80=98int=E2=80=99 >=20 >=20 > Regards, > Manish Jaggi =20 --1342847746-939666657-1428425030=:7690 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --1342847746-939666657-1428425030=:7690--