summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/eeh_event.c
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2019-02-15 03:48:17 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2019-02-21 16:10:15 +0300
commit954bd99435b8ba99e86665d6a2ec1baa1d128325 (patch)
tree27e3156fee9ccaa8162b462c198ec20ad425aae1 /arch/powerpc/kernel/eeh_event.c
parent6b493f6079a430fd41f66933b68d1bb1ad37ca8c (diff)
downloadlinux-954bd99435b8ba99e86665d6a2ec1baa1d128325.tar.xz
powerpc/eeh: Add eeh_force_recover to debugfs
This patch adds a debugfs interface to force scheduling a recovery event. This can be used to recover a specific PE or schedule a "special" recovery even that checks for errors at the PHB level. To force a recovery of a normal PE, use: echo '<#pe>:<#phb>' > /sys/kernel/debug/powerpc/eeh_force_recover To force a scan for broken PHBs: echo 'hwcheck' > /sys/kernel/debug/powerpc/eeh_force_recover Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/eeh_event.c')
-rw-r--r--arch/powerpc/kernel/eeh_event.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/eeh_event.c b/arch/powerpc/kernel/eeh_event.c
index 19837798bb1d..539aca055d70 100644
--- a/arch/powerpc/kernel/eeh_event.c
+++ b/arch/powerpc/kernel/eeh_event.c
@@ -121,20 +121,11 @@ int eeh_event_init(void)
* the actual event will be delivered in a normal context
* (from a workqueue).
*/
-int eeh_send_failure_event(struct eeh_pe *pe)
+int __eeh_send_failure_event(struct eeh_pe *pe)
{
unsigned long flags;
struct eeh_event *event;
- /*
- * If we've manually supressed recovery events via debugfs
- * then just drop it on the floor.
- */
- if (eeh_debugfs_no_recover) {
- pr_err("EEH: Event dropped due to no_recover setting\n");
- return 0;
- }
-
event = kzalloc(sizeof(*event), GFP_ATOMIC);
if (!event) {
pr_err("EEH: out of memory, event not handled\n");
@@ -153,6 +144,20 @@ int eeh_send_failure_event(struct eeh_pe *pe)
return 0;
}
+int eeh_send_failure_event(struct eeh_pe *pe)
+{
+ /*
+ * If we've manually supressed recovery events via debugfs
+ * then just drop it on the floor.
+ */
+ if (eeh_debugfs_no_recover) {
+ pr_err("EEH: Event dropped due to no_recover setting\n");
+ return 0;
+ }
+
+ return __eeh_send_failure_event(pe);
+}
+
/**
* eeh_remove_event - Remove EEH event from the queue
* @pe: Event binding to the PE