forked from mchehab/rasdaemon
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ras-report.h
114 lines (104 loc) · 4.11 KB
/
ras-report.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
*/
#ifndef __RAS_REPORT_H
#define __RAS_REPORT_H
#include "ras-aer-handler.h"
#include "ras-events.h"
#include "ras-mce-handler.h"
#include "ras-mc-handler.h"
#include "ras-record.h"
#include "types.h"
/* Maximal length of backtrace. */
#define MAX_BACKTRACE_SIZE (1024 * 1024)
/* Amount of data received from one client for a message before reporting error. */
#define MAX_MESSAGE_SIZE (4 * MAX_BACKTRACE_SIZE)
/* Maximal number of characters read from socket at once. */
#define INPUT_BUFFER_SIZE (8 * 1024)
/* ABRT socket file */
#define ABRT_SOCKET "/var/run/abrt/abrt.socket"
#ifdef HAVE_ABRT_REPORT
int ras_report_mc_event(struct ras_events *ras,
struct ras_mc_event *ev);
int ras_report_aer_event(struct ras_events *ras,
struct ras_aer_event *ev);
int ras_report_mce_event(struct ras_events *ras,
struct mce_event *ev);
int ras_report_non_standard_event(struct ras_events *ras,
struct ras_non_standard_event *ev);
int ras_report_arm_event(struct ras_events *ras,
struct ras_arm_event *ev);
int ras_report_devlink_event(struct ras_events *ras,
struct devlink_event *ev);
int ras_report_diskerror_event(struct ras_events *ras,
struct diskerror_event *ev);
int ras_report_mf_event(struct ras_events *ras,
struct ras_mf_event *ev);
int ras_report_cxl_poison_event(struct ras_events *ras,
struct ras_cxl_poison_event *ev);
int ras_report_cxl_aer_ue_event(struct ras_events *ras,
struct ras_cxl_aer_ue_event *ev);
int ras_report_cxl_aer_ce_event(struct ras_events *ras,
struct ras_cxl_aer_ce_event *ev);
int ras_report_cxl_overflow_event(struct ras_events *ras,
struct ras_cxl_overflow_event *ev);
int ras_report_cxl_generic_event(struct ras_events *ras,
struct ras_cxl_generic_event *ev);
int ras_report_cxl_general_media_event(struct ras_events *ras,
struct ras_cxl_general_media_event *ev);
int ras_report_cxl_dram_event(struct ras_events *ras,
struct ras_cxl_dram_event *ev);
int ras_report_cxl_memory_module_event(struct ras_events *ras,
struct ras_cxl_memory_module_event *ev);
#else
static inline int ras_report_mc_event(struct ras_events *ras,
struct ras_mc_event *ev)
{ return 0; };
static inline int ras_report_aer_event(struct ras_events *ras,
struct ras_aer_event *ev)
{ return 0; };
static inline int ras_report_mce_event(struct ras_events *ras,
struct mce_event *ev)
{ return 0; };
static inline int ras_report_non_standard_event(struct ras_events *ras,
struct ras_non_standard_event *ev)
{ return 0; };
static inline int ras_report_arm_event(struct ras_events *ras,
struct ras_arm_event *ev)
{ return 0; };
static inline int ras_report_devlink_event(struct ras_events *ras,
struct devlink_event *ev)
{ return 0; };
static inline int ras_report_diskerror_event(struct ras_events *ras,
struct diskerror_event *ev)
{ return 0; };
static inline int ras_report_mf_event(struct ras_events *ras,
struct ras_mf_event *ev)
{ return 0; };
static inline int ras_report_cxl_poison_event(struct ras_events *ras,
struct ras_cxl_poison_event *ev)
{ return 0; };
static inline int ras_report_cxl_aer_ue_event(struct ras_events *ras,
struct ras_cxl_aer_ue_event *ev)
{ return 0; };
static inline int ras_report_cxl_aer_ce_event(struct ras_events *ras,
struct ras_cxl_aer_ce_event *ev)
{ return 0; };
static inline int ras_report_cxl_overflow_event(struct ras_events *ras,
struct ras_cxl_overflow_event *ev)
{ return 0; };
static inline int ras_report_cxl_generic_event(struct ras_events *ras,
struct ras_cxl_generic_event *ev)
{ return 0; };
static inline int ras_report_cxl_general_media_event(struct ras_events *ras,
struct ras_cxl_general_media_event *ev)
{ return 0; };
static inline int ras_report_cxl_dram_event(struct ras_events *ras,
struct ras_cxl_dram_event *ev)
{ return 0; };
static inline int ras_report_cxl_memory_module_event(struct ras_events *ras,
struct ras_cxl_memory_module_event *ev)
{ return 0; };
#endif
#endif