diff options
author | Keir Fraser <keir@xensource.com> | 2007-03-17 12:04:48 +0000 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-03-17 12:04:48 +0000 |
commit | cfcf0ae28495b1fff0f16981822b1a93b9336c7a (patch) | |
tree | 0b5c11150b92066f53d41dc90dc9fb588724ad3a /xen/common/perfc.c | |
parent | 36200329b198717624bfa37f410e3a650168a9c7 (diff) | |
download | xen-cfcf0ae28495b1fff0f16981822b1a93b9336c7a.tar.gz xen-cfcf0ae28495b1fff0f16981822b1a93b9336c7a.tar.bz2 xen-cfcf0ae28495b1fff0f16981822b1a93b9336c7a.zip |
Xen and tools now require gcc 3.4+ on x86.
- gcc-3.2 cannot handle some multi-line assertions in the Xen
sources. Noone noticed.
- gcc-3.3 has problems with alignment constraints inside typedefs.
gcc 3.4.0 is now three years old so I hope that everyone has an
up-to-date compiler, or can obtain a more up-to-date package for their
distribution. If not we may need to fall back to supporting gcc-3.3.x
as well.
Also clean up the way we do version checks, using the power of awk.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/common/perfc.c')
-rw-r--r-- | xen/common/perfc.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/xen/common/perfc.c b/xen/common/perfc.c index d5bcd9b2e1..bbff5d7b5c 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -136,8 +136,8 @@ static xen_sysctl_perfc_desc_t perfc_d[NR_PERFCTRS]; static xen_sysctl_perfc_val_t *perfc_vals; static int perfc_nbr_vals; static int perfc_init = 0; -static int perfc_copy_info(XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc, - XEN_GUEST_HANDLE(xen_sysctl_perfc_val_t) val) +static int perfc_copy_info(XEN_GUEST_HANDLE_64(xen_sysctl_perfc_desc_t) desc, + XEN_GUEST_HANDLE_64(xen_sysctl_perfc_val_t) val) { unsigned int i, j; unsigned int v = 0; @@ -217,29 +217,20 @@ static int perfc_copy_info(XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc, int perfc_control(xen_sysctl_perfc_op_t *pc) { static DEFINE_SPINLOCK(lock); - XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc; - XEN_GUEST_HANDLE(xen_sysctl_perfc_val_t) val; int rc; - /* - * 64 bit guest handles cannot be passed as parameters to - * functions so cast to a regular guest handle. - */ - desc = guest_handle_cast(pc->desc, xen_sysctl_perfc_desc_t); - val = guest_handle_cast(pc->val, xen_sysctl_perfc_val_t); - spin_lock(&lock); switch ( pc->cmd ) { case XEN_SYSCTL_PERFCOP_reset: - perfc_copy_info(desc, val); + perfc_copy_info(pc->desc, pc->val); perfc_reset(0); rc = 0; break; case XEN_SYSCTL_PERFCOP_query: - perfc_copy_info(desc, val); + perfc_copy_info(pc->desc, pc->val); rc = 0; break; |