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-devel

[Xen-devel] [LINUX] hypercall: Handle hypcercall_stub macro

To: Keir Fraser <keir@xxxxxxxxxxxxx>, Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [LINUX] hypercall: Handle hypcercall_stub macro
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 13 Aug 2007 15:18:01 +0800
Delivery-date: Mon, 13 Aug 2007 00:18:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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@xxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [LINUX] hypercall: Handle hypcercall_stub macro, Herbert Xu <=