ghes.h (3f8deab61ea86d738a1e7fdf95e9ad2bf08d14b8) ghes.h (802e7f1dfed7cc7fb309995e0c4138f08977fdfc)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef GHES_H
3#define GHES_H
4
5#include <acpi/apei.h>
6#include <acpi/hed.h>
7
8/*

--- 13 unchanged lines hidden (view full) ---

22 };
23 struct acpi_hest_generic_status *estatus;
24 unsigned long flags;
25 union {
26 struct list_head list;
27 struct timer_list timer;
28 unsigned int irq;
29 };
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef GHES_H
3#define GHES_H
4
5#include <acpi/apei.h>
6#include <acpi/hed.h>
7
8/*

--- 13 unchanged lines hidden (view full) ---

22 };
23 struct acpi_hest_generic_status *estatus;
24 unsigned long flags;
25 union {
26 struct list_head list;
27 struct timer_list timer;
28 unsigned int irq;
29 };
30 struct device *dev;
31 struct list_head elist;
30};
31
32struct ghes_estatus_node {
33 struct llist_node llnode;
34 struct acpi_hest_generic *generic;
35 struct ghes *ghes;
36
37 int task_work_cpu;

--- 26 unchanged lines hidden (view full) ---

64int ghes_register_vendor_record_notifier(struct notifier_block *nb);
65
66/**
67 * ghes_unregister_vendor_record_notifier - unregister the previously
68 * registered vendor record notifier.
69 * @nb: pointer to the notifier_block structure of the vendor record handler.
70 */
71void ghes_unregister_vendor_record_notifier(struct notifier_block *nb);
32};
33
34struct ghes_estatus_node {
35 struct llist_node llnode;
36 struct acpi_hest_generic *generic;
37 struct ghes *ghes;
38
39 int task_work_cpu;

--- 26 unchanged lines hidden (view full) ---

66int ghes_register_vendor_record_notifier(struct notifier_block *nb);
67
68/**
69 * ghes_unregister_vendor_record_notifier - unregister the previously
70 * registered vendor record notifier.
71 * @nb: pointer to the notifier_block structure of the vendor record handler.
72 */
73void ghes_unregister_vendor_record_notifier(struct notifier_block *nb);
72#endif
73
74
74int ghes_estatus_pool_init(unsigned int num_ghes);
75
76/* From drivers/edac/ghes_edac.c */
77
78#ifdef CONFIG_EDAC_GHES
79void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err);
80
81int ghes_edac_register(struct ghes *ghes, struct device *dev);
82
83void ghes_edac_unregister(struct ghes *ghes);
84
75struct list_head *ghes_get_devices(void);
85#else
76#else
86static inline void ghes_edac_report_mem_error(int sev,
87 struct cper_sec_mem_err *mem_err)
88{
89}
90
91static inline int ghes_edac_register(struct ghes *ghes, struct device *dev)
92{
93 return -ENODEV;
94}
95
96static inline void ghes_edac_unregister(struct ghes *ghes)
97{
98}
77static inline struct list_head *ghes_get_devices(void) { return NULL; }
99#endif
100
78#endif
79
80int ghes_estatus_pool_init(int num_ghes);
81
101static inline int acpi_hest_get_version(struct acpi_hest_generic_data *gdata)
102{
103 return gdata->revision >> 8;
104}
105
106static inline void *acpi_hest_get_payload(struct acpi_hest_generic_data *gdata)
107{
108 if (acpi_hest_get_version(gdata) >= 3)

--- 31 unchanged lines hidden (view full) ---

140 section = acpi_hest_get_next(section))
141
142#ifdef CONFIG_ACPI_APEI_SEA
143int ghes_notify_sea(void);
144#else
145static inline int ghes_notify_sea(void) { return -ENOENT; }
146#endif
147
82static inline int acpi_hest_get_version(struct acpi_hest_generic_data *gdata)
83{
84 return gdata->revision >> 8;
85}
86
87static inline void *acpi_hest_get_payload(struct acpi_hest_generic_data *gdata)
88{
89 if (acpi_hest_get_version(gdata) >= 3)

--- 31 unchanged lines hidden (view full) ---

121 section = acpi_hest_get_next(section))
122
123#ifdef CONFIG_ACPI_APEI_SEA
124int ghes_notify_sea(void);
125#else
126static inline int ghes_notify_sea(void) { return -ENOENT; }
127#endif
128
129struct notifier_block;
130extern void ghes_register_report_chain(struct notifier_block *nb);
131extern void ghes_unregister_report_chain(struct notifier_block *nb);
148#endif /* GHES_H */
132#endif /* GHES_H */