aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/mce.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-08 06:31:25 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-05-28 12:24:11 -0400
commit06b851d98266b812b2fa23d007cdf53f41194bbb (patch)
tree34fc89bb70b3dd686d3ab4d2e406cdbf0b4f1ec7 /arch/x86/include/asm/mce.h
parenta65d086235208a3b3546e209d2210048549099b2 (diff)
x86, mce: unify, prepare 64bit in mce.h
Prepare mce.h for unification, so that it will build on 32-bit x86 kernels too. [ Impact: cleanup ] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include/asm/mce.h')
-rw-r--r--arch/x86/include/asm/mce.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 4f8c199584e7..8488210b866f 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_X86_MCE_H 1#ifndef _ASM_X86_MCE_H
2#define _ASM_X86_MCE_H 2#define _ASM_X86_MCE_H
3 3
4#ifdef __x86_64__
5
6#include <linux/types.h> 4#include <linux/types.h>
7#include <asm/ioctls.h> 5#include <asm/ioctls.h>
8 6
@@ -10,21 +8,21 @@
10 * Machine Check support for x86 8 * Machine Check support for x86
11 */ 9 */
12 10
13#define MCG_CTL_P (1UL<<8) /* MCG_CAP register available */ 11#define MCG_CTL_P (1ULL<<8) /* MCG_CAP register available */
14#define MCG_EXT_P (1ULL<<9) /* Extended registers available */ 12#define MCG_EXT_P (1ULL<<9) /* Extended registers available */
15#define MCG_CMCI_P (1ULL<<10) /* CMCI supported */ 13#define MCG_CMCI_P (1ULL<<10) /* CMCI supported */
16 14
17#define MCG_STATUS_RIPV (1UL<<0) /* restart ip valid */ 15#define MCG_STATUS_RIPV (1ULL<<0) /* restart ip valid */
18#define MCG_STATUS_EIPV (1UL<<1) /* ip points to correct instruction */ 16#define MCG_STATUS_EIPV (1ULL<<1) /* ip points to correct instruction */
19#define MCG_STATUS_MCIP (1UL<<2) /* machine check in progress */ 17#define MCG_STATUS_MCIP (1ULL<<2) /* machine check in progress */
20 18
21#define MCI_STATUS_VAL (1UL<<63) /* valid error */ 19#define MCI_STATUS_VAL (1ULL<<63) /* valid error */
22#define MCI_STATUS_OVER (1UL<<62) /* previous errors lost */ 20#define MCI_STATUS_OVER (1ULL<<62) /* previous errors lost */
23#define MCI_STATUS_UC (1UL<<61) /* uncorrected error */ 21#define MCI_STATUS_UC (1ULL<<61) /* uncorrected error */
24#define MCI_STATUS_EN (1UL<<60) /* error enabled */ 22#define MCI_STATUS_EN (1ULL<<60) /* error enabled */
25#define MCI_STATUS_MISCV (1UL<<59) /* misc error reg. valid */ 23#define MCI_STATUS_MISCV (1ULL<<59) /* misc error reg. valid */
26#define MCI_STATUS_ADDRV (1UL<<58) /* addr reg. valid */ 24#define MCI_STATUS_ADDRV (1ULL<<58) /* addr reg. valid */
27#define MCI_STATUS_PCC (1UL<<57) /* processor context corrupt */ 25#define MCI_STATUS_PCC (1ULL<<57) /* processor context corrupt */
28 26
29/* Fields are zero when not available */ 27/* Fields are zero when not available */
30struct mce { 28struct mce {
@@ -82,13 +80,11 @@ struct mce_log {
82#define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9) 80#define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9)
83#define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0) 81#define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0)
84 82
85#endif /* __x86_64__ */
86
87#ifdef __KERNEL__ 83#ifdef __KERNEL__
88 84
89#ifdef CONFIG_X86_32 85#ifdef CONFIG_X86_32
90extern int mce_disabled; 86extern int mce_disabled;
91#else /* CONFIG_X86_32 */ 87#endif
92 88
93#include <asm/atomic.h> 89#include <asm/atomic.h>
94 90
@@ -143,8 +139,6 @@ extern void machine_check_poll(enum mcp_flags flags, mce_banks_t *b);
143 139
144extern int mce_notify_user(void); 140extern int mce_notify_user(void);
145 141
146#endif /* !CONFIG_X86_32 */
147
148#ifdef CONFIG_X86_MCE 142#ifdef CONFIG_X86_MCE
149extern void mcheck_init(struct cpuinfo_x86 *c); 143extern void mcheck_init(struct cpuinfo_x86 *c);
150#else 144#else