Move AMD specific initialization to AMD files.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
}
}
-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)
{
};
/* 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);
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;
+}
#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);