[PATCH 3/3] EDAC, MCE, AMD: Register with MCE core

From: Borislav Petkov
Date: Wed Apr 13 2011 - 09:37:31 EST


From: Borislav Petkov <borislav.petkov@xxxxxxx>

Now that we don't have a default notifier, register with the MCE core to
state that MCE decoder functionality is present.

Signed-off-by: Borislav Petkov <borislav.petkov@xxxxxxx>
---
drivers/edac/mce_amd.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index 795cfbc..4448010 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -902,6 +902,8 @@ static int __init mce_amd_init(void)

atomic_notifier_chain_register(&x86_mce_decoder_chain, &amd_mce_dec_nb);

+ atomic_inc(&mce_decoders);
+
return 0;
}
early_initcall(mce_amd_init);
@@ -909,6 +911,7 @@ early_initcall(mce_amd_init);
#ifdef MODULE
static void __exit mce_amd_exit(void)
{
+ atomic_dec(&mce_decoders);
atomic_notifier_chain_unregister(&x86_mce_decoder_chain, &amd_mce_dec_nb);
kfree(fam_ops);
}
--
1.7.4.rc2

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