[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] IA64: use symbolic constant for hypercall.



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1228891184 -32400
# Node ID dd7ac569579a971f1501798f58aa3a25fdc295bb
# Parent  09160c3bd1797fdee111c2837f26a749e0bf9435
IA64: use symbolic constant for hypercall.

define symbolic names for hypercall number and use them.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/dom_fw_asm.S |    6 ++++--
 xen/arch/ia64/xen/domain.c     |    2 +-
 xen/include/asm-ia64/dom_fw.h  |    7 ++++++-
 3 files changed, 11 insertions(+), 4 deletions(-)

diff -r 09160c3bd179 -r dd7ac569579a xen/arch/ia64/xen/dom_fw_asm.S
--- a/xen/arch/ia64/xen/dom_fw_asm.S    Fri Dec 05 15:47:19 2008 +0900
+++ b/xen/arch/ia64/xen/dom_fw_asm.S    Wed Dec 10 15:39:44 2008 +0900
@@ -1,3 +1,5 @@
+#include <asm/dom_fw.h>
+
 // moved from xenasm.S to be shared by xen and libxc
 /*
  * Assembly support routines for Xen/ia64
@@ -26,14 +28,14 @@ xen_ia64_pal_call_stub:
 xen_ia64_pal_call_stub:
        {
         .mii
-       addl r2=0x1000,r0       //  Hypercall number (Value is patched).
+       addl r2=FW_HYPERCALL_PAL_CALL_ASM,r0    //  Hypercall number (Value is 
patched).
        mov r9=256
        ;; 
        cmp.gtu p7,p8=r9,r28            /* r32 <= 255? */
        }
        {
         .mbb
-       break 0x1000            //  Hypercall vector (Value is patched).
+       break __IA64_XEN_HYPERCALL_DEFAULT      //  Hypercall vector (Value is 
patched).
 (p7)   br.cond.sptk.few rp
 (p8)   br.ret.sptk.few rp
        }
diff -r 09160c3bd179 -r dd7ac569579a xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Fri Dec 05 15:47:19 2008 +0900
+++ b/xen/arch/ia64/xen/domain.c        Wed Dec 10 15:39:44 2008 +0900
@@ -561,7 +561,7 @@ int arch_domain_create(struct domain *d,
 
        // the following will eventually need to be negotiated dynamically
        d->arch.shared_info_va = DEFAULT_SHAREDINFO_ADDR;
-       d->arch.breakimm = 0x1000;
+       d->arch.breakimm = __IA64_XEN_HYPERCALL_DEFAULT;
        for (i = 0; i < NR_CPUS; i++) {
                d->arch.last_vcpu[i].vcpu_id = INVALID_VCPU_ID;
        }
diff -r 09160c3bd179 -r dd7ac569579a xen/include/asm-ia64/dom_fw.h
--- a/xen/include/asm-ia64/dom_fw.h     Fri Dec 05 15:47:19 2008 +0900
+++ b/xen/include/asm-ia64/dom_fw.h     Wed Dec 10 15:39:44 2008 +0900
@@ -4,6 +4,9 @@
  * Copyright (C) 2004 Hewlett-Packard Co
  *     Dan Magenheimer (dan.magenheimer@xxxxxx)
  */
+
+#define __IA64_XEN_HYPERCALL_DEFAULT           0x1000
+#define __IA64_XEN_HYPERCALL_DEFAULT_STR       "0x1000"
 
 /* Portion of guest physical memory space reserved for PAL/SAL/EFI/ACPI
    data and code.  */
@@ -65,6 +68,7 @@
 #define FW_HYPERCALL_PAL_CALL_INDEX    0x80UL
 #define FW_HYPERCALL_PAL_CALL_PADDR    
FW_HYPERCALL_PADDR(FW_HYPERCALL_PAL_CALL_INDEX)
 #define FW_HYPERCALL_PAL_CALL          0x1000UL
+#define FW_HYPERCALL_PAL_CALL_ASM      0x1000
 
 /*
  * SAL consists of a table of descriptors, one of which (type=0)
@@ -164,6 +168,7 @@
 #define FW_HYPERCALL_FPSWA_ENTRY_PADDR                 
FW_HYPERCALL_PADDR(FW_HYPERCALL_FPSWA_ENTRY_INDEX)
 #define FW_HYPERCALL_FPSWA_PATCH_PADDR                 
FW_HYPERCALL_PADDR(FW_HYPERCALL_FPSWA_PATCH_INDEX)
 #define FW_HYPERCALL_FPSWA                             0x500UL
+#define FW_HYPERCALL_FPSWA_STR                         "0x500"
 
 /* Set the shared_info base virtual address.  */
 #define FW_HYPERCALL_SET_SHARED_INFO_VA                        0x600UL
@@ -186,7 +191,7 @@
 /* Additionnal OEM SAL.  */
 #define SAL_XEN_SAL_RETURN     0x02000000
 
-#ifdef __XEN__
+#if defined(__XEN__) && !defined(__ASSEMBLY__)
 #include <linux/efi.h>
 extern struct ia64_pal_retval xen_pal_emulator(u64, u64, u64, u64);
 extern struct sal_ret_values sal_emulator (long index, unsigned long in1, 
unsigned long in2, unsigned long in3, unsigned long in4, unsigned long in5, 
unsigned long in6, unsigned long in7);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.