|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/mcheck: Minor cleanup to amd_nonfatal
commit 2310da993bca1d9101804cbaf2817f38a38b6510
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue Aug 15 15:14:08 2017 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Aug 16 18:21:32 2017 +0100
x86/mcheck: Minor cleanup to amd_nonfatal
* Drop trailing whitespace.
* Move amd_nonfatal_mcheck_init() into .init.text and drop a trailing
return.
* Drop unnecessary wmb()'s. Because of Xen's implementation, they are
only
compiler barriers anyway, and each wrmsr() is already fully serialising.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/cpu/mcheck/amd_nonfatal.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/xen/arch/x86/cpu/mcheck/amd_nonfatal.c
b/xen/arch/x86/cpu/mcheck/amd_nonfatal.c
index c6a9c89..222f539 100644
--- a/xen/arch/x86/cpu/mcheck/amd_nonfatal.c
+++ b/xen/arch/x86/cpu/mcheck/amd_nonfatal.c
@@ -106,7 +106,7 @@ static void mce_amd_checkregs(void *info)
} else {
mctelem_dismiss(mctc);
}
-
+
} else if (mctc != NULL) {
mctelem_dismiss(mctc);
}
@@ -151,7 +151,7 @@ static void mce_amd_work_fn(void *data)
/* HW does not count *all* kinds of correctable errors.
* Thus it is possible, that the polling routine finds an
- * correctable error even if the HW reports nothing. */
+ * correctable error even if the HW reports nothing. */
if (counter > 0) {
/* HW reported correctable errors,
* the polling routine did not find...
@@ -164,8 +164,8 @@ static void mce_amd_work_fn(void *data)
(counter == 1 ? "" : "s"),
(counter == 1 ? "was" : "were"));
}
- /* subtract 1 to not double count the error
- * from the polling service routine */
+ /* subtract 1 to not double count the error
+ * from the polling service routine */
adjust += (counter - 1);
/* Restart counter */
@@ -174,7 +174,6 @@ static void mce_amd_work_fn(void *data)
/* Counter enable */
value |= (1ULL << 51);
mca_wrmsr(MSR_IA32_MCx_MISC(4), value);
- wmb();
}
}
@@ -202,7 +201,7 @@ static void mce_amd_work_fn(void *data)
adjust = 0;
}
-void amd_nonfatal_mcheck_init(struct cpuinfo_x86 *c)
+void __init amd_nonfatal_mcheck_init(struct cpuinfo_x86 *c)
{
if (c->x86_vendor != X86_VENDOR_AMD)
return;
@@ -238,14 +237,10 @@ void amd_nonfatal_mcheck_init(struct cpuinfo_x86 *c)
/* Counter enable */
value |= (1ULL << 51);
wrmsrl(MSR_IA32_MCx_MISC(4), value);
- /* serialize */
- wmb();
printk(XENLOG_INFO "MCA: Use hw thresholding to adjust
polling frequency\n");
}
}
init_timer(&mce_timer, mce_amd_work_fn, NULL, 0);
set_timer(&mce_timer, NOW() + period);
-
- return;
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |