hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/edac/edac_device.h
....@@ -159,11 +159,9 @@
159159 /* Per instance controls for this edac_device */
160160 int log_ue; /* boolean for logging UEs */
161161 int log_ce; /* boolean for logging CEs */
162
- int panic_on_ce; /* boolean for panic'ing on an CE */
163162 int panic_on_ue; /* boolean for panic'ing on an UE */
164163 unsigned poll_msec; /* number of milliseconds to poll interval */
165164 unsigned long delay; /* number of jiffies for poll_msec */
166
- bool defer_work; /* Create a deferrable work for polling */
167165
168166 /* Additional top controller level attributes, but specified
169167 * by the low level driver.
....@@ -288,27 +286,60 @@
288286 extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev);
289287
290288 /**
291
- * edac_device_handle_ue():
292
- * perform a common output and handling of an 'edac_dev' UE event
289
+ * Log correctable errors.
293290 *
294291 * @edac_dev: pointer to struct &edac_device_ctl_info
295
- * @inst_nr: number of the instance where the UE error happened
296
- * @block_nr: number of the block where the UE error happened
292
+ * @inst_nr: number of the instance where the CE error happened
293
+ * @count: Number of errors to log.
294
+ * @block_nr: number of the block where the CE error happened
297295 * @msg: message to be printed
298296 */
299
-extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
300
- int inst_nr, int block_nr, const char *msg);
297
+void edac_device_handle_ce_count(struct edac_device_ctl_info *edac_dev,
298
+ unsigned int count, int inst_nr, int block_nr,
299
+ const char *msg);
300
+
301301 /**
302
- * edac_device_handle_ce():
303
- * perform a common output and handling of an 'edac_dev' CE event
302
+ * Log uncorrectable errors.
303
+ *
304
+ * @edac_dev: pointer to struct &edac_device_ctl_info
305
+ * @inst_nr: number of the instance where the CE error happened
306
+ * @count: Number of errors to log.
307
+ * @block_nr: number of the block where the CE error happened
308
+ * @msg: message to be printed
309
+ */
310
+void edac_device_handle_ue_count(struct edac_device_ctl_info *edac_dev,
311
+ unsigned int count, int inst_nr, int block_nr,
312
+ const char *msg);
313
+
314
+/**
315
+ * edac_device_handle_ce(): Log a single correctable error
304316 *
305317 * @edac_dev: pointer to struct &edac_device_ctl_info
306318 * @inst_nr: number of the instance where the CE error happened
307319 * @block_nr: number of the block where the CE error happened
308320 * @msg: message to be printed
309321 */
310
-extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
311
- int inst_nr, int block_nr, const char *msg);
322
+static inline void
323
+edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, int inst_nr,
324
+ int block_nr, const char *msg)
325
+{
326
+ edac_device_handle_ce_count(edac_dev, 1, inst_nr, block_nr, msg);
327
+}
328
+
329
+/**
330
+ * edac_device_handle_ue(): Log a single uncorrectable error
331
+ *
332
+ * @edac_dev: pointer to struct &edac_device_ctl_info
333
+ * @inst_nr: number of the instance where the UE error happened
334
+ * @block_nr: number of the block where the UE error happened
335
+ * @msg: message to be printed
336
+ */
337
+static inline void
338
+edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, int inst_nr,
339
+ int block_nr, const char *msg)
340
+{
341
+ edac_device_handle_ue_count(edac_dev, 1, inst_nr, block_nr, msg);
342
+}
312343
313344 /**
314345 * edac_device_alloc_index: Allocate a unique device index number
....@@ -318,5 +349,4 @@
318349 */
319350 extern int edac_device_alloc_index(void);
320351 extern const char *edac_layer_name[];
321
-
322352 #endif