diff options
Diffstat (limited to 'arch/powerpc/kernel/eeh.c')
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index e1b6d8e17289..3b2252e7731b 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c | |||
@@ -104,6 +104,13 @@ | |||
104 | int eeh_subsystem_flags; | 104 | int eeh_subsystem_flags; |
105 | EXPORT_SYMBOL(eeh_subsystem_flags); | 105 | EXPORT_SYMBOL(eeh_subsystem_flags); |
106 | 106 | ||
107 | /* | ||
108 | * EEH allowed maximal frozen times. If one particular PE's | ||
109 | * frozen count in last hour exceeds this limit, the PE will | ||
110 | * be forced to be offline permanently. | ||
111 | */ | ||
112 | int eeh_max_freezes = 5; | ||
113 | |||
107 | /* Platform dependent EEH operations */ | 114 | /* Platform dependent EEH operations */ |
108 | struct eeh_ops *eeh_ops = NULL; | 115 | struct eeh_ops *eeh_ops = NULL; |
109 | 116 | ||
@@ -1652,8 +1659,22 @@ static int eeh_enable_dbgfs_get(void *data, u64 *val) | |||
1652 | return 0; | 1659 | return 0; |
1653 | } | 1660 | } |
1654 | 1661 | ||
1662 | static int eeh_freeze_dbgfs_set(void *data, u64 val) | ||
1663 | { | ||
1664 | eeh_max_freezes = val; | ||
1665 | return 0; | ||
1666 | } | ||
1667 | |||
1668 | static int eeh_freeze_dbgfs_get(void *data, u64 *val) | ||
1669 | { | ||
1670 | *val = eeh_max_freezes; | ||
1671 | return 0; | ||
1672 | } | ||
1673 | |||
1655 | DEFINE_SIMPLE_ATTRIBUTE(eeh_enable_dbgfs_ops, eeh_enable_dbgfs_get, | 1674 | DEFINE_SIMPLE_ATTRIBUTE(eeh_enable_dbgfs_ops, eeh_enable_dbgfs_get, |
1656 | eeh_enable_dbgfs_set, "0x%llx\n"); | 1675 | eeh_enable_dbgfs_set, "0x%llx\n"); |
1676 | DEFINE_SIMPLE_ATTRIBUTE(eeh_freeze_dbgfs_ops, eeh_freeze_dbgfs_get, | ||
1677 | eeh_freeze_dbgfs_set, "0x%llx\n"); | ||
1657 | #endif | 1678 | #endif |
1658 | 1679 | ||
1659 | static int __init eeh_init_proc(void) | 1680 | static int __init eeh_init_proc(void) |
@@ -1664,6 +1685,9 @@ static int __init eeh_init_proc(void) | |||
1664 | debugfs_create_file("eeh_enable", 0600, | 1685 | debugfs_create_file("eeh_enable", 0600, |
1665 | powerpc_debugfs_root, NULL, | 1686 | powerpc_debugfs_root, NULL, |
1666 | &eeh_enable_dbgfs_ops); | 1687 | &eeh_enable_dbgfs_ops); |
1688 | debugfs_create_file("eeh_max_freezes", 0600, | ||
1689 | powerpc_debugfs_root, NULL, | ||
1690 | &eeh_freeze_dbgfs_ops); | ||
1667 | #endif | 1691 | #endif |
1668 | } | 1692 | } |
1669 | 1693 | ||