diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-07-15 21:36:31 +0200 |
---|---|---|
committer | Matt Fleming <matt@codeblueprint.co.uk> | 2016-09-09 16:08:43 +0100 |
commit | dce48e351c0d42014e5fb16ac3eb099e11b7e716 (patch) | |
tree | 97ec1bf70a8269d40598b5d1ed12f60d51ec18b4 /include/linux/efi.h | |
parent | 21b3ddd39feecd2f4d6c52bcd30f0a4fa14f125a (diff) | |
download | blackbird-op-linux-dce48e351c0d42014e5fb16ac3eb099e11b7e716.tar.gz blackbird-op-linux-dce48e351c0d42014e5fb16ac3eb099e11b7e716.zip |
efi: Replace runtime services spinlock with semaphore
The purpose of the efi_runtime_lock is to prevent concurrent calls into
the firmware. There is no need to use spinlocks here, as long as we ensure
that runtime service invocations from an atomic context (i.e., EFI pstore)
cannot block.
So use a semaphore instead, and use down_trylock() in the nonblocking case.
We don't use a mutex here because the mutex_trylock() function must not
be called from interrupt context, whereas the down_trylock() can.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Sylvain Chouleur <sylvain.chouleur@gmail.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r-- | include/linux/efi.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 4d6da7b66c19..4c92c0630c45 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -38,6 +38,7 @@ #define EFI_WRITE_PROTECTED ( 8 | (1UL << (BITS_PER_LONG-1))) #define EFI_OUT_OF_RESOURCES ( 9 | (1UL << (BITS_PER_LONG-1))) #define EFI_NOT_FOUND (14 | (1UL << (BITS_PER_LONG-1))) +#define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1))) #define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1))) typedef unsigned long efi_status_t; |