]> git.baikalelectronics.ru Git - kernel.git/commit
EDAC, mce_amd_inj: Modify flags attribute to use string arguments
authorAravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Tue, 2 Jun 2015 20:35:56 +0000 (15:35 -0500)
committerBorislav Petkov <bp@suse.de>
Wed, 3 Jun 2015 14:47:51 +0000 (16:47 +0200)
commitcc0c303006e4a5f5b53b4ed4a30fe7d6852ee51f
tree72ca627ed3267a8a945998c71f79082ed6c9e6a5
parenta0d33ded77386bafc36730d29d48eae1ce95fbc1
EDAC, mce_amd_inj: Modify flags attribute to use string arguments

Use strings such as "hw" or "sw" to indicate the type of error injection
to be performed.

Current flags attribute derives the meanings of values that can be
programmed into it from asm/mce.h. Moving to defined strings for the
attribute allows this module to be self-sufficient and removes the
dependency. Also, we can introduce new flags as and when needed without
having to worry about conflicting with the flags already defined in
asm/mce.h.

Also, modify do_inject() to use the newly defined injection_type enum to
figure out the injection mechanism we need to use

Suggested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: mchehab@osg.samsung.com
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/1433277362-10911-4-git-send-email-Aravind.Gopalakrishnan@amd.com
[ Use strstrip() return value. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/mce_amd_inj.c