From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonkery Huang Subject: Re: [PATCH] tools: remove type parameter from xc_physdev_map_pirq{, _msi}() Date: Tue, 12 Aug 2008 16:07:25 +0800 Message-ID: <48A144BD.3000906@oracle.com> References: <48889515.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <48889515.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi, When build the latest xen-unstable(c/s 18311), run into a compilation err= or: make[4]: Entering directory=20 `/root/xen-unstable.hg/tools/ioemu-remote/i386-dm' gcc -I. -I.. -I/root/xen-unstable.hg/tools/ioemu-dir/target-i386=20 -I/root/xen-unstable.hg/tools/ioemu-dir -MMD -MP -DNEED_CPU_H=20 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE=20 -I/root/xen-unstable.hg/tools/ioemu-dir/tcg=20 -I/root/xen-unstable.hg/tools/ioemu-dir/tcg/i386=20 -I/root/xen-unstable.hg/tools/ioemu-dir/fpu -DHAS_AUDIO -DHAS_AUDIO=20 -I/root/xen-unstable.hg/tools/..//tools/libxc=20 -I/root/xen-unstable.hg/tools/..//tools/xenstore=20 -I/root/xen-unstable.hg/tools/..//tools/include=20 -I/root/xen-unstable.hg/tools/..//tools/blktap/lib -Wall -O2 -g=20 -fno-strict-aliasing -O2 -fomit-frame-pointer -m32 -march=3Di686=20 -fno-strict-aliasing -std=3Dgnu99 -Wall -Wstrict-prototypes=20 -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__=20 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE=20 -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -Wno-unused=20 -Wno-declaration-after-statement -Wno-pointer-sign -DCONFIG_PASSTHROUGH=20 -I../hw -m32 -DUSE_SSE2=3D1 -msse2 -Wno-unused=20 -Wno-declaration-after-statement -Wno-pointer-sign -DCONFIG_PASSTHROUGH=20 -c -o pass-through.o /root/xen-unstable.hg/tools/ioemu-dir/hw/pass-throug= h.c /root/xen-unstable.hg/tools/ioemu-dir/hw/pass-through.c: In function=20 =91register_real_device=92: /root/xen-unstable.hg/tools/ioemu-dir/hw/pass-through.c:2826: warning:=20 passing argument 4 of =91xc_physdev_map_pirq=92 makes integer from pointe= r=20 without a cast /root/xen-unstable.hg/tools/ioemu-dir/hw/pass-through.c:2826: error: too=20 few arguments to function =91xc_physdev_map_pirq=92 make[4]: *** [pass-through.o] Error 1 make[4]: Leaving directory=20 `/root/xen-unstable.hg/tools/ioemu-remote/i386-dm' make[3]: *** [subdir-i386-dm] Error 2 make[3]: Leaving directory `/root/xen-unstable.hg/tools/ioemu-remote' make[2]: *** [subdir-install-ioemu-dir] Error 2 make[2]: Leaving directory `/root/xen-unstable.hg/tools' make[1]: *** [subdirs-install] Error 2 make[1]: Leaving directory `/root/xen-unstable.hg/tools' make: *** [install-tools] Error 2 Jan Beulich wrote: > .. as it's implied by the function name. > > While the patch touches the deprecated ioemu sub-tree, I'm unsure in > what shape to submit patches againt the new qemu tree, so ideally the > respective parts would just be taken from this patch and also applied > to that tree. > > Signed-off-by: Jan Beulich > > Index: 2008-07-21/tools/ioemu/hw/pass-through.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 2008-07-21.orig/tools/ioemu/hw/pass-through.c 2008-07-18 16:19:33.0= 00000000 +0200 > +++ 2008-07-21/tools/ioemu/hw/pass-through.c 2008-07-24 11:51:44.000000= 000 +0200 > @@ -2785,8 +2785,7 @@ struct pt_dev * register_real_device(PCI > int pirq =3D pci_dev->irq; > =20 > machine_irq =3D pci_dev->irq; > - rc =3D xc_physdev_map_pirq(xc_handle, domid, MAP_PIRQ_TYPE_GSI= , > - machine_irq, &pirq); > + rc =3D xc_physdev_map_pirq(xc_handle, domid, machine_irq, &pir= q); > =20 > if ( rc ) > { > Index: 2008-07-21/tools/ioemu/hw/pt-msi.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 2008-07-21.orig/tools/ioemu/hw/pt-msi.c 2008-07-18 16:19:33.0000000= 00 +0200 > +++ 2008-07-21/tools/ioemu/hw/pt-msi.c 2008-07-24 11:52:34.000000000 +0= 200 > @@ -37,8 +37,7 @@ int pt_msi_setup(struct pt_dev *dev) > return -1; > } > =20 > - if ( xc_physdev_map_pirq_msi(xc_handle, domid, MAP_PIRQ_TYPE_MSI, > - AUTO_ASSIGN, &pirq, > + if ( xc_physdev_map_pirq_msi(xc_handle, domid, AUTO_ASSIGN, &pirq, > dev->pci_dev->dev << 3 | dev->pci_dev->func, > dev->pci_dev->bus, 0, 1) ) > { > @@ -120,8 +119,7 @@ static int pt_msix_update_one(struct pt_ > /* Check if this entry is already mapped */ > if ( entry->pirq =3D=3D -1 ) > { > - ret =3D xc_physdev_map_pirq_msi(xc_handle, domid, MAP_PIRQ_TYP= E_MSI, > - AUTO_ASSIGN, &pirq, > + ret =3D xc_physdev_map_pirq_msi(xc_handle, domid, AUTO_ASSIGN,= &pirq, > dev->pci_dev->dev << 3 | dev->pci_dev-= >func, > dev->pci_dev->bus, entry_nr, 0); > if ( ret ) > Index: 2008-07-21/tools/libxc/xc_physdev.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 2008-07-21.orig/tools/libxc/xc_physdev.c 2008-05-13 11:02:22.000000= 000 +0200 > +++ 2008-07-21/tools/libxc/xc_physdev.c 2008-07-24 11:50:46.000000000 += 0200 > @@ -22,7 +22,6 @@ int xc_physdev_pci_access_modify(int xc_ > =20 > int xc_physdev_map_pirq(int xc_handle, > int domid, > - int type, > int index, > int *pirq) > { > @@ -33,7 +32,7 @@ int xc_physdev_map_pirq(int xc_handle, > return -EINVAL; > =20 > map.domid =3D domid; > - map.type =3D type; > + map.type =3D MAP_PIRQ_TYPE_GSI; > map.index =3D index; > map.pirq =3D *pirq; > =20 > @@ -47,7 +46,6 @@ int xc_physdev_map_pirq(int xc_handle, > =20 > int xc_physdev_map_pirq_msi(int xc_handle, > int domid, > - int type, > int index, > int *pirq, > int devfn, > @@ -62,7 +60,7 @@ int xc_physdev_map_pirq_msi(int xc_handl > return -EINVAL; > =20 > map.domid =3D domid; > - map.type =3D type; > + map.type =3D MAP_PIRQ_TYPE_MSI; > map.index =3D index; > map.pirq =3D *pirq; > map.msi_info.devfn =3D devfn; > Index: 2008-07-21/tools/libxc/xenctrl.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 2008-07-21.orig/tools/libxc/xenctrl.h 2008-07-18 16:19:34.000000000= +0200 > +++ 2008-07-21/tools/libxc/xenctrl.h 2008-07-24 11:51:02.000000000 +020= 0 > @@ -907,13 +907,11 @@ int xc_gnttab_set_max_grants(int xcg_han > =20 > int xc_physdev_map_pirq(int xc_handle, > int domid, > - int type, > int index, > int *pirq); > =20 > int xc_physdev_map_pirq_msi(int xc_handle, > int domid, > - int type, > int index, > int *pirq, > int devfn, > Index: 2008-07-21/tools/python/xen/lowlevel/xc/xc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 2008-07-21.orig/tools/python/xen/lowlevel/xc/xc.c 2008-07-18 16:19:= 34.000000000 +0200 > +++ 2008-07-21/tools/python/xen/lowlevel/xc/xc.c 2008-07-24 11:53:02.00= 0000000 +0200 > @@ -958,8 +958,7 @@ static PyObject *pyxc_physdev_map_pirq(P > if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iii", kwd_list, > &dom, &index, &pirq) ) > return NULL; > - ret =3D xc_physdev_map_pirq(xc->xc_handle, dom, MAP_PIRQ_TYPE_GSI, > - index, &pirq); > + ret =3D xc_physdev_map_pirq(xc->xc_handle, dom, index, &pirq); > if ( ret !=3D 0 ) > return pyxc_error_to_exception(); > return PyLong_FromUnsignedLong(pirq); > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > =20 --=20 Thanks, J