#include <linux/kobject.h>
#include <linux/device.h>
#include <linux/edac.h>
#include <linux/module.h>
#include <asm/mce.h>
#include "mce_amd.h"
Go to the source code of this file.
|
| MCE_INJECT_STORE (status) |
|
| MCE_INJECT_STORE (misc) |
|
| MCE_INJECT_STORE (addr) |
|
| MCE_INJECT_SHOW (status) |
|
| MCE_INJECT_SHOW (misc) |
|
| MCE_INJECT_SHOW (addr) |
|
| EDAC_MCE_ATTR (status, 0644, edac_inject_status_show, edac_inject_status_store) |
|
| EDAC_MCE_ATTR (misc, 0644, edac_inject_misc_show, edac_inject_misc_store) |
|
| EDAC_MCE_ATTR (addr, 0644, edac_inject_addr_show, edac_inject_addr_store) |
|
| EDAC_MCE_ATTR (bank, 0644, edac_inject_bank_show, edac_inject_bank_store) |
|
| module_init (edac_init_mce_inject) |
|
| module_exit (edac_exit_mce_inject) |
|
| MODULE_LICENSE ("GPL") |
|
| MODULE_AUTHOR ("Borislav Petkov <[email protected]>") |
|
| MODULE_AUTHOR ("AMD Inc.") |
|
| MODULE_DESCRIPTION ("MCE injection facility for testing MCE decoding") |
|
#define EDAC_MCE_ATTR |
( |
|
_name, |
|
|
|
_mode, |
|
|
|
_show, |
|
|
|
_store |
|
) |
| static struct edac_mce_attr mce_attr_##_name = __ATTR(_name, _mode, _show, _store) |
#define MCE_INJECT_SHOW |
( |
|
reg | ) |
|
#define MCE_INJECT_STORE |
( |
|
reg | ) |
|
Value:
{ \
\
if (ret < 0) \
printk(
KERN_ERR "Error writing MCE " #
reg " field.\n"); \
\
\
}
Definition at line 38 of file mce_amd_inj.c.
EDAC_MCE_ATTR |
( |
status |
, |
|
|
0644 |
, |
|
|
edac_inject_status_show |
, |
|
|
edac_inject_status_store |
|
|
) |
| |
EDAC_MCE_ATTR |
( |
misc |
, |
|
|
0644 |
, |
|
|
edac_inject_misc_show |
, |
|
|
edac_inject_misc_store |
|
|
) |
| |
EDAC_MCE_ATTR |
( |
addr |
, |
|
|
0644 |
, |
|
|
edac_inject_addr_show |
, |
|
|
edac_inject_addr_store |
|
|
) |
| |
EDAC_MCE_ATTR |
( |
bank |
, |
|
|
0644 |
, |
|
|
edac_inject_bank_show |
, |
|
|
edac_inject_bank_store |
|
|
) |
| |
MCE_INJECT_STORE |
( |
misc |
| ) |
|
MCE_INJECT_STORE |
( |
addr |
| ) |
|
MODULE_AUTHOR |
( |
"AMD Inc." |
| ) |
|
MODULE_DESCRIPTION |
( |
"MCE injection facility for testing MCE decoding" |
| ) |
|
module_exit |
( |
edac_exit_mce_inject |
| ) |
|
module_init |
( |
edac_init_mce_inject |
| ) |
|