aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/efi.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-15 18:15:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-15 18:20:41 -0500
commit11520e5e7c1855fc3bf202bb3be35a39d9efa034 (patch)
tree734ea170f825000dceef3f724dff474b46fce11d /arch/x86/include/asm/efi.h
parent5bd665f28db2b04a8d6fe277342479906fc60b62 (diff)
Revert "x86-64/efi: Use EFI to deal with platform wall clock (again)"
This reverts commit bd52276fa1d4 ("x86-64/efi: Use EFI to deal with platform wall clock (again)"), and the two supporting commits: da5a108d05b4: "x86/kernel: remove tboot 1:1 page table creation code" 185034e72d59: "x86, efi: 1:1 pagetable mapping for virtual EFI calls") as they all depend semantically on commit 53b87cf088e2 ("x86, mm: Include the entire kernel memory map in trampoline_pgd") that got reverted earlier due to the problems it caused. This was pointed out by Yinghai Lu, and verified by me on my Macbook Air that uses EFI. Pointed-out-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/include/asm/efi.h')
-rw-r--r--arch/x86/include/asm/efi.h28
1 files changed, 7 insertions, 21 deletions
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index fd13815fe85c..6e8fdf5ad113 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -69,37 +69,23 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
69 efi_call6((void *)(f), (u64)(a1), (u64)(a2), (u64)(a3), \ 69 efi_call6((void *)(f), (u64)(a1), (u64)(a2), (u64)(a3), \
70 (u64)(a4), (u64)(a5), (u64)(a6)) 70 (u64)(a4), (u64)(a5), (u64)(a6))
71 71
72extern unsigned long efi_call_virt_prelog(void);
73extern void efi_call_virt_epilog(unsigned long);
74
75#define efi_callx(x, func, ...) \
76 ({ \
77 efi_status_t __status; \
78 unsigned long __pgd; \
79 \
80 __pgd = efi_call_virt_prelog(); \
81 __status = efi_call##x(func, __VA_ARGS__); \
82 efi_call_virt_epilog(__pgd); \
83 __status; \
84 })
85
86#define efi_call_virt0(f) \ 72#define efi_call_virt0(f) \
87 efi_callx(0, (void *)(efi.systab->runtime->f)) 73 efi_call0((void *)(efi.systab->runtime->f))
88#define efi_call_virt1(f, a1) \ 74#define efi_call_virt1(f, a1) \
89 efi_callx(1, (void *)(efi.systab->runtime->f), (u64)(a1)) 75 efi_call1((void *)(efi.systab->runtime->f), (u64)(a1))
90#define efi_call_virt2(f, a1, a2) \ 76#define efi_call_virt2(f, a1, a2) \
91 efi_callx(2, (void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2)) 77 efi_call2((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2))
92#define efi_call_virt3(f, a1, a2, a3) \ 78#define efi_call_virt3(f, a1, a2, a3) \
93 efi_callx(3, (void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 79 efi_call3((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
94 (u64)(a3)) 80 (u64)(a3))
95#define efi_call_virt4(f, a1, a2, a3, a4) \ 81#define efi_call_virt4(f, a1, a2, a3, a4) \
96 efi_callx(4, (void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 82 efi_call4((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
97 (u64)(a3), (u64)(a4)) 83 (u64)(a3), (u64)(a4))
98#define efi_call_virt5(f, a1, a2, a3, a4, a5) \ 84#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
99 efi_callx(5, (void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 85 efi_call5((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
100 (u64)(a3), (u64)(a4), (u64)(a5)) 86 (u64)(a3), (u64)(a4), (u64)(a5))
101#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \ 87#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
102 efi_callx(6, (void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 88 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
103 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) 89 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
104 90
105extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size, 91extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,