lkml.org 
[lkml]   [2020]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip: efi/urgent] efi/efivars: Set generic ops before loading SSDT
The following commit has been merged into the efi/urgent branch of tip:

Commit-ID: 50bdcf047503e30126327d0be4f0ad7337106d68
Gitweb: https://git.kernel.org/tip/50bdcf047503e30126327d0be4f0ad7337106d68
Author: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
AuthorDate: Mon, 23 Nov 2020 12:28:17 -05:00
Committer: Ard Biesheuvel <ardb@kernel.org>
CommitterDate: Wed, 25 Nov 2020 16:55:02 +01:00

efi/efivars: Set generic ops before loading SSDT

Efivars allows for overriding of SSDT tables, however starting with
commit

bf67fad19e493b ("efi: Use more granular check for availability for variable services")

this use case is broken. When loading SSDT generic ops should be set
first, however mentioned commit reversed order of operations. Fix this
by restoring original order of operations.

Fixes: bf67fad19e493b ("efi: Use more granular check for availability for variable services")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20201123172817.124146-1-amadeuszx.slawinski@linux.intel.com
Tested-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
drivers/firmware/efi/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 5e5480a..6c6eec0 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -390,10 +390,10 @@ static int __init efisubsys_init(void)

if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE |
EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME)) {
- efivar_ssdt_load();
error = generic_ops_register();
if (error)
goto err_put;
+ efivar_ssdt_load();
platform_device_register_simple("efivars", 0, NULL, 0);
}

\
 
 \ /
  Last update: 2020-11-27 17:52    [W:0.022 / U:3.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site