x86, mce: Introduce mce_gather_info()
x86, mce: Introduce mce_gather_info()

This patch introduces mce_gather_info() which is to be called at the
beginning of error handling and gathers minimum error information from
proper error registers (and saved registers).

As the result of mce_get_rip() is integrated, unnecessary zeroing
is removed. This also takes care of saving RIP which is required to
make some decision about error severity for SRAR errors, instead of
retrieving it later in the handler.

Signed-off-by: Hidetoshi Seto <934438d7103b8cf842e8f6117400110cee66898a@jp.fujitsu.com>
Acked-by: Tony Luck <e7984595ec0368ff920a7b3521dc7093683f6f26@intel.com>
Link: 7cc0e4a3dee5d8eee22843a02a0636ab013cce05@jp.fujitsu.com
Signed-off-by: Borislav Petkov <2b4cb5acba6b5321acd37371d9b73a646c388783@amd.com>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas