WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] do_set_trap_table()'s argument can be con

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] do_set_trap_table()'s argument can be const.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jan 2008 20:20:13 -0800
Delivery-date: Fri, 18 Jan 2008 20:20:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1200672545 0
# Node ID ec10c9a2d97679c04e384b28bc92c71a574cdd79
# Parent  ada944b5e066cbb75ed8b5d23fc656fad0855657
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@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/ia64/xen/hypercall.c     |    2 +-
 xen/arch/x86/traps.c              |    2 +-
 xen/arch/x86/x86_32/traps.c       |    2 +-
 xen/arch/x86/x86_64/traps.c       |    2 +-
 xen/include/asm-x86/hypercall.h   |    2 +-
 xen/include/public/arch-ia64.h    |    4 +++-
 xen/include/public/arch-powerpc.h |    3 ++-
 xen/include/public/arch-x86/xen.h |    3 ++-
 xen/include/public/xen.h          |    1 -
 9 files changed, 12 insertions(+), 9 deletions(-)

diff -r ada944b5e066 -r ec10c9a2d976 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c     Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/arch/ia64/xen/hypercall.c     Fri Jan 18 16:09:05 2008 +0000
@@ -454,7 +454,7 @@ static long unregister_guest_callback(st
 /* First time to add callback to xen/ia64, so let's just stick to
  * the newer callback interface.
  */
-long do_callback_op(int cmd, XEN_GUEST_HANDLE(cvoid) arg)
+long do_callback_op(int cmd, XEN_GUEST_HANDLE(const_void) arg)
 {
     long ret;
 
diff -r ada944b5e066 -r ec10c9a2d976 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/arch/x86/traps.c      Fri Jan 18 16:09:05 2008 +0000
@@ -2825,7 +2825,7 @@ long unregister_guest_nmi_callback(void)
     return 0;
 }
 
-long do_set_trap_table(XEN_GUEST_HANDLE(trap_info_t) traps)
+long do_set_trap_table(XEN_GUEST_HANDLE(const_trap_info_t) traps)
 {
     struct trap_info cur;
     struct vcpu *curr = current;
diff -r ada944b5e066 -r ec10c9a2d976 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c       Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/arch/x86/x86_32/traps.c       Fri Jan 18 16:09:05 2008 +0000
@@ -419,7 +419,7 @@ static long unregister_guest_callback(st
 }
 
 
-long do_callback_op(int cmd, XEN_GUEST_HANDLE(cvoid) arg)
+long do_callback_op(int cmd, XEN_GUEST_HANDLE(const_void) arg)
 {
     long ret;
 
diff -r ada944b5e066 -r ec10c9a2d976 xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c       Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/arch/x86/x86_64/traps.c       Fri Jan 18 16:09:05 2008 +0000
@@ -470,7 +470,7 @@ static long unregister_guest_callback(st
 }
 
 
-long do_callback_op(int cmd, XEN_GUEST_HANDLE(cvoid) arg)
+long do_callback_op(int cmd, XEN_GUEST_HANDLE(const_void) arg)
 {
     long ret;
 
diff -r ada944b5e066 -r ec10c9a2d976 xen/include/asm-x86/hypercall.h
--- a/xen/include/asm-x86/hypercall.h   Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/include/asm-x86/hypercall.h   Fri Jan 18 16:09:05 2008 +0000
@@ -34,7 +34,7 @@ do_physdev_op_compat(
 
 extern long
 do_set_trap_table(
-    XEN_GUEST_HANDLE(trap_info_t) traps);
+    XEN_GUEST_HANDLE(const_trap_info_t) traps);
 
 extern int
 do_mmu_update(
diff -r ada944b5e066 -r ec10c9a2d976 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/include/public/arch-ia64.h    Fri Jan 18 16:09:05 2008 +0000
@@ -36,7 +36,9 @@
 #endif
 
 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
-    ___DEFINE_XEN_GUEST_HANDLE(name, type)
+    ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
+    ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
+
 #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
 #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
 #define XEN_GUEST_HANDLE_64(name)       XEN_GUEST_HANDLE(name)
diff -r ada944b5e066 -r ec10c9a2d976 xen/include/public/arch-powerpc.h
--- a/xen/include/public/arch-powerpc.h Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/include/public/arch-powerpc.h Fri Jan 18 16:09:05 2008 +0000
@@ -32,7 +32,8 @@
     } __attribute__((__aligned__(8))) __guest_handle_ ## name
 
 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
-    ___DEFINE_XEN_GUEST_HANDLE(name, type)
+    ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
+    ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
 #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
 #define XEN_GUEST_HANDLE(name)        __guest_handle_ ## name
 #define set_xen_guest_handle(hnd, val) \
diff -r ada944b5e066 -r ec10c9a2d976 xen/include/public/arch-x86/xen.h
--- a/xen/include/public/arch-x86/xen.h Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/include/public/arch-x86/xen.h Fri Jan 18 16:09:05 2008 +0000
@@ -37,7 +37,8 @@
 #endif
 
 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
-    ___DEFINE_XEN_GUEST_HANDLE(name, type)
+    ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
+    ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
 #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
 #define __XEN_GUEST_HANDLE(name)        __guest_handle_ ## name
 #define XEN_GUEST_HANDLE(name)          __XEN_GUEST_HANDLE(name)
diff -r ada944b5e066 -r ec10c9a2d976 xen/include/public/xen.h
--- a/xen/include/public/xen.h  Fri Jan 18 15:46:58 2008 +0000
+++ b/xen/include/public/xen.h  Fri Jan 18 16:09:05 2008 +0000
@@ -48,7 +48,6 @@ DEFINE_XEN_GUEST_HANDLE(long);
 DEFINE_XEN_GUEST_HANDLE(long);
 __DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
 DEFINE_XEN_GUEST_HANDLE(void);
-__DEFINE_XEN_GUEST_HANDLE(cvoid, const void);
 
 DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
 #endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] do_set_trap_table()'s argument can be const., Xen patchbot-unstable <=