Lines Matching refs:hest_hdr
52 static inline bool is_generic_error(struct acpi_hest_header *hest_hdr) in is_generic_error() argument
54 return hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR || in is_generic_error()
55 hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2; in is_generic_error()
58 static int hest_esrc_len(struct acpi_hest_header *hest_hdr) in hest_esrc_len() argument
60 u16 hest_type = hest_hdr->type; in hest_esrc_len()
70 cmc = (struct acpi_hest_ia_corrected *)hest_hdr; in hest_esrc_len()
75 mc = (struct acpi_hest_ia_machine_check *)hest_hdr; in hest_esrc_len()
80 mc = (struct acpi_hest_ia_deferred_check *)hest_hdr; in hest_esrc_len()
89 typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
93 struct acpi_hest_header *hest_hdr; in apei_hest_parse() local
99 hest_hdr = (struct acpi_hest_header *)(hest_tab + 1); in apei_hest_parse()
101 len = hest_esrc_len(hest_hdr); in apei_hest_parse()
106 hest_hdr->type, hest_hdr->source_id); in apei_hest_parse()
109 if ((void *)hest_hdr + len > in apei_hest_parse()
113 hest_hdr->source_id); in apei_hest_parse()
117 rc = func(hest_hdr, data); in apei_hest_parse()
121 hest_hdr = (void *)hest_hdr + len; in apei_hest_parse()
131 static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data) in hest_parse_cmc() argument
133 if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) in hest_parse_cmc()
137 return !arch_apei_enable_cmcff(hest_hdr, data); in hest_parse_cmc()
147 static int __init hest_parse_ghes_count(struct acpi_hest_header *hest_hdr, void *data) in hest_parse_ghes_count() argument
151 if (is_generic_error(hest_hdr)) in hest_parse_ghes_count()
156 static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data) in hest_parse_ghes() argument
162 if (!is_generic_error(hest_hdr)) in hest_parse_ghes()
165 if (!((struct acpi_hest_generic *)hest_hdr)->enabled) in hest_parse_ghes()
171 if (hdr->source_id == hest_hdr->source_id) { in hest_parse_ghes()
177 ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id); in hest_parse_ghes()
181 rc = platform_device_add_data(ghes_dev, &hest_hdr, sizeof(void *)); in hest_parse_ghes()