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 eb4505f8dd97 xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c Wed Apr 20 12:02:51 2011 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c Wed Apr 27 15:29:31 2011 +0800
@@ -246,7 +246,8 @@ mctelem_cookie_t mcheck_mca_logout(enum
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 @@ mctelem_cookie_t mcheck_mca_logout(enum
*/
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 @@ mctelem_cookie_t mcheck_mca_logout(enum
}
}
- /* 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 eb4505f8dd97 xen/arch/x86/cpu/mcheck/mce.h
--- a/xen/arch/x86/cpu/mcheck/mce.h Wed Apr 20 12:02:51 2011 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.h Wed Apr 27 15:29:31 2011 +0800
@@ -119,10 +119,9 @@ struct mca_summary {
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);
mca-cleanup-1.patch
Description: mca-cleanup-1.patch
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|