From: "Jan Beulich" Subject: [PATCH] linux: do_callback_op()'s second argument can be const Date: Fri, 18 Jan 2008 15:17:49 +0000 Message-ID: <4790D12D.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Subject: Constify pointer argument of HYPERVISOR_callback_op This (obviously) duplicates the public header changes already submitted with the Xen side patch. As usual, written and tested on 2.6.24-rc7 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich Index: head-2007-10-26/include/xen/interface/arch-ia64.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-10-26.orig/include/xen/interface/arch-ia64.h 2007-11-20 = 17:45:33.000000000 +0100 +++ head-2007-10-26/include/xen/interface/arch-ia64.h 2007-11-20 = 17:29:31.000000000 +0100 @@ -45,18 +45,7 @@ #endif =20 #ifndef __ASSEMBLY__ -/* Guest handles for primitive C types. */ -__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); -__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); -__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long); -__DEFINE_XEN_GUEST_HANDLE(u64, unsigned long); -DEFINE_XEN_GUEST_HANDLE(char); -DEFINE_XEN_GUEST_HANDLE(int); -DEFINE_XEN_GUEST_HANDLE(long); -DEFINE_XEN_GUEST_HANDLE(void); - typedef unsigned long xen_pfn_t; -DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); #define PRI_xen_pfn "lx" #endif =20 Index: head-2007-10-26/include/xen/interface/arch-powerpc.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-10-26.orig/include/xen/interface/arch-powerpc.h 2007-11-20 = 17:45:33.000000000 +0100 +++ head-2007-10-26/include/xen/interface/arch-powerpc.h 2007-11-20 = 17:28:06.000000000 +0100 @@ -45,17 +45,7 @@ #endif =20 #ifndef __ASSEMBLY__ -/* Guest handles for primitive C types. */ -__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); -__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); -__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long); -DEFINE_XEN_GUEST_HANDLE(char); -DEFINE_XEN_GUEST_HANDLE(int); -DEFINE_XEN_GUEST_HANDLE(long); -DEFINE_XEN_GUEST_HANDLE(void); - typedef unsigned long long xen_pfn_t; -DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); #define PRI_xen_pfn "llx" #endif =20 Index: head-2007-11-30/include/xen/interface/arch-x86/xen.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-11-30.orig/include/xen/interface/arch-x86/xen.h 2007-12-06 = 11:23:05.000000000 +0100 +++ head-2007-11-30/include/xen/interface/arch-x86/xen.h 2007-11-20 = 17:26:06.000000000 +0100 @@ -54,17 +54,7 @@ #endif =20 #ifndef __ASSEMBLY__ -/* Guest handles for primitive C types. */ -__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); -__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); -__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long); -DEFINE_XEN_GUEST_HANDLE(char); -DEFINE_XEN_GUEST_HANDLE(int); -DEFINE_XEN_GUEST_HANDLE(long); -DEFINE_XEN_GUEST_HANDLE(void); - typedef unsigned long xen_pfn_t; -DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); #define PRI_xen_pfn "lx" #endif =20 Index: head-2007-11-30/include/xen/interface/xen.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-11-30.orig/include/xen/interface/xen.h 2007-12-06 = 11:23:05.000000000 +0100 +++ head-2007-11-30/include/xen/interface/xen.h 2007-11-20 17:27:12.0000000= 00 +0100 @@ -41,6 +41,20 @@ #error "Unsupported architecture" #endif =20 +#ifndef __ASSEMBLY__ +/* Guest handles for primitive C types. */ +DEFINE_XEN_GUEST_HANDLE(char); +__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); +DEFINE_XEN_GUEST_HANDLE(int); +__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); +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 + /* * HYPERCALLS */ Index: head-2007-11-30/arch/x86_64/ia32/syscall32-xen.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-11-30.orig/arch/x86_64/ia32/syscall32-xen.c 2007-12-06 = 11:23:05.000000000 +0100 +++ head-2007-11-30/arch/x86_64/ia32/syscall32-xen.c 2007-11-21 = 14:18:09.000000000 +0100 @@ -87,11 +87,11 @@ core_initcall(init_syscall32);=20 /* May not be __init: called during resume */ void syscall32_cpu_init(void) { - static struct callback_register cstar =3D { + static const struct callback_register cstar =3D { .type =3D CALLBACKTYPE_syscall32, .address =3D (unsigned long)ia32_cstar_target }; - static struct callback_register sysenter =3D { + static const struct callback_register sysenter =3D { .type =3D CALLBACKTYPE_sysenter, .address =3D (unsigned long)ia32_sysenter_target }; Index: head-2007-11-30/include/asm-i386/mach-xen/asm/hypercall.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-11-30.orig/include/asm-i386/mach-xen/asm/hypercall.h = 2007-12-06 11:23:05.000000000 +0100 +++ head-2007-11-30/include/asm-i386/mach-xen/asm/hypercall.h 2007-11-21 = 14:19:15.000000000 +0100 @@ -384,7 +384,7 @@ HYPERVISOR_hvm_op( =20 static inline int HYPERVISOR_callback_op( - int cmd, void *arg) + int cmd, const void *arg) { return _hypercall2(int, callback_op, cmd, arg); } Index: head-2007-11-30/include/asm-x86_64/mach-xen/asm/hypercall.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2007-11-30.orig/include/asm-x86_64/mach-xen/asm/hypercall.h = 2007-12-06 11:23:05.000000000 +0100 +++ head-2007-11-30/include/asm-x86_64/mach-xen/asm/hypercall.h 2007-11-21 = 15:48:12.000000000 +0100 @@ -385,7 +385,7 @@ HYPERVISOR_hvm_op( =20 static inline int HYPERVISOR_callback_op( - int cmd, void *arg) + int cmd, const void *arg) { return _hypercall2(int, callback_op, cmd, arg); }