# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1156842701 -32400 # Node ID d3bef29cd83300473956a49dba39ecb0d8422b6e # Parent f790546ecfda03193a4b8983f7bb6b0f65924603 compilation fix of changeset 11257:86d26e6ec89b3aba5512d981838caea043b157ab. It broke perfc=y case. PATCHNAME: compilation_fix_xen_ctl_perfc Signed-off-by: Isaku Yamahata diff -r f790546ecfda -r d3bef29cd833 xen/common/perfc.c --- a/xen/common/perfc.c Mon Aug 28 20:22:56 2006 +0100 +++ b/xen/common/perfc.c Tue Aug 29 18:11:41 2006 +0900 @@ -8,6 +8,7 @@ #include #include #include +#include #undef PERFCOUNTER #undef PERFCOUNTER_CPU @@ -131,12 +132,12 @@ void perfc_reset(unsigned char key) arch_perfc_reset (); } -static dom0_perfc_desc_t perfc_d[NR_PERFCTRS]; -static dom0_perfc_val_t *perfc_vals; -static int perfc_nbr_vals; -static int perfc_init = 0; -static int perfc_copy_info(XEN_GUEST_HANDLE(dom0_perfc_desc_t) desc, - XEN_GUEST_HANDLE(dom0_perfc_val_t) val) +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_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; @@ -171,7 +172,7 @@ static int perfc_copy_info(XEN_GUEST_HAN } perfc_nbr_vals += perfc_d[i].nr_vals; } - perfc_vals = xmalloc_array(dom0_perfc_val_t, perfc_nbr_vals); + perfc_vals = xmalloc_array(xen_sysctl_perfc_val_t, perfc_nbr_vals); perfc_init = 1; } if (perfc_vals == NULL) @@ -206,7 +207,7 @@ static int perfc_copy_info(XEN_GUEST_HAN } BUG_ON(v != perfc_nbr_vals); - if (copy_to_guest(desc, (dom0_perfc_desc_t *)perfc_d, NR_PERFCTRS)) + if (copy_to_guest(desc, (xen_sysctl_perfc_desc_t *)perfc_d, NR_PERFCTRS)) return -EFAULT; if (copy_to_guest(val, perfc_vals, perfc_nbr_vals)) return -EFAULT; @@ -214,7 +215,7 @@ static int perfc_copy_info(XEN_GUEST_HAN } /* Dom0 control of perf counters */ -int perfc_control(dom0_perfccontrol_t *pc) +int perfc_control(xen_sysctl_perfc_op_t *pc) { static DEFINE_SPINLOCK(lock); int rc; diff -r f790546ecfda -r d3bef29cd833 xen/common/sysctl.c --- a/xen/common/sysctl.c Mon Aug 28 20:22:56 2006 +0100 +++ b/xen/common/sysctl.c Tue Aug 29 18:11:41 2006 +0900 @@ -121,10 +121,10 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc break; #ifdef PERF_COUNTERS - case XEN_SYSCTL_perfccontrol: + case XEN_SYSCTL_perfc_op: { - extern int perfc_control(xen_sysctl_perfccontrol_t *); - ret = perfc_control(&op->u.perfccontrol); + extern int perfc_control(xen_sysctl_perfc_op_t *); + ret = perfc_control(&op->u.perfc_op); if ( copy_to_guest(u_sysctl, op, 1) ) ret = -EFAULT; }