linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org
Cc: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH v2 0/7] efi: run UEFI services with interrupts enabled
Date: Tue,  1 Dec 2015 11:50:13 +0100	[thread overview]
Message-ID: <1448967020-20190-1-git-send-email-ard.biesheuvel@linaro.org> (raw)

The UEFI spec does not require interrupts to be disabled when invoking
runtime services. The reason we have been doing so is because EFI pstore
may call SetVariable() from interrupt context, which may result in deadlock
if another runtime services call was in progress on the same cpu.

The EFI pstore has already been updated to use a non-blocking path and fail
gracefully rather than spin forever, so we can updated the ordinary blocking
wrappers to run with interrupts enabled instead. This aims to prevent excessive
interrupt latencies on uniprocessor platforms with slow variable stores.

Changes since v2:
- added nonblocking QueryVariableInfo() wrapper variant, and updated
  efi_query_variable_store() to use it when called in nonblocking context
- add patch to drop the rtc_lock spinlock
- add patch to drop redundant efi_set_variable_nonblocking_t typedef
- drop BUG_ONs in patch #7

Ard Biesheuvel (7):
  efi: expose non-blocking set_variable() wrapper to efivars
  efi: remove redundant efi_set_variable_nonblocking prototype
  efi: runtime-wrappers: add a nonblocking version of QueryVariableInfo
  efi: add nonblocking option to efi_query_variable_store()
  efi: runtime-wrappers: remove out of date comment regarding in_nmi()
  efi: runtime-wrapper: get rid of the rtc_lock spinlock
  efi: runtime-wrappers: run UEFI Runtime Services with interrupts
    enabled

 arch/x86/platform/efi/quirks.c          |  37 +++++--
 drivers/firmware/efi/efi.c              |   1 +
 drivers/firmware/efi/runtime-wrappers.c | 115 +++++++-------------
 drivers/firmware/efi/vars.c             |  16 ++-
 include/linux/efi.h                     |  21 ++--
 5 files changed, 94 insertions(+), 96 deletions(-)

-- 
1.9.1

             reply	other threads:[~2015-12-01 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 10:50 Ard Biesheuvel [this message]
     [not found] ` <1448967020-20190-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-12-01 10:50   ` [PATCH v2 1/7] efi: expose non-blocking set_variable() wrapper to efivars Ard Biesheuvel
2015-12-01 10:50   ` [PATCH v2 2/7] efi: remove redundant efi_set_variable_nonblocking prototype Ard Biesheuvel
2015-12-01 10:50   ` [PATCH v2 3/7] efi: runtime-wrappers: add a nonblocking version of QueryVariableInfo Ard Biesheuvel
2015-12-01 10:50   ` [PATCH v2 4/7] efi: add nonblocking option to efi_query_variable_store() Ard Biesheuvel
     [not found]     ` <1448967020-20190-5-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-12-08 13:44       ` Matt Fleming
2015-12-01 10:50   ` [PATCH v2 5/7] efi: runtime-wrappers: remove out of date comment regarding in_nmi() Ard Biesheuvel
2015-12-01 10:50   ` [PATCH v2 6/7] efi: runtime-wrapper: get rid of the rtc_lock spinlock Ard Biesheuvel
     [not found]     ` <1448967020-20190-7-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-12-08 12:48       ` Matt Fleming
     [not found]         ` <20151208124854.GC2518-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-12-08 13:11           ` Ard Biesheuvel
2015-12-01 10:50   ` [PATCH v2 7/7] efi: runtime-wrappers: run UEFI Runtime Services with interrupts enabled Ard Biesheuvel
     [not found]     ` <1448967020-20190-8-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-12-08 13:53       ` Matt Fleming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448967020-20190-1-git-send-email-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).