aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-30 09:26:06 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-30 09:26:06 +0100
commitd508c764f18bc68826d415ac5157bbb1b472e6da (patch)
tree7f2b93898931242245e6e817252239cdcd4972e6 /tools
parentcada0c18f8d184ca8ae902d720b9b95ee7b971ad (diff)
downloadxen-d508c764f18bc68826d415ac5157bbb1b472e6da.tar.gz
xen-d508c764f18bc68826d415ac5157bbb1b472e6da.tar.bz2
xen-d508c764f18bc68826d415ac5157bbb1b472e6da.zip
ioemu: fix warnings in pass-through.h and pass-through.c
This patch backports following changes of ioemu-remote to ioemu. It fixs warning in tools/ioemu/hw/pass-through.h and tools/ioemu/hw/pass-through.c. commit 30f00a0284a5ee356de6f6095e52173f2234145b Author: Ian Jackson <ian.jackson@eu.citrix.com> Date: Fri Jul 18 16:02:23 2008 +0100 hw/pass-through.c: pt_unregister_regions returns void It only ever falls off the end, and its return value is not used by its one caller. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> commit 439836900dad41f66234d2a14981aa2a90d4d346 Author: Ian Jackson <ian.jackson@eu.citrix.com> Date: Tue Jul 22 11:55:18 2008 +0100 Add missing cast for printf of maddr commit cf5b00e6b714eb5f900d55471d85956b09cb8fd9 Author: Ian Jackson <ian.jackson@eu.citrix.com> Date: Thu Jul 24 13:57:10 2008 +0100 pass-through.h: Sprinkle some #ifdefs to cope with pciutils-dev versions Some versions of pciutils-dev contain #defines which others are lacking. To avoid spurious compiler warnings we add some #ifdefs. *sigh* Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp> Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Diffstat (limited to 'tools')
-rw-r--r--tools/ioemu/hw/pass-through.c4
-rw-r--r--tools/ioemu/hw/pass-through.h8
2 files changed, 10 insertions, 2 deletions
diff --git a/tools/ioemu/hw/pass-through.c b/tools/ioemu/hw/pass-through.c
index cfd0a7696b..431e7f0532 100644
--- a/tools/ioemu/hw/pass-through.c
+++ b/tools/ioemu/hw/pass-through.c
@@ -821,7 +821,7 @@ void pt_iomem_map(PCIDevice *d, int i, uint32_t e_phys, uint32_t e_size,
assigned_device->bases[i].e_size= e_size;
PT_LOG("e_phys=%08x maddr=%lx type=%d len=%d index=%d first_map=%d\n",
- e_phys, assigned_device->bases[i].access.maddr,
+ e_phys, (unsigned long)assigned_device->bases[i].access.maddr,
type, e_size, i, first_map);
if ( e_size == 0 )
@@ -1389,7 +1389,7 @@ static int pt_register_regions(struct pt_dev *assigned_device)
return 0;
}
-static int pt_unregister_regions(struct pt_dev *assigned_device)
+static void pt_unregister_regions(struct pt_dev *assigned_device)
{
int i, type, ret;
uint32_t e_size;
diff --git a/tools/ioemu/hw/pass-through.h b/tools/ioemu/hw/pass-through.h
index 5cce8522a6..d8344f26f9 100644
--- a/tools/ioemu/hw/pass-through.h
+++ b/tools/ioemu/hw/pass-through.h
@@ -47,12 +47,20 @@
/* because the current version of libpci (2.2.0) doesn't define these ID,
* so we define Capability ID here.
*/
+#ifndef PCI_CAP_ID_HOTPLUG
/* SHPC Capability List Item reg group */
#define PCI_CAP_ID_HOTPLUG 0x0C
+#endif
+
+#ifndef PCI_CAP_ID_SSVID
/* Subsystem ID and Subsystem Vendor ID Capability List Item reg group */
#define PCI_CAP_ID_SSVID 0x0D
+#endif
+
+#ifndef PCI_MSI_FLAGS_MASK_BIT
/* interrupt masking & reporting supported */
#define PCI_MSI_FLAGS_MASK_BIT 0x0100
+#endif
#define PT_INVALID_REG 0xFFFFFFFF /* invalid register value */
#define PT_BAR_ALLF 0xFFFFFFFF /* BAR ALLF value */