diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2010-09-06 18:13:39 +0200 |
---|---|---|
committer | Borislav Petkov <bp@amd64.org> | 2010-10-21 14:47:58 +0200 |
commit | 6337583d7dc0dced36ab98dd63de2389c95c22d9 (patch) | |
tree | 446bc36e340eb1d264e99b75469632b21ef71a1c /drivers/edac/edac_mce_amd.h | |
parent | 0ee8efa8f4672ce35ee370291c0f21d7b87b1e3f (diff) | |
download | op-kernel-dev-6337583d7dc0dced36ab98dd63de2389c95c22d9.zip op-kernel-dev-6337583d7dc0dced36ab98dd63de2389c95c22d9.tar.gz |
EDAC, MCE: Sanitize error codes
Clean up error codes names, shorten to mnemonics, add RRRR boundary
checking.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/edac_mce_amd.h')
-rw-r--r-- | drivers/edac/edac_mce_amd.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/edac/edac_mce_amd.h b/drivers/edac/edac_mce_amd.h index 8920133..2ee499d 100644 --- a/drivers/edac/edac_mce_amd.h +++ b/drivers/edac/edac_mce_amd.h @@ -20,13 +20,14 @@ #define II_MSG(x) ii_msgs[II(x)] #define LL(x) (((x) >> 0) & 0x3) #define LL_MSG(x) ll_msgs[LL(x)] -#define RRRR(x) (((x) >> 4) & 0xf) -#define RRRR_MSG(x) rrrr_msgs[RRRR(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 K8_NBSH 0x4C #define K8_NBSH_VALID_BIT BIT(31) |