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] [PATCH 2] MCA trivial cleanup

To: Keir Fraser <keir.xen@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2] MCA trivial cleanup
From: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Date: Sun, 8 May 2011 04:25:55 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Sat, 07 May 2011 13:27:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcwM9PfpUVWQ4PWuRPywmfnoF7ezCA==
Thread-topic: [PATCH 2] MCA trivial cleanup
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 0e0a1d72d8b5 xen/arch/x86/cpu/mcheck/mce_intel.c
--- a/xen/arch/x86/cpu/mcheck/mce_intel.c       Fri Apr 29 10:32:28 2011 +0800
+++ b/xen/arch/x86/cpu/mcheck/mce_intel.c       Fri Apr 29 13:20:30 2011 +0800
@@ -218,7 +218,7 @@ static enum mce_result mce_action(struct
         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 @@ struct mcinfo_recovery *mci_add_pageoff_
     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 @@ static void intel_memerr_dhandler(int bn
         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 @@ static int default_check(uint64_t status
     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 @@ static void intel_default_dhandler(int b
     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 @@ static const struct mca_error_handler in
     {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 @@ static void intel_default_uhandler(int b
     /* 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 0e0a1d72d8b5 xen/arch/x86/cpu/mcheck/x86_mca.h
--- a/xen/arch/x86/cpu/mcheck/x86_mca.h Fri Apr 29 10:32:28 2011 +0800
+++ b/xen/arch/x86/cpu/mcheck/x86_mca.h Fri Apr 29 13:20:30 2011 +0800
@@ -174,7 +174,7 @@ struct mca_error_handler
      * 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);
 };
 

Attachment: mca-cleanup-2.patch
Description: mca-cleanup-2.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 2] MCA trivial cleanup, Liu, Jinsong <=