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

From: Naoya Horiguchi
Date: Wed Mar 04 2015 - 02:54:16 EST


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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/