Re: [PATCH v3 1/2] x86: mce: kexec: switch MCE handler for kexec/kdump

Naoya Horiguchi
2015-03-04T07:54:13Z

On Tue, Mar 03, 2015 at 07:53:24PM +0100, Borislav Petkov wrote:
> On Tue, Mar 03, 2015 at 09:01:49AM +0000, Naoya Horiguchi wrote:
...
>
> This CONFIG_KEXEC-ifdeffery is too ugly to live. Please put everything
> in arch/x86/kernel/crash.c. AFAICT, you don't need to touch anything in
> arch/x86/kernel/cpu/mcheck/ for your purposes.

I think that I could do this if I don't need any logical update on v3,
but as Tony wrote, the new MCE handler needs check the type of MCE to
determine whether to return or not.
And the result of the update, the new code contains some MCE-internal code,
so I feel like putting most of the code in arch/x86/kernel/cpu/mcheck/mce.c
as in the previous versions.

But I agree I used needlessly too many ifdef, so I put all kdump-related
code in arch/x86/kernel/cpu/mcheck/mce.c in a single ifdef for less ugly code.

Thanks,
Naoya Horiguchi