[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86 sysctl: Remove unused CPU hotplug status stuff.
# HG changeset patch # User Keir Fraser <keir@xxxxxxx> # Date 1295014059 0 # Node ID 6c9bcfb0fb84c18dd65e2304309f4d857a1ca4d3 # Parent c3b5924919e38090339be3bb1fa2d9aa7762eddd x86 sysctl: Remove unused CPU hotplug status stuff. Signed-off-by: Keir Fraser <keir@xxxxxxx> --- xen/arch/x86/sysctl.c | 24 +----------------------- xen/include/public/sysctl.h | 9 --------- 2 files changed, 1 insertion(+), 32 deletions(-) diff -r c3b5924919e3 -r 6c9bcfb0fb84 xen/arch/x86/sysctl.c --- a/xen/arch/x86/sysctl.c Fri Jan 14 09:53:22 2011 +0000 +++ b/xen/arch/x86/sysctl.c Fri Jan 14 14:07:39 2011 +0000 @@ -41,7 +41,7 @@ long arch_do_sysctl( long arch_do_sysctl( struct xen_sysctl *sysctl, XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl) { - long ret = 0, status; + long ret = 0; switch ( sysctl->cmd ) { @@ -167,41 +167,19 @@ long arch_do_sysctl( { unsigned int cpu = sysctl->u.cpu_hotplug.cpu; - if (cpu_present(cpu)) { - status = cpu_online(cpu) ? XEN_CPU_HOTPLUG_STATUS_ONLINE : - XEN_CPU_HOTPLUG_STATUS_OFFLINE; - } else { - status = -EINVAL; - } - switch ( sysctl->u.cpu_hotplug.op ) { case XEN_SYSCTL_CPU_HOTPLUG_ONLINE: ret = cpu_up(cpu); - /* - * In the case of a true hotplug, this CPU wasn't present - * before, so return the 'new' status for it. - */ - if (ret == 0 && status == -EINVAL) - status = XEN_CPU_HOTPLUG_STATUS_NEW; break; case XEN_SYSCTL_CPU_HOTPLUG_OFFLINE: ret = continue_hypercall_on_cpu( 0, cpu_down_helper, (void *)(unsigned long)cpu); break; - case XEN_SYSCTL_CPU_HOTPLUG_STATUS: - ret = 0; - break; default: ret = -EINVAL; break; } - - /* - * If the operation was successful, return the old status. - */ - if (ret >= 0) - ret = status; } break; diff -r c3b5924919e3 -r 6c9bcfb0fb84 xen/include/public/sysctl.h --- a/xen/include/public/sysctl.h Fri Jan 14 09:53:22 2011 +0000 +++ b/xen/include/public/sysctl.h Fri Jan 14 14:07:39 2011 +0000 @@ -253,21 +253,12 @@ typedef struct xen_sysctl_get_pmstat xen typedef struct xen_sysctl_get_pmstat xen_sysctl_get_pmstat_t; DEFINE_XEN_GUEST_HANDLE(xen_sysctl_get_pmstat_t); -/* - * Status codes. Must be greater than 0 to avoid confusing - * sysctl callers that see 0 as a plain successful return. - */ -#define XEN_CPU_HOTPLUG_STATUS_OFFLINE 1 -#define XEN_CPU_HOTPLUG_STATUS_ONLINE 2 -#define XEN_CPU_HOTPLUG_STATUS_NEW 3 - /* XEN_SYSCTL_cpu_hotplug */ struct xen_sysctl_cpu_hotplug { /* IN variables */ uint32_t cpu; /* Physical cpu. */ #define XEN_SYSCTL_CPU_HOTPLUG_ONLINE 0 #define XEN_SYSCTL_CPU_HOTPLUG_OFFLINE 1 -#define XEN_SYSCTL_CPU_HOTPLUG_STATUS 2 uint32_t op; /* hotplug opcode */ }; typedef struct xen_sysctl_cpu_hotplug xen_sysctl_cpu_hotplug_t; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |