[PATCH 3/4] powerpc/eeh: fix powernv_eeh_wait_state delay logic
Gavin Shan
gwshan at linux.vnet.ibm.com
Wed Mar 11 16:13:46 AEDT 2015
On Mon, Mar 09, 2015 at 11:17:31AM +0800, Wei Yang wrote:
>As the comment indicates, powernv_eeh_get_state() will inform EEH core to
>delay 1 second. This means the delay doesn't happen when
>powernv_eeh_get_state() returns.
>
>This patch moves the delay subtraction just before msleep(), which is the
>same logic in pseries_eeh_wait_state().
>
>Signed-off-by: Wei Yang <weiyang at linux.vnet.ibm.com>
The patch would conflict with the patches to remove EEH chip layer done
in https://patchwork.ozlabs.org/patch/439956/. Could you please repost
with corrected function names in commit log when the dependent patches
show up in Michael's next branch?
Except that, the changes look ok to me:
Acked-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
Thanks,
Gavin
>---
> arch/powerpc/platforms/powernv/eeh-powernv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
>index 5abb4c2..af1be8f 100644
>--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
>+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
>@@ -334,13 +334,13 @@ static int powernv_eeh_wait_state(struct eeh_pe *pe, int max_wait)
> if (ret != EEH_STATE_UNAVAILABLE)
> return ret;
>
>- max_wait -= mwait;
> if (max_wait <= 0) {
> pr_warn("%s: Timeout getting PE#%x's state (%d)\n",
> __func__, pe->addr, max_wait);
> return EEH_STATE_NOT_SUPPORT;
> }
>
>+ max_wait -= mwait;
> msleep(mwait);
> }
>
>--
>1.7.9.5
>
More information about the Linuxppc-dev
mailing list