Re: [PATCH v2 3/3] efi: replace runtime services spinlock with semaphore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 11 Jul, at 04:59:25PM, Ard Biesheuvel wrote:
> 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@xxxxxxxxxx>
> --
> v2: rebased onto v4.7-rc3
>     handle EFI_ABORT in efi_status_to_err()
> ---
>  drivers/firmware/efi/efi.c              |  3 +
>  drivers/firmware/efi/runtime-wrappers.c | 81 ++++++++++++--------
>  include/linux/efi.h                     |  1 +
>  3 files changed, 53 insertions(+), 32 deletions(-)

This one looks good too.
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux