ia64/xen-unstable

changeset 9618:db44b783fe09

Cleanups to do_callback_op() new hypercall changeset.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Apr 06 17:25:24 2006 +0100 (2006-04-06)
parents be0a1f376223
children 8c27368b12ad
files linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/traps.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h	Thu Apr 06 16:41:53 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h	Thu Apr 06 17:25:24 2006 +0100
     1.3 @@ -331,8 +331,7 @@ HYPERVISOR_nmi_op(
     1.4  
     1.5  static inline int
     1.6  HYPERVISOR_callback_op(
     1.7 -	int cmd,
     1.8 -	void *arg)
     1.9 +	int cmd, void *arg)
    1.10  {
    1.11  	return _hypercall2(int, callback_op, cmd, arg);
    1.12  }
     2.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Thu Apr 06 16:41:53 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Thu Apr 06 17:25:24 2006 +0100
     2.3 @@ -25,11 +25,11 @@ extern void nmi(void);
     2.4  static void __init machine_specific_arch_setup(void)
     2.5  {
     2.6  	struct xen_platform_parameters pp;
     2.7 -	callback_register_t event = {
     2.8 +	struct callback_register event = {
     2.9  		.type = CALLBACKTYPE_event,
    2.10  		.address = { __KERNEL_CS, (unsigned long)hypervisor_callback },
    2.11  	};
    2.12 -	callback_register_t failsafe = {
    2.13 +	struct callback_register failsafe = {
    2.14  		.type = CALLBACKTYPE_failsafe,
    2.15  		.address = { __KERNEL_CS, (unsigned long)failsafe_callback },
    2.16  	};
     3.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h	Thu Apr 06 16:41:53 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h	Thu Apr 06 17:25:24 2006 +0100
     3.3 @@ -14,15 +14,15 @@ extern void nmi(void);
     3.4  
     3.5  static void __init machine_specific_arch_setup(void)
     3.6  {
     3.7 -	callback_register_t event = {
     3.8 +	struct callback_register event = {
     3.9  		.type = CALLBACKTYPE_event,
    3.10  		.address = (unsigned long) hypervisor_callback,
    3.11  	};
    3.12 -	callback_register_t failsafe = {
    3.13 +	struct callback_register failsafe = {
    3.14  		.type = CALLBACKTYPE_failsafe,
    3.15  		.address = (unsigned long)failsafe_callback,
    3.16  	};
    3.17 -	callback_register_t syscall = {
    3.18 +	struct callback_register syscall = {
    3.19  		.type = CALLBACKTYPE_syscall,
    3.20  		.address = (unsigned long)system_call,
    3.21  	};
     4.1 --- a/xen/arch/x86/x86_32/traps.c	Thu Apr 06 16:41:53 2006 +0100
     4.2 +++ b/xen/arch/x86/x86_32/traps.c	Thu Apr 06 17:25:24 2006 +0100
     4.3 @@ -322,8 +322,7 @@ static long register_guest_callback(stru
     4.4      long ret = 0;
     4.5      struct vcpu *v = current;
     4.6  
     4.7 -    if ( reg->address.cs )
     4.8 -        fixup_guest_code_selector(reg->address.cs);
     4.9 +    fixup_guest_code_selector(reg->address.cs);
    4.10  
    4.11      switch ( reg->type )
    4.12      {
    4.13 @@ -355,6 +354,7 @@ static long unregister_guest_callback(st
    4.14          ret = -EINVAL;
    4.15          break;
    4.16      }
    4.17 +
    4.18      return ret;
    4.19  }
    4.20  
    4.21 @@ -370,7 +370,7 @@ long do_callback_op(int cmd, GUEST_HANDL
    4.22          struct callback_register reg;
    4.23  
    4.24          ret = -EFAULT;
    4.25 -        if ( copy_from_guest( &reg, arg, 1 ) )
    4.26 +        if ( copy_from_guest(&reg, arg, 1) )
    4.27              break;
    4.28  
    4.29          ret = register_guest_callback(&reg);
    4.30 @@ -382,7 +382,7 @@ long do_callback_op(int cmd, GUEST_HANDL
    4.31          struct callback_unregister unreg;
    4.32  
    4.33          ret = -EFAULT;
    4.34 -        if ( copy_from_guest( &unreg, arg, 1 ) )
    4.35 +        if ( copy_from_guest(&unreg, arg, 1) )
    4.36              break;
    4.37  
    4.38          ret = unregister_guest_callback(&unreg);
     5.1 --- a/xen/arch/x86/x86_64/traps.c	Thu Apr 06 16:41:53 2006 +0100
     5.2 +++ b/xen/arch/x86/x86_64/traps.c	Thu Apr 06 17:25:24 2006 +0100
     5.3 @@ -357,6 +357,7 @@ static long unregister_guest_callback(st
     5.4          ret = -EINVAL;
     5.5          break;
     5.6      }
     5.7 +
     5.8      return ret;
     5.9  }
    5.10  
    5.11 @@ -372,7 +373,7 @@ long do_callback_op(int cmd, GUEST_HANDL
    5.12          struct callback_register reg;
    5.13  
    5.14          ret = -EFAULT;
    5.15 -        if ( copy_from_guest( &reg, arg, 1 ) )
    5.16 +        if ( copy_from_guest(&reg, arg, 1) )
    5.17              break;
    5.18  
    5.19          ret = register_guest_callback(&reg);
    5.20 @@ -384,7 +385,7 @@ long do_callback_op(int cmd, GUEST_HANDL
    5.21          struct callback_unregister unreg;
    5.22  
    5.23          ret = -EFAULT;
    5.24 -        if ( copy_from_guest( &unreg, arg, 1 ) )
    5.25 +        if ( copy_from_guest(&unreg, arg, 1) )
    5.26              break;
    5.27  
    5.28          ret = unregister_guest_callback(&unreg);
    5.29 @@ -403,15 +404,15 @@ long do_set_callbacks(unsigned long even
    5.30                        unsigned long failsafe_address,
    5.31                        unsigned long syscall_address)
    5.32  {
    5.33 -    callback_register_t event = {
    5.34 +    struct callback_register event = {
    5.35          .type = CALLBACKTYPE_event,
    5.36          .address = event_address,
    5.37      };
    5.38 -    callback_register_t failsafe = {
    5.39 +    struct callback_register failsafe = {
    5.40          .type = CALLBACKTYPE_failsafe,
    5.41          .address = failsafe_address,
    5.42      };
    5.43 -    callback_register_t syscall = {
    5.44 +    struct callback_register syscall = {
    5.45          .type = CALLBACKTYPE_syscall,
    5.46          .address = syscall_address,
    5.47      };