ia64/xen-unstable
changeset 16004:cbe97b8802e9
[IA64] Kexec: Zap VHPT in relocate_kernel
On XEN do_ia64_purge_tlb unpins the VHPT entry, so it seems
logical that relocate_kernel should do the same thing.
It seems to work, but is it correct?
Signed-off-by: Simon Horman <horms@verge.net.au>
On XEN do_ia64_purge_tlb unpins the VHPT entry, so it seems
logical that relocate_kernel should do the same thing.
It seems to work, but is it correct?
Signed-off-by: Simon Horman <horms@verge.net.au>
author | Alex Williamson <alex.williamson@hp.com> |
---|---|
date | Thu Sep 27 16:26:34 2007 -0600 (2007-09-27) |
parents | 687de7ae2298 |
children | 83239b289072 |
files | xen/arch/ia64/xen/machine_kexec.c |
line diff
1.1 --- a/xen/arch/ia64/xen/machine_kexec.c Thu Sep 27 16:24:02 2007 -0600 1.2 +++ b/xen/arch/ia64/xen/machine_kexec.c Thu Sep 27 16:26:34 2007 -0600 1.3 @@ -12,12 +12,14 @@ 1.4 #include <xen/lib.h> 1.5 #include <xen/types.h> 1.6 #include <xen/smp.h> 1.7 +#include <xen/acpi.h> 1.8 #include <public/kexec.h> 1.9 #include <linux/efi.h> 1.10 #include <asm/delay.h> 1.11 #include <asm/meminit.h> 1.12 #include <asm/hw_irq.h> 1.13 #include <asm/kexec.h> 1.14 +#include <asm/vhpt.h> 1.15 #include <linux/cpu.h> 1.16 #include <linux/cpu.h> 1.17 #include <linux/notifier.h> 1.18 @@ -29,7 +31,8 @@ typedef asmlinkage NORET_TYPE void (*rel 1.19 unsigned long pal_addr, 1.20 unsigned long cpu_data_pa, 1.21 unsigned long kernel_start, 1.22 - unsigned long page_offset) 1.23 + unsigned long page_offset, 1.24 + unsigned long vhpt) 1.25 ATTRIB_NORET; 1.26 1.27 #define kexec_flush_icache_page(page) \ 1.28 @@ -55,6 +58,7 @@ static void ia64_machine_kexec(struct un 1.29 __va(image->reboot_code_buffer); 1.30 unsigned long cpu_data_pa = (unsigned long) 1.31 __pa(cpu_data(smp_processor_id())); 1.32 + unsigned long vhpt; 1.33 int ii; 1.34 1.35 /* Interrupts aren't acceptable while we reboot */ 1.36 @@ -79,10 +83,12 @@ static void ia64_machine_kexec(struct un 1.37 while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR) 1.38 ia64_eoi(); 1.39 platform_kernel_launch_event(); 1.40 + vhpt = __va_ul(vcpu_vhpt_maddr(current)); 1.41 + BUG_ON(!vhpt); 1.42 rnk = (relocate_new_kernel_t)&code_addr; 1.43 (*rnk)(image->indirection_page, image->start_address, ia64_boot_param, 1.44 GRANULEROUNDDOWN((unsigned long) pal_vaddr), cpu_data_pa, 1.45 - KERNEL_START, PAGE_OFFSET); 1.46 + KERNEL_START, PAGE_OFFSET, vhpt); 1.47 BUG(); 1.48 } 1.49