diff options
author | Chen, Gong <gong.chen@linux.intel.com> | 2014-06-11 04:34:51 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2014-06-25 16:27:26 -0400 |
commit | 7c76bb5f7a3d052339b873374333dd0dcc35ce28 (patch) | |
tree | d37e9133b755a9765436c9a45f4d7dbd2f16826b | |
parent | d6cae935ec5b7873a8ccd8f0331bef2df729e86a (diff) |
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>
-rw-r--r-- | drivers/acpi/acpi_extlog.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c index a99d4a6156dc..0ad6f389d922 100644 --- a/drivers/acpi/acpi_extlog.c +++ b/drivers/acpi/acpi_extlog.c | |||
@@ -223,19 +223,16 @@ static int __init extlog_init(void) | |||
223 | u64 cap; | 223 | u64 cap; |
224 | int rc; | 224 | int rc; |
225 | 225 | ||
226 | rdmsrl(MSR_IA32_MCG_CAP, cap); | ||
227 | |||
228 | if (!(cap & MCG_ELOG_P) || !extlog_get_l1addr()) | ||
229 | return -ENODEV; | ||
230 | |||
226 | if (get_edac_report_status() == EDAC_REPORTING_FORCE) { | 231 | if (get_edac_report_status() == EDAC_REPORTING_FORCE) { |
227 | pr_warn("Not loading eMCA, error reporting force-enabled through EDAC.\n"); | 232 | pr_warn("Not loading eMCA, error reporting force-enabled through EDAC.\n"); |
228 | return -EPERM; | 233 | return -EPERM; |
229 | } | 234 | } |
230 | 235 | ||
231 | rc = -ENODEV; | ||
232 | rdmsrl(MSR_IA32_MCG_CAP, cap); | ||
233 | if (!(cap & MCG_ELOG_P)) | ||
234 | return rc; | ||
235 | |||
236 | if (!extlog_get_l1addr()) | ||
237 | return rc; | ||
238 | |||
239 | rc = -EINVAL; | 236 | rc = -EINVAL; |
240 | /* get L1 header to fetch necessary information */ | 237 | /* get L1 header to fetch necessary information */ |
241 | l1_hdr_size = sizeof(struct extlog_l1_head); | 238 | l1_hdr_size = sizeof(struct extlog_l1_head); |