]> xenbits.xensource.com Git - xen.git/commitdiff
Revert "x86/EFI: meet further spec requirements for runtime calls" 4.8.0-rc6
authorJan Beulich <jbeulich@suse.com>
Mon, 14 Nov 2016 07:53:16 +0000 (08:53 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 14 Nov 2016 07:53:16 +0000 (08:53 +0100)
This reverts commit 67b5b302f5319f70288587dc98ab505c4deada1e as
being both actively wrong and latently broken.

xen/arch/x86/efi/Makefile
xen/common/efi/runtime.c

index 7a743f88881c337447949317908d3cd066de705c..ad3fdf7ff7e990665eccac826f25e1ae48ed6049 100644 (file)
@@ -14,10 +14,5 @@ extra-$(efi) += boot.init.o relocs-dummy.o runtime.o compat.o buildid.o
 %.o: %.ihex
        $(OBJCOPY) -I ihex -O binary $< $@
 
-cc-runtime.o := $(CC) -mno-sse
-$(call cc-option-add,cflags-runtime.o,cc-runtime.o,-mpreferred-stack-boundary=3)
-$(call cc-option-add,cflags-runtime.o,cc-runtime.o,-mincoming-stack-boundary=3)
-runtime.o: CFLAGS += $(cflags-runtime.o)
-
 stub.o: $(extra-y)
 nogcov-$(efi) += stub.o
index 926dae69d524693d4bba9a0fedd961eec08131d6..c25681496721f753df29e258967b99a0c1129ffb 100644 (file)
@@ -59,26 +59,12 @@ unsigned long efi_rs_enter(void)
     static const u16 fcw = FCW_DEFAULT;
     static const u32 mxcsr = MXCSR_DEFAULT;
     unsigned long cr3 = read_cr3();
-#if __GNUC__ < 5 || (__GNUC__ == 5 && __GNUC_MINOR__ < 3)
-/*
- * -mpreferred-stack-boundary=3 is can be used only from gcc 4.8 onwards,
- * and -mincoming-stack-boundary=3 only from 5.3 onwards. Therefore higher
- * than necessary alignment is being forced here in that case.
- */
-# define FORCE_ALIGN 32
-#else
-# define FORCE_ALIGN 16
-#endif
-    unsigned long __aligned(FORCE_ALIGN) placeholder[0];
-#undef FORCE_ALIGN
-
-    asm volatile("" : "+m" (placeholder));
 
     if ( !efi_l4_pgtable )
         return 0;
 
     save_fpu_enable();
-    asm volatile ( "fnclex; fldcw %0" :: "m" (fcw) );
+    asm volatile ( "fldcw %0" :: "m" (fcw) );
     asm volatile ( "ldmxcsr %0" :: "m" (mxcsr) );
 
     spin_lock(&efi_rs_lock);