debuggers.hg

changeset 22800:6c9bcfb0fb84

x86 sysctl: Remove unused CPU hotplug status stuff.

Signed-off-by: Keir Fraser <keir@xen.org>
author Keir Fraser <keir@xen.org>
date Fri Jan 14 14:07:39 2011 +0000 (2011-01-14)
parents c3b5924919e3
children 2d4fe1a048cd
files xen/arch/x86/sysctl.c xen/include/public/sysctl.h
line diff
     1.1 --- a/xen/arch/x86/sysctl.c	Fri Jan 14 09:53:22 2011 +0000
     1.2 +++ b/xen/arch/x86/sysctl.c	Fri Jan 14 14:07:39 2011 +0000
     1.3 @@ -41,7 +41,7 @@ extern int __node_distance(int a, int b)
     1.4  long arch_do_sysctl(
     1.5      struct xen_sysctl *sysctl, XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
     1.6  {
     1.7 -    long ret = 0, status;
     1.8 +    long ret = 0;
     1.9  
    1.10      switch ( sysctl->cmd )
    1.11      {
    1.12 @@ -167,41 +167,19 @@ long arch_do_sysctl(
    1.13      {
    1.14          unsigned int cpu = sysctl->u.cpu_hotplug.cpu;
    1.15  
    1.16 -        if (cpu_present(cpu)) {
    1.17 -            status = cpu_online(cpu) ? XEN_CPU_HOTPLUG_STATUS_ONLINE :
    1.18 -                XEN_CPU_HOTPLUG_STATUS_OFFLINE;
    1.19 -        } else {
    1.20 -            status = -EINVAL;
    1.21 -        }
    1.22 -
    1.23          switch ( sysctl->u.cpu_hotplug.op )
    1.24          {
    1.25          case XEN_SYSCTL_CPU_HOTPLUG_ONLINE:
    1.26              ret = cpu_up(cpu);
    1.27 -            /*
    1.28 -             * In the case of a true hotplug, this CPU wasn't present
    1.29 -             * before, so return the 'new' status for it.
    1.30 -             */
    1.31 -            if (ret == 0 && status == -EINVAL)
    1.32 -                status = XEN_CPU_HOTPLUG_STATUS_NEW;
    1.33              break;
    1.34          case XEN_SYSCTL_CPU_HOTPLUG_OFFLINE:
    1.35              ret = continue_hypercall_on_cpu(
    1.36                  0, cpu_down_helper, (void *)(unsigned long)cpu);
    1.37              break;
    1.38 -        case XEN_SYSCTL_CPU_HOTPLUG_STATUS:
    1.39 -            ret = 0;
    1.40 -            break;
    1.41          default:
    1.42              ret = -EINVAL;
    1.43              break;
    1.44          }
    1.45 -
    1.46 -        /*
    1.47 -         * If the operation was successful, return the old status.
    1.48 -         */
    1.49 -        if (ret >= 0)
    1.50 -            ret = status;
    1.51      }
    1.52      break;
    1.53  
     2.1 --- a/xen/include/public/sysctl.h	Fri Jan 14 09:53:22 2011 +0000
     2.2 +++ b/xen/include/public/sysctl.h	Fri Jan 14 14:07:39 2011 +0000
     2.3 @@ -253,21 +253,12 @@ struct xen_sysctl_get_pmstat {
     2.4  typedef struct xen_sysctl_get_pmstat xen_sysctl_get_pmstat_t;
     2.5  DEFINE_XEN_GUEST_HANDLE(xen_sysctl_get_pmstat_t);
     2.6  
     2.7 -/*
     2.8 - * Status codes. Must be greater than 0 to avoid confusing
     2.9 - * sysctl callers that see 0 as a plain successful return.
    2.10 - */
    2.11 -#define XEN_CPU_HOTPLUG_STATUS_OFFLINE 1
    2.12 -#define XEN_CPU_HOTPLUG_STATUS_ONLINE  2
    2.13 -#define XEN_CPU_HOTPLUG_STATUS_NEW     3
    2.14 -
    2.15  /* XEN_SYSCTL_cpu_hotplug */
    2.16  struct xen_sysctl_cpu_hotplug {
    2.17      /* IN variables */
    2.18      uint32_t cpu;   /* Physical cpu. */
    2.19  #define XEN_SYSCTL_CPU_HOTPLUG_ONLINE  0
    2.20  #define XEN_SYSCTL_CPU_HOTPLUG_OFFLINE 1
    2.21 -#define XEN_SYSCTL_CPU_HOTPLUG_STATUS 2
    2.22      uint32_t op;    /* hotplug opcode */
    2.23  };
    2.24  typedef struct xen_sysctl_cpu_hotplug xen_sysctl_cpu_hotplug_t;