ia64/xen-unstable

changeset 9137:eb24eb6bc341

Fix some warnings when compiling tools.

Signed-off-by: Xin Li <xin.b.li@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Mar 04 10:25:05 2006 +0100 (2006-03-04)
parents 2307bf2a4bfc
children 2d87e2747973
files tools/firmware/vmxassist/setup.c tools/ioemu/audio/audio.c tools/ioemu/hw/i8254.c tools/ioemu/monitor.c tools/ioemu/target-i386-dm/helper2.c tools/ioemu/vl.c xen/include/public/hvm/ioreq.h
line diff
     1.1 --- a/tools/firmware/vmxassist/setup.c	Fri Mar 03 19:21:48 2006 +0100
     1.2 +++ b/tools/firmware/vmxassist/setup.c	Sat Mar 04 10:25:05 2006 +0100
     1.3 @@ -123,6 +123,8 @@ setup_paging(void)
     1.4  void
     1.5  setup_gdt(void)
     1.6  {
     1.7 +	unsigned long long addr = (unsigned long long) &tss;
     1.8 +
     1.9  	/* setup task state segment */
    1.10  	memset(&tss, 0, sizeof(tss));
    1.11  	tss.ss0 = DATA_SELECTOR;
    1.12 @@ -130,8 +132,7 @@ setup_gdt(void)
    1.13  	tss.iomap_base = offsetof(struct tss, iomap);
    1.14  
    1.15  	/* initialize gdt's tss selector */
    1.16 -	unsigned long long addr = (unsigned long long) &tss;
    1.17 -        gdt[TSS_SELECTOR / sizeof(gdt[0])] |=
    1.18 +	gdt[TSS_SELECTOR / sizeof(gdt[0])] |=
    1.19  		((addr & 0xFF000000) << (56-24)) |
    1.20  		((addr & 0x00FF0000) << (32-16)) |
    1.21  		((addr & 0x0000FFFF) << (16)) |
     2.1 --- a/tools/ioemu/audio/audio.c	Fri Mar 03 19:21:48 2006 +0100
     2.2 +++ b/tools/ioemu/audio/audio.c	Sat Mar 04 10:25:05 2006 +0100
     2.3 @@ -713,7 +713,7 @@ int AUD_calc_elapsed (SWVoice *sw)
     2.4      delta = now - sw->old_ticks;
     2.5      bytes = (delta * sw->bytes_per_second) / ticks_per_sec;
     2.6      if (delta < 0) {
     2.7 -        dolog ("whoops delta(<0)=%lld\n", delta);
     2.8 +        dolog ("whoops delta(<0)=%"PRId64"\n", delta);
     2.9          return 0;
    2.10      }
    2.11  
     3.1 --- a/tools/ioemu/hw/i8254.c	Fri Mar 03 19:21:48 2006 +0100
     3.2 +++ b/tools/ioemu/hw/i8254.c	Sat Mar 04 10:25:05 2006 +0100
     3.3 @@ -249,7 +249,7 @@ void pit_reset_hvm_vectors()
     3.4      req->u.data |= (irq << 16);
     3.5      req->u.data |= (hvm_channel << 24);
     3.6      req->u.data |= ((s->rw_mode) << 26);
     3.7 -    fprintf(logfile, "HVM_PIT:pass info 0x%llx to HV!\n", req->u.data);
     3.8 +    fprintf(logfile, "HVM_PIT:pass info 0x%"PRIx64" to HV!\n", req->u.data);
     3.9  }
    3.10  
    3.11  static inline void pit_load_count(PITChannelState *s, int val)
     4.1 --- a/tools/ioemu/monitor.c	Fri Mar 03 19:21:48 2006 +0100
     4.2 +++ b/tools/ioemu/monitor.c	Sat Mar 04 10:25:05 2006 +0100
     4.3 @@ -676,19 +676,19 @@ static void monitor_handle_command(const
     4.4              break;
     4.5          case '-':
     4.6              {
     4.7 -                int has_option;
     4.8 +                long has_option;
     4.9                  /* option */
    4.10 -                
    4.11 +
    4.12                  c = *typestr++;
    4.13                  if (c == '\0')
    4.14                      goto bad_type;
    4.15 -                while (isspace(*p)) 
    4.16 +                while (isspace(*p))
    4.17                      p++;
    4.18                  has_option = 0;
    4.19                  if (*p == '-') {
    4.20                      p++;
    4.21                      if (*p != c) {
    4.22 -                        term_printf("%s: unsupported option -%c\n", 
    4.23 +                        term_printf("%s: unsupported option -%c\n",
    4.24                                      cmdname, *p);
    4.25                          goto fail;
    4.26                      }
     5.1 --- a/tools/ioemu/target-i386-dm/helper2.c	Fri Mar 03 19:21:48 2006 +0100
     5.2 +++ b/tools/ioemu/target-i386-dm/helper2.c	Sat Mar 04 10:25:05 2006 +0100
     5.3 @@ -138,11 +138,11 @@ void sp_info()
     5.4          req = &(shared_page->vcpu_iodata[i].vp_ioreq);
     5.5          term_printf("vcpu %d: event port %d\n",
     5.6                      i, shared_page->vcpu_iodata[i].vp_eport);
     5.7 -        term_printf("  req state: %x, pvalid: %x, addr: %llx, "
     5.8 -                    "data: %llx, count: %llx, size: %llx\n",
     5.9 +        term_printf("  req state: %x, pvalid: %x, addr: %"PRIx64", "
    5.10 +                    "data: %"PRIx64", count: %"PRIx64", size: %"PRIx64"\n",
    5.11                      req->state, req->pdata_valid, req->addr,
    5.12                      req->u.data, req->count, req->size);
    5.13 -        term_printf("  IO totally occurred on this vcpu: %llx\n",
    5.14 +        term_printf("  IO totally occurred on this vcpu: %"PRIx64"\n",
    5.15                      req->io_count);
    5.16      }
    5.17  }
    5.18 @@ -158,8 +158,8 @@ static ioreq_t* __cpu_get_ioreq(int vcpu
    5.19          return req;
    5.20  
    5.21      fprintf(logfile, "False I/O request ... in-service already: "
    5.22 -                     "%x, pvalid: %x, port: %llx, "
    5.23 -                     "data: %llx, count: %llx, size: %llx\n",
    5.24 +                     "%x, pvalid: %x, port: %"PRIx64", "
    5.25 +                     "data: %"PRIx64", count: %"PRIx64", size: %"PRIx64"\n",
    5.26                       req->state, req->pdata_valid, req->addr,
    5.27                       req->u.data, req->count, req->size);
    5.28      return NULL;
    5.29 @@ -460,12 +460,6 @@ int main_loop(void)
    5.30          FD_ZERO(&wakeup_rfds);
    5.31          FD_SET(evtchn_fd, &wakeup_rfds);
    5.32  
    5.33 -#if __WORDSIZE == 32
    5.34 -#define ULONGLONG_MAX   0xffffffffffffffffULL
    5.35 -#else
    5.36 -#define ULONGLONG_MAX   ULONG_MAX
    5.37 -#endif
    5.38 -
    5.39          tun_receive_handler(&rfds);
    5.40          if ( FD_ISSET(evtchn_fd, &rfds) ) {
    5.41              cpu_handle_ioreq(env);
     6.1 --- a/tools/ioemu/vl.c	Fri Mar 03 19:21:48 2006 +0100
     6.2 +++ b/tools/ioemu/vl.c	Sat Mar 04 10:25:05 2006 +0100
     6.3 @@ -2672,6 +2672,7 @@ int main(int argc, char **argv)
     6.4      char qemu_dm_logfilename[64];
     6.5      const char *loadvm = NULL;
     6.6      unsigned long nr_pages, extra_pages, ram_pages, *page_array;
     6.7 +    xc_dominfo_t info;
     6.8      extern void *shared_page;
     6.9      extern void *shared_vram;
    6.10  
    6.11 @@ -3132,7 +3133,7 @@ int main(int argc, char **argv)
    6.12  
    6.13      ram_pages = ram_size/PAGE_SIZE;
    6.14  #if defined(__i386__) || defined(__x86_64__)
    6.15 -    vgaram_pages =  (vga_ram_size -1)/PAGE_SIZE + 1;
    6.16 +    vgaram_pages =  (vga_ram_size -1) / PAGE_SIZE + 1;
    6.17      free_pages = vgaram_pages / L1_PAGETABLE_ENTRIES;
    6.18      extra_pages = vgaram_pages + free_pages;
    6.19  #else
    6.20 @@ -3142,7 +3143,6 @@ int main(int argc, char **argv)
    6.21  
    6.22      xc_handle = xc_interface_open();
    6.23  
    6.24 -    xc_dominfo_t info;
    6.25      xc_domain_getinfo(xc_handle, domid, 1, &info);
    6.26  
    6.27      nr_pages = info.nr_pages + extra_pages;
     7.1 --- a/xen/include/public/hvm/ioreq.h	Fri Mar 03 19:21:48 2006 +0100
     7.2 +++ b/xen/include/public/hvm/ioreq.h	Sat Mar 04 10:25:05 2006 +0100
     7.3 @@ -71,8 +71,8 @@ typedef struct {
     7.4  typedef struct {
     7.5      ioreq_t         vp_ioreq;
     7.6      /* Event channel port */
     7.7 -    unsigned long   vp_eport;   /* VMX vcpu uses this to notify DM */
     7.8 -    unsigned long   dm_eport;   /* DM uses this to notify VMX vcpu */
     7.9 +    unsigned int    vp_eport;   /* VMX vcpu uses this to notify DM */
    7.10 +    unsigned int    dm_eport;   /* DM uses this to notify VMX vcpu */
    7.11  } vcpu_iodata_t;
    7.12  
    7.13  typedef struct {