ia64/xen-unstable

changeset 18200:8c8505e8e4e3

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>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jul 30 09:26:06 2008 +0100 (2008-07-30)
parents b9edc4627944
children 9364212ad2b2
files tools/ioemu/hw/pass-through.c tools/ioemu/hw/pass-through.h
line diff
     1.1 --- a/tools/ioemu/hw/pass-through.c	Wed Jul 30 09:25:07 2008 +0100
     1.2 +++ b/tools/ioemu/hw/pass-through.c	Wed Jul 30 09:26:06 2008 +0100
     1.3 @@ -821,7 +821,7 @@ void pt_iomem_map(PCIDevice *d, int i, u
     1.4      assigned_device->bases[i].e_size= e_size;
     1.5  
     1.6      PT_LOG("e_phys=%08x maddr=%lx type=%d len=%d index=%d first_map=%d\n",
     1.7 -        e_phys, assigned_device->bases[i].access.maddr, 
     1.8 +        e_phys, (unsigned long)assigned_device->bases[i].access.maddr, 
     1.9          type, e_size, i, first_map);
    1.10  
    1.11      if ( e_size == 0 )
    1.12 @@ -1389,7 +1389,7 @@ static int pt_register_regions(struct pt
    1.13      return 0;
    1.14  }
    1.15  
    1.16 -static int pt_unregister_regions(struct pt_dev *assigned_device)
    1.17 +static void pt_unregister_regions(struct pt_dev *assigned_device)
    1.18  {
    1.19      int i, type, ret;
    1.20      uint32_t e_size;
     2.1 --- a/tools/ioemu/hw/pass-through.h	Wed Jul 30 09:25:07 2008 +0100
     2.2 +++ b/tools/ioemu/hw/pass-through.h	Wed Jul 30 09:26:06 2008 +0100
     2.3 @@ -47,12 +47,20 @@
     2.4  /* because the current version of libpci (2.2.0) doesn't define these ID,
     2.5   * so we define Capability ID here.
     2.6   */
     2.7 +#ifndef PCI_CAP_ID_HOTPLUG
     2.8  /* SHPC Capability List Item reg group */
     2.9  #define PCI_CAP_ID_HOTPLUG      0x0C
    2.10 +#endif
    2.11 +
    2.12 +#ifndef PCI_CAP_ID_SSVID
    2.13  /* Subsystem ID and Subsystem Vendor ID Capability List Item reg group */
    2.14  #define PCI_CAP_ID_SSVID        0x0D
    2.15 +#endif
    2.16 +
    2.17 +#ifndef PCI_MSI_FLAGS_MASK_BIT
    2.18  /* interrupt masking & reporting supported */
    2.19  #define PCI_MSI_FLAGS_MASK_BIT  0x0100
    2.20 +#endif
    2.21  
    2.22  #define PT_INVALID_REG          0xFFFFFFFF      /* invalid register value */
    2.23  #define PT_BAR_ALLF             0xFFFFFFFF      /* BAR ALLF value */