x86/mce/amd: Factor out logging mechanism
x86/mce/amd: Factor out logging mechanism

Refactor the code here to setup struct mce and call mce_log() to log
the error. We're going to reuse this in a later patch as part of the
deferred error interrupt enablement.

No functional change is introduced.

Suggested-by: Borislav Petkov <0691a664b24b6f15b20cd5aee64b72271db08be1@alien8.de>
Signed-off-by: Aravind Gopalakrishnan <d1386a6e24d6af768a23e2ace8645d92bd2ab963@amd.com>
Cc: Tony Luck <e7984595ec0368ff920a7b3521dc7093683f6f26@intel.com>
Cc: x86-ml <500d1ad82b2a9e532e251e94d31de3f8a5cf4174@kernel.org>
Cc: linux-edac <2f2877799b28945e915fed027ea960f3cffe53dd@vger.kernel.org>
Link: http://lkml.kernel.org/r/1430913538-1415-2-git-send-email-d1386a6e24d6af768a23e2ace8645d92bd2ab963@amd.com
Signed-off-by: Borislav Petkov <0691a664b24b6f15b20cd5aee64b72271db08be1@suse.de>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs