Merge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / firmware / efi / arm-runtime.c
index 352bd2473162ed37f608b660e89617b4d50cba09..e2ac5fa5531b9f4ce39e96d0953bb82251a49cbe 100644 (file)
@@ -1,14 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Extensible Firmware Interface
  *
  * Based on Extensible Firmware Interface Specification version 2.4
  *
  * Copyright (C) 2013, 2014 Linaro Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
  */
 
 #include <linux/dmi.h>
@@ -46,10 +42,10 @@ static struct ptdump_info efi_ptdump_info = {
 
 static int __init ptdump_init(void)
 {
-       if (!efi_enabled(EFI_RUNTIME_SERVICES))
-               return 0;
+       if (efi_enabled(EFI_RUNTIME_SERVICES))
+               ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables");
 
-       return ptdump_debugfs_register(&efi_ptdump_info, "efi_page_tables");
+       return 0;
 }
 device_initcall(ptdump_init);
 
@@ -166,13 +162,11 @@ void efi_virtmap_unload(void)
 static int __init arm_dmi_init(void)
 {
        /*
-        * On arm64/ARM, DMI depends on UEFI, and dmi_scan_machine() needs to
+        * On arm64/ARM, DMI depends on UEFI, and dmi_setup() needs to
         * be called early because dmi_id_init(), which is an arch_initcall
         * itself, depends on dmi_scan_machine() having been called already.
         */
-       dmi_scan_machine();
-       if (dmi_available)
-               dmi_set_dump_stack_arch_desc();
+       dmi_setup();
        return 0;
 }
 core_initcall(arm_dmi_init);