From: Keir Fraser Date: Fri, 26 Oct 2007 09:55:32 +0000 (+0100) Subject: x86: Fix 32-bit build, and remove pragma usage in public headers (and X-Git-Tag: 3.2.0-rc1~196^2~33 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d73a484a61f03d5e14b62f4374436e4d8e759894;p=xen.git x86: Fix 32-bit build, and remove pragma usage in public headers (and use of volatile too). Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c index 28eb7c7d67..20eeed5849 100644 --- a/xen/arch/x86/hvm/intercept.c +++ b/xen/arch/x86/hvm/intercept.c @@ -182,10 +182,11 @@ int hvm_buffered_io_send(ioreq_t *p) case 8: bp.size = 3; qw = 1; - gdprintk(XENLOG_INFO, "quadword ioreq type:%d data:%ld\n", p->type, p->data); + gdprintk(XENLOG_INFO, "quadword ioreq type:%d data:%"PRIx64"\n", + p->type, p->data); break; default: - gdprintk(XENLOG_WARNING, "unexpected ioreq size:%ld\n", p->size); + gdprintk(XENLOG_WARNING, "unexpected ioreq size:%"PRId64"\n", p->size); return 0; } diff --git a/xen/include/public/hvm/ioreq.h b/xen/include/public/hvm/ioreq.h index 6bad4f5a52..bb11ce3547 100644 --- a/xen/include/public/hvm/ioreq.h +++ b/xen/include/public/hvm/ioreq.h @@ -77,27 +77,23 @@ struct shared_iopage { }; typedef struct shared_iopage shared_iopage_t; -#pragma pack(push,2) - struct buf_ioreq { uint8_t type; /* I/O type */ uint8_t dir:1; /* 1=read, 0=write */ uint8_t size:2; /* 0=>1, 1=>2, 3=>8. If 8 then use two contig buf_ioreqs */ - uint32_t addr:20; /* physical address or high-order data */ uint16_t data; /* (low order) data */ + uint32_t addr; /* physical address or high-order data */ }; typedef struct buf_ioreq buf_ioreq_t; -#define IOREQ_BUFFER_SLOT_NUM 672 +#define IOREQ_BUFFER_SLOT_NUM 511 /* 8 bytes each, plus 2 4-byte indexes */ struct buffered_iopage { - volatile unsigned int read_pointer; - volatile unsigned int write_pointer; + unsigned int read_pointer; + unsigned int write_pointer; buf_ioreq_t buf_ioreq[IOREQ_BUFFER_SLOT_NUM]; }; /* NB. Size of this structure must be no greater than one page. */ typedef struct buffered_iopage buffered_iopage_t; -#pragma pack(pop) - #if defined(__ia64__) struct pio_buffer { uint32_t page_offset;