From: Steven Hand Date: Mon, 28 Aug 2006 20:57:34 +0000 (+0100) Subject: Fix hypervisor build with performance counters after -unstable X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15679^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6c35586274021b376b0985008c6af0e3dfc21ffd;p=xen.git Fix hypervisor build with performance counters after -unstable cset 11257:86d26e6ec89b Signed-off-by: Steve Dobbelstein --- diff --git a/xen/common/perfc.c b/xen/common/perfc.c index 92307b2341..73e6189ac0 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #undef PERFCOUNTER @@ -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 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(dom0_perfc_desc_t) desc, - XEN_GUEST_HANDLE(dom0_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; @@ -171,7 +172,7 @@ static int perfc_copy_info(XEN_GUEST_HANDLE(dom0_perfc_desc_t) desc, } 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_HANDLE(dom0_perfc_desc_t) desc, } 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_HANDLE(dom0_perfc_desc_t) desc, } /* 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 --git a/xen/common/sysctl.c b/xen/common/sysctl.c index 90312ce71c..9f991f39b3 100644 --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -121,10 +121,10 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl) 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; }