OSDN Git Service

powerpc/opal: Add opal_async_wait_response_interruptible() to opal-async
authorCyril Bur <cyrilbur@gmail.com>
Fri, 3 Nov 2017 02:41:44 +0000 (13:41 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 Nov 2017 09:39:28 +0000 (20:39 +1100)
commit9aab24495c5644b25ced0d11816cc3c061bf74fc
tree0bfc7bd0fd117ac3c16263aec1f1019ccede50da
parent95e1bc1daaeee4d598b235dc85b64b7a0bcc3060
powerpc/opal: Add opal_async_wait_response_interruptible() to opal-async

This patch adds an _interruptible version of opal_async_wait_response().
This is useful when a long running OPAL call is performed on behalf of
a userspace thread, for example, the opal_flash_{read,write,erase}
functions performed by the powernv-flash MTD driver.

It is foreseeable that these functions would take upwards of two
minutes causing the wait_event() to block long enough to cause hung
task warnings. Furthermore, wait_event_interruptible() is preferable
as otherwise there is no way for signals to stop the process which is
going to be confusing in userspace.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/opal.h
arch/powerpc/platforms/powernv/opal-async.c