[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190923073129.GA2749134@kroah.com>
Date: Mon, 23 Sep 2019 09:31:29 +0200
From: Greg KH <greg@...ah.com>
To: Greg Kurz <groug@...d.org>
Cc: Sasha Levin <sashal@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>, stable@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/xive: Fix bogus error code returned by OPAL
On Mon, Sep 23, 2019 at 08:29:40AM +0200, Greg Kurz wrote:
> There's a bug in skiboot that causes the OPAL_XIVE_ALLOCATE_IRQ call
> to return the 32-bit value 0xffffffff when OPAL has run out of IRQs.
> Unfortunatelty, OPAL return values are signed 64-bit entities and
> errors are supposed to be negative. If that happens, the linux code
> confusingly treats 0xffffffff as a valid IRQ number and panics at some
> point.
>
> A fix was recently merged in skiboot:
>
> e97391ae2bb5 ("xive: fix return value of opal_xive_allocate_irq()")
>
> but we need a workaround anyway to support older skiboots already
> in the field.
>
> Internally convert 0xffffffff to OPAL_RESOURCE which is the usual error
> returned upon resource exhaustion.
>
> Cc: stable@...r.kernel.org # v4.12+
> Signed-off-by: Greg Kurz <groug@...d.org>
> Reviewed-by: Cédric Le Goater <clg@...d.org>
> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
> Link: https://lore.kernel.org/r/156821713818.1985334.14123187368108582810.stgit@bahia.lan
> (cherry picked from commit 6ccb4ac2bf8a35c694ead92f8ac5530a16e8f2c8,
> groug: fix arch/powerpc/platforms/powernv/opal-wrappers.S instead of
> non-existing arch/powerpc/platforms/powernv/opal-call.c)
> Signed-off-by: Greg Kurz <groug@...d.org>
> ---
>
> This is for 4.14 and 4.19.
Thanks for the backport, now queued up.
greg k-h
Powered by blists - more mailing lists