Skip to content

Commit d9f283a

Browse files
Sebastian Andrzej Siewiorardbiesheuvel
authored andcommitted
efi: Disable runtime services on RT
Based on measurements the EFI functions get_variable / get_next_variable take up to 2us which looks okay. The functions get_time, set_time take around 10ms. These 10ms are too much. Even one ms would be too much. Ard mentioned that SetVariable might even trigger larger latencies if the firmware will erase flash blocks on NOR. The time-functions are used by efi-rtc and can be triggered during run-time (either via explicit read/write or ntp sync). The variable write could be used by pstore. These functions can be disabled without much of a loss. The poweroff / reboot hooks may be provided by PSCI. Disable EFI's runtime wrappers on PREEMPT_RT. This was observed on "EFI v2.60 by SoftIron Overdrive 1000". Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 6880fa6 commit d9f283a

File tree

1 file changed

+1
-1
lines changed
  • drivers/firmware/efi

1 file changed

+1
-1
lines changed

drivers/firmware/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct mm_struct efi_mm = {
6666

6767
struct workqueue_struct *efi_rts_wq;
6868

69-
static bool disable_runtime;
69+
static bool disable_runtime = IS_ENABLED(CONFIG_PREEMPT_RT);
7070
static int __init setup_noefi(char *arg)
7171
{
7272
disable_runtime = true;

0 commit comments

Comments
 (0)