]> git.baikalelectronics.ru Git - kernel.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)
commit4e33b24bc4d84c212db43f7b0d36da66132034fc
treea1535ed3c352f3b5931b2a76dbe61ad3b9f39eb2
parent63ad8cee9b5dc86f8f3b3938c579895be1459cd9
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