Re: [RFC PATCH] x86, mce: change the mce notifier to 'blocking' from 'atomic'

From: Luck, Tony
Date: Wed Apr 12 2017 - 18:26:50 EST


On Thu, Apr 13, 2017 at 12:16:39AM +0200, Borislav Petkov wrote:
> ... and it is midnight here so I could be talking crap but we probably
> should really split the reporting "chain" into two:

This shouldn't be too painful. Users ask to be put on the chain via
the wrapper:

void mce_register_decode_chain(struct notifier_block *nb)
{
atomic_inc(&num_notifiers);

WARN_ON(nb->priority > MCE_PRIO_LOWEST && nb->priority < MCE_PRIO_EDAC);

atomic_notifier_chain_register(&x86_mce_decoder_chain, nb);
}

We can futz with that and have them specify which chain (or both)
that they want to be added to.

-Tony