x86/ras/amd: Make sysfs names of banks more user-friendly
authorYazen Ghannam <Yazen.Ghannam@amd.com>
Mon, 23 Jan 2017 18:35:08 +0000 (19:35 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 24 Jan 2017 08:14:53 +0000 (09:14 +0100)
commit0b737a9c2af85cc8295f9308d9250f9111bbf94d
tree659c798b37b70f86bcda780d77983806912b7173
parent9b052ea4ced0fa1ad30a2eafe86984a16297e6f1
x86/ras/amd: Make sysfs names of banks more user-friendly

Currently, we append the MCA_IPID[InstanceId] to the bank name to create
the sysfs filename. The InstanceId field uniquely identifies a bank
instance but it doesn't look very nice for most banks.

Replace the InstanceId with a simpler, ascending (0, 1, ..) value.
Only use this in the sysfs name when there is more than 1 instance.
Otherwise, just use the bank's name as the sysfs name.

Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1484322741-41884-3-git-send-email-Yazen.Ghannam@amd.com
Link: http://lkml.kernel.org/r/20170123183514.13356-4-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/mce.h
arch/x86/kernel/cpu/mcheck/mce_amd.c