Commit b7fe9299 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Christoph Hellwig

ACPI / extlog: Switch to use new generic UUID API

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent dfcaad8f
...@@ -141,9 +141,9 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, ...@@ -141,9 +141,9 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
int cpu = mce->extcpu; int cpu = mce->extcpu;
struct acpi_hest_generic_status *estatus, *tmp; struct acpi_hest_generic_status *estatus, *tmp;
struct acpi_hest_generic_data *gdata; struct acpi_hest_generic_data *gdata;
const uuid_le *fru_id = &NULL_UUID_LE; const guid_t *fru_id = &guid_null;
char *fru_text = ""; char *fru_text = "";
uuid_le *sec_type; guid_t *sec_type;
static u32 err_seq; static u32 err_seq;
estatus = extlog_elog_entry_check(cpu, bank); estatus = extlog_elog_entry_check(cpu, bank);
...@@ -165,11 +165,11 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, ...@@ -165,11 +165,11 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
err_seq++; err_seq++;
gdata = (struct acpi_hest_generic_data *)(tmp + 1); gdata = (struct acpi_hest_generic_data *)(tmp + 1);
if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID) if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID)
fru_id = (uuid_le *)gdata->fru_id; fru_id = (guid_t *)gdata->fru_id;
if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT) if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT)
fru_text = gdata->fru_text; fru_text = gdata->fru_text;
sec_type = (uuid_le *)gdata->section_type; sec_type = (guid_t *)gdata->section_type;
if (!uuid_le_cmp(*sec_type, CPER_SEC_PLATFORM_MEM)) { if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
struct cper_sec_mem_err *mem = (void *)(gdata + 1); struct cper_sec_mem_err *mem = (void *)(gdata + 1);
if (gdata->error_data_length >= sizeof(*mem)) if (gdata->error_data_length >= sizeof(*mem))
trace_extlog_mem_event(mem, err_seq, fru_id, fru_text, trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
...@@ -182,17 +182,17 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, ...@@ -182,17 +182,17 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
static bool __init extlog_get_l1addr(void) static bool __init extlog_get_l1addr(void)
{ {
u8 uuid[16]; guid_t guid;
acpi_handle handle; acpi_handle handle;
union acpi_object *obj; union acpi_object *obj;
acpi_str_to_uuid(extlog_dsm_uuid, uuid); if (guid_parse(extlog_dsm_uuid, &guid))
return false;
if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))) if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
return false; return false;
if (!acpi_check_dsm(handle, uuid, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR)) if (!acpi_check_dsm(handle, guid.b, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
return false; return false;
obj = acpi_evaluate_dsm_typed(handle, uuid, EXTLOG_DSM_REV, obj = acpi_evaluate_dsm_typed(handle, guid.b, EXTLOG_DSM_REV,
EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER); EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER);
if (!obj) { if (!obj) {
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment