|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/MCE: consolidate AMD initialization
# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1351519475 -3600
# Node ID f9ded6e9e554b66ff6d8a0181f70e1dca2517e90
# Parent 37a8946eeb9db8b5eafc1c75aded006ad5322af8
x86/MCE: consolidate AMD initialization
Move AMD specific initialization to AMD files.
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
diff -r 37a8946eeb9d -r f9ded6e9e554 xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c Fri Oct 26 16:09:29 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c Mon Oct 29 15:04:35 2012 +0100
@@ -560,30 +560,6 @@ void mcheck_mca_clearbanks(struct mca_ba
}
}
-static enum mcheck_type amd_mcheck_init(struct cpuinfo_x86 *ci)
-{
- enum mcheck_type rc = mcheck_none;
-
- switch (ci->x86) {
- case 6:
- rc = amd_k7_mcheck_init(ci);
- break;
-
- default:
- /* Assume that machine check support is available.
- * The minimum provided support is at least the K8. */
- case 0xf:
- rc = amd_k8_mcheck_init(ci);
- break;
-
- case 0x10 ... 0x17:
- rc = amd_f10_mcheck_init(ci);
- break;
- }
-
- return rc;
-}
-
/*check the existence of Machine Check*/
int mce_available(struct cpuinfo_x86 *c)
{
diff -r 37a8946eeb9d -r f9ded6e9e554 xen/arch/x86/cpu/mcheck/mce.h
--- a/xen/arch/x86/cpu/mcheck/mce.h Fri Oct 26 16:09:29 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.h Mon Oct 29 15:04:35 2012 +0100
@@ -39,10 +39,7 @@ enum mcheck_type {
};
/* Init functions */
-enum mcheck_type amd_k7_mcheck_init(struct cpuinfo_x86 *c);
-enum mcheck_type amd_k8_mcheck_init(struct cpuinfo_x86 *c);
-enum mcheck_type amd_f10_mcheck_init(struct cpuinfo_x86 *c);
-
+enum mcheck_type amd_mcheck_init(struct cpuinfo_x86 *c);
enum mcheck_type intel_mcheck_init(struct cpuinfo_x86 *c, bool_t bsp);
void intel_mcheck_timer(struct cpuinfo_x86 *c);
diff -r 37a8946eeb9d -r f9ded6e9e554 xen/arch/x86/cpu/mcheck/mce_amd.c
--- a/xen/arch/x86/cpu/mcheck/mce_amd.c Fri Oct 26 16:09:29 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce_amd.c Mon Oct 29 15:04:35 2012 +0100
@@ -98,3 +98,29 @@ mc_amd_addrcheck(uint64_t status, uint64
BUG();
return 0;
}
+
+enum mcheck_type
+amd_mcheck_init(struct cpuinfo_x86 *ci)
+{
+ enum mcheck_type rc = mcheck_none;
+
+ switch ( ci->x86 )
+ {
+ case 6:
+ rc = amd_k7_mcheck_init(ci);
+ break;
+
+ default:
+ /* Assume that machine check support is available.
+ * The minimum provided support is at least the K8. */
+ case 0xf:
+ rc = amd_k8_mcheck_init(ci);
+ break;
+
+ case 0x10 ... 0x17:
+ rc = amd_f10_mcheck_init(ci);
+ break;
+ }
+
+ return rc;
+}
diff -r 37a8946eeb9d -r f9ded6e9e554 xen/arch/x86/cpu/mcheck/mce_amd.h
--- a/xen/arch/x86/cpu/mcheck/mce_amd.h Fri Oct 26 16:09:29 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce_amd.h Mon Oct 29 15:04:35 2012 +0100
@@ -1,6 +1,10 @@
#ifndef _MCHECK_AMD_H
#define _MCHECK_AMD_H
+enum mcheck_type amd_k7_mcheck_init(struct cpuinfo_x86 *c);
+enum mcheck_type amd_k8_mcheck_init(struct cpuinfo_x86 *c);
+enum mcheck_type amd_f10_mcheck_init(struct cpuinfo_x86 *c);
+
int mc_amd_recoverable_scan(uint64_t status);
int mc_amd_addrcheck(uint64_t status, uint64_t misc, int addrtype);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |