]> asedeno.scripts.mit.edu Git - linux.git/commit
powerpc/eeh: Cleanup eeh_pe_clear_frozen_state()
authorSam Bobroff <sbobroff@linux.ibm.com>
Thu, 29 Nov 2018 03:16:37 +0000 (14:16 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 5 Feb 2019 00:55:41 +0000 (11:55 +1100)
commit3376cb91ed908eb0728900894a77d8206574dbcd
treea1535ed3c352f3b5931b2a76dbe61ad3b9f39eb2
parent26b523356f49a0117c8f9e32ca98aa6d6e496e1a
powerpc/eeh: Cleanup eeh_pe_clear_frozen_state()

The 'clear_sw_state' parameter for eeh_pe_clear_frozen_state() is
redundant because it has no effect (except in the rare case of a
hardware error part way through unfreezing a tree of PEs, where it
would dangerously allow partial de-isolation before returning
failure).

It is passed down to __eeh_pe_clear_frozen_state(), and from there to
eeh_unfreeze_pe(), where it causes EEH_PE_ISOLATED to be removed
from the state of each PE during the traversal.  However, when the
traversal finishes, EEH_PE_ISOLATED is unconditionally removed by a
call to eeh_pe_state_clear() regardless of the parameter's value.

So remove the flag and pass false to eeh_unfreeze_pe() (to avoid the
rare case described above, as it was before the flag was introduced).
Also, perform the recursion directly in the function and eliminate a
bit of boilerplate.

There should be no change in functionality, except as mentioned above.

Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh_driver.c