1 /* Provides edac interface to mcelog events
3 * This file may be distributed under the terms of the
4 * GNU General Public License version 2.
6 * Copyright (c) 2009 by:
7 * Mauro Carvalho Chehab <mchehab@redhat.com>
9 * Red Hat Inc. http://www.redhat.com
12 #include <linux/module.h>
13 #include <linux/edac_mce.h>
17 EXPORT_SYMBOL_GPL(edac_mce_enabled
);
24 static LIST_HEAD(edac_mce_list
);
25 static DEFINE_MUTEX(edac_mce_lock
);
27 int edac_mce_register(struct edac_mce
*edac_mce
)
29 mutex_lock(&edac_mce_lock
);
30 list_add_tail(&edac_mce
->list
, &edac_mce_list
);
31 mutex_unlock(&edac_mce_lock
);
34 EXPORT_SYMBOL(edac_mce_register
);
36 void edac_mce_unregister(struct edac_mce
*edac_mce
)
38 mutex_lock(&edac_mce_lock
);
39 list_del(&edac_mce
->list
);
40 mutex_unlock(&edac_mce_lock
);
42 EXPORT_SYMBOL(edac_mce_unregister
);
44 int edac_mce_parse(struct mce
*mce
)
46 struct edac_mce
*edac_mce
;
48 list_for_each_entry(edac_mce
, &edac_mce_list
, list
) {
49 if (edac_mce
->check_error(edac_mce
->priv
, mce
))
53 /* Nobody queued the error */
56 EXPORT_SYMBOL_GPL(edac_mce_parse
);
58 MODULE_LICENSE("GPL");
59 MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
60 MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com)");
61 MODULE_DESCRIPTION("EDAC Driver for mcelog captured errors");
This page took 0.031708 seconds and 5 git commands to generate.