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] Recode usage of FPSR_DEFAULT due to strange double decla

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Recode usage of FPSR_DEFAULT due to strange double declaration
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 20 Nov 2005 12:58:18 +0000
Delivery-date: Sun, 20 Nov 2005 12:59:50 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 djm@xxxxxxxxxxxxxxx
# Node ID c35a32f96d2095e92d2e873d9ee842877fa30127
# Parent  878a9891b056c19524e4d213f706a5cafc983b3a
Recode usage of FPSR_DEFAULT due to strange double declaration

diff -r 878a9891b056 -r c35a32f96d20 tools/libxc/xc_ia64_stubs.c
--- a/tools/libxc/xc_ia64_stubs.c       Sat Nov 19 05:16:29 2005
+++ b/tools/libxc/xc_ia64_stubs.c       Sat Nov 19 21:41:08 2005
@@ -6,6 +6,21 @@
 #include <zlib.h>
 #include "xen/arch-ia64.h"
 #include <xen/io/ioreq.h>
+
+/* this is a very ugly way of getting FPSR_DEFAULT.  struct ia64_fpreg is
+ * mysteriously declared in two places: /usr/include/asm/fpu.h and
+ * /usr/include/bits/sigcontext.h.  The former also defines FPSR_DEFAULT,
+ * the latter doesn't but is included (indirectly) by xg_private.h */
+#define __ASSEMBLY__
+#include <asm/fpu.h>
+#undef __IA64_UL
+#define __IA64_UL(x)           ((unsigned long)(x))
+#undef __ASSEMBLY__
+                                                                               
 
+unsigned long xc_ia64_fpsr_default(void)
+{
+        return FPSR_DEFAULT;
+}
 
 int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, 
                   uint32_t max_factor, uint32_t flags)
diff -r 878a9891b056 -r c35a32f96d20 tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Sat Nov 19 05:16:29 2005
+++ b/tools/libxc/xc_linux_build.c      Sat Nov 19 21:41:08 2005
@@ -278,7 +278,8 @@
 #endif
 
 #ifdef __ia64__
-#include <asm/fpu.h> /* for FPSR_DEFAULT */
+extern unsigned long xc_ia64_fpsr_default(void);
+
 static int setup_guest(int xc_handle,
                        uint32_t dom,
                        char *image, unsigned long image_size,
@@ -780,7 +781,7 @@
     ctxt->regs.cr_ipsr = 0; /* all necessary bits filled by hypervisor */
     ctxt->regs.cr_iip = vkern_entry;
     ctxt->regs.cr_ifs = 1UL << 63;
-    ctxt->regs.ar_fpsr = FPSR_DEFAULT;
+    ctxt->regs.ar_fpsr = xc_ia64_fpsr_default();
     /* currently done by hypervisor, should move here */
     /* ctxt->regs.r28 = dom_fw_setup(); */
     ctxt->vcpu.privregs = 0;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Recode usage of FPSR_DEFAULT due to strange double declaration, Xen patchbot -unstable <=