linux/drivers/firmware/efi
Ard Biesheuvel dce48e351c 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>
2016-09-09 16:08:43 +01:00
..
libstub arm64 updates for 4.7: 2016-05-16 17:17:24 -07:00
Kconfig efi: Add misc char driver interface to update EFI firmware 2016-04-28 11:34:05 +02:00
Makefile efi: Split out EFI memory map functions into new file 2016-09-09 16:07:46 +01:00
arm-init.c efi/arm*: esrt: Add missing call to efi_esrt_init() 2016-09-09 16:08:40 +01:00
arm-runtime.c efi: Add efi_memmap_init_late() for permanent EFI memmap 2016-09-09 16:07:43 +01:00
capsule-loader.c efi/capsule: Allocate whole capsule into virtual memory 2016-08-11 13:55:36 +02:00
capsule.c efi/capsule: Allocate whole capsule into virtual memory 2016-08-11 13:55:36 +02:00
cper.c efi: Handle memory error structures produced based on old versions of standard 2015-07-15 13:30:38 +01:00
efi-pstore.c efi: Don't use spinlocks for efi vars 2016-09-09 16:08:42 +01:00
efi.c efi: Replace runtime services spinlock with semaphore 2016-09-09 16:08:43 +01:00
efibc.c efibc: Report more information in the error messages 2016-06-27 13:06:54 +02:00
efivars.c efi: Don't use spinlocks for efi vars 2016-09-09 16:08:42 +01:00
esrt.c efi/esrt: Use memremap not ioremap to access ESRT table in memory 2016-09-09 16:08:39 +01:00
fake_mem.c efi: Add efi_memmap_install() for installing new EFI memory maps 2016-09-09 16:07:47 +01:00
memattr.c efi: Implement generic support for the Memory Attributes table 2016-04-28 11:33:54 +02:00
memmap.c efi: Add efi_memmap_install() for installing new EFI memory maps 2016-09-09 16:07:47 +01:00
reboot.c efi: Add 'capsule' update support 2016-04-28 11:34:03 +02:00
runtime-map.c efi/runtime-map: Use efi.memmap directly instead of a copy 2016-09-09 16:08:36 +01:00
runtime-wrappers.c efi: Replace runtime services spinlock with semaphore 2016-09-09 16:08:43 +01:00
vars.c efi: Don't use spinlocks for efi vars 2016-09-09 16:08:42 +01:00