[PATCH 1/8] efi/x86: Use C wrapper instead of inline assembly

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

 



Call the C wrappers instead of inline assembly for cli and lgdt
instructions.

Signed-off-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
---
 arch/x86/boot/compressed/eboot.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 287393d725f0..f89caae60057 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -9,6 +9,7 @@
 #pragma GCC visibility push(hidden)
 
 #include <linux/efi.h>
+#include <linux/irqflags.h>
 #include <linux/pci.h>
 
 #include <asm/efi.h>
@@ -877,8 +878,8 @@ struct boot_params *efi_main(efi_handle_t handle,
 		desc++;
 	}
 
-	asm volatile("cli");
-	asm volatile ("lgdt %0" : : "m" (*gdt));
+	raw_local_irq_disable();
+	native_load_gdt(gdt);
 
 	return boot_params;
 fail:
-- 
2.24.1




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux