ia64/xen-unstable

changeset 11324:7210b62802be

Fix hypervisor build with performance counters after -unstable
cset 11257:86d26e6ec89b

Signed-off-by: Steve Dobbelstein <steved@us.ibm.com>
author Steven Hand <steven@xensource.com>
date Mon Aug 28 21:57:34 2006 +0100 (2006-08-28)
parents 78a25a7eac1f
children a1cff03ac7d7
files xen/common/perfc.c xen/common/sysctl.c
line diff
     1.1 --- a/xen/common/perfc.c	Mon Aug 28 21:40:42 2006 +0100
     1.2 +++ b/xen/common/perfc.c	Mon Aug 28 21:57:34 2006 +0100
     1.3 @@ -7,6 +7,7 @@
     1.4  #include <xen/spinlock.h>
     1.5  #include <xen/mm.h>
     1.6  #include <xen/guest_access.h>
     1.7 +#include <public/sysctl.h>
     1.8  #include <asm/perfc.h>
     1.9  
    1.10  #undef  PERFCOUNTER
    1.11 @@ -131,12 +132,12 @@ void perfc_reset(unsigned char key)
    1.12      arch_perfc_reset ();
    1.13  }
    1.14  
    1.15 -static dom0_perfc_desc_t perfc_d[NR_PERFCTRS];
    1.16 -static dom0_perfc_val_t *perfc_vals;
    1.17 +static xen_sysctl_perfc_desc_t perfc_d[NR_PERFCTRS];
    1.18 +static xen_sysctl_perfc_val_t *perfc_vals;
    1.19  static int               perfc_nbr_vals;
    1.20  static int               perfc_init = 0;
    1.21 -static int perfc_copy_info(XEN_GUEST_HANDLE(dom0_perfc_desc_t) desc,
    1.22 -                           XEN_GUEST_HANDLE(dom0_perfc_val_t) val)
    1.23 +static int perfc_copy_info(XEN_GUEST_HANDLE_64(xen_sysctl_perfc_desc_t) desc,
    1.24 +                           XEN_GUEST_HANDLE_64(xen_sysctl_perfc_val_t) val)
    1.25  {
    1.26      unsigned int i, j;
    1.27      unsigned int v = 0;
    1.28 @@ -171,7 +172,7 @@ static int perfc_copy_info(XEN_GUEST_HAN
    1.29              }
    1.30              perfc_nbr_vals += perfc_d[i].nr_vals;
    1.31          }
    1.32 -        perfc_vals = xmalloc_array(dom0_perfc_val_t, perfc_nbr_vals);
    1.33 +        perfc_vals = xmalloc_array(xen_sysctl_perfc_val_t, perfc_nbr_vals);
    1.34          perfc_init = 1;
    1.35      }
    1.36      if (perfc_vals == NULL)
    1.37 @@ -206,7 +207,7 @@ static int perfc_copy_info(XEN_GUEST_HAN
    1.38      }
    1.39      BUG_ON(v != perfc_nbr_vals);
    1.40  
    1.41 -    if (copy_to_guest(desc, (dom0_perfc_desc_t *)perfc_d, NR_PERFCTRS))
    1.42 +    if (copy_to_guest(desc, (xen_sysctl_perfc_desc_t *)perfc_d, NR_PERFCTRS))
    1.43          return -EFAULT;
    1.44      if (copy_to_guest(val, perfc_vals, perfc_nbr_vals))
    1.45          return -EFAULT;
    1.46 @@ -214,7 +215,7 @@ static int perfc_copy_info(XEN_GUEST_HAN
    1.47  }
    1.48  
    1.49  /* Dom0 control of perf counters */
    1.50 -int perfc_control(dom0_perfccontrol_t *pc)
    1.51 +int perfc_control(xen_sysctl_perfc_op_t *pc)
    1.52  {
    1.53      static DEFINE_SPINLOCK(lock);
    1.54      int rc;
     2.1 --- a/xen/common/sysctl.c	Mon Aug 28 21:40:42 2006 +0100
     2.2 +++ b/xen/common/sysctl.c	Mon Aug 28 21:57:34 2006 +0100
     2.3 @@ -121,10 +121,10 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
     2.4      break;
     2.5  
     2.6  #ifdef PERF_COUNTERS
     2.7 -    case XEN_SYSCTL_perfccontrol:
     2.8 +    case XEN_SYSCTL_perfc_op:
     2.9      {
    2.10 -        extern int perfc_control(xen_sysctl_perfccontrol_t *);
    2.11 -        ret = perfc_control(&op->u.perfccontrol);
    2.12 +        extern int perfc_control(xen_sysctl_perfc_op_t *);
    2.13 +        ret = perfc_control(&op->u.perfc_op);
    2.14          if ( copy_to_guest(u_sysctl, op, 1) )
    2.15              ret = -EFAULT;
    2.16      }