amd64_edac: cleanup amd64_process_error_info
[safe/jmp/linux-2.6] / drivers / edac / edac_mce_amd.h
1 #define ERROR_CODE(x)                   ((x) & 0xffff)
2 #define EXT_ERROR_CODE(x)               (((x) >> 16) & 0x1f)
3 #define LOW_SYNDROME(x)                 (((x) >> 15) & 0xff)
4 #define HIGH_SYNDROME(x)                (((x) >> 24) & 0xff)
5
6 #define TLB_ERROR(x)                    (((x) & 0xFFF0) == 0x0010)
7 #define MEM_ERROR(x)                    (((x) & 0xFF00) == 0x0100)
8 #define BUS_ERROR(x)                    (((x) & 0xF800) == 0x0800)
9
10 #define TT(x)                           (((x) >> 2) & 0x3)
11 #define TT_MSG(x)                       tt_msgs[TT(x)]
12 #define II(x)                           (((x) >> 2) & 0x3)
13 #define II_MSG(x)                       ii_msgs[II(x)]
14 #define LL(x)                           (((x) >> 0) & 0x3)
15 #define LL_MSG(x)                       ll_msgs[LL(x)]
16 #define RRRR(x)                         (((x) >> 4) & 0xf)
17 #define RRRR_MSG(x)                     rrrr_msgs[RRRR(x)]
18 #define TO(x)                           (((x) >> 8) & 0x1)
19 #define TO_MSG(x)                       to_msgs[TO(x)]
20 #define PP(x)                           (((x) >> 9) & 0x3)
21 #define PP_MSG(x)                       pp_msgs[PP(x)]
22
23 extern const char *tt_msgs[];
24 extern const char *ll_msgs[];
25 extern const char *rrrr_msgs[];
26 extern const char *pp_msgs[];
27 extern const char *to_msgs[];
28 extern const char *ii_msgs[];
29 extern const char *ext_msgs[];