diff options
author | Huang, Ying <ying.huang@intel.com> | 2008-01-30 07:31:19 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:19 -0500 |
commit | e429795c68d3001ecae74f6465420c9f043b0ece (patch) | |
tree | 46e24522c3b7fbe7dc9f7fc63b4c942ff48e4070 /include/asm-x86/efi.h | |
parent | 9ad65e4748f55e3159283d7fa9d54fb30c086113 (diff) |
x86: EFI runtime service support: remove duplicated code from efi_32.c
This patch removes the duplicated code between efi_32.c and efi.c.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/efi.h')
-rw-r--r-- | include/asm-x86/efi.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h index 1459d3d58653..6d54502755aa 100644 --- a/include/asm-x86/efi.h +++ b/include/asm-x86/efi.h | |||
@@ -2,6 +2,48 @@ | |||
2 | #define _ASM_X86_EFI_H | 2 | #define _ASM_X86_EFI_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_32 | 4 | #ifdef CONFIG_X86_32 |
5 | |||
6 | extern unsigned long asmlinkage efi_call_phys(void *, ...); | ||
7 | |||
8 | #define efi_call_phys0(f) efi_call_phys(f) | ||
9 | #define efi_call_phys1(f, a1) efi_call_phys(f, a1) | ||
10 | #define efi_call_phys2(f, a1, a2) efi_call_phys(f, a1, a2) | ||
11 | #define efi_call_phys3(f, a1, a2, a3) efi_call_phys(f, a1, a2, a3) | ||
12 | #define efi_call_phys4(f, a1, a2, a3, a4) \ | ||
13 | efi_call_phys(f, a1, a2, a3, a4) | ||
14 | #define efi_call_phys5(f, a1, a2, a3, a4, a5) \ | ||
15 | efi_call_phys(f, a1, a2, a3, a4, a5) | ||
16 | #define efi_call_phys6(f, a1, a2, a3, a4, a5, a6) \ | ||
17 | efi_call_phys(f, a1, a2, a3, a4, a5, a6) | ||
18 | /* | ||
19 | * Wrap all the virtual calls in a way that forces the parameters on the stack. | ||
20 | */ | ||
21 | |||
22 | #define efi_call_virt(f, args...) \ | ||
23 | ((efi_##f##_t __attribute__((regparm(0)))*)efi.systab->runtime->f)(args) | ||
24 | |||
25 | #define efi_call_virt0(f) efi_call_virt(f) | ||
26 | #define efi_call_virt1(f, a1) efi_call_virt(f, a1) | ||
27 | #define efi_call_virt2(f, a1, a2) efi_call_virt(f, a1, a2) | ||
28 | #define efi_call_virt3(f, a1, a2, a3) efi_call_virt(f, a1, a2, a3) | ||
29 | #define efi_call_virt4(f, a1, a2, a3, a4) \ | ||
30 | efi_call_virt(f, a1, a2, a3, a4) | ||
31 | #define efi_call_virt5(f, a1, a2, a3, a4, a5) \ | ||
32 | efi_call_virt(f, a1, a2, a3, a4, a5) | ||
33 | #define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \ | ||
34 | efi_call_virt(f, a1, a2, a3, a4, a5, a6) | ||
35 | /* | ||
36 | * We require an early boot_ioremap mapping mechanism initially | ||
37 | */ | ||
38 | extern void *boot_ioremap(unsigned long, unsigned long); | ||
39 | |||
40 | #define efi_early_ioremap(addr, size) boot_ioremap(addr, size) | ||
41 | #define efi_early_iounmap(vaddr, size) | ||
42 | |||
43 | #define efi_ioremap(addr, size) ioremap(addr, size) | ||
44 | |||
45 | #define end_pfn_map max_low_pfn | ||
46 | |||
5 | #else /* !CONFIG_X86_32 */ | 47 | #else /* !CONFIG_X86_32 */ |
6 | 48 | ||
7 | #define MAX_EFI_IO_PAGES 100 | 49 | #define MAX_EFI_IO_PAGES 100 |