diff options
| -rw-r--r-- | arch/x86/include/asm/mce.h | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_64.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 563933e06a35..4f8c199584e7 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
| @@ -137,6 +137,7 @@ DECLARE_PER_CPU(mce_banks_t, mce_poll_banks); | |||
| 137 | enum mcp_flags { | 137 | enum mcp_flags { |
| 138 | MCP_TIMESTAMP = (1 << 0), /* log time stamp */ | 138 | MCP_TIMESTAMP = (1 << 0), /* log time stamp */ |
| 139 | MCP_UC = (1 << 1), /* log uncorrected errors */ | 139 | MCP_UC = (1 << 1), /* log uncorrected errors */ |
| 140 | MCP_DONTLOG = (1 << 2), /* only clear, don't log */ | ||
| 140 | }; | 141 | }; |
| 141 | extern void machine_check_poll(enum mcp_flags flags, mce_banks_t *b); | 142 | extern void machine_check_poll(enum mcp_flags flags, mce_banks_t *b); |
| 142 | 143 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 82614f1b923a..6fb0b359d2a5 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
| @@ -239,9 +239,10 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b) | |||
| 239 | * Don't get the IP here because it's unlikely to | 239 | * Don't get the IP here because it's unlikely to |
| 240 | * have anything to do with the actual error location. | 240 | * have anything to do with the actual error location. |
| 241 | */ | 241 | */ |
| 242 | 242 | if (!(flags & MCP_DONTLOG)) { | |
| 243 | mce_log(&m); | 243 | mce_log(&m); |
| 244 | add_taint(TAINT_MACHINE_CHECK); | 244 | add_taint(TAINT_MACHINE_CHECK); |
| 245 | } | ||
| 245 | 246 | ||
| 246 | /* | 247 | /* |
| 247 | * Clear state for this bank. | 248 | * Clear state for this bank. |
| @@ -585,7 +586,7 @@ static void mce_init(void *dummy) | |||
| 585 | * Log the machine checks left over from the previous reset. | 586 | * Log the machine checks left over from the previous reset. |
| 586 | */ | 587 | */ |
| 587 | bitmap_fill(all_banks, MAX_NR_BANKS); | 588 | bitmap_fill(all_banks, MAX_NR_BANKS); |
| 588 | machine_check_poll(MCP_UC, &all_banks); | 589 | machine_check_poll(MCP_UC|(!mce_bootlog ? MCP_DONTLOG : 0), &all_banks); |
| 589 | 590 | ||
| 590 | set_in_cr4(X86_CR4_MCE); | 591 | set_in_cr4(X86_CR4_MCE); |
| 591 | 592 | ||
