summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpi_extlog.c
diff options
context:
space:
mode:
authorChen, Gong <gong.chen@linux.intel.com>2014-06-11 08:34:51 (GMT)
committerTony Luck <tony.luck@intel.com>2014-06-25 20:27:26 (GMT)
commit7c76bb5f7a3d052339b873374333dd0dcc35ce28 (patch)
treed37e9133b755a9765436c9a45f4d7dbd2f16826b /drivers/acpi/acpi_extlog.c
parentd6cae935ec5b7873a8ccd8f0331bef2df729e86a (diff)
downloadlinux-7c76bb5f7a3d052339b873374333dd0dcc35ce28.tar.xz
RAS, extlog: Adjust init flow
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>
Diffstat (limited to 'drivers/acpi/acpi_extlog.c')
-rw-r--r--drivers/acpi/acpi_extlog.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index a99d4a6..0ad6f38 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -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);