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

[Xen-changelog] [xen-unstable] x86/mca: MCA trivial cleanup



# HG changeset patch
# User Liu, Jinsong <jinsong.liu@xxxxxxxxx>
# Date 1304937806 -3600
# Node ID 0d79ab0b4cd1433a4b902328eefea95a0fdde213
# Parent  62ed4013bbf86fe22777a0153573c6efd1dc2662
x86/mca: MCA trivial cleanup

1) A little cleanup for mce_action(), remove redundant input param;
2) result should be MCA_NEED_RESET instead of MCA_RESET, otherwise
system cannot reset when fatal;

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>
---


diff -r 62ed4013bbf8 -r 0d79ab0b4cd1 xen/arch/x86/cpu/mcheck/mce_intel.c
--- a/xen/arch/x86/cpu/mcheck/mce_intel.c       Mon May 09 11:42:45 2011 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce_intel.c       Mon May 09 11:43:26 2011 +0100
@@ -218,7 +218,7 @@
         for ( i = 0; i < handler_num; i++ ) {
             if (handlers[i].owned_error(binfo.mib->mc_status))
             {
-                handlers[i].recovery_handler(binfo.bank, &binfo, &mca_res);
+                handlers[i].recovery_handler(&binfo, &mca_res);
 
                 if (mca_res.result & MCA_OWNER)
                     binfo.mib->mc_domid = mca_res.owner;
@@ -600,7 +600,7 @@
     return rec;
 }
 
-static void intel_memerr_dhandler(int bnum,
+static void intel_memerr_dhandler(
              struct mca_binfo *binfo,
              struct mca_handle_result *result)
 {
@@ -634,7 +634,7 @@
         return;
     }
 
-    mci_add_pageoff_action(bnum, binfo->mi, mfn, status);
+    mci_add_pageoff_action(binfo->bank, binfo->mi, mfn, status);
 
     /* This is free page */
     if (status & PG_OFFLINE_OFFLINED)
@@ -710,7 +710,7 @@
     return 1;
 }
 
-static void intel_default_dhandler(int bnum,
+static void intel_default_dhandler(
              struct mca_binfo *binfo,
              struct mca_handle_result *result)
 {
@@ -720,7 +720,7 @@
     type = intel_check_mce_type(status);
 
     if (type == intel_mce_fatal || type == intel_mce_ucr_srar)
-        result->result = MCA_RESET;
+        result->result = MCA_NEED_RESET;
     else if (type == intel_mce_ucr_srao)
         result->result = MCA_NO_ACTION;
 }
@@ -730,7 +730,7 @@
     {default_check, intel_default_dhandler}
 };
 
-static void intel_default_uhandler(int bnum,
+static void intel_default_uhandler(
              struct mca_binfo *binfo,
              struct mca_handle_result *result)
 {
@@ -744,7 +744,7 @@
     /* Panic if no handler for SRAR error */
     case intel_mce_ucr_srar:
     case intel_mce_fatal:
-        result->result = MCA_RESET;
+        result->result = MCA_NEED_RESET;
         break;
     default:
         result->result = MCA_NO_ACTION;
diff -r 62ed4013bbf8 -r 0d79ab0b4cd1 xen/arch/x86/cpu/mcheck/x86_mca.h
--- a/xen/arch/x86/cpu/mcheck/x86_mca.h Mon May 09 11:42:45 2011 +0100
+++ b/xen/arch/x86/cpu/mcheck/x86_mca.h Mon May 09 11:43:26 2011 +0100
@@ -174,7 +174,7 @@
      * for the particular mca error later.
     */
     int (*owned_error)(uint64_t status);
-    void (*recovery_handler)(int bank, struct mca_binfo *binfo,
+    void (*recovery_handler)(struct mca_binfo *binfo,
                     struct mca_handle_result *result);
 };
 

_______________________________________________
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®.