mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/8] x86/mce/AMD: Use msr_stat when clearing MCA_STATUS
Date: Tue, 13 Jun 2017 18:28:28 +0200	[thread overview]
Message-ID: <20170613162835.30750-2-bp@alien8.de> (raw)
In-Reply-To: <20170613162835.30750-1-bp@alien8.de>

From: Yazen Ghannam <yazen.ghannam@amd.com>

The value of MCA_STATUS is used as the MSR when clearing MCA_STATUS.

This may cause the following warning:
 unchecked MSR access error: WRMSR to 0x11b (tried to write 0x0000000000000000)
 Call Trace:
  <IRQ>
  ? amd_threshold_interrupt+0x209/0x220
  smp_threshold_interrupt+0x1b/0x40
  threshold_interrupt+0x89/0x90

Use msr_stat instead which has the MSR address.

Fixes: 37d43acfd79f ("x86/mce/AMD: Redo error logging from APIC LVT interrupt handlers")
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/1495658507-7413-1-git-send-email-Yazen.Ghannam@amd.com
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index d00f299f2ada..d11f94e8e68a 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -815,7 +815,7 @@ _log_error_bank(unsigned int bank, u32 msr_stat, u32 msr_addr, u64 misc)
 
 	__log_error(bank, status, addr, misc);
 
-	wrmsrl(status, 0);
+	wrmsrl(msr_stat, 0);
 
 	return status & MCI_STATUS_DEFERRED;
 }
-- 
2.13.0

  reply	other threads:[~2017-06-13 16:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 16:28 [PATCH 0/8] RAS: 4.13 pile, part 2 Borislav Petkov
2017-06-13 16:28 ` Borislav Petkov [this message]
2017-06-14  9:16   ` [tip:ras/core] x86/mce/AMD: Use msr_stat when clearing MCA_STATUS tip-bot for Yazen Ghannam
2017-06-13 16:28 ` [PATCH 2/8] x86/mce/AMD: Use saved threshold block info in interrupt handler Borislav Petkov
2017-06-14  9:16   ` [tip:ras/core] " tip-bot for Yazen Ghannam
2017-06-13 16:28 ` [PATCH 3/8] x86/mce: Merge mce_amd_inj into mce-inject Borislav Petkov
2017-06-14  9:17   ` [tip:ras/core] " tip-bot for Borislav Petkov
2017-06-13 16:28 ` [PATCH 4/8] x86/mce: Get rid of register_mce_write_callback() Borislav Petkov
2017-06-14  9:18   ` [tip:ras/core] " tip-bot for Borislav Petkov
2017-06-13 16:28 ` [PATCH 5/8] x86/mce: Cleanup include files Borislav Petkov
2017-06-14  9:18   ` [tip:ras/core] x86/mce: Clean up " tip-bot for Borislav Petkov
2017-06-13 16:28 ` [PATCH 6/8] x86/mce/mce-inject: Preset the MCE injection struct Borislav Petkov
2017-06-14  9:19   ` [tip:ras/core] " tip-bot for Borislav Petkov
2017-06-13 16:28 ` [PATCH 7/8] x86/mce: Don't disable MCA banks when offlining a CPU on AMD Borislav Petkov
2017-06-14  9:19   ` [tip:ras/core] " tip-bot for Yazen Ghannam
2017-06-13 16:28 ` [PATCH 8/8] x86/mce: Update bootlog description to reflect behavior " Borislav Petkov
2017-06-14  9:20   ` [tip:ras/core] " tip-bot for Yazen Ghannam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170613162835.30750-2-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome