Herbert Xu
2007-Aug-13 07:18 UTC
[Xen-devel] [LINUX] hypercall: Handle hypcercall_stub macro
Hi Keir: [LINUX] hypercall: Handle hypcercall_stub as a macro This patch handles the case where hypercall_stub is a macro. This will happen under 2.4 when hypercalls are made from a module. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> diff -r 840b9df48b6a include/asm-i386/mach-xen/asm/hypercall.h --- a/include/asm-i386/mach-xen/asm/hypercall.h Tue Aug 07 09:37:41 2007 +0100 +++ b/include/asm-i386/mach-xen/asm/hypercall.h Mon Aug 13 15:06:26 2007 +0800 @@ -34,6 +34,7 @@ #define __HYPERCALL_H__ #include <linux/string.h> /* memcpy() */ +#include <linux/stringify.h> #ifndef __HYPERVISOR_H__ # error "please don''t include this file directly" @@ -47,7 +48,7 @@ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)" #else #define HYPERCALL_STR(name) \ - "mov hypercall_stubs,%%eax; " \ + "mov " __stringify(hypercall_stubs) ",%%eax; " \ "add $("STR(__HYPERVISOR_##name)" * 32),%%eax; " \ "call *%%eax" #endif diff -r 840b9df48b6a include/asm-x86_64/mach-xen/asm/hypercall.h --- a/include/asm-x86_64/mach-xen/asm/hypercall.h Tue Aug 07 09:37:41 2007 +0100 +++ b/include/asm-x86_64/mach-xen/asm/hypercall.h Mon Aug 13 15:14:57 2007 +0800 @@ -38,6 +38,7 @@ #define __HYPERCALL_H__ #include <linux/string.h> /* memcpy() */ +#include <linux/stringify.h> #ifndef __HYPERVISOR_H__ # error "please don''t include this file directly" @@ -51,7 +52,7 @@ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)" #else #define HYPERCALL_STR(name) \ - "mov hypercall_stubs,%%rax; " \ + "mov " __stringify(hypercall_stubs) ",%%rax; " \ "add $("STR(__HYPERVISOR_##name)" * 32),%%rax; " \ "call *%%rax" #endif -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel