From: tip-bot for Yazen Ghannam <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: yazen.ghannam@amd.com, mingo@kernel.org,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
peterz@infradead.org, bp@suse.de, torvalds@linux-foundation.org,
linux-edac@vger.kernel.org, hpa@zytor.com
Subject: [tip:ras/urgent] x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs
Date: Fri, 31 Mar 2017 03:08:19 -0700 [thread overview]
Message-ID: <tip-7cc5ad0d4aec505bee7f49696867668aa3889195@git.kernel.org> (raw)
In-Reply-To: <20170330111713.cnkbloffyouxg52e@pd.tnic>
Commit-ID: 7cc5ad0d4aec505bee7f49696867668aa3889195
Gitweb: http://git.kernel.org/tip/7cc5ad0d4aec505bee7f49696867668aa3889195
Author: Yazen Ghannam <yazen.ghannam@amd.com>
AuthorDate: Thu, 30 Mar 2017 13:17:14 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 31 Mar 2017 08:10:09 +0200
x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs
MCA bank 3 is reserved on systems pre-Fam17h, so it didn't have a name.
However, MCA bank 3 is defined on Fam17h systems and can be accessed
using legacy MSRs. Without a name we get a stack trace on Fam17h systems
when trying to register sysfs files for bank 3 on kernels that don't
recognize Scalable MCA:
WARNING: CPU: 26 PID: 1 at lib/kobject.c:210 kobject_add_internal
kobject: (ffff88085bb256c0): attempted to be registered with empty name!
...
Call Trace:
dump_stack()
warn_slowpath_common()
warn_slowpath_fmt()
kobject_add_internal()
kobject_add()
kobject_create_and_add()
threshold_create_device()
threshold_init_device()
do_one_initcall()
kernel_init_freeable()
kernel_init()
ret_from_fork()
Call MCA bank 3 "decode_unit" since this is what it represents on
Fam17h. This will allow kernels without SMCA support to see this bank on
Fam17h+ and prevent the stack trace. This will not affect older systems
since this bank is reserved on them, i.e. it'll be ignored.
Tested on AMD Fam15h and Fam17h systems.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org> # 3.10..
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170330111713.cnkbloffyouxg52e@pd.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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 524cc57..6e4a047 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -60,7 +60,7 @@ static const char * const th_names[] = {
"load_store",
"insn_fetch",
"combined_unit",
- "",
+ "decode_unit",
"northbridge",
"execution_unit",
};
prev parent reply other threads:[~2017-03-31 10:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 11:17 [PATCH] " Borislav Petkov
2017-03-31 10:08 ` tip-bot for Yazen Ghannam [this message]
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=tip-7cc5ad0d4aec505bee7f49696867668aa3889195@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yazen.ghannam@amd.com \
/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
all inboxes | Powered by JetHome®