ia64/xen-unstable

changeset 16251:0fbb6ec3ed47

x86: Fix 32-bit build, and remove pragma usage in public headers (and
use of volatile too).
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Fri Oct 26 10:55:32 2007 +0100 (2007-10-26)
parents d31f63db5f1e
children 3980cdd8f879
files xen/arch/x86/hvm/intercept.c xen/include/public/hvm/ioreq.h
line diff
     1.1 --- a/xen/arch/x86/hvm/intercept.c	Fri Oct 26 10:41:07 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/intercept.c	Fri Oct 26 10:55:32 2007 +0100
     1.3 @@ -182,10 +182,11 @@ int hvm_buffered_io_send(ioreq_t *p)
     1.4      case 8:
     1.5          bp.size = 3;
     1.6          qw = 1;
     1.7 -        gdprintk(XENLOG_INFO, "quadword ioreq type:%d data:%ld\n", p->type, p->data);
     1.8 +        gdprintk(XENLOG_INFO, "quadword ioreq type:%d data:%"PRIx64"\n",
     1.9 +                 p->type, p->data);
    1.10          break;
    1.11      default:
    1.12 -        gdprintk(XENLOG_WARNING, "unexpected ioreq size:%ld\n", p->size);
    1.13 +        gdprintk(XENLOG_WARNING, "unexpected ioreq size:%"PRId64"\n", p->size);
    1.14          return 0;
    1.15      }
    1.16      
     2.1 --- a/xen/include/public/hvm/ioreq.h	Fri Oct 26 10:41:07 2007 +0100
     2.2 +++ b/xen/include/public/hvm/ioreq.h	Fri Oct 26 10:55:32 2007 +0100
     2.3 @@ -77,27 +77,23 @@ struct shared_iopage {
     2.4  };
     2.5  typedef struct shared_iopage shared_iopage_t;
     2.6  
     2.7 -#pragma pack(push,2)
     2.8 -
     2.9  struct buf_ioreq {
    2.10      uint8_t  type;   /*  I/O type                    */
    2.11      uint8_t  dir:1;  /*  1=read, 0=write             */
    2.12      uint8_t  size:2; /*  0=>1, 1=>2, 3=>8. If 8 then use two contig buf_ioreqs */
    2.13 -    uint32_t addr:20; /*  physical address or high-order data */
    2.14      uint16_t data;   /*  (low order) data            */
    2.15 +    uint32_t addr;   /*  physical address or high-order data */
    2.16  };
    2.17  typedef struct buf_ioreq buf_ioreq_t;
    2.18  
    2.19 -#define IOREQ_BUFFER_SLOT_NUM     672
    2.20 +#define IOREQ_BUFFER_SLOT_NUM     511 /* 8 bytes each, plus 2 4-byte indexes */
    2.21  struct buffered_iopage {
    2.22 -    volatile unsigned int read_pointer;
    2.23 -    volatile unsigned int write_pointer;
    2.24 +    unsigned int read_pointer;
    2.25 +    unsigned int write_pointer;
    2.26      buf_ioreq_t buf_ioreq[IOREQ_BUFFER_SLOT_NUM];
    2.27  }; /* NB. Size of this structure must be no greater than one page. */
    2.28  typedef struct buffered_iopage buffered_iopage_t;
    2.29  
    2.30 -#pragma pack(pop)
    2.31 -
    2.32  #if defined(__ia64__)
    2.33  struct pio_buffer {
    2.34      uint32_t page_offset;