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

Re: [Xen-ia64-devel] [PATCH 6/12]MCA handler support for Xen/ia64 TAKE 2



Hi Alex,

How about the following patch. I issued outside the prototype
declaration of ia64_sal_get_state_info_size().
I checked that it could compile by both gcc-3.4.3 and gcc-4.0.0.

Thanks,
KAZ

Signed-off-by: Yutaka Ezaki <yutaka.ezaki@xxxxxxxxxxxxxx>
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Signed-off-by: Kazuhiro Suzuki <kaz@xxxxxxxxxxxxxx>


From: Alex Williamson <alex.williamson@xxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH 6/12]MCA handler support for Xen/ia64 TAKE 
2
Date: Wed, 18 Oct 2006 16:01:04 -0600

> On Mon, 2006-10-16 at 14:46 +0900, SUZUKI Kazuhiro wrote:
> > Hi Alex,
> > 
> >   I modified to insert is_running_on_xen() and I attached this patch.
> 
> Hi Kaz,
> 
>    Does this build for you?  I get this:
> 
> In file included from include/asm-ia64/mca.h:20,
>                  from arch/ia64/kernel/asm-offsets.c:16:
> include/asm/sal.h: In function 'ia64_sal_get_state_info':
> include/asm/sal.h:702: error: invalid storage class for function 
> 'ia64_sal_get_state_info_size'
> include/asm/sal.h:704: warning: implicit declaration of function 
> 'ia64_sal_get_state_info_size'
> include/asm/sal.h: At top level:
> include/asm/sal.h:726: error: conflicting types for 
> 'ia64_sal_get_state_info_size'
> include/asm/sal.h:704: error: previous implicit declaration of 
> 'ia64_sal_get_state_info_size' was here
> make[1]: *** [arch/ia64/kernel/asm-offsets.s] Error 1
> make: *** [prepare0] Error 2
> 
> Thanks,
> 
>       Alex
> 
> -- 
> Alex Williamson                             HP Open Source & Linux Org.
> 
--- a/linux-2.6-xen-sparse/include/asm-ia64/sal.h       2006-09-13 
03:02:10.000000000 +0900
+++ b/linux-2.6-xen-sparse/include/asm-ia64/sal.h       2006-10-24 
11:12:13.000000000 +0900
@@ -42,6 +42,9 @@
 #include <asm/pal.h>
 #include <asm/system.h>
 #include <asm/fpu.h>
+#ifdef CONFIG_XEN
+#include <asm/xen/xencomm.h>
+#endif
 
 extern spinlock_t sal_lock;
 
@@ -686,10 +689,30 @@
 /* Get the processor and platform information logged by SAL with respect to 
the machine
  * state at the time of the MCAs, INITs, CMCs, or CPEs.
  */
+#ifdef CONFIG_XEN
+static inline u64 ia64_sal_get_state_info_size (u64 sal_info_type);
+#endif
+
 static inline u64
 ia64_sal_get_state_info (u64 sal_info_type, u64 *sal_info)
 {
        struct ia64_sal_retval isrv;
+#ifdef CONFIG_XEN
+       if (is_running_on_xen()) {
+               struct xencomm_mini xc_area[2];
+               int nbr_area = 2;
+               struct xencomm_handle *desc;
+               int rc;
+               rc = xencomm_create_mini(xc_area, &nbr_area, sal_info,
+                                        
ia64_sal_get_state_info_size(sal_info_type),
+                                        &desc);
+               if (rc)
+                       return 0;
+
+               SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
+                                  desc, 0, 0, 0, 0);
+       } else
+#endif
        SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
                      sal_info, 0, 0, 0, 0);
        if (isrv.status)
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

 


Rackspace

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