Skip to content

Commit

Permalink
RAS, extlog: Adjust init flow
Browse files Browse the repository at this point in the history
Unless the platform has eMCA related capability, don't
need to check if there is conflict with EDAC driver.

Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Chen, Gong authored and Tony Luck committed Jun 25, 2014
1 parent d6cae93 commit 7c76bb5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions drivers/acpi/acpi_extlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,19 +223,16 @@ static int __init extlog_init(void)
u64 cap;
int rc;

rdmsrl(MSR_IA32_MCG_CAP, cap);

if (!(cap & MCG_ELOG_P) || !extlog_get_l1addr())
return -ENODEV;

if (get_edac_report_status() == EDAC_REPORTING_FORCE) {
pr_warn("Not loading eMCA, error reporting force-enabled through EDAC.\n");
return -EPERM;
}

rc = -ENODEV;
rdmsrl(MSR_IA32_MCG_CAP, cap);
if (!(cap & MCG_ELOG_P))
return rc;

if (!extlog_get_l1addr())
return rc;

rc = -EINVAL;
/* get L1 header to fetch necessary information */
l1_hdr_size = sizeof(struct extlog_l1_head);
Expand Down

0 comments on commit 7c76bb5

Please sign in to comment.