summaryrefslogtreecommitdiffstats
path: root/drivers/edac/mce_amd.h
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2010-09-22 16:08:37 +0200
committerBorislav Petkov <borislav.petkov@amd.com>2011-01-07 11:54:21 +0100
commit6245288232516aadf293f575d1812dafb4696aee (patch)
tree8ca69fb55bbc1556b75cc3cbc5cccc1bca4aa613 /drivers/edac/mce_amd.h
parentb8f85c477bdf1fec98ea7cbe952fdb5f40eb0aa7 (diff)
downloadop-kernel-dev-6245288232516aadf293f575d1812dafb4696aee.zip
op-kernel-dev-6245288232516aadf293f575d1812dafb4696aee.tar.gz
EDAC, MCE: Overhaul error fields extraction macros
Make macro names shorter thus making code shorter and more clear. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/mce_amd.h')
-rw-r--r--drivers/edac/mce_amd.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/edac/mce_amd.h b/drivers/edac/mce_amd.h
index 8398847..45dda47 100644
--- a/drivers/edac/mce_amd.h
+++ b/drivers/edac/mce_amd.h
@@ -7,8 +7,8 @@
#define BIT_64(n) (U64_C(1) << (n))
-#define ERROR_CODE(x) ((x) & 0xffff)
-#define EXT_ERROR_CODE(x) (((x) >> 16) & 0x1f)
+#define EC(x) ((x) & 0xffff)
+#define XEC(x, mask) (((x) >> 16) & mask)
#define LOW_SYNDROME(x) (((x) >> 15) & 0xff)
#define HIGH_SYNDROME(x) (((x) >> 24) & 0xff)
@@ -21,15 +21,15 @@
#define TT_MSG(x) tt_msgs[TT(x)]
#define II(x) (((x) >> 2) & 0x3)
#define II_MSG(x) ii_msgs[II(x)]
-#define LL(x) (((x) >> 0) & 0x3)
+#define LL(x) ((x) & 0x3)
#define LL_MSG(x) ll_msgs[LL(x)]
#define TO(x) (((x) >> 8) & 0x1)
#define TO_MSG(x) to_msgs[TO(x)]
#define PP(x) (((x) >> 9) & 0x3)
#define PP_MSG(x) pp_msgs[PP(x)]
-#define RRRR(x) (((x) >> 4) & 0xf)
-#define RRRR_MSG(x) ((RRRR(x) < 9) ? rrrr_msgs[RRRR(x)] : "Wrong R4!")
+#define R4(x) (((x) >> 4) & 0xf)
+#define R4_MSG(x) ((R4(x) < 9) ? rrrr_msgs[R4(x)] : "Wrong R4!")
#define K8_NBSH 0x4C
OpenPOWER on IntegriCloud