linux/arch/x86/kernel/cpu/mcheck
Yazen Ghannam 29f72ce3e4 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.

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>
2017-03-31 10:09:44 +02:00
..
Makefile x86/mce: Provide a lockless memory pool to save error records 2015-08-13 10:12:50 +02:00
mce_amd.c x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs 2017-03-31 10:09:44 +02:00
mce_intel.c x86/mce: Include the PPIN in MCE records when available 2016-11-23 16:51:52 +01:00
mce-apei.c x86/ras: Flip the TSC-adding logic 2017-01-24 09:14:54 +01:00
mce-genpool.c x86/ras: Get rid of mce_process_work() 2017-01-24 09:14:56 +01:00
mce-inject.c x86/ras/inject: Make it depend on X86_LOCAL_APIC=y 2017-01-24 09:14:52 +01:00
mce-internal.h x86/ras: Get rid of mce_process_work() 2017-01-24 09:14:56 +01:00
mce-severity.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mce.c Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-20 12:47:44 -08:00
p5.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00
therm_throt.c Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-28 11:46:00 -08:00
threshold.c x86/irq, trace: Add __irq_entry annotation to x86's platform IRQ handlers 2017-01-05 08:58:49 +01:00
winchip.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00