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] [xen-unstable] x86/mca: MCA bank extension

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86/mca: MCA bank extension
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 11 May 2011 04:40:21 +0100
Delivery-date: Tue, 10 May 2011 20:49:11 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Liu, Jinsong <jinsong.liu@xxxxxxxxx>
# Date 1304937765 -3600
# Node ID 62ed4013bbf86fe22777a0153573c6efd1dc2662
# Parent  af8d8408a8d2ddd658a7ca75e67aae364cbf1eed
x86/mca: MCA bank extension

Current mca_summay use uint32_t as bitmask of bank uc/pcc/recoverable.
It's not extensible, support no more than 32 mca banks, while
according to Intel SDM, bank number could be as much as 256.

This patch use bool_t flag since it only need to record and indicate
the most severity case.

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


diff -r af8d8408a8d2 -r 62ed4013bbf8 xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c     Mon May 09 11:40:42 2011 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c     Mon May 09 11:42:45 2011 +0100
@@ -246,7 +246,8 @@
     uint64_t gstatus, status;
     struct mcinfo_global *mig = NULL; /* on stack */
     mctelem_cookie_t mctc = NULL;
-    uint32_t uc = 0, pcc = 0, recover, need_clear = 1, mc_flags = 0;
+    bool_t uc = 0, pcc = 0, recover = 1, need_clear = 1;
+    uint32_t mc_flags = 0;
     struct mc_info *mci = NULL;
     mctelem_class_t which = MC_URGENT; /* XXXgcc */
     int errcnt = 0;
@@ -280,7 +281,7 @@
      */
     recover = (mc_recoverable_scan)? 1: 0;
 
-    for (i = 0; i < 32 && i < nr_mce_banks; i++) {
+    for (i = 0; i < nr_mce_banks; i++) {
         struct mcinfo_bank *mib;  /* on stack */
 
         /* Skip bank if corresponding bit in bankmask is clear */
@@ -324,13 +325,13 @@
             }
         }
 
-        /* form a mask of which banks have logged uncorrected errors */
-        if ((status & MCi_STATUS_UC) != 0)
-            uc |= (1 << i);
+        /* flag for uncorrected errors */
+        if (!uc && ((status & MCi_STATUS_UC) != 0))
+            uc = 1;
 
-        /* likewise for those with processor context corrupt */
-        if ((status & MCi_STATUS_PCC) != 0)
-            pcc |= (1 << i);
+        /* flag processor context corrupt */
+        if (!pcc && ((status & MCi_STATUS_PCC) != 0))
+            pcc = 1;
 
         if (recover && uc)
             /* uc = 1, recover = 1, we need not panic.
diff -r af8d8408a8d2 -r 62ed4013bbf8 xen/arch/x86/cpu/mcheck/mce.h
--- a/xen/arch/x86/cpu/mcheck/mce.h     Mon May 09 11:40:42 2011 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.h     Mon May 09 11:42:45 2011 +0100
@@ -119,10 +119,9 @@
        uint32_t        errcnt; /* number of banks with valid errors */
        int             ripv;   /* meaningful on #MC */
        int             eipv;   /* meaningful on #MC */
-       uint32_t        uc;     /* bitmask of banks with UC */
-       uint32_t        pcc;    /* bitmask of banks with PCC */
-       /* bitmask of banks with software error recovery ability*/
-       uint32_t        recoverable; 
+       bool_t          uc;     /* UC flag */
+       bool_t          pcc;    /* PCC flag */
+       bool_t          recoverable; /* software error recoverable flag */
 };
 
 DECLARE_PER_CPU(struct mca_banks *, poll_bankmask);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86/mca: MCA bank extension, Xen patchbot-unstable <=