diff options
author | Cyril Bur <cyrilbur@gmail.com> | 2017-11-03 03:41:44 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-11-06 10:39:28 +0100 |
commit | 9aab24495c5644b25ced0d11816cc3c061bf74fc (patch) | |
tree | 0bfc7bd0fd117ac3c16263aec1f1019ccede50da /arch/powerpc/include/asm/opal.h | |
parent | powernv/opal-sensor: remove not needed lock (diff) | |
download | linux-9aab24495c5644b25ced0d11816cc3c061bf74fc.tar.xz linux-9aab24495c5644b25ced0d11816cc3c061bf74fc.zip |
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>
Diffstat (limited to 'arch/powerpc/include/asm/opal.h')
-rw-r--r-- | arch/powerpc/include/asm/opal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 00aae3189311..0c545f7fc77b 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h @@ -309,6 +309,8 @@ extern void opal_notifier_update_evt(uint64_t evt_mask, uint64_t evt_val); extern int opal_async_get_token_interruptible(void); extern int opal_async_release_token(int token); extern int opal_async_wait_response(uint64_t token, struct opal_msg *msg); +extern int opal_async_wait_response_interruptible(uint64_t token, + struct opal_msg *msg); extern int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data); struct rtc_time; |