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>
This commit is contained in:

committed by
Michael Ellerman

parent
6b493f6079
commit
954bd99435
@@ -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
|
||||
|
Reference in New Issue
Block a user