[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] Fix LOAD_PHYSICAL for INIT handler
# HG changeset patch # User Alex Williamson <alex.williamson@xxxxxx> # Date 1197393251 25200 # Node ID 35b2c54f59d5ab9c8fa414be86f2668da4149b6a # Parent 4054cd60895b667eb349221effb678bb5244042e [IA64] Fix LOAD_PHYSICAL for INIT handler Xen virtual address space moves to 0xf400000004000000. So LOAD_PHYSICAL is broken. I fixed LOAD_PHYSICAL with ia64 patch. This patch also fixes INIT handler. Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx> --- xen/arch/ia64/linux-xen/setup.c | 2 -- xen/arch/ia64/xen/xenpatch.c | 24 ++++++++++++++++++++++++ xen/include/asm-ia64/linux-xen/asm/asmmacro.h | 8 -------- 3 files changed, 24 insertions(+), 10 deletions(-) diff -r 4054cd60895b -r 35b2c54f59d5 xen/arch/ia64/linux-xen/setup.c --- a/xen/arch/ia64/linux-xen/setup.c Mon Dec 10 13:49:22 2007 +0000 +++ b/xen/arch/ia64/linux-xen/setup.c Tue Dec 11 10:14:11 2007 -0700 @@ -500,9 +500,7 @@ setup_arch (char **cmdline_p) { unw_init(); -#ifndef XEN ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); -#endif *cmdline_p = __va(ia64_boot_param->command_line); #ifndef XEN diff -r 4054cd60895b -r 35b2c54f59d5 xen/arch/ia64/xen/xenpatch.c --- a/xen/arch/ia64/xen/xenpatch.c Mon Dec 10 13:49:22 2007 +0000 +++ b/xen/arch/ia64/xen/xenpatch.c Tue Dec 11 10:14:11 2007 -0700 @@ -106,6 +106,30 @@ static void __init xen_patch_frametable_ #endif } +/* + * We need sometimes to load the physical address of a kernel + * object. Often we can convert the virtual address to physical + * at execution time, but sometimes (either for performance reasons + * or during error recovery) we cannot to this. Patch the marked + * bundles to load the physical address. + */ +void __init +ia64_patch_vtop (unsigned long start, unsigned long end) +{ + s32 *offp = (s32 *)start; + u64 ip; + + while (offp < (s32 *)end) { + ip = (u64)offp + *offp; + + /* replace virtual address with corresponding physical address */ + ia64_patch_imm64(ip, ia64_tpa(get_imm64(ip))); + ia64_fc((void *)ip); + ++offp; + } + ia64_sync_i(); + ia64_srlz_i(); +} void __init xen_patch_kernel(void) { diff -r 4054cd60895b -r 35b2c54f59d5 xen/include/asm-ia64/linux-xen/asm/asmmacro.h --- a/xen/include/asm-ia64/linux-xen/asm/asmmacro.h Mon Dec 10 13:49:22 2007 +0000 +++ b/xen/include/asm-ia64/linux-xen/asm/asmmacro.h Tue Dec 11 10:14:11 2007 -0700 @@ -59,17 +59,9 @@ name: .section ".data.patch.vtop", "a" // declare section & section attributes .previous -#ifdef XEN -#define LOAD_PHYSICAL(pr, reg, obj) \ -[1:](pr)movl reg = obj;; \ - shl reg = reg,4;; \ - shr.u reg = reg,4;; \ - .xdata4 ".data.patch.vtop", 1b-. -#else #define LOAD_PHYSICAL(pr, reg, obj) \ [1:](pr)movl reg = obj; \ .xdata4 ".data.patch.vtop", 1b-. -#endif /* * For now, we always put in the McKinley E9 workaround. On CPUs that don't need it, _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |