Go to the documentation of this file.
12 #ifndef _LINUX_EDAC_H_
13 #define _LINUX_EDAC_H_
16 #include <linux/device.h>
24 #define EDAC_OPSTATE_INVAL -1
25 #define EDAC_OPSTATE_POLL 0
26 #define EDAC_OPSTATE_NMI 1
27 #define EDAC_OPSTATE_INT 2
39 static inline void opstate_init(
void)
51 #define EDAC_MC_LABEL_LEN 31
52 #define MC_PROC_NAME_MAX_LEN 7
78 #define DEV_FLAG_UNKNOWN BIT(DEV_UNKNOWN)
79 #define DEV_FLAG_X1 BIT(DEV_X1)
80 #define DEV_FLAG_X2 BIT(DEV_X2)
81 #define DEV_FLAG_X4 BIT(DEV_X4)
82 #define DEV_FLAG_X8 BIT(DEV_X8)
83 #define DEV_FLAG_X16 BIT(DEV_X16)
84 #define DEV_FLAG_X32 BIT(DEV_X32)
85 #define DEV_FLAG_X64 BIT(DEV_X64)
166 #define MEM_FLAG_EMPTY BIT(MEM_EMPTY)
167 #define MEM_FLAG_RESERVED BIT(MEM_RESERVED)
168 #define MEM_FLAG_UNKNOWN BIT(MEM_UNKNOWN)
169 #define MEM_FLAG_FPM BIT(MEM_FPM)
170 #define MEM_FLAG_EDO BIT(MEM_EDO)
171 #define MEM_FLAG_BEDO BIT(MEM_BEDO)
172 #define MEM_FLAG_SDR BIT(MEM_SDR)
173 #define MEM_FLAG_RDR BIT(MEM_RDR)
174 #define MEM_FLAG_DDR BIT(MEM_DDR)
175 #define MEM_FLAG_RDDR BIT(MEM_RDDR)
176 #define MEM_FLAG_RMBS BIT(MEM_RMBS)
177 #define MEM_FLAG_DDR2 BIT(MEM_DDR2)
178 #define MEM_FLAG_FB_DDR2 BIT(MEM_FB_DDR2)
179 #define MEM_FLAG_RDDR2 BIT(MEM_RDDR2)
180 #define MEM_FLAG_XDR BIT(MEM_XDR)
181 #define MEM_FLAG_DDR3 BIT(MEM_DDR3)
182 #define MEM_FLAG_RDDR3 BIT(MEM_RDDR3)
210 #define EDAC_FLAG_UNKNOWN BIT(EDAC_UNKNOWN)
211 #define EDAC_FLAG_NONE BIT(EDAC_NONE)
212 #define EDAC_FLAG_PARITY BIT(EDAC_PARITY)
213 #define EDAC_FLAG_EC BIT(EDAC_EC)
214 #define EDAC_FLAG_SECDED BIT(EDAC_SECDED)
215 #define EDAC_FLAG_S2ECD2ED BIT(EDAC_S2ECD2ED)
216 #define EDAC_FLAG_S4ECD4ED BIT(EDAC_S4ECD4ED)
217 #define EDAC_FLAG_S8ECD8ED BIT(EDAC_S8ECD8ED)
218 #define EDAC_FLAG_S16ECD16ED BIT(EDAC_S16ECD16ED)
246 #define SCRUB_FLAG_SW_PROG BIT(SCRUB_SW_PROG)
247 #define SCRUB_FLAG_SW_SRC BIT(SCRUB_SW_SRC)
248 #define SCRUB_FLAG_SW_PROG_SRC BIT(SCRUB_SW_PROG_SRC)
249 #define SCRUB_FLAG_SW_TUN BIT(SCRUB_SW_SCRUB_TUNABLE)
250 #define SCRUB_FLAG_HW_PROG BIT(SCRUB_HW_PROG)
251 #define SCRUB_FLAG_HW_SRC BIT(SCRUB_HW_SRC)
252 #define SCRUB_FLAG_HW_PROG_SRC BIT(SCRUB_HW_PROG_SRC)
253 #define SCRUB_FLAG_HW_TUN BIT(SCRUB_HW_TUNABLE)
258 #define OP_ALLOC 0x100
259 #define OP_RUNNING_POLL 0x201
260 #define OP_RUNNING_INTERRUPT 0x202
261 #define OP_RUNNING_POLL_INTR 0x203
262 #define OP_OFFLINE 0x300
412 #define EDAC_MAX_LAYERS 3
437 #define EDAC_DIMM_OFF(layers, nlayers, layer0, layer1, layer2) ({ \
439 if ((nlayers) == 1) \
441 else if ((nlayers) == 2) \
442 __i = (layer1) + ((layers[1]).size * (layer0)); \
443 else if ((nlayers) == 3) \
444 __i = (layer2) + ((layers[2]).size * ((layer1) + \
445 ((layers[1]).size * (layer0)))); \
470 #define EDAC_DIMM_PTR(layers, var, nlayers, layer0, layer1, layer2) ({ \
472 int ___i = EDAC_DIMM_OFF(layers, nlayers, layer0, layer1, layer2); \
664 #ifdef CONFIG_EDAC_DEBUG
668 u16 fake_inject_count;