Re: [RESEND PATCH] mce, edac: use an atomic notifier for MCEsdecoding

From: Ingo Molnar
Date: Mon Oct 12 2009 - 06:35:19 EST



* Borislav Petkov <borislav.petkov@xxxxxxx> wrote:

> @@ -1420,6 +1428,10 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
> mce_cpu_features(c);
> mce_init_timer();
> INIT_WORK(&__get_cpu_var(mce_work), mce_process_work);
> +
> + if (raw_smp_processor_id() == 0)
> + atomic_notifier_chain_register(&x86_mce_decoder_chain,
> + &mce_dec_nb);
> }

this bit should be done in a cleaner way, by introducing a boot init
function for MCE functionality.

(It's also broken if we boot on non-0 CPUs. Doesnt happen currently but
still.)

Also, the function names there are pretty messy - please do another,
rename patch that does something like:

mcheck_init() => mcheck_cpu_init()
mce_init() => __mcheck_cpu_init_generict()
mce_cpu_features() => __mcheck_cpu_init_vendor()
mce_init_timer() => __mcheck_cpu_init_timer()

etc.

I've applied your patch to x86/mce - please send delta patches to clean
up the other aspects of it.

Thanks,

Ingo
--
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/