aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/realmode
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-11-16 16:57:13 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2012-11-16 19:42:09 -0500
commitfc8d782677f163dee76427fdd8a92bebd2b50b23 (patch)
treec3e228bd6a3c194cb28276bb834582a34a4ff371 /arch/x86/realmode
parent05a476b6e3795f205806662bf09ab95774266292 (diff)
x86: Use __pa_symbol instead of __pa on C visible symbols
When I made an attempt at separating __pa_symbol and __pa I found that there were a number of cases where __pa was used on an obvious symbol. I also caught one non-obvious case as _brk_start and _brk_end are based on the address of __brk_base which is a C visible symbol. In mark_rodata_ro I was able to reduce the overhead of kernel symbol to virtual memory translation by using a combination of __va(__pa_symbol()) instead of page_address(virt_to_page()). Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Link: http://lkml.kernel.org/r/20121116215640.8521.80483.stgit@ahduyck-cp1.jf.intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/realmode')
-rw-r--r--arch/x86/realmode/init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c
index cbca565af5bd..80450261215c 100644
--- a/arch/x86/realmode/init.c
+++ b/arch/x86/realmode/init.c
@@ -62,9 +62,9 @@ void __init setup_real_mode(void)
62 __va(real_mode_header->trampoline_header); 62 __va(real_mode_header->trampoline_header);
63 63
64#ifdef CONFIG_X86_32 64#ifdef CONFIG_X86_32
65 trampoline_header->start = __pa(startup_32_smp); 65 trampoline_header->start = __pa_symbol(startup_32_smp);
66 trampoline_header->gdt_limit = __BOOT_DS + 7; 66 trampoline_header->gdt_limit = __BOOT_DS + 7;
67 trampoline_header->gdt_base = __pa(boot_gdt); 67 trampoline_header->gdt_base = __pa_symbol(boot_gdt);
68#else 68#else
69 /* 69 /*
70 * Some AMD processors will #GP(0) if EFER.LMA is set in WRMSR 70 * Some AMD processors will #GP(0) if EFER.LMA is set in WRMSR
@@ -78,8 +78,8 @@ void __init setup_real_mode(void)
78 *trampoline_cr4_features = read_cr4(); 78 *trampoline_cr4_features = read_cr4();
79 79
80 trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd); 80 trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd);
81 trampoline_pgd[0] = __pa(level3_ident_pgt) + _KERNPG_TABLE; 81 trampoline_pgd[0] = __pa_symbol(level3_ident_pgt) + _KERNPG_TABLE;
82 trampoline_pgd[511] = __pa(level3_kernel_pgt) + _KERNPG_TABLE; 82 trampoline_pgd[511] = __pa_symbol(level3_kernel_pgt) + _KERNPG_TABLE;
83#endif 83#endif
84} 84}
85 85