ia64/xen-unstable

changeset 16810:ec10c9a2d976

do_set_trap_table()'s argument can be const.

Also, automatically generate const version of every guest handle
definition.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jan 18 16:09:05 2008 +0000 (2008-01-18)
parents ada944b5e066
children 420f98121491
files xen/arch/ia64/xen/hypercall.c xen/arch/x86/traps.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/traps.c xen/include/asm-x86/hypercall.h xen/include/public/arch-ia64.h xen/include/public/arch-powerpc.h xen/include/public/arch-x86/xen.h xen/include/public/xen.h
line diff
     1.1 --- a/xen/arch/ia64/xen/hypercall.c	Fri Jan 18 15:46:58 2008 +0000
     1.2 +++ b/xen/arch/ia64/xen/hypercall.c	Fri Jan 18 16:09:05 2008 +0000
     1.3 @@ -454,7 +454,7 @@ static long unregister_guest_callback(st
     1.4  /* First time to add callback to xen/ia64, so let's just stick to
     1.5   * the newer callback interface.
     1.6   */
     1.7 -long do_callback_op(int cmd, XEN_GUEST_HANDLE(cvoid) arg)
     1.8 +long do_callback_op(int cmd, XEN_GUEST_HANDLE(const_void) arg)
     1.9  {
    1.10      long ret;
    1.11  
     2.1 --- a/xen/arch/x86/traps.c	Fri Jan 18 15:46:58 2008 +0000
     2.2 +++ b/xen/arch/x86/traps.c	Fri Jan 18 16:09:05 2008 +0000
     2.3 @@ -2825,7 +2825,7 @@ long unregister_guest_nmi_callback(void)
     2.4      return 0;
     2.5  }
     2.6  
     2.7 -long do_set_trap_table(XEN_GUEST_HANDLE(trap_info_t) traps)
     2.8 +long do_set_trap_table(XEN_GUEST_HANDLE(const_trap_info_t) traps)
     2.9  {
    2.10      struct trap_info cur;
    2.11      struct vcpu *curr = current;
     3.1 --- a/xen/arch/x86/x86_32/traps.c	Fri Jan 18 15:46:58 2008 +0000
     3.2 +++ b/xen/arch/x86/x86_32/traps.c	Fri Jan 18 16:09:05 2008 +0000
     3.3 @@ -419,7 +419,7 @@ static long unregister_guest_callback(st
     3.4  }
     3.5  
     3.6  
     3.7 -long do_callback_op(int cmd, XEN_GUEST_HANDLE(cvoid) arg)
     3.8 +long do_callback_op(int cmd, XEN_GUEST_HANDLE(const_void) arg)
     3.9  {
    3.10      long ret;
    3.11  
     4.1 --- a/xen/arch/x86/x86_64/traps.c	Fri Jan 18 15:46:58 2008 +0000
     4.2 +++ b/xen/arch/x86/x86_64/traps.c	Fri Jan 18 16:09:05 2008 +0000
     4.3 @@ -470,7 +470,7 @@ static long unregister_guest_callback(st
     4.4  }
     4.5  
     4.6  
     4.7 -long do_callback_op(int cmd, XEN_GUEST_HANDLE(cvoid) arg)
     4.8 +long do_callback_op(int cmd, XEN_GUEST_HANDLE(const_void) arg)
     4.9  {
    4.10      long ret;
    4.11  
     5.1 --- a/xen/include/asm-x86/hypercall.h	Fri Jan 18 15:46:58 2008 +0000
     5.2 +++ b/xen/include/asm-x86/hypercall.h	Fri Jan 18 16:09:05 2008 +0000
     5.3 @@ -34,7 +34,7 @@ do_physdev_op_compat(
     5.4  
     5.5  extern long
     5.6  do_set_trap_table(
     5.7 -    XEN_GUEST_HANDLE(trap_info_t) traps);
     5.8 +    XEN_GUEST_HANDLE(const_trap_info_t) traps);
     5.9  
    5.10  extern int
    5.11  do_mmu_update(
     6.1 --- a/xen/include/public/arch-ia64.h	Fri Jan 18 15:46:58 2008 +0000
     6.2 +++ b/xen/include/public/arch-ia64.h	Fri Jan 18 16:09:05 2008 +0000
     6.3 @@ -36,7 +36,9 @@
     6.4  #endif
     6.5  
     6.6  #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
     6.7 -    ___DEFINE_XEN_GUEST_HANDLE(name, type)
     6.8 +    ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
     6.9 +    ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
    6.10 +
    6.11  #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
    6.12  #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
    6.13  #define XEN_GUEST_HANDLE_64(name)       XEN_GUEST_HANDLE(name)
     7.1 --- a/xen/include/public/arch-powerpc.h	Fri Jan 18 15:46:58 2008 +0000
     7.2 +++ b/xen/include/public/arch-powerpc.h	Fri Jan 18 16:09:05 2008 +0000
     7.3 @@ -32,7 +32,8 @@
     7.4      } __attribute__((__aligned__(8))) __guest_handle_ ## name
     7.5  
     7.6  #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
     7.7 -    ___DEFINE_XEN_GUEST_HANDLE(name, type)
     7.8 +    ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
     7.9 +    ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
    7.10  #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
    7.11  #define XEN_GUEST_HANDLE(name)        __guest_handle_ ## name
    7.12  #define set_xen_guest_handle(hnd, val) \
     8.1 --- a/xen/include/public/arch-x86/xen.h	Fri Jan 18 15:46:58 2008 +0000
     8.2 +++ b/xen/include/public/arch-x86/xen.h	Fri Jan 18 16:09:05 2008 +0000
     8.3 @@ -37,7 +37,8 @@
     8.4  #endif
     8.5  
     8.6  #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
     8.7 -    ___DEFINE_XEN_GUEST_HANDLE(name, type)
     8.8 +    ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
     8.9 +    ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
    8.10  #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
    8.11  #define __XEN_GUEST_HANDLE(name)        __guest_handle_ ## name
    8.12  #define XEN_GUEST_HANDLE(name)          __XEN_GUEST_HANDLE(name)
     9.1 --- a/xen/include/public/xen.h	Fri Jan 18 15:46:58 2008 +0000
     9.2 +++ b/xen/include/public/xen.h	Fri Jan 18 16:09:05 2008 +0000
     9.3 @@ -48,7 +48,6 @@ DEFINE_XEN_GUEST_HANDLE(int);
     9.4  DEFINE_XEN_GUEST_HANDLE(long);
     9.5  __DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
     9.6  DEFINE_XEN_GUEST_HANDLE(void);
     9.7 -__DEFINE_XEN_GUEST_HANDLE(cvoid, const void);
     9.8  
     9.9  DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
    9.10  #endif