aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/cper.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-06-03 04:32:53 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-16 16:33:50 -0400
commit0a00fd5e20fd5dc89e976e163588d7c54edaf745 (patch)
treee12e67e1d1386e7fde439865c4c29ed06ffc2510 /drivers/firmware/efi/cper.c
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
ACPICA: Restore error table definitions to reduce code differences between Linux and ACPICA upstream.
The following commit has changed ACPICA table header definitions: Commit: 88f074f4871a8c212b212b725e4dcdcdb09613c1 Subject: ACPI, CPER: Update cper info While such definitions are currently maintained in ACPICA. As the modifications applying to the table definitions affect other OSPMs' drivers, it is very difficult for ACPICA to initiate a process to complete the merge. Thus this commit finally only leaves us divergences. Revert such naming modifications to reduce the source code differecnes between Linux and ACPICA upstream. No functional changes. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Cc: Bob Moore <robert.moore@intel.com> Cc: Chen, Gong <gong.chen@linux.intel.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Borislav Petkov <bp@alien8.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/firmware/efi/cper.c')
-rw-r--r--drivers/firmware/efi/cper.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index 1491dd4f08f9..65f2f3fdde24 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -262,7 +262,7 @@ static const char *cper_pcie_port_type_strs[] = {
262}; 262};
263 263
264static void cper_print_pcie(const char *pfx, const struct cper_sec_pcie *pcie, 264static void cper_print_pcie(const char *pfx, const struct cper_sec_pcie *pcie,
265 const struct acpi_generic_data *gdata) 265 const struct acpi_hest_generic_data *gdata)
266{ 266{
267 if (pcie->validation_bits & CPER_PCIE_VALID_PORT_TYPE) 267 if (pcie->validation_bits & CPER_PCIE_VALID_PORT_TYPE)
268 printk("%s""port_type: %d, %s\n", pfx, pcie->port_type, 268 printk("%s""port_type: %d, %s\n", pfx, pcie->port_type,
@@ -298,7 +298,7 @@ static void cper_print_pcie(const char *pfx, const struct cper_sec_pcie *pcie,
298} 298}
299 299
300static void cper_estatus_print_section( 300static void cper_estatus_print_section(
301 const char *pfx, const struct acpi_generic_data *gdata, int sec_no) 301 const char *pfx, const struct acpi_hest_generic_data *gdata, int sec_no)
302{ 302{
303 uuid_le *sec_type = (uuid_le *)gdata->section_type; 303 uuid_le *sec_type = (uuid_le *)gdata->section_type;
304 __u16 severity; 304 __u16 severity;
@@ -344,9 +344,9 @@ err_section_too_small:
344} 344}
345 345
346void cper_estatus_print(const char *pfx, 346void cper_estatus_print(const char *pfx,
347 const struct acpi_generic_status *estatus) 347 const struct acpi_hest_generic_status *estatus)
348{ 348{
349 struct acpi_generic_data *gdata; 349 struct acpi_hest_generic_data *gdata;
350 unsigned int data_len, gedata_len; 350 unsigned int data_len, gedata_len;
351 int sec_no = 0; 351 int sec_no = 0;
352 char newpfx[64]; 352 char newpfx[64];
@@ -359,7 +359,7 @@ void cper_estatus_print(const char *pfx,
359 "and requires no further action"); 359 "and requires no further action");
360 printk("%s""event severity: %s\n", pfx, cper_severity_str(severity)); 360 printk("%s""event severity: %s\n", pfx, cper_severity_str(severity));
361 data_len = estatus->data_length; 361 data_len = estatus->data_length;
362 gdata = (struct acpi_generic_data *)(estatus + 1); 362 gdata = (struct acpi_hest_generic_data *)(estatus + 1);
363 snprintf(newpfx, sizeof(newpfx), "%s%s", pfx, INDENT_SP); 363 snprintf(newpfx, sizeof(newpfx), "%s%s", pfx, INDENT_SP);
364 while (data_len >= sizeof(*gdata)) { 364 while (data_len >= sizeof(*gdata)) {
365 gedata_len = gdata->error_data_length; 365 gedata_len = gdata->error_data_length;
@@ -371,10 +371,10 @@ void cper_estatus_print(const char *pfx,
371} 371}
372EXPORT_SYMBOL_GPL(cper_estatus_print); 372EXPORT_SYMBOL_GPL(cper_estatus_print);
373 373
374int cper_estatus_check_header(const struct acpi_generic_status *estatus) 374int cper_estatus_check_header(const struct acpi_hest_generic_status *estatus)
375{ 375{
376 if (estatus->data_length && 376 if (estatus->data_length &&
377 estatus->data_length < sizeof(struct acpi_generic_data)) 377 estatus->data_length < sizeof(struct acpi_hest_generic_data))
378 return -EINVAL; 378 return -EINVAL;
379 if (estatus->raw_data_length && 379 if (estatus->raw_data_length &&
380 estatus->raw_data_offset < sizeof(*estatus) + estatus->data_length) 380 estatus->raw_data_offset < sizeof(*estatus) + estatus->data_length)
@@ -384,9 +384,9 @@ int cper_estatus_check_header(const struct acpi_generic_status *estatus)
384} 384}
385EXPORT_SYMBOL_GPL(cper_estatus_check_header); 385EXPORT_SYMBOL_GPL(cper_estatus_check_header);
386 386
387int cper_estatus_check(const struct acpi_generic_status *estatus) 387int cper_estatus_check(const struct acpi_hest_generic_status *estatus)
388{ 388{
389 struct acpi_generic_data *gdata; 389 struct acpi_hest_generic_data *gdata;
390 unsigned int data_len, gedata_len; 390 unsigned int data_len, gedata_len;
391 int rc; 391 int rc;
392 392
@@ -394,7 +394,7 @@ int cper_estatus_check(const struct acpi_generic_status *estatus)
394 if (rc) 394 if (rc)
395 return rc; 395 return rc;
396 data_len = estatus->data_length; 396 data_len = estatus->data_length;
397 gdata = (struct acpi_generic_data *)(estatus + 1); 397 gdata = (struct acpi_hest_generic_data *)(estatus + 1);
398 while (data_len >= sizeof(*gdata)) { 398 while (data_len >= sizeof(*gdata)) {
399 gedata_len = gdata->error_data_length; 399 gedata_len = gdata->error_data_length;
400 if (gedata_len > data_len - sizeof(*gdata)) 400 if (gedata_len > data_len - sizeof(*gdata))