RAS, extlog: Adjust init flow
authorChen, Gong <gong.chen@linux.intel.com>
Wed, 11 Jun 2014 08:34:51 +0000 (04:34 -0400)
committerTony Luck <tony.luck@intel.com>
Wed, 25 Jun 2014 20:27:26 +0000 (13:27 -0700)
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>
drivers/acpi/acpi_extlog.c

index a99d4a6156dcacaab5770fce845f88a2fa7a7766..0ad6f389d922641eda699bd878d99d89d3a98107 100644 (file)
@@ -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);