ia64/xen-unstable

changeset 7349:b3a255e88810

Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 12 11:07:37 2005 +0100 (2005-10-12)
parents 067b9aacb6c2
children 43b40ae7904c
files tools/blktap/parallax/block-async.c tools/blktap/parallax/block-async.h tools/blktap/parallax/blockstore.c tools/blktap/parallax/blockstore.h tools/blktap/parallax/blockstored.c tools/blktap/parallax/bstest.c tools/blktap/parallax/parallax.c tools/blktap/parallax/radix.c tools/blktap/parallax/radix.h tools/blktap/parallax/requests-async.c tools/blktap/parallax/requests-async.h tools/blktap/parallax/snaplog.c tools/blktap/parallax/snaplog.h tools/blktap/parallax/vdi.c tools/blktap/parallax/vdi.h tools/blktap/parallax/vdi_create.c tools/blktap/parallax/vdi_fill.c tools/blktap/parallax/vdi_snap.c tools/blktap/parallax/vdi_snap_delete.c tools/blktap/parallax/vdi_snap_list.c tools/blktap/parallax/vdi_unittest.c tools/blktap/parallax/vdi_validate.c tools/blktap/ublkback/ublkbacklib.c tools/console/daemon/io.c tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c tools/debugger/libxendebug/xendebug.c tools/debugger/libxendebug/xendebug.h tools/debugger/pdb/linux-2.6-module/debug.c tools/debugger/pdb/linux-2.6-module/pdb_debug.h tools/debugger/pdb/linux-2.6-module/pdb_module.h tools/debugger/pdb/pdb_caml_domain.c tools/debugger/pdb/pdb_caml_evtchn.c tools/debugger/pdb/pdb_caml_process.c tools/debugger/pdb/pdb_caml_xc.c tools/debugger/pdb/pdb_caml_xcs.c tools/firmware/acpi/acpi2_0.h tools/firmware/acpi/acpi_build.c tools/firmware/vmxassist/vm86.c tools/firmware/vmxassist/vm86.h tools/ioemu/hw/ioapic.c tools/ioemu/target-i386-dm/helper2.c tools/ioemu/vl.c tools/libxc/xc_bvtsched.c tools/libxc/xc_core.c tools/libxc/xc_domain.c tools/libxc/xc_evtchn.c tools/libxc/xc_gnttab.c tools/libxc/xc_ia64_stubs.c tools/libxc/xc_linux_build.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/libxc/xc_load_aout9.c tools/libxc/xc_load_bin.c tools/libxc/xc_load_elf.c tools/libxc/xc_misc.c tools/libxc/xc_physdev.c tools/libxc/xc_private.c tools/libxc/xc_ptrace.c tools/libxc/xc_ptrace_core.c tools/libxc/xc_sedf.c tools/libxc/xc_vmx_build.c tools/libxc/xenctrl.h tools/libxc/xg_private.h tools/python/xen/lowlevel/xc/xc.c tools/python/xen/lowlevel/xs/xs.c tools/security/Makefile tools/security/secpol_tool.c tools/security/secpol_xml2bin.c tools/xenstat/libxenstat/src/xen-interface.h tools/xenstore/fake_libxc.c tools/xenstore/tdb.c tools/xenstore/tdb.h tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_domain.c tools/xenstore/xenstored_transaction.c tools/xenstore/xenstored_transaction.h tools/xenstore/xs.c tools/xenstore/xs.h tools/xenstore/xs_crashme.c tools/xenstore/xs_lib.c tools/xenstore/xs_lib.h tools/xenstore/xs_random.c tools/xenstore/xs_tdb_dump.c tools/xenstore/xs_test.c tools/xentrace/xenctx.c tools/xentrace/xentrace.c xen/include/public/acm.h xen/include/public/acm_ops.h xen/include/public/arch-ia64.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/dom0_ops.h xen/include/public/event_channel.h xen/include/public/grant_table.h xen/include/public/io/blkif.h xen/include/public/io/console.h xen/include/public/io/ioreq.h xen/include/public/io/netif.h xen/include/public/io/ring.h xen/include/public/io/tpmif.h xen/include/public/io/vmx_vlapic.h xen/include/public/io/xs_wire.h xen/include/public/memory.h xen/include/public/physdev.h xen/include/public/sched.h xen/include/public/sched_ctl.h xen/include/public/trace.h xen/include/public/vcpu.h xen/include/public/version.h xen/include/public/vmx_assist.h xen/include/public/xen.h xen/include/xen/types.h
line diff
     1.1 --- a/tools/blktap/parallax/block-async.c	Wed Oct 12 10:11:35 2005 +0100
     1.2 +++ b/tools/blktap/parallax/block-async.c	Wed Oct 12 11:07:37 2005 +0100
     1.3 @@ -31,11 +31,11 @@
     1.4   */
     1.5  
     1.6  struct read_args {
     1.7 -    u64 addr;
     1.8 +    uint64_t addr;
     1.9  };
    1.10  
    1.11  struct write_args {
    1.12 -    u64   addr;
    1.13 +    uint64_t   addr;
    1.14      char *block;
    1.15  };
    1.16  
    1.17 @@ -94,7 +94,7 @@ static void init_pending_io(void)
    1.18  		
    1.19  } 
    1.20  
    1.21 -void block_read(u64 addr, io_cb_t cb, void *param)
    1.22 +void block_read(uint64_t addr, io_cb_t cb, void *param)
    1.23  {
    1.24      struct pending_io_req *req;
    1.25      
    1.26 @@ -113,7 +113,7 @@ void block_read(u64 addr, io_cb_t cb, vo
    1.27  }
    1.28  
    1.29  
    1.30 -void block_write(u64 addr, char *block, io_cb_t cb, void *param)
    1.31 +void block_write(uint64_t addr, char *block, io_cb_t cb, void *param)
    1.32  {
    1.33      struct pending_io_req *req;
    1.34      
     2.1 --- a/tools/blktap/parallax/block-async.h	Wed Oct 12 10:11:35 2005 +0100
     2.2 +++ b/tools/blktap/parallax/block-async.h	Wed Oct 12 11:07:37 2005 +0100
     2.3 @@ -14,7 +14,7 @@ struct io_ret
     2.4  {
     2.5      enum {IO_ADDR_T, IO_BLOCK_T, IO_INT_T} type;
     2.6      union {
     2.7 -        u64   a;
     2.8 +        uint64_t   a;
     2.9          char *b;
    2.10          int   i;
    2.11      } u;
    2.12 @@ -38,8 +38,8 @@ struct radix_lock {
    2.13  };
    2.14  void radix_lock_init(struct radix_lock *r);
    2.15  
    2.16 -void block_read(u64 addr, io_cb_t cb, void *param);
    2.17 -void block_write(u64 addr, char *block, io_cb_t cb, void *param);
    2.18 +void block_read(uint64_t addr, io_cb_t cb, void *param);
    2.19 +void block_write(uint64_t addr, char *block, io_cb_t cb, void *param);
    2.20  void block_alloc(char *block, io_cb_t cb, void *param);
    2.21  void block_rlock(struct radix_lock *r, int row, io_cb_t cb, void *param);
    2.22  void block_wlock(struct radix_lock *r, int row, io_cb_t cb, void *param);
    2.23 @@ -47,7 +47,7 @@ void block_runlock(struct radix_lock *r,
    2.24  void block_wunlock(struct radix_lock *r, int row, io_cb_t cb, void *param);
    2.25  void init_block_async(void);
    2.26  
    2.27 -static inline u64 IO_ADDR(struct io_ret r)
    2.28 +static inline uint64_t IO_ADDR(struct io_ret r)
    2.29  {
    2.30      assert(r.type == IO_ADDR_T);
    2.31      return r.u.a;
     3.1 --- a/tools/blktap/parallax/blockstore.c	Wed Oct 12 10:11:35 2005 +0100
     3.2 +++ b/tools/blktap/parallax/blockstore.c	Wed Oct 12 11:07:37 2005 +0100
     3.3 @@ -132,9 +132,9 @@ pthread_mutex_t ptmutex_luid;
     3.4  #define ENTER_LUID_CR pthread_mutex_lock(&ptmutex_luid)
     3.5  #define LEAVE_LUID_CR pthread_mutex_unlock(&ptmutex_luid)
     3.6  
     3.7 -static u64 luid_cnt = 0x1000ULL;
     3.8 -u64 new_luid(void) {
     3.9 -    u64 luid;
    3.10 +static uint64_t luid_cnt = 0x1000ULL;
    3.11 +uint64_t new_luid(void) {
    3.12 +    uint64_t luid;
    3.13      ENTER_LUID_CR;
    3.14      luid = luid_cnt++;
    3.15      LEAVE_LUID_CR;
    3.16 @@ -539,7 +539,7 @@ pthread_t pthread_recv;
    3.17   * Reading                                                                   *
    3.18   *****************************************************************************/
    3.19  
    3.20 -void *readblock_indiv(int server, u64 id) {
    3.21 +void *readblock_indiv(int server, uint64_t id) {
    3.22      void *block;
    3.23      bsq_t *qe;
    3.24      int len, rc;
    3.25 @@ -616,9 +616,9 @@ void *readblock_indiv(int server, u64 id
    3.26   *
    3.27   *   @return: pointer to block, NULL on error
    3.28   */
    3.29 -void *readblock(u64 id) {
    3.30 +void *readblock(uint64_t id) {
    3.31      int map = (int)BSID_MAP(id);
    3.32 -    u64 xid;
    3.33 +    uint64_t xid;
    3.34      static int i = CLUSTER_MAX_REPLICAS - 1;
    3.35      void *block = NULL;
    3.36  
    3.37 @@ -670,7 +670,7 @@ void *readblock(u64 id) {
    3.38   * Writing                                                                   *
    3.39   *****************************************************************************/
    3.40  
    3.41 -bsq_t *writeblock_indiv(int server, u64 id, void *block) {
    3.42 +bsq_t *writeblock_indiv(int server, uint64_t id, void *block) {
    3.43  
    3.44      bsq_t *qe;
    3.45      int len;
    3.46 @@ -709,7 +709,7 @@ bsq_t *writeblock_indiv(int server, u64 
    3.47   *
    3.48   *   @return: zero on success, -1 on failure
    3.49   */
    3.50 -int writeblock(u64 id, void *block) {
    3.51 +int writeblock(uint64_t id, void *block) {
    3.52      
    3.53      int map = (int)BSID_MAP(id);
    3.54      int rep0 = bsclusters[map].servers[0];
    3.55 @@ -805,11 +805,11 @@ int writeblock(u64 id, void *block) {
    3.56   *
    3.57   *   @return: new id of block on disk
    3.58   */
    3.59 -u64 allocblock(void *block) {
    3.60 +uint64_t allocblock(void *block) {
    3.61      return allocblock_hint(block, 0);
    3.62  }
    3.63  
    3.64 -bsq_t *allocblock_hint_indiv(int server, void *block, u64 hint) {
    3.65 +bsq_t *allocblock_hint_indiv(int server, void *block, uint64_t hint) {
    3.66      bsq_t *qe;
    3.67      int len;
    3.68  
    3.69 @@ -846,14 +846,14 @@ bsq_t *allocblock_hint_indiv(int server,
    3.70   *
    3.71   *   @return: new id of block on disk
    3.72   */
    3.73 -u64 allocblock_hint(void *block, u64 hint) {
    3.74 +uint64_t allocblock_hint(void *block, uint64_t hint) {
    3.75      int map = (int)hint;
    3.76      int rep0 = bsclusters[map].servers[0];
    3.77      int rep1 = bsclusters[map].servers[1];
    3.78      int rep2 = bsclusters[map].servers[2];
    3.79      bsq_t *reqs[3];
    3.80      int rc;
    3.81 -    u64 id0, id1, id2;
    3.82 +    uint64_t id0, id1, id2;
    3.83  
    3.84      reqs[0] = reqs[1] = reqs[2] = NULL;
    3.85  
    3.86 @@ -938,7 +938,7 @@ u64 allocblock_hint(void *block, u64 hin
    3.87   *   @return: pointer to block, NULL on error
    3.88   */
    3.89  
    3.90 -void *readblock(u64 id) {
    3.91 +void *readblock(uint64_t id) {
    3.92      void *block;
    3.93      int block_fp;
    3.94     
    3.95 @@ -980,7 +980,7 @@ err:
    3.96   *
    3.97   *   @return: zero on success, -1 on failure
    3.98   */
    3.99 -int writeblock(u64 id, void *block) {
   3.100 +int writeblock(uint64_t id, void *block) {
   3.101      
   3.102      int block_fp;
   3.103      
   3.104 @@ -1014,8 +1014,8 @@ err:
   3.105   *   @return: new id of block on disk
   3.106   */
   3.107  
   3.108 -u64 allocblock(void *block) {
   3.109 -    u64 lb;
   3.110 +uint64_t allocblock(void *block) {
   3.111 +    uint64_t lb;
   3.112      off64_t pos;
   3.113      int block_fp;
   3.114      
   3.115 @@ -1057,7 +1057,7 @@ err:
   3.116   *
   3.117   *   @return: new id of block on disk
   3.118   */
   3.119 -u64 allocblock_hint(void *block, u64 hint) {
   3.120 +uint64_t allocblock_hint(void *block, uint64_t hint) {
   3.121      return allocblock(block);
   3.122  }
   3.123  
   3.124 @@ -1109,7 +1109,7 @@ static freeblock_t *new_freeblock(void)
   3.125      return fb;
   3.126  }
   3.127  
   3.128 -void releaseblock(u64 id)
   3.129 +void releaseblock(uint64_t id)
   3.130  {
   3.131      blockstore_super_t *bs_super;
   3.132      freeblock_t *fl_current;
   3.133 @@ -1154,7 +1154,7 @@ void freelist_count(int print_each)
   3.134  {
   3.135      blockstore_super_t *bs_super;
   3.136      freeblock_t *fb;
   3.137 -    u64 total = 0, next;
   3.138 +    uint64_t total = 0, next;
   3.139      
   3.140      bs_super = (blockstore_super_t *) readblock(BLOCKSTORE_SUPER);
   3.141      
   3.142 @@ -1205,7 +1205,7 @@ int __init_blockstore(void)
   3.143  {
   3.144      int i;
   3.145      blockstore_super_t *bs_super;
   3.146 -    u64 ret;
   3.147 +    uint64_t ret;
   3.148      int block_fp;
   3.149      
   3.150  #ifdef BLOCKSTORE_REMOTE
     4.1 --- a/tools/blktap/parallax/blockstore.h	Wed Oct 12 10:11:35 2005 +0100
     4.2 +++ b/tools/blktap/parallax/blockstore.h	Wed Oct 12 11:07:37 2005 +0100
     4.3 @@ -21,33 +21,33 @@
     4.4  #define SECTOR_SHIFT   9 
     4.5  #endif
     4.6  
     4.7 -#define FREEBLOCK_SIZE  (BLOCK_SIZE / sizeof(u64)) - (3 * sizeof(u64))
     4.8 +#define FREEBLOCK_SIZE  (BLOCK_SIZE / sizeof(uint64_t)) - (3 * sizeof(uint64_t))
     4.9  #define FREEBLOCK_MAGIC 0x0fee0fee0fee0feeULL
    4.10  
    4.11  typedef struct {
    4.12 -    u64 magic;
    4.13 -    u64 next;
    4.14 -    u64 count;
    4.15 -    u64 list[FREEBLOCK_SIZE];
    4.16 +    uint64_t magic;
    4.17 +    uint64_t next;
    4.18 +    uint64_t count;
    4.19 +    uint64_t list[FREEBLOCK_SIZE];
    4.20  } freeblock_t; 
    4.21  
    4.22  #define BLOCKSTORE_MAGIC 0xaaaaaaa00aaaaaaaULL
    4.23  #define BLOCKSTORE_SUPER 1ULL
    4.24  
    4.25  typedef struct {
    4.26 -    u64 magic;
    4.27 -    u64 freelist_full;
    4.28 -    u64 freelist_current;
    4.29 +    uint64_t magic;
    4.30 +    uint64_t freelist_full;
    4.31 +    uint64_t freelist_current;
    4.32  } blockstore_super_t;
    4.33  
    4.34  extern void *newblock();
    4.35 -extern void *readblock(u64 id);
    4.36 -extern u64 allocblock(void *block);
    4.37 -extern u64 allocblock_hint(void *block, u64 hint);
    4.38 -extern int writeblock(u64 id, void *block);
    4.39 +extern void *readblock(uint64_t id);
    4.40 +extern uint64_t allocblock(void *block);
    4.41 +extern uint64_t allocblock_hint(void *block, uint64_t hint);
    4.42 +extern int writeblock(uint64_t id, void *block);
    4.43  
    4.44  /* Add this blockid to a freelist, to be recycled by the allocator. */
    4.45 -extern void releaseblock(u64 id);
    4.46 +extern void releaseblock(uint64_t id);
    4.47  
    4.48  /* this is a memory free() operation for block-sized allocations */
    4.49  extern void freeblock(void *block);
    4.50 @@ -55,17 +55,17 @@ extern int __init_blockstore(void);
    4.51  
    4.52  /* debug for freelist. */
    4.53  void freelist_count(int print_each);
    4.54 -#define ALLOCFAIL (((u64)(-1)))
    4.55 +#define ALLOCFAIL (((uint64_t)(-1)))
    4.56  
    4.57  /* Distribution
    4.58   */
    4.59  #define BLOCKSTORED_PORT 9346
    4.60  
    4.61  struct bshdr_t_struct {
    4.62 -    u32            operation;
    4.63 -    u32            flags;
    4.64 -    u64            id;
    4.65 -    u64            luid;
    4.66 +    uint32_t            operation;
    4.67 +    uint32_t            flags;
    4.68 +    uint64_t            id;
    4.69 +    uint64_t            luid;
    4.70  } __attribute__ ((packed));
    4.71  typedef struct bshdr_t_struct bshdr_t;
    4.72  
    4.73 @@ -76,9 +76,9 @@ struct bsmsg_t_struct {
    4.74  
    4.75  typedef struct bsmsg_t_struct bsmsg_t;
    4.76  
    4.77 -#define MSGBUFSIZE_OP    sizeof(u32)
    4.78 -#define MSGBUFSIZE_FLAGS (sizeof(u32) + sizeof(u32))
    4.79 -#define MSGBUFSIZE_ID    (sizeof(u32) + sizeof(u32) + sizeof(u64) + sizeof(u64))
    4.80 +#define MSGBUFSIZE_OP    sizeof(uint32_t)
    4.81 +#define MSGBUFSIZE_FLAGS (sizeof(uint32_t) + sizeof(uint32_t))
    4.82 +#define MSGBUFSIZE_ID    (sizeof(uint32_t) + sizeof(uint32_t) + sizeof(uint64_t) + sizeof(uint64_t))
    4.83  #define MSGBUFSIZE_BLOCK sizeof(bsmsg_t)
    4.84  
    4.85  #define BSOP_READBLOCK  0x01
    4.86 @@ -113,9 +113,9 @@ typedef struct bsmsg_t_struct bsmsg_t;
    4.87  #define BSID_REPLICA2(_id) (((_id)>>40)&0xfffffULL)
    4.88  #define BSID_MAP(_id)      (((_id)>>60)&0xfULL)
    4.89  
    4.90 -#define BSID(_map, _rep0, _rep1, _rep2) ((((u64)(_map))<<60) | \
    4.91 -                                         (((u64)(_rep2))<<40) | \
    4.92 -                                         (((u64)(_rep1))<<20) | ((u64)(_rep0)))
    4.93 +#define BSID(_map, _rep0, _rep1, _rep2) ((((uint64_t)(_map))<<60) | \
    4.94 +                                         (((uint64_t)(_rep2))<<40) | \
    4.95 +                                         (((uint64_t)(_rep1))<<20) | ((uint64_t)(_rep0)))
    4.96  
    4.97  typedef struct bsserver_t_struct {
    4.98      char              *hostname;
     5.1 --- a/tools/blktap/parallax/blockstored.c	Wed Oct 12 10:11:35 2005 +0100
     5.2 +++ b/tools/blktap/parallax/blockstored.c	Wed Oct 12 11:07:37 2005 +0100
     5.3 @@ -21,9 +21,9 @@
     5.4  
     5.5  //#define BSDEBUG
     5.6  
     5.7 -int readblock_into(u64 id, void *block);
     5.8 +int readblock_into(uint64_t id, void *block);
     5.9  
    5.10 -int open_socket(u16 port) {
    5.11 +int open_socket(uint16_t port) {
    5.12      
    5.13      struct sockaddr_in sn;
    5.14      int sock;
    5.15 @@ -75,7 +75,7 @@ void service_loop(void) {
    5.16          int rc, len;
    5.17          struct sockaddr_in from;
    5.18          size_t slen = sizeof(from);
    5.19 -        u64 bid;
    5.20 +        uint64_t bid;
    5.21  
    5.22          len = recvfrom(bssock, (void *)&msgbuf, sizeof(msgbuf), 0,
    5.23                         (struct sockaddr *)&from, &slen);
    5.24 @@ -155,7 +155,7 @@ void service_loop(void) {
    5.25   *   @return: 0 if OK, other on error
    5.26   */
    5.27  
    5.28 -int readblock_into(u64 id, void *block) {
    5.29 +int readblock_into(uint64_t id, void *block) {
    5.30      if (lseek64(block_fp, ((off64_t) id - 1LL) * BLOCK_SIZE, SEEK_SET) < 0) {
    5.31          printf ("%Ld\n", (id - 1) * BLOCK_SIZE);
    5.32          perror("readblock lseek");
    5.33 @@ -175,7 +175,7 @@ int readblock_into(u64 id, void *block) 
    5.34   *
    5.35   *   @return: zero on success, -1 on failure
    5.36   */
    5.37 -int writeblock(u64 id, void *block) {
    5.38 +int writeblock(uint64_t id, void *block) {
    5.39      if (lseek64(block_fp, ((off64_t) id - 1LL) * BLOCK_SIZE, SEEK_SET) < 0) {
    5.40          perror("writeblock lseek");
    5.41          return -1;
    5.42 @@ -193,10 +193,10 @@ int writeblock(u64 id, void *block) {
    5.43   *
    5.44   *   @return: new id of block on disk
    5.45   */
    5.46 -static u64 lastblock = 0;
    5.47 +static uint64_t lastblock = 0;
    5.48  
    5.49 -u64 allocblock(void *block) {
    5.50 -    u64 lb;
    5.51 +uint64_t allocblock(void *block) {
    5.52 +    uint64_t lb;
    5.53      off64_t pos;
    5.54  
    5.55      retry:
     6.1 --- a/tools/blktap/parallax/bstest.c	Wed Oct 12 10:11:35 2005 +0100
     6.2 +++ b/tools/blktap/parallax/bstest.c	Wed Oct 12 11:07:37 2005 +0100
     6.3 @@ -22,7 +22,7 @@
     6.4  #include <errno.h>
     6.5  #include "blockstore.h"
     6.6  
     6.7 -int direct(char *host, u32 op, u64 id, int len) {
     6.8 +int direct(char *host, uint32_t op, uint64_t id, int len) {
     6.9      struct sockaddr_in sn, peer;
    6.10      int sock;
    6.11      bsmsg_t msgbuf;
    6.12 @@ -99,8 +99,8 @@ int direct(char *host, u32 op, u64 id, i
    6.13  
    6.14  int main (int argc, char **argv) {
    6.15  
    6.16 -    u32 op = 0;
    6.17 -    u64 id = 0;
    6.18 +    uint32_t op = 0;
    6.19 +    uint64_t id = 0;
    6.20      int len = 0, rc;
    6.21      void *block;
    6.22  
     7.1 --- a/tools/blktap/parallax/parallax.c	Wed Oct 12 10:11:35 2005 +0100
     7.2 +++ b/tools/blktap/parallax/parallax.c	Wed Oct 12 11:07:37 2005 +0100
     7.3 @@ -330,8 +330,8 @@ pending_t pending_list[MAX_REQUESTS];
     7.4  struct cb_param {
     7.5      pending_t *pent;
     7.6      int       segment;
     7.7 -    u64       sector; 
     7.8 -    u64       vblock; /* for debug printing -- can be removed. */
     7.9 +    uint64_t       sector; 
    7.10 +    uint64_t       vblock; /* for debug printing -- can be removed. */
    7.11  };
    7.12  
    7.13  static void read_cb(struct io_ret r, void *in_param)
    7.14 @@ -393,9 +393,9 @@ static void read_cb(struct io_ret r, voi
    7.15  int parallax_read(blkif_request_t *req, blkif_t *blkif)
    7.16  {
    7.17      blkif_response_t *rsp;
    7.18 -    u64 vblock, gblock;
    7.19 +    uint64_t vblock, gblock;
    7.20      vdi_t *vdi;
    7.21 -    u64 sector;
    7.22 +    uint64_t sector;
    7.23      int i;
    7.24      char *dpage, *spage;
    7.25      pending_t *pent;
    7.26 @@ -475,9 +475,9 @@ static void write_cb(struct io_ret r, vo
    7.27  int parallax_write(blkif_request_t *req, blkif_t *blkif)
    7.28  {
    7.29      blkif_response_t *rsp;
    7.30 -    u64 sector;
    7.31 +    uint64_t sector;
    7.32      int i, writable = 0;
    7.33 -    u64 vblock, gblock;
    7.34 +    uint64_t vblock, gblock;
    7.35      char *spage;
    7.36      unsigned long size, offset, start;
    7.37      vdi_t *vdi;
     8.1 --- a/tools/blktap/parallax/radix.c	Wed Oct 12 10:11:35 2005 +0100
     8.2 +++ b/tools/blktap/parallax/radix.c	Wed Oct 12 11:07:37 2005 +0100
     8.3 @@ -33,7 +33,7 @@ static  int rcache_count = 0;
     8.4  
     8.5  typedef struct rcache_st {
     8.6      radix_tree_node  *node;
     8.7 -    u64               id;
     8.8 +    uint64_t               id;
     8.9      struct rcache_st *hash_next;
    8.10      struct rcache_st *cache_next;
    8.11      struct rcache_st *cache_prev;
    8.12 @@ -55,7 +55,7 @@ void __rcache_init(void)
    8.13  }
    8.14      
    8.15  
    8.16 -void rcache_write(u64 id, radix_tree_node *node)
    8.17 +void rcache_write(uint64_t id, radix_tree_node *node)
    8.18  {
    8.19      rcache_t *r, *tmp, **curs;
    8.20      
    8.21 @@ -135,7 +135,7 @@ done:
    8.22      pthread_mutex_unlock(&rcache_mutex);
    8.23  }
    8.24  
    8.25 -radix_tree_node *rcache_read(u64 id)
    8.26 +radix_tree_node *rcache_read(uint64_t id)
    8.27  {
    8.28      rcache_t *r, *tmp;
    8.29      radix_tree_node *node = NULL;
    8.30 @@ -181,7 +181,7 @@ done:
    8.31  }
    8.32  
    8.33  
    8.34 -void *rc_readblock(u64 id)
    8.35 +void *rc_readblock(uint64_t id)
    8.36  {
    8.37      void *ret;
    8.38      
    8.39 @@ -197,9 +197,9 @@ void *rc_readblock(u64 id)
    8.40      return(ret);
    8.41  }
    8.42  
    8.43 -u64 rc_allocblock(void *block)
    8.44 +uint64_t rc_allocblock(void *block)
    8.45  {
    8.46 -    u64 ret;
    8.47 +    uint64_t ret;
    8.48      
    8.49      ret = allocblock(block);
    8.50      
    8.51 @@ -209,7 +209,7 @@ u64 rc_allocblock(void *block)
    8.52      return(ret);
    8.53  }
    8.54  
    8.55 -int rc_writeblock(u64 id, void *block)
    8.56 +int rc_writeblock(uint64_t id, void *block)
    8.57  {
    8.58      int ret;
    8.59      
    8.60 @@ -233,9 +233,9 @@ radix_tree_node cloneblock(radix_tree_no
    8.61   * whether or not the block is writable, including the return
    8.62   * values of update and snapshot
    8.63   */
    8.64 -u64 lookup(int height, u64 root, u64 key);
    8.65 -u64 update(int height, u64 root, u64 key, u64 val);
    8.66 -u64 snapshot(u64 root);
    8.67 +uint64_t lookup(int height, uint64_t root, uint64_t key);
    8.68 +uint64_t update(int height, uint64_t root, uint64_t key, uint64_t val);
    8.69 +uint64_t snapshot(uint64_t root);
    8.70  
    8.71  /**
    8.72   * cloneblock: clone an existing block in memory
    8.73 @@ -264,9 +264,9 @@ radix_tree_node cloneblock(radix_tree_no
    8.74   *   @return: value on success, zero on error
    8.75   */
    8.76  
    8.77 -u64 lookup(int height, u64 root, u64 key) {
    8.78 +uint64_t lookup(int height, uint64_t root, uint64_t key) {
    8.79      radix_tree_node node;
    8.80 -    u64 mask = ONE;
    8.81 +    uint64_t mask = ONE;
    8.82      
    8.83      assert(key >> height == 0);
    8.84  
    8.85 @@ -275,7 +275,7 @@ u64 lookup(int height, u64 root, u64 key
    8.86  
    8.87      /* now carve off equal sized chunks at each step */
    8.88      for (;;) {
    8.89 -        u64 oldroot;
    8.90 +        uint64_t oldroot;
    8.91  
    8.92  #ifdef DEBUG
    8.93          printf("lookup: height=%3d root=%3Ld offset=%3d%s\n", height, root,
    8.94 @@ -314,9 +314,9 @@ u64 lookup(int height, u64 root, u64 key
    8.95   *   @returns: (possibly new) root id on success (with LSB=1), 0 on failure
    8.96   */
    8.97  
    8.98 -u64 update(int height, u64 root, u64 key, u64 val) {
    8.99 +uint64_t update(int height, uint64_t root, uint64_t key, uint64_t val) {
   8.100      int offset;
   8.101 -    u64 child;
   8.102 +    uint64_t child;
   8.103      radix_tree_node node;
   8.104      
   8.105      /* base case--return val */
   8.106 @@ -390,7 +390,7 @@ u64 update(int height, u64 root, u64 key
   8.107   *
   8.108   *   @return: new root node, 0 on error
   8.109   */
   8.110 -u64 snapshot(u64 root) {
   8.111 +uint64_t snapshot(uint64_t root) {
   8.112      radix_tree_node node, newnode;
   8.113  
   8.114      if ((node = rc_readblock(getid(root))) == NULL)
   8.115 @@ -418,7 +418,7 @@ u64 snapshot(u64 root) {
   8.116   * child are okay...)
   8.117   */
   8.118  
   8.119 -int collapse(int height, u64 proot, u64 croot)
   8.120 +int collapse(int height, uint64_t proot, uint64_t croot)
   8.121  {
   8.122      int i, numlinks, ret, total = 0;
   8.123      radix_tree_node pnode, cnode;
   8.124 @@ -480,7 +480,7 @@ int collapse(int height, u64 proot, u64 
   8.125  }
   8.126  
   8.127  
   8.128 -void print_root(u64 root, int height, FILE *dot_f)
   8.129 +void print_root(uint64_t root, int height, FILE *dot_f)
   8.130  {
   8.131      FILE *f;
   8.132      int i;
   8.133 @@ -558,9 +558,9 @@ void print_root(u64 root, int height, FI
   8.134  #ifdef RADIX_STANDALONE
   8.135  
   8.136  int main(int argc, char **argv) {
   8.137 -    u64 key = ZERO, val = ZERO;
   8.138 -    u64 root = writable(2ULL);
   8.139 -    u64 p = ZERO, c = ZERO;
   8.140 +    uint64_t key = ZERO, val = ZERO;
   8.141 +    uint64_t root = writable(2ULL);
   8.142 +    uint64_t p = ZERO, c = ZERO;
   8.143      int v;
   8.144      char buff[4096];
   8.145  
     9.1 --- a/tools/blktap/parallax/radix.h	Wed Oct 12 10:11:35 2005 +0100
     9.2 +++ b/tools/blktap/parallax/radix.h	Wed Oct 12 11:07:37 2005 +0100
     9.3 @@ -24,7 +24,7 @@
     9.4  #define RADIX_TREE_MAP_MASK 0x1ff
     9.5  #define RADIX_TREE_MAP_ENTRIES 512
     9.6  
     9.7 -typedef u64 *radix_tree_node;
     9.8 +typedef uint64_t *radix_tree_node;
     9.9  
    9.10  
    9.11  /*
    9.12 @@ -33,11 +33,11 @@ typedef u64 *radix_tree_node;
    9.13   * whether or not the block is writable, including the return
    9.14   * values of update and snapshot
    9.15   */
    9.16 -u64 lookup(int height, u64 root, u64 key);
    9.17 -u64 update(int height, u64 root, u64 key, u64 val);
    9.18 -u64 snapshot(u64 root);
    9.19 -int collapse(int height, u64 proot, u64 croot);
    9.20 -int isprivate(int height, u64 root, u64 key);
    9.21 +uint64_t lookup(int height, uint64_t root, uint64_t key);
    9.22 +uint64_t update(int height, uint64_t root, uint64_t key, uint64_t val);
    9.23 +uint64_t snapshot(uint64_t root);
    9.24 +int collapse(int height, uint64_t proot, uint64_t croot);
    9.25 +int isprivate(int height, uint64_t root, uint64_t key);
    9.26  
    9.27  
    9.28  void __rcache_init(void);
    10.1 --- a/tools/blktap/parallax/requests-async.c	Wed Oct 12 10:11:35 2005 +0100
    10.2 +++ b/tools/blktap/parallax/requests-async.c	Wed Oct 12 11:07:37 2005 +0100
    10.3 @@ -27,14 +27,14 @@
    10.4  #endif
    10.5  
    10.6  struct block_info {
    10.7 -    u32        crc;
    10.8 -    u32        unused;
    10.9 +    uint32_t        crc;
   10.10 +    uint32_t        unused;
   10.11  };
   10.12  
   10.13  struct io_req {
   10.14      enum { IO_OP_READ, IO_OP_WRITE } op;
   10.15 -    u64        root;
   10.16 -    u64        vaddr;
   10.17 +    uint64_t        root;
   10.18 +    uint64_t        vaddr;
   10.19      int        state;
   10.20      io_cb_t    cb;
   10.21      void      *param;
   10.22 @@ -44,7 +44,7 @@ struct io_req {
   10.23      struct io_ret     retval;/* holds the return while we unlock. */
   10.24      char             *block; /* the block to write */
   10.25      radix_tree_node   radix[3];
   10.26 -    u64               radix_addr[3];
   10.27 +    uint64_t               radix_addr[3];
   10.28      struct block_info bi;
   10.29  };
   10.30  
   10.31 @@ -129,7 +129,7 @@ enum radix_offsets {
   10.32  static void read_cb(struct io_ret ret, void *param);
   10.33  static void write_cb(struct io_ret ret, void *param);
   10.34  
   10.35 -int vdi_read(vdi_t *vdi, u64 vaddr, io_cb_t cb, void *param)
   10.36 +int vdi_read(vdi_t *vdi, uint64_t vaddr, io_cb_t cb, void *param)
   10.37  {
   10.38      struct io_req *req;
   10.39  
   10.40 @@ -156,7 +156,7 @@ int vdi_read(vdi_t *vdi, u64 vaddr, io_c
   10.41  }
   10.42  
   10.43  
   10.44 -int   vdi_write(vdi_t *vdi, u64 vaddr, char *block, 
   10.45 +int   vdi_write(vdi_t *vdi, uint64_t vaddr, char *block, 
   10.46                  io_cb_t cb, void *param)
   10.47  {
   10.48      struct io_req *req;
   10.49 @@ -177,8 +177,8 @@ int   vdi_write(vdi_t *vdi, u64 vaddr, c
   10.50      req->block  = block;
   10.51      /* Todo: add a pseodoheader to the block to include some location   */
   10.52      /* information in the CRC as well.                                  */
   10.53 -    req->bi.crc = (u32) crc32(0L, Z_NULL, 0); 
   10.54 -    req->bi.crc = (u32) crc32(req->bi.crc, block, BLOCK_SIZE); 
   10.55 +    req->bi.crc = (uint32_t) crc32(0L, Z_NULL, 0); 
   10.56 +    req->bi.crc = (uint32_t) crc32(req->bi.crc, block, BLOCK_SIZE); 
   10.57      req->bi.unused = 0xdeadbeef;
   10.58  
   10.59      req->cb     = cb;
   10.60 @@ -196,7 +196,7 @@ static void read_cb(struct io_ret ret, v
   10.61  {
   10.62      struct io_req *req = (struct io_req *)param;
   10.63      radix_tree_node node;
   10.64 -    u64 idx;
   10.65 +    uint64_t idx;
   10.66      char *block;
   10.67      void *req_param;
   10.68  
   10.69 @@ -268,15 +268,15 @@ static void read_cb(struct io_ret ret, v
   10.70      }
   10.71      case READ_DATA:
   10.72      {
   10.73 -        u32 crc;
   10.74 +        uint32_t crc;
   10.75  
   10.76          DPRINTF("READ_DATA\n");
   10.77          block = IO_BLOCK(ret);
   10.78          if (block == NULL) goto fail;
   10.79  
   10.80          /* crc check */
   10.81 -        crc = (u32) crc32(0L, Z_NULL, 0); 
   10.82 -        crc = (u32) crc32(crc, block, BLOCK_SIZE); 
   10.83 +        crc = (uint32_t) crc32(0L, Z_NULL, 0); 
   10.84 +        crc = (uint32_t) crc32(crc, block, BLOCK_SIZE); 
   10.85          if (crc != req->bi.crc) {
   10.86              /* TODO: add a retry loop here.                          */
   10.87              /* Do this after the cache is added -- make sure to      */
   10.88 @@ -359,7 +359,7 @@ static void write_cb(struct io_ret r, vo
   10.89  {
   10.90      struct io_req *req = (struct io_req *)param;
   10.91      radix_tree_node node;
   10.92 -    u64 a, addr;
   10.93 +    uint64_t a, addr;
   10.94      void *req_param;
   10.95      struct block_info *bi;
   10.96  
   10.97 @@ -721,7 +721,7 @@ static void write_cb(struct io_ret r, vo
   10.98      }
   10.99  }
  10.100  
  10.101 -char *vdi_read_s(vdi_t *vdi, u64 vaddr)
  10.102 +char *vdi_read_s(vdi_t *vdi, uint64_t vaddr)
  10.103  {
  10.104      pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
  10.105      char *block = NULL;
  10.106 @@ -742,7 +742,7 @@ char *vdi_read_s(vdi_t *vdi, u64 vaddr)
  10.107  }
  10.108  
  10.109  
  10.110 -int vdi_write_s(vdi_t *vdi, u64 vaddr, char *block)
  10.111 +int vdi_write_s(vdi_t *vdi, uint64_t vaddr, char *block)
  10.112  {
  10.113      pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
  10.114      int ret, result;
    11.1 --- a/tools/blktap/parallax/requests-async.h	Wed Oct 12 10:11:35 2005 +0100
    11.2 +++ b/tools/blktap/parallax/requests-async.h	Wed Oct 12 11:07:37 2005 +0100
    11.3 @@ -10,18 +10,18 @@
    11.4  #define getid(x) (((x)>>1)&0x7fffffffffffffffLLU)
    11.5  #define iswritable(x) (((x) & 1LLU) != 0)
    11.6  #define writable(x) (((x) << 1) | 1LLU)
    11.7 -#define readonly(x) ((u64)((x) << 1))
    11.8 +#define readonly(x) ((uint64_t)((x) << 1))
    11.9  */
   11.10  
   11.11  #define VADDR_MASK 0x0000000003ffffffLLU /* 26-bits = 256Gig */
   11.12  #define VALID_VADDR(x) (((x) & VADDR_MASK) == (x))
   11.13  
   11.14 -int vdi_read (vdi_t *vdi, u64 vaddr, io_cb_t cb, void *param);
   11.15 -int vdi_write(vdi_t *vdi, u64 vaddr, char *block, io_cb_t cb, void *param);
   11.16 +int vdi_read (vdi_t *vdi, uint64_t vaddr, io_cb_t cb, void *param);
   11.17 +int vdi_write(vdi_t *vdi, uint64_t vaddr, char *block, io_cb_t cb, void *param);
   11.18               
   11.19  /* synchronous versions: */
   11.20 -char *vdi_read_s (vdi_t *vdi, u64 vaddr);
   11.21 -int   vdi_write_s(vdi_t *vdi, u64 vaddr, char *block);
   11.22 +char *vdi_read_s (vdi_t *vdi, uint64_t vaddr);
   11.23 +int   vdi_write_s(vdi_t *vdi, uint64_t vaddr, char *block);
   11.24  
   11.25  #define ERR_BAD_VADDR  -1
   11.26  #define ERR_NOMEM      -2
    12.1 --- a/tools/blktap/parallax/snaplog.c	Wed Oct 12 10:11:35 2005 +0100
    12.2 +++ b/tools/blktap/parallax/snaplog.c	Wed Oct 12 11:07:37 2005 +0100
    12.3 @@ -24,7 +24,7 @@
    12.4  
    12.5  
    12.6  
    12.7 -snap_block_t *snap_get_block(u64 block)
    12.8 +snap_block_t *snap_get_block(uint64_t block)
    12.9  {
   12.10      snap_block_t *blk = (snap_block_t *)readblock(block);
   12.11      
    13.1 --- a/tools/blktap/parallax/snaplog.h	Wed Oct 12 10:11:35 2005 +0100
    13.2 +++ b/tools/blktap/parallax/snaplog.h	Wed Oct 12 11:07:37 2005 +0100
    13.3 @@ -13,12 +13,12 @@
    13.4  #define __SNAPLOG_H__
    13.5  
    13.6  typedef struct snap_id {
    13.7 -    u64            block;
    13.8 +    uint64_t            block;
    13.9      unsigned int   index;
   13.10  } snap_id_t;
   13.11  
   13.12  typedef struct snap_rec {
   13.13 -    u64            radix_root;
   13.14 +    uint64_t            radix_root;
   13.15      struct timeval timestamp;
   13.16      /* flags: */
   13.17      unsigned       deleted:1;
   13.18 @@ -38,7 +38,7 @@ int  snap_get_id(snap_id_t *id, snap_rec
   13.19  static const snap_id_t null_snap_id = { 0, 0 }; 
   13.20  
   13.21  typedef struct snap_block_hdr {
   13.22 -    u64            magic;
   13.23 +    uint64_t            magic;
   13.24      snap_id_t      parent_block; /* parent block within this chain */
   13.25      snap_id_t      fork_block;   /* where this log was forked */
   13.26      unsigned       log_entries;  /* total entries since forking */
   13.27 @@ -56,6 +56,6 @@ typedef struct snap_block {
   13.28  } snap_block_t;
   13.29      
   13.30  
   13.31 -snap_block_t *snap_get_block(u64 block);
   13.32 +snap_block_t *snap_get_block(uint64_t block);
   13.33  
   13.34  #endif /* __SNAPLOG_H__ */
    14.1 --- a/tools/blktap/parallax/vdi.c	Wed Oct 12 10:11:35 2005 +0100
    14.2 +++ b/tools/blktap/parallax/vdi.c	Wed Oct 12 11:07:37 2005 +0100
    14.3 @@ -132,9 +132,9 @@ vdi_t *vdi_create(snap_id_t *parent_snap
    14.4  /* vdi_get and vdi_put currently act more like alloc/free -- they don't 
    14.5   * do refcount-based allocation.  
    14.6   */
    14.7 -vdi_t *vdi_get(u64 vdi_id)
    14.8 +vdi_t *vdi_get(uint64_t vdi_id)
    14.9  {
   14.10 -    u64 vdi_blk;
   14.11 +    uint64_t vdi_blk;
   14.12      vdi_t *vdi;
   14.13      
   14.14      vdi_blk = lookup(VDI_REG_HEIGHT, VDI_RADIX_ROOT, vdi_id);
    15.1 --- a/tools/blktap/parallax/vdi.h	Wed Oct 12 10:11:35 2005 +0100
    15.2 +++ b/tools/blktap/parallax/vdi.h	Wed Oct 12 11:07:37 2005 +0100
    15.3 @@ -21,9 +21,9 @@
    15.4  
    15.5  
    15.6  typedef struct vdi {
    15.7 -    u64         id;               /* unique vdi id -- used by the registry   */
    15.8 -    u64         block;            /* block where this vdi lives (also unique)*/
    15.9 -    u64         radix_root;       /* radix root node for block mappings      */
   15.10 +    uint64_t         id;               /* unique vdi id -- used by the registry   */
   15.11 +    uint64_t         block;            /* block where this vdi lives (also unique)*/
   15.12 +    uint64_t         radix_root;       /* radix root node for block mappings      */
   15.13      snap_id_t   snap;             /* next snapshot slot for this VDI         */
   15.14      struct vdi *next;             /* used to hash-chain in blkif.            */
   15.15      blkif_vdev_t vdevice;         /* currently mounted as...                 */
   15.16 @@ -34,19 +34,19 @@ typedef struct vdi {
   15.17  #define VDI_REG_MAGIC   0xff00ff0bb0ff00ffLL
   15.18  
   15.19  typedef struct vdi_registry {
   15.20 -    u64     magic;
   15.21 -    u64     nr_vdis;
   15.22 +    uint64_t     magic;
   15.23 +    uint64_t     nr_vdis;
   15.24  } vdi_registry_t;
   15.25  
   15.26  
   15.27  int __init_vdi(void);
   15.28  
   15.29 -vdi_t *vdi_get(u64 vdi_id);
   15.30 +vdi_t *vdi_get(uint64_t vdi_id);
   15.31  void vdi_put(vdi_t *vdi);
   15.32  vdi_registry_t *get_vdi_registry(void);
   15.33  vdi_t *vdi_create(snap_id_t *parent_snap, char *name);
   15.34 -u64 vdi_lookup_block(vdi_t *vdi, u64 vdi_block, int *writable);
   15.35 -void vdi_update_block(vdi_t *vdi, u64 vdi_block, u64 g_block);
   15.36 +uint64_t vdi_lookup_block(vdi_t *vdi, uint64_t vdi_block, int *writable);
   15.37 +void vdi_update_block(vdi_t *vdi, uint64_t vdi_block, uint64_t g_block);
   15.38  void vdi_snapshot(vdi_t *vdi);
   15.39  
   15.40  
    16.1 --- a/tools/blktap/parallax/vdi_create.c	Wed Oct 12 10:11:35 2005 +0100
    16.2 +++ b/tools/blktap/parallax/vdi_create.c	Wed Oct 12 11:07:37 2005 +0100
    16.3 @@ -33,7 +33,7 @@ int main(int argc, char *argv[])
    16.4      name[VDI_NAME_SZ] = '\0';    
    16.5      
    16.6      if ( argc > 3 ) {
    16.7 -        id.block   = (u64)          atoll(argv[2]);
    16.8 +        id.block   = (uint64_t)          atoll(argv[2]);
    16.9          id.index   = (unsigned int) atol (argv[3]);
   16.10          from_snap  = 1;
   16.11      }
    17.1 --- a/tools/blktap/parallax/vdi_fill.c	Wed Oct 12 10:11:35 2005 +0100
    17.2 +++ b/tools/blktap/parallax/vdi_fill.c	Wed Oct 12 11:07:37 2005 +0100
    17.3 @@ -22,13 +22,13 @@
    17.4  int main(int argc, char *argv[])
    17.5  {
    17.6      vdi_t       *vdi;
    17.7 -    u64          id;
    17.8 +    uint64_t          id;
    17.9      int          fd;
   17.10      struct stat  st;
   17.11 -    u64          tot_size;
   17.12 +    uint64_t          tot_size;
   17.13      char         spage[BLOCK_SIZE];
   17.14      char        *dpage;
   17.15 -    u64          vblock = 0, count=0;
   17.16 +    uint64_t          vblock = 0, count=0;
   17.17      
   17.18      __init_blockstore();
   17.19      init_block_async();
   17.20 @@ -39,7 +39,7 @@ int main(int argc, char *argv[])
   17.21          exit(-1);
   17.22      }
   17.23          
   17.24 -    id = (u64) atoll(argv[1]);
   17.25 +    id = (uint64_t) atoll(argv[1]);
   17.26      
   17.27      vdi = vdi_get( id );
   17.28      
   17.29 @@ -60,7 +60,7 @@ int main(int argc, char *argv[])
   17.30          exit(-1);
   17.31      }
   17.32      
   17.33 -    tot_size = (u64) st.st_size;
   17.34 +    tot_size = (uint64_t) st.st_size;
   17.35      printf("Filling VDI %Ld with %Ld bytes.\n", id, tot_size);
   17.36      
   17.37      printf("%011Ld blocks total\n", tot_size / BLOCK_SIZE);    
    18.1 --- a/tools/blktap/parallax/vdi_snap.c	Wed Oct 12 10:11:35 2005 +0100
    18.2 +++ b/tools/blktap/parallax/vdi_snap.c	Wed Oct 12 11:07:37 2005 +0100
    18.3 @@ -17,7 +17,7 @@
    18.4  int main(int argc, char *argv[])
    18.5  {
    18.6      vdi_t  *vdi;
    18.7 -    u64     id;
    18.8 +    uint64_t     id;
    18.9      
   18.10      __init_blockstore();
   18.11      __init_vdi();
   18.12 @@ -27,7 +27,7 @@ int main(int argc, char *argv[])
   18.13          exit(-1);
   18.14      }
   18.15      
   18.16 -    id = (u64) atoll(argv[1]);
   18.17 +    id = (uint64_t) atoll(argv[1]);
   18.18      
   18.19      vdi = vdi_get(id);
   18.20      
    19.1 --- a/tools/blktap/parallax/vdi_snap_delete.c	Wed Oct 12 10:11:35 2005 +0100
    19.2 +++ b/tools/blktap/parallax/vdi_snap_delete.c	Wed Oct 12 11:07:37 2005 +0100
    19.3 @@ -34,7 +34,7 @@ int main(int argc, char *argv[])
    19.4          exit(-1);
    19.5      }
    19.6      
    19.7 -    id.block   = (u64)          atoll(argv[1]);
    19.8 +    id.block   = (uint64_t)          atoll(argv[1]);
    19.9      id.index   = (unsigned int) atol (argv[2]);
   19.10      
   19.11      c_id = id;
    20.1 --- a/tools/blktap/parallax/vdi_snap_list.c	Wed Oct 12 10:11:35 2005 +0100
    20.2 +++ b/tools/blktap/parallax/vdi_snap_list.c	Wed Oct 12 11:07:37 2005 +0100
    20.3 @@ -18,7 +18,7 @@
    20.4  int main(int argc, char *argv[])
    20.5  {
    20.6      vdi_t        *vdi;
    20.7 -    u64           id;
    20.8 +    uint64_t           id;
    20.9      int           i, max_snaps = -1;
   20.10      snap_block_t *blk;
   20.11      snap_id_t     sid;
   20.12 @@ -32,7 +32,7 @@ int main(int argc, char *argv[])
   20.13          exit(-1);
   20.14      }
   20.15      
   20.16 -    id = (u64) atoll(argv[1]);
   20.17 +    id = (uint64_t) atoll(argv[1]);
   20.18      
   20.19      if ( argc > 2 ) {
   20.20          max_snaps = atoi(argv[2]);
    21.1 --- a/tools/blktap/parallax/vdi_unittest.c	Wed Oct 12 10:11:35 2005 +0100
    21.2 +++ b/tools/blktap/parallax/vdi_unittest.c	Wed Oct 12 11:07:37 2005 +0100
    21.3 @@ -39,9 +39,9 @@ void fill_test_pages(void)
    21.4      zero_page = newblock();
    21.5  }
    21.6  
    21.7 -inline u64 make_vaddr(u64 L1, u64 L2, u64 L3)
    21.8 +inline uint64_t make_vaddr(uint64_t L1, uint64_t L2, uint64_t L3)
    21.9  {
   21.10 -    u64 ret = L1;
   21.11 +    uint64_t ret = L1;
   21.12  
   21.13      ret = (ret << 9) | L2;
   21.14      ret = (ret << 9) | L3;
   21.15 @@ -49,9 +49,9 @@ inline u64 make_vaddr(u64 L1, u64 L2, u6
   21.16      return ret;
   21.17  }
   21.18  
   21.19 -void touch_block(vdi_t *vdi, u64 L1, u64 L2, u64 L3)
   21.20 +void touch_block(vdi_t *vdi, uint64_t L1, uint64_t L2, uint64_t L3)
   21.21  {
   21.22 -    u64 vaddr;
   21.23 +    uint64_t vaddr;
   21.24      char *page = pages[next_page++];
   21.25      char *rpage = NULL;
   21.26  
   21.27 @@ -76,9 +76,9 @@ void touch_block(vdi_t *vdi, u64 L1, u64
   21.28      freeblock(rpage);
   21.29  }
   21.30  
   21.31 -void test_block(vdi_t *vdi, u64 L1, u64 L2, u64 L3, char *page)
   21.32 +void test_block(vdi_t *vdi, uint64_t L1, uint64_t L2, uint64_t L3, char *page)
   21.33  {
   21.34 -    u64 vaddr;
   21.35 +    uint64_t vaddr;
   21.36      char *rpage = NULL;
   21.37  
   21.38      printf("TEST  (%3Lu, %3Lu, %3Lu)\n", L1, L2, L3);
   21.39 @@ -103,7 +103,7 @@ void test_block(vdi_t *vdi, u64 L1, u64 
   21.40  
   21.41  void coverage_test(vdi_t *vdi)
   21.42  {
   21.43 -    u64 vaddr;
   21.44 +    uint64_t vaddr;
   21.45      int i, j, k;
   21.46  
   21.47      /* Do a series of writes and reads to test all paths through the 
   21.48 @@ -155,13 +155,13 @@ void coverage_test(vdi_t *vdi)
   21.49  int main(int argc, char *argv[])
   21.50  {
   21.51      vdi_t       *vdi;
   21.52 -    u64          id;
   21.53 +    uint64_t          id;
   21.54      int          fd;
   21.55      struct stat  st;
   21.56 -    u64          tot_size;
   21.57 +    uint64_t          tot_size;
   21.58      char         spage[BLOCK_SIZE];
   21.59      char        *dpage;
   21.60 -    u64          vblock = 0, count=0;
   21.61 +    uint64_t          vblock = 0, count=0;
   21.62      
   21.63      __init_blockstore();
   21.64      init_block_async();
    22.1 --- a/tools/blktap/parallax/vdi_validate.c	Wed Oct 12 10:11:35 2005 +0100
    22.2 +++ b/tools/blktap/parallax/vdi_validate.c	Wed Oct 12 11:07:37 2005 +0100
    22.3 @@ -23,13 +23,13 @@
    22.4  int main(int argc, char *argv[])
    22.5  {
    22.6      vdi_t       *vdi;
    22.7 -    u64          id;
    22.8 +    uint64_t          id;
    22.9      int          fd;
   22.10      struct stat  st;
   22.11 -    u64          tot_size;
   22.12 +    uint64_t          tot_size;
   22.13      char         spage[BLOCK_SIZE], *dpage;
   22.14      char        *vpage;
   22.15 -    u64          vblock = 0, count=0;
   22.16 +    uint64_t          vblock = 0, count=0;
   22.17      
   22.18      __init_blockstore();
   22.19      init_block_async();
   22.20 @@ -40,7 +40,7 @@ int main(int argc, char *argv[])
   22.21          exit(-1);
   22.22      }
   22.23          
   22.24 -    id = (u64) atoll(argv[1]);
   22.25 +    id = (uint64_t) atoll(argv[1]);
   22.26      
   22.27      vdi = vdi_get( id );
   22.28      
   22.29 @@ -61,7 +61,7 @@ int main(int argc, char *argv[])
   22.30          exit(-1);
   22.31      }
   22.32      
   22.33 -    tot_size = (u64) st.st_size;
   22.34 +    tot_size = (uint64_t) st.st_size;
   22.35      printf("Testing VDI %Ld (%Ld bytes).\n", id, tot_size);
   22.36      
   22.37      printf("           ");
    23.1 --- a/tools/blktap/ublkback/ublkbacklib.c	Wed Oct 12 10:11:35 2005 +0100
    23.2 +++ b/tools/blktap/ublkback/ublkbacklib.c	Wed Oct 12 11:07:37 2005 +0100
    23.3 @@ -112,7 +112,7 @@ int ublkback_response(blkif_t *blkif, bl
    23.4  typedef struct image {
    23.5      /* These need to turn into an array/rbtree for multi-disk support. */
    23.6      int  fd;
    23.7 -    u64  fsid;
    23.8 +    uint64_t  fsid;
    23.9      blkif_vdev_t   vdevice;
   23.10      long int size;
   23.11      long int secsize;
   23.12 @@ -190,7 +190,7 @@ int ublkback_new_blkif(blkif_t *blkif)
   23.13    }
   23.14  */
   23.15      if (image->size == 0)
   23.16 -        image->size =((u64) 16836057);
   23.17 +        image->size =((uint64_t) 16836057);
   23.18      image->secsize = 512;
   23.19      image->info = 0;
   23.20  
   23.21 @@ -215,7 +215,7 @@ static int batch_count = 0;
   23.22  int ublkback_request(blkif_t *blkif, blkif_request_t *req, int batch_done)
   23.23  {
   23.24      int fd;
   23.25 -    u64 sector;
   23.26 +    uint64_t sector;
   23.27      char *spage, *dpage;
   23.28      int ret, i, idx;
   23.29      blkif_response_t *rsp;
    24.1 --- a/tools/console/daemon/io.c	Wed Oct 12 10:11:35 2005 +0100
    24.2 +++ b/tools/console/daemon/io.c	Wed Oct 12 11:07:37 2005 +0100
    24.3 @@ -474,7 +474,7 @@ static void handle_tty_write(struct doma
    24.4  
    24.5  static void handle_ring_read(struct domain *dom)
    24.6  {
    24.7 -	u16 v;
    24.8 +	uint16_t v;
    24.9  
   24.10  	if (!read_sync(dom->evtchn_fd, &v, sizeof(v)))
   24.11  		return;
    25.1 --- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c	Wed Oct 12 10:11:35 2005 +0100
    25.2 +++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c	Wed Oct 12 11:07:37 2005 +0100
    25.3 @@ -38,7 +38,7 @@
    25.4  #include <xenctrl.h>
    25.5  #define TRACE_ENTER /* printf("enter %s\n", __FUNCTION__) */
    25.6  
    25.7 -long (*myptrace)(int xc_handle, enum __ptrace_request, u32, long, long);
    25.8 +long (*myptrace)(int xc_handle, enum __ptrace_request, uint32_t, long, long);
    25.9  int (*myxcwait)(int xc_handle, int domain, int *status, int options) ;
   25.10  static int xc_handle;
   25.11  
    26.1 --- a/tools/debugger/libxendebug/xendebug.c	Wed Oct 12 10:11:35 2005 +0100
    26.2 +++ b/tools/debugger/libxendebug/xendebug.c	Wed Oct 12 11:07:37 2005 +0100
    26.3 @@ -41,8 +41,8 @@ typedef struct bwcpoint                 
    26.4  {
    26.5      struct list_head list;
    26.6      unsigned long address;
    26.7 -    u32 domain;
    26.8 -    u8 old_value;                             /* old value for software bkpt */
    26.9 +    uint32_t domain;
   26.10 +    uint8_t old_value;                             /* old value for software bkpt */
   26.11  } bwcpoint_t, *bwcpoint_p;
   26.12  
   26.13  static bwcpoint_t bwcpoint_list;
   26.14 @@ -52,7 +52,7 @@ static bwcpoint_t bwcpoint_list;
   26.15  typedef struct domain_context                 /* local cache of domain state */
   26.16  {
   26.17      struct list_head     list;
   26.18 -    u32                  domid;
   26.19 +    uint32_t                  domid;
   26.20      boolean              valid[MAX_VIRT_CPUS];
   26.21      vcpu_guest_context_t context[MAX_VIRT_CPUS];
   26.22  
   26.23 @@ -92,7 +92,7 @@ xendebug_initialize()
   26.24  /**************/
   26.25  
   26.26  static domain_context_p
   26.27 -xendebug_domain_context_search (u32 domid)
   26.28 +xendebug_domain_context_search (uint32_t domid)
   26.29  {
   26.30      struct list_head *entry;
   26.31      domain_context_p  ctxt;
   26.32 @@ -107,7 +107,7 @@ xendebug_domain_context_search (u32 domi
   26.33  }
   26.34  
   26.35  static __inline__ domain_context_p
   26.36 -xendebug_get_context (int xc_handle, u32 domid, u32 vcpu)
   26.37 +xendebug_get_context (int xc_handle, uint32_t domid, uint32_t vcpu)
   26.38  {
   26.39      int rc;
   26.40      domain_context_p ctxt;
   26.41 @@ -130,7 +130,7 @@ xendebug_get_context (int xc_handle, u32
   26.42  }
   26.43  
   26.44  static __inline__ int
   26.45 -xendebug_set_context (int xc_handle, domain_context_p ctxt, u32 vcpu)
   26.46 +xendebug_set_context (int xc_handle, domain_context_p ctxt, uint32_t vcpu)
   26.47  {
   26.48      dom0_op_t op;
   26.49      int rc;
   26.50 @@ -157,8 +157,8 @@ xendebug_set_context (int xc_handle, dom
   26.51  
   26.52  int
   26.53  xendebug_attach(int xc_handle,
   26.54 -                u32 domid,
   26.55 -                u32 vcpu)
   26.56 +                uint32_t domid,
   26.57 +                uint32_t vcpu)
   26.58  {
   26.59      domain_context_p ctxt;
   26.60  
   26.61 @@ -176,8 +176,8 @@ xendebug_attach(int xc_handle,
   26.62  
   26.63  int
   26.64  xendebug_detach(int xc_handle,
   26.65 -                u32 domid,
   26.66 -                u32 vcpu)
   26.67 +                uint32_t domid,
   26.68 +                uint32_t vcpu)
   26.69  {
   26.70      domain_context_p ctxt;
   26.71      
   26.72 @@ -197,8 +197,8 @@ xendebug_detach(int xc_handle,
   26.73  
   26.74  int
   26.75  xendebug_read_registers(int xc_handle,
   26.76 -                        u32 domid,
   26.77 -                        u32 vcpu,
   26.78 +                        uint32_t domid,
   26.79 +                        uint32_t vcpu,
   26.80                          cpu_user_regs_t **regs)
   26.81  {
   26.82      domain_context_p ctxt;
   26.83 @@ -218,8 +218,8 @@ xendebug_read_registers(int xc_handle,
   26.84  
   26.85  int
   26.86  xendebug_read_fpregisters (int xc_handle,
   26.87 -                           u32 domid,
   26.88 -                           u32 vcpu,
   26.89 +                           uint32_t domid,
   26.90 +                           uint32_t vcpu,
   26.91                             char **regs)
   26.92  {
   26.93      domain_context_p ctxt;
   26.94 @@ -239,8 +239,8 @@ xendebug_read_fpregisters (int xc_handle
   26.95  
   26.96  int
   26.97  xendebug_write_registers(int xc_handle,
   26.98 -                         u32 domid,
   26.99 -                         u32 vcpu,
  26.100 +                         uint32_t domid,
  26.101 +                         uint32_t vcpu,
  26.102                           cpu_user_regs_t *regs)
  26.103  {
  26.104      domain_context_p ctxt;
  26.105 @@ -260,8 +260,8 @@ xendebug_write_registers(int xc_handle,
  26.106  
  26.107  int
  26.108  xendebug_step(int xc_handle,
  26.109 -              u32 domid,
  26.110 -              u32 vcpu)
  26.111 +              uint32_t domid,
  26.112 +              uint32_t vcpu)
  26.113  {
  26.114      domain_context_p ctxt;
  26.115      int rc;
  26.116 @@ -282,8 +282,8 @@ xendebug_step(int xc_handle,
  26.117  
  26.118  int
  26.119  xendebug_continue(int xc_handle,
  26.120 -                  u32 domid,
  26.121 -                  u32 vcpu)
  26.122 +                  uint32_t domid,
  26.123 +                  uint32_t vcpu)
  26.124  {
  26.125      domain_context_p ctxt;
  26.126      int rc;
  26.127 @@ -310,8 +310,8 @@ xendebug_continue(int xc_handle,
  26.128  
  26.129  /* access to one page */
  26.130  static int
  26.131 -xendebug_memory_page (domain_context_p ctxt, int xc_handle, u32 vcpu,
  26.132 -                      int protection, unsigned long address, int length, u8 *buffer)
  26.133 +xendebug_memory_page (domain_context_p ctxt, int xc_handle, uint32_t vcpu,
  26.134 +                      int protection, unsigned long address, int length, uint8_t *buffer)
  26.135  {
  26.136      vcpu_guest_context_t *vcpu_ctxt = &ctxt->context[vcpu];
  26.137      unsigned long pde, page;
  26.138 @@ -406,8 +406,8 @@ xendebug_memory_page (domain_context_p c
  26.139  
  26.140  /* divide a memory operation into accesses to individual pages */
  26.141  static int
  26.142 -xendebug_memory_op (domain_context_p ctxt, int xc_handle, u32 vcpu,
  26.143 -                    int protection, unsigned long address, int length, u8 *buffer)
  26.144 +xendebug_memory_op (domain_context_p ctxt, int xc_handle, uint32_t vcpu,
  26.145 +                    int protection, unsigned long address, int length, uint8_t *buffer)
  26.146  {
  26.147      int      remain;              /* number of bytes to touch past this page */
  26.148      int      bytes   = 0;
  26.149 @@ -429,11 +429,11 @@ xendebug_memory_op (domain_context_p ctx
  26.150  
  26.151  int
  26.152  xendebug_read_memory(int xc_handle,
  26.153 -                     u32 domid,
  26.154 -                     u32 vcpu,
  26.155 +                     uint32_t domid,
  26.156 +                     uint32_t vcpu,
  26.157                       unsigned long address,
  26.158 -                     u32 length,
  26.159 -                     u8 *data)
  26.160 +                     uint32_t length,
  26.161 +                     uint8_t *data)
  26.162  {
  26.163      domain_context_p ctxt;
  26.164  
  26.165 @@ -449,11 +449,11 @@ xendebug_read_memory(int xc_handle,
  26.166  
  26.167  int
  26.168  xendebug_write_memory(int xc_handle,
  26.169 -                      u32 domid,
  26.170 -                      u32 vcpu,
  26.171 +                      uint32_t domid,
  26.172 +                      uint32_t vcpu,
  26.173                        unsigned long address,
  26.174 -                      u32 length,
  26.175 -                      u8 *data)
  26.176 +                      uint32_t length,
  26.177 +                      uint8_t *data)
  26.178  {
  26.179      domain_context_p ctxt;
  26.180  
  26.181 @@ -469,13 +469,13 @@ xendebug_write_memory(int xc_handle,
  26.182  
  26.183  int
  26.184  xendebug_insert_memory_breakpoint(int xc_handle,
  26.185 -                                  u32 domid,
  26.186 -                                  u32 vcpu,
  26.187 +                                  uint32_t domid,
  26.188 +                                  uint32_t vcpu,
  26.189                                    unsigned long address,
  26.190 -                                  u32 length)
  26.191 +                                  uint32_t length)
  26.192  {
  26.193      bwcpoint_p bkpt;
  26.194 -    u8 breakpoint_opcode = 0xcc;
  26.195 +    uint8_t breakpoint_opcode = 0xcc;
  26.196  
  26.197      printf("insert breakpoint %d:%lx %d\n",
  26.198              domid, address, length);
  26.199 @@ -515,10 +515,10 @@ xendebug_insert_memory_breakpoint(int xc
  26.200  
  26.201  int
  26.202  xendebug_remove_memory_breakpoint(int xc_handle,
  26.203 -                                  u32 domid,
  26.204 -                                  u32 vcpu,
  26.205 +                                  uint32_t domid,
  26.206 +                                  uint32_t vcpu,
  26.207                                    unsigned long address,
  26.208 -                                  u32 length)
  26.209 +                                  uint32_t length)
  26.210  {
  26.211      bwcpoint_p bkpt = NULL;
  26.212  
  26.213 @@ -552,7 +552,7 @@ int
  26.214  xendebug_query_domain_stop(int xc_handle, int *dom_list, int dom_list_size)
  26.215  {
  26.216      xc_dominfo_t *info;
  26.217 -    u32 first_dom = 0;
  26.218 +    uint32_t first_dom = 0;
  26.219      int max_doms = 1024;
  26.220      int nr_doms, loop;
  26.221      int count = 0;
    27.1 --- a/tools/debugger/libxendebug/xendebug.h	Wed Oct 12 10:11:35 2005 +0100
    27.2 +++ b/tools/debugger/libxendebug/xendebug.h	Wed Oct 12 11:07:37 2005 +0100
    27.3 @@ -12,63 +12,63 @@
    27.4  #include <xenctrl.h>
    27.5  
    27.6  int xendebug_attach(int xc_handle,
    27.7 -		    u32 domid,
    27.8 -		    u32 vcpu);
    27.9 +		    uint32_t domid,
   27.10 +		    uint32_t vcpu);
   27.11  
   27.12  int xendebug_detach(int xc_handle,
   27.13 -		    u32 domid,
   27.14 -		    u32 vcpu);
   27.15 +		    uint32_t domid,
   27.16 +		    uint32_t vcpu);
   27.17  
   27.18  int xendebug_read_registers(int xc_handle,
   27.19 -			    u32 domid,
   27.20 -			    u32 vcpu,
   27.21 +			    uint32_t domid,
   27.22 +			    uint32_t vcpu,
   27.23  			    cpu_user_regs_t **regs);
   27.24  
   27.25  int xendebug_read_fpregisters (int xc_handle,
   27.26 -			       u32 domid,
   27.27 -			       u32 vcpu,
   27.28 +			       uint32_t domid,
   27.29 +			       uint32_t vcpu,
   27.30  			       char **regs);
   27.31  
   27.32  int xendebug_write_registers(int xc_handle,
   27.33 -			     u32 domid,
   27.34 -			     u32 vcpu,
   27.35 +			     uint32_t domid,
   27.36 +			     uint32_t vcpu,
   27.37  			     cpu_user_regs_t *regs);
   27.38  
   27.39  int xendebug_step(int xc_handle,
   27.40 -		  u32 domid,
   27.41 -		  u32 vcpu);
   27.42 +		  uint32_t domid,
   27.43 +		  uint32_t vcpu);
   27.44  
   27.45  int xendebug_continue(int xc_handle,
   27.46 -		      u32 domid,
   27.47 -		      u32 vcpu);
   27.48 +		      uint32_t domid,
   27.49 +		      uint32_t vcpu);
   27.50  
   27.51  int xendebug_read_memory(int xc_handle,
   27.52 -			 u32 domid,
   27.53 -			 u32 vcpu,
   27.54 +			 uint32_t domid,
   27.55 +			 uint32_t vcpu,
   27.56  			 unsigned long address,
   27.57 -			 u32 length,
   27.58 -			 u8 *data);
   27.59 +			 uint32_t length,
   27.60 +			 uint8_t *data);
   27.61  
   27.62  
   27.63  int xendebug_write_memory(int xc_handle,
   27.64 -			  u32 domid,
   27.65 -			  u32 vcpu,
   27.66 +			  uint32_t domid,
   27.67 +			  uint32_t vcpu,
   27.68  			  unsigned long address,
   27.69 -			  u32 length,
   27.70 -			  u8 *data);
   27.71 +			  uint32_t length,
   27.72 +			  uint8_t *data);
   27.73  
   27.74  
   27.75  int xendebug_insert_memory_breakpoint(int xc_handle,
   27.76 -				      u32 domid,
   27.77 -				      u32 vcpu,
   27.78 +				      uint32_t domid,
   27.79 +				      uint32_t vcpu,
   27.80  				      unsigned long address,
   27.81 -				      u32 length);
   27.82 +				      uint32_t length);
   27.83  
   27.84  int xendebug_remove_memory_breakpoint(int xc_handle,
   27.85 -				      u32 domid,
   27.86 -				      u32 vcpu,
   27.87 +				      uint32_t domid,
   27.88 +				      uint32_t vcpu,
   27.89  				      unsigned long address,
   27.90 -				      u32 length);
   27.91 +				      uint32_t length);
   27.92  
   27.93  int xendebug_query_domain_stop(int xc_handle,
   27.94  			       int *dom_list, 
    28.1 --- a/tools/debugger/pdb/linux-2.6-module/debug.c	Wed Oct 12 10:11:35 2005 +0100
    28.2 +++ b/tools/debugger/pdb/linux-2.6-module/debug.c	Wed Oct 12 11:07:37 2005 +0100
    28.3 @@ -29,13 +29,13 @@ typedef struct bwcpoint                 
    28.4      unsigned long address;
    28.5      int length;
    28.6  
    28.7 -    u8  type;                                                     /* BWC_??? */
    28.8 -    u8  mode;                   /* for BWC_PAGE, the current protection mode */
    28.9 -    u32 process;
   28.10 -    u8  error;                /* error occured when enabling: don't disable. */
   28.11 +    uint8_t  type;                                                     /* BWC_??? */
   28.12 +    uint8_t  mode;                   /* for BWC_PAGE, the current protection mode */
   28.13 +    uint32_t process;
   28.14 +    uint8_t  error;                /* error occured when enabling: don't disable. */
   28.15  
   28.16      /* original values */
   28.17 -    u8    orig_bkpt;                               /* single byte breakpoint */
   28.18 +    uint8_t    orig_bkpt;                               /* single byte breakpoint */
   28.19      pte_t orig_pte;
   28.20  
   28.21      struct list_head watchpt_read_list;     /* read watchpoints on this page */
   28.22 @@ -109,7 +109,7 @@ pdb_bwc_print_list (void)
   28.23  }
   28.24  
   28.25  bwcpoint_p
   28.26 -pdb_search_watchpoint (u32 process, unsigned long address)
   28.27 +pdb_search_watchpoint (uint32_t process, unsigned long address)
   28.28  {
   28.29      bwcpoint_p bwc_watch = (bwcpoint_p) 0;
   28.30      bwcpoint_p bwc_entry = (bwcpoint_p) 0;
   28.31 @@ -150,7 +150,7 @@ pdb_search_watchpoint (u32 process, unsi
   28.32  int
   28.33  pdb_suspend (struct task_struct *target)
   28.34  {
   28.35 -    u32 rc = 0;
   28.36 +    uint32_t rc = 0;
   28.37  
   28.38      force_sig(SIGSTOP, target);                    /* force_sig_specific ??? */
   28.39  
   28.40 @@ -364,11 +364,11 @@ pdb_step (struct task_struct *target)
   28.41  
   28.42  int
   28.43  pdb_insert_memory_breakpoint (struct task_struct *target, 
   28.44 -                              unsigned long address, u32 length)
   28.45 +                              unsigned long address, uint32_t length)
   28.46  {
   28.47      int rc = 0;
   28.48      bwcpoint_p bkpt;
   28.49 -    u8 breakpoint_opcode = 0xcc;
   28.50 +    uint8_t breakpoint_opcode = 0xcc;
   28.51  
   28.52      printk("insert breakpoint %d:%lx len: %d\n", target->pid, address, length);
   28.53  
   28.54 @@ -399,7 +399,7 @@ pdb_insert_memory_breakpoint (struct tas
   28.55  
   28.56  int
   28.57  pdb_remove_memory_breakpoint (struct task_struct *target,
   28.58 -                              unsigned long address, u32 length)
   28.59 +                              unsigned long address, uint32_t length)
   28.60  {
   28.61      int rc = 0;
   28.62      bwcpoint_p bkpt = NULL;
    29.1 --- a/tools/debugger/pdb/linux-2.6-module/pdb_debug.h	Wed Oct 12 10:11:35 2005 +0100
    29.2 +++ b/tools/debugger/pdb/linux-2.6-module/pdb_debug.h	Wed Oct 12 11:07:37 2005 +0100
    29.3 @@ -18,9 +18,9 @@ int pdb_continue (struct task_struct *ta
    29.4  int pdb_step (struct task_struct *target);
    29.5  
    29.6  int pdb_insert_memory_breakpoint (struct task_struct *target, 
    29.7 -                                  unsigned long address, u32 length);
    29.8 +                                  unsigned long address, uint32_t length);
    29.9  int pdb_remove_memory_breakpoint (struct task_struct *target,
   29.10 -                                  unsigned long address, u32 length);
   29.11 +                                  unsigned long address, uint32_t length);
   29.12  int pdb_insert_watchpoint (struct task_struct *target,
   29.13                             pdb_op_watchpt_p watchpt);
   29.14  int pdb_remove_watchpoint (struct task_struct *target,
    30.1 --- a/tools/debugger/pdb/linux-2.6-module/pdb_module.h	Wed Oct 12 10:11:35 2005 +0100
    30.2 +++ b/tools/debugger/pdb/linux-2.6-module/pdb_module.h	Wed Oct 12 11:07:37 2005 +0100
    30.3 @@ -9,7 +9,7 @@
    30.4  #define PDB_OPCODE_ATTACH 2
    30.5  typedef struct pdb_op_attach
    30.6  {
    30.7 -    u32  domain;
    30.8 +    uint32_t  domain;
    30.9  } pdb_op_attach_t, *pdb_op_attach_p;
   30.10  
   30.11  #define PDB_OPCODE_DETACH 3
   30.12 @@ -17,43 +17,43 @@ typedef struct pdb_op_attach
   30.13  #define PDB_OPCODE_RD_REG 4
   30.14  typedef struct pdb_op_rd_reg
   30.15  {
   30.16 -    u32 reg;
   30.17 -    u32 value;
   30.18 +    uint32_t reg;
   30.19 +    uint32_t value;
   30.20  } pdb_op_rd_reg_t, *pdb_op_rd_reg_p;
   30.21  
   30.22  #define PDB_OPCODE_RD_REGS 5
   30.23  typedef struct pdb_op_rd_regs
   30.24  {
   30.25 -    u32 reg[GDB_REGISTER_FRAME_SIZE];
   30.26 +    uint32_t reg[GDB_REGISTER_FRAME_SIZE];
   30.27  } pdb_op_rd_regs_t, *pdb_op_rd_regs_p;
   30.28  
   30.29  #define PDB_OPCODE_WR_REG 6
   30.30  typedef struct pdb_op_wr_reg
   30.31  {
   30.32 -    u32 reg;
   30.33 -    u32 value;
   30.34 +    uint32_t reg;
   30.35 +    uint32_t value;
   30.36  } pdb_op_wr_reg_t, *pdb_op_wr_reg_p;
   30.37  
   30.38  #define PDB_OPCODE_RD_MEM 7
   30.39  typedef struct pdb_op_rd_mem_req
   30.40  {
   30.41 -    u32 address;
   30.42 -    u32 length;
   30.43 +    uint32_t address;
   30.44 +    uint32_t length;
   30.45  } pdb_op_rd_mem_req_t, *pdb_op_rd_mem_req_p;
   30.46  
   30.47  typedef struct pdb_op_rd_mem_resp
   30.48  {
   30.49 -    u32 address;
   30.50 -    u32 length;
   30.51 -    u8  data[1024];
   30.52 +    uint32_t address;
   30.53 +    uint32_t length;
   30.54 +    uint8_t  data[1024];
   30.55  } pdb_op_rd_mem_resp_t, *pdb_op_rd_mem_resp_p;
   30.56  
   30.57  #define PDB_OPCODE_WR_MEM 8
   30.58  typedef struct pdb_op_wr_mem
   30.59  {
   30.60 -    u32 address;
   30.61 -    u32 length;
   30.62 -    u8  data[1024];                                             /* arbitrary */
   30.63 +    uint32_t address;
   30.64 +    uint32_t length;
   30.65 +    uint8_t  data[1024];                                             /* arbitrary */
   30.66  } pdb_op_wr_mem_t, *pdb_op_wr_mem_p;
   30.67  
   30.68  #define PDB_OPCODE_CONTINUE 9
   30.69 @@ -63,8 +63,8 @@ typedef struct pdb_op_wr_mem
   30.70  #define PDB_OPCODE_CLR_BKPT 12
   30.71  typedef struct pdb_op_bkpt
   30.72  {
   30.73 -    u32 address;
   30.74 -    u32 length;
   30.75 +    uint32_t address;
   30.76 +    uint32_t length;
   30.77  } pdb_op_bkpt_t, *pdb_op_bkpt_p;
   30.78  
   30.79  #define PDB_OPCODE_SET_WATCHPT 13
   30.80 @@ -79,16 +79,16 @@ typedef struct pdb_op_watchpt
   30.81  #define BWC_WATCH_WRITE  102
   30.82  #define BWC_WATCH_READ   103
   30.83  #define BWC_WATCH_ACCESS 104
   30.84 -    u32 type;
   30.85 -    u32 address;
   30.86 -    u32 length;
   30.87 +    uint32_t type;
   30.88 +    uint32_t address;
   30.89 +    uint32_t length;
   30.90  } pdb_op_watchpt_t, *pdb_op_watchpt_p;
   30.91  
   30.92  
   30.93  typedef struct 
   30.94  {
   30.95 -    u8   operation;       /* PDB_OPCODE_???      */
   30.96 -    u32  process;
   30.97 +    uint8_t   operation;       /* PDB_OPCODE_???      */
   30.98 +    uint32_t  process;
   30.99      union
  30.100      {
  30.101          pdb_op_attach_t     attach;
  30.102 @@ -107,10 +107,10 @@ typedef struct
  30.103  #define PDB_RESPONSE_ERROR -1
  30.104  
  30.105  typedef struct {
  30.106 -    u8   operation;       /* copied from request */
  30.107 -    u32  domain;          
  30.108 -    u32  process;
  30.109 -    s16  status;          /* PDB_RESPONSE_???    */
  30.110 +    uint8_t  operation;       /* copied from request */
  30.111 +    uint32_t domain;          
  30.112 +    uint32_t process;
  30.113 +    int16_t  status;          /* PDB_RESPONSE_???    */
  30.114      union
  30.115      {
  30.116          pdb_op_rd_reg_t      rd_reg;
    31.1 --- a/tools/debugger/pdb/pdb_caml_domain.c	Wed Oct 12 10:11:35 2005 +0100
    31.2 +++ b/tools/debugger/pdb/pdb_caml_domain.c	Wed Oct 12 11:07:37 2005 +0100
    31.3 @@ -204,7 +204,7 @@ dom_read_memory (value context, value ad
    31.4      int loop;
    31.5      char *buffer;
    31.6      unsigned long my_address = Int32_val(address);
    31.7 -    u32 my_length = Int_val(length);
    31.8 +    uint32_t my_length = Int_val(length);
    31.9  
   31.10      printf ("(pdb) read memory\n");
   31.11  
   31.12 @@ -260,7 +260,7 @@ dom_write_memory (value context, value a
   31.13  
   31.14      char buffer[4096];  /* a big buffer */
   31.15      unsigned long  my_address;
   31.16 -    u32 length = 0;
   31.17 +    uint32_t length = 0;
   31.18  
   31.19      printf ("(pdb) write memory\n");
   31.20  
    32.1 --- a/tools/debugger/pdb/pdb_caml_evtchn.c	Wed Oct 12 10:11:35 2005 +0100
    32.2 +++ b/tools/debugger/pdb/pdb_caml_evtchn.c	Wed Oct 12 11:07:37 2005 +0100
    32.3 @@ -125,7 +125,7 @@ evtchn_read (value fd)
    32.4  {
    32.5      CAMLparam1(fd);
    32.6  
    32.7 -    u16 v;
    32.8 +    uint16_t v;
    32.9      int bytes;
   32.10      int rc = -1;
   32.11      int myfd = Int_val(fd);
   32.12 @@ -168,7 +168,7 @@ evtchn_unmask (value fd, value idx)
   32.13      CAMLparam1(fd);
   32.14  
   32.15      int myfd = Int_val(fd);
   32.16 -    u16 myidx = Int_val(idx);
   32.17 +    uint16_t myidx = Int_val(idx);
   32.18  
   32.19      (void)write(myfd, &myidx, sizeof(myidx));
   32.20  
    33.1 --- a/tools/debugger/pdb/pdb_caml_process.c	Wed Oct 12 10:11:35 2005 +0100
    33.2 +++ b/tools/debugger/pdb/pdb_caml_process.c	Wed Oct 12 11:07:37 2005 +0100
    33.3 @@ -404,7 +404,7 @@ proc_write_memory (value context, value 
    33.4  
    33.5      context_t ctx;
    33.6      pdb_request_t req;
    33.7 -    u32 length = 0;
    33.8 +    uint32_t length = 0;
    33.9  
   33.10      decode_context(&ctx, context);
   33.11  
    34.1 --- a/tools/debugger/pdb/pdb_caml_xc.c	Wed Oct 12 10:11:35 2005 +0100
    34.2 +++ b/tools/debugger/pdb/pdb_caml_xc.c	Wed Oct 12 11:07:37 2005 +0100
    34.3 @@ -151,7 +151,7 @@ evtchn_bind_interdomain (value remote_do
    34.4  }
    34.5  
    34.6  void *
    34.7 -map_ring(u32 dom, unsigned long mfn )
    34.8 +map_ring(uint32_t dom, unsigned long mfn )
    34.9  {
   34.10      return xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
   34.11                                  PROT_READ | PROT_WRITE, mfn);
    35.1 --- a/tools/debugger/pdb/pdb_caml_xcs.c	Wed Oct 12 10:11:35 2005 +0100
    35.2 +++ b/tools/debugger/pdb/pdb_caml_xcs.c	Wed Oct 12 11:07:37 2005 +0100
    35.3 @@ -36,7 +36,7 @@ static int control_fd = -1;
    35.4  #include "pdb_module.h"
    35.5  #include "pdb_caml_xen.h"
    35.6  
    35.7 -void *map_ring(u32 dom, unsigned long mfn );
    35.8 +void *map_ring(uint32_t dom, unsigned long mfn );
    35.9  
   35.10  /*
   35.11   * xcs_initialize_ring : int -> int32 -> int32
   35.12 @@ -180,7 +180,7 @@ xcs_connect (value path, value msg_type)
   35.13      char *my_path = String_val(path);
   35.14      int my_msg_type = Int_val(msg_type);
   35.15      struct sockaddr_un addr;
   35.16 -    u32 session_id = 0;
   35.17 +    uint32_t session_id = 0;
   35.18      int data_fd;
   35.19      int ret, len;
   35.20      xcs_msg_t msg;
    36.1 --- a/tools/firmware/acpi/acpi2_0.h	Wed Oct 12 10:11:35 2005 +0100
    36.2 +++ b/tools/firmware/acpi/acpi2_0.h	Wed Oct 12 11:07:37 2005 +0100
    36.3 @@ -18,7 +18,21 @@
    36.4  #ifndef _ACPI_2_0_H_
    36.5  #define _ACPI_2_0_H_
    36.6  
    36.7 -#include "xenctrl.h"  // for u8, u16, u32, u64 definition
    36.8 +typedef unsigned char  uint8_t;
    36.9 +typedef   signed char  int8_t;
   36.10 +typedef unsigned short uint16_t;
   36.11 +typedef   signed short int16_t;
   36.12 +typedef unsigned int   uint32_t;
   36.13 +typedef   signed int   int32_t;
   36.14 +#ifdef __i386__
   36.15 +typedef unsigned long long uint64_t;
   36.16 +typedef   signed long long int64_t;
   36.17 +#else
   36.18 +typedef unsigned long uint64_t;
   36.19 +typedef   signed long int64_t;
   36.20 +#endif
   36.21 +
   36.22 +#include <xen/xen.h>
   36.23  
   36.24  #pragma pack (1)
   36.25  
   36.26 @@ -27,15 +41,15 @@
   36.27  //
   36.28  
   36.29  typedef struct {
   36.30 -		u32			Signature;
   36.31 -		u32     	Length;
   36.32 -		u8			Revision;
   36.33 -		u8			Checksum;
   36.34 -		u8			OemId[6];
   36.35 -		u64			OemTableId;
   36.36 -		u32			OemRevision;
   36.37 -		u32			CreatorId;
   36.38 -		u32			CreatorRevision;
   36.39 +		uint32_t			Signature;
   36.40 +		uint32_t     	Length;
   36.41 +		uint8_t			Revision;
   36.42 +		uint8_t			Checksum;
   36.43 +		uint8_t			OemId[6];
   36.44 +		uint64_t			OemTableId;
   36.45 +		uint32_t			OemRevision;
   36.46 +		uint32_t			CreatorId;
   36.47 +		uint32_t			CreatorRevision;
   36.48  } ACPI_TABLE_HEADER;
   36.49  
   36.50  
   36.51 @@ -49,11 +63,11 @@ typedef struct {
   36.52  // ACPI 2.0 Generic Address Space definition
   36.53  //
   36.54  typedef struct {
   36.55 -		u8                            AddressSpaceId;
   36.56 -		u8                            RegisterBitWidth;
   36.57 -		u8                            RegisterBitOffset;
   36.58 -		u8                            Reserved;
   36.59 -		u64                           Address;
   36.60 +		uint8_t                            AddressSpaceId;
   36.61 +		uint8_t                            RegisterBitWidth;
   36.62 +		uint8_t                            RegisterBitOffset;
   36.63 +		uint8_t                            Reserved;
   36.64 +		uint64_t                           Address;
   36.65  } ACPI_GENERIC_ADDRESS_STRUCTURE;
   36.66  
   36.67  //
   36.68 @@ -70,11 +84,11 @@ typedef struct {
   36.69  // Root System Description Pointer Structure in ACPI 1.0
   36.70  //
   36.71  typedef struct {
   36.72 -		u64                           Signature;
   36.73 -		u8                            Checksum;
   36.74 -		u8                            OemId[6];
   36.75 -		u8                            Reserved;
   36.76 -		u32                           RsdtAddress;
   36.77 +		uint64_t                           Signature;
   36.78 +		uint8_t                            Checksum;
   36.79 +		uint8_t                            OemId[6];
   36.80 +		uint8_t                            Reserved;
   36.81 +		uint32_t                           RsdtAddress;
   36.82  } ACPI_1_0_RSDP;
   36.83  
   36.84  
   36.85 @@ -82,15 +96,15 @@ typedef struct {
   36.86  // Root System Description Pointer Structure
   36.87  //
   36.88  typedef struct {
   36.89 -		u64                           Signature;
   36.90 -		u8                            Checksum;
   36.91 -		u8                            OemId[6];
   36.92 -		u8                            Revision;
   36.93 -		u32                           RsdtAddress;
   36.94 -		u32                           Length;
   36.95 -		u64                           XsdtAddress;
   36.96 -		u8                            ExtendedChecksum;
   36.97 -		u8                            Reserved[3];
   36.98 +		uint64_t                           Signature;
   36.99 +		uint8_t                            Checksum;
  36.100 +		uint8_t                            OemId[6];
  36.101 +		uint8_t                            Revision;
  36.102 +		uint32_t                           RsdtAddress;
  36.103 +		uint32_t                           Length;
  36.104 +		uint64_t                           XsdtAddress;
  36.105 +		uint8_t                            ExtendedChecksum;
  36.106 +		uint8_t                            Reserved[3];
  36.107  } ACPI_2_0_RSDP;
  36.108  
  36.109  
  36.110 @@ -105,7 +119,7 @@ typedef struct {
  36.111  
  36.112  typedef struct {
  36.113  		ACPI_TABLE_HEADER Header;
  36.114 -		u32 Entry[ACPI_MAX_NUM_TABLES];
  36.115 +		uint32_t Entry[ACPI_MAX_NUM_TABLES];
  36.116  }ACPI_2_0_RSDT;
  36.117  
  36.118  //
  36.119 @@ -120,7 +134,7 @@ typedef struct {
  36.120  
  36.121  typedef struct _ACPI_2_0_XSDT{
  36.122  		ACPI_TABLE_HEADER Header;
  36.123 -		u64 Entry[ACPI_MAX_NUM_TABLES];
  36.124 +		uint64_t Entry[ACPI_MAX_NUM_TABLES];
  36.125  }ACPI_2_0_XSDT;
  36.126  #define ACPI_2_0_XSDT_REVISION 0x01
  36.127  
  36.128 @@ -130,49 +144,49 @@ typedef struct _ACPI_2_0_XSDT{
  36.129  
  36.130  typedef struct  {
  36.131  		ACPI_TABLE_HEADER               Header;
  36.132 -		u32                                    FirmwareCtrl;
  36.133 -		u32                                    Dsdt;
  36.134 -		u8                                     Reserved0;
  36.135 -		u8                                     PreferredPmProfile;
  36.136 -		u16                                    SciInt;
  36.137 -		u32                                    SmiCmd;
  36.138 -		u8                                     AcpiEnable;
  36.139 -		u8                                     AcpiDisable;
  36.140 -		u8                                     S4BiosReq;
  36.141 -		u8                                     PstateCnt;
  36.142 -		u32                                    Pm1aEvtBlk;
  36.143 -		u32                                    Pm1bEvtBlk;
  36.144 -		u32                                    Pm1aCntBlk;
  36.145 -		u32                                    Pm1bCntBlk;
  36.146 -		u32                                    Pm2CntBlk;
  36.147 -		u32                                    PmTmrBlk;
  36.148 -		u32                                    Gpe0Blk;
  36.149 -		u32                                    Gpe1Blk;
  36.150 -		u8                                     Pm1EvtLen;
  36.151 -		u8                                     Pm1CntLen;
  36.152 -		u8                                     Pm2CntLen;
  36.153 -		u8                                     PmTmrLen;
  36.154 -		u8                                     Gpe0BlkLen;
  36.155 -		u8                                     Gpe1BlkLen;
  36.156 -		u8                                     Gpe1Base;
  36.157 -		u8                                     CstCnt;
  36.158 -		u16                                    PLvl2Lat;
  36.159 -		u16                                    PLvl3Lat;
  36.160 -		u16                                    FlushSize;
  36.161 -		u16                                    FlushStride;
  36.162 -		u8                                     DutyOffset;
  36.163 -		u8                                     DutyWidth;
  36.164 -		u8                                     DayAlrm;
  36.165 -		u8                                     MonAlrm;
  36.166 -		u8                                     Century;
  36.167 -		u16                                    IaPcBootArch;
  36.168 -		u8                                     Reserved1;
  36.169 -		u32                                    Flags;
  36.170 +		uint32_t                                    FirmwareCtrl;
  36.171 +		uint32_t                                    Dsdt;
  36.172 +		uint8_t                                     Reserved0;
  36.173 +		uint8_t                                     PreferredPmProfile;
  36.174 +		uint16_t                                    SciInt;
  36.175 +		uint32_t                                    SmiCmd;
  36.176 +		uint8_t                                     AcpiEnable;
  36.177 +		uint8_t                                     AcpiDisable;
  36.178 +		uint8_t                                     S4BiosReq;
  36.179 +		uint8_t                                     PstateCnt;
  36.180 +		uint32_t                                    Pm1aEvtBlk;
  36.181 +		uint32_t                                    Pm1bEvtBlk;
  36.182 +		uint32_t                                    Pm1aCntBlk;
  36.183 +		uint32_t                                    Pm1bCntBlk;
  36.184 +		uint32_t                                    Pm2CntBlk;
  36.185 +		uint32_t                                    PmTmrBlk;
  36.186 +		uint32_t                                    Gpe0Blk;
  36.187 +		uint32_t                                    Gpe1Blk;
  36.188 +		uint8_t                                     Pm1EvtLen;
  36.189 +		uint8_t                                     Pm1CntLen;
  36.190 +		uint8_t                                     Pm2CntLen;
  36.191 +		uint8_t                                     PmTmrLen;
  36.192 +		uint8_t                                     Gpe0BlkLen;
  36.193 +		uint8_t                                     Gpe1BlkLen;
  36.194 +		uint8_t                                     Gpe1Base;
  36.195 +		uint8_t                                     CstCnt;
  36.196 +		uint16_t                                    PLvl2Lat;
  36.197 +		uint16_t                                    PLvl3Lat;
  36.198 +		uint16_t                                    FlushSize;
  36.199 +		uint16_t                                    FlushStride;
  36.200 +		uint8_t                                     DutyOffset;
  36.201 +		uint8_t                                     DutyWidth;
  36.202 +		uint8_t                                     DayAlrm;
  36.203 +		uint8_t                                     MonAlrm;
  36.204 +		uint8_t                                     Century;
  36.205 +		uint16_t                                    IaPcBootArch;
  36.206 +		uint8_t                                     Reserved1;
  36.207 +		uint32_t                                    Flags;
  36.208  		ACPI_GENERIC_ADDRESS_STRUCTURE    ResetReg;
  36.209 -		u8                                     ResetValue;
  36.210 -		u8                                     Reserved2[3];
  36.211 -		u64                                    XFirmwareCtrl;
  36.212 -		u64                                    XDsdt;
  36.213 +		uint8_t                                     ResetValue;
  36.214 +		uint8_t                                     Reserved2[3];
  36.215 +		uint64_t                                    XFirmwareCtrl;
  36.216 +		uint64_t                                    XDsdt;
  36.217  		ACPI_GENERIC_ADDRESS_STRUCTURE    XPm1aEvtBlk;
  36.218  		ACPI_GENERIC_ADDRESS_STRUCTURE    XPm1bEvtBlk;
  36.219  		ACPI_GENERIC_ADDRESS_STRUCTURE    XPm1aCntBlk;
  36.220 @@ -212,15 +226,15 @@ typedef struct  {
  36.221  // Firmware ACPI Control Structure (FACS)
  36.222  //
  36.223  typedef struct {
  36.224 -		u32                               Signature;
  36.225 -		u32                               Length;
  36.226 -		u32                               HardwareSignature;
  36.227 -		u32                               FirmwareWakingVector;
  36.228 -		u32                               GlobalLock;
  36.229 -		u32                               Flags;
  36.230 -		u64                               XFirmwareWakingVector;
  36.231 -		u8                                Version;
  36.232 -		u8                                Reserved[31];
  36.233 +		uint32_t                               Signature;
  36.234 +		uint32_t                               Length;
  36.235 +		uint32_t                               HardwareSignature;
  36.236 +		uint32_t                               FirmwareWakingVector;
  36.237 +		uint32_t                               GlobalLock;
  36.238 +		uint32_t                               Flags;
  36.239 +		uint64_t                               XFirmwareWakingVector;
  36.240 +		uint8_t                                Version;
  36.241 +		uint8_t                                Reserved[31];
  36.242  } ACPI_2_0_FACS;
  36.243  
  36.244  #define ACPI_2_0_FACS_VERSION 0x01
  36.245 @@ -230,8 +244,8 @@ typedef struct {
  36.246  //
  36.247  typedef struct {
  36.248  		ACPI_TABLE_HEADER                       Header;
  36.249 -		u32                                     LocalApicAddress;
  36.250 -		u32                                     Flags;
  36.251 +		uint32_t                                     LocalApicAddress;
  36.252 +		uint32_t                                     Flags;
  36.253  } ACPI_2_0_MADT;
  36.254  
  36.255  #define ACPI_2_0_MADT_REVISION 0x01
  36.256 @@ -263,11 +277,11 @@ typedef struct {
  36.257  //
  36.258  
  36.259  typedef struct {
  36.260 -		u8                                             Type;
  36.261 -		u8                                             Length;
  36.262 -		u8                                             AcpiProcessorId;
  36.263 -		u8                                             ApicId;
  36.264 -		u32                                            Flags;
  36.265 +		uint8_t                                             Type;
  36.266 +		uint8_t                                             Length;
  36.267 +		uint8_t                                             AcpiProcessorId;
  36.268 +		uint8_t                                             ApicId;
  36.269 +		uint32_t                                            Flags;
  36.270  } ACPI_LOCAL_APIC_STRUCTURE;
  36.271  
  36.272  //
  36.273 @@ -281,12 +295,12 @@ typedef struct {
  36.274  //
  36.275  
  36.276  typedef struct {
  36.277 -		u8                                             Type;
  36.278 -		u8                                             Length;
  36.279 -		u8                                             IoApicId;
  36.280 -		u8                                             Reserved;
  36.281 -		u32                                            IoApicAddress;
  36.282 -		u32                                            GlobalSystemInterruptBase;
  36.283 +		uint8_t                                             Type;
  36.284 +		uint8_t                                             Length;
  36.285 +		uint8_t                                             IoApicId;
  36.286 +		uint8_t                                             Reserved;
  36.287 +		uint32_t                                            IoApicAddress;
  36.288 +		uint32_t                                            GlobalSystemInterruptBase;
  36.289  } ACPI_IO_APIC_STRUCTURE;
  36.290  
  36.291  // Tabel Signature
  36.292 @@ -312,6 +326,6 @@ typedef struct {
  36.293  #define ACPI_TABLE_SIZE (2*1024)  //Currently 2K is enough
  36.294  
  36.295  void
  36.296 -AcpiBuildTable(u8* buf);
  36.297 +AcpiBuildTable(uint8_t* buf);
  36.298  
  36.299  #endif
    37.1 --- a/tools/firmware/acpi/acpi_build.c	Wed Oct 12 10:11:35 2005 +0100
    37.2 +++ b/tools/firmware/acpi/acpi_build.c	Wed Oct 12 11:07:37 2005 +0100
    37.3 @@ -37,21 +37,21 @@ typedef struct _ACPI_TABLE_ALL{
    37.4  		ACPI_MULTIPLE_APIC_DESCRIPTION_TABLE *Madt;
    37.5  		ACPI_2_0_FACS *Facs;
    37.6  		unsigned char* Dsdt;
    37.7 -		u32 RsdpOffset;
    37.8 -		u32 RsdtOffset;
    37.9 -		u32 XsdtOffset;
   37.10 -		u32 FadtOffset;
   37.11 -		u32 MadtOffset;
   37.12 -		u32 FacsOffset;
   37.13 -		u32 DsdtOffset;
   37.14 +		uint32_t RsdpOffset;
   37.15 +		uint32_t RsdtOffset;
   37.16 +		uint32_t XsdtOffset;
   37.17 +		uint32_t FadtOffset;
   37.18 +		uint32_t MadtOffset;
   37.19 +		uint32_t FacsOffset;
   37.20 +		uint32_t DsdtOffset;
   37.21  }ACPI_TABLE_ALL;
   37.22  
   37.23  static 
   37.24  void
   37.25  MemCopy(void* src, void* dst, int len){
   37.26  
   37.27 -	u8* src0=src;
   37.28 -   	u8* dst0=dst;	
   37.29 +	uint8_t* src0=src;
   37.30 +   	uint8_t* dst0=dst;	
   37.31  
   37.32  	while(len--){
   37.33  		*(dst0++)=*(src0++);
   37.34 @@ -62,8 +62,8 @@ static
   37.35  void
   37.36  SetCheckSum(
   37.37    void*  Table, 
   37.38 -  u32 ChecksumOffset,
   37.39 -  u32 Length
   37.40 +  uint32_t ChecksumOffset,
   37.41 +  uint32_t Length
   37.42  )
   37.43  /*
   37.44   * Routine Description:
   37.45 @@ -76,23 +76,23 @@ SetCheckSum(
   37.46   * 	Length:         Length of Table
   37.47   */
   37.48  {
   37.49 -	u8 Sum = 0;  
   37.50 -	u8 *Ptr;
   37.51 +	uint8_t Sum = 0;  
   37.52 +	uint8_t *Ptr;
   37.53  
   37.54  	Ptr=Table;
   37.55  	Ptr[ChecksumOffset]=0;
   37.56  	while (Length--) {    
   37.57 -		Sum = (u8)(Sum + (*Ptr++));
   37.58 +		Sum = (uint8_t)(Sum + (*Ptr++));
   37.59  	}
   37.60  	
   37.61  	Ptr = Table;
   37.62 -	Ptr[ChecksumOffset] = (u8) (0xff - Sum + 1);
   37.63 +	Ptr[ChecksumOffset] = (uint8_t) (0xff - Sum + 1);
   37.64  }
   37.65  
   37.66  //
   37.67  //  FIELD_OFFSET - returns the byte offset to a field within a structure
   37.68  //
   37.69 -#define FIELD_OFFSET(TYPE,Field) ((u32)(&(((TYPE *) 0)->Field)))
   37.70 +#define FIELD_OFFSET(TYPE,Field) ((uint32_t)(&(((TYPE *) 0)->Field)))
   37.71  
   37.72  static
   37.73  void
   37.74 @@ -106,9 +106,9 @@ UpdateTable(
   37.75   */
   37.76  {    
   37.77  	// RSDP Update	
   37.78 -	table->Rsdp->RsdtAddress = (u32)(ACPI_PHYSICAL_ADDRESS+
   37.79 +	table->Rsdp->RsdtAddress = (uint32_t)(ACPI_PHYSICAL_ADDRESS+
   37.80  					table->RsdtOffset);
   37.81 -	table->Rsdp->XsdtAddress = (u64)(ACPI_PHYSICAL_ADDRESS+
   37.82 +	table->Rsdp->XsdtAddress = (uint64_t)(ACPI_PHYSICAL_ADDRESS+
   37.83  					table->XsdtOffset);
   37.84  	SetCheckSum(table->Rsdp,
   37.85  					FIELD_OFFSET(ACPI_1_0_RSDP, Checksum),
   37.86 @@ -122,37 +122,37 @@ UpdateTable(
   37.87  
   37.88  	
   37.89  	//RSDT Update
   37.90 -	table->Rsdt->Entry[0] = (u32)(ACPI_PHYSICAL_ADDRESS + 
   37.91 +	table->Rsdt->Entry[0] = (uint32_t)(ACPI_PHYSICAL_ADDRESS + 
   37.92  					table->FadtOffset);	
   37.93 -	table->Rsdt->Entry[1] = (u32)(ACPI_PHYSICAL_ADDRESS + 
   37.94 +	table->Rsdt->Entry[1] = (uint32_t)(ACPI_PHYSICAL_ADDRESS + 
   37.95  					table->MadtOffset);
   37.96  	table->Rsdt->Header.Length = sizeof (ACPI_TABLE_HEADER) +
   37.97 -		   			2*sizeof(u32);
   37.98 +		   			2*sizeof(uint32_t);
   37.99  	SetCheckSum(table->Rsdt,
  37.100  					FIELD_OFFSET(ACPI_TABLE_HEADER, Checksum),
  37.101  					table->Rsdt->Header.Length
  37.102  			   );	
  37.103  	
  37.104  	//XSDT	Update
  37.105 -	table->Xsdt->Entry[0] = (u64)(ACPI_PHYSICAL_ADDRESS +
  37.106 +	table->Xsdt->Entry[0] = (uint64_t)(ACPI_PHYSICAL_ADDRESS +
  37.107  					table->FadtOffset);
  37.108 -	table->Xsdt->Entry[1] = (u64)(ACPI_PHYSICAL_ADDRESS + 
  37.109 +	table->Xsdt->Entry[1] = (uint64_t)(ACPI_PHYSICAL_ADDRESS + 
  37.110  					table->MadtOffset);	
  37.111  	table->Xsdt->Header.Length = sizeof (ACPI_TABLE_HEADER) + 
  37.112 -					2*sizeof(u64);
  37.113 +					2*sizeof(uint64_t);
  37.114  	SetCheckSum(table->Xsdt,
  37.115  					FIELD_OFFSET(ACPI_TABLE_HEADER, Checksum),
  37.116  					table->Xsdt->Header.Length
  37.117  			   );
  37.118  
  37.119  	// FADT Update
  37.120 -	table->Fadt->Dsdt = (u32)(ACPI_PHYSICAL_ADDRESS + 
  37.121 +	table->Fadt->Dsdt = (uint32_t)(ACPI_PHYSICAL_ADDRESS + 
  37.122  					table->DsdtOffset);	
  37.123 -	table->Fadt->XDsdt = (u64)(ACPI_PHYSICAL_ADDRESS + 
  37.124 +	table->Fadt->XDsdt = (uint64_t)(ACPI_PHYSICAL_ADDRESS + 
  37.125  				   table->DsdtOffset);
  37.126 -	table->Fadt->FirmwareCtrl = (u32)(ACPI_PHYSICAL_ADDRESS +
  37.127 +	table->Fadt->FirmwareCtrl = (uint32_t)(ACPI_PHYSICAL_ADDRESS +
  37.128  					table->FacsOffset);
  37.129 -	table->Fadt->XFirmwareCtrl = (u64)(ACPI_PHYSICAL_ADDRESS + 
  37.130 +	table->Fadt->XFirmwareCtrl = (uint64_t)(ACPI_PHYSICAL_ADDRESS + 
  37.131  					table->FacsOffset);	
  37.132  	SetCheckSum(table->Fadt,
  37.133  					FIELD_OFFSET(ACPI_TABLE_HEADER, Checksum),
  37.134 @@ -167,7 +167,7 @@ UpdateTable(
  37.135  }
  37.136  
  37.137  void
  37.138 -AcpiBuildTable(u8* buf)
  37.139 +AcpiBuildTable(uint8_t* buf)
  37.140  /*
  37.141   * Copy all the ACPI table to buffer
  37.142   * Buffer Layout:
    38.1 --- a/tools/firmware/vmxassist/vm86.c	Wed Oct 12 10:11:35 2005 +0100
    38.2 +++ b/tools/firmware/vmxassist/vm86.c	Wed Oct 12 11:07:37 2005 +0100
    38.3 @@ -465,7 +465,7 @@ movcr(struct regs *regs, unsigned prefix
    38.4   * Emulate a segment load in protected mode
    38.5   */
    38.6  int
    38.7 -load_seg(unsigned long sel, u32 *base, u32 *limit, union vmcs_arbytes *arbytes)
    38.8 +load_seg(unsigned long sel, uint32_t *base, uint32_t *limit, union vmcs_arbytes *arbytes)
    38.9  {
   38.10  	unsigned long long entry;
   38.11  
    39.1 --- a/tools/firmware/vmxassist/vm86.h	Wed Oct 12 10:11:35 2005 +0100
    39.2 +++ b/tools/firmware/vmxassist/vm86.h	Wed Oct 12 11:07:37 2005 +0100
    39.3 @@ -22,15 +22,6 @@
    39.4  
    39.5  #ifndef __ASSEMBLY__
    39.6  #include <stdint.h>
    39.7 -
    39.8 -typedef uint8_t            u8;
    39.9 -typedef uint16_t           u16;
   39.10 -typedef uint32_t           u32;
   39.11 -typedef uint64_t           u64;
   39.12 -typedef int8_t             s8;
   39.13 -typedef int16_t            s16;
   39.14 -typedef int32_t            s32;
   39.15 -typedef int64_t            s64;
   39.16  #endif
   39.17  
   39.18  #include <xen/vmx_assist.h>
    40.1 --- a/tools/ioemu/hw/ioapic.c	Wed Oct 12 10:11:35 2005 +0100
    40.2 +++ b/tools/ioemu/hw/ioapic.c	Wed Oct 12 11:07:37 2005 +0100
    40.3 @@ -493,7 +493,7 @@ ioapic_deliver(IOAPICState *s, int irqno
    40.4      }
    40.5  }
    40.6  
    40.7 -static inline int __fls(u32 word)
    40.8 +static inline int __fls(uint32_t word)
    40.9  {
   40.10      int bit;
   40.11      __asm__("bsrl %1,%0"
   40.12 @@ -581,7 +581,7 @@ ioapic_legacy_irq(int irq, int level)
   40.13      ioapic_set_irq(ioapic, irq, level);
   40.14  }
   40.15  
   40.16 -static inline int find_highest_bit(u32 *data, int length){
   40.17 +static inline int find_highest_bit(uint32_t *data, int length){
   40.18          while(length && !data[--length]);
   40.19              return __fls(data[length]) +  32 * length;
   40.20  }
    41.1 --- a/tools/ioemu/target-i386-dm/helper2.c	Wed Oct 12 10:11:35 2005 +0100
    41.2 +++ b/tools/ioemu/target-i386-dm/helper2.c	Wed Oct 12 11:07:37 2005 +0100
    41.3 @@ -122,7 +122,7 @@ target_ulong cpu_get_phys_page_debug(CPU
    41.4  //the evtchn fd for polling
    41.5  int evtchn_fd = -1;
    41.6  //the evtchn port for polling the notification, should be inputed as bochs's parameter
    41.7 -u16 ioreq_remote_port, ioreq_local_port;
    41.8 +uint16_t ioreq_remote_port, ioreq_local_port;
    41.9  
   41.10  //some functions to handle the io req packet
   41.11  void
   41.12 @@ -157,9 +157,9 @@ ioreq_t* __cpu_get_ioreq(void)
   41.13  ioreq_t* cpu_get_ioreq(void)
   41.14  {
   41.15  	int rc;
   41.16 -	u16 buf[2];
   41.17 -	rc = read(evtchn_fd, buf, 2);
   41.18 -	if (rc == 2 && buf[0] == ioreq_local_port){//got only one matched 16bit port index
   41.19 +	uint16_t port;
   41.20 +	rc = read(evtchn_fd, &port, sizeof(port));
   41.21 +	if ((rc == sizeof(port)) && (port == ioreq_local_port)) {
   41.22  		// unmask the wanted port again
   41.23  		write(evtchn_fd, &ioreq_local_port, 2);
   41.24  
   41.25 @@ -208,13 +208,13 @@ extern void cpu_physical_memory_rw(targe
   41.26                                     int len, int is_write);
   41.27  
   41.28  static inline void
   41.29 -read_physical(u64 addr, unsigned long size, void *val)
   41.30 +read_physical(uint64_t addr, unsigned long size, void *val)
   41.31  {
   41.32          return cpu_physical_memory_rw((target_phys_addr_t)addr, val, size, 0);
   41.33  }
   41.34  
   41.35  static inline void
   41.36 -write_physical(u64 addr, unsigned long size, void *val)
   41.37 +write_physical(uint64_t addr, unsigned long size, void *val)
   41.38  {
   41.39          return cpu_physical_memory_rw((target_phys_addr_t)addr, val, size, 1);
   41.40  }
    42.1 --- a/tools/ioemu/vl.c	Wed Oct 12 10:11:35 2005 +0100
    42.2 +++ b/tools/ioemu/vl.c	Wed Oct 12 11:07:37 2005 +0100
    42.3 @@ -2382,7 +2382,7 @@ get_vl2_table(unsigned long count, unsig
    42.4  }
    42.5  
    42.6  int
    42.7 -setup_mapping(int xc_handle, u32 dom, unsigned long toptab, unsigned long  *mem_page_array, unsigned long *page_table_array, unsigned long v_start, unsigned long v_end)
    42.8 +setup_mapping(int xc_handle, uint32_t dom, unsigned long toptab, unsigned long  *mem_page_array, unsigned long *page_table_array, unsigned long v_start, unsigned long v_end)
    42.9  {
   42.10      l1_pgentry_t *vl1tab=NULL, *vl1e=NULL;
   42.11      l2_pgentry_t *vl2tab[4] = {NULL, NULL, NULL, NULL};
   42.12 @@ -2449,7 +2449,7 @@ error_out:
   42.13  }
   42.14  
   42.15  void
   42.16 -unsetup_mapping(int xc_handle, u32 dom, unsigned long toptab, unsigned long v_start, unsigned long v_end)
   42.17 +unsetup_mapping(int xc_handle, uint32_t dom, unsigned long toptab, unsigned long v_start, unsigned long v_end)
   42.18  {
   42.19      l1_pgentry_t *vl1tab=NULL, *vl1e=NULL;
   42.20      l2_pgentry_t *vl2tab[4], *vl2e=NULL, *vl2_table = NULL;
   42.21 @@ -2806,7 +2806,7 @@ int main(int argc, char **argv)
   42.22  
   42.23              case QEMU_OPTION_p:
   42.24                  {
   42.25 -                  extern u16 ioreq_remote_port;
   42.26 +                  extern uint16_t ioreq_remote_port;
   42.27                    ioreq_remote_port = atoi(optarg);
   42.28                    printf("port: %d\n", ioreq_remote_port);
   42.29                  }
    43.1 --- a/tools/libxc/xc_bvtsched.c	Wed Oct 12 10:11:35 2005 +0100
    43.2 +++ b/tools/libxc/xc_bvtsched.c	Wed Oct 12 11:07:37 2005 +0100
    43.3 @@ -39,10 +39,10 @@ int xc_bvtsched_global_get(int xc_handle
    43.4  }
    43.5  
    43.6  int xc_bvtsched_domain_set(int xc_handle,
    43.7 -                           u32 domid,
    43.8 -                           u32 mcuadv,
    43.9 +                           uint32_t domid,
   43.10 +                           uint32_t mcuadv,
   43.11                             int warpback,
   43.12 -                           s32 warpvalue,
   43.13 +                           int32_t warpvalue,
   43.14                             long long warpl,
   43.15                             long long warpu)
   43.16  {
   43.17 @@ -64,10 +64,10 @@ int xc_bvtsched_domain_set(int xc_handle
   43.18  
   43.19  
   43.20  int xc_bvtsched_domain_get(int xc_handle,
   43.21 -                           u32 domid,
   43.22 -                           u32 *mcuadv,
   43.23 +                           uint32_t domid,
   43.24 +                           uint32_t *mcuadv,
   43.25                             int *warpback,
   43.26 -                           s32 *warpvalue,
   43.27 +                           int32_t *warpvalue,
   43.28                             long long *warpl,
   43.29                             long long *warpu)
   43.30  {
    44.1 --- a/tools/libxc/xc_core.c	Wed Oct 12 10:11:35 2005 +0100
    44.2 +++ b/tools/libxc/xc_core.c	Wed Oct 12 11:07:37 2005 +0100
    44.3 @@ -11,7 +11,7 @@
    44.4  
    44.5  static int
    44.6  copy_from_domain_page(int xc_handle,
    44.7 -                      u32 domid,
    44.8 +                      uint32_t domid,
    44.9                        unsigned long *page_array,
   44.10                        unsigned long src_pfn,
   44.11                        void *dst_page)
   44.12 @@ -27,7 +27,7 @@ copy_from_domain_page(int xc_handle,
   44.13  
   44.14  int 
   44.15  xc_domain_dumpcore(int xc_handle,
   44.16 -                   u32 domid,
   44.17 +                   uint32_t domid,
   44.18                     const char *corename)
   44.19  {
   44.20      unsigned long nr_pages;
    45.1 --- a/tools/libxc/xc_domain.c	Wed Oct 12 10:11:35 2005 +0100
    45.2 +++ b/tools/libxc/xc_domain.c	Wed Oct 12 11:07:37 2005 +0100
    45.3 @@ -10,8 +10,8 @@
    45.4  #include <xen/memory.h>
    45.5  
    45.6  int xc_domain_create(int xc_handle,
    45.7 -                     u32 ssidref,
    45.8 -                     u32 *pdomid)
    45.9 +                     uint32_t ssidref,
   45.10 +                     uint32_t *pdomid)
   45.11  {
   45.12      int err;
   45.13      dom0_op_t op;
   45.14 @@ -22,13 +22,13 @@ int xc_domain_create(int xc_handle,
   45.15      if ( (err = do_dom0_op(xc_handle, &op)) != 0 )
   45.16          return err;
   45.17  
   45.18 -    *pdomid = (u16)op.u.createdomain.domain;
   45.19 +    *pdomid = (uint16_t)op.u.createdomain.domain;
   45.20      return 0;
   45.21  }    
   45.22  
   45.23  
   45.24  int xc_domain_pause(int xc_handle, 
   45.25 -                    u32 domid)
   45.26 +                    uint32_t domid)
   45.27  {
   45.28      dom0_op_t op;
   45.29      op.cmd = DOM0_PAUSEDOMAIN;
   45.30 @@ -38,7 +38,7 @@ int xc_domain_pause(int xc_handle,
   45.31  
   45.32  
   45.33  int xc_domain_unpause(int xc_handle,
   45.34 -                      u32 domid)
   45.35 +                      uint32_t domid)
   45.36  {
   45.37      dom0_op_t op;
   45.38      op.cmd = DOM0_UNPAUSEDOMAIN;
   45.39 @@ -48,7 +48,7 @@ int xc_domain_unpause(int xc_handle,
   45.40  
   45.41  
   45.42  int xc_domain_destroy(int xc_handle,
   45.43 -                      u32 domid)
   45.44 +                      uint32_t domid)
   45.45  {
   45.46      dom0_op_t op;
   45.47      op.cmd = DOM0_DESTROYDOMAIN;
   45.48 @@ -57,7 +57,7 @@ int xc_domain_destroy(int xc_handle,
   45.49  }
   45.50  
   45.51  int xc_domain_pincpu(int xc_handle,
   45.52 -                     u32 domid, 
   45.53 +                     uint32_t domid, 
   45.54                       int vcpu,
   45.55                       cpumap_t *cpumap)
   45.56  {
   45.57 @@ -71,12 +71,12 @@ int xc_domain_pincpu(int xc_handle,
   45.58  
   45.59  
   45.60  int xc_domain_getinfo(int xc_handle,
   45.61 -                      u32 first_domid,
   45.62 +                      uint32_t first_domid,
   45.63                        unsigned int max_doms,
   45.64                        xc_dominfo_t *info)
   45.65  {
   45.66      unsigned int nr_doms;
   45.67 -    u32 next_domid = first_domid;
   45.68 +    uint32_t next_domid = first_domid;
   45.69      dom0_op_t op;
   45.70      int rc = 0; 
   45.71  
   45.72 @@ -88,7 +88,7 @@ int xc_domain_getinfo(int xc_handle,
   45.73          op.u.getdomaininfo.domain = (domid_t)next_domid;
   45.74          if ( (rc = do_dom0_op(xc_handle, &op)) < 0 )
   45.75              break;
   45.76 -        info->domid      = (u16)op.u.getdomaininfo.domain;
   45.77 +        info->domid      = (uint16_t)op.u.getdomaininfo.domain;
   45.78  
   45.79          info->dying    = !!(op.u.getdomaininfo.flags & DOMFLAGS_DYING);
   45.80          info->shutdown = !!(op.u.getdomaininfo.flags & DOMFLAGS_SHUTDOWN);
   45.81 @@ -117,7 +117,7 @@ int xc_domain_getinfo(int xc_handle,
   45.82          memcpy(&info->cpumap, &op.u.getdomaininfo.cpumap, 
   45.83                 sizeof(info->cpumap));
   45.84  
   45.85 -        next_domid = (u16)op.u.getdomaininfo.domain + 1;
   45.86 +        next_domid = (uint16_t)op.u.getdomaininfo.domain + 1;
   45.87          info++;
   45.88      }
   45.89  
   45.90 @@ -127,7 +127,7 @@ int xc_domain_getinfo(int xc_handle,
   45.91  }
   45.92  
   45.93  int xc_domain_getinfolist(int xc_handle,
   45.94 -                          u32 first_domain,
   45.95 +                          uint32_t first_domain,
   45.96                            unsigned int max_domains,
   45.97                            xc_domaininfo_t *info)
   45.98  {
   45.99 @@ -154,8 +154,8 @@ int xc_domain_getinfolist(int xc_handle,
  45.100  }
  45.101  
  45.102  int xc_domain_get_vcpu_context(int xc_handle,
  45.103 -                               u32 domid,
  45.104 -                               u32 vcpu,
  45.105 +                               uint32_t domid,
  45.106 +                               uint32_t vcpu,
  45.107                                 vcpu_guest_context_t *ctxt)
  45.108  {
  45.109      int rc;
  45.110 @@ -163,7 +163,7 @@ int xc_domain_get_vcpu_context(int xc_ha
  45.111  
  45.112      op.cmd = DOM0_GETVCPUCONTEXT;
  45.113      op.u.getvcpucontext.domain = (domid_t)domid;
  45.114 -    op.u.getvcpucontext.vcpu   = (u16)vcpu;
  45.115 +    op.u.getvcpucontext.vcpu   = (uint16_t)vcpu;
  45.116      op.u.getvcpucontext.ctxt   = ctxt;
  45.117  
  45.118      if ( (ctxt != NULL) &&
  45.119 @@ -183,7 +183,7 @@ int xc_domain_get_vcpu_context(int xc_ha
  45.120  
  45.121  
  45.122  int xc_shadow_control(int xc_handle,
  45.123 -                      u32 domid, 
  45.124 +                      uint32_t domid, 
  45.125                        unsigned int sop,
  45.126                        unsigned long *dirty_bitmap,
  45.127                        unsigned long pages,
  45.128 @@ -207,7 +207,7 @@ int xc_shadow_control(int xc_handle,
  45.129  }
  45.130  
  45.131  int xc_domain_setcpuweight(int xc_handle,
  45.132 -                           u32 domid,
  45.133 +                           uint32_t domid,
  45.134                             float weight)
  45.135  {
  45.136      int sched_id;
  45.137 @@ -221,9 +221,9 @@ int xc_domain_setcpuweight(int xc_handle
  45.138      {
  45.139          case SCHED_BVT:
  45.140          {
  45.141 -            u32 mcuadv;
  45.142 +            uint32_t mcuadv;
  45.143              int warpback;
  45.144 -            s32 warpvalue;
  45.145 +            int32_t warpvalue;
  45.146              long long warpl;
  45.147              long long warpu;
  45.148  
  45.149 @@ -250,7 +250,7 @@ int xc_domain_setcpuweight(int xc_handle
  45.150  }
  45.151  
  45.152  int xc_domain_setmaxmem(int xc_handle,
  45.153 -                        u32 domid, 
  45.154 +                        uint32_t domid, 
  45.155                          unsigned int max_memkb)
  45.156  {
  45.157      dom0_op_t op;
  45.158 @@ -261,7 +261,7 @@ int xc_domain_setmaxmem(int xc_handle,
  45.159  }
  45.160  
  45.161  int xc_domain_memory_increase_reservation(int xc_handle,
  45.162 -                                          u32 domid, 
  45.163 +                                          uint32_t domid, 
  45.164                                            unsigned long nr_extents,
  45.165                                            unsigned int extent_order,
  45.166                                            unsigned int address_bits,
  45.167 @@ -293,7 +293,7 @@ int xc_domain_memory_increase_reservatio
  45.168  }
  45.169  
  45.170  int xc_domain_memory_decrease_reservation(int xc_handle,
  45.171 -                                          u32 domid, 
  45.172 +                                          uint32_t domid, 
  45.173                                            unsigned long nr_extents,
  45.174                                            unsigned int extent_order,
  45.175                                            unsigned long *extent_start)
    46.1 --- a/tools/libxc/xc_evtchn.c	Wed Oct 12 10:11:35 2005 +0100
    46.2 +++ b/tools/libxc/xc_evtchn.c	Wed Oct 12 11:07:37 2005 +0100
    46.3 @@ -33,8 +33,8 @@ static int do_evtchn_op(int xc_handle, e
    46.4  
    46.5  
    46.6  int xc_evtchn_alloc_unbound(int xc_handle,
    46.7 -                            u32 dom,
    46.8 -                            u32 remote_dom)
    46.9 +                            uint32_t dom,
   46.10 +                            uint32_t remote_dom)
   46.11  {
   46.12      int         rc;
   46.13      evtchn_op_t op = {
   46.14 @@ -50,7 +50,7 @@ int xc_evtchn_alloc_unbound(int xc_handl
   46.15  
   46.16  
   46.17  int xc_evtchn_status(int xc_handle,
   46.18 -                     u32 dom,
   46.19 +                     uint32_t dom,
   46.20                       int port,
   46.21                       xc_evtchn_status_t *status)
   46.22  {
    47.1 --- a/tools/libxc/xc_gnttab.c	Wed Oct 12 10:11:35 2005 +0100
    47.2 +++ b/tools/libxc/xc_gnttab.c	Wed Oct 12 11:07:37 2005 +0100
    47.3 @@ -40,12 +40,12 @@ do_gnttab_op(int xc_handle,
    47.4  
    47.5  
    47.6  int xc_gnttab_map_grant_ref(int         xc_handle,
    47.7 -                            u64    host_virt_addr,
    47.8 -                            u32         dom,
    47.9 -                            u16         ref,
   47.10 -                            u16         flags,
   47.11 -                            s16        *handle,
   47.12 -                            u64   *dev_bus_addr)
   47.13 +                            uint64_t    host_virt_addr,
   47.14 +                            uint32_t    dom,
   47.15 +                            uint16_t    ref,
   47.16 +                            uint16_t    flags,
   47.17 +                            int16_t    *handle,
   47.18 +                            uint64_t   *dev_bus_addr)
   47.19  {
   47.20      struct gnttab_map_grant_ref op;
   47.21      int rc;
   47.22 @@ -67,10 +67,10 @@ int xc_gnttab_map_grant_ref(int         
   47.23  
   47.24  
   47.25  int xc_gnttab_unmap_grant_ref(int       xc_handle,
   47.26 -                              u64  host_virt_addr,
   47.27 -                              u64  dev_bus_addr,
   47.28 -                              u16       handle,
   47.29 -                              s16      *status)
   47.30 +                              uint64_t  host_virt_addr,
   47.31 +                              uint64_t  dev_bus_addr,
   47.32 +                              uint16_t  handle,
   47.33 +                              int16_t  *status)
   47.34  {
   47.35      struct gnttab_unmap_grant_ref op;
   47.36      int rc;
   47.37 @@ -89,9 +89,9 @@ int xc_gnttab_unmap_grant_ref(int       
   47.38  }
   47.39  
   47.40  int xc_gnttab_setup_table(int        xc_handle,
   47.41 -                          u32        dom,
   47.42 -                          u16        nr_frames,
   47.43 -                          s16       *status,
   47.44 +                          uint32_t   dom,
   47.45 +                          uint16_t   nr_frames,
   47.46 +                          int16_t   *status,
   47.47                            unsigned long **frame_list)
   47.48  {
   47.49      struct gnttab_setup_table op;
   47.50 @@ -111,8 +111,8 @@ int xc_gnttab_setup_table(int        xc_
   47.51  }
   47.52  
   47.53  int xc_gnttab_dump_table(int        xc_handle,
   47.54 -                         u32        dom,
   47.55 -                         s16       *status)
   47.56 +                         uint32_t   dom,
   47.57 +                         int16_t   *status)
   47.58  {
   47.59      struct gnttab_dump_table op;
   47.60      int rc;
    48.1 --- a/tools/libxc/xc_ia64_stubs.c	Wed Oct 12 10:11:35 2005 +0100
    48.2 +++ b/tools/libxc/xc_ia64_stubs.c	Wed Oct 12 11:07:37 2005 +0100
    48.3 @@ -1,14 +1,14 @@
    48.4  #include "xg_private.h"
    48.5  #include "xenguest.h"
    48.6  
    48.7 -int xc_linux_save(int xc_handle, int io_fd, u32 dom, u32 max_iters, 
    48.8 -                  u32 max_factor, u32 flags)
    48.9 +int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, 
   48.10 +                  uint32_t max_factor, uint32_t flags)
   48.11  {
   48.12      PERROR("xc_linux_save not implemented\n");
   48.13      return -1;
   48.14  }
   48.15  
   48.16 -int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns,
   48.17 +int xc_linux_restore(int xc_handle, int io_fd, uint32_t dom, unsigned long nr_pfns,
   48.18                       unsigned int store_evtchn, unsigned long *store_mfn,
   48.19                       unsigned int console_evtchn, unsigned long *console_mfn)
   48.20  {
   48.21 @@ -17,7 +17,7 @@ int xc_linux_restore(int xc_handle, int 
   48.22  }
   48.23  
   48.24  int xc_vmx_build(int xc_handle,
   48.25 -                   u32 domid,
   48.26 +                   uint32_t domid,
   48.27                     int memsize,
   48.28                     const char *image_name,
   48.29                     struct mem_map *mem_mapp,
   48.30 @@ -35,7 +35,7 @@ int xc_vmx_build(int xc_handle,
   48.31  
   48.32  int
   48.33  xc_plan9_build(int xc_handle,
   48.34 -               u32 domid,
   48.35 +               uint32_t domid,
   48.36                 const char *image_name,
   48.37                 const char *cmdline,
   48.38                 unsigned int control_evtchn, unsigned long flags)
    49.1 --- a/tools/libxc/xc_linux_build.c	Wed Oct 12 10:11:35 2005 +0100
    49.2 +++ b/tools/libxc/xc_linux_build.c	Wed Oct 12 11:07:37 2005 +0100
    49.3 @@ -64,7 +64,7 @@ static int probeimageformat(char *image,
    49.4  
    49.5  #define alloc_pt(ltab, vltab)                                           \
    49.6  do {                                                                    \
    49.7 -    ltab = (u64)page_array[ppt_alloc++] << PAGE_SHIFT;                  \
    49.8 +    ltab = (uint64_t)page_array[ppt_alloc++] << PAGE_SHIFT;                  \
    49.9      if ( vltab != NULL )                                                \
   49.10          munmap(vltab, PAGE_SIZE);                                       \
   49.11      if ( (vltab = xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,       \
   49.12 @@ -76,7 +76,7 @@ do {                                    
   49.13  
   49.14  #if defined(__i386__)
   49.15  
   49.16 -static int setup_pg_tables(int xc_handle, u32 dom,
   49.17 +static int setup_pg_tables(int xc_handle, uint32_t dom,
   49.18                             vcpu_guest_context_t *ctxt,
   49.19                             unsigned long dsi_v_start,
   49.20                             unsigned long v_end,
   49.21 @@ -123,7 +123,7 @@ static int setup_pg_tables(int xc_handle
   49.22      return -1;
   49.23  }
   49.24  
   49.25 -static int setup_pg_tables_pae(int xc_handle, u32 dom,
   49.26 +static int setup_pg_tables_pae(int xc_handle, uint32_t dom,
   49.27                                 vcpu_guest_context_t *ctxt,
   49.28                                 unsigned long dsi_v_start,
   49.29                                 unsigned long v_end,
   49.30 @@ -134,7 +134,7 @@ static int setup_pg_tables_pae(int xc_ha
   49.31      l1_pgentry_64_t *vl1tab = NULL, *vl1e = NULL;
   49.32      l2_pgentry_64_t *vl2tab = NULL, *vl2e = NULL;
   49.33      l3_pgentry_64_t *vl3tab = NULL, *vl3e = NULL;
   49.34 -    u64 l1tab, l2tab, l3tab;
   49.35 +    uint64_t l1tab, l2tab, l3tab;
   49.36      unsigned long ppt_alloc, count, nmfn;
   49.37  
   49.38      /* First allocate page for page dir. */
   49.39 @@ -173,7 +173,7 @@ static int setup_pg_tables_pae(int xc_ha
   49.40              *vl2e++ = l1tab | L2_PROT;
   49.41          }
   49.42          
   49.43 -        *vl1e = ((u64)page_array[count] << PAGE_SHIFT) | L1_PROT;
   49.44 +        *vl1e = ((uint64_t)page_array[count] << PAGE_SHIFT) | L1_PROT;
   49.45          if ( (count >= ((vpt_start-dsi_v_start)>>PAGE_SHIFT)) &&
   49.46               (count <  ((vpt_end  -dsi_v_start)>>PAGE_SHIFT)) ) 
   49.47              *vl1e &= ~_PAGE_RW;
   49.48 @@ -199,7 +199,7 @@ static int setup_pg_tables_pae(int xc_ha
   49.49  
   49.50  #if defined(__x86_64__)
   49.51  
   49.52 -static int setup_pg_tables_64(int xc_handle, u32 dom,
   49.53 +static int setup_pg_tables_64(int xc_handle, uint32_t dom,
   49.54                                vcpu_guest_context_t *ctxt,
   49.55                                unsigned long dsi_v_start,
   49.56                                unsigned long v_end,
   49.57 @@ -280,7 +280,7 @@ static int setup_pg_tables_64(int xc_han
   49.58  #ifdef __ia64__
   49.59  #include <asm/fpu.h> /* for FPSR_DEFAULT */
   49.60  static int setup_guest(int xc_handle,
   49.61 -                       u32 dom,
   49.62 +                       uint32_t dom,
   49.63                         char *image, unsigned long image_size,
   49.64                         gzFile initrd_gfd, unsigned long initrd_len,
   49.65                         unsigned long nr_pages,
   49.66 @@ -346,7 +346,7 @@ static int setup_guest(int xc_handle,
   49.67      *store_mfn = page_array[1];
   49.68      *console_mfn = page_array[2];
   49.69      printf("store_mfn: 0x%lx, console_mfn: 0x%lx\n",
   49.70 -           (u64)store_mfn, (u64)console_mfn);
   49.71 +           (uint64_t)store_mfn, (uint64_t)console_mfn);
   49.72  
   49.73      start_info = xc_map_foreign_range(
   49.74          xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, page_array[0]);
   49.75 @@ -367,7 +367,7 @@ static int setup_guest(int xc_handle,
   49.76  }
   49.77  #else /* x86 */
   49.78  static int setup_guest(int xc_handle,
   49.79 -                       u32 dom,
   49.80 +                       uint32_t dom,
   49.81                         char *image, unsigned long image_size,
   49.82                         gzFile initrd_gfd, unsigned long initrd_len,
   49.83                         unsigned long nr_pages,
   49.84 @@ -573,7 +573,7 @@ static int setup_guest(int xc_handle,
   49.85      {
   49.86          if ( xc_add_mmu_update(
   49.87              xc_handle, mmu,
   49.88 -            ((u64)page_array[count] << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE,
   49.89 +            ((uint64_t)page_array[count] << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE,
   49.90              count) )
   49.91          {
   49.92              fprintf(stderr,"m2p update failure p=%lx m=%lx\n",
   49.93 @@ -679,7 +679,7 @@ static int setup_guest(int xc_handle,
   49.94  #endif
   49.95  
   49.96  int xc_linux_build(int xc_handle,
   49.97 -                   u32 domid,
   49.98 +                   uint32_t domid,
   49.99                     const char *image_name,
  49.100                     const char *ramdisk_name,
  49.101                     const char *cmdline,
  49.102 @@ -735,7 +735,7 @@ int xc_linux_build(int xc_handle,
  49.103      op.cmd = DOM0_GETDOMAININFO;
  49.104      op.u.getdomaininfo.domain = (domid_t)domid;
  49.105      if ( (xc_dom0_op(xc_handle, &op) < 0) || 
  49.106 -         ((u16)op.u.getdomaininfo.domain != domid) )
  49.107 +         ((uint16_t)op.u.getdomaininfo.domain != domid) )
  49.108      {
  49.109          PERROR("Could not get info on domain");
  49.110          goto error_out;
    50.1 --- a/tools/libxc/xc_linux_restore.c	Wed Oct 12 10:11:35 2005 +0100
    50.2 +++ b/tools/libxc/xc_linux_restore.c	Wed Oct 12 11:07:37 2005 +0100
    50.3 @@ -51,7 +51,7 @@ read_exact(int fd, void *buf, size_t cou
    50.4      return r;
    50.5  }
    50.6  
    50.7 -int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns,
    50.8 +int xc_linux_restore(int xc_handle, int io_fd, uint32_t dom, unsigned long nr_pfns,
    50.9                       unsigned int store_evtchn, unsigned long *store_mfn,
   50.10                       unsigned int console_evtchn, unsigned long *console_mfn)
   50.11  {
    51.1 --- a/tools/libxc/xc_linux_save.c	Wed Oct 12 10:11:35 2005 +0100
    51.2 +++ b/tools/libxc/xc_linux_save.c	Wed Oct 12 11:07:37 2005 +0100
    51.3 @@ -245,7 +245,7 @@ ratewrite(int io_fd, void *buf, int n)
    51.4      return write(io_fd, buf, n);
    51.5  }
    51.6  
    51.7 -static int print_stats( int xc_handle, u32 domid, 
    51.8 +static int print_stats( int xc_handle, uint32_t domid, 
    51.9                          int pages_sent, xc_shadow_control_stats_t *stats,
   51.10                          int print )
   51.11  {
   51.12 @@ -299,7 +299,7 @@ static int print_stats( int xc_handle, u
   51.13      return 0;
   51.14  }
   51.15  
   51.16 -static int analysis_phase( int xc_handle, u32 domid, 
   51.17 +static int analysis_phase( int xc_handle, uint32_t domid, 
   51.18                             int nr_pfns, unsigned long *arr, int runs )
   51.19  {
   51.20      long long start, now;
   51.21 @@ -399,8 +399,8 @@ static int suspend_and_state(int xc_hand
   51.22      return -1;
   51.23  }
   51.24  
   51.25 -int xc_linux_save(int xc_handle, int io_fd, u32 dom, u32 max_iters, 
   51.26 -                  u32 max_factor, u32 flags)
   51.27 +int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, 
   51.28 +                  uint32_t max_factor, uint32_t flags)
   51.29  {
   51.30      xc_dominfo_t info;
   51.31  
    52.1 --- a/tools/libxc/xc_load_aout9.c	Wed Oct 12 10:11:35 2005 +0100
    52.2 +++ b/tools/libxc/xc_load_aout9.c	Wed Oct 12 11:07:37 2005 +0100
    52.3 @@ -18,8 +18,8 @@
    52.4  #define KOFFSET(_p)       ((_p)&~KZERO)
    52.5  
    52.6  static int parseaout9image(char *, unsigned long, struct domain_setup_info *);
    52.7 -static int loadaout9image(char *, unsigned long, int, u32, unsigned long *, struct domain_setup_info *);
    52.8 -static void copyout(int, u32, unsigned long *, unsigned long, void *, int);
    52.9 +static int loadaout9image(char *, unsigned long, int, uint32_t, unsigned long *, struct domain_setup_info *);
   52.10 +static void copyout(int, uint32_t, unsigned long *, unsigned long, void *, int);
   52.11  struct Exec *get_header(char *, unsigned long, struct Exec *);
   52.12  
   52.13  
   52.14 @@ -79,7 +79,7 @@ static int
   52.15  loadaout9image(
   52.16      char *image,
   52.17      unsigned long image_size,
   52.18 -    int xch, u32 dom,
   52.19 +    int xch, uint32_t dom,
   52.20      unsigned long *parray,
   52.21      struct domain_setup_info *dsi)
   52.22  {
   52.23 @@ -108,7 +108,7 @@ loadaout9image(
   52.24   */
   52.25  static void
   52.26  copyout(
   52.27 -    int xch, u32 dom,
   52.28 +    int xch, uint32_t dom,
   52.29      unsigned long *parray,
   52.30      unsigned long addr,
   52.31      void *buf,
   52.32 @@ -135,8 +135,8 @@ copyout(
   52.33      }
   52.34  }
   52.35  
   52.36 -#define swap16(_v) ((((u16)(_v)>>8)&0xff)|(((u16)(_v)&0xff)<<8))
   52.37 -#define swap32(_v) (((u32)swap16((u16)(_v))<<16)|(u32)swap16((u32)((_v)>>16)))
   52.38 +#define swap16(_v) ((((uint16_t)(_v)>>8)&0xff)|(((uint16_t)(_v)&0xff)<<8))
   52.39 +#define swap32(_v) (((uint32_t)swap16((uint16_t)(_v))<<16)|(uint32_t)swap16((uint32_t)((_v)>>16)))
   52.40  
   52.41  /*
   52.42   * Decode the header from the start of image and return it.
   52.43 @@ -147,7 +147,7 @@ get_header(
   52.44      unsigned long image_size,
   52.45      struct Exec *ehdr)
   52.46  {
   52.47 -    u32 *v, x;
   52.48 +    uint32_t *v, x;
   52.49      int i;
   52.50  
   52.51      if (A9_MAGIC == 0)
   52.52 @@ -157,9 +157,9 @@ get_header(
   52.53          return 0;
   52.54  
   52.55      /* ... all big endian words */
   52.56 -    v = (u32 *)ehdr;
   52.57 +    v = (uint32_t *)ehdr;
   52.58      for (i = 0; i < sizeof(*ehdr); i += 4) {
   52.59 -        x = *(u32 *)&image[i];
   52.60 +        x = *(uint32_t *)&image[i];
   52.61          v[i/4] = swap32(x);
   52.62      }
   52.63  
    53.1 --- a/tools/libxc/xc_load_bin.c	Wed Oct 12 10:11:35 2005 +0100
    53.2 +++ b/tools/libxc/xc_load_bin.c	Wed Oct 12 11:07:37 2005 +0100
    53.3 @@ -11,14 +11,14 @@
    53.4   * The layout of the xen_bin_image table is:
    53.5   *
    53.6   * Offset Type Name          Note
    53.7 - * 0      u32  magic         required
    53.8 - * 4      u32  flags         required
    53.9 - * 8      u32  checksum      required
   53.10 - * 12     u32  header_addr   required
   53.11 - * 16     u32  load_addr     required
   53.12 - * 20     u32  load_end_addr required
   53.13 - * 24     u32  bss_end_addr  required
   53.14 - * 28     u32  entry_addr    required
   53.15 + * 0      uint32_t  magic         required
   53.16 + * 4      uint32_t  flags         required
   53.17 + * 8      uint32_t  checksum      required
   53.18 + * 12     uint32_t  header_addr   required
   53.19 + * 16     uint32_t  load_addr     required
   53.20 + * 20     uint32_t  load_end_addr required
   53.21 + * 24     uint32_t  bss_end_addr  required
   53.22 + * 28     uint32_t  entry_addr    required
   53.23   *
   53.24   * - magic
   53.25   *   Magic number identifying the table. For images to be loaded by Xen 3, the
   53.26 @@ -105,7 +105,7 @@ parsebinimage(
   53.27      char *image, unsigned long image_size, struct domain_setup_info *dsi);
   53.28  static int
   53.29  loadbinimage(
   53.30 -    char *image, unsigned long image_size, int xch, u32 dom,
   53.31 +    char *image, unsigned long image_size, int xch, uint32_t dom,
   53.32      unsigned long *parray, struct domain_setup_info *dsi);
   53.33  
   53.34  int probe_bin(char *image,
   53.35 @@ -237,7 +237,7 @@ static int parsebinimage(char *image,
   53.36  
   53.37  static int
   53.38  loadbinimage(
   53.39 -    char *image, unsigned long image_size, int xch, u32 dom,
   53.40 +    char *image, unsigned long image_size, int xch, uint32_t dom,
   53.41      unsigned long *parray, struct domain_setup_info *dsi)
   53.42  {
   53.43      unsigned long size;
    54.1 --- a/tools/libxc/xc_load_elf.c	Wed Oct 12 10:11:35 2005 +0100
    54.2 +++ b/tools/libxc/xc_load_elf.c	Wed Oct 12 11:07:37 2005 +0100
    54.3 @@ -22,11 +22,11 @@ parseelfimage(
    54.4      char *image, unsigned long image_size, struct domain_setup_info *dsi);
    54.5  static int
    54.6  loadelfimage(
    54.7 -    char *image, unsigned long image_size, int xch, u32 dom,
    54.8 +    char *image, unsigned long image_size, int xch, uint32_t dom,
    54.9      unsigned long *parray, struct domain_setup_info *dsi);
   54.10  static int
   54.11  loadelfsymtab(
   54.12 -    char *image, int xch, u32 dom, unsigned long *parray,
   54.13 +    char *image, int xch, uint32_t dom, unsigned long *parray,
   54.14      struct domain_setup_info *dsi);
   54.15  
   54.16  int probe_elf(char *image,
   54.17 @@ -168,7 +168,7 @@ static int parseelfimage(char *image,
   54.18  
   54.19  static int
   54.20  loadelfimage(
   54.21 -    char *image, unsigned long elfsize, int xch, u32 dom,
   54.22 +    char *image, unsigned long elfsize, int xch, uint32_t dom,
   54.23      unsigned long *parray, struct domain_setup_info *dsi)
   54.24  {
   54.25      Elf_Ehdr *ehdr = (Elf_Ehdr *)image;
   54.26 @@ -219,7 +219,7 @@ loadelfimage(
   54.27  
   54.28  static int
   54.29  loadelfsymtab(
   54.30 -    char *image, int xch, u32 dom, unsigned long *parray,
   54.31 +    char *image, int xch, uint32_t dom, unsigned long *parray,
   54.32      struct domain_setup_info *dsi)
   54.33  {
   54.34      Elf_Ehdr *ehdr = (Elf_Ehdr *)image, *sym_ehdr;
    55.1 --- a/tools/libxc/xc_misc.c	Wed Oct 12 10:11:35 2005 +0100
    55.2 +++ b/tools/libxc/xc_misc.c	Wed Oct 12 11:07:37 2005 +0100
    55.3 @@ -83,7 +83,7 @@ int xc_sched_id(int xc_handle,
    55.4  }
    55.5  
    55.6  int xc_perfc_control(int xc_handle,
    55.7 -                     u32 op,
    55.8 +                     uint32_t op,
    55.9                       xc_perfc_desc_t *desc)
   55.10  {
   55.11      int rc;
    56.1 --- a/tools/libxc/xc_physdev.c	Wed Oct 12 10:11:35 2005 +0100
    56.2 +++ b/tools/libxc/xc_physdev.c	Wed Oct 12 11:07:37 2005 +0100
    56.3 @@ -10,7 +10,7 @@
    56.4  #include "xc_private.h"
    56.5  
    56.6  int xc_physdev_pci_access_modify(int xc_handle,
    56.7 -                                 u32 domid,
    56.8 +                                 uint32_t domid,
    56.9                                   int bus,
   56.10                                   int dev,
   56.11                                   int func,
    57.1 --- a/tools/libxc/xc_private.c	Wed Oct 12 10:11:35 2005 +0100
    57.2 +++ b/tools/libxc/xc_private.c	Wed Oct 12 11:07:37 2005 +0100
    57.3 @@ -8,7 +8,7 @@
    57.4  #include "xc_private.h"
    57.5  #include <xen/memory.h>
    57.6  
    57.7 -void *xc_map_foreign_batch(int xc_handle, u32 dom, int prot,
    57.8 +void *xc_map_foreign_batch(int xc_handle, uint32_t dom, int prot,
    57.9                             unsigned long *arr, int num )
   57.10  {
   57.11      privcmd_mmapbatch_t ioctlx; 
   57.12 @@ -35,7 +35,7 @@ void *xc_map_foreign_batch(int xc_handle
   57.13  
   57.14  /*******************/
   57.15  
   57.16 -void *xc_map_foreign_range(int xc_handle, u32 dom,
   57.17 +void *xc_map_foreign_range(int xc_handle, uint32_t dom,
   57.18                             int size, int prot,
   57.19                             unsigned long mfn )
   57.20  {
   57.21 @@ -66,7 +66,7 @@ void *xc_map_foreign_range(int xc_handle
   57.22  
   57.23  /* NB: arr must be mlock'ed */
   57.24  int xc_get_pfn_type_batch(int xc_handle, 
   57.25 -                          u32 dom, int num, unsigned long *arr)
   57.26 +                          uint32_t dom, int num, unsigned long *arr)
   57.27  {
   57.28      dom0_op_t op;
   57.29      op.cmd = DOM0_GETPAGEFRAMEINFO2;
   57.30 @@ -79,7 +79,7 @@ int xc_get_pfn_type_batch(int xc_handle,
   57.31  #define GETPFN_ERR (~0U)
   57.32  unsigned int get_pfn_type(int xc_handle, 
   57.33                            unsigned long mfn, 
   57.34 -                          u32 dom)
   57.35 +                          uint32_t dom)
   57.36  {
   57.37      dom0_op_t op;
   57.38      op.cmd = DOM0_GETPAGEFRAMEINFO;
   57.39 @@ -258,7 +258,7 @@ long long xc_domain_get_cpu_usage( int x
   57.40  
   57.41      op.cmd = DOM0_GETVCPUCONTEXT;
   57.42      op.u.getvcpucontext.domain = (domid_t)domid;
   57.43 -    op.u.getvcpucontext.vcpu   = (u16)vcpu;
   57.44 +    op.u.getvcpucontext.vcpu   = (uint16_t)vcpu;
   57.45      op.u.getvcpucontext.ctxt   = NULL;
   57.46      if ( (do_dom0_op(xc_handle, &op) < 0) )
   57.47      {
   57.48 @@ -282,7 +282,7 @@ unsigned long xc_get_m2p_start_mfn ( int
   57.49  }
   57.50  
   57.51  int xc_get_pfn_list(int xc_handle,
   57.52 -                    u32 domid, 
   57.53 +                    uint32_t domid, 
   57.54                      unsigned long *pfn_buf, 
   57.55                      unsigned long max_pfns)
   57.56  {
   57.57 @@ -324,7 +324,7 @@ int xc_get_pfn_list(int xc_handle,
   57.58  
   57.59  #ifdef __ia64__
   57.60  int xc_ia64_get_pfn_list(int xc_handle,
   57.61 -                         u32 domid, 
   57.62 +                         uint32_t domid, 
   57.63                           unsigned long *pfn_buf, 
   57.64                           unsigned int start_page,
   57.65                           unsigned int nr_pages)
   57.66 @@ -352,7 +352,7 @@ int xc_ia64_get_pfn_list(int xc_handle,
   57.67      return (ret < 0) ? -1 : op.u.getmemlist.num_pfns;
   57.68  }
   57.69  
   57.70 -long xc_get_max_pages(int xc_handle, u32 domid)
   57.71 +long xc_get_max_pages(int xc_handle, uint32_t domid)
   57.72  {
   57.73      dom0_op_t op;
   57.74      op.cmd = DOM0_GETDOMAININFO;
   57.75 @@ -362,7 +362,7 @@ long xc_get_max_pages(int xc_handle, u32
   57.76  }
   57.77  #endif
   57.78  
   57.79 -long xc_get_tot_pages(int xc_handle, u32 domid)
   57.80 +long xc_get_tot_pages(int xc_handle, uint32_t domid)
   57.81  {
   57.82      dom0_op_t op;
   57.83      op.cmd = DOM0_GETDOMAININFO;
   57.84 @@ -372,7 +372,7 @@ long xc_get_tot_pages(int xc_handle, u32
   57.85  }
   57.86  
   57.87  int xc_copy_to_domain_page(int xc_handle,
   57.88 -                           u32 domid,
   57.89 +                           uint32_t domid,
   57.90                             unsigned long dst_pfn, 
   57.91                             void *src_page)
   57.92  {
   57.93 @@ -387,8 +387,8 @@ int xc_copy_to_domain_page(int xc_handle
   57.94  
   57.95  unsigned long xc_get_filesz(int fd)
   57.96  {
   57.97 -    u16 sig;
   57.98 -    u32 _sz = 0;
   57.99 +    uint16_t sig;
  57.100 +    uint32_t _sz = 0;
  57.101      unsigned long sz;
  57.102  
  57.103      lseek(fd, 0, SEEK_SET);
  57.104 @@ -408,7 +408,7 @@ unsigned long xc_get_filesz(int fd)
  57.105  }
  57.106  
  57.107  void xc_map_memcpy(unsigned long dst, char *src, unsigned long size,
  57.108 -                   int xch, u32 dom, unsigned long *parray,
  57.109 +                   int xch, uint32_t dom, unsigned long *parray,
  57.110                     unsigned long vstart)
  57.111  {
  57.112      char *va;
  57.113 @@ -460,7 +460,7 @@ int xc_version(int xc_handle, int cmd, v
  57.114  }
  57.115  
  57.116  unsigned long xc_make_page_below_4G(
  57.117 -    int xc_handle, u32 domid, unsigned long mfn)
  57.118 +    int xc_handle, uint32_t domid, unsigned long mfn)
  57.119  {
  57.120      unsigned long new_mfn;
  57.121  
    58.1 --- a/tools/libxc/xc_ptrace.c	Wed Oct 12 10:11:35 2005 +0100
    58.2 +++ b/tools/libxc/xc_ptrace.c	Wed Oct 12 11:07:37 2005 +0100
    58.3 @@ -138,7 +138,7 @@ map_domain_va_pae(
    58.4      int perm)
    58.5  {
    58.6      unsigned long l2p, l1p, p, va = (unsigned long)guest_va;
    58.7 -    u64 *l3, *l2, *l1;
    58.8 +    uint64_t *l3, *l2, *l1;
    58.9      static void *v;
   58.10  
   58.11      FETCH_REGS(cpu);
   58.12 @@ -319,7 +319,7 @@ long
   58.13  xc_ptrace(
   58.14      int xc_handle,
   58.15      enum __ptrace_request request,
   58.16 -    u32 domid,
   58.17 +    uint32_t domid,
   58.18      long eaddr,
   58.19      long edata)
   58.20  {
    59.1 --- a/tools/libxc/xc_ptrace_core.c	Wed Oct 12 10:11:35 2005 +0100
    59.2 +++ b/tools/libxc/xc_ptrace_core.c	Wed Oct 12 11:07:37 2005 +0100
    59.3 @@ -222,7 +222,7 @@ long
    59.4  xc_ptrace_core(
    59.5      int xc_handle,
    59.6      enum __ptrace_request request,
    59.7 -    u32 domfd,
    59.8 +    uint32_t domfd,
    59.9      long eaddr,
   59.10      long edata)
   59.11  {
    60.1 --- a/tools/libxc/xc_sedf.c	Wed Oct 12 10:11:35 2005 +0100
    60.2 +++ b/tools/libxc/xc_sedf.c	Wed Oct 12 11:07:37 2005 +0100
    60.3 @@ -11,7 +11,7 @@
    60.4  #include "xc_private.h"
    60.5  
    60.6  int xc_sedf_domain_set(int xc_handle,
    60.7 -                          u32 domid, u64 period, u64 slice,u64 latency, u16 extratime,u16 weight)
    60.8 +                          uint32_t domid, uint64_t period, uint64_t slice,uint64_t latency, uint16_t extratime,uint16_t weight)
    60.9  {
   60.10      dom0_op_t op;
   60.11      struct sedf_adjdom *p = &op.u.adjustdom.u.sedf;
   60.12 @@ -29,7 +29,7 @@ int xc_sedf_domain_set(int xc_handle,
   60.13      return do_dom0_op(xc_handle, &op);
   60.14  }
   60.15  
   60.16 -int xc_sedf_domain_get(int xc_handle, u32 domid, u64 *period, u64 *slice, u64* latency, u16* extratime, u16* weight)
   60.17 +int xc_sedf_domain_get(int xc_handle, uint32_t domid, uint64_t *period, uint64_t *slice, uint64_t* latency, uint16_t* extratime, uint16_t* weight)
   60.18  {
   60.19      dom0_op_t op;
   60.20      int ret;
    61.1 --- a/tools/libxc/xc_vmx_build.c	Wed Oct 12 10:11:35 2005 +0100
    61.2 +++ b/tools/libxc/xc_vmx_build.c	Wed Oct 12 11:07:37 2005 +0100
    61.3 @@ -34,9 +34,9 @@
    61.4  #define E820_MAP_OFFSET      0x000002D0
    61.5  
    61.6  struct e820entry {
    61.7 -    u64 addr;
    61.8 -    u64 size;
    61.9 -    u32 type;
   61.10 +    uint64_t addr;
   61.11 +    uint64_t size;
   61.12 +    uint32_t type;
   61.13  } __attribute__((packed));
   61.14  
   61.15  #define round_pgup(_p)    (((_p)+(PAGE_SIZE-1))&PAGE_MASK)
   61.16 @@ -47,7 +47,7 @@ parseelfimage(
   61.17      char *elfbase, unsigned long elfsize, struct domain_setup_info *dsi);
   61.18  static int
   61.19  loadelfimage(
   61.20 -    char *elfbase, int xch, u32 dom, unsigned long *parray,
   61.21 +    char *elfbase, int xch, uint32_t dom, unsigned long *parray,
   61.22      struct domain_setup_info *dsi);
   61.23  
   61.24  static unsigned char build_e820map(void *e820_page, unsigned long mem_size)
   61.25 @@ -122,7 +122,7 @@ static unsigned char build_e820map(void 
   61.26   */
   61.27  #define VCPU_MAGIC 0x76637075 /* "vcpu" */
   61.28  static int
   61.29 -set_nr_vcpus(int xc_handle, u32 dom, unsigned long *pfn_list,
   61.30 +set_nr_vcpus(int xc_handle, uint32_t dom, unsigned long *pfn_list,
   61.31               struct domain_setup_info *dsi, unsigned long vcpus)
   61.32  {
   61.33      char          *va_map;
   61.34 @@ -144,7 +144,7 @@ set_nr_vcpus(int xc_handle, u32 dom, uns
   61.35  }
   61.36  
   61.37  #ifdef __i386__
   61.38 -static int zap_mmio_range(int xc_handle, u32 dom,
   61.39 +static int zap_mmio_range(int xc_handle, uint32_t dom,
   61.40                            l2_pgentry_32_t *vl2tab,
   61.41                            unsigned long mmio_range_start,
   61.42                            unsigned long mmio_range_size)
   61.43 @@ -173,7 +173,7 @@ static int zap_mmio_range(int xc_handle,
   61.44      return 0;
   61.45  }
   61.46  
   61.47 -static int zap_mmio_ranges(int xc_handle, u32 dom, unsigned long l2tab,
   61.48 +static int zap_mmio_ranges(int xc_handle, uint32_t dom, unsigned long l2tab,
   61.49                             unsigned char e820_map_nr, unsigned char *e820map)
   61.50  {
   61.51      unsigned int i;
   61.52 @@ -197,7 +197,7 @@ static int zap_mmio_ranges(int xc_handle
   61.53      return 0;
   61.54  }
   61.55  #else
   61.56 -static int zap_mmio_range(int xc_handle, u32 dom,
   61.57 +static int zap_mmio_range(int xc_handle, uint32_t dom,
   61.58                            l3_pgentry_t *vl3tab,
   61.59                            unsigned long mmio_range_start,
   61.60                            unsigned long mmio_range_size)
   61.61 @@ -247,7 +247,7 @@ static int zap_mmio_range(int xc_handle,
   61.62      return 0;
   61.63  }
   61.64  
   61.65 -static int zap_mmio_ranges(int xc_handle, u32 dom, unsigned long l3tab,
   61.66 +static int zap_mmio_ranges(int xc_handle, uint32_t dom, unsigned long l3tab,
   61.67                             unsigned char e820_map_nr, unsigned char *e820map)
   61.68  {
   61.69      unsigned int i;
   61.70 @@ -271,7 +271,7 @@ static int zap_mmio_ranges(int xc_handle
   61.71  #endif
   61.72  
   61.73  static int setup_guest(int xc_handle,
   61.74 -                       u32 dom, int memsize,
   61.75 +                       uint32_t dom, int memsize,
   61.76                         char *image, unsigned long image_size,
   61.77                         unsigned long nr_pages,
   61.78                         vcpu_guest_context_t *ctxt,
   61.79 @@ -595,7 +595,7 @@ static int vmx_identify(void)
   61.80  }
   61.81  
   61.82  int xc_vmx_build(int xc_handle,
   61.83 -                 u32 domid,
   61.84 +                 uint32_t domid,
   61.85                   int memsize,
   61.86                   const char *image_name,
   61.87                   unsigned int control_evtchn,
   61.88 @@ -635,7 +635,7 @@ int xc_vmx_build(int xc_handle,
   61.89      op.cmd = DOM0_GETDOMAININFO;
   61.90      op.u.getdomaininfo.domain = (domid_t)domid;
   61.91      if ( (xc_dom0_op(xc_handle, &op) < 0) ||
   61.92 -         ((u16)op.u.getdomaininfo.domain != domid) )
   61.93 +         ((uint16_t)op.u.getdomaininfo.domain != domid) )
   61.94      {
   61.95          PERROR("Could not get info on domain");
   61.96          goto error_out;
   61.97 @@ -790,7 +790,7 @@ static int parseelfimage(char *elfbase,
   61.98  
   61.99  static int
  61.100  loadelfimage(
  61.101 -    char *elfbase, int xch, u32 dom, unsigned long *parray,
  61.102 +    char *elfbase, int xch, uint32_t dom, unsigned long *parray,
  61.103      struct domain_setup_info *dsi)
  61.104  {
  61.105      Elf32_Ehdr *ehdr = (Elf32_Ehdr *)elfbase;
    62.1 --- a/tools/libxc/xenctrl.h	Wed Oct 12 10:11:35 2005 +0100
    62.2 +++ b/tools/libxc/xenctrl.h	Wed Oct 12 11:07:37 2005 +0100
    62.3 @@ -10,16 +10,6 @@
    62.4  #define XENCTRL_H
    62.5  
    62.6  #include <stdint.h>
    62.7 -
    62.8 -typedef uint8_t            u8;
    62.9 -typedef uint16_t           u16;
   62.10 -typedef uint32_t           u32;
   62.11 -typedef uint64_t           u64;
   62.12 -typedef int8_t             s8;
   62.13 -typedef int16_t            s16;
   62.14 -typedef int32_t            s32;
   62.15 -typedef int64_t            s64;
   62.16 -
   62.17  #include <sys/ptrace.h>
   62.18  #include <xen/xen.h>
   62.19  #include <xen/dom0_ops.h>
   62.20 @@ -105,14 +95,14 @@ typedef struct xc_core_header {
   62.21  long xc_ptrace(
   62.22      int xc_handle,
   62.23      enum __ptrace_request request, 
   62.24 -    u32  domid,
   62.25 +    uint32_t  domid,
   62.26      long addr, 
   62.27      long data);
   62.28  
   62.29  long xc_ptrace_core(
   62.30      int xc_handle,
   62.31      enum __ptrace_request request, 
   62.32 -    u32 domid, 
   62.33 +    uint32_t domid, 
   62.34      long addr, 
   62.35      long data);
   62.36  
   62.37 @@ -133,28 +123,28 @@ int xc_waitdomain_core(
   62.38   */
   62.39  
   62.40  typedef struct {
   62.41 -    u32           domid;
   62.42 -    u32           ssidref;
   62.43 +    uint32_t           domid;
   62.44 +    uint32_t           ssidref;
   62.45      unsigned int  dying:1, crashed:1, shutdown:1, 
   62.46                    paused:1, blocked:1, running:1;
   62.47      unsigned int  shutdown_reason; /* only meaningful if shutdown==1 */
   62.48      unsigned long nr_pages;
   62.49      unsigned long shared_info_frame;
   62.50 -    u64           cpu_time;
   62.51 +    uint64_t           cpu_time;
   62.52      unsigned long max_memkb;
   62.53      unsigned int  vcpus;
   62.54 -    s32           vcpu_to_cpu[MAX_VIRT_CPUS];
   62.55 +    int32_t           vcpu_to_cpu[MAX_VIRT_CPUS];
   62.56      cpumap_t      cpumap[MAX_VIRT_CPUS];
   62.57  } xc_dominfo_t;
   62.58  
   62.59  typedef dom0_getdomaininfo_t xc_domaininfo_t;
   62.60  int xc_domain_create(int xc_handle, 
   62.61 -                     u32 ssidref,
   62.62 -                     u32 *pdomid);
   62.63 +                     uint32_t ssidref,
   62.64 +                     uint32_t *pdomid);
   62.65  
   62.66  
   62.67  int xc_domain_dumpcore(int xc_handle, 
   62.68 -                       u32 domid,
   62.69 +                       uint32_t domid,
   62.70                         const char *corename);
   62.71  
   62.72  
   62.73 @@ -167,7 +157,7 @@ int xc_domain_dumpcore(int xc_handle,
   62.74   * @return 0 on success, -1 on failure.
   62.75   */
   62.76  int xc_domain_pause(int xc_handle, 
   62.77 -                    u32 domid);
   62.78 +                    uint32_t domid);
   62.79  /**
   62.80   * This function unpauses a domain.  The domain should have been previously
   62.81   * paused.
   62.82 @@ -177,7 +167,7 @@ int xc_domain_pause(int xc_handle,
   62.83   * return 0 on success, -1 on failure
   62.84   */
   62.85  int xc_domain_unpause(int xc_handle, 
   62.86 -                      u32 domid);
   62.87 +                      uint32_t domid);
   62.88  
   62.89  /**
   62.90   * This function will destroy a domain.  Destroying a domain removes the domain
   62.91 @@ -189,9 +179,9 @@ int xc_domain_unpause(int xc_handle,
   62.92   * @return 0 on success, -1 on failure
   62.93   */
   62.94  int xc_domain_destroy(int xc_handle, 
   62.95 -                      u32 domid);
   62.96 +                      uint32_t domid);
   62.97  int xc_domain_pincpu(int xc_handle,
   62.98 -                     u32 domid,
   62.99 +                     uint32_t domid,
  62.100                       int vcpu,
  62.101                       cpumap_t *cpumap);
  62.102  /**
  62.103 @@ -210,7 +200,7 @@ int xc_domain_pincpu(int xc_handle,
  62.104   * @return the number of domains enumerated or -1 on error
  62.105   */
  62.106  int xc_domain_getinfo(int xc_handle,
  62.107 -                      u32 first_domid, 
  62.108 +                      uint32_t first_domid, 
  62.109                        unsigned int max_doms,
  62.110                        xc_dominfo_t *info);
  62.111  
  62.112 @@ -228,7 +218,7 @@ int xc_domain_getinfo(int xc_handle,
  62.113   * @return the number of domains enumerated or -1 on error
  62.114   */
  62.115  int xc_domain_getinfolist(int xc_handle,
  62.116 -                          u32 first_domain,
  62.117 +                          uint32_t first_domain,
  62.118                            unsigned int max_domains,
  62.119                            xc_domaininfo_t *info);
  62.120  
  62.121 @@ -244,12 +234,12 @@ int xc_domain_getinfolist(int xc_handle,
  62.122   * @return 0 on success, -1 on failure
  62.123   */
  62.124  int xc_domain_get_vcpu_context(int xc_handle,
  62.125 -                               u32 domid,
  62.126 -                               u32 vcpu,
  62.127 +                               uint32_t domid,
  62.128 +                               uint32_t vcpu,
  62.129                                 vcpu_guest_context_t *ctxt);
  62.130  
  62.131  int xc_domain_setcpuweight(int xc_handle,
  62.132 -                           u32 domid,
  62.133 +                           uint32_t domid,
  62.134                             float weight);
  62.135  long long xc_domain_get_cpu_usage(int xc_handle,
  62.136                                    domid_t domid,
  62.137 @@ -258,7 +248,7 @@ long long xc_domain_get_cpu_usage(int xc
  62.138  
  62.139  typedef dom0_shadow_control_stats_t xc_shadow_control_stats_t;
  62.140  int xc_shadow_control(int xc_handle,
  62.141 -                      u32 domid, 
  62.142 +                      uint32_t domid, 
  62.143                        unsigned int sop,
  62.144                        unsigned long *dirty_bitmap,
  62.145                        unsigned long pages,
  62.146 @@ -268,10 +258,10 @@ int xc_bvtsched_global_set(int xc_handle
  62.147                             unsigned long ctx_allow);
  62.148  
  62.149  int xc_bvtsched_domain_set(int xc_handle,
  62.150 -                           u32 domid,
  62.151 -                           u32 mcuadv,
  62.152 +                           uint32_t domid,
  62.153 +                           uint32_t mcuadv,
  62.154                             int warpback,
  62.155 -                           s32 warpvalue,
  62.156 +                           int32_t warpvalue,
  62.157                             long long warpl,
  62.158                             long long warpu);
  62.159  
  62.160 @@ -279,20 +269,24 @@ int xc_bvtsched_global_get(int xc_handle
  62.161                             unsigned long *ctx_allow);
  62.162  
  62.163  int xc_bvtsched_domain_get(int xc_handle,
  62.164 -                           u32 domid,
  62.165 -                           u32 *mcuadv,
  62.166 +                           uint32_t domid,
  62.167 +                           uint32_t *mcuadv,
  62.168                             int *warpback,
  62.169 -                           s32 *warpvalue,
  62.170 +                           int32_t *warpvalue,
  62.171                             long long *warpl,
  62.172                             long long *warpu);
  62.173  
  62.174  int xc_sedf_domain_set(int xc_handle,
  62.175 -                          u32 domid,
  62.176 -                          u64 period, u64 slice, u64 latency, u16 extratime, u16 weight);
  62.177 +                       uint32_t domid,
  62.178 +                       uint64_t period, uint64_t slice,
  62.179 +                       uint64_t latency, uint16_t extratime,
  62.180 +                       uint16_t weight);
  62.181  
  62.182  int xc_sedf_domain_get(int xc_handle,
  62.183 -                          u32 domid,
  62.184 -                          u64* period, u64 *slice, u64 *latency, u16 *extratime, u16* weight);
  62.185 +                       uint32_t domid,
  62.186 +                       uint64_t* period, uint64_t *slice,
  62.187 +                       uint64_t *latency, uint16_t *extratime,
  62.188 +                       uint16_t *weight);
  62.189  
  62.190  typedef evtchn_status_t xc_evtchn_status_t;
  62.191  
  62.192 @@ -311,16 +305,16 @@ typedef evtchn_status_t xc_evtchn_status
  62.193   * @return allocated port (in @dom) on success, -1 on failure
  62.194   */
  62.195  int xc_evtchn_alloc_unbound(int xc_handle,
  62.196 -                            u32 dom,
  62.197 -                            u32 remote_dom);
  62.198 +                            uint32_t dom,
  62.199 +                            uint32_t remote_dom);
  62.200  
  62.201  int xc_evtchn_status(int xc_handle,
  62.202 -                     u32 dom, /* may be DOMID_SELF */
  62.203 +                     uint32_t dom, /* may be DOMID_SELF */
  62.204                       int port,
  62.205                       xc_evtchn_status_t *status);
  62.206  
  62.207  int xc_physdev_pci_access_modify(int xc_handle,
  62.208 -                                 u32 domid,
  62.209 +                                 uint32_t domid,
  62.210                                   int bus,
  62.211                                   int dev,
  62.212                                   int func,
  62.213 @@ -339,29 +333,29 @@ int xc_sched_id(int xc_handle,
  62.214                  int *sched_id);
  62.215  
  62.216  int xc_domain_setmaxmem(int xc_handle,
  62.217 -                        u32 domid, 
  62.218 +                        uint32_t domid, 
  62.219                          unsigned int max_memkb);
  62.220  
  62.221  int xc_domain_memory_increase_reservation(int xc_handle,
  62.222 -                                          u32 domid, 
  62.223 +                                          uint32_t domid, 
  62.224                                            unsigned long nr_extents,
  62.225                                            unsigned int extent_order,
  62.226                                            unsigned int address_bits,
  62.227  					  unsigned long *extent_start);
  62.228  
  62.229  int xc_domain_memory_decrease_reservation(int xc_handle,
  62.230 -                                          u32 domid, 
  62.231 +                                          uint32_t domid, 
  62.232                                            unsigned long nr_extents,
  62.233                                            unsigned int extent_order,
  62.234  					  unsigned long *extent_start);
  62.235  
  62.236 -unsigned long xc_make_page_below_4G(int xc_handle, u32 domid, 
  62.237 +unsigned long xc_make_page_below_4G(int xc_handle, uint32_t domid, 
  62.238  				    unsigned long mfn);
  62.239  
  62.240  typedef dom0_perfc_desc_t xc_perfc_desc_t;
  62.241  /* IMPORTANT: The caller is responsible for mlock()'ing the @desc array. */
  62.242  int xc_perfc_control(int xc_handle,
  62.243 -                     u32 op,
  62.244 +                     uint32_t op,
  62.245                       xc_perfc_desc_t *desc);
  62.246  
  62.247  /* read/write msr */
  62.248 @@ -384,27 +378,29 @@ int xc_msr_write(int xc_handle, int cpu_
  62.249   * @parm prot same flag as in mmap().
  62.250   * @parm mfn the frame address to map.
  62.251   */
  62.252 -void *xc_map_foreign_range(int xc_handle, u32 dom,
  62.253 +void *xc_map_foreign_range(int xc_handle, uint32_t dom,
  62.254                              int size, int prot,
  62.255                              unsigned long mfn );
  62.256  
  62.257 -void *xc_map_foreign_batch(int xc_handle, u32 dom, int prot,
  62.258 +void *xc_map_foreign_batch(int xc_handle, uint32_t dom, int prot,
  62.259                             unsigned long *arr, int num );
  62.260  
  62.261 -int xc_get_pfn_list(int xc_handle, u32 domid, unsigned long *pfn_buf, 
  62.262 +int xc_get_pfn_list(int xc_handle, uint32_t domid, unsigned long *pfn_buf, 
  62.263                      unsigned long max_pfns);
  62.264  
  62.265 -int xc_ia64_get_pfn_list(int xc_handle, u32 domid, unsigned long *pfn_buf, 
  62.266 -                    unsigned int start_page, unsigned int nr_pages);
  62.267 +int xc_ia64_get_pfn_list(int xc_handle, uint32_t domid,
  62.268 +                         unsigned long *pfn_buf, 
  62.269 +                         unsigned int start_page, unsigned int nr_pages);
  62.270  
  62.271 -long xc_get_max_pages(int xc_handle, u32 domid);
  62.272 +long xc_get_max_pages(int xc_handle, uint32_t domid);
  62.273  
  62.274  int xc_mmuext_op(int xc_handle, struct mmuext_op *op, unsigned int nr_ops,
  62.275  		 domid_t dom);
  62.276  
  62.277  int xc_memory_op(int xc_handle, int cmd, void *arg);
  62.278  
  62.279 -int xc_get_pfn_type_batch(int xc_handle, u32 dom, int num, unsigned long *arr);
  62.280 +int xc_get_pfn_type_batch(int xc_handle, uint32_t dom,
  62.281 +                          int num, unsigned long *arr);
  62.282  
  62.283  
  62.284  /*\
  62.285 @@ -438,33 +434,33 @@ int xc_grant_interface_open(void);
  62.286   */
  62.287  int xc_grant_interface_close(int xc_handle);
  62.288  
  62.289 -int xc_gnttab_map_grant_ref(int  xc_handle,
  62.290 -                            u64  host_virt_addr,
  62.291 -                            u32  dom,
  62.292 -                            u16  ref,
  62.293 -                            u16  flags,
  62.294 -                            s16 *handle,
  62.295 -                            u64 *dev_bus_addr);
  62.296 +int xc_gnttab_map_grant_ref(int      xc_handle,
  62.297 +                            uint64_t host_virt_addr,
  62.298 +                            uint32_t dom,
  62.299 +                            uint16_t ref,
  62.300 +                            uint16_t flags,
  62.301 +                            int16_t *handle,
  62.302 +                            uint64_t *dev_bus_addr);
  62.303  
  62.304  int xc_gnttab_unmap_grant_ref(int  xc_handle,
  62.305 -                              u64  host_virt_addr,
  62.306 -                              u64  dev_bus_addr,
  62.307 -                              u16  handle,
  62.308 -                              s16 *status);
  62.309 +                              uint64_t  host_virt_addr,
  62.310 +                              uint64_t  dev_bus_addr,
  62.311 +                              uint16_t  handle,
  62.312 +                              int16_t *status);
  62.313  
  62.314  int xc_gnttab_setup_table(int        xc_handle,
  62.315 -                          u32        dom,
  62.316 -                          u16        nr_frames,
  62.317 -                          s16       *status,
  62.318 +                          uint32_t   dom,
  62.319 +                          uint16_t   nr_frames,
  62.320 +                          int16_t   *status,
  62.321                            unsigned long **frame_list);
  62.322  
  62.323  /* Grant debug builds only: */
  62.324  int xc_gnttab_dump_table(int        xc_handle,
  62.325 -                         u32        dom,
  62.326 -                         s16       *status);
  62.327 +                         uint32_t   dom,
  62.328 +                         int16_t   *status);
  62.329  
  62.330  /* Get current total pages allocated to a domain. */
  62.331 -long xc_get_tot_pages(int xc_handle, u32 domid);
  62.332 +long xc_get_tot_pages(int xc_handle, uint32_t domid);
  62.333  
  62.334  /* Execute a privileged dom0 operation. */
  62.335  int xc_dom0_op(int xc_handle, dom0_op_t *op);
    63.1 --- a/tools/libxc/xg_private.h	Wed Oct 12 10:11:35 2005 +0100
    63.2 +++ b/tools/libxc/xg_private.h	Wed Oct 12 11:07:37 2005 +0100
    63.3 @@ -60,11 +60,11 @@ unsigned long csum_page (void * page);
    63.4  #define PAGE_SIZE               (1UL << PAGE_SHIFT)
    63.5  #define PAGE_MASK               (~(PAGE_SIZE-1))
    63.6  
    63.7 -typedef u32 l1_pgentry_32_t;
    63.8 -typedef u32 l2_pgentry_32_t;
    63.9 -typedef u64 l1_pgentry_64_t;
   63.10 -typedef u64 l2_pgentry_64_t;
   63.11 -typedef u64 l3_pgentry_64_t;
   63.12 +typedef uint32_t l1_pgentry_32_t;
   63.13 +typedef uint32_t l2_pgentry_32_t;
   63.14 +typedef uint64_t l1_pgentry_64_t;
   63.15 +typedef uint64_t l2_pgentry_64_t;
   63.16 +typedef uint64_t l3_pgentry_64_t;
   63.17  typedef unsigned long l1_pgentry_t;
   63.18  typedef unsigned long l2_pgentry_t;
   63.19  #if defined(__x86_64__)
   63.20 @@ -129,7 +129,7 @@ struct domain_setup_info
   63.21  typedef int (*parseimagefunc)(char *image, unsigned long image_size,
   63.22  			      struct domain_setup_info *dsi);
   63.23  typedef int (*loadimagefunc)(char *image, unsigned long image_size, int xch,
   63.24 -			     u32 dom, unsigned long *parray,
   63.25 +			     uint32_t dom, unsigned long *parray,
   63.26  			     struct domain_setup_info *dsi);
   63.27  
   63.28  struct load_funcs
   63.29 @@ -153,13 +153,13 @@ typedef struct mfn_mapper {
   63.30  
   63.31  unsigned long xc_get_m2p_start_mfn (int xc_handle);
   63.32  
   63.33 -int xc_copy_to_domain_page(int xc_handle, u32 domid,
   63.34 +int xc_copy_to_domain_page(int xc_handle, uint32_t domid,
   63.35                              unsigned long dst_pfn, void *src_page);
   63.36  
   63.37  unsigned long xc_get_filesz(int fd);
   63.38  
   63.39  void xc_map_memcpy(unsigned long dst, char *src, unsigned long size,
   63.40 -                   int xch, u32 dom, unsigned long *parray,
   63.41 +                   int xch, uint32_t dom, unsigned long *parray,
   63.42                     unsigned long vstart);
   63.43  
   63.44  int pin_table(int xc_handle, unsigned int type, unsigned long mfn,
    64.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Wed Oct 12 10:11:35 2005 +0100
    64.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Wed Oct 12 11:07:37 2005 +0100
    64.3 @@ -42,7 +42,7 @@ static PyObject *pyxc_domain_dumpcore(Py
    64.4  {
    64.5      XcObject *xc = (XcObject *)self;
    64.6  
    64.7 -    u32 dom;
    64.8 +    uint32_t dom;
    64.9      char *corefile;
   64.10  
   64.11      static char *kwd_list[] = { "dom", "corefile", NULL };
   64.12 @@ -77,9 +77,9 @@ static PyObject *pyxc_domain_create(PyOb
   64.13  {
   64.14      XcObject *xc = (XcObject *)self;
   64.15  
   64.16 -    u32          dom = 0;
   64.17 +    uint32_t          dom = 0;
   64.18      int          ret;
   64.19 -    u32          ssidref = 0x0;
   64.20 +    uint32_t          ssidref = 0x0;
   64.21  
   64.22      static char *kwd_list[] = { "dom", "ssidref", NULL };
   64.23  
   64.24 @@ -99,7 +99,7 @@ static PyObject *pyxc_domain_pause(PyObj
   64.25  {
   64.26      XcObject *xc = (XcObject *)self;
   64.27  
   64.28 -    u32 dom;
   64.29 +    uint32_t dom;
   64.30  
   64.31      static char *kwd_list[] = { "dom", NULL };
   64.32  
   64.33 @@ -119,7 +119,7 @@ static PyObject *pyxc_domain_unpause(PyO
   64.34  {
   64.35      XcObject *xc = (XcObject *)self;
   64.36  
   64.37 -    u32 dom;
   64.38 +    uint32_t dom;
   64.39  
   64.40      static char *kwd_list[] = { "dom", NULL };
   64.41  
   64.42 @@ -139,7 +139,7 @@ static PyObject *pyxc_domain_destroy(PyO
   64.43  {
   64.44      XcObject *xc = (XcObject *)self;
   64.45  
   64.46 -    u32 dom;
   64.47 +    uint32_t dom;
   64.48  
   64.49      static char *kwd_list[] = { "dom", NULL };
   64.50  
   64.51 @@ -159,7 +159,7 @@ static PyObject *pyxc_domain_pincpu(PyOb
   64.52  {
   64.53      XcObject *xc = (XcObject *)self;
   64.54  
   64.55 -    u32 dom;
   64.56 +    uint32_t dom;
   64.57      int vcpu = 0;
   64.58      cpumap_t cpumap = 0xFFFFFFFF;
   64.59  
   64.60 @@ -182,7 +182,7 @@ static PyObject *pyxc_domain_setcpuweigh
   64.61  {
   64.62      XcObject *xc = (XcObject *)self;
   64.63  
   64.64 -    u32 dom;
   64.65 +    uint32_t dom;
   64.66      float cpuweight = 1;
   64.67  
   64.68      static char *kwd_list[] = { "dom", "cpuweight", NULL };
   64.69 @@ -205,7 +205,7 @@ static PyObject *pyxc_domain_getinfo(PyO
   64.70      XcObject *xc = (XcObject *)self;
   64.71      PyObject *list, *vcpu_list, *cpumap_list, *info_dict;
   64.72  
   64.73 -    u32 first_dom = 0;
   64.74 +    uint32_t first_dom = 0;
   64.75      int max_doms = 1024, nr_doms, i, j;
   64.76      xc_dominfo_t *info;
   64.77  
   64.78 @@ -270,7 +270,7 @@ static PyObject *pyxc_linux_build(PyObje
   64.79  {
   64.80      XcObject *xc = (XcObject *)self;
   64.81  
   64.82 -    u32 dom;
   64.83 +    uint32_t dom;
   64.84      char *image, *ramdisk = NULL, *cmdline = "";
   64.85      int flags = 0, vcpus = 1;
   64.86      int store_evtchn, console_evtchn;
   64.87 @@ -308,7 +308,7 @@ static PyObject *pyxc_vmx_build(PyObject
   64.88  {
   64.89      XcObject *xc = (XcObject *)self;
   64.90  
   64.91 -    u32   dom;
   64.92 +    uint32_t   dom;
   64.93      char *image;
   64.94      int   control_evtchn, store_evtchn;
   64.95      int flags = 0, vcpus = 1;
   64.96 @@ -373,10 +373,10 @@ static PyObject *pyxc_bvtsched_domain_se
   64.97  {
   64.98      XcObject *xc = (XcObject *)self;
   64.99  
  64.100 -    u32 dom;
  64.101 -    u32 mcuadv;
  64.102 +    uint32_t dom;
  64.103 +    uint32_t mcuadv;
  64.104      int warpback; 
  64.105 -    s32 warpvalue;
  64.106 +    int32_t warpvalue;
  64.107      long long warpl;
  64.108      long long warpu;
  64.109  
  64.110 @@ -401,10 +401,10 @@ static PyObject *pyxc_bvtsched_domain_ge
  64.111                                            PyObject *kwds)
  64.112  {
  64.113      XcObject *xc = (XcObject *)self;
  64.114 -    u32 dom;
  64.115 -    u32 mcuadv;
  64.116 +    uint32_t dom;
  64.117 +    uint32_t mcuadv;
  64.118      int warpback; 
  64.119 -    s32 warpvalue;
  64.120 +    int32_t warpvalue;
  64.121      long long warpl;
  64.122      long long warpu;
  64.123      
  64.124 @@ -432,7 +432,7 @@ static PyObject *pyxc_evtchn_alloc_unbou
  64.125  {
  64.126      XcObject *xc = (XcObject *)self;
  64.127  
  64.128 -    u32 dom, remote_dom;
  64.129 +    uint32_t dom, remote_dom;
  64.130      int port;
  64.131  
  64.132      static char *kwd_list[] = { "dom", "remote_dom", NULL };
  64.133 @@ -454,7 +454,7 @@ static PyObject *pyxc_evtchn_status(PyOb
  64.134      XcObject *xc = (XcObject *)self;
  64.135      PyObject *dict;
  64.136  
  64.137 -    u32 dom = DOMID_SELF;
  64.138 +    uint32_t dom = DOMID_SELF;
  64.139      int port, ret;
  64.140      xc_evtchn_status_t status;
  64.141  
  64.142 @@ -507,7 +507,7 @@ static PyObject *pyxc_physdev_pci_access
  64.143                                                  PyObject *kwds)
  64.144  {
  64.145      XcObject *xc = (XcObject *)self;
  64.146 -    u32 dom;
  64.147 +    uint32_t dom;
  64.148      int bus, dev, func, enable, ret;
  64.149  
  64.150      static char *kwd_list[] = { "dom", "bus", "dev", "func", "enable", NULL };
  64.151 @@ -635,9 +635,9 @@ static PyObject *pyxc_sedf_domain_set(Py
  64.152                                           PyObject *kwds)
  64.153  {
  64.154      XcObject *xc = (XcObject *)self;
  64.155 -    u32 domid;
  64.156 -    u64 period, slice, latency;
  64.157 -    u16 extratime, weight;
  64.158 +    uint32_t domid;
  64.159 +    uint64_t period, slice, latency;
  64.160 +    uint16_t extratime, weight;
  64.161      static char *kwd_list[] = { "dom", "period", "slice",
  64.162                                  "latency", "extratime", "weight",NULL };
  64.163      
  64.164 @@ -658,9 +658,9 @@ static PyObject *pyxc_sedf_domain_get(Py
  64.165                                           PyObject *kwds)
  64.166  {
  64.167      XcObject *xc = (XcObject *)self;
  64.168 -    u32 domid;
  64.169 -    u64 period, slice,latency;
  64.170 -    u16 weight, extratime;
  64.171 +    uint32_t domid;
  64.172 +    uint64_t period, slice,latency;
  64.173 +    uint16_t weight, extratime;
  64.174      
  64.175      static char *kwd_list[] = { "dom", NULL };
  64.176  
  64.177 @@ -685,7 +685,7 @@ static PyObject *pyxc_shadow_control(PyO
  64.178  {
  64.179      XcObject *xc = (XcObject *)self;
  64.180  
  64.181 -    u32 dom;
  64.182 +    uint32_t dom;
  64.183      int op=0;
  64.184  
  64.185      static char *kwd_list[] = { "dom", "op", NULL };
  64.186 @@ -707,7 +707,7 @@ static PyObject *pyxc_domain_setmaxmem(P
  64.187  {
  64.188      XcObject *xc = (XcObject *)self;
  64.189  
  64.190 -    u32 dom;
  64.191 +    uint32_t dom;
  64.192      unsigned int maxmem_kb;
  64.193  
  64.194      static char *kwd_list[] = { "dom", "maxmem_kb", NULL };
  64.195 @@ -729,7 +729,7 @@ static PyObject *pyxc_domain_memory_incr
  64.196  {
  64.197      XcObject *xc = (XcObject *)self;
  64.198  
  64.199 -    u32 dom;
  64.200 +    uint32_t dom;
  64.201      unsigned long mem_kb;
  64.202      unsigned int extent_order = 0 , address_bits = 0;
  64.203      unsigned long nr_extents;
    65.1 --- a/tools/python/xen/lowlevel/xs/xs.c	Wed Oct 12 10:11:35 2005 +0100
    65.2 +++ b/tools/python/xen/lowlevel/xs/xs.c	Wed Oct 12 11:07:37 2005 +0100
    65.3 @@ -28,6 +28,7 @@
    65.4  #include <sys/stat.h>
    65.5  #include <fcntl.h>
    65.6  
    65.7 +#include <xenctrl.h>
    65.8  #include "xs.h"
    65.9  
   65.10  /** @file
    66.1 --- a/tools/security/Makefile	Wed Oct 12 10:11:35 2005 +0100
    66.2 +++ b/tools/security/Makefile	Wed Oct 12 11:07:37 2005 +0100
    66.3 @@ -47,10 +47,10 @@ build: mk-symlinks
    66.4  	chmod 700 ./updategrub.sh
    66.5  	chmod 700 ./getlabel.sh
    66.6  
    66.7 -secpol_tool : secpol_tool.c secpol_compat.h
    66.8 +secpol_tool : secpol_tool.c
    66.9  	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $<
   66.10  
   66.11 -secpol_xml2bin : secpol_xml2bin.c secpol_xml2bin.h secpol_compat.h
   66.12 +secpol_xml2bin : secpol_xml2bin.c secpol_xml2bin.h
   66.13  	$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_XML2BIN) $(VALIDATE_SCHEMA) -o $@ $<
   66.14  
   66.15  clean:
    67.1 --- a/tools/security/secpol_compat.h	Wed Oct 12 10:11:35 2005 +0100
    67.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    67.3 @@ -1,14 +0,0 @@
    67.4 -/* secpol_compat.h
    67.5 - *     'translates' data types necessary to
    67.6 - *     include <xen/acm.h>
    67.7 - */
    67.8 -#include <stdint.h>
    67.9 -
   67.10 -typedef uint8_t  u8;
   67.11 -typedef uint16_t u16;
   67.12 -typedef uint32_t u32;
   67.13 -typedef uint64_t u64;
   67.14 -typedef int8_t   s8;
   67.15 -typedef int16_t  s16;
   67.16 -typedef int32_t  s32;
   67.17 -typedef int64_t  s64;
    68.1 --- a/tools/security/secpol_tool.c	Wed Oct 12 10:11:35 2005 +0100
    68.2 +++ b/tools/security/secpol_tool.c	Wed Oct 12 11:07:37 2005 +0100
    68.3 @@ -33,7 +33,7 @@
    68.4  #include <sys/ioctl.h>
    68.5  #include <string.h>
    68.6  #include <netinet/in.h>
    68.7 -#include "secpol_compat.h"
    68.8 +#include <stdint.h>
    68.9  #include <xen/acm.h>
   68.10  #include <xen/acm_ops.h>
   68.11  #include <xen/linux/privcmd.h>
    69.1 --- a/tools/security/secpol_xml2bin.c	Wed Oct 12 10:11:35 2005 +0100
    69.2 +++ b/tools/security/secpol_xml2bin.c	Wed Oct 12 11:07:37 2005 +0100
    69.3 @@ -37,7 +37,7 @@
    69.4  #include <libxml/parser.h>
    69.5  #include <libxml/tree.h>
    69.6  #include <libxml/xmlreader.h>
    69.7 -#include "secpol_compat.h"
    69.8 +#include <stdint.h>
    69.9  #include <xen/acm.h>
   69.10  
   69.11  #include "secpol_xml2bin.h"
    70.1 --- a/tools/xenstat/libxenstat/src/xen-interface.h	Wed Oct 12 10:11:35 2005 +0100
    70.2 +++ b/tools/xenstat/libxenstat/src/xen-interface.h	Wed Oct 12 11:07:37 2005 +0100
    70.3 @@ -16,16 +16,6 @@
    70.4   */
    70.5  
    70.6  #include <stdint.h>
    70.7 -
    70.8 -typedef int8_t   s8;
    70.9 -typedef int16_t  s16;
   70.10 -typedef int32_t  s32;
   70.11 -typedef int64_t  s64;
   70.12 -typedef uint8_t  u8;
   70.13 -typedef uint16_t u16;
   70.14 -typedef uint32_t u32;
   70.15 -typedef uint64_t u64;
   70.16 -
   70.17  #include <xen/xen.h>
   70.18  #include <xen/dom0_ops.h>
   70.19  #include <xen/sched.h>
    71.1 --- a/tools/xenstore/fake_libxc.c	Wed Oct 12 10:11:35 2005 +0100
    71.2 +++ b/tools/xenstore/fake_libxc.c	Wed Oct 12 11:07:37 2005 +0100
    71.3 @@ -30,10 +30,11 @@
    71.4  #include "xenstored_core.h"
    71.5  #include "xenstored_domain.h"
    71.6  #include "xenstored_test.h"
    71.7 +#include <xenctrl.h>
    71.8  
    71.9  static int sigfd;
   71.10  static int xs_test_pid;
   71.11 -static u16 port;
   71.12 +static uint16_t port;
   71.13  
   71.14  /* The event channel maps to a signal, shared page to an mmapped file. */
   71.15  void evtchn_notify(int local_port)
   71.16 @@ -43,7 +44,7 @@ void evtchn_notify(int local_port)
   71.17  		barf_perror("fake event channel failed");
   71.18  }
   71.19  
   71.20 -void *xc_map_foreign_range(int xc_handle, u32 dom __attribute__((unused)),
   71.21 +void *xc_map_foreign_range(int xc_handle, uint32_t dom __attribute__((unused)),
   71.22  			   int size, int prot,
   71.23  			   unsigned long mfn __attribute__((unused)))
   71.24  {
   71.25 @@ -83,7 +84,7 @@ int xc_interface_close(int xc_handle)
   71.26  }
   71.27  
   71.28  int xc_domain_getinfo(int xc_handle __attribute__((unused)),
   71.29 -		      u32 first_domid, unsigned int max_doms,
   71.30 +		      uint32_t first_domid, unsigned int max_doms,
   71.31                        xc_dominfo_t *info)
   71.32  {
   71.33  	assert(max_doms == 1);
    72.1 --- a/tools/xenstore/tdb.c	Wed Oct 12 10:11:35 2005 +0100
    72.2 +++ b/tools/xenstore/tdb.c	Wed Oct 12 11:07:37 2005 +0100
    72.3 @@ -154,9 +154,9 @@ static void tdb_mmap(TDB_CONTEXT *tdb)
    72.4  }
    72.5  
    72.6  /* Endian conversion: we only ever deal with 4 byte quantities */
    72.7 -static void *convert(void *buf, u32 size)
    72.8 +static void *convert(void *buf, uint32_t size)
    72.9  {
   72.10 -	u32 i, *p = buf;
   72.11 +	uint32_t i, *p = buf;
   72.12  	for (i = 0; i < size / 4; i++)
   72.13  		p[i] = TDB_BYTEREV(p[i]);
   72.14  	return buf;
   72.15 @@ -171,8 +171,8 @@ struct list_struct {
   72.16  	tdb_len rec_len; /* total byte length of record */
   72.17  	tdb_len key_len; /* byte length of key */
   72.18  	tdb_len data_len; /* byte length of data */
   72.19 -	u32 full_hash; /* the full 32 bit hash of the key */
   72.20 -	u32 magic;   /* try to catch errors */
   72.21 +	uint32_t full_hash; /* the full 32 bit hash of the key */
   72.22 +	uint32_t magic;   /* try to catch errors */
   72.23  	/* the following union is implied:
   72.24  		union {
   72.25  			char record[rec_len];
   72.26 @@ -180,7 +180,7 @@ struct list_struct {
   72.27  				char key[key_len];
   72.28  				char data[data_len];
   72.29  			}
   72.30 -			u32 totalsize; (tailer)
   72.31 +			uint32_t totalsize; (tailer)
   72.32  		}
   72.33  	*/
   72.34  };
   72.35 @@ -294,10 +294,10 @@ static int tdb_unlock(TDB_CONTEXT *tdb, 
   72.36  }
   72.37  
   72.38  /* This is based on the hash algorithm from gdbm */
   72.39 -static u32 default_tdb_hash(TDB_DATA *key)
   72.40 +static uint32_t default_tdb_hash(TDB_DATA *key)
   72.41  {
   72.42 -	u32 value;	/* Used to compute the hash value.  */
   72.43 -	u32   i;	/* Used to cycle through random values. */
   72.44 +	uint32_t value;	/* Used to compute the hash value.  */
   72.45 +	uint32_t   i;	/* Used to cycle through random values. */
   72.46  
   72.47  	/* Set the initial value from the key size. */
   72.48  	for (value = 0x238F13AF * key->dsize, i=0; i < key->dsize; i++)
   72.49 @@ -399,7 +399,7 @@ static int tdb_read(TDB_CONTEXT *tdb,tdb
   72.50  static int tdb_key_eq(TDB_CONTEXT *tdb, tdb_off off, TDB_DATA key)
   72.51  {
   72.52  	char buf[64];
   72.53 -	u32 len;
   72.54 +	uint32_t len;
   72.55  
   72.56  	if (tdb_oob(tdb, off + key.dsize, 0) != 0)
   72.57  		return -1;
   72.58 @@ -1030,7 +1030,7 @@ static int tdb_new_database(TDB_CONTEXT 
   72.59  
   72.60  /* Returns 0 on fail.  On success, return offset of record, and fills
   72.61     in rec */
   72.62 -static tdb_off tdb_find(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash,
   72.63 +static tdb_off tdb_find(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash,
   72.64  			struct list_struct *r)
   72.65  {
   72.66  	tdb_off rec_ptr;
   72.67 @@ -1058,10 +1058,10 @@ static tdb_off tdb_find(TDB_CONTEXT *tdb
   72.68  }
   72.69  
   72.70  /* As tdb_find, but if you succeed, keep the lock */
   72.71 -static tdb_off tdb_find_lock_hash(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash, int locktype,
   72.72 +static tdb_off tdb_find_lock_hash(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash, int locktype,
   72.73  			     struct list_struct *rec)
   72.74  {
   72.75 -	u32 rec_ptr;
   72.76 +	uint32_t rec_ptr;
   72.77  
   72.78  	if (tdb_lock(tdb, BUCKET(hash), locktype) == -1)
   72.79  		return 0;
   72.80 @@ -1089,7 +1089,7 @@ static struct tdb_errname {
   72.81  /* Error string for the last tdb error */
   72.82  const char *tdb_errorstr(TDB_CONTEXT *tdb)
   72.83  {
   72.84 -	u32 i;
   72.85 +	uint32_t i;
   72.86  	for (i = 0; i < sizeof(emap) / sizeof(struct tdb_errname); i++)
   72.87  		if (tdb->ecode == emap[i].ecode)
   72.88  			return emap[i].estring;
   72.89 @@ -1101,7 +1101,7 @@ const char *tdb_errorstr(TDB_CONTEXT *td
   72.90     on failure return -1.
   72.91  */
   72.92  
   72.93 -static int tdb_update_hash(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash, TDB_DATA dbuf)
   72.94 +static int tdb_update_hash(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash, TDB_DATA dbuf)
   72.95  {
   72.96  	struct list_struct rec;
   72.97  	tdb_off rec_ptr;
   72.98 @@ -1141,7 +1141,7 @@ TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB
   72.99  	tdb_off rec_ptr;
  72.100  	struct list_struct rec;
  72.101  	TDB_DATA ret;
  72.102 -	u32 hash;
  72.103 +	uint32_t hash;
  72.104  
  72.105  	/* find which hash bucket it is in */
  72.106  	hash = tdb->hash_fn(&key);
  72.107 @@ -1161,7 +1161,7 @@ TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB
  72.108     this doesn't match the conventions in the rest of this module, but is
  72.109     compatible with gdbm
  72.110  */
  72.111 -static int tdb_exists_hash(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash)
  72.112 +static int tdb_exists_hash(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash)
  72.113  {
  72.114  	struct list_struct rec;
  72.115  	
  72.116 @@ -1173,7 +1173,7 @@ static int tdb_exists_hash(TDB_CONTEXT *
  72.117  
  72.118  int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key)
  72.119  {
  72.120 -	u32 hash = tdb->hash_fn(&key);
  72.121 +	uint32_t hash = tdb->hash_fn(&key);
  72.122  	return tdb_exists_hash(tdb, key, hash);
  72.123  }
  72.124  
  72.125 @@ -1210,7 +1210,7 @@ static int write_unlock_record(TDB_CONTE
  72.126  static int unlock_record(TDB_CONTEXT *tdb, tdb_off off)
  72.127  {
  72.128  	struct tdb_traverse_lock *i;
  72.129 -	u32 count = 0;
  72.130 +	uint32_t count = 0;
  72.131  
  72.132  	if (off == 0)
  72.133  		return 0;
  72.134 @@ -1293,10 +1293,10 @@ static int tdb_next_lock(TDB_CONTEXT *td
  72.135  		   system (testing using ldbtest).
  72.136  		 */
  72.137  		if (!tlock->off && tlock->hash != 0) {
  72.138 -			u32 off;
  72.139 +			uint32_t off;
  72.140  			if (tdb->map_ptr) {
  72.141  				for (;tlock->hash < tdb->header.hash_size;tlock->hash++) {
  72.142 -					if (0 != *(u32 *)(TDB_HASH_TOP(tlock->hash) + (unsigned char *)tdb->map_ptr)) {
  72.143 +					if (0 != *(uint32_t *)(TDB_HASH_TOP(tlock->hash) + (unsigned char *)tdb->map_ptr)) {
  72.144  						break;
  72.145  					}
  72.146  				}
  72.147 @@ -1459,7 +1459,7 @@ TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb)
  72.148  /* find the next entry in the database, returning its key */
  72.149  TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey)
  72.150  {
  72.151 -	u32 oldhash;
  72.152 +	uint32_t oldhash;
  72.153  	TDB_DATA key = tdb_null;
  72.154  	struct list_struct rec;
  72.155  	char *k = NULL;
  72.156 @@ -1513,7 +1513,7 @@ TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, T
  72.157  }
  72.158  
  72.159  /* delete an entry in the database given a key */
  72.160 -static int tdb_delete_hash(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash)
  72.161 +static int tdb_delete_hash(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash)
  72.162  {
  72.163  	tdb_off rec_ptr;
  72.164  	struct list_struct rec;
  72.165 @@ -1529,7 +1529,7 @@ static int tdb_delete_hash(TDB_CONTEXT *
  72.166  
  72.167  int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key)
  72.168  {
  72.169 -	u32 hash = tdb->hash_fn(&key);
  72.170 +	uint32_t hash = tdb->hash_fn(&key);
  72.171  	return tdb_delete_hash(tdb, key, hash);
  72.172  }
  72.173  
  72.174 @@ -1541,7 +1541,7 @@ int tdb_delete(TDB_CONTEXT *tdb, TDB_DAT
  72.175  int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag)
  72.176  {
  72.177  	struct list_struct rec;
  72.178 -	u32 hash;
  72.179 +	uint32_t hash;
  72.180  	tdb_off rec_ptr;
  72.181  	char *p = NULL;
  72.182  	int ret = 0;
  72.183 @@ -1622,7 +1622,7 @@ fail:
  72.184     is <= the old data size and the key exists.
  72.185     on failure return -1. Record must be locked before calling.
  72.186  */
  72.187 -static int tdb_append_inplace(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash, TDB_DATA new_dbuf)
  72.188 +static int tdb_append_inplace(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash, TDB_DATA new_dbuf)
  72.189  {
  72.190  	struct list_struct rec;
  72.191  	tdb_off rec_ptr;
  72.192 @@ -1656,7 +1656,7 @@ static int tdb_append_inplace(TDB_CONTEX
  72.193  int tdb_append(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA new_dbuf)
  72.194  {
  72.195  	struct list_struct rec;
  72.196 -	u32 hash;
  72.197 +	uint32_t hash;
  72.198  	tdb_off rec_ptr;
  72.199  	char *p = NULL;
  72.200  	int ret = 0;
  72.201 @@ -1790,7 +1790,7 @@ TDB_CONTEXT *tdb_open_ex(const char *nam
  72.202  	struct stat st;
  72.203  	int rev = 0, locked = 0;
  72.204  	uint8_t *vp;
  72.205 -	u32 vertest;
  72.206 +	uint32_t vertest;
  72.207  
  72.208  	if (!(tdb = talloc_zero(name, TDB_CONTEXT))) {
  72.209  		/* Can't log this */
  72.210 @@ -1869,8 +1869,8 @@ TDB_CONTEXT *tdb_open_ex(const char *nam
  72.211  		rev = (tdb->flags & TDB_CONVERT);
  72.212  	}
  72.213  	vp = (uint8_t *)&tdb->header.version;
  72.214 -	vertest = (((u32)vp[0]) << 24) | (((u32)vp[1]) << 16) |
  72.215 -		  (((u32)vp[2]) << 8) | (u32)vp[3];
  72.216 +	vertest = (((uint32_t)vp[0]) << 24) | (((uint32_t)vp[1]) << 16) |
  72.217 +		  (((uint32_t)vp[2]) << 8) | (uint32_t)vp[3];
  72.218  	tdb->flags |= (vertest==TDB_VERSION) ? TDB_BIGENDIAN : 0;
  72.219  	if (!rev)
  72.220  		tdb->flags &= ~TDB_CONVERT;
  72.221 @@ -2000,7 +2000,7 @@ int tdb_close(TDB_CONTEXT *tdb)
  72.222  /* lock/unlock entire database */
  72.223  int tdb_lockall(TDB_CONTEXT *tdb)
  72.224  {
  72.225 -	u32 i;
  72.226 +	uint32_t i;
  72.227  
  72.228  	/* There are no locks on read-only dbs */
  72.229  	if (tdb->read_only)
  72.230 @@ -2011,7 +2011,7 @@ int tdb_lockall(TDB_CONTEXT *tdb)
  72.231  
  72.232  	/* If error, release locks we have... */
  72.233  	if (i < tdb->header.hash_size) {
  72.234 -		u32 j;
  72.235 +		uint32_t j;
  72.236  
  72.237  		for ( j = 0; j < i; j++)
  72.238  			tdb_unlock(tdb, j, F_WRLCK);
  72.239 @@ -2022,7 +2022,7 @@ int tdb_lockall(TDB_CONTEXT *tdb)
  72.240  }
  72.241  void tdb_unlockall(TDB_CONTEXT *tdb)
  72.242  {
  72.243 -	u32 i;
  72.244 +	uint32_t i;
  72.245  	for (i=0; i < tdb->header.hash_size; i++)
  72.246  		tdb_unlock(tdb, i, F_WRLCK);
  72.247  }
    73.1 --- a/tools/xenstore/tdb.h	Wed Oct 12 10:11:35 2005 +0100
    73.2 +++ b/tools/xenstore/tdb.h	Wed Oct 12 11:07:37 2005 +0100
    73.3 @@ -53,8 +53,8 @@ enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_C
    73.4  		TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT,
    73.5  		TDB_ERR_NOEXIST};
    73.6  
    73.7 -#ifndef u32
    73.8 -#define u32 unsigned
    73.9 +#ifndef uint32_t
   73.10 +#define uint32_t unsigned
   73.11  #endif
   73.12  
   73.13  typedef struct TDB_DATA {
   73.14 @@ -62,27 +62,27 @@ typedef struct TDB_DATA {
   73.15  	size_t dsize;
   73.16  } TDB_DATA;
   73.17  
   73.18 -typedef u32 tdb_len;
   73.19 -typedef u32 tdb_off;
   73.20 +typedef uint32_t tdb_len;
   73.21 +typedef uint32_t tdb_off;
   73.22  
   73.23  /* this is stored at the front of every database */
   73.24  struct tdb_header {
   73.25  	char magic_food[32]; /* for /etc/magic */
   73.26 -	u32 version; /* version of the code */
   73.27 -	u32 hash_size; /* number of hash entries */
   73.28 +	uint32_t version; /* version of the code */
   73.29 +	uint32_t hash_size; /* number of hash entries */
   73.30  	tdb_off rwlocks;
   73.31  	tdb_off reserved[31];
   73.32  };
   73.33  
   73.34  struct tdb_lock_type {
   73.35 -	u32 count;
   73.36 -	u32 ltype;
   73.37 +	uint32_t count;
   73.38 +	uint32_t ltype;
   73.39  };
   73.40  
   73.41  struct tdb_traverse_lock {
   73.42  	struct tdb_traverse_lock *next;
   73.43 -	u32 off;
   73.44 -	u32 hash;
   73.45 +	uint32_t off;
   73.46 +	uint32_t hash;
   73.47  };
   73.48  
   73.49  #ifndef PRINTF_ATTRIBUTE
   73.50 @@ -99,19 +99,19 @@ typedef struct tdb_context {
   73.51  	struct tdb_lock_type *locked; /* array of chain locks */
   73.52  	enum TDB_ERROR ecode; /* error code for last tdb error */
   73.53  	struct tdb_header header; /* a cached copy of the header */
   73.54 -	u32 flags; /* the flags passed to tdb_open */
   73.55 +	uint32_t flags; /* the flags passed to tdb_open */
   73.56  	struct tdb_traverse_lock travlocks; /* current traversal locks */
   73.57  	struct tdb_context *next; /* all tdbs to avoid multiple opens */
   73.58  	dev_t device;	/* uniquely identifies this tdb */
   73.59  	ino_t inode;	/* uniquely identifies this tdb */
   73.60  	void (*log_fn)(struct tdb_context *tdb, int level, const char *, ...) PRINTF_ATTRIBUTE(3,4); /* logging function */
   73.61 -	u32 (*hash_fn)(TDB_DATA *key);
   73.62 +	uint32_t (*hash_fn)(TDB_DATA *key);
   73.63  	int open_flags; /* flags used in the open - needed by reopen */
   73.64  } TDB_CONTEXT;
   73.65  
   73.66  typedef int (*tdb_traverse_func)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *);
   73.67  typedef void (*tdb_log_func)(TDB_CONTEXT *, int , const char *, ...);
   73.68 -typedef u32 (*tdb_hash_func)(TDB_DATA *key);
   73.69 +typedef uint32_t (*tdb_hash_func)(TDB_DATA *key);
   73.70  
   73.71  TDB_CONTEXT *tdb_open(const char *name, int hash_size, int tdb_flags,
   73.72  		      int open_flags, mode_t mode);
    74.1 --- a/tools/xenstore/xenstored_core.c	Wed Oct 12 10:11:35 2005 +0100
    74.2 +++ b/tools/xenstore/xenstored_core.c	Wed Oct 12 11:07:37 2005 +0100
    74.3 @@ -378,7 +378,7 @@ bool is_child(const char *child, const c
    74.4  static struct node *read_node(struct connection *conn, const char *name)
    74.5  {
    74.6  	TDB_DATA key, data;
    74.7 -	u32 *p;
    74.8 +	uint32_t *p;
    74.9  	struct node *node;
   74.10  
   74.11  	key.dptr = (void *)name;
   74.12 @@ -400,7 +400,7 @@ static struct node *read_node(struct con
   74.13  	talloc_steal(node, data.dptr);
   74.14  
   74.15  	/* Datalen, childlen, number of permissions */
   74.16 -	p = (u32 *)data.dptr;
   74.17 +	p = (uint32_t *)data.dptr;
   74.18  	node->num_perms = p[0];
   74.19  	node->datalen = p[1];
   74.20  	node->childlen = p[2];
   74.21 @@ -423,14 +423,14 @@ static bool write_node(struct connection
   74.22  	key.dptr = (void *)node->name;
   74.23  	key.dsize = strlen(node->name);
   74.24  
   74.25 -	data.dsize = 3*sizeof(u32)
   74.26 +	data.dsize = 3*sizeof(uint32_t)
   74.27  		+ node->num_perms*sizeof(node->perms[0])
   74.28  		+ node->datalen + node->childlen;
   74.29  	data.dptr = talloc_size(node, data.dsize);
   74.30 -	((u32 *)data.dptr)[0] = node->num_perms;
   74.31 -	((u32 *)data.dptr)[1] = node->datalen;
   74.32 -	((u32 *)data.dptr)[2] = node->childlen;
   74.33 -	p = data.dptr + 3 * sizeof(u32);
   74.34 +	((uint32_t *)data.dptr)[0] = node->num_perms;
   74.35 +	((uint32_t *)data.dptr)[1] = node->datalen;
   74.36 +	((uint32_t *)data.dptr)[2] = node->childlen;
   74.37 +	p = data.dptr + 3 * sizeof(uint32_t);
   74.38  
   74.39  	memcpy(p, node->perms, node->num_perms*sizeof(node->perms[0]));
   74.40  	p += node->num_perms*sizeof(node->perms[0]);
   74.41 @@ -668,7 +668,7 @@ static char *perms_to_strings(const void
   74.42  {
   74.43  	unsigned int i;
   74.44  	char *strings = NULL;
   74.45 -	char buffer[MAX_STRLEN(domid_t) + 1];
   74.46 +	char buffer[MAX_STRLEN(unsigned int) + 1];
   74.47  
   74.48  	for (*len = 0, i = 0; i < num; i++) {
   74.49  		if (!xs_perm_to_string(&perms[i], buffer))
    75.1 --- a/tools/xenstore/xenstored_core.h	Wed Oct 12 10:11:35 2005 +0100
    75.2 +++ b/tools/xenstore/xenstored_core.h	Wed Oct 12 11:07:37 2005 +0100
    75.3 @@ -60,7 +60,7 @@ struct connection
    75.4  	int fd;
    75.5  
    75.6  	/* Who am I? 0 for socket connections. */
    75.7 -	domid_t id;
    75.8 +	unsigned int id;
    75.9  
   75.10  	/* Is this a read-only connection? */
   75.11  	bool can_write;
   75.12 @@ -76,7 +76,7 @@ struct connection
   75.13  
   75.14  	/* List of in-progress transactions. */
   75.15  	struct list_head transaction_list;
   75.16 -	u32 next_transaction_id;
   75.17 +	uint32_t next_transaction_id;
   75.18  
   75.19  	/* The domain I'm associated with, if any. */
   75.20  	struct domain *domain;
    76.1 --- a/tools/xenstore/xenstored_domain.c	Wed Oct 12 10:11:35 2005 +0100
    76.2 +++ b/tools/xenstore/xenstored_domain.c	Wed Oct 12 11:07:37 2005 +0100
    76.3 @@ -36,6 +36,7 @@
    76.4  #include "xenstored_watch.h"
    76.5  #include "xenstored_test.h"
    76.6  
    76.7 +#include <xenctrl.h>
    76.8  #include <xen/linux/evtchn.h>
    76.9  
   76.10  static int *xc_handle;
   76.11 @@ -48,14 +49,14 @@ struct domain
   76.12  	struct list_head list;
   76.13  
   76.14  	/* The id of this domain */
   76.15 -	domid_t domid;
   76.16 +	unsigned int domid;
   76.17  
   76.18  	/* Event channel port */
   76.19 -	u16 port;
   76.20 +	uint16_t port;
   76.21  
   76.22  	/* The remote end of the event channel, used only to validate
   76.23  	   repeated domain introductions. */
   76.24 -	u16 remote_port;
   76.25 +	uint16_t remote_port;
   76.26  
   76.27  	/* The mfn associated with the event channel, used only to validate
   76.28  	   repeated domain introductions. */
   76.29 @@ -81,9 +82,9 @@ static LIST_HEAD(domains);
   76.30  
   76.31  struct ringbuf_head
   76.32  {
   76.33 -	u32 write; /* Next place to write to */
   76.34 -	u32 read; /* Next place to read from */
   76.35 -	u8 flags;
   76.36 +	uint32_t write; /* Next place to write to */
   76.37 +	uint32_t read; /* Next place to read from */
   76.38 +	uint8_t flags;
   76.39  	char buf[0];
   76.40  } __attribute__((packed));
   76.41  
   76.42 @@ -106,9 +107,9 @@ static bool check_buffer(const struct ri
   76.43  
   76.44  /* We can't fill last byte: would look like empty buffer. */
   76.45  static void *get_output_chunk(const struct ringbuf_head *h,
   76.46 -			      void *buf, u32 *len)
   76.47 +			      void *buf, uint32_t *len)
   76.48  {
   76.49 -	u32 read_mark;
   76.50 +	uint32_t read_mark;
   76.51  
   76.52  	if (h->read == 0)
   76.53  		read_mark = ringbuf_datasize - 1;
   76.54 @@ -123,7 +124,7 @@ static void *get_output_chunk(const stru
   76.55  }
   76.56  
   76.57  static const void *get_input_chunk(const struct ringbuf_head *h,
   76.58 -				   const void *buf, u32 *len)
   76.59 +				   const void *buf, uint32_t *len)
   76.60  {
   76.61  	/* Here to the end of buffer, unless they haven't written some. */
   76.62  	*len = ringbuf_datasize - h->read;
   76.63 @@ -132,14 +133,14 @@ static const void *get_input_chunk(const
   76.64  	return buf + h->read;
   76.65  }
   76.66  
   76.67 -static void update_output_chunk(struct ringbuf_head *h, u32 len)
   76.68 +static void update_output_chunk(struct ringbuf_head *h, uint32_t len)
   76.69  {
   76.70  	h->write += len;
   76.71  	if (h->write == ringbuf_datasize)
   76.72  		h->write = 0;
   76.73  }
   76.74  
   76.75 -static void update_input_chunk(struct ringbuf_head *h, u32 len)
   76.76 +static void update_input_chunk(struct ringbuf_head *h, uint32_t len)
   76.77  {
   76.78  	h->read += len;
   76.79  	if (h->read == ringbuf_datasize)
   76.80 @@ -148,7 +149,7 @@ static void update_input_chunk(struct ri
   76.81  
   76.82  static bool buffer_has_input(const struct ringbuf_head *h)
   76.83  {
   76.84 -	u32 len;
   76.85 +	uint32_t len;
   76.86  
   76.87  	get_input_chunk(h, NULL, &len);
   76.88  	return (len != 0);
   76.89 @@ -156,7 +157,7 @@ static bool buffer_has_input(const struc
   76.90  
   76.91  static bool buffer_has_output_room(const struct ringbuf_head *h)
   76.92  {
   76.93 -	u32 len;
   76.94 +	uint32_t len;
   76.95  
   76.96  	get_output_chunk(h, NULL, &len);
   76.97  	return (len != 0);
   76.98 @@ -164,7 +165,7 @@ static bool buffer_has_output_room(const
   76.99  
  76.100  static int writechn(struct connection *conn, const void *data, unsigned int len)
  76.101  {
  76.102 -	u32 avail;
  76.103 +	uint32_t avail;
  76.104  	void *dest;
  76.105  	struct ringbuf_head h;
  76.106  
  76.107 @@ -189,7 +190,7 @@ static int writechn(struct connection *c
  76.108  
  76.109  static int readchn(struct connection *conn, void *data, unsigned int len)
  76.110  {
  76.111 -	u32 avail;
  76.112 +	uint32_t avail;
  76.113  	const void *src;
  76.114  	struct ringbuf_head h;
  76.115  	bool was_full;
  76.116 @@ -268,7 +269,7 @@ static void domain_cleanup(void)
  76.117  /* We scan all domains rather than use the information given here. */
  76.118  void handle_event(void)
  76.119  {
  76.120 -	u16 port;
  76.121 +	uint16_t port;
  76.122  
  76.123  	if (read(event_fd, &port, sizeof(port)) != sizeof(port))
  76.124  		barf_perror("Failed to read from event fd");
  76.125 @@ -293,7 +294,7 @@ bool domain_can_write(struct connection 
  76.126                  buffer_has_output_room(conn->domain->output));
  76.127  }
  76.128  
  76.129 -static struct domain *new_domain(void *context, domid_t domid,
  76.130 +static struct domain *new_domain(void *context, unsigned int domid,
  76.131  				 unsigned long mfn, int port,
  76.132  				 const char *path)
  76.133  {
  76.134 @@ -338,7 +339,7 @@ static struct domain *new_domain(void *c
  76.135  }
  76.136  
  76.137  
  76.138 -static struct domain *find_domain_by_domid(domid_t domid)
  76.139 +static struct domain *find_domain_by_domid(unsigned int domid)
  76.140  {
  76.141  	struct domain *i;
  76.142  
  76.143 @@ -355,9 +356,9 @@ void do_introduce(struct connection *con
  76.144  {
  76.145  	struct domain *domain;
  76.146  	char *vec[4];
  76.147 -	domid_t domid;
  76.148 +	unsigned int domid;
  76.149  	unsigned long mfn;
  76.150 -	u16 port;
  76.151 +	uint16_t port;
  76.152  	const char *path;
  76.153  
  76.154  	if (get_strings(in, vec, ARRAY_SIZE(vec)) < ARRAY_SIZE(vec)) {
  76.155 @@ -414,7 +415,7 @@ void do_introduce(struct connection *con
  76.156  void do_release(struct connection *conn, const char *domid_str)
  76.157  {
  76.158  	struct domain *domain;
  76.159 -	domid_t domid;
  76.160 +	unsigned int domid;
  76.161  
  76.162  	if (!domid_str) {
  76.163  		send_error(conn, EINVAL);
  76.164 @@ -453,7 +454,7 @@ void do_release(struct connection *conn,
  76.165  void do_get_domain_path(struct connection *conn, const char *domid_str)
  76.166  {
  76.167  	struct domain *domain;
  76.168 -	domid_t domid;
  76.169 +	unsigned int domid;
  76.170  
  76.171  	if (!domid_str) {
  76.172  		send_error(conn, EINVAL);
    77.1 --- a/tools/xenstore/xenstored_transaction.c	Wed Oct 12 10:11:35 2005 +0100
    77.2 +++ b/tools/xenstore/xenstored_transaction.c	Wed Oct 12 11:07:37 2005 +0100
    77.3 @@ -53,7 +53,7 @@ struct transaction
    77.4  	struct list_head list;
    77.5  
    77.6  	/* Connection-local identifier for this transaction. */
    77.7 -	u32 id;
    77.8 +	uint32_t id;
    77.9  
   77.10  	/* Generation when transaction started. */
   77.11  	unsigned int generation;
   77.12 @@ -107,7 +107,7 @@ static int destroy_transaction(void *_tr
   77.13  	return 0;
   77.14  }
   77.15  
   77.16 -struct transaction *transaction_lookup(struct connection *conn, u32 id)
   77.17 +struct transaction *transaction_lookup(struct connection *conn, uint32_t id)
   77.18  {
   77.19  	struct transaction *trans;
   77.20  
    78.1 --- a/tools/xenstore/xenstored_transaction.h	Wed Oct 12 10:11:35 2005 +0100
    78.2 +++ b/tools/xenstore/xenstored_transaction.h	Wed Oct 12 11:07:37 2005 +0100
    78.3 @@ -25,7 +25,7 @@ struct transaction;
    78.4  void do_transaction_start(struct connection *conn, struct buffered_data *node);
    78.5  void do_transaction_end(struct connection *conn, const char *arg);
    78.6  
    78.7 -struct transaction *transaction_lookup(struct connection *conn, u32 id);
    78.8 +struct transaction *transaction_lookup(struct connection *conn, uint32_t id);
    78.9  
   78.10  /* This node was changed: can fail and longjmp. */
   78.11  void add_change_node(struct transaction *trans, const char *node,
    79.1 --- a/tools/xenstore/xs.c	Wed Oct 12 10:11:35 2005 +0100
    79.2 +++ b/tools/xenstore/xs.c	Wed Oct 12 11:07:37 2005 +0100
    79.3 @@ -304,7 +304,7 @@ static void *xs_talkv(struct xs_handle *
    79.4  	unsigned int i;
    79.5  	struct sigaction ignorepipe, oldact;
    79.6  
    79.7 -	msg.tx_id = (u32)(unsigned long)t;
    79.8 +	msg.tx_id = (uint32_t)(unsigned long)t;
    79.9  	msg.type = type;
   79.10  	msg.len = 0;
   79.11  	for (i = 0; i < num_vecs; i++)
   79.12 @@ -510,7 +510,7 @@ bool xs_set_permissions(struct xs_handle
   79.13  	iov[0].iov_len = strlen(path) + 1;
   79.14  	
   79.15  	for (i = 0; i < num_perms; i++) {
   79.16 -		char buffer[MAX_STRLEN(domid_t)+1];
   79.17 +		char buffer[MAX_STRLEN(unsigned int)+1];
   79.18  
   79.19  		if (!xs_perm_to_string(&perms[i], buffer))
   79.20  			goto unwind;
   79.21 @@ -672,7 +672,8 @@ bool xs_transaction_end(struct xs_handle
   79.22   * This tells the store daemon about a shared memory page and event channel
   79.23   * associated with a domain: the domain uses these to communicate.
   79.24   */
   79.25 -bool xs_introduce_domain(struct xs_handle *h, domid_t domid, unsigned long mfn,
   79.26 +bool xs_introduce_domain(struct xs_handle *h,
   79.27 +			 unsigned int domid, unsigned long mfn,
   79.28  			 unsigned int eventchn, const char *path)
   79.29  {
   79.30  	char domid_str[MAX_STRLEN(domid)];
   79.31 @@ -697,7 +698,7 @@ bool xs_introduce_domain(struct xs_handl
   79.32  				ARRAY_SIZE(iov), NULL));
   79.33  }
   79.34  
   79.35 -bool xs_release_domain(struct xs_handle *h, domid_t domid)
   79.36 +bool xs_release_domain(struct xs_handle *h, unsigned int domid)
   79.37  {
   79.38  	char domid_str[MAX_STRLEN(domid)];
   79.39  
   79.40 @@ -706,7 +707,7 @@ bool xs_release_domain(struct xs_handle 
   79.41  	return xs_bool(xs_single(h, NULL, XS_RELEASE, domid_str, NULL));
   79.42  }
   79.43  
   79.44 -char *xs_get_domain_path(struct xs_handle *h, domid_t domid)
   79.45 +char *xs_get_domain_path(struct xs_handle *h, unsigned int domid)
   79.46  {
   79.47  	char domid_str[MAX_STRLEN(domid)];
   79.48  
    80.1 --- a/tools/xenstore/xs.h	Wed Oct 12 10:11:35 2005 +0100
    80.2 +++ b/tools/xenstore/xs.h	Wed Oct 12 11:07:37 2005 +0100
    80.3 @@ -124,20 +124,23 @@ bool xs_transaction_end(struct xs_handle
    80.4  			bool abort);
    80.5  
    80.6  /* Introduce a new domain.
    80.7 - * This tells the store daemon about a shared memory page, event channel
    80.8 - * and store path associated with a domain: the domain uses these to communicate.
    80.9 + * This tells the store daemon about a shared memory page, event channel and
   80.10 + * store path associated with a domain: the domain uses these to communicate.
   80.11   */
   80.12 -bool xs_introduce_domain(struct xs_handle *h, domid_t domid, unsigned long mfn,
   80.13 -                         unsigned int eventchn, const char *path);
   80.14 +bool xs_introduce_domain(struct xs_handle *h,
   80.15 +			 unsigned int domid,
   80.16 +			 unsigned long mfn,
   80.17 +                         unsigned int eventchn,
   80.18 +			 const char *path);
   80.19  
   80.20  /* Release a domain.
   80.21   * Tells the store domain to release the memory page to the domain.
   80.22   */
   80.23 -bool xs_release_domain(struct xs_handle *h, domid_t domid);
   80.24 +bool xs_release_domain(struct xs_handle *h, unsigned int domid);
   80.25  
   80.26  /* Query the home path of a domain.
   80.27   */
   80.28 -char *xs_get_domain_path(struct xs_handle *h, domid_t domid);
   80.29 +char *xs_get_domain_path(struct xs_handle *h, unsigned int domid);
   80.30  
   80.31  /* Only useful for DEBUG versions */
   80.32  char *xs_debug_command(struct xs_handle *h, const char *cmd,
    81.1 --- a/tools/xenstore/xs_crashme.c	Wed Oct 12 10:11:35 2005 +0100
    81.2 +++ b/tools/xenstore/xs_crashme.c	Wed Oct 12 11:07:37 2005 +0100
    81.3 @@ -68,19 +68,19 @@
    81.4   * of bytes.  No alignment or length assumptions are made about
    81.5   * the input key.
    81.6   */
    81.7 -static inline u32 jhash(const void *key, u32 length, u32 initval)
    81.8 +static inline uint32_t jhash(const void *key, uint32_t length, uint32_t initval)
    81.9  {
   81.10 -	u32 a, b, c, len;
   81.11 -	const u8 *k = key;
   81.12 +	uint32_t a, b, c, len;
   81.13 +	const uint8_t *k = key;
   81.14  
   81.15  	len = length;
   81.16  	a = b = JHASH_GOLDEN_RATIO;
   81.17  	c = initval;
   81.18  
   81.19  	while (len >= 12) {
   81.20 -		a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24));
   81.21 -		b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24));
   81.22 -		c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24));
   81.23 +		a += (k[0] +((uint32_t)k[1]<<8) +((uint32_t)k[2]<<16) +((uint32_t)k[3]<<24));
   81.24 +		b += (k[4] +((uint32_t)k[5]<<8) +((uint32_t)k[6]<<16) +((uint32_t)k[7]<<24));
   81.25 +		c += (k[8] +((uint32_t)k[9]<<8) +((uint32_t)k[10]<<16)+((uint32_t)k[11]<<24));
   81.26  
   81.27  		__jhash_mix(a,b,c);
   81.28  
   81.29 @@ -90,16 +90,16 @@ static inline u32 jhash(const void *key,
   81.30  
   81.31  	c += length;
   81.32  	switch (len) {
   81.33 -	case 11: c += ((u32)k[10]<<24);
   81.34 -	case 10: c += ((u32)k[9]<<16);
   81.35 -	case 9 : c += ((u32)k[8]<<8);
   81.36 -	case 8 : b += ((u32)k[7]<<24);
   81.37 -	case 7 : b += ((u32)k[6]<<16);
   81.38 -	case 6 : b += ((u32)k[5]<<8);
   81.39 +	case 11: c += ((uint32_t)k[10]<<24);
   81.40 +	case 10: c += ((uint32_t)k[9]<<16);
   81.41 +	case 9 : c += ((uint32_t)k[8]<<8);
   81.42 +	case 8 : b += ((uint32_t)k[7]<<24);
   81.43 +	case 7 : b += ((uint32_t)k[6]<<16);
   81.44 +	case 6 : b += ((uint32_t)k[5]<<8);
   81.45  	case 5 : b += k[4];
   81.46 -	case 4 : a += ((u32)k[3]<<24);
   81.47 -	case 3 : a += ((u32)k[2]<<16);
   81.48 -	case 2 : a += ((u32)k[1]<<8);
   81.49 +	case 4 : a += ((uint32_t)k[3]<<24);
   81.50 +	case 3 : a += ((uint32_t)k[2]<<16);
   81.51 +	case 2 : a += ((uint32_t)k[1]<<8);
   81.52  	case 1 : a += k[0];
   81.53  	};
   81.54  
   81.55 @@ -108,12 +108,12 @@ static inline u32 jhash(const void *key,
   81.56  	return c;
   81.57  }
   81.58  
   81.59 -/* A special optimized version that handles 1 or more of u32s.
   81.60 - * The length parameter here is the number of u32s in the key.
   81.61 +/* A special optimized version that handles 1 or more of uint32_ts.
   81.62 + * The length parameter here is the number of uint32_ts in the key.
   81.63   */
   81.64 -static inline u32 jhash2(u32 *k, u32 length, u32 initval)
   81.65 +static inline uint32_t jhash2(uint32_t *k, uint32_t length, uint32_t initval)
   81.66  {
   81.67 -	u32 a, b, c, len;
   81.68 +	uint32_t a, b, c, len;
   81.69  
   81.70  	a = b = JHASH_GOLDEN_RATIO;
   81.71  	c = initval;
   81.72 @@ -146,7 +146,7 @@ static inline u32 jhash2(u32 *k, u32 len
   81.73   * NOTE: In partilar the "c += length; __jhash_mix(a,b,c);" normally
   81.74   *       done at the end is not done here.
   81.75   */
   81.76 -static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval)
   81.77 +static inline uint32_t jhash_3words(uint32_t a, uint32_t b, uint32_t c, uint32_t initval)
   81.78  {
   81.79  	a += JHASH_GOLDEN_RATIO;
   81.80  	b += JHASH_GOLDEN_RATIO;
   81.81 @@ -157,12 +157,12 @@ static inline u32 jhash_3words(u32 a, u3
   81.82  	return c;
   81.83  }
   81.84  
   81.85 -static inline u32 jhash_2words(u32 a, u32 b, u32 initval)
   81.86 +static inline uint32_t jhash_2words(uint32_t a, uint32_t b, uint32_t initval)
   81.87  {
   81.88  	return jhash_3words(a, b, 0, initval);
   81.89  }
   81.90  
   81.91 -static inline u32 jhash_1word(u32 a, u32 initval)
   81.92 +static inline uint32_t jhash_1word(uint32_t a, uint32_t initval)
   81.93  {
   81.94  	return jhash_3words(a, 0, 0, initval);
   81.95  }
    82.1 --- a/tools/xenstore/xs_lib.c	Wed Oct 12 10:11:35 2005 +0100
    82.2 +++ b/tools/xenstore/xs_lib.c	Wed Oct 12 11:07:37 2005 +0100
    82.3 @@ -135,7 +135,7 @@ bool xs_strings_to_perms(struct xs_permi
    82.4  	return true;
    82.5  }
    82.6  
    82.7 -/* Convert permissions to a string (up to len MAX_STRLEN(domid_t)+1). */
    82.8 +/* Convert permissions to a string (up to len MAX_STRLEN(unsigned int)+1). */
    82.9  bool xs_perm_to_string(const struct xs_permissions *perm, char *buffer)
   82.10  {
   82.11  	switch (perm->perms) {
    83.1 --- a/tools/xenstore/xs_lib.h	Wed Oct 12 10:11:35 2005 +0100
    83.2 +++ b/tools/xenstore/xs_lib.h	Wed Oct 12 11:07:37 2005 +0100
    83.3 @@ -22,8 +22,8 @@
    83.4  
    83.5  #include <stdbool.h>
    83.6  #include <limits.h>
    83.7 -#include <xenctrl.h>
    83.8  #include <errno.h>
    83.9 +#include <stdint.h>
   83.10  #include <xen/io/xs_wire.h>
   83.11  
   83.12  /* Bitmask of permissions. */
   83.13 @@ -58,7 +58,7 @@ bool xs_write_all(int fd, const void *da
   83.14  bool xs_strings_to_perms(struct xs_permissions *perms, unsigned int num,
   83.15  			 const char *strings);
   83.16  
   83.17 -/* Convert permissions to a string (up to len MAX_STRLEN(domid_t)+1). */
   83.18 +/* Convert permissions to a string (up to len MAX_STRLEN(unsigned int)+1). */
   83.19  bool xs_perm_to_string(const struct xs_permissions *perm, char *buffer);
   83.20  
   83.21  /* Given a string and a length, count how many strings (nul terms). */
    84.1 --- a/tools/xenstore/xs_random.c	Wed Oct 12 10:11:35 2005 +0100
    84.2 +++ b/tools/xenstore/xs_random.c	Wed Oct 12 11:07:37 2005 +0100
    84.3 @@ -594,19 +594,19 @@ static char *dump(struct ops *ops, void 
    84.4   * of bytes.  No alignment or length assumptions are made about
    84.5   * the input key.
    84.6   */
    84.7 -static inline u32 jhash(const void *key, u32 length, u32 initval)
    84.8 +static inline uint32_t jhash(const void *key, uint32_t length, uint32_t initval)
    84.9  {
   84.10 -	u32 a, b, c, len;
   84.11 -	const u8 *k = key;
   84.12 +	uint32_t a, b, c, len;
   84.13 +	const uint8_t *k = key;
   84.14  
   84.15  	len = length;
   84.16  	a = b = JHASH_GOLDEN_RATIO;
   84.17  	c = initval;
   84.18  
   84.19  	while (len >= 12) {
   84.20 -		a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24));
   84.21 -		b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24));
   84.22 -		c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24));
   84.23 +		a += (k[0] +((uint32_t)k[1]<<8) +((uint32_t)k[2]<<16) +((uint32_t)k[3]<<24));
   84.24 +		b += (k[4] +((uint32_t)k[5]<<8) +((uint32_t)k[6]<<16) +((uint32_t)k[7]<<24));
   84.25 +		c += (k[8] +((uint32_t)k[9]<<8) +((uint32_t)k[10]<<16)+((uint32_t)k[11]<<24));
   84.26  
   84.27  		__jhash_mix(a,b,c);
   84.28  
   84.29 @@ -616,16 +616,16 @@ static inline u32 jhash(const void *key,
   84.30  
   84.31  	c += length;
   84.32  	switch (len) {
   84.33 -	case 11: c += ((u32)k[10]<<24);
   84.34 -	case 10: c += ((u32)k[9]<<16);
   84.35 -	case 9 : c += ((u32)k[8]<<8);
   84.36 -	case 8 : b += ((u32)k[7]<<24);
   84.37 -	case 7 : b += ((u32)k[6]<<16);
   84.38 -	case 6 : b += ((u32)k[5]<<8);
   84.39 +	case 11: c += ((uint32_t)k[10]<<24);
   84.40 +	case 10: c += ((uint32_t)k[9]<<16);
   84.41 +	case 9 : c += ((uint32_t)k[8]<<8);
   84.42 +	case 8 : b += ((uint32_t)k[7]<<24);
   84.43 +	case 7 : b += ((uint32_t)k[6]<<16);
   84.44 +	case 6 : b += ((uint32_t)k[5]<<8);
   84.45  	case 5 : b += k[4];
   84.46 -	case 4 : a += ((u32)k[3]<<24);
   84.47 -	case 3 : a += ((u32)k[2]<<16);
   84.48 -	case 2 : a += ((u32)k[1]<<8);
   84.49 +	case 4 : a += ((uint32_t)k[3]<<24);
   84.50 +	case 3 : a += ((uint32_t)k[2]<<16);
   84.51 +	case 2 : a += ((uint32_t)k[1]<<8);
   84.52  	case 1 : a += k[0];
   84.53  	};
   84.54  
   84.55 @@ -634,12 +634,12 @@ static inline u32 jhash(const void *key,
   84.56  	return c;
   84.57  }
   84.58  
   84.59 -/* A special optimized version that handles 1 or more of u32s.
   84.60 - * The length parameter here is the number of u32s in the key.
   84.61 +/* A special optimized version that handles 1 or more of uint32_ts.
   84.62 + * The length parameter here is the number of uint32_ts in the key.
   84.63   */
   84.64 -static inline u32 jhash2(u32 *k, u32 length, u32 initval)
   84.65 +static inline uint32_t jhash2(uint32_t *k, uint32_t length, uint32_t initval)
   84.66  {
   84.67 -	u32 a, b, c, len;
   84.68 +	uint32_t a, b, c, len;
   84.69  
   84.70  	a = b = JHASH_GOLDEN_RATIO;
   84.71  	c = initval;
   84.72 @@ -672,7 +672,7 @@ static inline u32 jhash2(u32 *k, u32 len
   84.73   * NOTE: In partilar the "c += length; __jhash_mix(a,b,c);" normally
   84.74   *       done at the end is not done here.
   84.75   */
   84.76 -static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval)
   84.77 +static inline uint32_t jhash_3words(uint32_t a, uint32_t b, uint32_t c, uint32_t initval)
   84.78  {
   84.79  	a += JHASH_GOLDEN_RATIO;
   84.80  	b += JHASH_GOLDEN_RATIO;
   84.81 @@ -683,12 +683,12 @@ static inline u32 jhash_3words(u32 a, u3
   84.82  	return c;
   84.83  }
   84.84  
   84.85 -static inline u32 jhash_2words(u32 a, u32 b, u32 initval)
   84.86 +static inline uint32_t jhash_2words(uint32_t a, uint32_t b, uint32_t initval)
   84.87  {
   84.88  	return jhash_3words(a, b, 0, initval);
   84.89  }
   84.90  
   84.91 -static inline u32 jhash_1word(u32 a, u32 initval)
   84.92 +static inline uint32_t jhash_1word(uint32_t a, uint32_t initval)
   84.93  {
   84.94  	return jhash_3words(a, 0, 0, initval);
   84.95  }
    85.1 --- a/tools/xenstore/xs_tdb_dump.c	Wed Oct 12 10:11:35 2005 +0100
    85.2 +++ b/tools/xenstore/xs_tdb_dump.c	Wed Oct 12 11:07:37 2005 +0100
    85.3 @@ -11,13 +11,13 @@
    85.4  #include "utils.h"
    85.5  
    85.6  struct record_hdr {
    85.7 -	u32 num_perms;
    85.8 -	u32 datalen;
    85.9 -	u32 childlen;
   85.10 +	uint32_t num_perms;
   85.11 +	uint32_t datalen;
   85.12 +	uint32_t childlen;
   85.13  	struct xs_permissions perms[0];
   85.14  };
   85.15  
   85.16 -static u32 total_size(struct record_hdr *hdr)
   85.17 +static uint32_t total_size(struct record_hdr *hdr)
   85.18  {
   85.19  	return sizeof(*hdr) + hdr->num_perms * sizeof(struct xs_permissions) 
   85.20  		+ hdr->datalen + hdr->childlen;
    86.1 --- a/tools/xenstore/xs_test.c	Wed Oct 12 10:11:35 2005 +0100
    86.2 +++ b/tools/xenstore/xs_test.c	Wed Oct 12 11:07:37 2005 +0100
    86.3 @@ -561,7 +561,7 @@ static void do_introduce(unsigned int ha
    86.4  
    86.5  	/* Tell them the event channel and our PID. */
    86.6  	*(int *)((void *)out + 32) = getpid();
    86.7 -	*(u16 *)((void *)out + 36) = atoi(eventchn);
    86.8 +	*(uint16_t *)((void *)out + 36) = atoi(eventchn);
    86.9  
   86.10  	if (!xs_introduce_domain(handles[handle], atoi(domid),
   86.11  				 atol(mfn), atoi(eventchn), path)) {
    87.1 --- a/tools/xentrace/xenctx.c	Wed Oct 12 10:11:35 2005 +0100
    87.2 +++ b/tools/xentrace/xenctx.c	Wed Oct 12 11:07:37 2005 +0100
    87.3 @@ -81,7 +81,7 @@ void print_ctx(vcpu_guest_context_t *ctx
    87.4  }
    87.5  #endif
    87.6  
    87.7 -void dump_ctx(u32 domid, u32 vcpu)
    87.8 +void dump_ctx(uint32_t domid, uint32_t vcpu)
    87.9  {
   87.10      int ret;
   87.11      vcpu_guest_context_t ctx;
    88.1 --- a/tools/xentrace/xentrace.c	Wed Oct 12 10:11:35 2005 +0100
    88.2 +++ b/tools/xentrace/xentrace.c	Wed Oct 12 11:07:37 2005 +0100
    88.3 @@ -45,8 +45,8 @@ typedef struct settings_st {
    88.4      char *outfile;
    88.5      struct timespec poll_sleep;
    88.6      unsigned long new_data_thresh;
    88.7 -    u32 evt_mask;
    88.8 -    u32 cpu_mask;
    88.9 +    uint32_t evt_mask;
   88.10 +    uint32_t cpu_mask;
   88.11  } settings_t;
   88.12  
   88.13  settings_t opts;
   88.14 @@ -168,7 +168,7 @@ struct t_buf *map_tbufs(unsigned long tb
   88.15   * @type:           the new mask type,0-event mask, 1-cpu mask
   88.16   *
   88.17   */
   88.18 -void set_mask(u32 mask, int type)
   88.19 +void set_mask(uint32_t mask, int type)
   88.20  {
   88.21      int ret;
   88.22      dom0_op_t op;                        /* dom0 op we'll build             */
   88.23 @@ -496,7 +496,8 @@ const struct argp parser_def =
   88.24      "\v"
   88.25      "This tool is used to capture trace buffer data from Xen.  The data is "
   88.26      "output in a binary format, in the following order:\n\n"
   88.27 -    "  CPU(uint) TSC(u64) EVENT(u32) D1 D2 D3 D4 D5 (all u32)\n\n"
   88.28 +    "  CPU(uint) TSC(uint64_t) EVENT(uint32_t) D1 D2 D3 D4 D5 "
   88.29 +    "(all uint32_t)\n\n"
   88.30      "The output should be parsed using the tool xentrace_format, which can "
   88.31      "produce human-readable output in ASCII format."
   88.32  };
    89.1 --- a/xen/include/public/acm.h	Wed Oct 12 10:11:35 2005 +0100
    89.2 +++ b/xen/include/public/acm.h	Wed Oct 12 11:07:37 2005 +0100
    89.3 @@ -8,7 +8,7 @@
    89.4   *
    89.5   * Contributors:
    89.6   * Stefan Berger <stefanb@watson.ibm.com> 
    89.7 - *	added network byte order support for binary policies
    89.8 + * added network byte order support for binary policies
    89.9   *
   89.10   * This program is free software; you can redistribute it and/or
   89.11   * modify it under the terms of the GNU General Public License as
   89.12 @@ -41,24 +41,24 @@
   89.13  #endif
   89.14  
   89.15  /* default ssid reference value if not supplied */
   89.16 -#define ACM_DEFAULT_SSID 	0x0
   89.17 +#define ACM_DEFAULT_SSID  0x0
   89.18  #define ACM_DEFAULT_LOCAL_SSID  0x0
   89.19  
   89.20  /* Internal ACM ERROR types */
   89.21 -#define ACM_OK				 0
   89.22 -#define ACM_UNDEF			-1
   89.23 -#define ACM_INIT_SSID_ERROR		-2
   89.24 -#define ACM_INIT_SOID_ERROR		-3
   89.25 -#define ACM_ERROR		        -4
   89.26 +#define ACM_OK     0
   89.27 +#define ACM_UNDEF   -1
   89.28 +#define ACM_INIT_SSID_ERROR  -2
   89.29 +#define ACM_INIT_SOID_ERROR  -3
   89.30 +#define ACM_ERROR          -4
   89.31  
   89.32  /* External ACCESS DECISIONS */
   89.33 -#define ACM_ACCESS_PERMITTED		0
   89.34 -#define ACM_ACCESS_DENIED		-111
   89.35 -#define ACM_NULL_POINTER_ERROR		-200
   89.36 +#define ACM_ACCESS_PERMITTED  0
   89.37 +#define ACM_ACCESS_DENIED  -111
   89.38 +#define ACM_NULL_POINTER_ERROR  -200
   89.39  
   89.40  /* primary policy in lower 4 bits */
   89.41 -#define ACM_NULL_POLICY	0
   89.42 -#define ACM_CHINESE_WALL_POLICY	1
   89.43 +#define ACM_NULL_POLICY 0
   89.44 +#define ACM_CHINESE_WALL_POLICY 1
   89.45  #define ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY 2
   89.46  
   89.47  /* combinations have secondary policy component in higher 4bit */
   89.48 @@ -67,7 +67,7 @@
   89.49  
   89.50  /* policy: */
   89.51  #define ACM_POLICY_NAME(X) \
   89.52 -	((X) == (ACM_NULL_POLICY)) ? "NULL policy" :                        \
   89.53 + ((X) == (ACM_NULL_POLICY)) ? "NULL policy" :                        \
   89.54      ((X) == (ACM_CHINESE_WALL_POLICY)) ? "CHINESE WALL policy" :        \
   89.55      ((X) == (ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY)) ? "SIMPLE TYPE ENFORCEMENT policy" : \
   89.56      ((X) == (ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY)) ? "CHINESE WALL AND SIMPLE TYPE ENFORCEMENT policy" : \
   89.57 @@ -77,17 +77,17 @@
   89.58   * whenever the interpretation of the related
   89.59   * policy's data structure changes
   89.60   */
   89.61 -#define ACM_POLICY_VERSION	1
   89.62 -#define ACM_CHWALL_VERSION	1
   89.63 -#define ACM_STE_VERSION		1
   89.64 +#define ACM_POLICY_VERSION 1
   89.65 +#define ACM_CHWALL_VERSION 1
   89.66 +#define ACM_STE_VERSION  1
   89.67  
   89.68  /* defines a ssid reference used by xen */
   89.69 -typedef u32 ssidref_t;
   89.70 +typedef uint32_t ssidref_t;
   89.71  
   89.72  /* -------security policy relevant type definitions-------- */
   89.73  
   89.74  /* type identifier; compares to "equal" or "not equal" */
   89.75 -typedef u16 domaintype_t;
   89.76 +typedef uint16_t domaintype_t;
   89.77  
   89.78  /* CHINESE WALL POLICY DATA STRUCTURES
   89.79   *
   89.80 @@ -109,7 +109,7 @@ typedef u16 domaintype_t;
   89.81   *    with type i and is "1" otherwise.
   89.82   */
   89.83  /* high-16 = version, low-16 = check magic */
   89.84 -#define ACM_MAGIC		0x0001debc
   89.85 +#define ACM_MAGIC  0x0001debc
   89.86  
   89.87  /* each offset in bytes from start of the struct they
   89.88   * are part of */
   89.89 @@ -123,62 +123,72 @@ typedef u16 domaintype_t;
   89.90   * tools that assume packed representations (e.g. the java tool)
   89.91   */
   89.92  struct acm_policy_buffer {
   89.93 -	u32 policy_version; /* ACM_POLICY_VERSION */
   89.94 -    u32 magic;
   89.95 -	u32 len;
   89.96 -	u32 primary_policy_code;
   89.97 -	u32 primary_buffer_offset;
   89.98 -	u32 secondary_policy_code;
   89.99 -	u32 secondary_buffer_offset;
  89.100 +    uint32_t policy_version; /* ACM_POLICY_VERSION */
  89.101 +    uint32_t magic;
  89.102 +    uint32_t len;
  89.103 +    uint32_t primary_policy_code;
  89.104 +    uint32_t primary_buffer_offset;
  89.105 +    uint32_t secondary_policy_code;
  89.106 +    uint32_t secondary_buffer_offset;
  89.107  };
  89.108  
  89.109  struct acm_chwall_policy_buffer {
  89.110 -	u32 policy_version; /* ACM_CHWALL_VERSION */
  89.111 -	u32 policy_code;
  89.112 -	u32 chwall_max_types;
  89.113 -	u32 chwall_max_ssidrefs;
  89.114 -	u32 chwall_max_conflictsets;
  89.115 -	u32 chwall_ssid_offset;
  89.116 -	u32 chwall_conflict_sets_offset;
  89.117 -	u32 chwall_running_types_offset;
  89.118 -	u32 chwall_conflict_aggregate_offset;
  89.119 +    uint32_t policy_version; /* ACM_CHWALL_VERSION */
  89.120 +    uint32_t policy_code;
  89.121 +    uint32_t chwall_max_types;
  89.122 +    uint32_t chwall_max_ssidrefs;
  89.123 +    uint32_t chwall_max_conflictsets;
  89.124 +    uint32_t chwall_ssid_offset;
  89.125 +    uint32_t chwall_conflict_sets_offset;
  89.126 +    uint32_t chwall_running_types_offset;
  89.127 +    uint32_t chwall_conflict_aggregate_offset;
  89.128  };
  89.129  
  89.130  struct acm_ste_policy_buffer {
  89.131 -	u32 policy_version; /* ACM_STE_VERSION */
  89.132 -	u32 policy_code;
  89.133 -	u32 ste_max_types;
  89.134 -	u32 ste_max_ssidrefs;
  89.135 -	u32 ste_ssid_offset;
  89.136 +    uint32_t policy_version; /* ACM_STE_VERSION */
  89.137 +    uint32_t policy_code;
  89.138 +    uint32_t ste_max_types;
  89.139 +    uint32_t ste_max_ssidrefs;
  89.140 +    uint32_t ste_ssid_offset;
  89.141  };
  89.142  
  89.143  struct acm_stats_buffer {
  89.144 -    u32 magic;
  89.145 -	u32 len;
  89.146 -	u32 primary_policy_code;
  89.147 -	u32 primary_stats_offset;
  89.148 -	u32 secondary_policy_code;
  89.149 -	u32 secondary_stats_offset;
  89.150 +    uint32_t magic;
  89.151 +    uint32_t len;
  89.152 +    uint32_t primary_policy_code;
  89.153 +    uint32_t primary_stats_offset;
  89.154 +    uint32_t secondary_policy_code;
  89.155 +    uint32_t secondary_stats_offset;
  89.156  };
  89.157  
  89.158  struct acm_ste_stats_buffer {
  89.159 -	u32 ec_eval_count;
  89.160 -	u32 gt_eval_count;
  89.161 -	u32 ec_denied_count;
  89.162 -	u32 gt_denied_count; 
  89.163 -	u32 ec_cachehit_count;
  89.164 -	u32 gt_cachehit_count;
  89.165 +    uint32_t ec_eval_count;
  89.166 +    uint32_t gt_eval_count;
  89.167 +    uint32_t ec_denied_count;
  89.168 +    uint32_t gt_denied_count; 
  89.169 +    uint32_t ec_cachehit_count;
  89.170 +    uint32_t gt_cachehit_count;
  89.171  };
  89.172  
  89.173  struct acm_ssid_buffer {
  89.174 -	u32 len;
  89.175 +    uint32_t len;
  89.176      ssidref_t ssidref;
  89.177 -	u32 primary_policy_code;
  89.178 -	u32 primary_max_types;
  89.179 -    u32 primary_types_offset;
  89.180 -	u32 secondary_policy_code;
  89.181 -    u32 secondary_max_types;
  89.182 -	u32 secondary_types_offset;
  89.183 +    uint32_t primary_policy_code;
  89.184 +    uint32_t primary_max_types;
  89.185 +    uint32_t primary_types_offset;
  89.186 +    uint32_t secondary_policy_code;
  89.187 +    uint32_t secondary_max_types;
  89.188 +    uint32_t secondary_types_offset;
  89.189  };
  89.190  
  89.191  #endif
  89.192 +
  89.193 +/*
  89.194 + * Local variables:
  89.195 + * mode: C
  89.196 + * c-set-style: "BSD"
  89.197 + * c-basic-offset: 4
  89.198 + * tab-width: 4
  89.199 + * indent-tabs-mode: nil
  89.200 + * End:
  89.201 + */
    90.1 --- a/xen/include/public/acm_ops.h	Wed Oct 12 10:11:35 2005 +0100
    90.2 +++ b/xen/include/public/acm_ops.h	Wed Oct 12 11:07:37 2005 +0100
    90.3 @@ -1,4 +1,3 @@
    90.4 -
    90.5  /******************************************************************************
    90.6   * acm_ops.h
    90.7   *
    90.8 @@ -32,44 +31,44 @@
    90.9  
   90.10  /************************************************************************/
   90.11  
   90.12 -#define ACM_SETPOLICY        	4
   90.13 +#define ACM_SETPOLICY         4
   90.14  typedef struct acm_setpolicy {
   90.15      /* OUT variables */
   90.16      void *pushcache;
   90.17 -    u16 pushcache_size;
   90.18 +    uint16_t pushcache_size;
   90.19  } acm_setpolicy_t;
   90.20  
   90.21  
   90.22 -#define ACM_GETPOLICY        	5
   90.23 +#define ACM_GETPOLICY         5
   90.24  typedef struct acm_getpolicy {
   90.25      /* OUT variables */
   90.26      void *pullcache;
   90.27 -    u16 pullcache_size;
   90.28 +    uint16_t pullcache_size;
   90.29  } acm_getpolicy_t;
   90.30  
   90.31  
   90.32 -#define ACM_DUMPSTATS        	6
   90.33 +#define ACM_DUMPSTATS         6
   90.34  typedef struct acm_dumpstats {
   90.35      void *pullcache;
   90.36 -    u16 pullcache_size;
   90.37 +    uint16_t pullcache_size;
   90.38  } acm_dumpstats_t;
   90.39  
   90.40  
   90.41 -#define ACM_GETSSID          	7
   90.42 +#define ACM_GETSSID           7
   90.43  enum get_type {UNSET, SSIDREF, DOMAINID};
   90.44  typedef struct acm_getssid {
   90.45 -	enum get_type get_ssid_by;
   90.46 -	union {
   90.47 -		domaintype_t domainid;
   90.48 -		ssidref_t    ssidref;
   90.49 -	} id;
   90.50 +    enum get_type get_ssid_by;
   90.51 +    union {
   90.52 +        domaintype_t domainid;
   90.53 +        ssidref_t    ssidref;
   90.54 +    } id;
   90.55      void *ssidbuf;
   90.56 -    u16 ssidbuf_size;
   90.57 +    uint16_t ssidbuf_size;
   90.58  } acm_getssid_t;
   90.59  
   90.60  typedef struct acm_op {
   90.61 -    u32 cmd;
   90.62 -    u32 interface_version;      /* ACM_INTERFACE_VERSION */
   90.63 +    uint32_t cmd;
   90.64 +    uint32_t interface_version;      /* ACM_INTERFACE_VERSION */
   90.65      union {
   90.66          acm_setpolicy_t setpolicy;
   90.67          acm_getpolicy_t getpolicy;
   90.68 @@ -79,3 +78,13 @@ typedef struct acm_op {
   90.69  } acm_op_t;
   90.70  
   90.71  #endif                          /* __XEN_PUBLIC_ACM_OPS_H__ */
   90.72 +
   90.73 +/*
   90.74 + * Local variables:
   90.75 + * mode: C
   90.76 + * c-set-style: "BSD"
   90.77 + * c-basic-offset: 4
   90.78 + * tab-width: 4
   90.79 + * indent-tabs-mode: nil
   90.80 + * End:
   90.81 + */
    91.1 --- a/xen/include/public/arch-ia64.h	Wed Oct 12 10:11:35 2005 +0100
    91.2 +++ b/xen/include/public/arch-ia64.h	Wed Oct 12 11:07:37 2005 +0100
    91.3 @@ -13,30 +13,30 @@
    91.4  
    91.5  #ifndef __ASSEMBLY__
    91.6  
    91.7 -#define MAX_NR_SECTION  32  // at most 32 memory holes
    91.8 +#define MAX_NR_SECTION  32  /* at most 32 memory holes */
    91.9  typedef struct {
   91.10 -    unsigned long	start; 	/* start of memory hole */
   91.11 -    unsigned long	end;	/* end of memory hole */
   91.12 +    unsigned long start;  /* start of memory hole */
   91.13 +    unsigned long end;    /* end of memory hole */
   91.14  } mm_section_t;
   91.15  
   91.16  typedef struct {
   91.17 -    unsigned long	mfn : 56;
   91.18 -    unsigned long	type: 8;
   91.19 +    unsigned long mfn : 56;
   91.20 +    unsigned long type: 8;
   91.21  } pmt_entry_t;
   91.22  
   91.23 -#define GPFN_MEM		(0UL << 56)	/* Guest pfn is normal mem */
   91.24 -#define GPFN_FRAME_BUFFER	(1UL << 56)	/* VGA framebuffer */
   91.25 -#define GPFN_LOW_MMIO		(2UL << 56)	/* Low MMIO range */
   91.26 -#define GPFN_PIB		(3UL << 56)	/* PIB base */
   91.27 -#define GPFN_IOSAPIC		(4UL << 56)	/* IOSAPIC base */
   91.28 -#define GPFN_LEGACY_IO		(5UL << 56)	/* Legacy I/O base */
   91.29 -#define GPFN_GFW		(6UL << 56)	/* Guest Firmware */
   91.30 -#define GPFN_HIGH_MMIO		(7UL << 56)	/* High MMIO range */
   91.31 +#define GPFN_MEM          (0UL << 56) /* Guest pfn is normal mem */
   91.32 +#define GPFN_FRAME_BUFFER (1UL << 56) /* VGA framebuffer */
   91.33 +#define GPFN_LOW_MMIO     (2UL << 56) /* Low MMIO range */
   91.34 +#define GPFN_PIB          (3UL << 56) /* PIB base */
   91.35 +#define GPFN_IOSAPIC      (4UL << 56) /* IOSAPIC base */
   91.36 +#define GPFN_LEGACY_IO    (5UL << 56) /* Legacy I/O base */
   91.37 +#define GPFN_GFW          (6UL << 56) /* Guest Firmware */
   91.38 +#define GPFN_HIGH_MMIO    (7UL << 56) /* High MMIO range */
   91.39  
   91.40 -#define GPFN_IO_MASK		(7UL << 56)	/* Guest pfn is I/O type */
   91.41 -#define GPFN_INV_MASK		(31UL << 59)	/* Guest pfn is invalid */
   91.42 +#define GPFN_IO_MASK     (7UL << 56)  /* Guest pfn is I/O type */
   91.43 +#define GPFN_INV_MASK    (31UL << 59) /* Guest pfn is invalid */
   91.44  
   91.45 -#define INVALID_MFN              (~0UL)
   91.46 +#define INVALID_MFN       (~0UL)
   91.47  
   91.48  /*
   91.49   * NB. This may become a 64-bit count with no shift. If this happens then the 
   91.50 @@ -48,198 +48,198 @@ typedef struct {
   91.51  } tsc_timestamp_t; /* 8 bytes */
   91.52  
   91.53  struct pt_fpreg {
   91.54 -        union {
   91.55 -                unsigned long bits[2];
   91.56 -                long double __dummy;    /* force 16-byte alignment */
   91.57 -        } u;
   91.58 +    union {
   91.59 +        unsigned long bits[2];
   91.60 +        long double __dummy;    /* force 16-byte alignment */
   91.61 +    } u;
   91.62  };
   91.63  
   91.64  typedef struct cpu_user_regs{
   91.65 -	/* The following registers are saved by SAVE_MIN: */
   91.66 -	unsigned long b6;		/* scratch */
   91.67 -	unsigned long b7;		/* scratch */
   91.68 +    /* The following registers are saved by SAVE_MIN: */
   91.69 +    unsigned long b6;  /* scratch */
   91.70 +    unsigned long b7;  /* scratch */
   91.71  
   91.72 -	unsigned long ar_csd;           /* used by cmp8xchg16 (scratch) */
   91.73 -	unsigned long ar_ssd;           /* reserved for future use (scratch) */
   91.74 +    unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */
   91.75 +    unsigned long ar_ssd; /* reserved for future use (scratch) */
   91.76  
   91.77 -	unsigned long r8;		/* scratch (return value register 0) */
   91.78 -	unsigned long r9;		/* scratch (return value register 1) */
   91.79 -	unsigned long r10;		/* scratch (return value register 2) */
   91.80 -	unsigned long r11;		/* scratch (return value register 3) */
   91.81 +    unsigned long r8;  /* scratch (return value register 0) */
   91.82 +    unsigned long r9;  /* scratch (return value register 1) */
   91.83 +    unsigned long r10; /* scratch (return value register 2) */
   91.84 +    unsigned long r11; /* scratch (return value register 3) */
   91.85  
   91.86 -	unsigned long cr_ipsr;		/* interrupted task's psr */
   91.87 -	unsigned long cr_iip;		/* interrupted task's instruction pointer */
   91.88 -	unsigned long cr_ifs;		/* interrupted task's function state */
   91.89 +    unsigned long cr_ipsr; /* interrupted task's psr */
   91.90 +    unsigned long cr_iip;  /* interrupted task's instruction pointer */
   91.91 +    unsigned long cr_ifs;  /* interrupted task's function state */
   91.92  
   91.93 -	unsigned long ar_unat;		/* interrupted task's NaT register (preserved) */
   91.94 -	unsigned long ar_pfs;		/* prev function state  */
   91.95 -	unsigned long ar_rsc;		/* RSE configuration */
   91.96 -	/* The following two are valid only if cr_ipsr.cpl > 0: */
   91.97 -	unsigned long ar_rnat;		/* RSE NaT */
   91.98 -	unsigned long ar_bspstore;	/* RSE bspstore */
   91.99 +    unsigned long ar_unat; /* interrupted task's NaT register (preserved) */
  91.100 +    unsigned long ar_pfs;  /* prev function state  */
  91.101 +    unsigned long ar_rsc;  /* RSE configuration */
  91.102 +    /* The following two are valid only if cr_ipsr.cpl > 0: */
  91.103 +    unsigned long ar_rnat;  /* RSE NaT */
  91.104 +    unsigned long ar_bspstore; /* RSE bspstore */
  91.105  
  91.106 -	unsigned long pr;		/* 64 predicate registers (1 bit each) */
  91.107 -	unsigned long b0;		/* return pointer (bp) */
  91.108 -	unsigned long loadrs;		/* size of dirty partition << 16 */
  91.109 +    unsigned long pr;  /* 64 predicate registers (1 bit each) */
  91.110 +    unsigned long b0;  /* return pointer (bp) */
  91.111 +    unsigned long loadrs;  /* size of dirty partition << 16 */
  91.112  
  91.113 -	unsigned long r1;		/* the gp pointer */
  91.114 -	unsigned long r12;		/* interrupted task's memory stack pointer */
  91.115 -	unsigned long r13;		/* thread pointer */
  91.116 +    unsigned long r1;  /* the gp pointer */
  91.117 +    unsigned long r12; /* interrupted task's memory stack pointer */
  91.118 +    unsigned long r13; /* thread pointer */
  91.119  
  91.120 -	unsigned long ar_fpsr;		/* floating point status (preserved) */
  91.121 -	unsigned long r15;		/* scratch */
  91.122 +    unsigned long ar_fpsr;  /* floating point status (preserved) */
  91.123 +    unsigned long r15;  /* scratch */
  91.124  
  91.125 -	/* The remaining registers are NOT saved for system calls.  */
  91.126 + /* The remaining registers are NOT saved for system calls.  */
  91.127  
  91.128 -	unsigned long r14;		/* scratch */
  91.129 -	unsigned long r2;		/* scratch */
  91.130 -	unsigned long r3;		/* scratch */
  91.131 -    unsigned long r16;		/* scratch */
  91.132 -   	unsigned long r17;		/* scratch */
  91.133 -    unsigned long r18;		/* scratch */
  91.134 -   	unsigned long r19;		/* scratch */
  91.135 -    unsigned long r20;		/* scratch */
  91.136 -   	unsigned long r21;		/* scratch */
  91.137 -   	unsigned long r22;		/* scratch */
  91.138 -   	unsigned long r23;		/* scratch */
  91.139 -   	unsigned long r24;		/* scratch */
  91.140 -   	unsigned long r25;		/* scratch */
  91.141 -   	unsigned long r26;		/* scratch */
  91.142 -   	unsigned long r27;		/* scratch */
  91.143 -   	unsigned long r28;		/* scratch */
  91.144 -   	unsigned long r29;		/* scratch */
  91.145 -   	unsigned long r30;		/* scratch */
  91.146 -   	unsigned long r31;		/* scratch */
  91.147 -	unsigned long ar_ccv;		/* compare/exchange value (scratch) */
  91.148 +    unsigned long r14;  /* scratch */
  91.149 +    unsigned long r2;  /* scratch */
  91.150 +    unsigned long r3;  /* scratch */
  91.151 +    unsigned long r16;  /* scratch */
  91.152 +    unsigned long r17;  /* scratch */
  91.153 +    unsigned long r18;  /* scratch */
  91.154 +    unsigned long r19;  /* scratch */
  91.155 +    unsigned long r20;  /* scratch */
  91.156 +    unsigned long r21;  /* scratch */
  91.157 +    unsigned long r22;  /* scratch */
  91.158 +    unsigned long r23;  /* scratch */
  91.159 +    unsigned long r24;  /* scratch */
  91.160 +    unsigned long r25;  /* scratch */
  91.161 +    unsigned long r26;  /* scratch */
  91.162 +    unsigned long r27;  /* scratch */
  91.163 +    unsigned long r28;  /* scratch */
  91.164 +    unsigned long r29;  /* scratch */
  91.165 +    unsigned long r30;  /* scratch */
  91.166 +    unsigned long r31;  /* scratch */
  91.167 +    unsigned long ar_ccv;  /* compare/exchange value (scratch) */
  91.168  
  91.169 -	/*
  91.170 -	 * Floating point registers that the kernel considers scratch:
  91.171 -	 */
  91.172 -	struct pt_fpreg f6;		/* scratch */
  91.173 -	struct pt_fpreg f7;		/* scratch */
  91.174 -	struct pt_fpreg f8;		/* scratch */
  91.175 -	struct pt_fpreg f9;		/* scratch */
  91.176 -	struct pt_fpreg f10;		/* scratch */
  91.177 -	struct pt_fpreg f11;		/* scratch */
  91.178 -  	unsigned long r4;		/* preserved */
  91.179 -    unsigned long r5;		/* preserved */
  91.180 -   	unsigned long r6;		/* preserved */
  91.181 -    unsigned long r7;		/* preserved */
  91.182 -   	unsigned long eml_unat;    /* used for emulating instruction */
  91.183 +    /*
  91.184 +     * Floating point registers that the kernel considers scratch:
  91.185 +     */
  91.186 +    struct pt_fpreg f6;  /* scratch */
  91.187 +    struct pt_fpreg f7;  /* scratch */
  91.188 +    struct pt_fpreg f8;  /* scratch */
  91.189 +    struct pt_fpreg f9;  /* scratch */
  91.190 +    struct pt_fpreg f10;  /* scratch */
  91.191 +    struct pt_fpreg f11;  /* scratch */
  91.192 +    unsigned long r4;  /* preserved */
  91.193 +    unsigned long r5;  /* preserved */
  91.194 +    unsigned long r6;  /* preserved */
  91.195 +    unsigned long r7;  /* preserved */
  91.196 +    unsigned long eml_unat;    /* used for emulating instruction */
  91.197      unsigned long rfi_pfs;     /* used for elulating rfi */
  91.198  
  91.199  }cpu_user_regs_t;
  91.200  
  91.201  typedef union {
  91.202 -	unsigned long value;
  91.203 -	struct {
  91.204 -		int 	a_int:1;
  91.205 -		int 	a_from_int_cr:1;
  91.206 -		int	a_to_int_cr:1;
  91.207 -		int	a_from_psr:1;
  91.208 -		int	a_from_cpuid:1;
  91.209 -		int	a_cover:1;
  91.210 -		int	a_bsw:1;
  91.211 -		long	reserved:57;
  91.212 -	};
  91.213 +    unsigned long value;
  91.214 +    struct {
  91.215 +        int a_int:1;
  91.216 +        int a_from_int_cr:1;
  91.217 +        int a_to_int_cr:1;
  91.218 +        int a_from_psr:1;
  91.219 +        int a_from_cpuid:1;
  91.220 +        int a_cover:1;
  91.221 +        int a_bsw:1;
  91.222 +        long reserved:57;
  91.223 +    };
  91.224  } vac_t;
  91.225  
  91.226  typedef union {
  91.227 -	unsigned long value;
  91.228 -	struct {
  91.229 -		int 	d_vmsw:1;
  91.230 -		int 	d_extint:1;
  91.231 -		int	d_ibr_dbr:1;
  91.232 -		int	d_pmc:1;
  91.233 -		int	d_to_pmd:1;
  91.234 -		int	d_itm:1;
  91.235 -		long	reserved:58;
  91.236 -	};
  91.237 +    unsigned long value;
  91.238 +    struct {
  91.239 +        int d_vmsw:1;
  91.240 +        int d_extint:1;
  91.241 +        int d_ibr_dbr:1;
  91.242 +        int d_pmc:1;
  91.243 +        int d_to_pmd:1;
  91.244 +        int d_itm:1;
  91.245 +        long reserved:58;
  91.246 +    };
  91.247  } vdc_t;
  91.248  
  91.249  typedef struct {
  91.250 -	vac_t			vac;
  91.251 -	vdc_t			vdc;
  91.252 -	unsigned long		virt_env_vaddr;
  91.253 -	unsigned long		reserved1[29];
  91.254 -	unsigned long		vhpi;
  91.255 -	unsigned long		reserved2[95];
  91.256 -	union {
  91.257 -	  unsigned long		vgr[16];
  91.258 -  	  unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
  91.259 -	};
  91.260 -	union {
  91.261 -	  unsigned long		vbgr[16];
  91.262 -	  unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
  91.263 -	};
  91.264 -	unsigned long		vnat;
  91.265 -	unsigned long		vbnat;
  91.266 -	unsigned long		vcpuid[5];
  91.267 -	unsigned long		reserved3[11];
  91.268 -	unsigned long		vpsr;
  91.269 -	unsigned long		vpr;
  91.270 -	unsigned long		reserved4[76];
  91.271 -	union {
  91.272 -	  unsigned long		vcr[128];
  91.273 -          struct {
  91.274 -  	    unsigned long	dcr;		// CR0
  91.275 -	    unsigned long	itm;
  91.276 -	    unsigned long	iva;
  91.277 -	    unsigned long	rsv1[5];
  91.278 -	    unsigned long	pta;		// CR8
  91.279 -	    unsigned long	rsv2[7];
  91.280 -	    unsigned long	ipsr;		// CR16
  91.281 -	    unsigned long	isr;
  91.282 -	    unsigned long	rsv3;
  91.283 -	    unsigned long	iip;
  91.284 -	    unsigned long	ifa;
  91.285 -	    unsigned long	itir;
  91.286 -	    unsigned long	iipa;
  91.287 -	    unsigned long	ifs;
  91.288 -	    unsigned long	iim;		// CR24
  91.289 -	    unsigned long	iha;
  91.290 -	    unsigned long	rsv4[38];
  91.291 -	    unsigned long	lid;		// CR64
  91.292 -	    unsigned long	ivr;
  91.293 -	    unsigned long	tpr;
  91.294 -	    unsigned long	eoi;
  91.295 -	    unsigned long	irr[4];
  91.296 -	    unsigned long	itv;		// CR72
  91.297 -	    unsigned long	pmv;
  91.298 -	    unsigned long	cmcv;
  91.299 -	    unsigned long	rsv5[5];
  91.300 -	    unsigned long	lrr0;		// CR80
  91.301 -	    unsigned long	lrr1;
  91.302 -	    unsigned long	rsv6[46];
  91.303 -          };
  91.304 -	};
  91.305 -	union {
  91.306 -	  unsigned long		reserved5[128];
  91.307 -	  struct {
  91.308 -	    unsigned long precover_ifs;
  91.309 -	    unsigned long unat;  // not sure if this is needed until NaT arch is done
  91.310 -	    int interrupt_collection_enabled; // virtual psr.ic
  91.311 -	    int interrupt_delivery_enabled; // virtual psr.i
  91.312 -	    int pending_interruption;
  91.313 -	    int incomplete_regframe;	// see SDM vol2 6.8
  91.314 -	    unsigned long delivery_mask[4];
  91.315 -	    int metaphysical_mode;	// 1 = use metaphys mapping, 0 = use virtual
  91.316 -	    int banknum;	// 0 or 1, which virtual register bank is active
  91.317 -	    unsigned long rrs[8];	// region registers
  91.318 -	    unsigned long krs[8];	// kernel registers
  91.319 -	    unsigned long pkrs[8];	// protection key registers
  91.320 -	    unsigned long tmp[8];	// temp registers (e.g. for hyperprivops)
  91.321 -		// FIXME: tmp[8] temp'ly being used for virtual psr.pp
  91.322 -	  };
  91.323 +    vac_t   vac;
  91.324 +    vdc_t   vdc;
  91.325 +    unsigned long  virt_env_vaddr;
  91.326 +    unsigned long  reserved1[29];
  91.327 +    unsigned long  vhpi;
  91.328 +    unsigned long  reserved2[95];
  91.329 +    union {
  91.330 +        unsigned long  vgr[16];
  91.331 +        unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
  91.332 +    };
  91.333 +    union {
  91.334 +        unsigned long  vbgr[16];
  91.335 +        unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
  91.336 +    };
  91.337 +    unsigned long  vnat;
  91.338 +    unsigned long  vbnat;
  91.339 +    unsigned long  vcpuid[5];
  91.340 +    unsigned long  reserved3[11];
  91.341 +    unsigned long  vpsr;
  91.342 +    unsigned long  vpr;
  91.343 +    unsigned long  reserved4[76];
  91.344 +    union {
  91.345 +        unsigned long  vcr[128];
  91.346 +        struct {
  91.347 +            unsigned long dcr;  // CR0
  91.348 +            unsigned long itm;
  91.349 +            unsigned long iva;
  91.350 +            unsigned long rsv1[5];
  91.351 +            unsigned long pta;  // CR8
  91.352 +            unsigned long rsv2[7];
  91.353 +            unsigned long ipsr;  // CR16
  91.354 +            unsigned long isr;
  91.355 +            unsigned long rsv3;
  91.356 +            unsigned long iip;
  91.357 +            unsigned long ifa;
  91.358 +            unsigned long itir;
  91.359 +            unsigned long iipa;
  91.360 +            unsigned long ifs;
  91.361 +            unsigned long iim;  // CR24
  91.362 +            unsigned long iha;
  91.363 +            unsigned long rsv4[38];
  91.364 +            unsigned long lid;  // CR64
  91.365 +            unsigned long ivr;
  91.366 +            unsigned long tpr;
  91.367 +            unsigned long eoi;
  91.368 +            unsigned long irr[4];
  91.369 +            unsigned long itv;  // CR72
  91.370 +            unsigned long pmv;
  91.371 +            unsigned long cmcv;
  91.372 +            unsigned long rsv5[5];
  91.373 +            unsigned long lrr0;  // CR80
  91.374 +            unsigned long lrr1;
  91.375 +            unsigned long rsv6[46];
  91.376          };
  91.377 -	unsigned long		reserved6[3456];
  91.378 -	unsigned long		vmm_avail[128];
  91.379 -	unsigned long		reserved7[4096];
  91.380 +    };
  91.381 +    union {
  91.382 +        unsigned long  reserved5[128];
  91.383 +        struct {
  91.384 +            unsigned long precover_ifs;
  91.385 +            unsigned long unat;  // not sure if this is needed until NaT arch is done
  91.386 +            int interrupt_collection_enabled; // virtual psr.ic
  91.387 +            int interrupt_delivery_enabled; // virtual psr.i
  91.388 +            int pending_interruption;
  91.389 +            int incomplete_regframe; // see SDM vol2 6.8
  91.390 +            unsigned long delivery_mask[4];
  91.391 +            int metaphysical_mode; // 1 = use metaphys mapping, 0 = use virtual
  91.392 +            int banknum; // 0 or 1, which virtual register bank is active
  91.393 +            unsigned long rrs[8]; // region registers
  91.394 +            unsigned long krs[8]; // kernel registers
  91.395 +            unsigned long pkrs[8]; // protection key registers
  91.396 +            unsigned long tmp[8]; // temp registers (e.g. for hyperprivops)
  91.397 +            // FIXME: tmp[8] temp'ly being used for virtual psr.pp
  91.398 +        };
  91.399 +    };
  91.400 +    unsigned long  reserved6[3456];
  91.401 +    unsigned long  vmm_avail[128];
  91.402 +    unsigned long  reserved7[4096];
  91.403  } mapped_regs_t;
  91.404  
  91.405  typedef struct {
  91.406 -	mapped_regs_t *privregs;
  91.407 -	int evtchn_vector;
  91.408 +    mapped_regs_t *privregs;
  91.409 +    int evtchn_vector;
  91.410  } arch_vcpu_info_t;
  91.411  
  91.412  typedef mapped_regs_t vpd_t;
  91.413 @@ -247,25 +247,35 @@ typedef mapped_regs_t vpd_t;
  91.414  #define __ARCH_HAS_VCPU_INFO
  91.415  
  91.416  typedef struct {
  91.417 -	unsigned int flags;
  91.418 -	unsigned long start_info_pfn;
  91.419 -} arch_shared_info_t;		// DON'T PACK 
  91.420 +    unsigned int flags;
  91.421 +    unsigned long start_info_pfn;
  91.422 +} arch_shared_info_t;  // DON'T PACK 
  91.423  
  91.424  typedef struct vcpu_guest_context {
  91.425  #define VGCF_FPU_VALID (1<<0)
  91.426  #define VGCF_VMX_GUEST (1<<1)
  91.427  #define VGCF_IN_KERNEL (1<<2)
  91.428 -	unsigned long flags;       /* VGCF_* flags */
  91.429 -	unsigned long pt_base;     /* PMT table base */
  91.430 -	unsigned long share_io_pg; /* Shared page for I/O emulation */
  91.431 -	unsigned long sys_pgnr;    /* System pages out of domain memory */
  91.432 -	unsigned long vm_assist;   /* VMASST_TYPE_* bitmap, now none on IPF */
  91.433 +    unsigned long flags;       /* VGCF_* flags */
  91.434 +    unsigned long pt_base;     /* PMT table base */
  91.435 +    unsigned long share_io_pg; /* Shared page for I/O emulation */
  91.436 +    unsigned long sys_pgnr;    /* System pages out of domain memory */
  91.437 +    unsigned long vm_assist;   /* VMASST_TYPE_* bitmap, now none on IPF */
  91.438  
  91.439 -	cpu_user_regs_t regs;
  91.440 -	arch_vcpu_info_t vcpu;
  91.441 -	arch_shared_info_t shared;
  91.442 +    cpu_user_regs_t regs;
  91.443 +    arch_vcpu_info_t vcpu;
  91.444 +    arch_shared_info_t shared;
  91.445  } vcpu_guest_context_t;
  91.446  
  91.447  #endif /* !__ASSEMBLY__ */
  91.448  
  91.449  #endif /* __HYPERVISOR_IF_IA64_H__ */
  91.450 +
  91.451 +/*
  91.452 + * Local variables:
  91.453 + * mode: C
  91.454 + * c-set-style: "BSD"
  91.455 + * c-basic-offset: 4
  91.456 + * tab-width: 4
  91.457 + * indent-tabs-mode: nil
  91.458 + * End:
  91.459 + */
    92.1 --- a/xen/include/public/arch-x86_32.h	Wed Oct 12 10:11:35 2005 +0100
    92.2 +++ b/xen/include/public/arch-x86_32.h	Wed Oct 12 11:07:37 2005 +0100
    92.3 @@ -44,7 +44,6 @@
    92.4  /* And the trap vector is... */
    92.5  #define TRAP_INSTR "int $0x82"
    92.6  
    92.7 -
    92.8  /*
    92.9   * Virtual addresses beyond this are not modifiable by guest OSes. The 
   92.10   * machine->physical mapping table starts at this address, read-only.
   92.11 @@ -71,36 +70,36 @@
   92.12  #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
   92.13  #define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
   92.14  typedef struct trap_info {
   92.15 -    u8       vector;       /* exception vector                              */
   92.16 -    u8       flags;        /* 0-3: privilege level; 4: clear event enable?  */
   92.17 -    u16      cs;           /* code selector                                 */
   92.18 +    uint8_t       vector;  /* exception vector                              */
   92.19 +    uint8_t       flags;   /* 0-3: privilege level; 4: clear event enable?  */
   92.20 +    uint16_t      cs;      /* code selector                                 */
   92.21      unsigned long address; /* code offset                                   */
   92.22  } trap_info_t;
   92.23  
   92.24  typedef struct cpu_user_regs {
   92.25 -    u32 ebx;
   92.26 -    u32 ecx;
   92.27 -    u32 edx;
   92.28 -    u32 esi;
   92.29 -    u32 edi;
   92.30 -    u32 ebp;
   92.31 -    u32 eax;
   92.32 -    u16 error_code;    /* private */
   92.33 -    u16 entry_vector;  /* private */
   92.34 -    u32 eip;
   92.35 -    u16 cs;
   92.36 -    u8  saved_upcall_mask;
   92.37 -    u8  _pad0;
   92.38 -    u32 eflags;
   92.39 -    u32 esp;
   92.40 -    u16 ss, _pad1;
   92.41 -    u16 es, _pad2;
   92.42 -    u16 ds, _pad3;
   92.43 -    u16 fs, _pad4;
   92.44 -    u16 gs, _pad5;
   92.45 +    uint32_t ebx;
   92.46 +    uint32_t ecx;
   92.47 +    uint32_t edx;
   92.48 +    uint32_t esi;
   92.49 +    uint32_t edi;
   92.50 +    uint32_t ebp;
   92.51 +    uint32_t eax;
   92.52 +    uint16_t error_code;    /* private */
   92.53 +    uint16_t entry_vector;  /* private */
   92.54 +    uint32_t eip;
   92.55 +    uint16_t cs;
   92.56 +    uint8_t  saved_upcall_mask;
   92.57 +    uint8_t  _pad0;
   92.58 +    uint32_t eflags;
   92.59 +    uint32_t esp;
   92.60 +    uint16_t ss, _pad1;
   92.61 +    uint16_t es, _pad2;
   92.62 +    uint16_t ds, _pad3;
   92.63 +    uint16_t fs, _pad4;
   92.64 +    uint16_t gs, _pad5;
   92.65  } cpu_user_regs_t;
   92.66  
   92.67 -typedef u64 tsc_timestamp_t; /* RDTSC timestamp */
   92.68 +typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
   92.69  
   92.70  /*
   92.71   * The following is all CPU context. Note that the fpu_ctxt block is filled 
   92.72 @@ -129,12 +128,20 @@ typedef struct vcpu_guest_context {
   92.73  
   92.74  typedef struct arch_shared_info {
   92.75      unsigned long max_pfn;                  /* max pfn that appears in table */
   92.76 +    /* Frame containing list of mfns containing list of mfns containing p2m. */
   92.77      unsigned long pfn_to_mfn_frame_list_list; 
   92.78 -                                            /* frame containing list of mfns
   92.79 -					       containing list of mfns 
   92.80 -					       containing the p2m table. */
   92.81  } arch_shared_info_t;
   92.82  
   92.83  #endif
   92.84  
   92.85  #endif
   92.86 +
   92.87 +/*
   92.88 + * Local variables:
   92.89 + * mode: C
   92.90 + * c-set-style: "BSD"
   92.91 + * c-basic-offset: 4
   92.92 + * tab-width: 4
   92.93 + * indent-tabs-mode: nil
   92.94 + * End:
   92.95 + */
    93.1 --- a/xen/include/public/arch-x86_64.h	Wed Oct 12 10:11:35 2005 +0100
    93.2 +++ b/xen/include/public/arch-x86_64.h	Wed Oct 12 11:07:37 2005 +0100
    93.3 @@ -99,7 +99,7 @@
    93.4  #define VGCF_IN_SYSCALL (1<<8)
    93.5  struct switch_to_user {
    93.6      /* Top of stack (%rsp at point of hypercall). */
    93.7 -    u64 rax, r11, rcx, flags, rip, cs, rflags, rsp, ss;
    93.8 +    uint64_t rax, r11, rcx, flags, rip, cs, rflags, rsp, ss;
    93.9      /* Bottom of switch_to_user stack frame. */
   93.10  };
   93.11  
   93.12 @@ -118,54 +118,54 @@ struct switch_to_user {
   93.13  #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
   93.14  #define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
   93.15  typedef struct trap_info {
   93.16 -    u8       vector;       /* exception vector                              */
   93.17 -    u8       flags;        /* 0-3: privilege level; 4: clear event enable?  */
   93.18 -    u16      cs;           /* code selector                                 */
   93.19 +    uint8_t       vector;  /* exception vector                              */
   93.20 +    uint8_t       flags;   /* 0-3: privilege level; 4: clear event enable?  */
   93.21 +    uint16_t      cs;      /* code selector                                 */
   93.22      unsigned long address; /* code offset                                   */
   93.23  } trap_info_t;
   93.24  
   93.25  #ifdef __GNUC__
   93.26  /* Anonymous union includes both 32- and 64-bit names (e.g., eax/rax). */
   93.27 -#define __DECL_REG(name) union { u64 r ## name, e ## name; }
   93.28 +#define __DECL_REG(name) union { uint64_t r ## name, e ## name; }
   93.29  #else
   93.30  /* Non-gcc sources must always use the proper 64-bit name (e.g., rax). */
   93.31 -#define __DECL_REG(name) u64 r ## name
   93.32 +#define __DECL_REG(name) uint64_t r ## name
   93.33  #endif
   93.34  
   93.35  typedef struct cpu_user_regs {
   93.36 -    u64 r15;
   93.37 -    u64 r14;
   93.38 -    u64 r13;
   93.39 -    u64 r12;
   93.40 +    uint64_t r15;
   93.41 +    uint64_t r14;
   93.42 +    uint64_t r13;
   93.43 +    uint64_t r12;
   93.44      __DECL_REG(bp);
   93.45      __DECL_REG(bx);
   93.46 -    u64 r11;
   93.47 -    u64 r10;
   93.48 -    u64 r9;
   93.49 -    u64 r8;
   93.50 +    uint64_t r11;
   93.51 +    uint64_t r10;
   93.52 +    uint64_t r9;
   93.53 +    uint64_t r8;
   93.54      __DECL_REG(ax);
   93.55      __DECL_REG(cx);
   93.56      __DECL_REG(dx);
   93.57      __DECL_REG(si);
   93.58      __DECL_REG(di);
   93.59 -    u32 error_code;    /* private */
   93.60 -    u32 entry_vector;  /* private */
   93.61 +    uint32_t error_code;    /* private */
   93.62 +    uint32_t entry_vector;  /* private */
   93.63      __DECL_REG(ip);
   93.64 -    u16 cs, _pad0[1];
   93.65 -    u8  saved_upcall_mask;
   93.66 -    u8  _pad1[3];
   93.67 +    uint16_t cs, _pad0[1];
   93.68 +    uint8_t  saved_upcall_mask;
   93.69 +    uint8_t  _pad1[3];
   93.70      __DECL_REG(flags);
   93.71      __DECL_REG(sp);
   93.72 -    u16 ss, _pad2[3];
   93.73 -    u16 es, _pad3[3];
   93.74 -    u16 ds, _pad4[3];
   93.75 -    u16 fs, _pad5[3]; /* Non-zero => takes precedence over fs_base.      */
   93.76 -    u16 gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_user. */
   93.77 +    uint16_t ss, _pad2[3];
   93.78 +    uint16_t es, _pad3[3];
   93.79 +    uint16_t ds, _pad4[3];
   93.80 +    uint16_t fs, _pad5[3]; /* Non-zero => takes precedence over fs_base.     */
   93.81 +    uint16_t gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_usr. */
   93.82  } cpu_user_regs_t;
   93.83  
   93.84  #undef __DECL_REG
   93.85  
   93.86 -typedef u64 tsc_timestamp_t; /* RDTSC timestamp */
   93.87 +typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
   93.88  
   93.89  /*
   93.90   * The following is all CPU context. Note that the fpu_ctxt block is filled 
   93.91 @@ -190,19 +190,27 @@ typedef struct vcpu_guest_context {
   93.92      unsigned long syscall_callback_eip;
   93.93      unsigned long vm_assist;                /* VMASST_TYPE_* bitmap */
   93.94      /* Segment base addresses. */
   93.95 -    u64           fs_base;
   93.96 -    u64           gs_base_kernel;
   93.97 -    u64           gs_base_user;
   93.98 +    uint64_t      fs_base;
   93.99 +    uint64_t      gs_base_kernel;
  93.100 +    uint64_t      gs_base_user;
  93.101  } vcpu_guest_context_t;
  93.102  
  93.103  typedef struct arch_shared_info {
  93.104      unsigned long max_pfn;                  /* max pfn that appears in table */
  93.105 +    /* Frame containing list of mfns containing list of mfns containing p2m. */
  93.106      unsigned long pfn_to_mfn_frame_list_list; 
  93.107 -                                            /* frame containing list of mfns
  93.108 -					       containing list of mfns 
  93.109 -					       containing the p2m table. */
  93.110  } arch_shared_info_t;
  93.111  
  93.112  #endif /* !__ASSEMBLY__ */
  93.113  
  93.114  #endif
  93.115 +
  93.116 +/*
  93.117 + * Local variables:
  93.118 + * mode: C
  93.119 + * c-set-style: "BSD"
  93.120 + * c-basic-offset: 4
  93.121 + * tab-width: 4
  93.122 + * indent-tabs-mode: nil
  93.123 + * End:
  93.124 + */
    94.1 --- a/xen/include/public/dom0_ops.h	Wed Oct 12 10:11:35 2005 +0100
    94.2 +++ b/xen/include/public/dom0_ops.h	Wed Oct 12 11:07:37 2005 +0100
    94.3 @@ -44,7 +44,7 @@ typedef struct sched_adjdom_cmd dom0_adj
    94.4  #define DOM0_CREATEDOMAIN      8
    94.5  typedef struct {
    94.6      /* IN parameters */
    94.7 -    u32 ssidref;
    94.8 +    uint32_t ssidref;
    94.9      /* IN/OUT parameters. */
   94.10      /* Identifier for new domain (auto-allocate if zero is specified). */
   94.11      domid_t domain;
   94.12 @@ -53,7 +53,7 @@ typedef struct {
   94.13  #define DOM0_DESTROYDOMAIN     9
   94.14  typedef struct {
   94.15      /* IN variables. */
   94.16 -    domid_t      domain;
   94.17 +    domid_t domain;
   94.18  } dom0_destroydomain_t;
   94.19  
   94.20  #define DOM0_PAUSEDOMAIN      10
   94.21 @@ -82,22 +82,22 @@ typedef struct {
   94.22  #define DOMFLAGS_CPUSHIFT       8
   94.23  #define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code.  */
   94.24  #define DOMFLAGS_SHUTDOWNSHIFT 16
   94.25 -    u32      flags;
   94.26 +    uint32_t flags;
   94.27      unsigned long tot_pages;
   94.28      unsigned long max_pages;
   94.29      unsigned long shared_info_frame;       /* MFN of shared_info struct */
   94.30 -    u64      cpu_time;
   94.31 -    u32      n_vcpu;
   94.32 -    s32      vcpu_to_cpu[MAX_VIRT_CPUS];  /* current mapping   */
   94.33 +    uint64_t cpu_time;
   94.34 +    uint32_t n_vcpu;
   94.35 +    int32_t  vcpu_to_cpu[MAX_VIRT_CPUS];  /* current mapping   */
   94.36      cpumap_t cpumap[MAX_VIRT_CPUS];       /* allowable mapping */
   94.37 -    u32	     ssidref;
   94.38 +    uint32_t ssidref;
   94.39  } dom0_getdomaininfo_t;
   94.40  
   94.41  #define DOM0_SETDOMAININFO      13
   94.42  typedef struct {
   94.43      /* IN variables. */
   94.44 -    domid_t                   domain;
   94.45 -    u16                       vcpu;
   94.46 +    domid_t               domain;
   94.47 +    uint16_t              vcpu;
   94.48      /* IN/OUT parameters */
   94.49      vcpu_guest_context_t *ctxt;
   94.50  } dom0_setdomaininfo_t;
   94.51 @@ -105,29 +105,29 @@ typedef struct {
   94.52  #define DOM0_MSR              15
   94.53  typedef struct {
   94.54      /* IN variables. */
   94.55 -    u32 write;
   94.56 -    u32 cpu_mask;
   94.57 -    u32 msr;
   94.58 -    u32 in1;
   94.59 -    u32 in2;
   94.60 +    uint32_t write;
   94.61 +    uint32_t cpu_mask;
   94.62 +    uint32_t msr;
   94.63 +    uint32_t in1;
   94.64 +    uint32_t in2;
   94.65      /* OUT variables. */
   94.66 -    u32 out1;
   94.67 -    u32 out2;
   94.68 +    uint32_t out1;
   94.69 +    uint32_t out2;
   94.70  } dom0_msr_t;
   94.71  
   94.72  #define DOM0_DEBUG            16
   94.73  typedef struct {
   94.74      /* IN variables. */
   94.75 -    domid_t domain;
   94.76 -    u8  opcode;
   94.77 -    u32 in1;
   94.78 -    u32 in2;
   94.79 -    u32 in3;
   94.80 -    u32 in4;
   94.81 +    domid_t  domain;
   94.82 +    uint8_t  opcode;
   94.83 +    uint32_t in1;
   94.84 +    uint32_t in2;
   94.85 +    uint32_t in3;
   94.86 +    uint32_t in4;
   94.87      /* OUT variables. */
   94.88 -    u32 status;
   94.89 -    u32 out1;
   94.90 -    u32 out2;
   94.91 +    uint32_t status;
   94.92 +    uint32_t out1;
   94.93 +    uint32_t out2;
   94.94  } dom0_debug_t;
   94.95  
   94.96  /*
   94.97 @@ -137,9 +137,9 @@ typedef struct {
   94.98  #define DOM0_SETTIME          17
   94.99  typedef struct {
  94.100      /* IN variables. */
  94.101 -    u32 secs;
  94.102 -    u32 nsecs;
  94.103 -    u64 system_time;
  94.104 +    uint32_t secs;
  94.105 +    uint32_t nsecs;
  94.106 +    uint64_t system_time;
  94.107  } dom0_settime_t;
  94.108  
  94.109  #define DOM0_GETPAGEFRAMEINFO 18
  94.110 @@ -159,7 +159,7 @@ typedef struct {
  94.111      domid_t domain;        /* To which domain does the frame belong?    */
  94.112      /* OUT variables. */
  94.113      /* Is the page PINNED to a type? */
  94.114 -    u32 type;              /* see above type defs */
  94.115 +    uint32_t type;              /* see above type defs */
  94.116  } dom0_getpageframeinfo_t;
  94.117  
  94.118  /*
  94.119 @@ -168,10 +168,10 @@ typedef struct {
  94.120  #define DOM0_READCONSOLE      19
  94.121  typedef struct {
  94.122      /* IN variables. */
  94.123 -    u32      clear;        /* Non-zero -> clear after reading. */
  94.124 +    uint32_t clear;        /* Non-zero -> clear after reading. */
  94.125      /* IN/OUT variables. */
  94.126      char    *buffer;       /* In: Buffer start; Out: Used buffer start */
  94.127 -    u32      count;        /* In: Buffer size;  Out: Used buffer size  */
  94.128 +    uint32_t count;        /* In: Buffer size;  Out: Used buffer size  */
  94.129  } dom0_readconsole_t;
  94.130  
  94.131  /* 
  94.132 @@ -181,7 +181,7 @@ typedef struct {
  94.133  typedef struct {
  94.134      /* IN variables. */
  94.135      domid_t      domain;
  94.136 -    u16          vcpu;
  94.137 +    uint16_t          vcpu;
  94.138      cpumap_t     *cpumap;
  94.139  } dom0_pincpudomain_t;
  94.140  
  94.141 @@ -192,13 +192,13 @@ typedef struct {
  94.142  #define DOM0_TBUF_GET_INFO     0
  94.143  #define DOM0_TBUF_SET_CPU_MASK 1
  94.144  #define DOM0_TBUF_SET_EVT_MASK 2
  94.145 -    u8 op;
  94.146 +    uint8_t op;
  94.147      /* IN/OUT variables */
  94.148      unsigned long cpu_mask;
  94.149 -    u32           evt_mask;
  94.150 +    uint32_t      evt_mask;
  94.151      /* OUT variables */
  94.152      unsigned long buffer_mfn;
  94.153 -    u32      size;
  94.154 +    uint32_t size;
  94.155  } dom0_tbufcontrol_t;
  94.156  
  94.157  /*
  94.158 @@ -206,14 +206,14 @@ typedef struct {
  94.159   */
  94.160  #define DOM0_PHYSINFO         22
  94.161  typedef struct {
  94.162 -    u32      threads_per_core;
  94.163 -    u32      cores_per_socket;
  94.164 -    u32      sockets_per_node;
  94.165 -    u32      nr_nodes;
  94.166 -    u32      cpu_khz;
  94.167 +    uint32_t threads_per_core;
  94.168 +    uint32_t cores_per_socket;
  94.169 +    uint32_t sockets_per_node;
  94.170 +    uint32_t nr_nodes;
  94.171 +    uint32_t cpu_khz;
  94.172      unsigned long total_pages;
  94.173      unsigned long free_pages;
  94.174 -    u32      hw_cap[8];
  94.175 +    uint32_t hw_cap[8];
  94.176  } dom0_physinfo_t;
  94.177  
  94.178  /*
  94.179 @@ -222,7 +222,7 @@ typedef struct {
  94.180  #define DOM0_SCHED_ID        24
  94.181  typedef struct {
  94.182      /* OUT variable */
  94.183 -    u32 sched_id;
  94.184 +    uint32_t sched_id;
  94.185  } dom0_sched_id_t;
  94.186  
  94.187  /* 
  94.188 @@ -241,16 +241,16 @@ typedef struct {
  94.189  
  94.190  typedef struct dom0_shadow_control
  94.191  {
  94.192 -    u32 fault_count;
  94.193 -    u32 dirty_count;
  94.194 -    u32 dirty_net_count;     
  94.195 -    u32 dirty_block_count;     
  94.196 +    uint32_t fault_count;
  94.197 +    uint32_t dirty_count;
  94.198 +    uint32_t dirty_net_count;     
  94.199 +    uint32_t dirty_block_count;     
  94.200  } dom0_shadow_control_stats_t;
  94.201  
  94.202  typedef struct {
  94.203      /* IN variables. */
  94.204      domid_t        domain;
  94.205 -    u32            op;
  94.206 +    uint32_t       op;
  94.207      unsigned long *dirty_bitmap; /* pointer to locked buffer */
  94.208      /* IN/OUT variables. */
  94.209      unsigned long  pages;        /* size of buffer, updated with actual size */
  94.210 @@ -286,10 +286,10 @@ typedef struct {
  94.211      /* IN variables. */
  94.212      unsigned long pfn;
  94.213      unsigned long nr_pfns;
  94.214 -    u32           type;
  94.215 +    uint32_t      type;
  94.216      /* OUT variables. */
  94.217 -    u32           handle;
  94.218 -    u32           reg;
  94.219 +    uint32_t      handle;
  94.220 +    uint32_t      reg;
  94.221  } dom0_add_memtype_t;
  94.222  
  94.223  /*
  94.224 @@ -302,19 +302,19 @@ typedef struct {
  94.225  #define DOM0_DEL_MEMTYPE         32
  94.226  typedef struct {
  94.227      /* IN variables. */
  94.228 -    u32      handle;
  94.229 -    u32      reg;
  94.230 +    uint32_t handle;
  94.231 +    uint32_t reg;
  94.232  } dom0_del_memtype_t;
  94.233  
  94.234  /* Read current type of an MTRR (x86-specific). */
  94.235  #define DOM0_READ_MEMTYPE        33
  94.236  typedef struct {
  94.237      /* IN variables. */
  94.238 -    u32      reg;
  94.239 +    uint32_t reg;
  94.240      /* OUT variables. */
  94.241      unsigned long pfn;
  94.242      unsigned long nr_pfns;
  94.243 -    u32      type;
  94.244 +    uint32_t type;
  94.245  } dom0_read_memtype_t;
  94.246  
  94.247  /* Interface for controlling Xen software performance counters. */
  94.248 @@ -323,39 +323,39 @@ typedef struct {
  94.249  #define DOM0_PERFCCONTROL_OP_RESET 1   /* Reset all counters to zero. */
  94.250  #define DOM0_PERFCCONTROL_OP_QUERY 2   /* Get perfctr information. */
  94.251  typedef struct {
  94.252 -    u8      name[80];               /*  name of perf counter */
  94.253 -    u32     nr_vals;                /* number of values for this counter */
  94.254 -    u32     vals[64];               /* array of values */
  94.255 +    uint8_t      name[80];             /*  name of perf counter */
  94.256 +    uint32_t     nr_vals;              /* number of values for this counter */
  94.257 +    uint32_t     vals[64];             /* array of values */
  94.258  } dom0_perfc_desc_t;
  94.259  typedef struct {
  94.260      /* IN variables. */
  94.261 -    u32            op;                /*  DOM0_PERFCCONTROL_OP_??? */
  94.262 +    uint32_t       op;                /*  DOM0_PERFCCONTROL_OP_??? */
  94.263      /* OUT variables. */
  94.264 -    u32            nr_counters;       /*  number of counters */
  94.265 +    uint32_t       nr_counters;       /*  number of counters */
  94.266      dom0_perfc_desc_t *desc;          /*  counter information (or NULL) */
  94.267  } dom0_perfccontrol_t;
  94.268  
  94.269  #define DOM0_MICROCODE           35
  94.270  typedef struct {
  94.271      /* IN variables. */
  94.272 -    void   *data;                     /* Pointer to microcode data */
  94.273 -    u32     length;                   /* Length of microcode data. */
  94.274 +    void    *data;                    /* Pointer to microcode data */
  94.275 +    uint32_t length;                  /* Length of microcode data. */
  94.276  } dom0_microcode_t;
  94.277  
  94.278  #define DOM0_IOPORT_PERMISSION   36
  94.279  typedef struct {
  94.280 -    domid_t domain;                   /* domain to be affected */
  94.281 -    u16     first_port;               /* first port int range */
  94.282 -    u16     nr_ports;                 /* size of port range */
  94.283 -    u16     allow_access;             /* allow or deny access to range? */
  94.284 +    domid_t  domain;                  /* domain to be affected */
  94.285 +    uint16_t first_port;              /* first port int range */
  94.286 +    uint16_t nr_ports;                /* size of port range */
  94.287 +    uint16_t allow_access;            /* allow or deny access to range? */
  94.288  } dom0_ioport_permission_t;
  94.289  
  94.290  #define DOM0_GETVCPUCONTEXT      37
  94.291  typedef struct {
  94.292 -    domid_t domain;                   /* domain to be affected */
  94.293 -    u16     vcpu;                     /* vcpu # */
  94.294 +    domid_t  domain;                  /* domain to be affected */
  94.295 +    uint16_t vcpu;                    /* vcpu # */
  94.296      vcpu_guest_context_t *ctxt;       /* NB. IN/OUT variable. */
  94.297 -    u64     cpu_time;                 
  94.298 +    uint64_t cpu_time;                 
  94.299  } dom0_getvcpucontext_t;
  94.300  
  94.301  #define DOM0_GETDOMAININFOLIST   38
  94.302 @@ -382,14 +382,14 @@ typedef struct {
  94.303      /* OUT variables. */
  94.304      int nr_map_entries;
  94.305      struct dom0_memory_map_entry {
  94.306 -        u64 start, end;
  94.307 +        uint64_t start, end;
  94.308          int is_ram;
  94.309      } *memory_map;
  94.310  } dom0_physical_memory_map_t;
  94.311  
  94.312  typedef struct {
  94.313 -    u32 cmd;
  94.314 -    u32 interface_version; /* DOM0_INTERFACE_VERSION */
  94.315 +    uint32_t cmd;
  94.316 +    uint32_t interface_version; /* DOM0_INTERFACE_VERSION */
  94.317      union {
  94.318          dom0_createdomain_t      createdomain;
  94.319          dom0_pausedomain_t       pausedomain;
  94.320 @@ -426,3 +426,13 @@ typedef struct {
  94.321  } dom0_op_t;
  94.322  
  94.323  #endif /* __XEN_PUBLIC_DOM0_OPS_H__ */
  94.324 +
  94.325 +/*
  94.326 + * Local variables:
  94.327 + * mode: C
  94.328 + * c-set-style: "BSD"
  94.329 + * c-basic-offset: 4
  94.330 + * tab-width: 4
  94.331 + * indent-tabs-mode: nil
  94.332 + * End:
  94.333 + */
    95.1 --- a/xen/include/public/event_channel.h	Wed Oct 12 10:11:35 2005 +0100
    95.2 +++ b/xen/include/public/event_channel.h	Wed Oct 12 11:07:37 2005 +0100
    95.3 @@ -19,9 +19,9 @@
    95.4  #define EVTCHNOP_alloc_unbound    6
    95.5  typedef struct evtchn_alloc_unbound {
    95.6      /* IN parameters */
    95.7 -    domid_t dom, remote_dom;
    95.8 +    domid_t  dom, remote_dom;
    95.9      /* OUT parameters */
   95.10 -    u32     port;
   95.11 +    uint32_t port;
   95.12  } evtchn_alloc_unbound_t;
   95.13  
   95.14  /*
   95.15 @@ -34,10 +34,10 @@ typedef struct evtchn_alloc_unbound {
   95.16  #define EVTCHNOP_bind_interdomain 0
   95.17  typedef struct evtchn_bind_interdomain {
   95.18      /* IN parameters. */
   95.19 -    domid_t remote_dom;
   95.20 -    u32     remote_port;
   95.21 +    domid_t  remote_dom;
   95.22 +    uint32_t remote_port;
   95.23      /* OUT parameters. */
   95.24 -    u32     local_port;
   95.25 +    uint32_t local_port;
   95.26  } evtchn_bind_interdomain_t;
   95.27  
   95.28  /*
   95.29 @@ -51,10 +51,10 @@ typedef struct evtchn_bind_interdomain {
   95.30  #define EVTCHNOP_bind_virq        1
   95.31  typedef struct evtchn_bind_virq {
   95.32      /* IN parameters. */
   95.33 -    u32 virq;
   95.34 -    u32 vcpu;
   95.35 +    uint32_t virq;
   95.36 +    uint32_t vcpu;
   95.37      /* OUT parameters. */
   95.38 -    u32 port;
   95.39 +    uint32_t port;
   95.40  } evtchn_bind_virq_t;
   95.41  
   95.42  /*
   95.43 @@ -66,11 +66,11 @@ typedef struct evtchn_bind_virq {
   95.44  #define EVTCHNOP_bind_pirq        2
   95.45  typedef struct evtchn_bind_pirq {
   95.46      /* IN parameters. */
   95.47 -    u32 pirq;
   95.48 +    uint32_t pirq;
   95.49  #define BIND_PIRQ__WILL_SHARE 1
   95.50 -    u32 flags; /* BIND_PIRQ__* */
   95.51 +    uint32_t flags; /* BIND_PIRQ__* */
   95.52      /* OUT parameters. */
   95.53 -    u32 port;
   95.54 +    uint32_t port;
   95.55  } evtchn_bind_pirq_t;
   95.56  
   95.57  /*
   95.58 @@ -81,9 +81,9 @@ typedef struct evtchn_bind_pirq {
   95.59   */
   95.60  #define EVTCHNOP_bind_ipi         7
   95.61  typedef struct evtchn_bind_ipi {
   95.62 -    u32 vcpu;
   95.63 +    uint32_t vcpu;
   95.64      /* OUT parameters. */
   95.65 -    u32 port;
   95.66 +    uint32_t port;
   95.67  } evtchn_bind_ipi_t;
   95.68  
   95.69  /*
   95.70 @@ -94,7 +94,7 @@ typedef struct evtchn_bind_ipi {
   95.71  #define EVTCHNOP_close            3
   95.72  typedef struct evtchn_close {
   95.73      /* IN parameters. */
   95.74 -    u32 port;
   95.75 +    uint32_t port;
   95.76  } evtchn_close_t;
   95.77  
   95.78  /*
   95.79 @@ -104,7 +104,7 @@ typedef struct evtchn_close {
   95.80  #define EVTCHNOP_send             4
   95.81  typedef struct evtchn_send {
   95.82      /* IN parameters. */
   95.83 -    u32 port;
   95.84 +    uint32_t port;
   95.85  } evtchn_send_t;
   95.86  
   95.87  /*
   95.88 @@ -118,8 +118,8 @@ typedef struct evtchn_send {
   95.89  #define EVTCHNOP_status           5
   95.90  typedef struct evtchn_status {
   95.91      /* IN parameters */
   95.92 -    domid_t dom;
   95.93 -    u32     port;
   95.94 +    domid_t  dom;
   95.95 +    uint32_t port;
   95.96      /* OUT parameters */
   95.97  #define EVTCHNSTAT_closed       0  /* Channel is not in use.                 */
   95.98  #define EVTCHNSTAT_unbound      1  /* Channel is waiting interdom connection.*/
   95.99 @@ -127,18 +127,18 @@ typedef struct evtchn_status {
  95.100  #define EVTCHNSTAT_pirq         3  /* Channel is bound to a phys IRQ line.   */
  95.101  #define EVTCHNSTAT_virq         4  /* Channel is bound to a virtual IRQ line */
  95.102  #define EVTCHNSTAT_ipi          5  /* Channel is bound to a virtual IPI line */
  95.103 -    u32     status;
  95.104 -    u32     vcpu;                  /* VCPU to which this channel is bound.   */
  95.105 +    uint32_t status;
  95.106 +    uint32_t vcpu;                 /* VCPU to which this channel is bound.   */
  95.107      union {
  95.108          struct {
  95.109 -            domid_t dom;
  95.110 +            domid_t  dom;
  95.111          } unbound; /* EVTCHNSTAT_unbound */
  95.112          struct {
  95.113 -            domid_t dom;
  95.114 -            u32     port;
  95.115 +            domid_t  dom;
  95.116 +            uint32_t port;
  95.117          } interdomain; /* EVTCHNSTAT_interdomain */
  95.118 -        u32 pirq;      /* EVTCHNSTAT_pirq        */
  95.119 -        u32 virq;      /* EVTCHNSTAT_virq        */
  95.120 +        uint32_t pirq;      /* EVTCHNSTAT_pirq        */
  95.121 +        uint32_t virq;      /* EVTCHNSTAT_virq        */
  95.122      } u;
  95.123  } evtchn_status_t;
  95.124  
  95.125 @@ -155,12 +155,12 @@ typedef struct evtchn_status {
  95.126  #define EVTCHNOP_bind_vcpu        8
  95.127  typedef struct evtchn_bind_vcpu {
  95.128      /* IN parameters. */
  95.129 -    u32 port;
  95.130 -    u32 vcpu;
  95.131 +    uint32_t port;
  95.132 +    uint32_t vcpu;
  95.133  } evtchn_bind_vcpu_t;
  95.134  
  95.135  typedef struct evtchn_op {
  95.136 -    u32 cmd; /* EVTCHNOP_* */
  95.137 +    uint32_t cmd; /* EVTCHNOP_* */
  95.138      union {
  95.139          evtchn_alloc_unbound_t    alloc_unbound;
  95.140          evtchn_bind_interdomain_t bind_interdomain;
  95.141 @@ -175,3 +175,13 @@ typedef struct evtchn_op {
  95.142  } evtchn_op_t;
  95.143  
  95.144  #endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */
  95.145 +
  95.146 +/*
  95.147 + * Local variables:
  95.148 + * mode: C
  95.149 + * c-set-style: "BSD"
  95.150 + * c-basic-offset: 4
  95.151 + * tab-width: 4
  95.152 + * indent-tabs-mode: nil
  95.153 + * End:
  95.154 + */
    96.1 --- a/xen/include/public/grant_table.h	Wed Oct 12 10:11:35 2005 +0100
    96.2 +++ b/xen/include/public/grant_table.h	Wed Oct 12 11:07:37 2005 +0100
    96.3 @@ -73,14 +73,14 @@
    96.4   */
    96.5  typedef struct grant_entry {
    96.6      /* GTF_xxx: various type and flag information.  [XEN,GST] */
    96.7 -    u16     flags;
    96.8 +    uint16_t     flags;
    96.9      /* The domain being granted foreign privileges. [GST] */
   96.10      domid_t domid;
   96.11      /*
   96.12       * GTF_permit_access: Frame that @domid is allowed to map and access. [GST]
   96.13       * GTF_accept_transfer: Frame whose ownership transferred by @domid. [XEN]
   96.14       */
   96.15 -    u32     frame;
   96.16 +    uint32_t     frame;
   96.17  } grant_entry_t;
   96.18  
   96.19  /*
   96.20 @@ -131,7 +131,7 @@ typedef struct grant_entry {
   96.21  /*
   96.22   * Reference to a grant entry in a specified domain's grant table.
   96.23   */
   96.24 -typedef u16 grant_ref_t;
   96.25 +typedef uint16_t grant_ref_t;
   96.26  
   96.27  /*
   96.28   * GNTTABOP_map_grant_ref: Map the grant entry (<dom>,<ref>) for access
   96.29 @@ -153,13 +153,13 @@ typedef u16 grant_ref_t;
   96.30  #define GNTTABOP_map_grant_ref        0
   96.31  typedef struct gnttab_map_grant_ref {
   96.32      /* IN parameters. */
   96.33 -    u64         host_addr;
   96.34 -    domid_t     dom;
   96.35 +    uint64_t host_addr;
   96.36 +    domid_t  dom;
   96.37      grant_ref_t ref;
   96.38 -    u16         flags;                /* GNTMAP_* */
   96.39 +    uint16_t flags;               /* GNTMAP_* */
   96.40      /* OUT parameters. */
   96.41 -    s16         handle;               /* +ve: handle; -ve: GNTST_* */
   96.42 -    u64         dev_bus_addr;
   96.43 +    int16_t  handle;              /* +ve: handle; -ve: GNTST_* */
   96.44 +    uint64_t dev_bus_addr;
   96.45  } gnttab_map_grant_ref_t;
   96.46  
   96.47  /*
   96.48 @@ -176,11 +176,11 @@ typedef struct gnttab_map_grant_ref {
   96.49  #define GNTTABOP_unmap_grant_ref      1
   96.50  typedef struct gnttab_unmap_grant_ref {
   96.51      /* IN parameters. */
   96.52 -    u64         host_addr;
   96.53 -    u64         dev_bus_addr;
   96.54 -    u16         handle;
   96.55 +    uint64_t host_addr;
   96.56 +    uint64_t dev_bus_addr;
   96.57 +    uint16_t handle;
   96.58      /* OUT parameters. */
   96.59 -    s16         status;               /* GNTST_* */
   96.60 +    int16_t  status;              /* GNTST_* */
   96.61  } gnttab_unmap_grant_ref_t;
   96.62  
   96.63  /*
   96.64 @@ -195,10 +195,10 @@ typedef struct gnttab_unmap_grant_ref {
   96.65  #define GNTTABOP_setup_table          2
   96.66  typedef struct gnttab_setup_table {
   96.67      /* IN parameters. */
   96.68 -    domid_t     dom;
   96.69 -    u16         nr_frames;
   96.70 +    domid_t  dom;
   96.71 +    uint16_t nr_frames;
   96.72      /* OUT parameters. */
   96.73 -    s16         status;               /* GNTST_* */
   96.74 +    int16_t  status;              /* GNTST_* */
   96.75      unsigned long *frame_list;
   96.76  } gnttab_setup_table_t;
   96.77  
   96.78 @@ -209,9 +209,9 @@ typedef struct gnttab_setup_table {
   96.79  #define GNTTABOP_dump_table           3
   96.80  typedef struct gnttab_dump_table {
   96.81      /* IN parameters. */
   96.82 -    domid_t     dom;
   96.83 +    domid_t dom;
   96.84      /* OUT parameters. */
   96.85 -    s16         status;               /* GNTST_* */
   96.86 +    int16_t status;               /* GNTST_* */
   96.87  } gnttab_dump_table_t;
   96.88  
   96.89  /*
   96.90 @@ -223,10 +223,10 @@ typedef struct gnttab_dump_table {
   96.91  typedef struct {
   96.92      /* IN parameters. */
   96.93      unsigned long mfn;
   96.94 -    domid_t     domid;
   96.95 -    grant_ref_t ref;
   96.96 +    domid_t       domid;
   96.97 +    grant_ref_t   ref;
   96.98      /* OUT parameters. */
   96.99 -    s16         status;
  96.100 +    int16_t       status;
  96.101  } gnttab_transfer_t;
  96.102  
  96.103  /*
  96.104 @@ -283,3 +283,13 @@ typedef struct {
  96.105  }
  96.106  
  96.107  #endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */
  96.108 +
  96.109 +/*
  96.110 + * Local variables:
  96.111 + * mode: C
  96.112 + * c-set-style: "BSD"
  96.113 + * c-basic-offset: 4
  96.114 + * tab-width: 4
  96.115 + * indent-tabs-mode: nil
  96.116 + * End:
  96.117 + */
    97.1 --- a/xen/include/public/io/blkif.h	Wed Oct 12 10:11:35 2005 +0100
    97.2 +++ b/xen/include/public/io/blkif.h	Wed Oct 12 11:07:37 2005 +0100
    97.3 @@ -12,9 +12,9 @@
    97.4  #include "ring.h"
    97.5  
    97.6  #ifndef blkif_vdev_t
    97.7 -#define blkif_vdev_t   u16
    97.8 +#define blkif_vdev_t   uint16_t
    97.9  #endif
   97.10 -#define blkif_sector_t u64
   97.11 +#define blkif_sector_t uint64_t
   97.12  
   97.13  #define BLKIF_OP_READ      0
   97.14  #define BLKIF_OP_WRITE     1
   97.15 @@ -30,8 +30,8 @@
   97.16  #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11
   97.17  
   97.18  typedef struct blkif_request {
   97.19 -    u8             operation;    /* BLKIF_OP_???                         */
   97.20 -    u8             nr_segments;  /* number of segments                   */
   97.21 +    uint8_t        operation;    /* BLKIF_OP_???                         */
   97.22 +    uint8_t        nr_segments;  /* number of segments                   */
   97.23      blkif_vdev_t   handle;       /* only for read/write requests         */
   97.24      unsigned long  id;           /* private guest value, echoed in resp  */
   97.25      blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
   97.26 @@ -51,8 +51,8 @@ typedef struct blkif_request {
   97.27  
   97.28  typedef struct blkif_response {
   97.29      unsigned long   id;              /* copied from request */
   97.30 -    u8              operation;       /* copied from request */
   97.31 -    s16             status;          /* BLKIF_RSP_???       */
   97.32 +    uint8_t         operation;       /* copied from request */
   97.33 +    int16_t         status;          /* BLKIF_RSP_???       */
   97.34  } blkif_response_t;
   97.35  
   97.36  #define BLKIF_RSP_ERROR  -1 /* non-specific 'error' */
   97.37 @@ -72,3 +72,13 @@ DEFINE_RING_TYPES(blkif, blkif_request_t
   97.38  #define VDISK_READONLY     0x4
   97.39  
   97.40  #endif /* __XEN_PUBLIC_IO_BLKIF_H__ */
   97.41 +
   97.42 +/*
   97.43 + * Local variables:
   97.44 + * mode: C
   97.45 + * c-set-style: "BSD"
   97.46 + * c-basic-offset: 4
   97.47 + * tab-width: 4
   97.48 + * indent-tabs-mode: nil
   97.49 + * End:
   97.50 + */
    98.1 --- a/xen/include/public/io/console.h	Wed Oct 12 10:11:35 2005 +0100
    98.2 +++ b/xen/include/public/io/console.h	Wed Oct 12 11:07:37 2005 +0100
    98.3 @@ -9,7 +9,7 @@
    98.4  #ifndef __XEN_PUBLIC_IO_CONSOLE_H__
    98.5  #define __XEN_PUBLIC_IO_CONSOLE_H__
    98.6  
    98.7 -typedef u32 XENCONS_RING_IDX;
    98.8 +typedef uint32_t XENCONS_RING_IDX;
    98.9  
   98.10  #define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1))
   98.11  
   98.12 @@ -21,3 +21,13 @@ struct xencons_interface {
   98.13  };
   98.14  
   98.15  #endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */
   98.16 +
   98.17 +/*
   98.18 + * Local variables:
   98.19 + * mode: C
   98.20 + * c-set-style: "BSD"
   98.21 + * c-basic-offset: 4
   98.22 + * tab-width: 4
   98.23 + * indent-tabs-mode: nil
   98.24 + * End:
   98.25 + */
    99.1 --- a/xen/include/public/io/ioreq.h	Wed Oct 12 10:11:35 2005 +0100
    99.2 +++ b/xen/include/public/io/ioreq.h	Wed Oct 12 11:07:37 2005 +0100
    99.3 @@ -29,11 +29,11 @@
    99.4  #define STATE_IORESP_READY      3
    99.5  #define STATE_IORESP_HOOK       4
    99.6  
    99.7 -#define IOREQ_TYPE_PIO		0	/* pio */
    99.8 -#define IOREQ_TYPE_COPY		1	/* mmio ops */
    99.9 -#define IOREQ_TYPE_AND		2
   99.10 -#define IOREQ_TYPE_OR		3
   99.11 -#define IOREQ_TYPE_XOR		4
   99.12 +#define IOREQ_TYPE_PIO  0 /* pio */
   99.13 +#define IOREQ_TYPE_COPY  1 /* mmio ops */
   99.14 +#define IOREQ_TYPE_AND  2
   99.15 +#define IOREQ_TYPE_OR  3
   99.16 +#define IOREQ_TYPE_XOR  4
   99.17  
   99.18  /*
   99.19   * VMExit dispatcher should cooperate with instruction decoder to
   99.20 @@ -41,38 +41,48 @@
   99.21   * virq 
   99.22   */
   99.23  typedef struct {
   99.24 -    u64     addr;               /*  physical address            */
   99.25 -    u64     size;               /*  size in bytes               */
   99.26 -    u64     count;		/*  for rep prefixes            */
   99.27 +    uint64_t addr;   /*  physical address            */
   99.28 +    uint64_t size;   /*  size in bytes               */
   99.29 +    uint64_t count;  /*  for rep prefixes            */
   99.30      union {
   99.31 -        u64     data;           /*  data                        */
   99.32 -        void    *pdata;         /*  pointer to data             */
   99.33 +        uint64_t data;           /*  data                        */
   99.34 +        void    *pdata;          /*  pointer to data             */
   99.35      } u;
   99.36 -    u8      state:4;
   99.37 -    u8      pdata_valid:1;	/* if 1, use pdata above        */
   99.38 -    u8      dir:1;		/*  1=read, 0=write             */
   99.39 -    u8      df:1;
   99.40 -    u8      type;		/* I/O type			*/
   99.41 +    uint8_t state:4;
   99.42 +    uint8_t pdata_valid:1; /* if 1, use pdata above  */
   99.43 +    uint8_t dir:1;   /*  1=read, 0=write             */
   99.44 +    uint8_t df:1;
   99.45 +    uint8_t type;    /* I/O type                     */
   99.46  } ioreq_t;
   99.47  
   99.48  #define MAX_VECTOR    256
   99.49  #define BITS_PER_BYTE   8
   99.50 -#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
   99.51 +#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(uint64_t)))
   99.52  
   99.53  typedef struct {
   99.54 -    u64   pic_intr[INTR_LEN];
   99.55 -    u64   pic_mask[INTR_LEN];
   99.56 -    int     eport; /* Event channel port */
   99.57 +    uint64_t pic_intr[INTR_LEN];
   99.58 +    uint64_t pic_mask[INTR_LEN];
   99.59 +    int      eport; /* Event channel port */
   99.60  } global_iodata_t;
   99.61  
   99.62  typedef struct {
   99.63 -    ioreq_t         vp_ioreq;
   99.64 -    unsigned long   vp_intr[INTR_LEN];
   99.65 +    ioreq_t       vp_ioreq;
   99.66 +    unsigned long vp_intr[INTR_LEN];
   99.67  } vcpu_iodata_t;
   99.68  
   99.69  typedef struct {
   99.70 -    global_iodata_t     sp_global;
   99.71 -    vcpu_iodata_t       vcpu_iodata[1];
   99.72 +    global_iodata_t sp_global;
   99.73 +    vcpu_iodata_t   vcpu_iodata[1];
   99.74  } shared_iopage_t;
   99.75  
   99.76  #endif /* _IOREQ_H_ */
   99.77 +
   99.78 +/*
   99.79 + * Local variables:
   99.80 + * mode: C
   99.81 + * c-set-style: "BSD"
   99.82 + * c-basic-offset: 4
   99.83 + * tab-width: 4
   99.84 + * indent-tabs-mode: nil
   99.85 + * End:
   99.86 + */
   100.1 --- a/xen/include/public/io/netif.h	Wed Oct 12 10:11:35 2005 +0100
   100.2 +++ b/xen/include/public/io/netif.h	Wed Oct 12 11:07:37 2005 +0100
   100.3 @@ -11,34 +11,34 @@
   100.4  
   100.5  typedef struct netif_tx_request {
   100.6      grant_ref_t gref;      /* Reference to buffer page */
   100.7 -    u16      offset:15;    /* Offset within buffer page */
   100.8 -    u16      csum_blank:1; /* Proto csum field blank?   */
   100.9 -    u16      id;           /* Echoed in response message. */
  100.10 -    u16      size;         /* Packet size in bytes.       */
  100.11 +    uint16_t offset:15;    /* Offset within buffer page */
  100.12 +    uint16_t csum_blank:1; /* Proto csum field blank?   */
  100.13 +    uint16_t id;           /* Echoed in response message. */
  100.14 +    uint16_t size;         /* Packet size in bytes.       */
  100.15  } netif_tx_request_t;
  100.16  
  100.17  typedef struct netif_tx_response {
  100.18 -    u16      id;
  100.19 -    s8       status;
  100.20 +    uint16_t id;
  100.21 +    int8_t   status;
  100.22  } netif_tx_response_t;
  100.23  
  100.24  typedef struct {
  100.25 -    u16       id;       /* Echoed in response message.        */
  100.26 -    grant_ref_t gref;	/* Reference to incoming granted frame */
  100.27 +    uint16_t    id;        /* Echoed in response message.        */
  100.28 +    grant_ref_t gref;      /* Reference to incoming granted frame */
  100.29  } netif_rx_request_t;
  100.30  
  100.31  typedef struct {
  100.32 -    u16      offset;     /* Offset in page of start of received packet  */
  100.33 -    u16      csum_valid; /* Protocol checksum is validated?       */
  100.34 -    u16      id;
  100.35 -    s16      status;     /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */
  100.36 +    uint16_t offset;     /* Offset in page of start of received packet  */
  100.37 +    uint16_t csum_valid; /* Protocol checksum is validated?       */
  100.38 +    uint16_t id;
  100.39 +    int16_t  status;     /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */
  100.40  } netif_rx_response_t;
  100.41  
  100.42  /*
  100.43   * We use a special capitalised type name because it is _essential_ that all 
  100.44   * arithmetic on indexes is done on an integer type of the correct size.
  100.45   */
  100.46 -typedef u32 NETIF_RING_IDX;
  100.47 +typedef uint32_t NETIF_RING_IDX;
  100.48  
  100.49  /*
  100.50   * Ring indexes are 'free running'. That is, they are not stored modulo the
  100.51 @@ -91,3 +91,13 @@ typedef struct netif_rx_interface {
  100.52  #define NETIF_RSP_OKAY             0
  100.53  
  100.54  #endif
  100.55 +
  100.56 +/*
  100.57 + * Local variables:
  100.58 + * mode: C
  100.59 + * c-set-style: "BSD"
  100.60 + * c-basic-offset: 4
  100.61 + * tab-width: 4
  100.62 + * indent-tabs-mode: nil
  100.63 + * End:
  100.64 + */
   101.1 --- a/xen/include/public/io/ring.h	Wed Oct 12 10:11:35 2005 +0100
   101.2 +++ b/xen/include/public/io/ring.h	Wed Oct 12 11:07:37 2005 +0100
   101.3 @@ -197,3 +197,13 @@ typedef struct __name##_back_ring __name
   101.4      (((_cons) - (_r)->rsp_prod_pvt) >= RING_SIZE(_r))
   101.5  
   101.6  #endif /* __XEN_PUBLIC_IO_RING_H__ */
   101.7 +
   101.8 +/*
   101.9 + * Local variables:
  101.10 + * mode: C
  101.11 + * c-set-style: "BSD"
  101.12 + * c-basic-offset: 4
  101.13 + * tab-width: 4
  101.14 + * indent-tabs-mode: nil
  101.15 + * End:
  101.16 + */
   102.1 --- a/xen/include/public/io/tpmif.h	Wed Oct 12 10:11:35 2005 +0100
   102.2 +++ b/xen/include/public/io/tpmif.h	Wed Oct 12 11:07:37 2005 +0100
   102.3 @@ -19,15 +19,15 @@
   102.4  typedef struct {
   102.5      unsigned long addr;   /* Machine address of packet.   */
   102.6      int      ref;         /* grant table access reference */
   102.7 -    u16      id;          /* Echoed in response message.  */
   102.8 -    u16      size;        /* Packet size in bytes.        */
   102.9 +    uint16_t id;          /* Echoed in response message.  */
  102.10 +    uint16_t size;        /* Packet size in bytes.        */
  102.11  } tpmif_tx_request_t;
  102.12  
  102.13  /*
  102.14   * The TPMIF_TX_RING_SIZE defines the number of pages the
  102.15   * front-end and backend can exchange (= size of array).
  102.16   */
  102.17 -typedef u32 TPMIF_RING_IDX;
  102.18 +typedef uint32_t TPMIF_RING_IDX;
  102.19  
  102.20  #define TPMIF_TX_RING_SIZE 10
  102.21  
  102.22 @@ -42,3 +42,13 @@ typedef struct {
  102.23  } tpmif_tx_interface_t;
  102.24  
  102.25  #endif
  102.26 +
  102.27 +/*
  102.28 + * Local variables:
  102.29 + * mode: C
  102.30 + * c-set-style: "BSD"
  102.31 + * c-basic-offset: 4
  102.32 + * tab-width: 4
  102.33 + * indent-tabs-mode: nil
  102.34 + * End:
  102.35 + */
   103.1 --- a/xen/include/public/io/usbif.h	Wed Oct 12 10:11:35 2005 +0100
   103.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   103.3 @@ -1,66 +0,0 @@
   103.4 -/******************************************************************************
   103.5 - * usbif.h
   103.6 - * 
   103.7 - * Unified block-device I/O interface for Xen guest OSes.
   103.8 - * 
   103.9 - * Copyright (c) 2003-2004, Keir Fraser
  103.10 - */
  103.11 -
  103.12 -#ifndef __SHARED_USBIF_H__
  103.13 -#define __SHARED_USBIF_H__
  103.14 -
  103.15 -#define usbif_vdev_t   u16
  103.16 -#define usbif_sector_t u64
  103.17 -
  103.18 -#define USBIF_OP_IO      0 /* Request IO to a device */
  103.19 -#define USBIF_OP_PROBE   1 /* Is there a device on this port? */
  103.20 -#define USBIF_OP_RESET   2 /* Reset a virtual USB port.       */
  103.21 -
  103.22 -typedef struct {
  103.23 -    unsigned long  id;           /* private guest value, echoed in resp  */
  103.24 -    u8             operation;    /* USBIF_OP_???                         */
  103.25 -    u8  __pad1;
  103.26 -    usbif_vdev_t   port;         /* guest virtual USB port               */
  103.27 -    unsigned long  devnum :7;    /* Device address, as seen by the guest.*/
  103.28 -    unsigned long  endpoint :4;  /* Device endpoint.                         */
  103.29 -    unsigned long  direction :1; /* Pipe direction.                          */
  103.30 -    unsigned long  speed :1;     /* Pipe speed.                              */
  103.31 -    unsigned long  pipe_type :2; /* Pipe type (iso, bulk, int, ctrl)         */
  103.32 -    unsigned long  __pad2 :18;
  103.33 -    unsigned long  transfer_buffer; /* Machine address */
  103.34 -    unsigned long  length;          /* Buffer length */
  103.35 -    unsigned long  transfer_flags;  /* For now just pass Linux transfer
  103.36 -                                     * flags - this may change. */
  103.37 -    unsigned char setup[8];         /* Embed setup packets directly. */
  103.38 -    unsigned long  iso_schedule;    /* Machine address of transfer sched (iso
  103.39 -                                     * only) */
  103.40 -    unsigned long num_iso;        /* length of iso schedule */
  103.41 -    unsigned long timeout;        /* timeout in ms */
  103.42 -} usbif_request_t;
  103.43 -
  103.44 -/* Data we need to pass:
  103.45 - * - Transparently handle short packets or complain at us?
  103.46 - */
  103.47 -
  103.48 -typedef struct {
  103.49 -    unsigned long   id;              /* copied from request         */
  103.50 -    u8              operation;       /* copied from request         */
  103.51 -    u8              data;            /* Small chunk of in-band data */
  103.52 -    s16             status;          /* USBIF_RSP_???               */
  103.53 -    unsigned long   transfer_mutex;  /* Used for cancelling requests atomically. */
  103.54 -    unsigned long    length;         /* How much data we really got */
  103.55 -} usbif_response_t;
  103.56 -
  103.57 -#define USBIF_RSP_ERROR  -1 /* non-specific 'error' */
  103.58 -#define USBIF_RSP_OKAY    0 /* non-specific 'okay'  */
  103.59 -
  103.60 -DEFINE_RING_TYPES(usbif, usbif_request_t, usbif_response_t);
  103.61 -
  103.62 -typedef struct {
  103.63 -    unsigned long length; /* IN = expected, OUT = actual */
  103.64 -    unsigned long buffer_offset;  /* IN offset in buffer specified in main
  103.65 -                                     packet */
  103.66 -    unsigned long status; /* OUT Status for this packet. */
  103.67 -} usbif_iso_t;
  103.68 -
  103.69 -#endif /* __SHARED_USBIF_H__ */
   104.1 --- a/xen/include/public/io/vmx_vlapic.h	Wed Oct 12 10:11:35 2005 +0100
   104.2 +++ b/xen/include/public/io/vmx_vlapic.h	Wed Oct 12 11:07:37 2005 +0100
   104.3 @@ -25,33 +25,43 @@
   104.4  #define VL_STATE_EOI_LOCK   3
   104.5  
   104.6  #define VLOCAL_APIC_MAX_INTS             256
   104.7 -#define VLAPIC_INT_COUNT                (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(u64)))
   104.8 -#define VLAPIC_INT_COUNT_32             (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(u32)))
   104.9 +#define VLAPIC_INT_COUNT                (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(uint64_t)))
  104.10 +#define VLAPIC_INT_COUNT_32             (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * sizeof(uint32_t)))
  104.11  
  104.12  struct vapic_bus_message{
  104.13 -   u8   deliv_mode:4;   /* deliver mode, including fixed, LPRI, etc */
  104.14 -   u8   level:1;        /* level or edge */
  104.15 -   u8   trig_mod:1;    /* assert or disassert */
  104.16 -   u8   reserved:2;
  104.17 -   u8   vector;
  104.18 +   uint8_t   deliv_mode:4;   /* deliver mode, including fixed, LPRI, etc */
  104.19 +   uint8_t   level:1;        /* level or edge */
  104.20 +   uint8_t   trig_mod:1;    /* assert or disassert */
  104.21 +   uint8_t   reserved:2;
  104.22 +   uint8_t   vector;
  104.23  };
  104.24  
  104.25  typedef struct {
  104.26      /* interrupt for PIC and ext type IOAPIC interrupt */
  104.27 -    u64   vl_ext_intr[VLAPIC_INT_COUNT];
  104.28 -    u64   vl_ext_intr_mask[VLAPIC_INT_COUNT];
  104.29 -    u64   vl_apic_intr[VLAPIC_INT_COUNT];
  104.30 -    u64   vl_apic_tmr[VLAPIC_INT_COUNT];
  104.31 -    u64   vl_eoi[VLAPIC_INT_COUNT];
  104.32 -    u32   vl_lapic_id;
  104.33 -    u32   direct_intr;
  104.34 -    u32   vl_apr;
  104.35 -    u32   vl_logical_dest;
  104.36 -    u32   vl_dest_format;
  104.37 -    u32   vl_arb_id;
  104.38 -    u32   vl_state;
  104.39 -    u32   apic_msg_count;
  104.40 +    uint64_t   vl_ext_intr[VLAPIC_INT_COUNT];
  104.41 +    uint64_t   vl_ext_intr_mask[VLAPIC_INT_COUNT];
  104.42 +    uint64_t   vl_apic_intr[VLAPIC_INT_COUNT];
  104.43 +    uint64_t   vl_apic_tmr[VLAPIC_INT_COUNT];
  104.44 +    uint64_t   vl_eoi[VLAPIC_INT_COUNT];
  104.45 +    uint32_t   vl_lapic_id;
  104.46 +    uint32_t   direct_intr;
  104.47 +    uint32_t   vl_apr;
  104.48 +    uint32_t   vl_logical_dest;
  104.49 +    uint32_t   vl_dest_format;
  104.50 +    uint32_t   vl_arb_id;
  104.51 +    uint32_t   vl_state;
  104.52 +    uint32_t   apic_msg_count;
  104.53      struct vapic_bus_message  vl_apic_msg[24];
  104.54  } vlapic_info;
  104.55  
  104.56  #endif /* _VMX_VLAPIC_H_ */
  104.57 +
  104.58 +/*
  104.59 + * Local variables:
  104.60 + * mode: C
  104.61 + * c-set-style: "BSD"
  104.62 + * c-basic-offset: 4
  104.63 + * tab-width: 4
  104.64 + * indent-tabs-mode: nil
  104.65 + * End:
  104.66 + */
   105.1 --- a/xen/include/public/io/xs_wire.h	Wed Oct 12 10:11:35 2005 +0100
   105.2 +++ b/xen/include/public/io/xs_wire.h	Wed Oct 12 11:07:37 2005 +0100
   105.3 @@ -76,12 +76,13 @@ static struct xsd_errors xsd_errors[] __
   105.4      XSD_ERROR(EAGAIN),
   105.5      XSD_ERROR(EISCONN),
   105.6  };
   105.7 +
   105.8  struct xsd_sockmsg
   105.9  {
  105.10 -    u32 type;  /* XS_??? */
  105.11 -    u32 req_id;/* Request identifier, echoed in daemon's response.  */
  105.12 -    u32 tx_id; /* Transaction id (0 if not related to a transaction). */
  105.13 -    u32 len;   /* Length of data following this. */
  105.14 +    uint32_t type;  /* XS_??? */
  105.15 +    uint32_t req_id;/* Request identifier, echoed in daemon's response.  */
  105.16 +    uint32_t tx_id; /* Transaction id (0 if not related to a transaction). */
  105.17 +    uint32_t len;   /* Length of data following this. */
  105.18  
  105.19      /* Generally followed by nul-terminated string(s). */
  105.20  };
  105.21 @@ -93,3 +94,13 @@ enum xs_watch_type
  105.22  };
  105.23  
  105.24  #endif /* _XS_WIRE_H */
  105.25 +
  105.26 +/*
  105.27 + * Local variables:
  105.28 + * mode: C
  105.29 + * c-set-style: "BSD"
  105.30 + * c-basic-offset: 4
  105.31 + * tab-width: 4
  105.32 + * indent-tabs-mode: nil
  105.33 + * End:
  105.34 + */
   106.1 --- a/xen/include/public/memory.h	Wed Oct 12 10:11:35 2005 +0100
   106.2 +++ b/xen/include/public/memory.h	Wed Oct 12 11:07:37 2005 +0100
   106.3 @@ -48,3 +48,13 @@ typedef struct xen_memory_reservation {
   106.4  } xen_memory_reservation_t;
   106.5  
   106.6  #endif /* __XEN_PUBLIC_MEMORY_H__ */
   106.7 +
   106.8 +/*
   106.9 + * Local variables:
  106.10 + * mode: C
  106.11 + * c-set-style: "BSD"
  106.12 + * c-basic-offset: 4
  106.13 + * tab-width: 4
  106.14 + * indent-tabs-mode: nil
  106.15 + * End:
  106.16 + */
   107.1 --- a/xen/include/public/physdev.h	Wed Oct 12 10:11:35 2005 +0100
   107.2 +++ b/xen/include/public/physdev.h	Wed Oct 12 11:07:37 2005 +0100
   107.3 @@ -13,41 +13,41 @@
   107.4  
   107.5  typedef struct physdevop_irq_status_query {
   107.6      /* IN */
   107.7 -    u32 irq;
   107.8 +    uint32_t irq;
   107.9      /* OUT */
  107.10  /* Need to call PHYSDEVOP_IRQ_UNMASK_NOTIFY when the IRQ has been serviced? */
  107.11  #define PHYSDEVOP_IRQ_NEEDS_UNMASK_NOTIFY (1<<0)
  107.12 -    u32 flags;
  107.13 +    uint32_t flags;
  107.14  } physdevop_irq_status_query_t;
  107.15  
  107.16  typedef struct physdevop_set_iopl {
  107.17      /* IN */
  107.18 -    u32 iopl;
  107.19 +    uint32_t iopl;
  107.20  } physdevop_set_iopl_t;
  107.21  
  107.22  typedef struct physdevop_set_iobitmap {
  107.23      /* IN */
  107.24 -    u8 *bitmap;
  107.25 -    u32 nr_ports;
  107.26 +    uint8_t *bitmap;
  107.27 +    uint32_t nr_ports;
  107.28  } physdevop_set_iobitmap_t;
  107.29  
  107.30  typedef struct physdevop_apic {
  107.31      /* IN */
  107.32 -    u32 apic;
  107.33 -    u32 offset;
  107.34 +    uint32_t apic;
  107.35 +    uint32_t offset;
  107.36      /* IN or OUT */
  107.37 -    u32 value;
  107.38 +    uint32_t value;
  107.39  } physdevop_apic_t; 
  107.40  
  107.41  typedef struct physdevop_irq {
  107.42      /* IN */
  107.43 -    u32 irq;
  107.44 +    uint32_t irq;
  107.45      /* OUT */
  107.46 -    u32 vector;
  107.47 +    uint32_t vector;
  107.48  } physdevop_irq_t; 
  107.49  
  107.50  typedef struct physdev_op {
  107.51 -    u32 cmd;
  107.52 +    uint32_t cmd;
  107.53      union {
  107.54          physdevop_irq_status_query_t      irq_status_query;
  107.55          physdevop_set_iopl_t              set_iopl;
   108.1 --- a/xen/include/public/sched.h	Wed Oct 12 10:11:35 2005 +0100
   108.2 +++ b/xen/include/public/sched.h	Wed Oct 12 11:07:37 2005 +0100
   108.3 @@ -48,3 +48,13 @@
   108.4  #define SHUTDOWN_crash      3  /* Tell controller we've crashed.             */
   108.5  
   108.6  #endif /* __XEN_PUBLIC_SCHED_H__ */
   108.7 +
   108.8 +/*
   108.9 + * Local variables:
  108.10 + * mode: C
  108.11 + * c-set-style: "BSD"
  108.12 + * c-basic-offset: 4
  108.13 + * tab-width: 4
  108.14 + * indent-tabs-mode: nil
  108.15 + * End:
  108.16 + */
   109.1 --- a/xen/include/public/sched_ctl.h	Wed Oct 12 10:11:35 2005 +0100
   109.2 +++ b/xen/include/public/sched_ctl.h	Wed Oct 12 11:07:37 2005 +0100
   109.3 @@ -20,39 +20,49 @@
   109.4   * parameters
   109.5   */
   109.6  struct sched_ctl_cmd {
   109.7 -    u32 sched_id;
   109.8 -    u32 direction;
   109.9 +    uint32_t sched_id;
  109.10 +    uint32_t direction;
  109.11      union {
  109.12          struct bvt_ctl {
  109.13 -            u32 ctx_allow;
  109.14 +            uint32_t ctx_allow;
  109.15          } bvt;
  109.16      } u;
  109.17  };
  109.18  
  109.19  struct sched_adjdom_cmd {
  109.20 -    u32     sched_id;
  109.21 -    u32     direction;
  109.22 -    domid_t domain;
  109.23 +    uint32_t sched_id;
  109.24 +    uint32_t direction;
  109.25 +    domid_t  domain;
  109.26      union {
  109.27          struct bvt_adjdom
  109.28          {
  109.29 -            u32 mcu_adv;            /* mcu advance: inverse of weight */
  109.30 -            u32 warpback;           /* warp? */
  109.31 -            s32 warpvalue;          /* warp value */
  109.32 -            long long warpl;        /* warp limit */
  109.33 -            long long warpu;        /* unwarp time requirement */
  109.34 +            uint32_t mcu_adv;      /* mcu advance: inverse of weight */
  109.35 +            uint32_t warpback;     /* warp? */
  109.36 +            int32_t  warpvalue;    /* warp value */
  109.37 +            int64_t  warpl;        /* warp limit */
  109.38 +            int64_t  warpu;        /* unwarp time requirement */
  109.39          } bvt;
  109.40          
  109.41 -	struct sedf_adjdom
  109.42 +        struct sedf_adjdom
  109.43          {
  109.44 -            u64 period;
  109.45 -            u64 slice;
  109.46 -            u64 latency;
  109.47 -            u16 extratime;
  109.48 -	    u16 weight;
  109.49 +            uint64_t period;
  109.50 +            uint64_t slice;
  109.51 +            uint64_t latency;
  109.52 +            uint16_t extratime;
  109.53 +            uint16_t weight;
  109.54          } sedf;
  109.55  
  109.56      } u;
  109.57  };
  109.58  
  109.59  #endif /* __XEN_PUBLIC_SCHED_CTL_H__ */
  109.60 +
  109.61 +/*
  109.62 + * Local variables:
  109.63 + * mode: C
  109.64 + * c-set-style: "BSD"
  109.65 + * c-basic-offset: 4
  109.66 + * tab-width: 4
  109.67 + * indent-tabs-mode: nil
  109.68 + * End:
  109.69 + */
   110.1 --- a/xen/include/public/trace.h	Wed Oct 12 10:11:35 2005 +0100
   110.2 +++ b/xen/include/public/trace.h	Wed Oct 12 11:07:37 2005 +0100
   110.3 @@ -55,8 +55,8 @@
   110.4  
   110.5  /* This structure represents a single trace buffer record. */
   110.6  struct t_rec {
   110.7 -    u64 cycles;               /* cycle counter timestamp */
   110.8 -    u32 event;                /* event ID                */
   110.9 +    uint64_t cycles;          /* cycle counter timestamp */
  110.10 +    uint32_t event;           /* event ID                */
  110.11      unsigned long data[5];    /* event data items        */
  110.12  };
  110.13  
  110.14 @@ -75,3 +75,13 @@ struct t_buf {
  110.15  };
  110.16  
  110.17  #endif /* __XEN_PUBLIC_TRACE_H__ */
  110.18 +
  110.19 +/*
  110.20 + * Local variables:
  110.21 + * mode: C
  110.22 + * c-set-style: "BSD"
  110.23 + * c-basic-offset: 4
  110.24 + * tab-width: 4
  110.25 + * indent-tabs-mode: nil
  110.26 + * End:
  110.27 + */
   111.1 --- a/xen/include/public/vcpu.h	Wed Oct 12 10:11:35 2005 +0100
   111.2 +++ b/xen/include/public/vcpu.h	Wed Oct 12 11:07:37 2005 +0100
   111.3 @@ -52,3 +52,13 @@
   111.4  #define VCPUOP_is_up                3
   111.5  
   111.6  #endif /* __XEN_PUBLIC_VCPU_H__ */
   111.7 +
   111.8 +/*
   111.9 + * Local variables:
  111.10 + * mode: C
  111.11 + * c-set-style: "BSD"
  111.12 + * c-basic-offset: 4
  111.13 + * tab-width: 4
  111.14 + * indent-tabs-mode: nil
  111.15 + * End:
  111.16 + */
   112.1 --- a/xen/include/public/version.h	Wed Oct 12 10:11:35 2005 +0100
   112.2 +++ b/xen/include/public/version.h	Wed Oct 12 11:07:37 2005 +0100
   112.3 @@ -40,3 +40,13 @@ typedef struct xen_parameters_info {
   112.4  } xen_parameters_info_t;
   112.5  
   112.6  #endif /* __XEN_PUBLIC_VERSION_H__ */
   112.7 +
   112.8 +/*
   112.9 + * Local variables:
  112.10 + * mode: C
  112.11 + * c-set-style: "BSD"
  112.12 + * c-basic-offset: 4
  112.13 + * tab-width: 4
  112.14 + * indent-tabs-mode: nil
  112.15 + * End:
  112.16 + */
   113.1 --- a/xen/include/public/vmx_assist.h	Wed Oct 12 10:11:35 2005 +0100
   113.2 +++ b/xen/include/public/vmx_assist.h	Wed Oct 12 11:07:37 2005 +0100
   113.3 @@ -21,81 +21,90 @@
   113.4  #ifndef _VMX_ASSIST_H_
   113.5  #define _VMX_ASSIST_H_
   113.6  
   113.7 -#define	VMXASSIST_BASE		0xD0000
   113.8 -#define	VMXASSIST_MAGIC		0x17101966
   113.9 -#define	VMXASSIST_MAGIC_OFFSET	(VMXASSIST_BASE+8)
  113.10 +#define VMXASSIST_BASE         0xD0000
  113.11 +#define VMXASSIST_MAGIC        0x17101966
  113.12 +#define VMXASSIST_MAGIC_OFFSET (VMXASSIST_BASE+8)
  113.13  
  113.14 -#define	VMXASSIST_NEW_CONTEXT	(VMXASSIST_BASE + 12)
  113.15 -#define	VMXASSIST_OLD_CONTEXT	(VMXASSIST_NEW_CONTEXT + 4)
  113.16 +#define VMXASSIST_NEW_CONTEXT (VMXASSIST_BASE + 12)
  113.17 +#define VMXASSIST_OLD_CONTEXT (VMXASSIST_NEW_CONTEXT + 4)
  113.18  
  113.19  #ifndef __ASSEMBLY__
  113.20  
  113.21  union vmcs_arbytes {
  113.22 -	struct arbyte_fields {
  113.23 -		unsigned int	seg_type	: 4,
  113.24 -				s		: 1,
  113.25 -				dpl		: 2,
  113.26 -				p		: 1, 
  113.27 -			 	reserved0	: 4,
  113.28 -				avl		: 1,
  113.29 -				reserved1	: 1,     
  113.30 -				default_ops_size: 1,
  113.31 -				g		: 1,
  113.32 -				null_bit	: 1, 
  113.33 -				reserved2	: 15;
  113.34 -	} fields;
  113.35 -	unsigned int bytes;
  113.36 +    struct arbyte_fields {
  113.37 +        unsigned int seg_type : 4,
  113.38 +            s         : 1,
  113.39 +            dpl       : 2,
  113.40 +            p         : 1, 
  113.41 +            reserved0 : 4,
  113.42 +            avl       : 1,
  113.43 +            reserved1 : 1,     
  113.44 +            default_ops_size: 1,
  113.45 +            g         : 1,
  113.46 +            null_bit  : 1, 
  113.47 +            reserved2 : 15;
  113.48 +    } fields;
  113.49 +    unsigned int bytes;
  113.50  };
  113.51  
  113.52  /*
  113.53   * World switch state
  113.54   */
  113.55  typedef struct vmx_assist_context {
  113.56 -	u32		eip;		/* execution pointer */
  113.57 -	u32		esp;		/* stack point */
  113.58 -	u32		eflags;		/* flags register */
  113.59 -	u32		cr0;
  113.60 -	u32		cr3;		/* page table directory */
  113.61 -	u32		cr4;
  113.62 -	u32		idtr_limit;	/* idt */
  113.63 -	u32		idtr_base;
  113.64 -	u32		gdtr_limit;	/* gdt */
  113.65 -	u32		gdtr_base;
  113.66 -	u32		cs_sel;		/* cs selector */
  113.67 -	u32		cs_limit;
  113.68 -	u32		cs_base;
  113.69 -	union vmcs_arbytes	cs_arbytes;
  113.70 -	u32		ds_sel;		/* ds selector */
  113.71 -	u32		ds_limit;
  113.72 -	u32		ds_base;
  113.73 -	union vmcs_arbytes	ds_arbytes;
  113.74 -	u32		es_sel;		/* es selector */
  113.75 -	u32		es_limit;
  113.76 -	u32		es_base;
  113.77 -	union vmcs_arbytes	es_arbytes;
  113.78 -	u32		ss_sel;		/* ss selector */
  113.79 -	u32		ss_limit;
  113.80 -	u32		ss_base;
  113.81 -	union vmcs_arbytes	ss_arbytes;
  113.82 -	u32		fs_sel;		/* fs selector */
  113.83 -	u32		fs_limit;
  113.84 -	u32		fs_base;
  113.85 -	union vmcs_arbytes	fs_arbytes;
  113.86 -	u32		gs_sel;		/* gs selector */
  113.87 -	u32		gs_limit;
  113.88 -	u32		gs_base;
  113.89 -	union vmcs_arbytes	gs_arbytes;
  113.90 -	u32		tr_sel;		/* task selector */
  113.91 -	u32		tr_limit;
  113.92 -	u32		tr_base;
  113.93 -	union vmcs_arbytes	tr_arbytes;
  113.94 -	u32		ldtr_sel;	/* ldtr selector */
  113.95 -	u32		ldtr_limit;
  113.96 -	u32		ldtr_base;
  113.97 -	union vmcs_arbytes	ldtr_arbytes;
  113.98 +    uint32_t  eip;        /* execution pointer */
  113.99 +    uint32_t  esp;        /* stack pointer */
 113.100 +    uint32_t  eflags;     /* flags register */
 113.101 +    uint32_t  cr0;
 113.102 +    uint32_t  cr3;        /* page table directory */
 113.103 +    uint32_t  cr4;
 113.104 +    uint32_t  idtr_limit; /* idt */
 113.105 +    uint32_t  idtr_base;
 113.106 +    uint32_t  gdtr_limit; /* gdt */
 113.107 +    uint32_t  gdtr_base;
 113.108 +    uint32_t  cs_sel;     /* cs selector */
 113.109 +    uint32_t  cs_limit;
 113.110 +    uint32_t  cs_base;
 113.111 +    union vmcs_arbytes cs_arbytes;
 113.112 +    uint32_t  ds_sel;     /* ds selector */
 113.113 +    uint32_t  ds_limit;
 113.114 +    uint32_t  ds_base;
 113.115 +    union vmcs_arbytes ds_arbytes;
 113.116 +    uint32_t  es_sel;     /* es selector */
 113.117 +    uint32_t  es_limit;
 113.118 +    uint32_t  es_base;
 113.119 +    union vmcs_arbytes es_arbytes;
 113.120 +    uint32_t  ss_sel;     /* ss selector */
 113.121 +    uint32_t  ss_limit;
 113.122 +    uint32_t  ss_base;
 113.123 +    union vmcs_arbytes ss_arbytes;
 113.124 +    uint32_t  fs_sel;     /* fs selector */
 113.125 +    uint32_t  fs_limit;
 113.126 +    uint32_t  fs_base;
 113.127 +    union vmcs_arbytes fs_arbytes;
 113.128 +    uint32_t  gs_sel;     /* gs selector */
 113.129 +    uint32_t  gs_limit;
 113.130 +    uint32_t  gs_base;
 113.131 +    union vmcs_arbytes gs_arbytes;
 113.132 +    uint32_t  tr_sel;     /* task selector */
 113.133 +    uint32_t  tr_limit;
 113.134 +    uint32_t  tr_base;
 113.135 +    union vmcs_arbytes tr_arbytes;
 113.136 +    uint32_t  ldtr_sel;   /* ldtr selector */
 113.137 +    uint32_t  ldtr_limit;
 113.138 +    uint32_t  ldtr_base;
 113.139 +    union vmcs_arbytes ldtr_arbytes;
 113.140  } vmx_assist_context_t;
 113.141  
 113.142  #endif /* __ASSEMBLY__ */
 113.143  
 113.144  #endif /* _VMX_ASSIST_H_ */
 113.145  
 113.146 +/*
 113.147 + * Local variables:
 113.148 + * mode: C
 113.149 + * c-set-style: "BSD"
 113.150 + * c-basic-offset: 4
 113.151 + * tab-width: 4
 113.152 + * indent-tabs-mode: nil
 113.153 + * End:
 113.154 + */
   114.1 --- a/xen/include/public/xen.h	Wed Oct 12 10:11:35 2005 +0100
   114.2 +++ b/xen/include/public/xen.h	Wed Oct 12 11:07:37 2005 +0100
   114.3 @@ -213,7 +213,7 @@ struct mmuext_op {
   114.4  
   114.5  #ifndef __ASSEMBLY__
   114.6  
   114.7 -typedef u16 domid_t;
   114.8 +typedef uint16_t domid_t;
   114.9  
  114.10  /* Domain ids >= DOMID_FIRST_RESERVED cannot be used for ordinary domains. */
  114.11  #define DOMID_FIRST_RESERVED (0x7FF0U)
  114.12 @@ -246,8 +246,8 @@ typedef u16 domid_t;
  114.13   */
  114.14  typedef struct
  114.15  {
  114.16 -    u64 ptr;       /* Machine address of PTE. */
  114.17 -    u64 val;       /* New contents of PTE.    */
  114.18 +    uint64_t ptr;       /* Machine address of PTE. */
  114.19 +    uint64_t val;       /* New contents of PTE.    */
  114.20  } mmu_update_t;
  114.21  
  114.22  /*
  114.23 @@ -293,9 +293,9 @@ typedef struct vcpu_info {
  114.24       * an upcall activation. The mask is cleared when the VCPU requests
  114.25       * to block: this avoids wakeup-waiting races.
  114.26       */
  114.27 -    u8 evtchn_upcall_pending;
  114.28 -    u8 evtchn_upcall_mask;
  114.29 -    u32 evtchn_pending_sel;
  114.30 +    uint8_t evtchn_upcall_pending;
  114.31 +    uint8_t evtchn_upcall_mask;
  114.32 +    uint32_t evtchn_pending_sel;
  114.33  #ifdef __ARCH_HAS_VCPU_INFO
  114.34      arch_vcpu_info_t arch;
  114.35  #endif
  114.36 @@ -311,17 +311,17 @@ typedef struct vcpu_time_info {
  114.37       * The correct way to interact with the version number is similar to
  114.38       * Linux's seqlock: see the implementations of read_seqbegin/read_seqretry.
  114.39       */
  114.40 -    u32 version;
  114.41 -    u64 tsc_timestamp;   /* TSC at last update of time vals.  */
  114.42 -    u64 system_time;     /* Time, in nanosecs, since boot.    */
  114.43 +    uint32_t version;
  114.44 +    uint64_t tsc_timestamp;   /* TSC at last update of time vals.  */
  114.45 +    uint64_t system_time;     /* Time, in nanosecs, since boot.    */
  114.46      /*
  114.47       * Current system time:
  114.48       *   system_time + ((tsc - tsc_timestamp) << tsc_shift) * tsc_to_system_mul
  114.49       * CPU frequency (Hz):
  114.50       *   ((10^9 << 32) / tsc_to_system_mul) >> tsc_shift
  114.51       */
  114.52 -    u32 tsc_to_system_mul;
  114.53 -    s8  tsc_shift;
  114.54 +    uint32_t tsc_to_system_mul;
  114.55 +    int8_t  tsc_shift;
  114.56  } vcpu_time_info_t;
  114.57  
  114.58  /*
  114.59 @@ -333,7 +333,7 @@ typedef struct shared_info {
  114.60  
  114.61      vcpu_time_info_t vcpu_time[MAX_VIRT_CPUS];
  114.62  
  114.63 -    u32 n_vcpu;
  114.64 +    uint32_t n_vcpu;
  114.65  
  114.66      /*
  114.67       * A domain can have up to 1024 "event channels" on which it can send
  114.68 @@ -366,16 +366,16 @@ typedef struct shared_info {
  114.69       * 32-bit selector to be set. Each bit in the selector covers a 32-bit
  114.70       * word in the PENDING bitfield array.
  114.71       */
  114.72 -    u32 evtchn_pending[32];
  114.73 -    u32 evtchn_mask[32];
  114.74 +    uint32_t evtchn_pending[32];
  114.75 +    uint32_t evtchn_mask[32];
  114.76  
  114.77      /*
  114.78       * Wallclock time: updated only by control software. Guests should base
  114.79       * their gettimeofday() syscall on this wallclock-base value.
  114.80       */
  114.81 -    u32 wc_version;      /* Version counter: see vcpu_time_info_t. */
  114.82 -    u32 wc_sec;          /* Secs  00:00:00 UTC, Jan 1, 1970.  */
  114.83 -    u32 wc_nsec;         /* Nsecs 00:00:00 UTC, Jan 1, 1970.  */
  114.84 +    uint32_t wc_version;      /* Version counter: see vcpu_time_info_t. */
  114.85 +    uint32_t wc_sec;          /* Secs  00:00:00 UTC, Jan 1, 1970.  */
  114.86 +    uint32_t wc_nsec;         /* Nsecs 00:00:00 UTC, Jan 1, 1970.  */
  114.87  
  114.88      arch_shared_info_t arch;
  114.89  
  114.90 @@ -411,18 +411,18 @@ typedef struct start_info {
  114.91      /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.    */
  114.92      unsigned long nr_pages;     /* Total pages allocated to this domain.  */
  114.93      unsigned long shared_info;  /* MACHINE address of shared info struct. */
  114.94 -    u32      flags;             /* SIF_xxx flags.                         */
  114.95 +    uint32_t flags;             /* SIF_xxx flags.                         */
  114.96      unsigned long store_mfn;    /* MACHINE page number of shared page.    */
  114.97 -    u16      store_evtchn;      /* Event channel for store communication. */
  114.98 +    uint16_t store_evtchn;      /* Event channel for store communication. */
  114.99      unsigned long console_mfn;  /* MACHINE address of console page.       */
 114.100 -    u16      console_evtchn;    /* Event channel for console messages.    */
 114.101 +    uint16_t console_evtchn;    /* Event channel for console messages.    */
 114.102      /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME).     */
 114.103      unsigned long pt_base;      /* VIRTUAL address of page directory.     */
 114.104      unsigned long nr_pt_frames; /* Number of bootstrap p.t. frames.       */
 114.105      unsigned long mfn_list;     /* VIRTUAL address of page-frame list.    */
 114.106      unsigned long mod_start;    /* VIRTUAL address of pre-loaded module.  */
 114.107      unsigned long mod_len;      /* Size (bytes) of pre-loaded module.     */
 114.108 -    s8 cmd_line[MAX_GUEST_CMDLINE];
 114.109 +    int8_t cmd_line[MAX_GUEST_CMDLINE];
 114.110  } start_info_t;
 114.111  
 114.112  /* These flags are passed in the 'flags' field of start_info_t. */
 114.113 @@ -435,8 +435,18 @@ typedef struct start_info {
 114.114  /* For use in guest OSes. */
 114.115  extern shared_info_t *HYPERVISOR_shared_info;
 114.116  
 114.117 -typedef u64 cpumap_t;
 114.118 +typedef uint64_t cpumap_t;
 114.119  
 114.120  #endif /* !__ASSEMBLY__ */
 114.121  
 114.122  #endif /* __XEN_PUBLIC_XEN_H__ */
 114.123 +
 114.124 +/*
 114.125 + * Local variables:
 114.126 + * mode: C
 114.127 + * c-set-style: "BSD"
 114.128 + * c-basic-offset: 4
 114.129 + * tab-width: 4
 114.130 + * indent-tabs-mode: nil
 114.131 + * End:
 114.132 + */
   115.1 --- a/xen/include/xen/types.h	Wed Oct 12 10:11:35 2005 +0100
   115.2 +++ b/xen/include/xen/types.h	Wed Oct 12 11:07:37 2005 +0100
   115.3 @@ -32,23 +32,21 @@ typedef unsigned short          ushort;
   115.4  typedef unsigned int            uint;
   115.5  typedef unsigned long           ulong;
   115.6  
   115.7 -#ifndef __BIT_TYPES_DEFINED__
   115.8 -#define __BIT_TYPES_DEFINED__
   115.9 -
  115.10 +typedef         __u8            uint8_t;
  115.11  typedef         __u8            u_int8_t;
  115.12  typedef         __s8            int8_t;
  115.13 +
  115.14 +typedef         __u16           uint16_t;
  115.15  typedef         __u16           u_int16_t;
  115.16  typedef         __s16           int16_t;
  115.17 +
  115.18 +typedef         __u32           uint32_t;
  115.19  typedef         __u32           u_int32_t;
  115.20  typedef         __s32           int32_t;
  115.21  
  115.22 -#endif /* !(__BIT_TYPES_DEFINED__) */
  115.23 -
  115.24 -typedef         __u8            uint8_t;
  115.25 -typedef         __u16           uint16_t;
  115.26 -typedef         __u32           uint32_t;
  115.27  typedef         __u64           uint64_t;
  115.28 -
  115.29 +typedef         __u64           u_int64_t;
  115.30 +typedef         __s64           int64_t;
  115.31  
  115.32  struct domain;
  115.33  struct vcpu;