ia64/xen-unstable

changeset 18687:d9b70fc0ee0f

[IA64]: update ia64 px info transfer corresponding to x86 px info update.

update ia64 px info transfer corresponding to x86 px info update.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Oct 22 12:41:52 2008 +0900 (2008-10-22)
parents 6db3c096c244
children 02c8733e2d91
files xen/arch/ia64/xen/platform_hypercall.c
line diff
     1.1 --- a/xen/arch/ia64/xen/platform_hypercall.c	Wed Oct 22 12:40:06 2008 +0900
     1.2 +++ b/xen/arch/ia64/xen/platform_hypercall.c	Wed Oct 22 12:41:52 2008 +0900
     1.3 @@ -10,6 +10,7 @@
     1.4  #include <xen/types.h>
     1.5  #include <xen/lib.h>
     1.6  #include <xen/sched.h>
     1.7 +#include <xen/domain.h>
     1.8  #include <xen/guest_access.h>
     1.9  #include <xen/acpi.h>
    1.10  #include <public/platform.h>
    1.11 @@ -20,15 +21,6 @@ DEFINE_SPINLOCK(xenpf_lock);
    1.12  extern int set_px_pminfo(uint32_t cpu, struct xen_processor_performance *perf);
    1.13  extern long set_cx_pminfo(uint32_t cpu, struct xen_processor_power *power);
    1.14  
    1.15 -int xenpf_copy_px_states(struct processor_performance *pxpt,
    1.16 -        struct xen_processor_performance *dom0_px_info)
    1.17 -{
    1.18 -    if (!pxpt || !dom0_px_info)
    1.19 -        return -EINVAL;
    1.20 -    return  copy_from_guest(pxpt->states, dom0_px_info->states,
    1.21 -                    dom0_px_info->state_count);
    1.22 -}
    1.23 -
    1.24  long do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op)
    1.25  {
    1.26      long ret = 0;
    1.27 @@ -50,6 +42,11 @@ long do_platform_op(XEN_GUEST_HANDLE(xen
    1.28          switch ( op->u.set_pminfo.type )
    1.29          {
    1.30          case XEN_PM_PX:
    1.31 +            if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
    1.32 +            {
    1.33 +                ret = -ENOSYS;
    1.34 +                break;
    1.35 +            }
    1.36              ret = set_px_pminfo(op->u.set_pminfo.id,
    1.37                      &op->u.set_pminfo.perf);
    1.38              break;