diff options
author | Yazen Ghannam <yazen.ghannam@amd.com> | 2017-03-30 07:17:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-27 03:10:38 -0400 |
commit | 6966a6579e1bc7b3486bed395e7d6875912a9a9b (patch) | |
tree | be71ac6c72eecf5a7803cb7616d0b2e182e9f04e | |
parent | 1bd55ab13039a0d1c004eeb7a487810138bc42c8 (diff) |
x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs
commit 29f72ce3e4d18066ec75c79c857bee0618a3504b upstream.
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.
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.
WARNING: CPU: 26 PID: 1 at lib/kobject.c:210 kobject_add_internal
kobject: (ffff88085bb256c0): attempted to be registered with empty name!
...
Call Trace:
kobject_add_internal
kobject_add
kobject_create_and_add
threshold_create_device
threshold_init_device
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1490102285-3659-1-git-send-email-Yazen.Ghannam@amd.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 9b5403462936..3dfca7b302dc 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -59,7 +59,7 @@ static const char * const th_names[] = { | |||
59 | "load_store", | 59 | "load_store", |
60 | "insn_fetch", | 60 | "insn_fetch", |
61 | "combined_unit", | 61 | "combined_unit", |
62 | "", | 62 | "decode_unit", |
63 | "northbridge", | 63 | "northbridge", |
64 | "execution_unit", | 64 | "execution_unit", |
65 | }; | 65 | }; |