Re: [PATCH -v2 6/7] x86, NMI, Add support to notify hardware error with unknown NMI

huang ying
2010-09-30T09:36:35Z

On Thu, Sep 30, 2010 at 4:38 PM, Robert Richter <robert.richter@amd.com> wrote:
> On 30.09.10 00:57:10, Huang Ying wrote:
>> Yes. Both MCE and perf are CPU features. I think they can be thought as
>> optional architectural features. I think it is good to put similar
>> features into arch/x86/kernel/cpu instead of traps.c. But if necessary,
>> we can put direct call in traps.c instead of notifier block.
>
> As you see it seems not being obviously, what goes here and what goes
> there. The approach is wrong. If we want to handle some hardware
> feature, we should simply register a handler for this. Implemetations
> for unhandled or unrecovered interrupts should be in traps.c. It's
> that simple.

That is possible. I just don't like it. We should keep things as
"straightforward" as possible. Direct call is more straightfoward than
indirect call like notifier chain.

Best Regards,
Huang Ying