diff options
Diffstat (limited to 'drivers/acpi/apei/apei-internal.h')
-rw-r--r-- | drivers/acpi/apei/apei-internal.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/acpi/apei/apei-internal.h b/drivers/acpi/apei/apei-internal.h index 86e041a42c44..18df1e940276 100644 --- a/drivers/acpi/apei/apei-internal.h +++ b/drivers/acpi/apei/apei-internal.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef APEI_INTERNAL_H | 6 | #ifndef APEI_INTERNAL_H |
7 | #define APEI_INTERNAL_H | 7 | #define APEI_INTERNAL_H |
8 | 8 | ||
9 | #include <linux/cper.h> | ||
10 | |||
9 | struct apei_exec_context; | 11 | struct apei_exec_context; |
10 | 12 | ||
11 | typedef int (*apei_exec_ins_func_t)(struct apei_exec_context *ctx, | 13 | typedef int (*apei_exec_ins_func_t)(struct apei_exec_context *ctx, |
@@ -92,4 +94,21 @@ int apei_exec_collect_resources(struct apei_exec_context *ctx, | |||
92 | 94 | ||
93 | struct dentry; | 95 | struct dentry; |
94 | struct dentry *apei_get_debugfs_dir(void); | 96 | struct dentry *apei_get_debugfs_dir(void); |
97 | |||
98 | #define apei_estatus_for_each_section(estatus, section) \ | ||
99 | for (section = (struct acpi_hest_generic_data *)(estatus + 1); \ | ||
100 | (void *)section - (void *)estatus < estatus->data_length; \ | ||
101 | section = (void *)(section+1) + section->error_data_length) | ||
102 | |||
103 | static inline u32 apei_estatus_len(struct acpi_hest_generic_status *estatus) | ||
104 | { | ||
105 | if (estatus->raw_data_length) | ||
106 | return estatus->raw_data_offset + \ | ||
107 | estatus->raw_data_length; | ||
108 | else | ||
109 | return sizeof(*estatus) + estatus->data_length; | ||
110 | } | ||
111 | |||
112 | int apei_estatus_check_header(const struct acpi_hest_generic_status *estatus); | ||
113 | int apei_estatus_check(const struct acpi_hest_generic_status *estatus); | ||
95 | #endif | 114 | #endif |